@@ -151,7 +152,6 @@
@@ -173,11 +173,12 @@
@@ -187,17 +188,94 @@
-
+
+
+ 添加工作流转人员
+
+
+
+
+
+
+
@@ -353,6 +431,8 @@
import {notice} from "@/assets/js/notice";
import {relativelyTaskTime, relativelyTime} from "@/assets/js/dateTime";
import {checkResponse} from "../../assets/js/utils";
+ import {list as getDepartment} from "../../api/department";
+ import {list as getliasonMan} from "../../api/user";
import {
_taskWorkTimeList, delTaskWorkTime,
editTaskWorkTime,
@@ -400,7 +480,8 @@
projectCodeCurrent: '',
task: {
pri: 0,
- priText: '普通'
+ priText: '普通',
+ exchangeList: [], //流转
},
taskStatusList: COMMON.TASK_STATUS,
taskLogList: [],
@@ -414,6 +495,8 @@
/*成员菜单*/
visibleTaskMemberMenu: false,
+ /*工作流转*/
+ exchangeMenu: false,
/*工单标签*/
visibleTaskTagMenu: false,
showInviteMember: false,
@@ -489,7 +572,11 @@
},
//显示评论提及
showMentions: false,
- mentionsList: []
+ mentionsList: [],
+ projectCode: '', // 项目编码
+ departmentList: [], //部门列表
+ department: {}, //选择的部门
+ liasionMan: {}, //选择的联络员
}
},
computed: {
@@ -559,6 +646,9 @@
created() {
},
mounted() {
+ this.getDepartment();
+ // console.log('router', this.$route);
+ this.projectCode = this.$route.params.code;
this.$nextTick(()=>{
this.changeModalHeight();
})
@@ -590,6 +680,61 @@
}
},
methods: {
+ // 获取部门
+ getDepartment(){
+ getDepartment().then((res)=>{
+ this.departmentList = res.data.list;
+ })
+ },
+ // 选择部门
+ departmentDropClick(e){
+ let obj = this.departmentList.find(item=>item.code == e.key);
+ this.department = obj;
+ getliasonMan({
+ searchType: 4,
+ type: 1,
+ departmentCode: obj.code
+ }).then(res=>{
+ if(res.data.list[0]) this.liasionMan = res.data.list[0];
+ else notice({
+ title: '该部门没有联络员',
+ }, 'notice', 'error', 5)
+ })
+ },
+ // 选择抄送人
+ changeRecipient(e){
+ this.task.executor = e;
+ this.showInviteMember = false;
+ this.visibleTaskMemberMenu = false;
+ },
+ // 选择流转人员
+ changeExchange(e){
+ this.task.exchangeList.push({
+ f_key: new Date().getTime(),
+ show: false,
+ ...e
+ })
+ },
+ // 替换流转人员
+ changeExchangeShow(e){
+ let index = this.task.exchangeList.findIndex(item=>item.show==true);
+ if(index!=-1){
+ this.task.exchangeList[index].show = false;
+ let list = JSON.parse(JSON.stringify(this.task.exchangeList));
+ if(e){
+ list[index] = {
+ f_key: new Date().getTime(),
+ show: false,
+ ...e
+ };
+ }else {
+ list.splice(index, 1)
+ }
+ this.$nextTick(()=>{
+ this.task.exchangeList = list;
+ })
+ }
+ },
detailClose() {
this.$emit('close', this.task);
// this.$router.push(`/project/space/task/${this.task.project_code}`);
diff --git a/src/components/project/taskDetail.vue b/src/components/project/taskDetail.vue
index 8ef15f2..c46f2ad 100644
--- a/src/components/project/taskDetail.vue
+++ b/src/components/project/taskDetail.vue
@@ -954,7 +954,7 @@
-
-
-
-->
+
diff --git a/src/components/project/taskMemberMenu.vue b/src/components/project/taskMemberMenu.vue
index 068fd70..a762869 100644
--- a/src/components/project/taskMemberMenu.vue
+++ b/src/components/project/taskMemberMenu.vue
@@ -18,7 +18,7 @@