From bcd606369395aa1415ceb34a8eab88d4a3509142 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 6 Jul 2022 13:48:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=B3=95=E8=A7=84=E6=84=8F?= =?UTF-8?q?=E8=A7=81=E6=94=B6=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../components/initiatingProcess.vue | 146 +++++++++++++++--- .../collectionOfRegulatoryOpinions/index.vue | 2 +- 4 files changed, 126 insertions(+), 24 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 94e5642a8..ebd5a051d 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1088,4 +1088,5 @@ module.exports = { defaultTemplate:'Default template', newRequestCommentListTemplate:'New request for comment list template', NewReleasedStandardTemplate:'New released standard template', + pleaseSelectStandard:'Please select a standard', } \ 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 a2ceb2707..fa467d5f5 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1092,4 +1092,5 @@ module.exports = { defaultTemplate:'默认模板', newRequestCommentListTemplate:'新征求意见清单模板', NewReleasedStandardTemplate:'新发布标准模板', + pleaseSelectStandard:'请选择标准', } \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue index 2634e0991..a0c3d8489 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue @@ -18,7 +18,7 @@ :scroll="{x: '100%'}" rowKey="id" :data-source="dataSource" - :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" + :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,columnTitle:' '}" :columns="columns" > @@ -26,7 +26,6 @@ * {{$t('closingDate')}} - + @@ -59,14 +58,13 @@ * {{$t('Assessor')}} - + + v-model="formInline.evaluatorIdsName"/> @@ -77,9 +75,9 @@
{{$t('taskDescription')}}
- + @@ -91,11 +89,11 @@
{{$t('enclosure')}}
- + - {{ (formInline.approvalFile === 'null' || formInline.approvalFile === '' || - formInline.approvalFile == null) ? $t('clickUpload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('accessory_id')"> + {{ (formInline.accessory_id === 'null' || formInline.accessory_id === '' || + formInline.accessory_id == null) ? $t('clickUpload') : $t('viewUploadedFiles') }} @@ -121,6 +119,8 @@ import footerProcess from '../../../processCenter/components/footerProcess' import { getAction, postAction } from '@/api/manage' import moment from 'moment' + import eventBUs from '../../../../common/event' + import { mapGetters } from 'vuex' export default { name: 'initiatingProcess', @@ -136,7 +136,8 @@ title: this.$t('regulatoryEngineer') + this.$t('initiatingProcess'), //url传参严格按照当前命名 url: { - seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段 + seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段 + addModelList: '/dummy/dummyInventoryInfoEO/queryPageDummy' }, loading: false, dataSource: [], @@ -145,7 +146,24 @@ pageSize: 10, pageNo: 1, formInline: {}, - rules: {}, + rules: { + endTime: [ + { + required: true, + message: this.$t('closingDate') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], + evaluatorIdsName: [ + { + required: true, + message: this.$t('Assessor') + this.$t('cannotEmpty'), + trigger: 'change' + } + ] + }, + searchParmes: {}, + selectedRowKeysRecord: [], columns: [ { title: this.$t('standard'), @@ -187,16 +205,27 @@ align: 'center', ellipsis: true, width: 170, - dataIndex: 'technology_territory' - }, + dataIndex: 'corresponding_standard' + } ] } }, mounted() { document.title = this.$t('regulatoryEngineer') + this.$t('initiatingProcess') this.getList() + eventBUs.$on('searchQuery', search => { + Object.keys(search).forEach(res => { + if (search[res] instanceof Array) { + search[res] = search[res].join(',') + } + }) + this.pageNo = 1 + this.searchParmes = search + this.getList() + }) }, methods: { + ...mapGetters(['userInfo']), pageOnChange(page) { this.pageNo = page this.getList() @@ -207,13 +236,31 @@ this.getList() }, getList() { - + let query = { + pageNo: this.pageNo, + pageSize: this.pageSize, + ...this.searchParmes + } + this.loading = true + postAction(this.url.addModelList, query).then((res) => { + if (res.success) { + this.dataSource = res.result.records || [] + this.total = res.result.total + this.loading = false + } else { + this.dataSource = [] + this.total = 0 + this.loading = false + } + }) }, - onSelectChange(value) { + onSelectChange(value, record) { this.selectedRowKeys = value if (this.selectedRowKeys.length > 1) { - this.selectedRowKeys.unshift() + this.selectedRowKeys.shift() + record.shift() } + this.selectedRowKeysRecord = record }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() @@ -247,7 +294,60 @@ this.formInline[item] = this.formInline[item] ? moment(this.formInline[item]).format('YYYY-MM-DD') : '' }, submit() { - + this.$refs.ruleForm.validate(valid => { + if (valid) { + if (this.selectedRowKeysRecord && this.selectedRowKeysRecord.length == 0) { + this.$message.warning(this.$t('pleaseSelectStandard')) + } else { + let value = Object.assign(this.formInline, this.selectedRowKeysRecord[0]) + value.standId = value.id + delete value.id + value.currentUserName = this.userInfo().username + Object.keys(value).forEach(res => { + if (value[res] && value[res] instanceof String) { + value[res] = value[res].replace(/\"/g, '“') + value[res] = value[res].replace(/\'/g, '‘') + } + }) + this.startProcess(value) + } + } + }) + }, + startProcess(value) { + let query = { + type: 5, + msg: JSON.stringify(value).replace(/\"/g, '\'') + } + postAction('/workFlow/startProcess', query).then((res) => { + if (res.success) { + this.completeTask(value, res.result) + } + }) + }, + completeTask(value, taskId) { + let operatorTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') + value.operatorTime = operatorTime + let query = { + userid: this.userInfo().id, + taskId: taskId, + json: JSON.stringify(value).replace(/\"/g, '\'') + } + postAction('/workFlow/completeTask', query).then((res) => { + if (res.success) { + // setTimeout(() => { + // window.close() + // }, 1000) + this.$message.success(this.$t('OperationSuccessful')) + this.loading = false + this.$router.push({ + path: '/collectionOfRegulatoryOpinions' + }) + } else { + this.loading = false + this.$message.warning(this.$t('operationFailed')) + } + }) } } } diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index 9d54df13b..09e85fbb2 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -143,7 +143,7 @@ align: 'center', width: 170, ellipsis: true, - dataIndex: 'gatherResult' + dataIndex: 'gatherResultShow' }, { title: this.$t('dateOfInitiation'),