main
zhangqun 11 months ago
parent d0f4e7ef94
commit 4938613014
  1. 72
      pages/investigation/task.vue

@ -196,9 +196,12 @@
<view class="point"> <view class="point">
<view class="title">重点排查</view> <view class="title">重点排查</view>
<view class='row' style="display: flex; flex-wrap: wrap; justify-content: space-between;"> <view class='row' style="display: flex; flex-wrap: wrap; justify-content: space-between;">
<view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item"> <view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item" @longpress="onLongPressZD(item)">
<view class="item">{{ item.name }}</view> <view class="item">{{ item.name }}
<image style="width: 30px;height: 30px;margin-left: 10px;" src="../../static/task/3879.png"
v-show="nidZD == item.nid" @click.stop="delZD"></image>
</view>
</view> </view>
<view style="width: 300rpx;" v-show="type!='view'"> <view style="width: 300rpx;" v-show="type!='view'">
<view class="item add" @click="showInvestigation = true"> <view class="item add" @click="showInvestigation = true">
@ -209,9 +212,15 @@
</view> </view>
</view> </view>
<u-checkbox-group v-model="checked" iconPlacement="right" placement="column"> <u-checkbox-group v-model="checked" iconPlacement="right" placement="column">
<u-checkbox v-for="(item,index) in troubleshootingData" :key="index" :label="item.itemname"
<view v-for="(itemData,indexData) in reversedTroubleshootingData" :key="indexData">
{{ indexData + 1 }}.
{{ itemData.length > 0 ? itemData[0].nname : '' }}
<u-checkbox v-for="(item,index) in itemData" :key="index" :label="item.itemname"
activeColor="#2663BF" :name="item.id" @click="showInvestigationTag2(item)" activeColor="#2663BF" :name="item.id" @click="showInvestigationTag2(item)"
style="padding: 8px 12px;"></u-checkbox> style="padding: 8px 12px;"></u-checkbox>
</view>
</u-checkbox-group> </u-checkbox-group>
<u-popup :show="showInvestigation" @close="showInvestigation = false"> <u-popup :show="showInvestigation" @close="showInvestigation = false">
<InvestigationItem :type="type" @select="select2"></InvestigationItem> <InvestigationItem :type="type" @select="select2"></InvestigationItem>
@ -282,13 +291,15 @@
<u-row :gutter="0" justify="flex-start" style="flex-wrap: wrap"> <u-row :gutter="0" justify="flex-start" style="flex-wrap: wrap">
<scroll-view style="max-height: 400px;" :scroll-top="0" scroll-y="true" show-scrollbar="true"> <scroll-view style="max-height: 400px;" :scroll-top="0" scroll-y="true" show-scrollbar="true">
<view v-for="(item,index) in hiddenDangerList" :key="item" v-show="item.pcType!=1" <view v-for="(item,index) in hiddenDangerList" :key="item" v-show="item.pcType!=1"
style="width: 100%"> style="width: 100%" @longpress="onLongPressYH(item)">
<view class="problem-item"> <view class="problem-item">
<view style="display: flex; justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<view style="width: 80%;line-height: 30px;"> <view style="width: 80%;line-height: 30px;">
{{ item.hdTermName||item.dangerProblem }} {{ item.hdTermName||item.dangerProblem }}
</view> </view>
<view> <image style="width: 30px;height: 30px;" src="../../static/task/3879.png"
v-show="nidYH == item.nid" @click.stop="delYH"></image>
<view v-show="!(nidYH == item.nid)">
<view class="check" @click="onHiddenDangerList(item,index)"> <view class="check" @click="onHiddenDangerList(item,index)">
<image style="width: 10px; height: 16px" <image style="width: 10px; height: 16px"
src="../../static/scimg/right6.png"></image> src="../../static/scimg/right6.png"></image>
@ -623,6 +634,8 @@
columnsPicker: [ columnsPicker: [
], ],
nidZD: '',
nidYH: '',
}; };
}, },
watch: { watch: {
@ -637,6 +650,28 @@
} }
}, },
}, },
computed: {
reversedTroubleshootingData() {
const array = Array.from({ length: this.investigationSelectList.length }, (_, i) => []);
let nidname = this.investigationSelectList.length > 0 ? this.investigationSelectList[0].name : ''
let nx = 0
this.troubleshootingData.map(r => {
this.investigationSelectList.map(m => {
if(r.nid == m.nid) {
r.nname = m.name
if(r.nname == nidname){
array[nx].push(r)
} else {
nidname = r.nname
nx++
array[nx].push(r)
}
}
})
})
return array
}
},
methods: { methods: {
showInvestigationTag(v) { showInvestigationTag(v) {
console.log(v) console.log(v)
@ -1507,6 +1542,33 @@
console.log('盒子的高度:', height); console.log('盒子的高度:', height);
} }
}).exec(); // }).exec(); //
},
onLongPressZD(item) {
this.nidZD = item.nid
},
delZD(){
this.troubleshootingData = this.troubleshootingData.filter(r => {
if(r.nid != this.nidZD){
return r
}
})
this.investigationSelectList = this.investigationSelectList.filter(r => {
if(r.nid != this.nidZD){
return r
}
})
this.nidZD = ''
},
onLongPressYH(item) {
this.nidYH = item.nid
},
delYH(){
this.hiddenDangerList = this.hiddenDangerList.filter(r => {
if(r.nid != this.nidYH){
return r
}
})
this.nidYH = ''
} }
}, },
}; };

Loading…
Cancel
Save