From 96740e313e0e61c62fb2ccedeac33b7c3596a87b Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 13 Sep 2022 11:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=BA=93=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= 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 | 8 +- .../parameter/escalationlibrary/index.vue | 136 +++++++++++++++--- 3 files changed, 129 insertions(+), 21 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 1dd31f30b..66dd59a4c 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1286,4 +1286,10 @@ module.exports = { listConfirmationRejectionReason:'List confirmation rejection reason', taskConfirmationRejectionReason:'Task confirmation rejection reason', onlyCompletedDataCanBeDeleted:'Only completed data can be deleted', + reportedDelete:'You\'re about to permanently delete the parameter list', + reportDelete:',including its parameters and export history. Once you confirm and press Delete, it cannot be undone or recovered.', + confirmdelete:'Confirm the listing title you want to delete', + Deletetitle:'Delete the title', + toConfirmed: 'to confirm', + confirmtitle:'The title is incorrect. Please re-enter it', } \ 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 32376ecc0..960943483 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1387,5 +1387,11 @@ module.exports = { collectionLegislativeComments:'法规意见收集', regulatoryAndTechnicalAssessment:'法规技术评估', listConfirmationRejectionReason:'清单确认驳回原因', - taskConfirmationRejectionReason:'任务确认驳回原因' + taskConfirmationRejectionReason:'任务确认驳回原因', + reportedDelete:'您将永久删除清单', + reportDelete:',包括清单参数项及导出历史。一旦删除将无法撤销或恢复。', + confirmdelete:'请确认要删除的清单标题', + Deletetitle:'删除标题', + toConfirmed: '来确认', + confirmtitle:'标题不正确,请重新输入', } \ No newline at end of file diff --git a/jero-web/src/views/parameter/escalationlibrary/index.vue b/jero-web/src/views/parameter/escalationlibrary/index.vue index dbb9e4a8a..070251e90 100644 --- a/jero-web/src/views/parameter/escalationlibrary/index.vue +++ b/jero-web/src/views/parameter/escalationlibrary/index.vue @@ -48,6 +48,7 @@ {{$t('Exporthistory')}} {{$t('See')}} + {{$t('delete')}} @@ -67,6 +68,37 @@ + + + + + + + +
+ {{$t('reportedDelete')}} {{ this.deleteformtltle }} {{$t('reportDelete')}} +
+
+ {{$t('pleaseEnter')}} {{ this.deleteformtltle }} {{$t('toConfirmed')}} +
+
+ + + +
+
+
+
+
+
+
+ {{$t('cancel')}} + {{$t('determine')}} +
+
@@ -88,6 +120,8 @@ token: Vue.ls.get(ACCESS_TOKEN), loading: false, toggleSearchStatus: false, + deleteVisible:false, + titleDelete:this.$t('Deletetitle'), selectedRowKeys: [], paramsManifestId:'', selectedRowKeysArray: '', @@ -97,8 +131,17 @@ { required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' } ] }, + rules1: { + paramsTemplateName:[ + { required: true, message: this.$t('PleaseEnter')+this.$t('title'), trigger: 'change' }, + { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }, + ], + }, + disabled: false, + projectNameList: [], visible: false, dataSource: [], + deleteformtltle:'', confirmLoading: false, url: { list: 'params/report/page' @@ -134,6 +177,7 @@ } ], queryParam: {}, + deleteform:{}, areaVisible: false, paramsTemplateName: '', drawerVisible: false, @@ -145,24 +189,28 @@ }, methods: { handleCancel() { - this.areaVisible = false + this.deleteVisible = false + this.$refs.ruleForm.resetFields() }, handleSubmit() { - if (this.formInline.paramsTemplateName !== undefined) { - this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim() - } this.$refs.ruleForm.validate(valid => { if (valid) { - getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}¶msTemplateName=${this.formInline.paramsTemplateName}`, {}).then((res) => { - if (res.success) { - this.areaVisible = false - this.$message.success(res.message) - this.selectedRowKeys = [] - this.getList() - } else { - this.$message.warning(res.message) - } - }) + if(this.formInline.paramsTemplateName === this.deleteform.title){ + getAction('/params/report/delete', { + id: this.deleteform.id + }).then((res) => { + if (res.success) { + this.deleteVisible = false + this.$message.success(res.message) + this.getList() + } else { + this.$message.warning(res.message) + } + }) + }else{ + this.$message.warning(this.$t('confirmtitle')) + } + } }) }, @@ -226,6 +274,36 @@ this.queryParam[value] = id this.queryParam = { ...this.queryParam } }, + //删除 + onDelete(val) { + this.deleteform = val + this.deleteformtltle = val.title + this.formInline = {} + this.deleteVisible = true + this.titleDelete = this.$t('Deletetitle') + "'" + val.title + "'" + '?' + // let param = { + // id: val.id + // } + // this.$confirm({ + // title: this.$t('reportedDelete'), + // content: '', + // onOk: + // async () => { + // getAction(`sys/dict/logicDelete`, param).then(res => { + // if (res.success) { + // this.$message.success(this.$t('OperationSuccessful')) + // this.reFresh() + // if (this.tableData && this.tableData.length == 1 && this.queryParams.pageNo != 1) { + // this.queryParams.pageNo = this.queryParams.pageNo - 1 + // } + // this.loadData() + // } else { + // this.$message.warning(this.$t('operationFailed')) + // } + // }) + // } + // }) + }, getList() { let query = { pageNo: this.pageNo, @@ -264,12 +342,12 @@ } .title-text { - width: 20%; + /*width: 60%;*/ min-width: 110px; color: #000F16; display: inline-block; font-weight: 500; - font-size: 14px; + font-size: 16px; margin-right: 16px; margin-top: 3px; text-align: right; @@ -277,10 +355,23 @@ overflow: hidden; text-overflow: ellipsis; } - + .titletext{ + width: 460px; + min-width: 110px; + color: #000F16; + display: inline-block; + font-weight: 500; + font-size: 16px; + /*margin-right: 16px;*/ + /*margin-top: 3px;*/ + /*text-align: right;*/ + /*white-space: nowrap;*/ + overflow: hidden; + text-overflow: ellipsis; + } .box-input { display: inline-block; - width: 70%; + width: 213%; height: 38px; margin-top: 2px; } @@ -330,7 +421,8 @@ } .itemModel { - width: calc(100% - 130px); + /*width: calc(100% - 130px);*/ + width: 100%; display: inline-block; margin-top: 2px; } @@ -368,7 +460,11 @@ background: #fff!important; opacity: 0.9; } - + /deep/.ant-modal-title{ + font-weight: bold; + font-size: 18px; + letter-spacing: 1px; + } ::v-deep .ant-table-body { background: transparent!important; }