From 2bfe437d8b30fb7d80a38875b00ebf2b222ea05f Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 17 三月 2025 17:54:03 +0800
Subject: [PATCH] 完成车间管理

---
 src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
index e92119c..3a8bfe1 100644
--- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/testObjectEditForm.vue
@@ -1,10 +1,12 @@
 <template>
   <div>
-    <el-dialog :title="operationType === 'add' ? '鏂板' : '缂栬緫'" :visible.sync="editFormDia" width="500px" @close="closeDia">
+    <el-dialog :title="operationType === 'add' ? '鏂板' : '缂栬緫'" :visible.sync="editFormDia" width="500px"
+      @close="closeDia">
       <el-form ref="editForm" :model="editForm" :rules="editFormRules" label-width="120px" label-position="right">
         <el-form-item label="鍦烘墍锛�" prop="laboratoryId">
           <el-select v-model="editForm.laboratoryId" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
-            <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label"
+              :value="item.value"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="妫�楠屽璞★細" prop="specimenName">
@@ -18,7 +20,8 @@
         </el-form-item>
         <el-form-item label="瀵硅薄绫诲瀷锛�" prop="objectType">
           <el-select v-model="editForm.objectType" clearable placeholder="璇烽�夋嫨" size="small" style="width: 100%">
-            <el-option v-for="item in dict.type.object_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            <el-option v-for="item in dict.type.product_classification" :key="item.value" :label="item.label"
+              :value="item.value"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -32,13 +35,13 @@
 
 <script>
 
-import {obtainItemParameterList} from "@/api/structural/laboratoryScope";
-import {addTestObject, upTestObject} from "@/api/structural/capability";
+import { obtainItemParameterList } from "@/api/structural/laboratoryScope";
+import { addTestObject, upTestObject } from "@/api/structural/capability";
 
 export default {
   name: "EditForm",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
-  dicts: ['object_type'],
+  dicts: ['product_classification'],
   components: {},
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
@@ -70,22 +73,22 @@
   },
   // 鏂规硶闆嗗悎
   methods: {
-    openDia (type, row) {
+    openDia(type, row) {
       this.operationType = type
       this.obtainItemParameterList()
       this.editFormDia = true
       if (type === 'add') {
         this.resetForm("editForm");
       } else {
-        this.editForm = {...row}
+        this.editForm = { ...row }
       }
     },
     // 鎻愪氦缂栬緫
-    handleEdit () {
+    handleEdit() {
       this.$refs.editForm.validate(valid => {
         if (valid) {
           this.editLoad = true
-          if(this.editForm.id){
+          if (this.editForm.id) {
             // 淇敼
             upTestObject(this.editForm).then(res => {
               this.editLoad = false
@@ -98,7 +101,7 @@
             }).catch(e => {
               this.editLoad = false
             })
-          }else{
+          } else {
             // 鏂板
             addTestObject(this.editForm).then(res => {
               this.editLoad = false
@@ -116,7 +119,7 @@
       })
     },
     // 鍏抽棴寮规
-    closeDia () {
+    closeDia() {
       this.editFormDia = false
       this.resetForm("editForm");
     },
@@ -137,6 +140,4 @@
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

--
Gitblit v1.9.3