From 8696b4d4c235a73f2bc5c030e20f1ad7c0a7166e Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 25 二月 2025 14:25:51 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- 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