From 7c0cc6e8f2aa76769fda77b37ca02964a3dc88f8 Mon Sep 17 00:00:00 2001 From: liyawei Date: Tue, 13 Sep 2022 10:48:25 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=BA=93-=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ParamsReportEOController.java | 31 ++++++++-------- .../IParamsReportConfigDataEOService.java | 7 ++++ .../service/IParamsReportDetailEOService.java | 2 ++ .../service/IParamsReportEOService.java | 2 +- .../IParamsReportExportHistoryEOService.java | 2 ++ .../ParamsReportConfigDataEOServiceImpl.java | 7 ++++ .../impl/ParamsReportDetailEOServiceImpl.java | 13 +++++++ .../impl/ParamsReportEOServiceImpl.java | 36 +++++++++++++++++-- ...aramsReportExportHistoryEOServiceImpl.java | 16 ++++++--- 9 files changed, 95 insertions(+), 21 deletions(-) diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java index 7307250e9..28d1194ec 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/controller/ParamsReportEOController.java @@ -101,6 +101,23 @@ public class ParamsReportEOController extends JeroController delete(@RequestParam(name="id",required=true) String id) { + boolean isSuccess = paramsReportEOService.deleteById(id); + if (isSuccess) { + return Result.OK("删除成功!"); + } else { + return Result.error("删除失败!"); + } + } @@ -147,20 +164,6 @@ public class ParamsReportEOController extends JeroController delete(@RequestParam(name="id",required=true) String id) { - paramsReportEOService.deleteById(id); - return Result.OK("删除成功!"); - } - /** * 批量删除 * diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java index dc3818c1d..e4b308c54 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportConfigDataEOService.java @@ -30,4 +30,11 @@ public interface IParamsReportConfigDataEOService extends IService queryListByConfigIdList(List configIdList); + + /** + * 批量删除清单的所有配置数据 + * @param paramsReportDetailIdList + * @return + */ + int deleteByParamsReportDetailIdList(List paramsReportDetailIdList); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java index 9f377b597..7dece4f71 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportDetailEOService.java @@ -59,4 +59,6 @@ public interface IParamsReportDetailEOService extends IService> configDataList, String paramsManifestId); + // 删除 + boolean deleteByIds(List ids); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java index 51f147836..6c2c6bcac 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportEOService.java @@ -36,7 +36,7 @@ public interface IParamsReportEOService extends IService { * @param id * @return */ - void deleteById(String id); + boolean deleteById(String id); /** * 批量删除 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportExportHistoryEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportExportHistoryEOService.java index c69874c9c..a9e55f27a 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportExportHistoryEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/IParamsReportExportHistoryEOService.java @@ -61,4 +61,6 @@ public interface IParamsReportExportHistoryEOService extends IService queryList(); IPage queryPage(IPage page, ParamsReportExportHistoryEO paramsReportExportHistoryEO, String cut); + + void deleteByParamsManifestId(String paramsManifestId); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java index cce1ae4ed..5396e71ab 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportConfigDataEOServiceImpl.java @@ -55,4 +55,11 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl paramsReportDetailIdList) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(ParamsReportConfigDataEO::getParamsCollectManifestId, paramsReportDetailIdList); + return baseMapper.delete(queryWrapper); + } + } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index 2e219d6ab..4879c80b5 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -1711,6 +1711,19 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl ids) { + // 关联删除配置数据 + paramsReportConfigDataEOService.deleteByParamsReportDetailIdList(ids); + return removeByIds(ids); + } + /** * 实体对象转成Map * @param obj 实体对象 diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java index 76c937679..a3d285a7a 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportEOServiceImpl.java @@ -6,9 +6,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.modules.cert.collect.mapper.ParamsManifestEOMapper; import com.jero.modules.cert.collect.vo.ParamsManifestVO; +import com.jero.modules.cert.report.entity.ParamsReportConfigEO; +import com.jero.modules.cert.report.entity.ParamsReportDetailEO; import com.jero.modules.cert.report.entity.ParamsReportEO; +import com.jero.modules.cert.report.mapper.ParamsReportConfigEOMapper; import com.jero.modules.cert.report.mapper.ParamsReportEOMapper; +import com.jero.modules.cert.report.service.IParamsReportDetailEOService; import com.jero.modules.cert.report.service.IParamsReportEOService; +import com.jero.modules.cert.report.service.IParamsReportExportHistoryEOService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -32,6 +37,15 @@ public class ParamsReportEOServiceImpl extends ServiceImpl configEOQueryWrapper = new LambdaQueryWrapper<>(); + configEOQueryWrapper.eq(ParamsReportConfigEO::getParamsManifestId, id); + paramsReportConfigEOMapper.delete(configEOQueryWrapper); + + // 关联删除收集的参数项(包含配置数据) + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsReportDetailEO::getParamsManifestId, id); + List paramsReportDetailEOList = paramsReportDetailEOService.list(queryWrapper); + if (CollectionUtil.isNotEmpty(paramsReportDetailEOList)) { + List paramsReportDetailIdList = paramsReportDetailEOList.stream().map(ParamsReportDetailEO::getId).collect(Collectors.toList()); + paramsReportDetailEOService.deleteByIds(paramsReportDetailIdList); + } + + // 关联删除导出历史 + paramsReportExportHistoryEOService.deleteByParamsManifestId(id); + + return removeById(id); } /** diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportExportHistoryEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportExportHistoryEOServiceImpl.java index f4444d91a..a296e3492 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportExportHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportExportHistoryEOServiceImpl.java @@ -1,7 +1,9 @@ package com.jero.modules.cert.report.service.impl; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.modules.cert.report.entity.ParamsReportExportHistoryEO; import com.jero.modules.cert.report.enums.ExportTypeEnum; import com.jero.modules.cert.report.mapper.ParamsReportExportHistoryEOMapper; @@ -10,11 +12,10 @@ import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.List; -import java.util.Date; -import java.util.Map; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * @Description: 上报库导出历史 @@ -119,4 +120,11 @@ public class ParamsReportExportHistoryEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsReportExportHistoryEO::getParamsManifestId, paramsManifestId); + paramsReportExportHistoryEOMapper.delete(queryWrapper); + } } From 96740e313e0e61c62fb2ccedeac33b7c3596a87b Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 13 Sep 2022 11:37:57 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=BA=93=E5=88=A0?= =?UTF-8?q?=E9=99=A4=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; } From a5fafde7c2e465c05441c62d335c80a8052de638 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 13 Sep 2022 14:55:57 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86=E6=B8=85=E5=8D=95=20=E6=88=AA?= =?UTF-8?q?=E6=AD=A2=E6=97=B6=E9=97=B4=E5=BC=B9=E6=A1=86=20=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8F=82=E6=95=B0=E6=B8=85=E5=8D=95=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE=E6=97=A0=E5=8F=8D=E5=BA=94?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TaskCutOffTime/index.vue | 49 ++++++++++++----- .../components/TaskCutOffTime/indexonekey.vue | 49 ++++++++++++----- .../src/components/tableCollection/index.vue | 54 ++++++++++++++++++- .../ParameterItemCollectionList.vue | 21 ++++---- .../dialog/ProjectCollectionParameters.vue | 5 +- 5 files changed, 137 insertions(+), 41 deletions(-) diff --git a/jero-web/src/components/TaskCutOffTime/index.vue b/jero-web/src/components/TaskCutOffTime/index.vue index 69b6313b3..513d2861f 100644 --- a/jero-web/src/components/TaskCutOffTime/index.vue +++ b/jero-web/src/components/TaskCutOffTime/index.vue @@ -1,4 +1,13 @@