From 533790f24c899bc67d025e1de9dbda622ece2bfe Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Tue, 14 Apr 2026 15:48:47 +0800 Subject: [PATCH] seo --- src/components/common/AcceptTemplate.vue | 3 +- src/components/common/PreAsbitem.vue | 289 +++++++++--------- .../basic-dictionary/acceptTempPlateList.vue | 100 +++--- 3 files changed, 201 insertions(+), 191 deletions(-) diff --git a/src/components/common/AcceptTemplate.vue b/src/components/common/AcceptTemplate.vue index d4013f8..309ea78 100644 --- a/src/components/common/AcceptTemplate.vue +++ b/src/components/common/AcceptTemplate.vue @@ -123,7 +123,7 @@ export default { //挂载组件完成 mounted() { - + this.getAcceptTempPalte(this.refParams.id) }, computed: { @@ -176,6 +176,7 @@ export default { postapi(url, this.form) .then(res => { if (res.code > -1) { + this.$message.success({showClose:true,message:'操作成功!'}) if (!this.form.id && res.data?.id) this.form.id = res.data.id } }) diff --git a/src/components/common/PreAsbitem.vue b/src/components/common/PreAsbitem.vue index 9cc9542..1634ca9 100644 --- a/src/components/common/PreAsbitem.vue +++ b/src/components/common/PreAsbitem.vue @@ -4,25 +4,23 @@
- 项目类别 + 项目类别 + :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" popper-class="example" + @change="getAsbItemByItemType" size="small" ref="itemTypeIds">
- - - + +
@@ -30,87 +28,81 @@
- 添加 + 添加
- 全部添加 + 全部添加
- 移除 + 移除
- 全部移除 -
+ 全部移除 +
- 快速选择 - 快速选择 +
- + - - + +
-
+
确定
- + diff --git a/src/views/basic-dictionary/acceptTempPlateList.vue b/src/views/basic-dictionary/acceptTempPlateList.vue index 84242b7..4b183dd 100644 --- a/src/views/basic-dictionary/acceptTempPlateList.vue +++ b/src/views/basic-dictionary/acceptTempPlateList.vue @@ -12,7 +12,7 @@
+ :height="window.pageHeight < 600 ? 480 : window.pageHeight - 130" ref="refIdAcceptTempPlate"> @@ -65,12 +65,12 @@ 取消
--> - + - + @@ -88,6 +88,7 @@ import { } from "../../request/systemapi"; import { postapi } from "@/api/api"; import AcceptTemplate from "@/components/common/AcceptTemplate.vue"; +import { arrayExistObj } from "@/utlis/proFunc"; export default { components: { @@ -96,11 +97,11 @@ export default { data() { return { isshow: true, - + tableData: [], initTableData: [], curRow: {}, - + clickTime1: 0, clickTime2: 0, @@ -118,7 +119,7 @@ export default { this.rowDrop(); }, computed: { - ...mapState(["window","dialogWin"]), + ...mapState(["window", "dialogWin"]), }, methods: { @@ -128,15 +129,16 @@ export default { //this.acceptTemplateParams.id = this.curRow.id || '' this.acceptTemplateParams.brushTimes++ }, - + //点击列表通过id查询 rowick(row) { this.clickTime1 = new Date().getTime(); - setTimeout(() => { - if (this.clickTime1 > this.clickTime2) { - this.curRow = { ...row }; - } - }, 400); + this.curRow = row + // setTimeout(() => { + // if (this.clickTime1 > this.clickTime2) { + // this.curRow = { ...row }; + // } + // }, 400); }, dblClick(row) { this.clickTime2 = new Date().getTime(); @@ -266,55 +268,71 @@ export default { //删除 btnDel() { - this.form = { ...this.curRow }; - if (this.form.id == undefined) { + if (!this.curRow.id) { this.$message.warning("请选择删除的数据"); - } else { - this.$confirm("是否确认删除,是否继续", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - cancelButtonClass: "difference", - confirmButtonClass: "commonbutton" - }) - .then(() => { - deletecol(this.form.id).then((res) => { - if (res.code != -1) { - this.curRow = this.$options.data().curRow - this.getlist(); - //this.$message.success('删除成功') - } - }); - }) - .catch(() => { }); - // deletecol(this.form.id).then((res) => { - // console.log("删除成功"); - // this.getlist(); - // }); + return } + + + this.$confirm("是否确认删除,是否继续", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + cancelButtonClass: "difference", + confirmButtonClass: "commonbutton" + }) + .then(() => { + return postapi('/api/app/InformedConsentTemplate/Delete',{informedConsentTemplateId:this.curRow.id}) + }) + .then(res => { + if(res.code > -1){ + this.$message.success({showClose:true,message:'操作成功!'}) + let lfind = arrayExistObj(this.tableData,'id',this.curRow.id) + if(lfind > -1){ + this.tableData.splice(lfind,1) + this.curRow = {} + } + } + }) + .catch(() => { }); + + }, //btnEdit编辑弹框 btnEdit() { - if(!this.curRow?.id){ - this.$message.warning({showClose:true,message:'没有选择操作的模板'}) + if (!this.curRow?.id) { + this.$message.warning({ showClose: true, message: '没有选择操作的模板' }) return } this.acceptTemplateParams.id = this.curRow.id this.dispAcceptTemplate() }, - + //新增弹框 btnAdd() { this.acceptTemplateParams.id = '' - this.dispAcceptTemplate() + this.dispAcceptTemplate() }, // getlist(id) { + console.log('getlist',id) + this.tableData = [] + this.curRow = {} postapi('/api/app/InformedConsentTemplate/GetList') .then(res => { - if (res.code > -1) { + if (res.code > -1) { this.tableData = res.data; + // id 有值时,选中行 + if(id){ + let lfind = arrayExistObj(this.tableData,'id',id) + if(lfind > -1){ + this.curRow = this.tableData[lfind] + this.$refs.refIdAcceptTempPlate.setCurrentRow(this.curRow); + } + // this.$refs.multipleTable.toggleRowSelection(row); + // this.$refs.multipleTable.clearSelection(); + } } }) },