From 0e44bb7b4111c265f74913c80692eb1c4fab8d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 7 Mar 2023 11:56:08 +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=E8=A7=92=E8=89=B2=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 8 + jero-web/src/common/lang/zh-cn.js | 8 + .../ProjectDetails/index.vue | 75 ++-- .../components/modifyHistoryList.vue | 175 +++++++++ .../components/certificationList/index.vue | 333 +++++++++++++++--- .../components/listOfRegulations.vue | 33 +- 6 files changed, 530 insertions(+), 102 deletions(-) create mode 100644 jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index eac083439..b18a0b0e6 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1395,4 +1395,12 @@ module.exports = { regulationNo:'Regulation No', itemInformation:'Item Information', modifyHistory:'Modify History', + returnToStudio:'Return to Studio', + Approved:'Approved', + returnedForApproval:'Returned For Approval', + changeSetting:'Change Setting', + referenceDeliverables:'Reference Deliverables', + missionAccepted:'Mission Accepted', + missionRejection:'Mission Rejection', + turnToDo:'Turn To Do', } \ 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 ce91d5d33..d142c0cd5 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1496,4 +1496,12 @@ module.exports = { regulationNo:'法规编号', itemInformation:'条目信息', modifyHistory:'修改历史', + returnToStudio:'退回至Studio', + Approved:'审批通过', + returnedForApproval:'审批退回', + changeSetting:'修改配置', + referenceDeliverables:'引用交付物', + missionAccepted:'任务接受', + missionRejection:'任务拒绝', + turnToDo:'转办', } \ 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 b8a132c9c..296cb1747 100644 --- a/jero-web/src/views/projectManagement/ProjectDetails/index.vue +++ b/jero-web/src/views/projectManagement/ProjectDetails/index.vue @@ -10,19 +10,32 @@ {{this.title}} -
-
+
+
{{$t('comment')}}
-
+
{{$t('historicalVersion')}}
-
+
{{$t('UpdateLog')}}
+
+ + {{$t('roleSwitching')}} +
@@ -46,17 +59,17 @@ {{$t('certificationList')}}
- - - - - - - - - - - + + + + + + + + + + +
@@ -66,7 +79,7 @@
- + {{$t('projectStatus')}}
@@ -88,15 +101,15 @@ @click="textClick(6,$t('certificationList'))">
- - - - - - - - - + + + + + + + + +
@@ -105,7 +118,7 @@
- +
@@ -113,6 +126,7 @@ :style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}"> @@ -120,7 +134,7 @@ - +
@@ -339,6 +353,13 @@ this.$router.push({ path: '/projectLibrary' }) + }, + roleSwitchingClick() { + if (this.textTitle === this.$t('listOfRegulations')) { + this.$refs.listOfRegulationsRef.roleSwitchingClick() + } else { + this.$refs.certificationListRef.roleSwitchingClick() + } } } } diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue b/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue new file mode 100644 index 000000000..316740189 --- /dev/null +++ b/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue @@ -0,0 +1,175 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 6c26e7792..98d16cee0 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -9,7 +9,7 @@ {{ $t('inspectionItems') }} + v-model="queryParam.inspectionItem"> @@ -17,10 +17,10 @@
{{ $t('areaOfResponsibility') }}
- +
@@ -32,7 +32,7 @@ class="box-input" allowClear :getPopupContainer="triggerNode=> triggerNode.parentNode" - v-model="queryParam.processStatus"> + v-model="queryParam.flowStatus"> @@ -67,18 +67,36 @@
-
+
+ + {{ $t('export') }} +
+
+ + {{ $t('preservation') }} +
+
{{ $t('Transfer') }}
-
+
{{ $t('BatchSetting') }}
-
+
{{ $t('CertificationDirectory') }}
+
+ + {{ $t('changeSetting') }} +
+
+ + {{ $t('referenceDeliverables') }} +
-
+
...{{ $t('more') }}
-
+
{{ $t('release') }}
-
+
{{ $t('withdraw') }}
-
+
+ + {{ $t('initiatingProcess') }} +
+
+ + {{ $t('returnToStudio') }} +
+
+ + {{ $t('Approved') }} +
+
+ + {{ $t('returnedForApproval') }} +
+
+ + {{ $t('missionAccepted') }} +
+
+ + {{ $t('missionRejection') }} +
+
+ + {{ $t('submit') }} +
+
+ + {{ $t('turnToDo') }} +
+
{{ $t('question') }}
@@ -160,6 +222,7 @@ + + style="width: 100%"/>
@@ -195,6 +258,40 @@ + + + + +
+
+ * + {{ $t('roleSwitching') }} +
+ + + + + + {{ item.roleName }} + + + + +
+
+
+
+
@@ -205,8 +302,10 @@ import transferList from './components/transferList' import addModel from './components/addModel' import batSetting from './components/batSetting' + import modifyHistory from './components/modifyHistoryList' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' - import moment from "moment"; + import moment from 'moment' + import { mapGetters } from 'vuex' export default { name: 'index', @@ -216,18 +315,19 @@ transferList, certificationDirectory, batSetting, - addModel + addModel, + modifyHistory }, data() { return { queryParam: {}, fieldList: [], queryParamQuery: {}, - formInline:{}, + formInline: {}, toggleSearchStatus: false, - confirmLoading:false, - listTitle:'', - visible:false, + confirmLoading: false, + listTitle: '', + visible: false, rules: { endTime: [ { @@ -235,7 +335,7 @@ message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'), trigger: 'change' } - ], + ] }, url: { list: '/project/projectCertificationInventoryEO/page', @@ -243,12 +343,28 @@ exportData: '', deleteBatch: '/project/projectCertificationInventoryEO/deleteBatch', setBatch: '/project/projectCertificationInventoryEO/setBatch', - deleteOne: '/project/projectCertificationInventoryEO/delete' + deleteOne: '/project/projectCertificationInventoryEO/delete', + AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId', + AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit' }, - processStatusList: [], dataSource: [], + roleSwitchingCode:'', loading: false, - columns: [ + roleSwitchingList: [], + visibleRoleSwitching: false, + confirmLoadingRoleSwitching: false, + formInlineRoleSwitching: {}, + AndUserId: '', + rulesRoleSwitching: { + roleSwitchingCode: [ + { + required: true, + message: this.$t('roleSwitching') + this.$t('cannotEmpty'), + trigger: 'change' + } + ] + }, + columnsAll: [ { title: this.$t('category'), align: 'left', @@ -375,9 +491,31 @@ } }, mounted() { - this.getList() + // this.getList() + this.getRoleByUserId(() => { + this.getAndUserId() + }) + }, + computed: { + columns: function() { + let columns = JSON.parse(JSON.stringify(this.columnsAll)) + if (this.roleSwitchingCode == 11 || + this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14) { + for (let i = 0; i < columns.length; i++) { + if (columns[i].title == this.$t('operation')) { + columns.splice(i, 1) + i-- + } + } + } + return columns + } }, methods: { + ...mapGetters(['userInfo']), + disabledDate(current) { + return current && current < moment().subtract(1, 'day') + }, searchQuery() { this.selectedRowKeys = [] this.getList() @@ -417,7 +555,8 @@ let query = { ...this.queryParamQuery, ...queryParam, - projectLibraryId: this.$route.query.id + projectLibraryId: this.$route.query.id, + roleCode: this.formInlineRoleSwitching.roleSwitchingCode } this.loading = true getAction(this.url.list, query).then((res) => { @@ -435,9 +574,9 @@ this.$refs.transferListRef.transferModel() }, BatchSettingClick() { - if (this.selectedRowKeys && this.selectedRowKeys.length > 0){ + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys))) - }else{ + } else { this.$message.warning(this.$t('selectLeastOne')) } }, @@ -515,38 +654,38 @@ }, releaseClick() { this.listTitle = this.$t('Deadline') - if(this.selectedRowKeysList.length < 1){ + if (this.selectedRowKeysList.length < 1) { this.$message.warning(this.$t('selectLeastOne')) - }else{ + } else { this.visible = true } }, handleOk() { this.$refs.ruleForm.validate(valid => { if (valid) { - let selectedRowKeys = [] - this.selectedRowKeysList.forEach(res => { - selectedRowKeys.push(res.id) - }) - let query = { - ids: selectedRowKeys.join(','), - projectLibraryId: this.$route.query.id, - ...this.formInline + let selectedRowKeys = [] + this.selectedRowKeysList.forEach(res => { + selectedRowKeys.push(res.id) + }) + let query = { + ids: selectedRowKeys.join(','), + projectLibraryId: this.$route.query.id, + ...this.formInline + } + this.confirmLoading = true + postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.selectedRowKeys = [] + this.confirmLoading = false + this.getList() + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false } - this.confirmLoading = true - postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.visible = false - this.selectedRowKeys = [] - this.confirmLoading = false - this.getList() - } else { - this.$message.warning(this.$t('operationFailed')) - this.confirmLoading = false - } - this.detailedSuccessList = [] - }) + this.detailedSuccessList = [] + }) } }) }, @@ -590,7 +729,85 @@ }) }, modifyHistoryClick() { - + this.$refs.modifyHistoryRef.getList() + }, + getRoleByUserId(callback) { + getAction('/project/projectCertificationInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => { + if (res.success) { + this.roleSwitchingList = res.result || [] + } else { + this.roleSwitchingList = [] + } + callback && callback() + }) + }, + getAndUserId() { + let query = { + projectLibraryId: this.$route.query.id, + userId: this.userInfo().id, + modelType: 'Certification inventory' + } + getAction(this.url.AndUserId, query).then((res) => { + if (res.success) { + this.isDisplay = true + this.formInlineRoleSwitching.roleSwitchingCode = res.result.roleCode + this.AndUserId = res.result.id + if (this.formInlineRoleSwitching.roleSwitchingCode) { + if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) { + this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : '' + } + } else { + this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : '' + } + this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode + this.getList() + } else { + this.JLoading = false + } + }) + }, + roleSwitchingClick() { + this.visibleRoleSwitching = true + this.$nextTick(() => { + this.$refs.ruleFormRoleSwitching.clearValidate() + if (!this.formInlineRoleSwitching.roleSwitchingCode) { + this.formInlineRoleSwitching.roleSwitchingCode = '0' + } + if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) { + this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : '' + } + this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode + this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching } + }) + }, + handleOkRoleSwitching() { + this.$refs.ruleFormRoleSwitching.validate(valid => { + if (valid) { + let query = { + roleCode: this.formInlineRoleSwitching.roleSwitchingCode, + id: this.AndUserId, + projectLibraryId: this.$route.query.id, + modelType: 'Certification inventory' + } + this.confirmLoadingRoleSwitching = true + postAction(this.url.AndUserIdEdit, query).then((res) => { + if (res.success) { + this.isRoleSwitching = true + this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode + this.$message.success(this.$t('OperationSuccessful')) + this.visibleRoleSwitching = false + this.confirmLoadingRoleSwitching = false + this.getList() + } else { + this.confirmLoadingRoleSwitching = false + this.$message.warning(this.$t('operationFailed')) + } + }) + } + }) + }, + handleCancelRoleSwitching() { + this.visibleRoleSwitching = false } } } diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index fa45597e2..669e66bda 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -207,12 +207,12 @@ {{ $t('add') }}
-
- - {{ $t('roleSwitching') }} -
+ + + + + +
{{ $t('batchSettingInformation') }}
-
- - {{ $t('roleSwitching') }} -
+ + + + + +
@@ -1504,7 +1504,8 @@ export default { getAndUserId() { let query = { projectLibraryId: this.$route.query.id, - userId: this.userInfo().id + userId: this.userInfo().id, + modelType:"Laws inventory" } getAction(this.url.AndUserId, query).then((res) => { if (res.success) { @@ -1528,9 +1529,6 @@ export default { this.isRoleSwitching = false } } - console.log(this.formInlineRoleSwitching.roleSwitchingCode) - console.log(this.isRoleSwitching) - console.log(this.isDisplay) this.getList() // this.JLoading = false } else { @@ -1769,7 +1767,8 @@ export default { let query = { roleCode: this.formInlineRoleSwitching.roleSwitchingCode, id: this.AndUserId, - projectLibraryId: this.$route.query.id + projectLibraryId: this.$route.query.id, + modelType:"Laws inventory", } this.confirmLoadingRoleSwitching = true postAction(this.url.AndUserIdEdit, query).then((res) => {