新增检查增加字段

master
lion 1 year ago
parent 3355fc909f
commit 5644fcb36d

@ -595,9 +595,9 @@ export default {
customFn: (row) => {
return ( <div> {
//
row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
<el-tag type ='info'>已转办</el-tag>
:
// row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
// <el-tag type ='info'></el-tag>
// :
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return ( <el-tag type = {

@ -1,7 +1,7 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="type === 'add' ? '检查问题' : '编辑问题'" :form="form"
:rules="rules" @submit="submit">
:rules="type==='add'?{}:rules" @submit="submit">
<!-- <template v-slot:mission_id >
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -15,7 +15,7 @@
</div>
</div>
</template> -->
<template v-slot:date>
<template v-slot:date v-if="type=='editor'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>发现时间
@ -71,8 +71,8 @@
</template>
<template v-slot:patrol_list v-if="type=='add'">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold;">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题详情
<div class="xy-table-item-label" style="font-weight: bold;min-width:0">
<!-- <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题详情 -->
</div>
<div class="xy-table-item-content" style="display: flex;flex-wrap: wrap;margin-left: 10px; width: 90%;">
<div style="margin-bottom:10px">
@ -87,6 +87,9 @@
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="80" header-align="center">
<template slot-scope="scope">
<div>
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' @click="copyAsk(scope.$index)" size='small' ghost>复制</Button>
</div>
<div>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="delPatrolList(scope.$index)">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size='small' ghost>删除</Button>
@ -243,7 +246,17 @@
mapform: [],
patrol_table:[
{
label:'问题描述',
label:'*发现时间',
prop:'date',
width:180,
customFn:(row,scope)=>{
return( <el-date-picker style="width: 90%" v-model={this.patrol_list[scope.$index].date} format="yyyy-MM-dd"
value-format="yyyy-MM-dd" type="date" placeholder="选择发现时间">
</el-date-picker>)
}
},
{
label:'*问题描述',
prop:'ask_introduce',
width:180,
customFn:(row,scope)=>{
@ -252,7 +265,7 @@
</el-input>)
}
},{
label:'问题类型',
label:'*问题类型',
prop:'ask_id',
width:180,
customFn:(row,scope)=>{
@ -281,7 +294,7 @@
},
{
label:'检查地点',
label:'*检查地点',
prop:'siteName',
width:240,
customFn:(row,scope)=>{
@ -367,6 +380,7 @@
mapClickIndex:0,
patrol_list:[{
showCasc:true,
date:'',
ask_id:'',
site_id: '',
siteName: '',
@ -412,18 +426,18 @@
required: true,
message: '请选择发现时间'
}],
// siteName: [{
// required: true,
// message: ''
// }],
// ask_id: [{
// required: true,
// message: ''
// }],
// ask_introduce: [{
// required: true,
// message: ''
// }]
address: [{
required: true,
message: '请选择检查地点'
}],
ask_id: [{
required: true,
message: '请选择问题类型'
}],
ask_introduce: [{
required: true,
message: '请输入问题描述'
}]
}
}
},
@ -598,6 +612,7 @@
addPatrolList(){
this.patrol_list.push({
showCasc:true,
date:'',
ask_id:'',
site_id: '',
siteName: '',
@ -702,23 +717,93 @@
this.$refs.cascader1.computePresentText()
// res.guide_upload ? this.guidePictureList.push(res.guide_upload) : ''
},
submit() {
console.log("this.patrol_list",this.patrol_list)
// return
let _files = []
if (this.pictureList.length > 0) {
for (var h of this.pictureList) {
if (h.response) {
_files.push(h.response.id)
} else {
_files.push(h.id)
}
deepCopy(data){
//string,number,bool,null,undefined,symbol
//object,array,date
if (data && typeof data === "object") {
//
if (typeof data === "function") {
let tempFunc = data.bind(null);
tempFunc.prototype = this.deepCopy(data.prototype);
return tempFunc;
}
switch (Object.prototype.toString.call(data)) {
case "[object String]":
return data.toString();
case "[object Number]":
return Number(data.toString());
case "[object Boolean]":
return new Boolean(data.toString());
case "[object Date]":
return new Date(data.getTime());
case "[object Array]":
let arr = [];
for (let i = 0; i < data.length; i++) {
arr[i] = this.deepCopy(data[i]);
}
return arr;
//js
case "[object Object]":
let obj = {};
for (let key in data) {
//hasOwnProperty obj.hasOwnProperty(prop)
obj[key] = this.deepCopy(data[key]);
}
return obj;
}
this.form.file_ids = _files
} else {
this.form.file_ids = []
//string,number,bool,null,undefined,symbol
return data;
}
},
copyAsk(index){
console.log(index)
let obj = this.deepCopy(this.patrol_list[index])
obj.pictureList=[]
obj.file_ids=[]
this.patrol_list.push(obj)
},
submit() {
console.log("this.patrol_list",this.patrol_list)
if (this.type === 'add') {
if(this.patrol_list.length<1){
Message({
type: 'warning',
message: '请填写问题'
})
return
}
let nullCount = 0
this.patrol_list.map(item=>{
if(!item.date){
nullCount++
return
}
if(!item.ask_introduce){
nullCount++
return
}
if(!item.ask_id){
nullCount++
return
}
if(!item.siteName){
nullCount++
return
}
})
if( nullCount>0){
Message({
type: 'warning',
message: '请填写完整信息'
})
return
}
this.patrol_list.map(item=>{
let _files = []
item.pictureList.map(p=>{
@ -732,7 +817,7 @@
})
let baseForm = {
mission_id:this.form.mission_id,
date:this.form.date,
// date:this.form.date,
up_admin_id:this.form.up_admin_id,
batch:this.patrol_list,
// site_id: this.form.site_id,
@ -755,6 +840,20 @@
return
}
if (this.type === 'editor') {
// return
let _files = []
if (this.pictureList.length > 0) {
for (var h of this.pictureList) {
if (h.response) {
_files.push(h.response.id)
} else {
_files.push(h.id)
}
}
this.form.file_ids = _files
} else {
this.form.file_ids = []
}
save({
id: this.id,
...this.form

@ -249,7 +249,7 @@
<el-table :data="mission_groups_list" style="width: 100%">
<el-table-column prop="name" label="组别" width="100">
<template slot-scope="scope">
<div>小组{{scope.row.name=mission_groups_name[scope.$index]}}</div>
<div>{{scope.row.name=mission_groups_name[scope.$index]}}</div>
</template>
</el-table-column>
<el-table-column prop="leader" label="组长" width="180">

@ -175,23 +175,26 @@
<div v-if="type=='show'">
<!-- <el-divider>执行情况</el-divider> -->
<el-tabs v-model="activeName">
<!-- <el-tab-pane label="子任务" name="first" v-if="showform.pid_details && showform.pid_details.length>0">
<xy-table :list="showform.pid_details" stripe :table-item="pidTable"
<el-tab-pane label="执行情况" name="second">
<xy-table :list="doList" stripe :table-item="doTable"
:isPage='false'>
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="100" header-align="center">
<template slot-scope="scope">
<div>
<div v-if="scope.row.opr==='任务分解'">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
@click="checkUnits(scope.row.id,'show')">查看子任务</Button>
</div>
<div v-if="scope.row.opr==='任务执行'">
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
@click="checkUnits(scope.row.id,'show')">查看任务</Button>
@click="checkUnits(scope.row.id,'show')">查看</Button>
</div>
</template>
</template>
</el-table-column>
</template>
</xy-table>
</el-tab-pane> -->
<el-tab-pane label="执行情况" name="second">
<div v-if="myself_list.length>0">
<!-- <div v-if="myself_list.length>0">
<el-divider>我办理的任务</el-divider>
<div>
<el-collapse accordion v-model="myself_id" @change="changePidLog">
@ -318,9 +321,34 @@
</el-collapse-item>
</el-collapse>
</div>
</div>
</div> -->
</el-tab-pane>
<el-tab-pane label="完成情况" name="first">
<xy-table :list="inspection_log" v-if="is_what_unitType==''" stripe :table-item="inspectionLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="ask_log" v-if="is_what_unitType==''" stripe :table-item="askLogTable" :isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="study_log" v-if="is_what_unitType==''" stripe :table-item="studyLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="uploads_log" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="uploads_log" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="train_log" v-if="is_what_unitType==''" stripe :table-item="trainLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
</el-tab-pane>
</el-tabs>
</div>
@ -601,6 +629,48 @@
value: '已完成',
type: 'danger'
}],
doList:[{
name:'处长室',
date:'2024-07-11',
status:'已完成',
opr:'任务执行'
},{
name:'综合管理科',
date:'',
status:'未完成',
opr:''
},{
name:'应急保障科',
date:'2024-07-11',
status:'已完成',
opr:'任务分解'
},{
name:'河道管理科',
date:'2024-07-11',
status:'已完成',
opr:'任务转办给管理员'
}],
doTable:[{
label: "参与对象",
prop: 'name',
width: 180,
align: 'left',
},{
label: "完成时间",
prop: 'date',
width: 180,
align: 'left',
},{
label: "完成状态",
prop: 'status',
width: 180,
align: 'left',
},{
label: "执行方式",
prop: 'opr',
// width: 180,
align: 'left',
}],
pidTable:[
{
label: "任务名称",
@ -1567,8 +1637,12 @@
this.type = ''
this.pid_list = []
this.send_list = []
this.myself_list = []
this.pid_id = ''
this.send_id = ''
this.send_id = ''
this.now_id=''
this.myself_id=''
this.pidLog = []
this.pictureList = []
this.my_uploads_list = []
this.uploadsForm = {}

@ -21,7 +21,7 @@
<el-option v-for="item in unitTypeList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-select class='height32' style="width: 150px;margin-right: 10px;" filterable clearable
<el-select class='height32' v-if="path_type!=5" style="width: 150px;margin-right: 10px;" filterable clearable
v-model="select.audit_status" placeholder="任务状态">
<el-option v-for="item in selectAuditStatusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
@ -501,9 +501,9 @@
customFn: (row) => {
return ( <div> {
//
row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
<el-tag type ='info'>已转办</el-tag>
:
// row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
// <el-tag type ='info'></el-tag>
// :
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return ( <el-tag type = {

Loading…
Cancel
Save