个人任务执行

master
lion 2 years ago
parent 5644fcb36d
commit 9b6ff52f2d

@ -51,3 +51,10 @@ export function unDoTotal(params) {
})
}
export function saveNotice(data) {
return request({
url: '/api/admin/notice/save',
method: 'post',
data
})
}

@ -14,7 +14,7 @@ NProgress.configure({
showSpinner: false
}) // NProgress Configuration
const whiteList = ['/login'] // no redirect whitelist
const whiteList = ['/login','/task/list/unit_5'] // no redirect whitelist
router.beforeEach(async (to, from, next) => {
// start progress bar

@ -127,3 +127,45 @@ export function debounce(fn,delay=500){
}
}
//深拷贝数据
export function 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 = 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 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] = deepCopy(data[i]);
}
return arr;
//js自带对象或用户自定义类实例
case "[object Object]":
let obj = {};
for (let key in data) {
//会遍历原型链上的属性方法可以用hasOwnProperty来控制 obj.hasOwnProperty(prop)
obj[key] = deepCopy(data[key]);
}
return obj;
}
} else {
//string,number,bool,null,undefined,symbol
return data;
}
}

@ -128,6 +128,7 @@
</el-popover>
<el-popover
placement="right"
v-if="scope.row.main_admin_id==stateObj.login_id || scope.row.admin_id==stateObj.login_id"
title=""
width="200"
trigger="hover"
@ -176,6 +177,7 @@
</div>
</el-popover>
<el-popover
v-if="scope.row.main_admin_id==stateObj.login_id || scope.row.admin_id==stateObj.login_id"
placement="right"
title=""
width="200"
@ -208,7 +210,7 @@
</el-popover>
</div>
</div>
<!-- doadmins 转办的人员 任务分解执行任务 -->
<!-- doadmins 转办的人员 只有执行任务 -->
<div v-else-if="scope.row.do_admin_ids && scope.row.do_admin_ids.length>0">
<el-tooltip placement="left" effect="light" v-if="scope.row.do_admin_ids.includes(stateObj.login_id) && !(scope.row.audit_status==3||scope.row.audit_status==5)">
<div slot="content">
@ -225,7 +227,7 @@
</template>
</el-popover>
<el-popover
<!-- <el-popover
placement="right"
title=""
width="200"
@ -235,7 +237,7 @@
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
</div>
</el-popover>
</el-popover> -->
</div>
</el-tooltip>
</div>

