From 74b39431a54702199e28a2e93a564713a885acbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 8 Mar 2023 15:16:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=A4=E8=AF=81=E6=B8=85?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 6 + jero-web/src/common/lang/zh-cn.js | 5 + .../ProjectDetails/index.vue | 3 + .../components/certificationList/index.vue | 104 ++++++++++++++---- .../components/dealtWith.vue | 19 +++- 5 files changed, 114 insertions(+), 23 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index e1a9a6991..b9bd734cd 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1406,4 +1406,10 @@ module.exports = { missionRejection:'Mission Rejection', turnToDo:'Turn To Do', initiateTask:'Initiate a Task', + areYouReturnToStudio:'Are you sure to return to studio?', + confirmLaunchTask:'Confirm launch task ?', + conditionsNotMet:'Conditions not met', + onlyProcessStatusReturned:'Only the data whose process status is list to be checked and rejected by the responsible person can be returned', + onlyProcessReturned:'Only data with process status of list to be checked and rejected by responsible person can be initiated', + } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 394e268a2..f256d2c70 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1507,4 +1507,9 @@ module.exports = { missionRejection:'任务拒绝', turnToDo:'转办', initiateTask:'发起任务', + areYouReturnToStudio:'确认退回至studio吗?', + confirmLaunchTask:'确认发起任务?', + conditionsNotMet:'不满足条件', + onlyProcessStatusReturned:'只能退回流程状态为清单待校核和责任人拒绝的数据', + onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/ProjectDetails/index.vue b/jero-web/src/views/projectManagement/ProjectDetails/index.vue index bc1917952..eda358291 100644 --- a/jero-web/src/views/projectManagement/ProjectDetails/index.vue +++ b/jero-web/src/views/projectManagement/ProjectDetails/index.vue @@ -241,6 +241,9 @@ } else if (this.$route.query.type == '105') { this.textColor(this.$t('TaskParameterCollection')) this.textTitle = this.$t('TaskParameterCollection') + }else if (this.$route.query.type == '106') { + this.textColor(this.$t('certificationList')) + this.textTitle = this.$t('certificationList') } } else { if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) { diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index ee810677a..c0e8b6c67 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -186,13 +186,15 @@ -
+
{{ $t('initiateTask') }}
-
+
{{ $t('returnToStudio') }}
@@ -1032,14 +1034,6 @@ } else { this.$message.warning(this.$t('selectLeastOne')) } - }, - //发起流程 - initiatingProcessClick() { - - }, - //退回至Studio - returnToStudioClick() { - }, //审批通过 ApprovedClick() { @@ -1095,24 +1089,90 @@ item.roleCode = this.roleSwitchingCode this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress')) }, - submitTask(value) { + //发起流程 + initiatingProcessClick(value, prompt) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - let query = { - 'nodeKey': value, - 'projectLibraryId': this.$route.query.id, - 'ids': selectedRowKeys.join(',') - } - postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => { - if (res.success) { - + let ids = [] + let notConditions = [] + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' || + this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') { + ids.push(this.selectedRowKeysList[i].id) } else { - + notConditions.push(this.selectedRowKeysList[i].serialNumber) } - }) + } + let data = '' + if (notConditions && notConditions.length > 0) { + data = this.$t('standardNo') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned') + } + if (ids && ids.length > 0) { + this.submitTask(value, prompt, ids, notConditions, data) + } else { + this.failedMessage(data) + } } else { this.$message.warning(this.$t('selectLeastOne')) } + }, + //退回至Studio + returnToStudioClick(value, prompt) { + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + let ids = [] + let notConditions = [] + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' || + this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].serialNumber) + } + } + let data = '' + if (notConditions && notConditions.length > 0) { + data = this.$t('standardNo') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessStatusReturned') + } + if (ids && ids.length > 0) { + this.submitTask(value, prompt, ids, notConditions, data) + } else { + this.failedMessage(data) + } + } else { + this.$message.warning(this.$t('selectLeastOne')) + } + }, + failedMessage(data) { + let detailedWarningList = [] + detailedWarningList.push(data) + this.$warning({ + content: ( < div > { detailedWarningList } < /div>) + }) + }, + submitTask(value, prompt, ids, notConditions, data) { + let _this = this + this.$confirm({ + content: prompt, + onOk() { + let query = { + 'nodeKey': value, + 'projectLibraryId': _this.$route.query.id, + 'ids': ids.join(',') + } + postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.getList() + _this.selectedRowKeys = [] + _this.selectedRowKeysList = [] + if (notConditions && notConditions.length > 0) { + _this.failedMessage(data) + } + } else { + _this.$message.warning(_this.$t('operationFailed')) + } + }) + } + }) } } } diff --git a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue index 189f86557..c9e16c437 100644 --- a/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue +++ b/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue @@ -28,6 +28,9 @@ -- + + {{text ? text : '--'}} +
30) {