|
|
|
|
@ -47,7 +47,8 @@
|
|
|
|
|
<el-badge :value="myselfTotal" class="item"></el-badge>
|
|
|
|
|
</span>
|
|
|
|
|
<div style="height:350px">
|
|
|
|
|
<xy-table :list="myselfList" stripe :isPage="false" :height="'350px'" :table-item="myselfTable">
|
|
|
|
|
<xy-table :list="myselfList" :defaultExpandAll="false" :showIndex="false"
|
|
|
|
|
:treeProps="treeProps" stripe :isPage="false" :height="'350px'" :table-item="myselfTable">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column align='center' label="操作" width="100" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
@ -56,9 +57,107 @@
|
|
|
|
|
style="margin-right:5px;margin-bottom:5px;"
|
|
|
|
|
@click="openMyMission(item.value,scope.row)">{{item.remark}}</Button>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div>
|
|
|
|
|
<!-- <div>
|
|
|
|
|
<Button style='margin-right:5px;margin-bottom:5px;' type="primary" size="small"
|
|
|
|
|
@click="checkUnits(scope.row.id,'show',5)">查看任务</Button>
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
<!-- 任务是发给部门的,只有指定部门科长能看见,需要再次分发人员 -->
|
|
|
|
|
<!-- 任务发给部门的科长,责任人,都能进行任务分解,任务转办,执行任务的操作 -->
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
">
|
|
|
|
|
<Dropdown trigger="click" v-if="!(scope.row.audit_status==3||scope.row.audit_status==5)">
|
|
|
|
|
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
|
|
|
|
|
执行任务
|
|
|
|
|
<!-- <Icon type="ios-arrow-down"></Icon> -->
|
|
|
|
|
</Button>
|
|
|
|
|
<template #list>
|
|
|
|
|
<DropdownMenu>
|
|
|
|
|
<DropdownItem>
|
|
|
|
|
<Button type="primary" size="small"
|
|
|
|
|
@click="editorUnit(scope.row.id,'send')">任务转办</Button>
|
|
|
|
|
</DropdownItem>
|
|
|
|
|
<DropdownItem>
|
|
|
|
|
<Button type="primary" size="small"
|
|
|
|
|
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
|
|
|
|
|
</DropdownItem>
|
|
|
|
|
<DropdownItem>
|
|
|
|
|
<div v-for="item in unitTypeList">
|
|
|
|
|
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
|
|
|
|
|
|
|
|
|
|
@click="openMyMission(item.value,scope.row)">任务执行</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</DropdownItem>
|
|
|
|
|
</DropdownMenu>
|
|
|
|
|
</template>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 小组的带头人 和小组组长 -->
|
|
|
|
|
<div v-else-if="(scope.row.groups && scope.row.groups.length>0 )
|
|
|
|
|
|| scope.row.main_admin_id==stateObj.login_id">
|
|
|
|
|
<!-- 组长权限 -->
|
|
|
|
|
<Dropdown trigger="click" v-if="scope.row.grounp_admin_detail.includes(stateObj.login_id) && !(scope.row.audit_status==3||scope.row.audit_status==5)">
|
|
|
|
|
<Button style="margin-right:5px;margin-bottom:5px;" type="primary" size="small">
|
|
|
|
|
执行任务
|
|
|
|
|
<!-- <Icon type="ios-arrow-down"></Icon> -->
|
|
|
|
|
</Button>
|
|
|
|
|
<template #list>
|
|
|
|
|
<DropdownMenu>
|
|
|
|
|
<DropdownItem>
|
|
|
|
|
<Button type="primary" size="small"
|
|
|
|
|
@click="editorUnit(scope.row.id,'send')">任务转办</Button>
|
|
|
|
|
</DropdownItem>
|
|
|
|
|
<DropdownItem>
|
|
|
|
|
<Button type="primary" size="small"
|
|
|
|
|
@click="editorUnit(scope.row.id,'pid')">任务分解</Button>
|
|
|
|
|
</DropdownItem>
|
|
|
|
|
<DropdownItem>
|
|
|
|
|
<div v-for="item in unitTypeList">
|
|
|
|
|
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
|
|
|
|
|
|
|
|
|
|
@click="openMyMission(item.value,scope.row)">任务执行</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</DropdownItem>
|
|
|
|
|
</DropdownMenu>
|
|
|
|
|
</template>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 组里面所有人都能执行任务 -->
|
|
|
|
|
<div v-else>
|
|
|
|
|
<div v-for="item in unitTypeList">
|
|
|
|
|
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
|
|
|
|
|
style="margin-right:5px;margin-bottom:5px;"
|
|
|
|
|
@click="openMyMission(item.value,scope.row)">执行任务</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 直接 执行任务 -->
|
|
|
|
|
<div v-else>
|
|
|
|
|
<div v-for="item in unitTypeList">
|
|
|
|
|
<Button v-if="scope.row.unit_type==item.id &&scope.row.audit_status==1" type="primary" size="small"
|
|
|
|
|
style="margin-right:5px;margin-bottom:5px;"
|
|
|
|
|
@click="openMyMission(item.value,scope.row)">执行任务</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<!-- <div v-for="item in unitTypeList">
|
|
|
|
|
<Button v-if="scope.row.unit_type==item.id&&scope.row.audit_status==1" type="primary" size="small"
|
|
|
|
|
style="margin-right:5px;margin-bottom:5px;"
|
|
|
|
|
@click="openMyMission(item.value,scope.row)">执行任务</Button>
|
|
|
|
|
</div> -->
|
|
|
|
|
<Button style='margin-right:5px;margin-bottom:5px;' type="primary" size="small"
|
|
|
|
|
@click="checkUnits(scope.row.id,'show')">查看任务</Button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
@ -221,7 +320,7 @@
|
|
|
|
|
<!-- <showPatrol ref='showPatrol' @refresh='getMyselfList'></showPatrol> -->
|
|
|
|
|
|
|
|
|
|
<showArticle ref='showArticle' @refresh="refreshIsshow"></showArticle>
|
|
|
|
|
|
|
|
|
|
<addUnit ref='addUnit' @refresh='getMyselfList'></addUnit>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -262,7 +361,8 @@ import addPatrol from '@/views/task/list/components/addPatrol.vue'
|
|
|
|
|
import answerQuestion from '@/views/task/list/components/answerQuestion.vue'
|
|
|
|
|
import showPlan from '@/views/task/list/components/showPlan.vue'
|
|
|
|
|
import showArticle from '@/views/dashboard/components/showArticle.vue'
|
|
|
|
|
import state from '@/store/modules/user.js'
|
|
|
|
|
import state from '@/store/modules/user.js'
|
|
|
|
|
import addUnit from '@/views/task/list/components/addUnit.vue'
|
|
|
|
|
export default {
|
|
|
|
|
name: 'Dashboard',
|
|
|
|
|
computed: {
|
|
|
|
|
@ -278,7 +378,8 @@ export default {
|
|
|
|
|
addPatrol,
|
|
|
|
|
answerQuestion,
|
|
|
|
|
showArticle,
|
|
|
|
|
showPlan
|
|
|
|
|
showPlan,
|
|
|
|
|
addUnit,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -358,8 +459,14 @@ export default {
|
|
|
|
|
id:3,
|
|
|
|
|
value:'待归档',
|
|
|
|
|
type:'danger'
|
|
|
|
|
}],
|
|
|
|
|
myselfTable: [{
|
|
|
|
|
}],
|
|
|
|
|
treeProps:{children: 'mychildren', hasChildren: 'hasChildren'},
|
|
|
|
|
myselfTable: [{
|
|
|
|
|
label: "",
|
|
|
|
|
prop: 'pindex',
|
|
|
|
|
// fixed:'left',
|
|
|
|
|
width:80
|
|
|
|
|
},{
|
|
|
|
|
label: "任务名称",
|
|
|
|
|
prop: 'name',
|
|
|
|
|
width: 200,
|
|
|
|
|
@ -398,12 +505,14 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
} </div>)
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
label: "责任人(科室)",
|
|
|
|
|
prop: 'main_admin.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
align: 'center',
|
|
|
|
|
}],
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// label: "责任人(科室)",
|
|
|
|
|
// prop: 'main_admin.name',
|
|
|
|
|
// width: 120,
|
|
|
|
|
// align: 'center',
|
|
|
|
|
// },
|
|
|
|
|
],
|
|
|
|
|
depYear:'',
|
|
|
|
|
depList:[],
|
|
|
|
|
auditTable:{
|
|
|
|
|
@ -1079,10 +1188,14 @@ export default {
|
|
|
|
|
async getMyselfList() {
|
|
|
|
|
const res = await listunit({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 99,
|
|
|
|
|
page_size: 999,
|
|
|
|
|
myself: 1,
|
|
|
|
|
audit_status: '',
|
|
|
|
|
pid:''
|
|
|
|
|
pid:'',
|
|
|
|
|
sort_name: 'start_date',
|
|
|
|
|
sort_type: 'DESC',
|
|
|
|
|
year: new Date().getFullYear(),
|
|
|
|
|
month: '',
|
|
|
|
|
})
|
|
|
|
|
// 我的任务中 选择accept_department_ids部门的,只有选择到的科室负责人能看到 is_manger = true
|
|
|
|
|
// 且具体执行人为空
|
|
|
|
|
@ -1090,7 +1203,7 @@ export default {
|
|
|
|
|
let _arr = []
|
|
|
|
|
res.data.map((r,index)=>{
|
|
|
|
|
let doAdmins = r.do_admin_ids ? r.do_admin_ids : []
|
|
|
|
|
if(this.path_type == 5 && r.accept_department_ids.length > 0){
|
|
|
|
|
if(r.accept_department_ids.length > 0){
|
|
|
|
|
let isDepartment = r.accept_department_ids.indexOf(this.stateObj.department_id)!=-1 ? true : false
|
|
|
|
|
let isDomains = doAdmins.indexOf(this.stateObj.login_id)!=-1 ? true : false
|
|
|
|
|
if(doAdmins.length==0){
|
|
|
|
|
@ -1103,16 +1216,50 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const newArr = res.data.filter((_, index) => !spliceIndex.includes(index));
|
|
|
|
|
|
|
|
|
|
this.myselfList = newArr
|
|
|
|
|
})
|
|
|
|
|
const newArr = res.data.filter((_, index) => !spliceIndex.includes(index));
|
|
|
|
|
_arr = this.buildTree(newArr)
|
|
|
|
|
_arr.map((r,index)=>{
|
|
|
|
|
r.pindex = index+1
|
|
|
|
|
})
|
|
|
|
|
this.myselfList = _arr
|
|
|
|
|
this.myselfTotal = res.total
|
|
|
|
|
|
|
|
|
|
// this.activeCount = parseInt(this.activeList.length/6)==1?1:parseInt(this.activeList.length/6)+1
|
|
|
|
|
// this.autoScroll()
|
|
|
|
|
},
|
|
|
|
|
buildTree(items) {
|
|
|
|
|
const tree = [];
|
|
|
|
|
const map = {};
|
|
|
|
|
|
|
|
|
|
items.forEach(item => {
|
|
|
|
|
map[item.id] = item;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
items.forEach(item => {
|
|
|
|
|
const parent = map[item.pid];
|
|
|
|
|
if (parent) {
|
|
|
|
|
(parent.mychildren || (parent.mychildren = [])).push(item);
|
|
|
|
|
} else {
|
|
|
|
|
tree.push(item);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return tree;
|
|
|
|
|
},
|
|
|
|
|
editorUnit(id, type , formtype) {
|
|
|
|
|
if (id) {
|
|
|
|
|
this.$refs.addUnit.id = id
|
|
|
|
|
}
|
|
|
|
|
if(formtype){
|
|
|
|
|
this.$refs.addUnit.setType(4)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
openMyMission(remark, e) {
|
|
|
|
|
switch (remark) {
|
|
|
|
|
case '检查':
|
|
|
|
|
|