yusheng 1 месяц назад
Родитель
Сommit
b4d7082762

+ 18 - 17
src/views/rulesManagement/recordPlan/components/programRulesDialog.vue

@@ -114,7 +114,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <!-- <el-col :span="8" v-if="addForm.type == 1">
+        <el-col :span="8" v-if="addForm.type == 1">
           <el-form-item label="场站" prop="productLineId">
             <el-select
               v-model="addForm.productLineId"
@@ -132,7 +132,8 @@
               </el-option>
             </el-select>
           </el-form-item>
-        </el-col> -->
+        </el-col>
+
         <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 0">
           <el-form-item label="部门" prop="groupId">
             <deptSelect
@@ -1540,21 +1541,21 @@
         const currentTeam = this.teamAllList.find(
           (item) => item.id === this.addForm.teamId
         );
-        // if (!init) {
-        //   this.addForm.productLineName = '';
-        //   this.addForm.productLineId = '';
-        // }
-        // this.productLineList = [];
-        // currentTeam.factoryWorkstationVOList.forEach((item) => {
-        //   if (
-        //     !this.productLineList.find((p) => p.id === item.productionLineId)
-        //   ) {
-        //     this.productLineList.push({
-        //       name: item.productionLineName,
-        //       id: item.productionLineId
-        //     });
-        //   }
-        // });
+        if (!init) {
+          this.addForm.productLineName = '';
+          this.addForm.productLineId = '';
+        }
+        this.productLineList = [];
+        currentTeam.factoryWorkstationVOList.forEach((item) => {
+          if (
+            !this.productLineList.find((p) => p.id === item.productionLineId)
+          ) {
+            this.productLineList.push({
+              name: item.productionLineName,
+              id: item.productionLineId
+            });
+          }
+        });
         if (currentTeam) {
           // 同步执行人
           this.addForm.executeUsers = [

+ 11 - 4
src/views/rulesManagement/recordPlan/index.vue

@@ -165,10 +165,17 @@
             showOverflowTooltip: true,
             minWidth: 110,
             formatter: (row) => {
-              return row.list
-                .map((i) => i.workshops.map((i) => i.workshopName))
-                .flat()
-                .join(',');
+              if (row.associatedObject == 1) {
+                return row.list
+                  .map((i) => i.workshops.map((i) => i.workshopName))
+                  .flat()
+                  .join(',');
+              } else {
+                return row.list
+                  .map((i) => i.deviceInfo.map((i) => i.name))
+                  .flat()
+                  .join(',');
+              }
             }
           },
           {