@ -231,7 +231,10 @@
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select> -->
<el-select-tree :datas='userdata' :valueArr='valueArr' :valueMultiple="valueMultiple"
<el-select-tree v-if="type!='send'" :datas='userdata' :valueArr='valueArr' :valueMultiple="valueMultiple"
@getValue="getSelectedValue"></el-select-tree>
<el-select-tree v-if="type=='send'" :datas='douserdata' :valueArr='valueArr' :valueMultiple="valueMultiple"
@getValue="getSelectedValue"></el-select-tree>
</div>
</div>
@ -488,7 +491,8 @@
userOptions: [],
deptOptionsList: [],
checkAll: false,
isIndeterminate: true,
isIndeterminate: true,
douserdata:[],
userdata: [],
userdatabefore: [],
valueMultiple: [],
@ -803,7 +807,15 @@
this.userdatabefore = data;
let contactData = this.contactUser(data)
this.userdata = this.sortDepartment(contactData, 'department_id')
console.log("this.userdata", this.userdata)
console.log("this.userdata11", this.userdata)
//
if(!this.stateObj.is_chuzhang){
this.douserdata = this.userdata.filter(item=>item.department_id===this.stateObj.department_id)
console.log("this.douserdata11",this.douserdata)
}else{
this.douserdata = this.userdata
}
}).catch(error => {
console.log(error)
})
@ -1135,6 +1147,7 @@
return
}
if(!(this.form.audit_status==3||this.form.audit_status==5)){
console.log("this.betweenSe",this.form.start_date, this.form.end_date)
this.betweenSe(this.form.start_date, this.form.end_date)
}
if (this.type === 'add' || this.type=== 'pid') {
@ -1151,7 +1164,7 @@
table_name:"missions_logs",
mission_name:this.form.name,
mission_id:this.form.pid>0?this.form.pid:res.id,
op_name:this.type === 'add'?'新增任务':(this.type=== 'pid'?'新增子任务':'新增任务'),
op_name:this.type === 'add'?'新增任务':(this.type=== 'pid'?'任务分解':'新增任务'),
remark:''
}).then(res=>{
this.isShow = false
@ -1164,7 +1177,8 @@
// this.$emit("uploadOa")
})
return
}
}
if (this.type === 'editor' || this.type === 'send') {
save({
id: this.id,
@ -1178,7 +1192,7 @@
table_name:"missions_logs",
mission_id:this.id,
mission_name:this.form.name,
op_name:this.type === 'editor'?'编辑任务':(this.type=== 'send'?'派发任务':'编辑任务'),
op_name:this.type === 'editor'?'编辑任务':(this.type=== 'send'?'任务转办':'编辑任务'),
remark:''
}).then(res=>{
this.isShow = false
@ -1189,21 +1203,24 @@
}
},
betweenSe(start, end) {
var now = new Date()
var year = now.getFullYear()
var month = now.getMonth() + 1
var day = now.getDate()
var nowTime = new Date(year + '-' + month + '-' + day).getTime()
var startTime = new Date(start).getTime()
var endTime = new Date(end).getTime()
const startTime = new Date(start + "T00:00:00");
const endTime = new Date(end + "T23:59:59");
const nowTime = new Date();
nowTime.setHours(0, 0, 0, 0);
if(endTime<startTime){
Message({
type:'warning',
message: '任务完成时间不能小于开始时间'
})
return
}
if (nowTime < startTime) {
this.form.audit_status = 4
}
if (nowTime > endTime) {
this.form.audit_status = 1
}
if (nowTime >= new Date(start).getTime() && nowTime <= new Date(end).getTime()) {
if (nowTime >= startTime && nowTime <= endTime) {
this.form.audit_status = 1
}
},

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="'查看'" :form="form">
<xy-dialog ref="dialog" :is-show.sync="isShow" type="form" :title="'查看任务'" :form="form">
<div>
</div>
@ -173,183 +173,139 @@
</el-descriptions>
</div>
<div v-if="type=='show'">
<!-- <el-divider>执行情况</el-divider> -->
<el-tabs v-model="activeName">
<el-divider>执行情况</el-divider>
<!-- 所有人的执行情况 -->
<div v-if="url_type!=5">
<xy-table :list="showform.mission_distribute" stripe :table-item="distributeTable"
:isPage='false'>
<template v-slot:carry_type>
<el-table-column align='center'label="执行方式" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.carry_status>0">
<div v-if="scope.row.carry_type===0"></div>
<div v-else-if="scope.row.carry_type===1">任务分解</div>
<div v-else-if="scope.row.carry_type===2">任务转办</div>
<div v-else></div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:carry_status>
<el-table-column align='center'label="执行状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.carry_status===0"></div>
<div v-else-if="scope.row.carry_status===1">执行中</div>
<div v-else-if="scope.row.carry_status===2">已完成</div>
<div v-else></div>
</template>
</el-table-column>
</template>
<template v-slot:keep_status>
<el-table-column align='center'label="进展状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.keep_status===0"></div>
<div v-else-if="scope.row.keep_status===1">已提交</div>
<div v-else-if="scope.row.keep_status===2">已通过</div>
<div v-else-if="scope.row.keep_status===3">驳回</div>
<div v-else></div>
</template>
</el-table-column>
</template>
<template v-slot:file_ids>
<el-table-column align='left'label="成果资料" width="120">
<template slot-scope="scope">
<div v-for="item in scope.row.files">
<a :href="item.url" target="_blank">{{item.original_name}}</a>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center'label="操作" width="120" header-align="center">
<template slot-scope="scope">
<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>
</div>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<!-- 我的代办里的 -->
<div v-else>
<xy-table :list="my_mission_distribute" stripe :table-item="distributeTable"
:isPage='false'>
<template v-slot:carry_type>
<el-table-column align='center'label="执行方式" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.carry_status>0">
<div v-if="scope.row.carry_type===0"></div>
<div v-else-if="scope.row.carry_type===1">任务分解</div>
<div v-else-if="scope.row.carry_type===2">任务转办</div>
<div v-else></div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:carry_status>
<el-table-column align='center'label="执行状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.carry_status===0"></div>
<div v-else-if="scope.row.carry_status===1">执行中</div>
<div v-else-if="scope.row.carry_status===2">已完成</div>
<div v-else></div>
</template>
</el-table-column>
</template>
<template v-slot:keep_status>
<el-table-column align='center'label="进展状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.keep_status===0"></div>
<div v-else-if="scope.row.keep_status===1">已提交</div>
<div v-else-if="scope.row.keep_status===2">已通过</div>
<div v-else-if="scope.row.keep_status===3">驳回</div>
<div v-else></div>
</template>
</el-table-column>
</template>
<template v-slot:file_ids>
<el-table-column align='left'label="成果资料" width="120">
<template slot-scope="scope">
<div v-for="item in scope.row.files">
<a :href="item.url" target="_blank">{{item.original_name}}</a>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center'label="操作" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.carry_status===0">
<Button @click="startLoad(scope.row,'add')" type="primary" size="small"
>开始任务</Button>
</div>
<div v-else-if="scope.row.carry_status===1">
<Button v-if="scope.row.carry_type===0" @click="openMyMission" type="primary" size="small"
>任务执行</Button>
<Button v-if="scope.row.carry_type===1 && scope.row.admin_type==1" @click="editorUnit('pid')" type="primary" size="small"
>任务分解</Button>
<Button v-if="scope.row.carry_type===2 && scope.row.admin_type==1" @click="editorUnit('send')" type="primary" size="small"
>任务转办</Button>
<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 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>
</div>
</template>
</el-table-column>
<Button v-if="scope.row.keep_status===-1" @click="startLoad(scope.row,'editor')" type="primary" size="small"
>提交进展</Button>
<Button v-if="scope.row.keep_status===0 || scope.row.keep_status===3 " @click="startLoad(scope.row,'editor')" type="primary" size="small"
>编辑进展</Button>
</div>
<div v-else></div>
</template>
</xy-table>
<!-- <div v-if="myself_list.length>0">
<el-divider>我办理的任务</el-divider>
<div>
<el-collapse accordion v-model="myself_id" @change="changePidLog">
<el-collapse-item :title="item.name" :name="item.id" v-for="item in myself_list">
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="inspectionLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="askLogTable" :isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="studyLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="trainLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div>
<el-divider>任务执行</el-divider>
<div>
<el-collapse accordion v-model="now_id">
<el-collapse-item :title="showform.name" :name="showform.id">
<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-collapse-item>
</el-collapse>
</div>
</div>
<div v-if="pid_list.length>0">
<el-divider>任务分解</el-divider>
<div>
<el-collapse accordion v-model="pid_id" @change="changePidLog">
<el-collapse-item :title="item.name" :name="item.id" v-for="item in pid_list">
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="inspectionLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="askLogTable" :isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="studyLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="trainLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div v-if="send_list.length>0">
<el-divider>任务转办</el-divider>
<div>
<el-collapse accordion v-model="send_id" @change="changePidLog">
<el-collapse-item :title="`${item.name}`" :name="item.id" v-for="item in send_list">
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="inspectionLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="askLogTable" :isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="studyLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="uploadsLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
<xy-table :list="pidLog" v-if="is_what_unitType==''" stripe :table-item="trainLogTable"
:isPage='false'>
<template v-slot:btns></template>
</xy-table>
</el-collapse-item>
</el-collapse>
</div>
</div> -->
</el-table-column>
</template>
</xy-table>
</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>
</div>
@ -443,7 +399,7 @@
</template>
<!-- 资料收集 -->
<template v-slot:uploadslist v-if="type=='uploads'">
<el-divider>资料收集</el-divider>
<el-divider>{{is_what_unitType}}</el-divider>
<div>
<div>
<div class="xy-table-item">
@ -486,16 +442,21 @@
<Button v-if="type=='train'||type=='uploads'||type=='study'" type="primary"
style='margin-left:5px;margin-bottom:5px;' @click="submitFeedback()">提交</Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="openLogs"></Button>
<Button v-if="type=='train'||type=='uploads'||type=='study'" type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="type='show'"></Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
<Button v-else type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="closeDig"></Button>
</div>
</div>
</template>
</xy-dialog>
<addUnit ref="addUnit"></addUnit>
</xy-dialog>
<openLoad ref="openLoad" @refresh="carryTypeWhat" @reload="getDetail"></openLoad>
<addUnit ref="addUnit" @refresh="carryFinish"></addUnit>
<!-- <checkUnit ref="checkUnit"></checkUnit> -->
<showLogs ref="showLogs"></showLogs>
<answerQuestion ref='answerQuestion'></answerQuestion>
<addPatrol ref="addPatrol"></addPatrol>
<answerQuestion ref='answerQuestion'></answerQuestion>
<viewFile ref='viewFile' @studytime='studytime' :url='studyurl' :title='studytitle'></viewFile>
</div>
@ -511,6 +472,9 @@
updatemission
} from "@/api/task/unit.js";
import addUnit from '../components/addUnit.vue'
import openLoad from '../components/openLoad.vue'
import addPatrol from '../components/addPatrol.vue'
import answerQuestion from '../components/answerQuestion.vue'
// import checkUnit from '../components/checkUnit.vue'
import {
saveuploads,
@ -534,10 +498,9 @@
getToken
} from '@/utils/auth'
import state from "@/store/modules/user.js"
import answerQuestion from '../../list/components/answerQuestion.vue'
import viewFile from '@/components/viewFile/viewFile.vue'
import showLogs from '../components/showLogs.vue'
import { deepCopy } from '../../../../utils';
import {
contactGroup
} from '../js/index.js'
@ -547,11 +510,16 @@
viewFile,
addUnit,
showLogs,
openLoad,
addPatrol,
answerQuestion
// checkUnit
},
data() {
return {
isShow: false,
drawer:false,
myDrawer:false,
activeName:'second',
now_id:'',
pid_list:[],
@ -567,7 +535,8 @@
department_id: '',
pictureList: [],
stateObj: {},
url_type: 1,
url_type: 1,
isEditor:false, //
auditStatusList: [{
id: 1,
value: '通过'
@ -629,48 +598,142 @@
value: '已完成',
type: 'danger'
}],
doList:[{
name:'处长室',
date:'2024-07-11',
status:'已完成',
opr:'任务执行'
myPidDetails:[],
logList:[],
//
my_mission_distribute:[],
distributeTable:[{
label:'执行人',
prop:'accept_admin.name',
width:120
},{
label:'执行状态',
prop:'carry_status',
},{
name:'综合管理科',
date:'',
status:'未完成',
opr:''
label:'执行方式',
prop:'carry_type',
},{
name:'应急保障科',
date:'2024-07-11',
status:'已完成',
opr:'任务分解'
label:'开始时间',
prop:'start_date',
},{
name:'河道管理科',
date:'2024-07-11',
status:'已完成',
opr:'任务转办给管理员'
label:'预计结束时间',
prop:'end_date',
},{
label:'进展状态',
prop:'keep_status',
},{
label:'当前进展概述',
prop:'ing_introduce',
},{
label:'完成概述',
prop:'end_introduce',
},{
label:'成果资料',
prop:'file_ids',
}],
//
myTable:[{
label: "执行状态",
prop: 'status',
width: 160,
align: 'center',
customFn: (row) => {
return ( <el-tag type={row.status=='已完成'?'success':(row.status=='执行中'?'info':'')}>{row.status}</el-tag>)
}
},
{
label: "执行方式",
prop: 'opr',
width: 160,
align: 'center',
},
{
label: "提交时间",
prop: 'date',
width: 180,
align: 'center',
},
{
label: "任务工作进展描述",
prop: 'remark',
width: 160,
align: 'center',
},
{
label: "成果资料",
prop: 'uploads',
// width: 160,
align: 'left',
customFn: (row) => {
return ( <div> {
row.my_upload_detail && row.my_upload_detail.length > 0 ?
row.my_upload_detail.map(item => {
return ( <div> <a target = '_blank'
href = {
item.url
}> {
item.original_name
} </a></div > )
}) :
''
} </div>)
}
}],
doTable:[{
label: "参与对象",
label: "执行人",
prop: 'name',
width: 180,
align: 'left',
},{
label: "完成时间",
prop: 'date',
width: 180,
width: 160,
align: 'left',
},{
label: "完成状态",
},
{
label: "执行状态",
prop: 'status',
width: 180,
align: 'left',
},{
label: "执行方式",
prop: 'opr',
// width: 180,
align: 'left',
}],
width: 160,
align: 'center',
customFn: (row) => {
return ( <el-tag type={row.status=='已完成'?'success':(row.status=='执行中'?'':'info')}>{row.status}</el-tag>)
}
},
{
label: "执行方式",
prop: 'opr',
width: 160,
align: 'center',
},
{
label: "提交时间",
prop: 'date',
width: 180,
align: 'center',
},
{
label: "任务工作进展描述",
prop: 'remark',
width: 160,
align: 'center',
},
{
label: "成果资料",
prop: 'uploads',
// width: 160,
align: 'left',
customFn: (row) => {
return ( <div> {
row.my_upload_detail && row.my_upload_detail.length > 0 ?
row.my_upload_detail.map(item => {
return ( <div> <a target = '_blank'
href = {
item.url
}> {
item.original_name
} </a></div > )
}) :
''
} </div>)
}
}
],
pidTable:[
{
label: "任务名称",
@ -725,7 +788,8 @@
formatter: (cell, data, value, index) => {
return value ? value.substring(0, 16) : ''
}
},{
},
{
label: "提交科室",
prop: 'department.name',
align: 'center',
@ -833,17 +897,18 @@
formatter: (cell, data, value, index) => {
return value ? value.substring(0, 16) : ''
}
}, {
label: "提交科室",
prop: 'department.name',
align: 'center',
width: 120
},{
label: "提交人",
prop: 'admin.name',
align: 'center',
width: 120
},
},
// {
// label: "",
// prop: 'department.name',
// align: 'center',
// width: 120
// },{
// label: "",
// prop: 'admin.name',
// align: 'center',
// width: 120
// },
{
label: "备注",
prop: 'uploads_remark',
@ -1103,6 +1168,39 @@
this.getUnitTypeList()
},
methods: {
startLoad(row,type){
console.log("row",row)
this.$refs.openLoad.pid = this.showform.pid
this.$refs.openLoad.type = type
this.$refs.openLoad.setForm(row,this.showform.start_date,this.showform.end_date)
this.$refs.openLoad.isShow = true
},
//
carryTypeWhat(e){
console.log("carryTypeWhat",e)
if(e=='carry_type0'){
//
this.openMyMission()
}else if(e=='carry_type1'){
//
this.editorUnit('pid')
}else if(e=='carry_type2'){
//
this.editorUnit('send')
}
},
//
carryFinish(){
this.isEditor = true
},
closeDig(){
if(this.isEditor){
this.$emit('refresh')
}
this.isShow = false
},
checkUnits(id, type) {
console.log("123")
this.id = id
@ -1118,40 +1216,9 @@
this.$refs.showLogs.id = this.showform.id
this.$refs.showLogs.isShow = true
},
changePidLog(e){
console.log("pide",e)
let arr = []
switch (this.is_what_unitType) {
case '检查':
arr = this.inspection_log.filter(item=>item.mission_id==e)
this.pidLog = arr
break;
case '学习':
arr = this.study_log.filter(item=>item.mission_id==e)
this.pidLog = arr
break;
case '答题':
arr = this.ask_log.filter(item=>item.mission_id==e)
this.pidLog = arr
break;
case '培训':
arr = this.train_log.filter(item=>item.mission_id==e)
this.pidLog = arr
break;
case '资料收集':
case '方案':
arr = this.uploads_log.filter(item=>item.mission_id==e)
this.pidLog = arr
break;
// case '':
// this.openCases(e)
// break;
}
},
//
openMyMission(remark, e) {
switch (remark) {
switch (this.is_what_unitType) {
case '检查':
this.addPatrol(e)
break;
@ -1166,24 +1233,22 @@
break;
case '资料收集':
case '方案':
case '会议':
this.type = 'uploads'
break;
// case '':
// this.openCases(e)
// break;
}
},
addPatrol(scope) {
this.$refs['addPatrol'].login_id = this.stateObj.login_id
this.$refs['addPatrol'].department_id = this.stateObj.department_id
this.$refs['addPatrol'].mission_id = scope.id
this.$refs['addPatrol'].isShow = true
this.$refs['addPatrol'].type = 'add'
console.log("login_id",this.stateObj)
this.$refs.addPatrol.login_id = this.stateObj.login_id
this.$refs.addPatrol.department_id = this.stateObj.department_id
this.$refs.addPatrol.mission_id = this.id
this.$refs.addPatrol.isShow = true
this.$refs.addPatrol.type = 'add'
},
openAnswers(scope) {
this.$refs['answerQuestion'].mission_id = scope.id
this.$refs['answerQuestion'].askList = scope.ask
this.$refs['answerQuestion'].mission_id = this.id
this.$refs['answerQuestion'].askList = this.showform.ask
this.$refs['answerQuestion'].isShow = true
},
changeRate(e) {
@ -1225,23 +1290,38 @@
accept_department_ids: res?.accept_department_ids,
mission_groups: res?.groups,
}
this.mission_groups_list = []
let group_details = []
if (res.groups.length > 0) {
for (var g of res.groups) {
this.mission_groups_list.push({
name: g.name,
type: g.type,
link_id: g.link_id
})
}
this.showform.group_details = contactGroup(res.groups)
}
console.log(this.showform.group_details, this.mission_groups_list)
// this.mission_groups_list = res?.mission_groups
}
//
this.mission_groups_list = []
let group_details = []
if (res.groups.length > 0) {
for (var g of res.groups) {
this.mission_groups_list.push({
name: g.name,
type: g.type,
link_id: g.link_id
})
}
this.showform.group_details = contactGroup(res.groups)
}
let allma=[]
let md = []
res.mission_distribute.map(item=>{
if(item.accept_admin_id===this.stateObj.login_id){
if(res.pid>0){
if(item.admin_type==3){
md.push(item)
}
}else{
md.push(item)
}
}
})
this.my_mission_distribute = md
console.log(this.my_mission_distribute)
for (var f of res.files) {
this.pictureList.push({
id: f.id,
@ -1251,29 +1331,6 @@
}
this.showform = res
this.is_what_unitType = res.unit_type_detail ? res.unit_type_detail.value : ''
if(res.mission_finished && res.mission_finished.length>0){
res.mission_finished.map(f=>{
if(f.admin_id===this.stateObj.login_id){
this.myself_list.push(item)
}
})
}
if(res.pid_details && res.pid_details.length>0){
this.pid_list=res.pid_details
res.pid_details.map(item=>{
if(item.do_admin_ids && item.do_admin_ids.length>0){
this.send_list.push(item)
}
if(item.mission_finished && item.mission_finished.length>0){
item.mission_finished.map(f=>{
if(f.admin_id===this.stateObj.login_id){
this.myself_list.push(item)
}
})
}
})
}
if (this.type == 'show') {
switch (this.is_what_unitType) {
@ -1290,7 +1347,8 @@
this.getTrain()
break;
case '资料收集':
case '方案':
case '方案':
case '会议':
this.getUploads()
break;
}
@ -1320,20 +1378,14 @@
this.$refs.answerQuestion.range = range
this.$refs.answerQuestion.isShow = true
},
async getInspection() {
let ids = ''
if(this.showform.pid_details&&this.showform.pid_details.length>0){
this.showform.pid_details.map((item)=>{
ids = ids+','+item.id
})
}
console.log("ids",ids)
async getInspection() {
const res = await listpatrol({
mission_id: ids+','+this.id,
mission_id: this.id,
page: 1,
page_size: 999
})
})
this.inspection_log = res.data
// for (var k of res.data) {
// var _names = []
// //
@ -1389,22 +1441,21 @@
})
this.train_log = res.data
},
async getUploads() {
let ids = ''
if(this.showform.pid_details&&this.showform.pid_details.length>0){
this.showform.pid_details.map((item)=>{
ids = ids+','+item.id
})
}
console.log("ids",ids)
async getUploads() {
let ids = ''
if(this.showform.pid_details&&this.showform.pid_details.length>0){
this.showform.pid_details.map((item)=>{
ids = ids+','+item.id
})
}
const res = await listuploads({
mission_id: ids+','+this.id,
mission_id:ids+','+this.id,
page: 1,
page_size: 999,
sort_name: 'created_at',
sort_type: 'DESC'
})
})
this.uploads_log = res.data
},
async getStudy() {
@ -1430,16 +1481,16 @@
this.$refs.viewFile.studytype = 'study'
this.$refs.viewFile.needStudyTime = this.showform.study_time
this.$refs.viewFile.diaShow = true
},
editorUnit(id, type, formtype) {
console.log(id,type)
if (id) {
this.$refs.addUnit.id = id
}
this.$refs.addUnit.type = type
this.$refs.addUnit.department_id = this.stateObj.department_id
this.$refs.addUnit.isShow = true
},
},
editorUnit(type) {
this.$refs.addUnit.id = this.id
this.$refs.addUnit.type = type
this.$refs.addUnit.unitTypeList = this.unitTypeList
this.$refs.addUnit.department_id = this.stateObj.department_id
this.$refs.addUnit.isShow = true
},
studytime(e) {
console.log("e", e)
if (!this.studyForm.my_study_time) {
@ -1638,6 +1689,9 @@
this.pid_list = []
this.send_list = []
this.myself_list = []
this.showform={}
this.isEditor = false
this.my_mission_distribute = []
this.pid_id = ''
this.send_id = ''
this.now_id=''

@ -0,0 +1,346 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" :width='50' :type="'form'"
:title="type === 'add' ? '开始任务' :(type=='check'?'审核':'提交进展')" :form="form" :rules='rules' @submit="submit">
<template v-slot:carry_type>
<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-if="formObj.from==1" :disabled="isdisabled || isEditor" v-model="formObj.carry_type"
style="width: 400px;" placeholder="请选择">
<el-option v-for="item in carryPidList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-select v-else :disabled="isdisabled || isEditor" v-model="formObj.carry_type" style="width: 400px;"
placeholder="请选择">
<el-option v-for="item in carryList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:start_date>
<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-date-picker :disabled="isdisabled" style="width: 400px;" v-model="formObj.start_date"
value-format="yyyy-MM-dd" type="date" placeholder="选择">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:end_date>
<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-date-picker :disabled="isdisabled" style="width: 400px;" v-model="formObj.end_date"
value-format="yyyy-MM-dd" type="date" placeholder="选择">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:ing_introduce>
<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-input :disabled="isdisabled" v-model="formObj.ing_introduce" type="textarea" :rows="8"
placeholder="请输入当前进展概述" clearable style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:file_ids 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-upload :disabled="isdisabled" :action="action" multiple class='upload-demo' :file-list="fileList"
ref="pictureUpload" style="width:400px" :auto-upload="true" :data="uploadOther"
:on-success="handlesuccess" :on-remove="handleRemove">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</div>
</template>
<template v-slot:end_introduce 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-input :disabled="isdisabled" v-model="formObj.end_introduce" type="textarea" :rows="8"
placeholder="请输入完成概述" clearable style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:check_status v-if="type=='check'">
<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="check_status" style="width: 400px;" placeholder="请选择">
<el-option v-for="item in checkStatusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:footerContent>
<Button v-if="type=='add'" type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit"></Button>
<Button v-if="type=='check'" type="primary" style='margin-left:5px;margin-bottom:5px;'
@click="submit">审核</Button>
<Button v-if="type=='editor'" type="primary" style='margin-left:5px;margin-bottom:5px;'
@click="submit(0)">保存</Button>
<Button v-if="type=='editor'" type="primary" style='margin-left:5px;margin-bottom:5px;'
@click="submit(1)">提交</Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
Message
} from 'element-ui'
import {
save
} from '@/api/task/newplan.js'
import {
getToken
} from '@/utils/auth'
import {
deepCopy
} from "@/utils/index.js"
export default {
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
pid: 0,
isdisabled: false,
isEditor: false,
check_status: 2,
checkStatusList: [{
id: 2,
value: '通过'
}, {
id: 3,
value: '驳回'
}],
carryList: [{
id: 0,
value: '本人执行'
}, {
id: 1,
value: '任务分解'
}, {
id: 2,
value: '任务转办'
}],
carryPidList: [{
id: 0,
value: '本人执行'
}],
uploadOther: {
token: ""
},
action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
fileList: [],
formObj: {},
unitStartDate: '',
unitEndDate: '',
form: {
carry_type: 0,
start_date: '',
end_date: '',
ing_introduce: '',
file_ids: [],
end_introduce: '',
check_status: ''
},
rules: {
// carry_type: [{
// required: true,
// message: ''
// }],
// start_date: [{
// required: true,
// message: ''
// }],
// end_date: [{
// required: true,
// message: ''
// }],
}
}
},
created() {
this.uploadOther.token = getToken();
},
methods: {
setDate(e1, e2) {
},
setForm(e,e1,e2) {
if (e) {
this.formObj = deepCopy(e)
this.unitStartDate = e1
this.unitEndDate = e2
this.formObj.start_date = e1
this.formObj.end_date = e2
let arr = []
e.files.map(item => {
arr.push({
id: item.id,
url: item.url,
name: item.original_name
})
})
this.fileList = arr
}
},
handleRemove(file, fileList) {
this.fileList = fileList
},
handlesuccess(response, file, fileList) {
this.fileList = fileList
},
//
isLessThanOrEqualToToday(startDate,unitStartDate) {
const start = this.$moment(startDate,'YYYY-MM-DD');
const unitStart = this.$moment(unitStartDate, 'YYYY-MM-DD');
return start.isBefore(unitStart, 'day'); //
},
isMoreThanOrEqualToToday(endDate,unitEndDate) {
const end = this.$moment(endDate,'YYYY-MM-DD');
const unitEnd = this.$moment(unitEndDate, 'YYYY-MM-DD');
return end.isAfter(unitEnd, 'day'); //
},
submit(keep_status) {
if(!this.formObj.start_date || this.isLessThanOrEqualToToday(this.formObj.start_date,this.unitStartDate)){
this.$Message.warning('开始时间不能为空或早于任务开始时间')
return
}
if(!this.formObj.end_date || this.isMoreThanOrEqualToToday(this.formObj.end_date,this.unitEndDate)){
this.$Message.warning('预计完成时间不能为空或晚于任务完成时间')
return
}
if (this.type == 'add') {
this.formObj.carry_status = 1
this.formObj.keep_status = 0
}
if (this.type == 'editor') {
this.formObj.keep_status = keep_status ? keep_status : 0
}
if (this.type == 'check') {
this.formObj.keep_status = this.check_status
this.formObj.carry_status = this.check_status == 2 ? 2 : 1
}
let _files = []
if (this.fileList.length > 0) {
for (var h of this.fileList) {
if (h.response) {
_files.push(h.response.id)
} else {
_files.push(h.id)
}
}
this.formObj.file_ids = _files
} else {
this.formObj.file_ids = []
}
save({
table_name: 'mission_distributes',
...this.formObj
}).then(res => {
Message({
type: 'success',
message: '提交成功'
})
if (this.type == 'add') {
if (this.formObj.carry_type == 0) {
this.$emit('refresh', 'carry_type0')
} else if (this.formObj.carry_type == 1) {
this.$emit('refresh', 'carry_type1')
} else if (this.formObj.carry_type == 2) {
this.$emit('refresh', 'carry_type2')
}
}
this.$emit('reload')
this.isShow = false
})
},
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
this.isEditor = true
}
if (this.type === 'add') {
}
if (this.type === 'check') {
this.isdisabled = true
}
} else {
this.id = ''
this.formObj = {}
this.unitStartDate = ''
this.unitEndDate = ''
this.isdisabled = false
this.isEditor = false
this.check_status = 2
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .carry_type,
::v-deep .start_date,
::v-deep .end_date,
::v-deep .ing_introduce,
::v-deep .end_introduce,
::v-deep .file_ids {
flex-basis: 100%;
}
::v-deep .el-form>div {
align-items: flex-start !important;
}
.xy-table-item {
padding-right: 0
}
::v-deep .xy-table-item-label {
padding-right: 0
}
</style>

@ -0,0 +1,158 @@
<template>
<div>
<xy-dialog ref="dialog" :is-show.sync="isShow" :width='50' :type="'form'" :title="'督办提醒'"
:form="form" :rules='rules' @submit="submit">
<template v-slot:title>
<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-input v-model="form.title" type="text"placeholder="请输入提醒内容" clearable
style="width: 400px;"></el-input>
</div>
</div>
</template>
<template v-slot:users>
<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-checkbox-group v-model="checkList">
<el-checkbox v-for="item in checkArr" :label="item.accept_admin_id">{{item.accept_admin.name}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
</template>
<template v-slot:footerContent>
<Button type="primary" style='margin-left:5px;margin-bottom:5px;'
@click="submit">发送</Button>
<Button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></Button>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
Message
} from 'element-ui'
import {
saveNotice
} from '@/api/task/unit.js'
import {deepCopy} from "@/utils/index.js"
export default {
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
checkList:[],
checkArr:[],
formObj: {},
form: {
title:'',
users:[]
},
rules: {
// carry_type: [{
// required: true,
// message: ''
// }],
// start_date: [{
// required: true,
// message: ''
// }],
// end_date: [{
// required: true,
// message: ''
// }],
}
}
},
created() {
},
methods: {
setForm(e) {
if (e) {
let arr = []
let Arr = []
this.form.mission_id = e.id
e.mission_distribute.map(item=>{
if(item.admin_type>1){
arr.push(item.accept_admin_id)
Arr.push(item)
}
})
this.checkList = arr
this.checkArr = Arr
}
},
submit() {
if(!this.form.title){
this.$Message.warning("请输入提醒内容")
return
}
if(this.checkList.length>0){
this.checkList.map(item=>{
this.form.users.push({
user_id:item
})
})
}else{
this.$Message.warning("请选择接收人")
return
}
saveNotice(this.form).then(res => {
Message({
type: 'success',
message: '提交成功'
})
this.$emit('refresh')
this.isShow = false
})
},
},
watch: {
isShow(newVal) {
if (newVal) {
} else {
this.id = ''
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .title,
::v-deep .users {
flex-basis: 100%;
}
::v-deep .el-form>div {
align-items: flex-start !important;
}
.xy-table-item {
padding-right: 0
}
::v-deep .xy-table-item-label {
padding-right: 0
}
</style>

@ -5,8 +5,12 @@
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<DatePicker v-model="select.year" style='width:200px;margin-right: 10px;' placeholder="年份"
placement="bottom" format='yyyy' type="year" @on-change="changeYear"></DatePicker>
<Select filterable clearable style='width:200px;margin-right: 10px;' v-model="select.audit_status"
placement="bottom" format='yyyy' type="year" @on-change="changeYear"></DatePicker>
<Select filterable clearable multiple @on-change="changeMonth" style='width:200px;margin-right: 10px;' v-model="selectMonth"
placeholder="月份">
<Option v-for="item in allMonths" :value="item">{{item}}</Option>
</Select>
<Select :max-tag-count="2" filterable clearable style='width:200px;margin-right: 10px;' v-model="select.audit_status"
placeholder="计划状态">
<Option v-for="item in auditStatusList" :value="item.id">{{item.value}}</Option>
</Select>
@ -17,13 +21,13 @@
</lx-header>
</div>
<div class="tablewrap">
<div class="tablemonth">
<!-- <div class="tablemonth">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"></el-checkbox>
<div style="margin: 15px 0;"></div>
<el-checkbox-group v-model="selectMonth" @change="changeMonth">
<el-checkbox v-for="item in allMonths" :label="item"></el-checkbox>
</el-checkbox-group>
</div>
</div> -->
<div class="tablecontent">
<xy-table :list="list" :total="total" row-key="rowindex" stripe @cell-dblclick="cellClicks"
@ -172,11 +176,12 @@
this.getList()
},
changeMonth(e) {
let checkedCount = e.length;
this.checkAll = checkedCount === this.allMonths.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allMonths.length;
// let checkedCount = e.length;
// this.checkAll = checkedCount === this.allMonths.length;
// this.isIndeterminate = checkedCount > 0 && checkedCount < this.allMonths.length;
console.log("e",e)
this.select.month = this.selectMonth.join(',')
this.getList()
// this.getList()
},
changeYear(e) {
console.log(e)
@ -238,7 +243,7 @@
}
.tablecontent {
width: 89%
width: 100%
}
/deep/ .v-table .el-table__body .monthName {

@ -26,12 +26,12 @@
<el-option v-for="item in selectAuditStatusList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-date-picker v-if="showSelectMonth" @change="changeDate" v-model="select.dateRange" type="daterange"
<!-- <el-date-picker v-if="showSelectMonth" @change="changeDate" v-model="select.dateRange" type="daterange"
:picker-options="pickerOptions" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" align="right">
</el-date-picker>
<el-select class='height32' v-if="showSelectMonth" style="width: 150px;margin-right: 10px;" filterable clearable
v-model="select.main_department_id" placeholder="责任科室">
</el-date-picker> -->
<el-select class='height32' style="width: 150px;margin-right: 10px;" filterable clearable
v-model="select.main_department_id" placeholder="责任人(科室)">
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -52,10 +52,10 @@
<div class="tablecontent" :style="{'width':showSelectMonth?'89%':'100%'}">
<div class="topwrap">
<div>
共有<span style="font-size: 24px;color:red;margin:0 5px">{{list.length}}</span>项任务分解后共
<span style="font-size: 24px;color:red;margin:0 5px">{{chlidrenLength}}</span>子任务
<span v-if="path_type==5" style="font-size: 24px;color:red;margin:0 5px">{{list.length}}</span>
<span v-else style="font-size: 24px;color:red;margin:0 5px">{{auditStatus1}}</span>未完成
共有<span style="font-size: 24px;color:red;margin:0 5px">{{list.length}}</span>项任务
待执行<span style="font-size: 24px;color:red;margin:0 5px">{{auditStatus4}}</span>
执行中<span style="font-size: 24px;color:red;margin:0 5px">{{auditStatus1}}</span>
完成<span style="font-size: 24px;color:red;margin:0 5px">{{auditStatus5}}</span>
</div>
</div>
<xy-table :showIndex="false" :list="list" :defaultExpandAll="false"
@ -66,193 +66,36 @@
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="100" header-align="center">
<template slot-scope="scope">
<template v-if="path_type!=5">
<div v-if="!(scope.row.audit_status==3||scope.row.audit_status==5) && (scope.row.admin_id==stateObj.login_id || stateObj.is_chuzhang || stateObj.is_guiji)">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'editor')">编辑任务</Button>
</div>
<template v-if="path_type!=5">
<div>
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small"
@click="checkUnits(scope.row.id,'show')">查看任务</Button>
</div>
<!-- <div>
<Button v-if="scope.row.audit_admin_id==stateObj.login_id&&scope.row.audit_status==0" style="margin-right:5px;margin-bottom:5px;" type="primary" size="small" @click="checkUnits(scope.row.id,'check')"></Button>
</div> -->
<div v-if="scope.row.audit_status==3 && (scope.row.admin_id==stateObj.login_id || stateObj.is_chuzhang || stateObj.is_guiji)">
<!-- v-if="scope.row.audit_status==3" -->
<div v-if="!(scope.row.audit_status==3||scope.row.audit_status==5) && (scope.row.admin_id==stateObj.login_id )">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'editor')">编辑任务</Button>
</div>
<!-- <div v-if="scope.row.admin_id==stateObj.login_id || stateObj.is_chuzhang || stateObj.is_guiji)">
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small"
@click="editorUnit(scope.row.id,'editor')">编辑任务</Button>
<Button style='margin-right:5px;margin-bottom:5px;' size="small"
@click="backPlan(scope.row)">归档</Button>
</div>
</div> -->
</template>
<!-- 我的任务 -->
<template v-else>
<!-- 任务是发给部门的只有指定部门科长能看见需要再次分发人员 -->
<!-- 转办就给 责任人 -->
<!-- 任务发给部门的科长责任人都能进行任务分解任务转办执行任务的操作 -->
<div
v-if="(scope.row.accept_department_ids && scope.row.accept_department_ids.length>0 && stateObj.is_manger
) || scope.row.main_admin_id==stateObj.login_id
">
<el-tooltip placement="left" effect="light" v-if="!(scope.row.audit_status==3||scope.row.audit_status==5)">
<div slot="content">
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求完成任务">
<template v-for="item in unitTypeList">
<Button style="margin-bottom:5px;margin-right:5px" slot="reference" v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</template>
</el-popover>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求分解给到其他科室或人员">
<div style="margin-bottom:5px;margin-right:5px" slot="reference" >
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
</div>
</el-popover>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求转办给其他人员">
<div style="margin-bottom:5px;margin-right:5px" slot="reference" >
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'send')">任务转办</Button>
</div>
</el-popover>
</div>
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
执行任务
</Button>
</el-tooltip>
</div>
<!-- 小组的带头人 -->
<div v-else-if="(scope.row.groups && scope.row.groups.length>0 )
|| scope.row.main_admin_id==stateObj.login_id">
<!-- 组长权限 -->
<el-tooltip placement="left" effect="light" v-if="scope.row.grounp_admin_detail.includes(stateObj.login_id) && !(scope.row.audit_status==3||scope.row.audit_status==5)">
<div slot="content">
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求完成任务">
<template v-for="item in unitTypeList">
<Button style="margin-bottom:5px;margin-right:5px" slot="reference" v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</template>
</el-popover>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求分解给到其他科室或人员">
<div style="margin-bottom:5px;margin-right:5px" slot="reference" >
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
</div>
</el-popover>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求转办给其他人员">
<div style="margin-bottom:5px;margin-right:5px" slot="reference" >
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'send')">任务转办</Button>
</div>
</el-popover>
</div>
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
执行任务
</Button>
</el-tooltip>
<!-- 除组长外 组里面所有人都能执行任务 -->
<div v-else>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求完成任务">
<template v-for="item in unitTypeList">
<Button style="margin-bottom:5px;margin-right:5px" slot="reference" v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</template>
</el-popover>
</div>
</div>
<!-- doadmins 转办的人员 任务分解执行任务 -->
<div v-else-if="scope.row.do_admin_ids && scope.row.do_admin_ids.length>0">
<el-tooltip placement="left" effect="light" v-if="scope.row.do_admin_ids.includes(stateObj.login_id) && !(scope.row.audit_status==3||scope.row.audit_status==5)">
<div slot="content">
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求完成任务">
<template v-for="item in unitTypeList">
<Button style="margin-bottom:5px;margin-right:5px" slot="reference" v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</template>
</el-popover>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求分解给到其他科室或人员">
<div style="margin-bottom:5px;margin-right:5px" slot="reference" >
<Button type="primary" size="small"
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
</div>
</el-popover>
</div>
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
执行任务
</Button>
</el-tooltip>
</div>
<!-- 直接 执行任务 -->
<div v-else>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
content="您可以按照任务要求完成任务">
<template v-for="item in unitTypeList">
<Button style="margin-bottom:5px;margin-right:5px" slot="reference" v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
@click="openMyMission(item.value,scope.row)">执行任务</Button>
</template>
</el-popover>
<div v-if="scope.row.notices.length==0 && !(scope.row.audit_status==3||scope.row.audit_status==5)">
<Button style='margin-right:5px;margin-bottom:5px;' type="primary" size="small"
@click="sendNotice(scope.row)">督办提醒</Button>
</div>
<div>
<Button style='margin-right:5px;margin-bottom:5px;' type="primary" size="small"
@click="checkUnits(scope.row.id,'show')">查看任务</Button>
</div>
</template>
</template>
@ -269,7 +112,8 @@
<showPatrol ref='showPatrol'></showPatrol>
<addPatrol ref='addPatrol' @refresh='getList'></addPatrol>
<checkUnit ref='checkUnit' @refresh='getList'></checkUnit>
<answerQuestion @refresh='getList' ref='answerQuestion'></answerQuestion>
<answerQuestion @refresh='getList' ref='answerQuestion'></answerQuestion>
<sendNotice ref="sendNotice" @refresh='getList'></sendNotice>
</div>
</template>
@ -279,7 +123,8 @@
import showPatrol from '../list/components/showPatrol.vue'
import addPatrol from '../list/components/addPatrol.vue'
import checkUnit from '../list/components/checkUnit.vue'
import answerQuestion from '../list/components/answerQuestion.vue'
import answerQuestion from '../list/components/answerQuestion.vue'
import sendNotice from '../list/components/sendNotice.vue'
import {
listunit,
del,
@ -306,7 +151,8 @@
showPatrol,
addPatrol,
checkUnit,
answerQuestion
answerQuestion,
sendNotice
},
data() {
return {
@ -340,8 +186,8 @@
dueDate: [],
start_date: '',
end_date: '',
sort_name: 'start_date',
sort_type: 'DESC',
// sort_name: 'start_date',
// sort_type: 'ASC',
year: new Date().getFullYear(),
month: '',
pid:'',
@ -416,7 +262,9 @@
myListFinish:[],
sectionList: [],
currentTableList: [],
auditStatus1: 0,
auditStatus1: 0, //
auditStatus4: 0, //
auditStatus5: 0, //
isIndeterminate: true,
checkAll: false,
showSelectMonth:false,
@ -458,7 +306,6 @@
id: "12",
value: '十二月'
}],
chlidrenLength:0,//
table: [
{
label: "",
@ -467,62 +314,63 @@
width:80
},
{
label: "任务名称",
prop: 'name',
width: 200,
// fixed:'left',
align: 'left',
}, {
label: "任务内容及要求",
prop: 'content',
minWidth: 200,
align: 'left',
}, {
label: "任务类型",
prop: 'unit_type_detail.value',
width: 120,
align: 'center'
},
{
label: "开始日期",
prop: 'start_date',
width: 120,
align: 'center'
}, {
label: "要求完成日期",
prop: 'end_date',
width: 120,
align: 'center'
}, {
label: "状态",
prop: 'audit_status',
width: 120,
align: 'center',
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>
// :
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return ( <el-tag type = {
item.type
}> {
item.value
} </el-tag>)
}
})
} </div>)
}
}, {
label: "责任人(科室)",
prop: 'main_admin.name',
width: 120,
align: 'center',
}],
label: "任务名称",
prop: 'name',
width: 200,
// fixed:'left',
align: 'left',
}, {
label: "任务内容及要求",
prop: 'content',
minWidth: 200,
align: 'left',
}, {
label: "任务类型",
prop: 'unit_type_detail.value',
width: 120,
align: 'center'
},
// {
// label: "",
// prop: 'start_date',
// width: 120,
// align: 'center'
// },
{
label: "要求完成日期",
prop: 'end_date',
width: 120,
align: 'center'
}, {
label: "状态",
prop: 'audit_status',
width: 120,
align: 'center',
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>
// :
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return ( <el-tag type = {
item.type
}> {
item.value
} </el-tag>)
}
})
} </div>)
}
},
}, {
label: "责任人(科室)",
prop: 'main_admin.name',
width: 120,
align: 'center',
}],
}
},
computed: {
},
created() {
@ -579,7 +427,7 @@
}
if (path[1] == 1) {
this.showSelectMonth = false
this.select.type = 1
this.select.type = ''
// this.select.pid = ''
// this.treeProps = {children: 'nochildren', hasChildren: 'hasChildren' }
this.type_name = '任务跟踪'
@ -618,6 +466,10 @@
},
async getLeads() {
// await this.$store.dispatch("user/getLeads")
},
sendNotice(row){
this.$refs.sendNotice.setForm(row)
this.$refs.sendNotice.isShow = true
},
backPlan(row) {
this.$refs.addBackPlan.upload_link = row.files
@ -646,7 +498,8 @@
this.openTrain(e)
break;
case '资料收集':
case '方案':
case '方案':
case '会议':
this.openUploads(e)
break;
// case '':
@ -773,7 +626,7 @@
if(this.path_type == 5){
const newArr = res.data.filter((_, index) => !spliceIndex.includes(index));
newArr.map(item=>{
if(item.audit_status==5 || (item.mission_finished && item.mission_finished.length>0)){
if(item.audit_status==5){
console.log("item.mission_finished",item.id,item.mission_finished)
my_arr.push(item)
}else{
@ -793,19 +646,18 @@
})
this.list = _arr
this.myListFinish = my_arr
let chlidrenLength = 0
let auditStatus1 = 0
this.list.map(item=>{
if(item.mychildren&&item.mychildren.length>0){
chlidrenLength+=item.mychildren.length
}
if(item.audit_status===1){
auditStatus1++
}
})
this.auditStatus1 = auditStatus1
this.chlidrenLength = chlidrenLength
console.log("spliceIndex",this.list,chlidrenLength)
let auditStatus1 = this.list.filter(item=>item.audit_status===1)
let auditStatus4 = this.list.filter(item=>item.audit_status===4)
let auditStatus5 = this.list.filter(item=>item.audit_status===5)
// this.list.map(item=>{
// if(item.audit_status===1){
// auditStatus1++
// }
// })
this.auditStatus1 = auditStatus1.length
this.auditStatus4 = auditStatus4.length
this.auditStatus5 = auditStatus5.length
console.log("spliceIndex",this.list)
this.total = res.total

Loading…
Cancel
Save