ysy před 2 roky
rodič
revize
55f1712bbf

+ 9 - 3
src/views/factoryModel/productionLine/index.vue

@@ -19,7 +19,8 @@
         </template>
 
         <template v-slot:factory="{ row }">
-          {{ showgfactory(row, 1) }}
+          <!-- {{ showgfactory(row, 1) }} -->
+          {{   pathFn(row.pathName) }}
         </template>
 
 
@@ -78,9 +79,10 @@ export default {
           slot: 'parent'
         },
         {
-          label: '所属工厂',
+          label: '所属工厂 - 厂房',
           prop: 'extInfo.factoryId',
-          slot: 'factory'
+          slot: 'factory',
+          width: 180
         },
 
         {
@@ -167,6 +169,10 @@ export default {
         return '';
       }
     },
+    pathFn(name) {
+        let arr = name.split('-')
+        return arr.slice(0,2).join('-')
+      },
     // 回显车间
     showWorkshop(row) {
       let result = row.parent.find((n) => n.id == row.parentId);

+ 3 - 0
src/views/factoryModel/workshop/components/edit.vue

@@ -57,6 +57,8 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
+
+   
           <el-form-item label="所属厂房:" prop="parentId" style="margin-bottom: 22px">
             <el-select
               v-model="form.parentId"
@@ -64,6 +66,7 @@
               placeholder="请选择所属厂房"
               style="width: 100%"
             >
+         
               <el-option
                 v-for="item in options_factory"
                 :key="item.id"

+ 8 - 2
src/views/factoryModel/workshop/index.vue

@@ -34,7 +34,8 @@
         </template>
 
         <template v-slot:factory="{ row }">
-          {{ showgfactory(row, 1) }}
+          <!-- {{ showgfactory(row, 1) }} -->
+          {{  pathFn(row.pathName) }}
         </template>
   
         <!-- 操作列 -->
@@ -108,7 +109,7 @@
            
           },
           {
-            label: '所属工厂',
+            label: '所属工厂 - 厂房',
             prop: 'parentId',
             slot: 'factory'
           },
@@ -183,6 +184,11 @@
           return '';
         }
       },
+
+      pathFn(name) {
+        let arr = name.split('-')
+        return arr.slice(0,2).join('-')
+      },
       // 获取工厂数据
       getFactoryarea () {
         let par = {