From c34fe6f588045e527bccfd4c67b9764b2a141ea2 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期三, 26 二月 2025 15:24:41 +0800 Subject: [PATCH] 设施和环境条件代码迁移 --- src/views/CNAS/process/demand/Edit.vue | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/views/CNAS/process/demand/Edit.vue b/src/views/CNAS/process/demand/Edit.vue index b9223b4..46f3efa 100644 --- a/src/views/CNAS/process/demand/Edit.vue +++ b/src/views/CNAS/process/demand/Edit.vue @@ -16,13 +16,15 @@ :page="page" /> </el-dialog> - <AddContracts ref="addContractsRef" /> + <AddContracts ref="addContractsRef" :operationType="operationType" /> </div> </template> <script> import limsTable from "@/components/Table/lims-table.vue"; import AddContracts from "./AddContracts.vue"; + import { getInsOrderOnInspection } from "@/api/cnas/process/demand/demand.js" + export default { name: 'EditDemand', components: { @@ -33,6 +35,7 @@ return { visible: false, search: {}, + operationType: '', column: [ { label: '搴忓彿', minWidth: '100px' }, { label: '濮旀墭缂栧彿', minWidth: '100px' }, @@ -46,7 +49,8 @@ name: "鏂板濮旀墭鍗�", type: "text", clickFun: (row) => { - this.$refs.addContractsRef.open() + this.operationType = 'add' + this.$refs.addContractsRef.open(row) } } ], @@ -60,9 +64,25 @@ }, } }, + // 鎵撳紑寮圭獥 methods: { - open() { + open(type) { this.visible = true + this.operationType = type + this.getTableData() + }, + openAddContracts(row) { + this.operationType = 'edit' + this.$refs.addContractsRef.open(row) + }, + async getTableData() { + // 鏌ヨ褰撳墠寮圭獥琛ㄦ暟鎹� + const { code, data } = await getInsOrderOnInspection({ + ...this.search, ...this.page + }) + if (code === 200) { + this.tableData = data + } } } } -- Gitblit v1.9.3