From 4323f3c31f25097b2365ed0059f17d74d2e05b5b Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 13 Apr 2022 15:35:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=99=9A=E6=8B=9F=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85?= 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 + .../virtualList/components/addModel.vue | 150 ++++++++++++++---- .../components/virtualListDetails.vue | 115 ++++++++++---- .../views/documentTools/virtualList/index.vue | 6 +- 5 files changed, 211 insertions(+), 62 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index dea326b3e..108e2dc1d 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -651,4 +651,5 @@ module.exports = { FileUploadFailed:'File upload failed', FileUploadedSuccessfully:'File uploaded successfully', DeletedSuccessfully:'Deleted successfully', + confirmCopy:'confirm Copy ?', } \ 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 aaba25dec..1a888b39c 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -655,4 +655,5 @@ module.exports = { FileUploadFailed:'文件上传失败', FileUploadedSuccessfully:'文件上传成功', DeletedSuccessfully:'删除成功', + confirmCopy: '确定复制?', } \ No newline at end of file diff --git a/jero-web/src/views/documentTools/virtualList/components/addModel.vue b/jero-web/src/views/documentTools/virtualList/components/addModel.vue index c6fd390ca..343a75ce7 100644 --- a/jero-web/src/views/documentTools/virtualList/components/addModel.vue +++ b/jero-web/src/views/documentTools/virtualList/components/addModel.vue @@ -9,12 +9,45 @@ :visible="visible" style="height: 100%;overflow: auto;padding-bottom: 53px;">
- +
+ + +
+
+ {{$t('standard')}} +
+ +
+
+ +
+
+ {{$t('title')}} +
+ +
+
+ +
+
+ {{$t('status')}} +
+ +
+
+ + + {{$t('query')}} + {{$t('reset')}} + + +
+
{ - if (queryParamQuery[res] instanceof Array) { - queryParamQuery[res] = queryParamQuery[res].join(',') - } - }) - this.queryParam = queryParamQuery + searchQuery() { + this.pageNo = 1 this.replacePage() }, - searchReset(queryParam) { - this.queryParam = queryParam + searchReset() { + this.pageNo = 1 + this.queryParam = {} this.replacePage() }, onChange(page, pageSize) { @@ -138,7 +172,21 @@ this.replacePage() }, replacePage() { - + let query = { + pageNo: this.pageNo, + pageSize: this.pageSize, + ...this.queryParam + } + this.loading = true + postAction(this.url.addModelList, query).then((res) => { + if (res.success) { + this.dataList = res.result.records || [] + this.total = res.result.total + this.loading = false + } else { + this.loading = false + } + }) }, onSelectChange(value) { this.selectedRowKeys = value @@ -148,6 +196,19 @@ }, handleSubmit() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + this.confirmLoading = true + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + postAction(this.url.addModel, { ids: selectedRowKeys.join(',') }).then((res) => { + if (res.success) { + this.confirmLoading = false + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.selectedRowKeys = [] + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false + } + }) this.visible = false } else { this.$message.warning(this.$t('selectLeastOne')) @@ -174,4 +235,39 @@ background: #fff; border-radius: 0 0 2px 2px; } + + .box-title-text { + line-height: 1.4; + display: flex; + align-items: center; + margin-bottom: 10px; + } + + .title-text { + width: 20%; + min-width: 110px; + color: #000F16; + display: inline-block; + font-weight: 500; + font-size: 14px; + margin-right: 16px; + margin-top: 3px; + text-align: right; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .box-input { + display: inline-block; + width: 70%; + height: 38px; + margin-top: 2px; + } + + .box-button { + height: 38px; + } + + \ No newline at end of file diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index 36415e40b..0b5bf7c37 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -79,29 +79,36 @@
+
+
{{$t('templateDownload')}}
+
{{$t('export')}}
+
{{$t('copy')}}
+
{{$t('batSetting')}}
+
{{$t('add')}}
+
{{$t('BatchDelete')}} @@ -138,10 +145,10 @@
- - - - + + + + @@ -166,21 +173,32 @@ return { title: '维护虚拟清单', queryParam: {}, - url: {}, + url: { + addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy', + page: '/dummy/dummyInventoryInfoEO/page', + addModel: '/dummy/dummyInventoryInfoEO/add', + editModel: '/dummy/dummyInventoryInfoEO/edit', + deleteBatch: '/dummy/dummyInventoryInfoEO/deleteBatch', + copyInfo: '/dummy/dummyInventoryInfoEO/copyInfoByIds', + setBatch: '/dummy/dummyInventoryInfoEO/setBatch', + importZipUrl: '/dummy/dummyInventoryInfoEO/importData', + exportData: '/dummy/dummyInventoryInfoEO/exportData', + exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate' + }, loading: false, dataSource: [], columnsAll: [ { title: 'WVTA ID', align: 'center', - dataIndex: 'WVTAID', + dataIndex: 'wvtaId', width: 100, fixed: 'left' }, { title: this.$t('standard'), align: 'center', - dataIndex: 'standard', + dataIndex: 'serialNumber', width: 100, fixed: 'left' }, @@ -201,12 +219,12 @@ { title: this.$t('scopeOfApplication'), align: 'center', - dataIndex: 'scopeOfApplication' + dataIndex: 'shi4Yong4Fan4Wei2' }, { title: this.$t('status'), align: 'center', - dataIndex: 'status' + dataIndex: 'state' }, { title: this.$t('correspondingStandard'), @@ -216,59 +234,60 @@ { title: this.$t('implementationCategory'), align: 'center', - dataIndex: 'implementationCategory' + dataIndex: 'implementType' }, { title: this.$t('ImplementationDate'), align: 'center', - dataIndex: 'ImplementationDate' + dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1' }, { title: this.$t('vehicleInProductionDate'), align: 'center', - dataIndex: 'vehicleInProductionDate' + dataIndex: 'implementTime' }, { title: this.$t('certificationType'), align: 'center', - dataIndex: 'certificationType' + dataIndex: 'attestationType' }, { title: this.$t('certificationLevel'), align: 'center', - dataIndex: 'certificationLevel' + dataIndex: 'attestationRank' }, { title: this.$t('technicalField'), align: 'center', - dataIndex: 'technicalField' + dataIndex: 'technologyTerritory' }, { title: this.$t('areaOfResponsibility'), align: 'center', - dataIndex: 'areaOfResponsibility' + dataIndex: 'dutyTerritory' }, { title: this.$t('remarks'), align: 'center', - dataIndex: 'remarks' + dataIndex: 'remark' }, + { title: this.$t('confirmationOfDesignConformity'), children: [ { title: this.$t('Deliverables'), - dataIndex: 'Deliverables', + dataIndex: 'designDeliverableTemplate', align: 'center' }, { title: this.$t('Sponsor'), - dataIndex: 'Sponsor', + dataIndex: 'designInitiator', align: 'center' }, { title: this.$t('personLiable'), - dataIndex: 'personLiable', + dataIndex: 'designDuty', align: 'center' } ] @@ -278,17 +297,17 @@ children: [ { title: this.$t('Deliverables'), - dataIndex: 'Deliverables', + dataIndex: 'prehomoDeliverableTemplate', align: 'center' }, { title: this.$t('Sponsor'), - dataIndex: 'Sponsor', + dataIndex: 'prehomoInitiator', align: 'center' }, { title: this.$t('personLiable'), - dataIndex: 'personLiable', + dataIndex: 'prehomoDuty', align: 'center' } ] @@ -298,17 +317,17 @@ children: [ { title: this.$t('Deliverables'), - dataIndex: 'Deliverables', + dataIndex: 'verifyDeliverableTemplate', align: 'center' }, { title: this.$t('Sponsor'), - dataIndex: 'Sponsor', + dataIndex: 'verifyInitiator', align: 'center' }, { title: this.$t('personLiable'), - dataIndex: 'personLiable', + dataIndex: 'verifyDuty', align: 'center' } ] @@ -351,20 +370,52 @@ this.$refs.UpdateLogRef.getList() }, searchQuery() { - + this.pageNo = 1 + this.getList() }, searchReset() { - + this.queryParam = {} + this.pageNo = 1 + this.getList() }, + //模板下载 handleModule() { - + downloadFile(this.url.exportTemplate, '模板下载.xls', {}) }, + //导出 handleExport() { - + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + let query = { + ...this.queryParam, + id: selectedRowKeys.join(',') + } + downloadFile(this.url.exportData, '文档库.xls', query, this.Deselect) + }, + Deselect() { + this.selectedRowKeys = [] }, //复制 copyClick() { - + if (this.selectedRowKeys.length > 0) { + let _this = this + this.$confirm({ + content: _this.$t('confirmCopy'), + onOk() { + let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys)) + getAction(_this.url.copyInfo, { ids: selectedRowKeys.join(',') }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.getList() + } else { + _this.$message.warning(_this.$t('operationFailed')) + } + }) + } + }) + } else { + this.$message.warning(this.$t('selectLeastOne')) + } }, pageOnChange(page, pageSize) { this.pageNo = page @@ -382,7 +433,7 @@ ...this.queryParam } this.loading = true - getAction(this.url.list, query).then((res) => { + getAction(this.url.page, query).then((res) => { if (res.success) { if (res.result.current > 1 && res.result.records.length == 0) { this.pageNo = res.result.current - 1 diff --git a/jero-web/src/views/documentTools/virtualList/index.vue b/jero-web/src/views/documentTools/virtualList/index.vue index 19c1ca432..3a54e47d8 100644 --- a/jero-web/src/views/documentTools/virtualList/index.vue +++ b/jero-web/src/views/documentTools/virtualList/index.vue @@ -153,7 +153,7 @@ add: '/dummy/dummyInventoryBaseEO/add', edit: '/dummy/dummyInventoryBaseEO/edit', deleteBatch: '/dummy/dummyInventoryBaseEO/deleteBatch', - urlWithdraw: ''//撤回 + urlWithdraw: '/dummy/dummyInventoryBaseEO/issue'//撤回&发布 }, total: 0, pageSize: 10, @@ -232,7 +232,7 @@ }, //撤回 withdraw(val) { - let item = JSON.parse(JSON.stringify(val)) + let item = {} let content = '' if (item.state == 2) { content = this.$t('confirmRelease') @@ -245,7 +245,7 @@ this.$confirm({ content: content, onOk() { - postAction(_this.url.edit, item).then((res) => { + postAction(_this.url.urlWithdraw, item).then((res) => { if (res.success) { _this.$message.success(_this.$t('OperationSuccessful')) _this.getList()