diff --git a/src/views/caseManage/caseCommon/caseProcess.vue b/src/views/caseManage/caseCommon/caseProcess.vue index 3864b06..13ec6c1 100644 --- a/src/views/caseManage/caseCommon/caseProcess.vue +++ b/src/views/caseManage/caseCommon/caseProcess.vue @@ -8,7 +8,19 @@ -
+
+ + + + + +
+
@@ -18,27 +30,27 @@ - - - + + +
-
+
- + - - - + + + @@ -84,6 +96,10 @@ caseState: { type: Number, default: null + }, + limitedTime: { + type: String, + default: '' } }, data() { @@ -95,12 +111,15 @@ changeState: '', // 待变更状态 remarks: '', // 备注 dispatchDeptId: '', // 指派任务给某个组织机构 - taskUserId: '' // 任务指派人员 + taskUserId: '', // 任务指派人员, + limitedTime: '' // 完成时限 }, nextNodeList: [], // 流程节点列表 disposalDeptList: [], // 处置部门列表(交办用) normalUserList: [], // 处置人员列表(交办用) - showSelect: '', + showSingleSelect: false, // 选择人员,单选 + showMulitSelect: false, // 选择人员,多选 + showDateTime: false, // 选择延期时间 deptSelectLoading: false, // 处置部门选择框加载动画 userSelectLoading: false, // 处理人选择框加载动画 userQuery: { @@ -121,87 +140,20 @@ this.processForm.bizId = this.bizId this.processForm.processId = this.processId this.processForm.currState = this.caseState + this.fetchNextNodeList() this.fetchDisposalDeptList() this.fetchDeptList() }, methods: { /** - * 从数组中删除 + * 获取下级流转节点 */ - delFromArr(arr, item) { - arr.splice(arr.indexOf(item), 1) - }, - delSelect(v) { - this.delFromArr(this.allUserList, v) - this.delFromArr(this.selectedUserList, v) - }, - selectUser(v) { - this.deptMap[this.selectedDept] = v - this.allUserList = Object.keys(this.deptMap).reduce((arr, item) => { - return arr.concat(this.deptMap[item]) - }, []) - console.log('tttt', this.allUserList, this.deptMap) - }, fetchNextNodeList() { getNextNodeList(this.processForm.currState).then(response => { this.nextNodeList = response.data }) }, - fetchDisposalDeptList() { - this.deptSelectLoading = true - getDisposalDeptList().then(response => { - this.disposalDeptList = response.data - this.deptSelectLoading = false - }) - }, - fetchDeptList() { - this.deptSelectLoading = true - getDeptList().then(response => { - this.deptList = response.data - this.deptSelectLoading = false - }) - }, - fetchNormalUserList() { - this.userSelectLoading = true - this.userQuery.roleTips = 'normal' - getUserList(this.userQuery).then(response => { - this.normalUserList = response.data - this.userSelectLoading = false - }) - }, - fetchUserList() { - this.userQuery.roleTips = '' - this.userSelectLoading = true - getUserList(this.userQuery).then(response => { - this.userList = response.data - this.userList.forEach(item => { - const iid = item.id - this.allUserList.includes(iid) && this.selectedUserList.push(iid) - this.userMap[iid] = item - }) - console.log('userMap', this.userMap) - this.userSelectLoading = false - }) - }, - selectDisposalDept(val) { - console.log('selectDisposalDept') - this.normalUserList = [] - this.processForm.taskUserId = '' - if (val) { - this.userQuery.deptid = val - this.fetchNormalUserList() - } - }, - selectDept(val) { - console.log('selectDept') - this.userList = [] - this.selectedUserList = [] - if (val) { - this.userQuery.deptid = val - this.fetchUserList() - } - }, /** * 选择处理方式之后: * 如果下一步是交办,选择人员和部门(单选),清空相关信息 @@ -209,21 +161,33 @@ * 否则,隐藏人员和部门,清空processForm中的dispatchDeptId和taskUserId */ selectNextOperation(changeState) { + this.showSingleSelect = false + this.showMulitSelect = false + this.showDateTime = false + this.processForm.dispatchDeptId = '' + this.processForm.taskUserId = '' + this.processForm.limitedTime = '' + + this.normalUserList = [] + this.selectedDept = '' + this.selectedUserList = [] + this.allUserList = [] + this.userMap = {} + this.deptMap = {} + // 交办 if (changeState === 2) { - this.processForm.dispatchDeptId = '' - this.processForm.taskUserId = '' - this.showSelect = 'single' - } else if (changeState === 9) { - this.selectedDept = '' - this.selectedUserList = '' - this.allUserList = '' - this.userMap = {} - this.deptMap = {} - this.showSelect = 'mulit' - } else { - this.showSelect = '' - this.processForm.dispatchDeptId = '' - this.processForm.taskUserId = '' + this.showSingleSelect = true + } + // 会签 + if (changeState === 9) { + this.showMulitSelect = true + // console.log('select==>', this.selectedUserList) + } + if (this.caseState === 6 && this.hasPerm('/changeLimitedTime')) { + if (changeState !== 5) { + this.processForm.limitedTime = this.limitedTime + this.showDateTime = true + } } }, // 提交 @@ -292,6 +256,104 @@ this.processForm.taskId = this.taskId } return true + }, + /** + * 获取处置单位列表(交办用) + */ + fetchDisposalDeptList() { + this.deptSelectLoading = true + getDisposalDeptList().then(response => { + this.disposalDeptList = response.data + this.deptSelectLoading = false + }) + }, + /** + * 获取处置人员列表(交办用) + */ + fetchNormalUserList() { + this.userSelectLoading = true + this.userQuery.roleTips = 'normal' + getUserList(this.userQuery).then(response => { + this.normalUserList = response.data + this.userSelectLoading = false + }) + }, + /** + * 监听选择处置单位,获取处理人员(交办) + */ + selectDisposalDept(val) { + console.log('selectDisposalDept') + this.normalUserList = [] + this.processForm.taskUserId = '' + if (val) { + this.userQuery.deptid = val + this.fetchNormalUserList() + } + }, + /** + * 获取部门列表(会签用) + */ + fetchDeptList() { + this.deptSelectLoading = true + getDeptList().then(response => { + this.deptList = response.data + this.deptSelectLoading = false + }) + }, + /** + * 获取人员列表(会签用) + */ + fetchUserList() { + this.userQuery.roleTips = '' + this.userSelectLoading = true + getUserList(this.userQuery).then(response => { + this.userList = response.data + this.userList.forEach(item => { + const iid = item.id + if (this.allUserList.includes(iid)) { + this.selectedUserList.push(iid) + } + this.userMap[iid] = item + }) + console.log('userMap', this.userMap) + this.userSelectLoading = false + }) + }, + /** + * 监听选择单位,获取人员列表(会签) + */ + selectDept(val) { + console.log('selectDept') + this.userList = [] + this.selectedUserList = [] + if (val) { + this.userQuery.deptid = val + this.fetchUserList() + } + }, + /** + * 选择人员(多选,会签): + * 将选择的人员放进deptMap中,然后遍历deptMap,将全部人员放入allUserList + */ + selectUser(v) { + this.deptMap[this.selectedDept] = v + this.allUserList = Object.keys(this.deptMap).reduce((arr, item) => { + return arr.concat(this.deptMap[item]) + }, []) + console.log('tttt', this.allUserList, this.deptMap) + }, + /** + * 从数组中删除 + */ + delFromArr(arr, item) { + arr.splice(arr.indexOf(item), 1) + }, + /** + * 从已选和全部已选中移除人员(会签) + */ + delSelect(v) { + this.delFromArr(this.allUserList, v) + this.delFromArr(this.selectedUserList, v) } } } diff --git a/src/views/caseManage/caseCommon/caseProcess.vue b/src/views/caseManage/caseCommon/caseProcess.vue index 3864b06..13ec6c1 100644 --- a/src/views/caseManage/caseCommon/caseProcess.vue +++ b/src/views/caseManage/caseCommon/caseProcess.vue @@ -8,7 +8,19 @@ -
+
+ + + + + +
+
@@ -18,27 +30,27 @@ - - - + + +
-
+
- + - - - + + + @@ -84,6 +96,10 @@ caseState: { type: Number, default: null + }, + limitedTime: { + type: String, + default: '' } }, data() { @@ -95,12 +111,15 @@ changeState: '', // 待变更状态 remarks: '', // 备注 dispatchDeptId: '', // 指派任务给某个组织机构 - taskUserId: '' // 任务指派人员 + taskUserId: '', // 任务指派人员, + limitedTime: '' // 完成时限 }, nextNodeList: [], // 流程节点列表 disposalDeptList: [], // 处置部门列表(交办用) normalUserList: [], // 处置人员列表(交办用) - showSelect: '', + showSingleSelect: false, // 选择人员,单选 + showMulitSelect: false, // 选择人员,多选 + showDateTime: false, // 选择延期时间 deptSelectLoading: false, // 处置部门选择框加载动画 userSelectLoading: false, // 处理人选择框加载动画 userQuery: { @@ -121,87 +140,20 @@ this.processForm.bizId = this.bizId this.processForm.processId = this.processId this.processForm.currState = this.caseState + this.fetchNextNodeList() this.fetchDisposalDeptList() this.fetchDeptList() }, methods: { /** - * 从数组中删除 + * 获取下级流转节点 */ - delFromArr(arr, item) { - arr.splice(arr.indexOf(item), 1) - }, - delSelect(v) { - this.delFromArr(this.allUserList, v) - this.delFromArr(this.selectedUserList, v) - }, - selectUser(v) { - this.deptMap[this.selectedDept] = v - this.allUserList = Object.keys(this.deptMap).reduce((arr, item) => { - return arr.concat(this.deptMap[item]) - }, []) - console.log('tttt', this.allUserList, this.deptMap) - }, fetchNextNodeList() { getNextNodeList(this.processForm.currState).then(response => { this.nextNodeList = response.data }) }, - fetchDisposalDeptList() { - this.deptSelectLoading = true - getDisposalDeptList().then(response => { - this.disposalDeptList = response.data - this.deptSelectLoading = false - }) - }, - fetchDeptList() { - this.deptSelectLoading = true - getDeptList().then(response => { - this.deptList = response.data - this.deptSelectLoading = false - }) - }, - fetchNormalUserList() { - this.userSelectLoading = true - this.userQuery.roleTips = 'normal' - getUserList(this.userQuery).then(response => { - this.normalUserList = response.data - this.userSelectLoading = false - }) - }, - fetchUserList() { - this.userQuery.roleTips = '' - this.userSelectLoading = true - getUserList(this.userQuery).then(response => { - this.userList = response.data - this.userList.forEach(item => { - const iid = item.id - this.allUserList.includes(iid) && this.selectedUserList.push(iid) - this.userMap[iid] = item - }) - console.log('userMap', this.userMap) - this.userSelectLoading = false - }) - }, - selectDisposalDept(val) { - console.log('selectDisposalDept') - this.normalUserList = [] - this.processForm.taskUserId = '' - if (val) { - this.userQuery.deptid = val - this.fetchNormalUserList() - } - }, - selectDept(val) { - console.log('selectDept') - this.userList = [] - this.selectedUserList = [] - if (val) { - this.userQuery.deptid = val - this.fetchUserList() - } - }, /** * 选择处理方式之后: * 如果下一步是交办,选择人员和部门(单选),清空相关信息 @@ -209,21 +161,33 @@ * 否则,隐藏人员和部门,清空processForm中的dispatchDeptId和taskUserId */ selectNextOperation(changeState) { + this.showSingleSelect = false + this.showMulitSelect = false + this.showDateTime = false + this.processForm.dispatchDeptId = '' + this.processForm.taskUserId = '' + this.processForm.limitedTime = '' + + this.normalUserList = [] + this.selectedDept = '' + this.selectedUserList = [] + this.allUserList = [] + this.userMap = {} + this.deptMap = {} + // 交办 if (changeState === 2) { - this.processForm.dispatchDeptId = '' - this.processForm.taskUserId = '' - this.showSelect = 'single' - } else if (changeState === 9) { - this.selectedDept = '' - this.selectedUserList = '' - this.allUserList = '' - this.userMap = {} - this.deptMap = {} - this.showSelect = 'mulit' - } else { - this.showSelect = '' - this.processForm.dispatchDeptId = '' - this.processForm.taskUserId = '' + this.showSingleSelect = true + } + // 会签 + if (changeState === 9) { + this.showMulitSelect = true + // console.log('select==>', this.selectedUserList) + } + if (this.caseState === 6 && this.hasPerm('/changeLimitedTime')) { + if (changeState !== 5) { + this.processForm.limitedTime = this.limitedTime + this.showDateTime = true + } } }, // 提交 @@ -292,6 +256,104 @@ this.processForm.taskId = this.taskId } return true + }, + /** + * 获取处置单位列表(交办用) + */ + fetchDisposalDeptList() { + this.deptSelectLoading = true + getDisposalDeptList().then(response => { + this.disposalDeptList = response.data + this.deptSelectLoading = false + }) + }, + /** + * 获取处置人员列表(交办用) + */ + fetchNormalUserList() { + this.userSelectLoading = true + this.userQuery.roleTips = 'normal' + getUserList(this.userQuery).then(response => { + this.normalUserList = response.data + this.userSelectLoading = false + }) + }, + /** + * 监听选择处置单位,获取处理人员(交办) + */ + selectDisposalDept(val) { + console.log('selectDisposalDept') + this.normalUserList = [] + this.processForm.taskUserId = '' + if (val) { + this.userQuery.deptid = val + this.fetchNormalUserList() + } + }, + /** + * 获取部门列表(会签用) + */ + fetchDeptList() { + this.deptSelectLoading = true + getDeptList().then(response => { + this.deptList = response.data + this.deptSelectLoading = false + }) + }, + /** + * 获取人员列表(会签用) + */ + fetchUserList() { + this.userQuery.roleTips = '' + this.userSelectLoading = true + getUserList(this.userQuery).then(response => { + this.userList = response.data + this.userList.forEach(item => { + const iid = item.id + if (this.allUserList.includes(iid)) { + this.selectedUserList.push(iid) + } + this.userMap[iid] = item + }) + console.log('userMap', this.userMap) + this.userSelectLoading = false + }) + }, + /** + * 监听选择单位,获取人员列表(会签) + */ + selectDept(val) { + console.log('selectDept') + this.userList = [] + this.selectedUserList = [] + if (val) { + this.userQuery.deptid = val + this.fetchUserList() + } + }, + /** + * 选择人员(多选,会签): + * 将选择的人员放进deptMap中,然后遍历deptMap,将全部人员放入allUserList + */ + selectUser(v) { + this.deptMap[this.selectedDept] = v + this.allUserList = Object.keys(this.deptMap).reduce((arr, item) => { + return arr.concat(this.deptMap[item]) + }, []) + console.log('tttt', this.allUserList, this.deptMap) + }, + /** + * 从数组中删除 + */ + delFromArr(arr, item) { + arr.splice(arr.indexOf(item), 1) + }, + /** + * 从已选和全部已选中移除人员(会签) + */ + delSelect(v) { + this.delFromArr(this.allUserList, v) + this.delFromArr(this.selectedUserList, v) } } } diff --git a/src/views/caseManage/caseDetail.vue b/src/views/caseManage/caseDetail.vue index c95db96..bc5b6dc 100644 --- a/src/views/caseManage/caseDetail.vue +++ b/src/views/caseManage/caseDetail.vue @@ -19,6 +19,7 @@ :process-id="caseDetail.processId" :task-id="taskId" :case-state="caseDetail.caseState" + :limited-time="caseDetail.limitedTime" @loading="loading" @submitSuccess="submitSuccess" @submitError="submitError"