|
|
|
|
@ -59,7 +59,9 @@
|
|
|
|
|
:list="list"
|
|
|
|
|
:total="total"
|
|
|
|
|
stripe
|
|
|
|
|
|
|
|
|
|
:row-key="'id'"
|
|
|
|
|
:default-expand-all="false"
|
|
|
|
|
:treeProps="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
|
|
@cell-dblclick='cellClicks'
|
|
|
|
|
@selection-change='selectionChange'
|
|
|
|
|
@pageSizeChange="e => {select.page_size = e,getList()}"
|
|
|
|
|
@ -227,13 +229,18 @@
|
|
|
|
|
checkAll:false,
|
|
|
|
|
selectMission:[],
|
|
|
|
|
table:[{
|
|
|
|
|
label:"问题类型",
|
|
|
|
|
prop:'ask_value',
|
|
|
|
|
width:120,
|
|
|
|
|
},{
|
|
|
|
|
label:"问题描述",
|
|
|
|
|
prop:'ask_introduce',
|
|
|
|
|
align:'left'
|
|
|
|
|
},{
|
|
|
|
|
label:"问题类型",
|
|
|
|
|
prop:'ask.value',
|
|
|
|
|
width:80,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"状态",
|
|
|
|
|
width:120,
|
|
|
|
|
prop:'fix_status_name'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"检查地点",
|
|
|
|
|
@ -440,6 +447,20 @@
|
|
|
|
|
k.missionName = k.mission?k.mission.name:'日常巡查'
|
|
|
|
|
console.log("k.missionName",k.missionName)
|
|
|
|
|
k.is_myself = false
|
|
|
|
|
if(k.fix_status===null){
|
|
|
|
|
this.statusLabel.map(s=>{
|
|
|
|
|
if(s.id==k.status){
|
|
|
|
|
k.fix_status_name = s.value
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// for(var s of this.statusLabel){
|
|
|
|
|
// if(item.id==k.status){
|
|
|
|
|
// k.fix_status_name = item.value
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}else{
|
|
|
|
|
k.fix_status_name = k.fix_status==1?'已完成':'已列计划'
|
|
|
|
|
}
|
|
|
|
|
if(k.status==2||k.status==3||k.status==4||k.status==7){
|
|
|
|
|
if(k.accept_admin_ids&&k.accept_admin_ids.length>0){
|
|
|
|
|
for(var a of k.accept_admin_ids){
|
|
|
|
|
@ -457,11 +478,34 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.list = this.groupByAskId(res.data)
|
|
|
|
|
console.log("this.list",this.list)
|
|
|
|
|
// this.currentTableList = this.filterBySelectedMonths(this.list,this.selectMission)
|
|
|
|
|
// console.log("currentTableList",this.currentTableList)
|
|
|
|
|
this.total = res.total
|
|
|
|
|
},
|
|
|
|
|
groupByAskId(items) {
|
|
|
|
|
const groups = {};
|
|
|
|
|
|
|
|
|
|
items.forEach(item => {
|
|
|
|
|
const { ask_id } = item;
|
|
|
|
|
if (!groups[ask_id]) {
|
|
|
|
|
// 创建新组,第一个元素作为父级的ask
|
|
|
|
|
groups[ask_id] = {
|
|
|
|
|
ask_id,
|
|
|
|
|
id:ask_id,
|
|
|
|
|
ask_value:item.ask.value,
|
|
|
|
|
ask: { ...item },
|
|
|
|
|
children: []
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
// 无论是否是第一个元素,都添加到children数组
|
|
|
|
|
groups[ask_id].children.push({ ...item });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 转换为数组格式
|
|
|
|
|
return Object.values(groups);
|
|
|
|
|
},
|
|
|
|
|
handleCheckAllChange() {
|
|
|
|
|
// let _checkAll = this.checkAll ? false : true
|
|
|
|
|
// console.log("_checkAll",_checkAll)
|
|
|
|
|
@ -636,6 +680,9 @@
|
|
|
|
|
this.$refs.addPatrol.isShow=true
|
|
|
|
|
},
|
|
|
|
|
cellClicks(e){
|
|
|
|
|
if(e.row.ask_value){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$refs.showPatrol.id= e.row.id
|
|
|
|
|
|
|
|
|
|
// this.$refs.showPatrol.id= id
|
|
|
|
|
|