diff --git a/package.json b/package.json index 2dcd445..b16be80 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "serve": "vue-cli-service serve", + "dev": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, diff --git a/src/api/user.js b/src/api/user.js index cfc23d6..7ccfc59 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -75,6 +75,10 @@ export function resume(accountCode) { return $http.post('project/account/resume', {accountCode: accountCode, status: 1}); } +export function liaisonMan(data) { + return $http.post('project/account/set_liaison_man', data); +} + export function doAccount(data) { let url = 'project/account/add'; if (data.code) { diff --git a/src/components/project/taskAdd.vue b/src/components/project/taskAdd.vue index 6d06635..668260e 100644 --- a/src/components/project/taskAdd.vue +++ b/src/components/project/taskAdd.vue @@ -23,6 +23,48 @@
+
+
+
+ + 工作内容 +
+
+
+
+ 添加工作内容 +
+ +
+ +
+ + 取消 + + 保存 + +
+
+
+
+
+
@@ -100,47 +142,6 @@
-
-
-
- - 工作内容 -
-
-
-
- 添加工作内容 -
- -
- -
- - 取消 - - 保存 - -
-
-
-
-
@@ -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 @@
-

待认领

+

未设置

@@ -164,6 +165,18 @@