|
|
|
@ -6,6 +6,12 @@
|
|
|
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
|
|
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
|
|
|
<DatePicker style='width:200px;margin-right: 10px;' placeholder="年份" placement="bottom" format='yyyy'
|
|
|
|
<DatePicker style='width:200px;margin-right: 10px;' placeholder="年份" placement="bottom" format='yyyy'
|
|
|
|
type="year" @on-change="changeYear"></DatePicker>
|
|
|
|
type="year" @on-change="changeYear"></DatePicker>
|
|
|
|
|
|
|
|
<el-date-picker @change="changeDate" v-model="select.dateRange" type="daterange"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd" range-separator="至"
|
|
|
|
|
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
|
|
|
|
|
style="width: 280px;margin-right: 10px;height:32px">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
<Input v-model="select.title" clearable style="width: 150px;margin-right: 10px;" placeholder="检查名称" />
|
|
|
|
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.status" placeholder="检查状态">
|
|
|
|
<Select filterable clearable style='width:150px;margin-right: 10px;' v-model="select.status" placeholder="检查状态">
|
|
|
|
<Option v-for="item in statusList" :value="item.id">{{item.value}}</Option>
|
|
|
|
<Option v-for="item in statusList" :value="item.id">{{item.value}}</Option>
|
|
|
|
</Select>
|
|
|
|
</Select>
|
|
|
|
@ -70,25 +76,26 @@
|
|
|
|
<template v-slot:btns>
|
|
|
|
<template v-slot:btns>
|
|
|
|
<el-table-column align='center' label="操作" fixed="right" width="80" header-align="center">
|
|
|
|
<el-table-column align='center' label="操作" fixed="right" width="80" header-align="center">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<div v-if="(is_guiji||is_chuzhang||scope.row.is_myself)&&!(scope.row.status==5||scope.row.status==6)">
|
|
|
|
<template v-if="!scope.row.children || (scope.row.children && scope.row.children.length === 0)">
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')">办理</Button>
|
|
|
|
<div v-if="(is_guiji||is_chuzhang||scope.row.is_myself)&&!(scope.row.status==5||scope.row.status==6)">
|
|
|
|
</div>
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')">办理</Button>
|
|
|
|
<div v-else>
|
|
|
|
</div>
|
|
|
|
<Button size="small" style='margin-right:5px;margin-bottom:5px;' @click="showPatrol(scope.row.id,'show')">查看</Button>
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<Button size="small" style='margin-right:5px;margin-bottom:5px;' @click="showPatrol(scope.row.id,'show')">查看</Button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')">查看</Button> -->
|
|
|
|
</div>
|
|
|
|
<!-- <Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader&&scope.row.leader_status===null)||(scope.row.check_main==1&&is_main_leader&&scope.row.main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')">确认</Button> -->
|
|
|
|
<!-- <Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'show')">查看</Button> -->
|
|
|
|
<!-- <Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader&&scope.row.re_leader_status===null)||(scope.row.re_check_main==1&&is_main_leader&&scope.row.re_main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')">审核</Button> -->
|
|
|
|
<!-- <Button v-if="scope.row.status==1&&((scope.row.check_leader==1&&is_leader&&scope.row.leader_status===null)||(scope.row.check_main==1&&is_main_leader&&scope.row.main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leader')">确认</Button> -->
|
|
|
|
<div v-if='is_guiji||is_chuzhang||login_id==scope.row.admin_id'>
|
|
|
|
<!-- <Button v-if="scope.row.status==9&&((scope.row.re_check_leader==1&&is_leader&&scope.row.re_leader_status===null)||(scope.row.re_check_main==1&&is_main_leader&&scope.row.re_main_status===null))" type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPatrol(scope.row.id,'leaderconfirm')">审核</Button> -->
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size='small' @click="editorPatrol(scope.row.id,'editor')">编辑</Button>
|
|
|
|
<div v-if='is_guiji||is_chuzhang||login_id==scope.row.admin_id'>
|
|
|
|
</div>
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size='small' @click="editorPatrol(scope.row.id,'editor')">编辑</Button>
|
|
|
|
<div v-if='is_guiji||is_chuzhang'>
|
|
|
|
</div>
|
|
|
|
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
|
|
|
|
<div v-if='is_guiji||is_chuzhang'>
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size='small' ghost>删除</Button>
|
|
|
|
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteList(scope.row.id)">
|
|
|
|
</Poptip>
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size='small' ghost>删除</Button>
|
|
|
|
</div>
|
|
|
|
</Poptip>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -157,7 +164,11 @@
|
|
|
|
ask_id:'',
|
|
|
|
ask_id:'',
|
|
|
|
sort_name:'date',
|
|
|
|
sort_name:'date',
|
|
|
|
sort_type:"DESC",
|
|
|
|
sort_type:"DESC",
|
|
|
|
year:''
|
|
|
|
year:'',
|
|
|
|
|
|
|
|
dateRange:[],
|
|
|
|
|
|
|
|
start_date:'',
|
|
|
|
|
|
|
|
end_date:'',
|
|
|
|
|
|
|
|
title:''
|
|
|
|
// pid:0
|
|
|
|
// pid:0
|
|
|
|
// myself_update:0
|
|
|
|
// myself_update:0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -232,6 +243,10 @@
|
|
|
|
label:"问题类型",
|
|
|
|
label:"问题类型",
|
|
|
|
prop:'ask_value',
|
|
|
|
prop:'ask_value',
|
|
|
|
width:120,
|
|
|
|
width:120,
|
|
|
|
|
|
|
|
},{
|
|
|
|
|
|
|
|
label:"检查名称",
|
|
|
|
|
|
|
|
prop:'title',
|
|
|
|
|
|
|
|
align:'left'
|
|
|
|
},{
|
|
|
|
},{
|
|
|
|
label:"问题描述",
|
|
|
|
label:"问题描述",
|
|
|
|
prop:'ask_introduce',
|
|
|
|
prop:'ask_introduce',
|
|
|
|
@ -304,8 +319,8 @@
|
|
|
|
// is_my_inspection:false
|
|
|
|
// is_my_inspection:false
|
|
|
|
// 导出
|
|
|
|
// 导出
|
|
|
|
importtable:[{
|
|
|
|
importtable:[{
|
|
|
|
label:"任务名称",
|
|
|
|
label:"检查名称",
|
|
|
|
prop:'mission_name',
|
|
|
|
prop:'title',
|
|
|
|
},{
|
|
|
|
},{
|
|
|
|
label:"发现时间",
|
|
|
|
label:"发现时间",
|
|
|
|
prop:'date',
|
|
|
|
prop:'date',
|
|
|
|
@ -377,6 +392,16 @@
|
|
|
|
// this.getList()
|
|
|
|
// this.getList()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
changeDate(e){
|
|
|
|
|
|
|
|
if(e){
|
|
|
|
|
|
|
|
this.select.start_date = e[0];
|
|
|
|
|
|
|
|
this.select.end_date = e[1];
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.select.start_date = "";
|
|
|
|
|
|
|
|
this.select.end_date = "";
|
|
|
|
|
|
|
|
this.select.dateRange = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
selectionChange(e){
|
|
|
|
selectionChange(e){
|
|
|
|
console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
let arr = []
|
|
|
|
let arr = []
|
|
|
|
@ -706,20 +731,20 @@
|
|
|
|
this.$refs.showPatrol.department_id=this.department_id
|
|
|
|
this.$refs.showPatrol.department_id=this.department_id
|
|
|
|
this.$refs.showPatrol.isShow = true
|
|
|
|
this.$refs.showPatrol.isShow = true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async importTable(sheetName) {
|
|
|
|
async importTable(sheetName) {
|
|
|
|
const res = await listpatrol(Object.assign(this.select, {
|
|
|
|
const res = await listpatrol(Object.assign(this.select, {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
page_size: 99999
|
|
|
|
page_size: 99999
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
if (res.data) {
|
|
|
|
if (res.data) {
|
|
|
|
let headers = this.importtable.map(i => {
|
|
|
|
let headers = this.importtable.map(i => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
key: i.prop,
|
|
|
|
key: i.prop,
|
|
|
|
title: i.label
|
|
|
|
title: i.label
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
for(var k of res.data){
|
|
|
|
for(var k of res.data){
|
|
|
|
k.mission_name = k.mission?k.mission.name:''
|
|
|
|
{/* k.mission_name = k.mission?k.mission.name:'' */}
|
|
|
|
k.site_name = k.site?k.site.name:k.address
|
|
|
|
k.site_name = k.site?k.site.name:k.address
|
|
|
|
k.ask_value = k.ask?k.ask.value:''
|
|
|
|
k.ask_value = k.ask?k.ask.value:''
|
|
|
|
k.up_admin_name = k.up_admin?k.up_admin.name:''
|
|
|
|
k.up_admin_name = k.up_admin?k.up_admin.name:''
|
|
|
|
@ -753,21 +778,21 @@
|
|
|
|
k.fix_status_name = k.fix_status==1?'已完成':'已列计划'
|
|
|
|
k.fix_status_name = k.fix_status==1?'已完成':'已列计划'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const data = res.data.map(row => headers.map(header => row[header.key]));
|
|
|
|
const data = res.data.map(row => headers.map(header => row[header.key]));
|
|
|
|
data.unshift(headers.map(header => header.title));
|
|
|
|
data.unshift(headers.map(header => header.title));
|
|
|
|
const wb = XLSX.utils.book_new();
|
|
|
|
const wb = XLSX.utils.book_new();
|
|
|
|
const ws = XLSX.utils.aoa_to_sheet(data);
|
|
|
|
const ws = XLSX.utils.aoa_to_sheet(data);
|
|
|
|
XLSX.utils.book_append_sheet(wb, ws, sheetName);
|
|
|
|
XLSX.utils.book_append_sheet(wb, ws, sheetName);
|
|
|
|
const wbout = XLSX.write(wb, {
|
|
|
|
const wbout = XLSX.write(wb, {
|
|
|
|
bookType: 'xlsx',
|
|
|
|
bookType: 'xlsx',
|
|
|
|
bookSST: true,
|
|
|
|
bookSST: true,
|
|
|
|
type: 'array'
|
|
|
|
type: 'array'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
saveAs(new Blob([wbout], {
|
|
|
|
saveAs(new Blob([wbout], {
|
|
|
|
type: 'application/octet-stream'
|
|
|
|
type: 'application/octet-stream'
|
|
|
|
}), `检查问题${sheetName}.xlsx`);
|
|
|
|
}), `检查问题${sheetName}.xlsx`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
deleteList(id){
|
|
|
|
deleteList(id){
|
|
|
|
|