zhangqun 11 months ago
parent 356a83dd2c
commit 4ff1ef1c3b
  1. 36
      pages/investigation/task.vue

@ -3,10 +3,10 @@
<view class="Width100 Box BorderBox"> <view class="Width100 Box BorderBox">
<view class="Content BorderBox Width100"> <view class="Content BorderBox Width100">
<top-title :is-show-left="true" :title="'排查'" :rightWidth="40" class="custom_bg"> <top-title :is-show-left="true" :title="'排查'" :rightWidth="40" class="custom_bg">
<!-- <template slot="right"> <template slot="right">
<image :src="$.imgSrc + '/mine/search.png'" @click="$.open('/pages/mine/setting')" <image :src="$.imgSrc + '/mine/search.png'" @click="$.open('/pages/mine/setting')"
mode="aspectFit" class="InlineBlock imgIcon" style="width: 32rpx"></image> mode="aspectFit" class="InlineBlock imgIcon" style="width: 32rpx"></image>
</template> --> </template>
</top-title> </top-title>
</view> </view>
<view class="stepBox"> <view class="stepBox">
@ -727,15 +727,11 @@
let arr = [] let arr = []
try { try {
arr = v.hdPic.split(',') arr = v.hdPic.split(',')
// arr = arr.filter(it => it !== undefined||it !== '');
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} }
for (let item of arr) { for (let item of arr) {
if (item) { this.fileList.push({ url: item, name: '' })
this.fileList.push({ url: item, name: '' })
}
} }
} else { } else {
this.fileList = []; this.fileList = [];
@ -1213,7 +1209,6 @@
// describecheckedArr // describecheckedArr
let indexes = []; let indexes = [];
if (describe.length <= 0) { if (describe.length <= 0) {
console.log('来了2222')
checkedArr.map(r => { checkedArr.map(r => {
describe.push({ describe.push({
hdTerm: r.id, hdTerm: r.id,
@ -1229,7 +1224,6 @@
let foundIndex = describe.findIndex(item1 => item1.hdTerm === idToFind); let foundIndex = describe.findIndex(item1 => item1.hdTerm === idToFind);
if (foundIndex === -1) { if (foundIndex === -1) {
console.log('来了')
if (item2.checkedSelect) { if (item2.checkedSelect) {
describe.push({ ...item2.checkedSelect, pcType: 1, hdTerm: item2.id, }); describe.push({ ...item2.checkedSelect, pcType: 1, hdTerm: item2.id, });
} }
@ -1237,7 +1231,6 @@
// console.log(`: ${idToFind} describe`); // console.log(`: ${idToFind} describe`);
} else { } else {
console.log('来3333333')
let obj = { let obj = {
hdTerm: item2.id, hdTerm: item2.id,
hdDesc: item2.checkedSelect ? item2.checkedSelect.hdDesc : '', hdDesc: item2.checkedSelect ? item2.checkedSelect.hdDesc : '',
@ -1254,7 +1247,28 @@
// console.log(`describe:`, describe); // console.log(`describe:`, describe);
}); });
// describe.forEach((item1, index1) => {
// let found = false;
// checkedArr.forEach((item2, index2) => {
// if (item1.hdTerm === item2.id) {
// found = true;
// let obj = {
// hdTerm: item2.id,
// hdDesc: item2.checkedSelect ? item2.checkedSelect.hdDesc : '',
// hdPic: item2.checkedSelect ? item2.checkedSelect.hdPic : '',
// hdInfo: item2.checkedSelect ? item2.checkedSelect.hdInfo : '',
// pcType: 1
// }
// describe.splice(index1, 1, obj);
// // indexes.push({ describeIndex: index1, checkedArrIndex: index2 });
// }
// if (!found) {
// // pusharr1notFoundIncheckedArr
// describe.push({ ...item2 }); // arr1
// }
// });
// });
} }
console.log("Not found in checkedArr:", notFoundIncheckedArr); console.log("Not found in checkedArr:", notFoundIncheckedArr);

Loading…
Cancel
Save