From 406ad2e52a8963f1748c399b0da9dfae8cd58b49 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期六, 16 三月 2024 11:08:41 +0800
Subject: [PATCH] 设备保养项目、计划修改

---
 jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue  |   25 ++++++++++++++++---------
 jcdm-ui/src/views/main/em/inspectionPlan/index.vue      |   12 +++++++++---
 jcdm-ui/src/components/inspectionPlanArchives/index.vue |    1 -
 3 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/jcdm-ui/src/components/inspectionPlanArchives/index.vue b/jcdm-ui/src/components/inspectionPlanArchives/index.vue
index cca1efe..49a0dad 100644
--- a/jcdm-ui/src/components/inspectionPlanArchives/index.vue
+++ b/jcdm-ui/src/components/inspectionPlanArchives/index.vue
@@ -130,7 +130,6 @@
           this.machineryList = response.rows;
           this.total = response.total;
           this.loading = false;
-
         },
       );
     },
diff --git a/jcdm-ui/src/views/main/em/inspectionPlan/index.vue b/jcdm-ui/src/views/main/em/inspectionPlan/index.vue
index 9d4346c..6ff1b90 100644
--- a/jcdm-ui/src/views/main/em/inspectionPlan/index.vue
+++ b/jcdm-ui/src/views/main/em/inspectionPlan/index.vue
@@ -94,7 +94,7 @@
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
-        <el-table border v-loading="loading" :data="inspectionPlanList" @selection-change="handleSelectionChange">
+        <el-table border v-loading="loading" :data="inspectionPlanList" @selection-change="handleSelectionChange" @inSelected="inMachineryAdd">
           <el-table-column type="selection" width="55" align="center" />
           <el-table-column label="璁″垝鍚嶇О" align="center" prop="planName">
           </el-table-column>
@@ -206,7 +206,7 @@
       </el-form>
       <el-tabs type="border-card" >
         <el-tab-pane label="璁惧娓呭崟" >
-          <Checkmachinery ref="machinerylist"></Checkmachinery>
+          <Checkmachinery ref="machinerylist"  ></Checkmachinery>
         </el-tab-pane>
         <el-tab-pane label="鐐规椤圭洰">
           <Checksubject ref="subjectlist"></Checksubject>
@@ -215,6 +215,7 @@
       <el-divider></el-divider>
         <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
         <el-button @click="cancel">鍙� 娑�</el-button>
+      <el-button type="primary" @click="cs">娴� 璇�</el-button>
     </el-dialog>
   </div>
 </template>
@@ -226,7 +227,7 @@
 
 export default {
   name: "InspectionPlan",
-  dicts: ['plan_status','plan_type'],
+  dicts: ['plan_status','plan_type','dimension'],
   components:{Checkmachinery,Checksubject},
   data() {
     return {
@@ -374,6 +375,10 @@
       };
       this.resetForm("form");
     },
+    /** 娴嬭瘯鎸夐挳 */
+    cs(){
+      this.$emit('inSelected',this.planCode);
+    },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;
@@ -425,6 +430,7 @@
           }
         }
       });
+
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete(row) {
diff --git a/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue b/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue
index e52b075..c082ea4 100644
--- a/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue
+++ b/jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue
@@ -23,7 +23,7 @@
         >鍒犻櫎</el-button>
       </el-col>
     </el-row>
-    <MachinerySelect ref="machinerySelect" @onSelected="onMachineryAdd"></MachinerySelect>
+    <MachinerySelect ref="machinerySelect" @onSelected="onMachineryAdd" ></MachinerySelect>
     <el-table v-loading="loading" :data="checkmachineryList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="璁惧缂栫爜" align="center" prop="equipmentCode" />
@@ -114,14 +114,21 @@
       this.$refs.machinerySelect.showFlag = true;
     },
       //璁惧璧勬簮閫夋嫨鍥炶皟
-    onMachineryAdd(rows){
-      if(rows !=null && rows.length >0){
-         rows.forEach(row => {
-            row.planId = this.planId;
-           addInspectionPlanArchives(row).then(response =>{
-              this.getList();
-            });
-         });
+    // onMachineryAdd(rows){
+    //   if(rows !=null && rows.length >0){
+    //      rows.forEach(row => {
+    //         row.planId = this.planId;
+    //        addInspectionPlanArchives(row).then(response =>{
+    //           this.getList();
+    //         });
+    //      });
+    //   }
+    // },
+    onMachineryAdd(selectedRows){
+      if(selectedRows !=null && selectedRows.length >0){
+        this.checkmachineryList.spareField1 = this.planCode
+        this.checkmachineryList = selectedRows
+        console.log(this.checkmachineryList)
       }
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */

--
Gitblit v1.9.3