任务完成状态

master
lion 1 year ago
parent 9b6ff52f2d
commit 856eb365d8

@ -223,7 +223,7 @@
<template v-slot:btns> <template v-slot:btns>
<el-table-column align='center'label="操作" width="120" header-align="center"> <el-table-column align='center'label="操作" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.carry_status===1 && showform.main_admin_id===stateObj.login_id"> <div v-if="scope.row.carry_status==1 && showform.main_admin_id==stateObj.login_id">
<Button v-if="scope.row.keep_status===1" @click="startLoad(scope.row,'check')" type="primary" size="small" <Button v-if="scope.row.keep_status===1" @click="startLoad(scope.row,'check')" type="primary" size="small"
>审核进展</Button> >审核进展</Button>
</div> </div>
@ -282,21 +282,21 @@
<el-table-column align='center'label="操作" width="120" header-align="center"> <el-table-column align='center'label="操作" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.carry_status===0"> <div v-if="scope.row.carry_status===0">
<Button @click="startLoad(scope.row,'add')" type="primary" size="small" <Button style="margin-bottom: 5px;" @click="startLoad(scope.row,'add')" type="primary" size="small"
>开始任务</Button> >开始任务</Button>
</div> </div>
<div v-else-if="scope.row.carry_status===1"> <div v-else-if="scope.row.carry_status===1">
<Button v-if="scope.row.carry_type===0" @click="openMyMission" type="primary" size="small" <Button style="margin-bottom: 5px;" v-if="scope.row.carry_type===0" @click="openMyMission" type="primary" size="small"
>任务执行</Button> >任务执行</Button>
<Button v-if="scope.row.carry_type===1 && scope.row.admin_type==1" @click="editorUnit('pid')" type="primary" size="small" <Button style="margin-bottom: 5px;" v-if="scope.row.carry_type===1 && scope.row.admin_type==1" @click="editorUnit('pid')" type="primary" size="small"
>任务分解</Button> >任务分解</Button>
<Button v-if="scope.row.carry_type===2 && scope.row.admin_type==1" @click="editorUnit('send')" type="primary" size="small" <Button style="margin-bottom: 5px;" v-if="scope.row.carry_type===2 && scope.row.admin_type==1" @click="editorUnit('send')" type="primary" size="small"
>任务转办</Button> >任务转办</Button>
<Button v-if="scope.row.keep_status===-1" @click="startLoad(scope.row,'editor')" type="primary" size="small" <Button style="margin-bottom: 5px;" v-if="scope.row.keep_status===-1" @click="startLoad(scope.row,'editor')" type="primary" size="small"
>提交进展</Button> >提交进展</Button>
<Button v-if="scope.row.keep_status===0 || scope.row.keep_status===3 " @click="startLoad(scope.row,'editor')" type="primary" size="small" <Button style="margin-bottom: 5px;" v-if="scope.row.keep_status===0 || scope.row.keep_status===3 " @click="startLoad(scope.row,'editor')" type="primary" size="small"
>编辑进展</Button> >编辑进展</Button>
</div> </div>
<div v-else></div> <div v-else></div>
@ -451,7 +451,7 @@
</template> </template>
</xy-dialog> </xy-dialog>
<openLoad ref="openLoad" @refresh="carryTypeWhat" @reload="getDetail"></openLoad> <openLoad ref="openLoad" @refresh="carryTypeWhat" @reload="getDetail" @reloadList="reloadList"></openLoad>
<addUnit ref="addUnit" @refresh="carryFinish"></addUnit> <addUnit ref="addUnit" @refresh="carryFinish"></addUnit>
<!-- <checkUnit ref="checkUnit"></checkUnit> --> <!-- <checkUnit ref="checkUnit"></checkUnit> -->
<showLogs ref="showLogs"></showLogs> <showLogs ref="showLogs"></showLogs>
@ -1173,9 +1173,12 @@
this.$refs.openLoad.pid = this.showform.pid this.$refs.openLoad.pid = this.showform.pid
this.$refs.openLoad.type = type this.$refs.openLoad.type = type
this.$refs.openLoad.setForm(row,this.showform.start_date,this.showform.end_date) this.$refs.openLoad.setForm(row,this.showform.start_date,this.showform.end_date)
this.$refs.openLoad.id = this.id
this.$refs.openLoad.isShow = true this.$refs.openLoad.isShow = true
}, },
reloadList(){
this.$emit("refresh")
},
// //
carryTypeWhat(e){ carryTypeWhat(e){
console.log("carryTypeWhat",e) console.log("carryTypeWhat",e)
@ -1219,9 +1222,9 @@
// //
openMyMission(remark, e) { openMyMission(remark, e) {
switch (this.is_what_unitType) { switch (this.is_what_unitType) {
case '检查': // case '':
this.addPatrol(e) // this.addPatrol(e)
break; // break;
case '学习': case '学习':
this.type = 'study' this.type = 'study'
break; break;
@ -1234,6 +1237,7 @@
case '资料收集': case '资料收集':
case '方案': case '方案':
case '会议': case '会议':
case '检查':
this.type = 'uploads' this.type = 'uploads'
break; break;
} }

@ -57,6 +57,20 @@
placeholder="请输入当前进展概述" clearable style="width: 400px;"></el-input> placeholder="请输入当前进展概述" clearable style="width: 400px;"></el-input>
</div> </div>
</div> </div>
</template>
<template v-slot:finish_status 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: bold;padding-right: 4px;">*</span>完成情况
</div>
<div class="xy-table-item-content">
<el-select v-model="formObj.finish_status" style="width: 400px;"
placeholder="请选择">
<el-option v-for="item in finish_status_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template> </template>
<template v-slot:file_ids v-if="type=='editor'"> <template v-slot:file_ids v-if="type=='editor'">
<div class="xy-table-item"> <div class="xy-table-item">
@ -126,7 +140,10 @@
} from '@/utils/auth' } from '@/utils/auth'
import { import {
deepCopy deepCopy
} from "@/utils/index.js" } from "@/utils/index.js"
import {
updatemission
} from "@/api/task/unit.js";
export default { export default {
components: { components: {
@ -173,11 +190,19 @@
carry_type: 0, carry_type: 0,
start_date: '', start_date: '',
end_date: '', end_date: '',
ing_introduce: '', ing_introduce: '',
finish_status:'',
file_ids: [], file_ids: [],
end_introduce: '', end_introduce: '',
check_status: '' check_status: ''
}, },
finish_status_list:[{
id:1,
value:'已完成'
},{
id:2,
value:'已列计划'
}],
rules: { rules: {
// carry_type: [{ // carry_type: [{
// required: true, // required: true,
@ -251,7 +276,11 @@
this.formObj.carry_status = 1 this.formObj.carry_status = 1
this.formObj.keep_status = 0 this.formObj.keep_status = 0
} }
if (this.type == 'editor') { if (this.type == 'editor') {
if(!this.formObj.finish_status){
this.$Message.warning('请选择完成情况')
return
}
this.formObj.keep_status = keep_status ? keep_status : 0 this.formObj.keep_status = keep_status ? keep_status : 0
} }
if (this.type == 'check') { if (this.type == 'check') {
@ -287,6 +316,13 @@
} else if (this.formObj.carry_type == 2) { } else if (this.formObj.carry_type == 2) {
this.$emit('refresh', 'carry_type2') this.$emit('refresh', 'carry_type2')
} }
}
if (this.type == 'check') {
updatemission({
id: this.id
}).then(r => {
this.$emit('reloadList')
})
} }
this.$emit('reload') this.$emit('reload')
this.isShow = false this.isShow = false

@ -626,7 +626,7 @@
if(this.path_type == 5){ if(this.path_type == 5){
const newArr = res.data.filter((_, index) => !spliceIndex.includes(index)); const newArr = res.data.filter((_, index) => !spliceIndex.includes(index));
newArr.map(item=>{ newArr.map(item=>{
if(item.audit_status==5){ if(item.audit_status==5 || item.audit_status==3){
console.log("item.mission_finished",item.id,item.mission_finished) console.log("item.mission_finished",item.id,item.mission_finished)
my_arr.push(item) my_arr.push(item)
}else{ }else{

Loading…
Cancel
Save