|
|
@ -70,7 +70,7 @@ |
|
|
|
<view class="image-list" :key="refreshKey"> |
|
|
|
<view class="image-item" v-for="(element, index) in item.imgList" :key="index"> |
|
|
|
<image :src="element" mode=""></image> |
|
|
|
<u-icon name="close-circle-fill" color="red" class="close" size="36" @click="delImage(index)"> </u-icon> |
|
|
|
<u-icon name="close-circle-fill" color="red" class="close" size="36" @click="delImage(item.imgList, index)"> </u-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="image-item image-item1" @click="chooseImage(item)"> |
|
|
@ -116,7 +116,7 @@ const store = useCountStore() |
|
|
|
const loading = ref(false) |
|
|
|
const type = ref('') |
|
|
|
const imgList = ref([]) |
|
|
|
const status = 'INSPECTION' |
|
|
|
const status = 'INSPECTION' |
|
|
|
const list = ref([ |
|
|
|
{ |
|
|
|
name: 'apple', |
|
|
@ -196,7 +196,7 @@ function getDetailsByNumber() { |
|
|
|
function getSubList() { |
|
|
|
const data = { |
|
|
|
deviceNumber: form.value.deviceNumber, |
|
|
|
status: status |
|
|
|
status |
|
|
|
} |
|
|
|
deviceApi |
|
|
|
.getInspectionConfig(data) |
|
|
@ -248,7 +248,11 @@ function submit() { |
|
|
|
proxy.$modal.showToast('请填写所有必填的巡检点检记录') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
const imgListHave = subList.value.some((item) => !item.imgList || item.imgList.length == 0) |
|
|
|
if (imgListHave) { |
|
|
|
proxy.$modal.showToast('请上传巡检点检图片') |
|
|
|
return |
|
|
|
} |
|
|
|
const data = { |
|
|
|
describes: form.value.describes, |
|
|
|
deviceNumber: form.value.deviceNumber, |
|
|
@ -256,7 +260,7 @@ function submit() { |
|
|
|
classes: form.value.classes, |
|
|
|
subList: subList.value, |
|
|
|
type: type.value, |
|
|
|
status: status |
|
|
|
status |
|
|
|
} |
|
|
|
|
|
|
|
proxy.$modal.confirm('是否添加点检工单').then(() => { |
|
|
@ -359,8 +363,8 @@ function chooseImage(dataItem) { |
|
|
|
} |
|
|
|
|
|
|
|
// 删除图片 |
|
|
|
function delImage(index) { |
|
|
|
imgList.value.splice(index, 1) |
|
|
|
function delImage(array, index) { |
|
|
|
array.splice(index, 1) |
|
|
|
} |
|
|
|
|
|
|
|
onLoad(async (option) => { |
|
|
|