From fca971fa37ee9ad65bee850c78531d5d983aa52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Fri, 7 Jul 2023 16:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/basic-page.js | 2 +- .../basic/components/showProductList.vue | 14 +++- .../mutual/components/approvalProcess-add.vue | 64 ++++++++++++++++--- .../approvalProcessConfiguration-add.vue | 8 +-- .../components/approvalProcessSearch.vue | 14 ++-- .../modules/mutual/components/description.vue | 6 +- .../modules/mutual/qmsApprovalProcess.vue | 8 +-- .../qmsApprovalProcessConfiguration.vue | 10 ++- ...msApprovalDispositionTeamConfiguration.vue | 4 +- 9 files changed, 95 insertions(+), 35 deletions(-) diff --git a/src/mixins/basic-page.js b/src/mixins/basic-page.js index c9d1a9d..192e1ae 100644 --- a/src/mixins/basic-page.js +++ b/src/mixins/basic-page.js @@ -31,7 +31,7 @@ export default { created() { }, activated() { - this.getDataList(); + this.getDataList() }, methods: { // 获取数据列表 diff --git a/src/views/modules/basic/components/showProductList.vue b/src/views/modules/basic/components/showProductList.vue index 9d78cd9..65618a7 100644 --- a/src/views/modules/basic/components/showProductList.vue +++ b/src/views/modules/basic/components/showProductList.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-01-04 10:29:40 * @LastEditors: zhp - * @LastEditTime: 2023-06-30 16:39:46 + * @LastEditTime: 2023-07-07 13:51:05 * @Description: --> @@ -34,12 +37,10 @@ import debounce from "lodash/debounce" import inputArea from './inputArea' import selectArea from './selectArea' import i18n from "@/i18n" -import { kStringMaxLength } from "buffer" const tableProps = [ { prop: 'step', label: i18n.t("disqualification.step"), - subcomponent: inputArea }, { prop: 'teamId', @@ -47,6 +48,12 @@ const tableProps = [ subcomponent: selectArea } ] +const tableBtn = [ + { + type: "delete", + btnName: "删除", + }, +]; export default { // mixins: [basicAdd], data() { @@ -58,10 +65,12 @@ export default { stepDetailPageURL: "/nonconform/qmsApprovalProcessStepDetail/page", }, supplierList:[], - productList:[], + productList: [], + tableBtn, typeList: [], teamList: [], - tableData:[], + tableData: [], + editShow:false, listQuery: { limit: 999, page: 1, @@ -117,6 +126,30 @@ export default { }, }, methods: { + handleClick(val) { + console.log(val); + if (val.type === "delete") { + this.$confirm(`确定对[名称=${val.data.step}]进行删除操作?`, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$nextTick(() => { + for (let i = 0; i < this.tableData.length; i++) { + console.log(); + if (this.tableData[i].step === val.data.step) { + this.tableData.splice(i, 1) + } + } + for (let i = val.data.step - 1; i < this.tableData.length; i++) { + this.tableData[i].step = i + 1 + } + }) + }) + .catch(() => { }) + } + }, inputChange(val) { console.log('=======') console.log(val) @@ -126,14 +159,25 @@ export default { emitButtonClick() { console.log('emitButtonClick') let obj = {} - for (let i of this.tableProps) { - obj[i.prop] = '' + // for (let i of this.tableProps) { + // console.log(i.prop) + // obj[i.prop] = '' + // } + if (this.tableData.length !== 0) { + obj['step'] = this.tableData[this.tableData.length - 1].step + 1 + obj['teamId'] = '' + } else { + for (let i = 0; i <= this.tableData.length; i++) { + obj['step'] = i + 1 + obj['teamId'] = '' + } } this.tableData.push(obj) // this.dataForm.qmsApprovalProcessStepDetailDTOList.push(obj) // console.log(this.dataForm) }, - init(id, ) { + init(id, flag) { + this.editShow = flag || false this.dataForm.id = id || "" this.listQuery.approvalProcessId = id || "" this.editData.id = id || "" diff --git a/src/views/modules/mutual/components/approvalProcessConfiguration-add.vue b/src/views/modules/mutual/components/approvalProcessConfiguration-add.vue index 85ded78..0050297 100644 --- a/src/views/modules/mutual/components/approvalProcessConfiguration-add.vue +++ b/src/views/modules/mutual/components/approvalProcessConfiguration-add.vue @@ -1,7 +1,7 @@ @@ -27,8 +27,8 @@ - + @@ -198,7 +198,7 @@ export default { }) .then(({ data: res }) => { if (res.code === 0) { - console.log(res.data); + console.log(res.data,'11111111111'); this.approvalProcessList= res.data.list } }) diff --git a/src/views/modules/mutual/components/approvalProcessSearch.vue b/src/views/modules/mutual/components/approvalProcessSearch.vue index 83c33ed..74afa4e 100644 --- a/src/views/modules/mutual/components/approvalProcessSearch.vue +++ b/src/views/modules/mutual/components/approvalProcessSearch.vue @@ -2,17 +2,17 @@ * @Author: zwq * @Date: 2023-01-04 10:29:40 * @LastEditors: zhp - * @LastEditTime: 2023-04-13 15:03:39 + * @LastEditTime: 2023-07-07 09:16:23 * @Description: -->