hdy
2024-03-16 406ad2e52a8963f1748c399b0da9dfae8cd58b49
设备保养项目、计划修改
已修改3个文件
38 ■■■■■ 文件已修改
jcdm-ui/src/components/inspectionPlanArchives/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/em/inspectionPlan/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/em/inspectionPlan/machinery.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/components/inspectionPlanArchives/index.vue
@@ -130,7 +130,6 @@
          this.machineryList = response.rows;
          this.total = response.total;
          this.loading = false;
        },
      );
    },
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) {
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)
      }
    },
    /** 删除按钮操作 */