From 4d049a3c73cbfb4391185fdb5ecca0d4fac9faa2 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 04 三月 2025 10:48:18 +0800 Subject: [PATCH] 修改检验值中无对应的数据展示 --- src/views/business/inspectionTask/components/EditInspectionItem.vue | 56 ++++++++++++++++++++++---------------------------------- 1 files changed, 22 insertions(+), 34 deletions(-) diff --git a/src/views/business/inspectionTask/components/EditInspectionItem.vue b/src/views/business/inspectionTask/components/EditInspectionItem.vue index 9058ff0..b38e59c 100644 --- a/src/views/business/inspectionTask/components/EditInspectionItem.vue +++ b/src/views/business/inspectionTask/components/EditInspectionItem.vue @@ -6,20 +6,15 @@ width="80%" @close="editInspectionDia = false" > - <TableCard :showTitle="false"> - <template v-slot:table> - <lims-table - :column="editColumn" - :table-data="editTableData" - :table-loading="editLoading" - :page="page" - height="600" - style="padding: 0 15px" - @pagination="pagination" - > - </lims-table> - </template> - </TableCard> + <lims-table + :column="editColumn" + :table-data="editTableData" + :table-loading="editLoading" + :page="page" + height="560" + @pagination="pagination" + > + </lims-table> </el-dialog> <el-dialog :visible.sync="editAskDia" title="淇敼" width="50%"> <el-form ref="form" :model="editForm" label-width="100px"> @@ -38,10 +33,10 @@ style="width: 100%" > <el-option - v-for="item in inspectionValueTypeList" - :key="item.value" - :label="item.label" - :value="item.value" + v-for="dict in inspectionValueType" + :key="dict.value" + :label="dict.label" + :value="dict.value" ></el-option> </el-select> </el-form-item> @@ -60,7 +55,6 @@ </template> <script> -import TableCard from "@/components/TableCard/index.vue"; import limsTable from "@/components/Table/lims-table.vue"; import { selectSampleAndProductByOrderId, @@ -69,7 +63,7 @@ export default { name: "EditInspectionItem", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: { TableCard, limsTable }, + components: { limsTable }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { @@ -77,7 +71,6 @@ entity: { id: 0, }, - inspectionValueTypeList: [], // 妫�楠屽�肩被鍨嬩笅鎷夋 editColumn: [ { label: "鏍峰搧缂栧彿", @@ -164,7 +157,13 @@ inspectionValueType: "", }, handleEditLoading: false, + inspectionValueType: [], }; + }, + mounted() { + this.getDicts("inspection_value_type").then((response) => { + this.inspectionValueType = this.dictToValue(response.data); + }); }, // 鏂规硶闆嗗悎 methods: { @@ -182,9 +181,8 @@ }) .then((res) => { this.editLoading = false; - if (res.code === 201) return; - this.editTableData = res.data.body.records; - this.page.total = res.data.body.total; + this.editTableData = res.data.records; + this.page.total = res.data.total; }) .catch(() => { this.editLoading = false; @@ -193,7 +191,6 @@ // 淇敼寮规 editIns(row) { this.editAskDia = true; - this.selectEnumByCategoryForInspectionValueType(); this.editForm = { ...row }; }, // 鎻愪氦淇敼 @@ -222,15 +219,6 @@ this.page.current = page; this.page.size = limit; this.getTableData(); - }, - selectEnumByCategoryForInspectionValueType() { - this.$axios - .post(this.$api.enums.selectEnumByCategory, { - category: "妫�楠屽�肩被鍨�", - }) - .then((res) => { - this.inspectionValueTypeList = res.data; - }); }, }, }; -- Gitblit v1.9.3