ysy пре 2 година
родитељ
комит
86cda17dd1

+ 13 - 15
src/views/material/product/index.vue

@@ -6,19 +6,18 @@
         allow-collapse
         :right-style="{ overflow: 'hidden' }"
       >
-       
-          <div class="ele-border-lighter sys-organization-list">
-            <el-tree
-              :data="treeList"
-              :props="defaultProps"
-              ref="treeRef"
-              :default-expanded-keys="current && current.id ? [current.id] : []"
-              :highlight-current="true"
-              node-key="id"
-              @node-click="handleNodeClick"
-            ></el-tree>
-          </div>
-       
+        <div class="ele-border-lighter sys-organization-list">
+          <el-tree
+            :data="treeList"
+            :props="defaultProps"
+            ref="treeRef"
+            :default-expanded-keys="current && current.id ? [current.id] : []"
+            :highlight-current="true"
+            node-key="id"
+            @node-click="handleNodeClick"
+          ></el-tree>
+        </div>
+
         <template v-slot:content>
           <div class="ele-border-lighter form-content" v-loading="loading">
             <div class="form-wrapper">
@@ -89,7 +88,6 @@
         </template>
       </ele-split-layout>
     </el-card>
-    
   </div>
 </template>
 <script>
@@ -140,7 +138,7 @@ export default {
         node = node?.parent;
       }
 
-      return (str.substring(str, str.length - 1))
+      return str.substring(str, str.length - 1);
       // return (
       //   str.substring(str, str.length - 1) +
       //   `(${codeStr.substring(str, str.length - 1)})`

+ 7 - 12
src/views/workforceManagement/team/components/edit.vue

@@ -35,10 +35,10 @@
             </el-form-item>
           </el-col>
           <el-col :span="8" style="margin-bottom: 22px">
-            <el-form-item label="工作中心:" prop="workStationIds">
+            <el-form-item label="工作中心:" prop="workCenterIds">
               <div class="location-warp">
-                <el-select v-model="form.workStationIds" multiple filterable placeholder="请选择" style="width: 100%">
-                  <el-option v-for="item in options.workStationIds" :key="item.value" :label="item.label"
+                <el-select v-model="form.workCenterIds" multiple filterable placeholder="请选择" style="width: 100%">
+                  <el-option v-for="item in options.workCenterIds" :key="item.value" :label="item.label"
                     :value="item.value">
                   </el-option>
                 </el-select>
@@ -83,7 +83,7 @@ export default {
         productionLineId: [],
         userIds: '',
         userNumber: '',
-        workStationIds: [],
+        workCenterIds: [],
         workshopId: []
       };
     };
@@ -106,7 +106,7 @@ export default {
       options: {
         workshopId: [],
         productionLineId: [],
-        workStationIds: []
+        workCenterIds: []
       }
     };
   },
@@ -137,12 +137,7 @@ export default {
             this.form[key] = row[key];
           }
         }
-        // 工位反显
-        if (row.workStationList.length > 0) {
-          this.form.workStationIds = row.workStationList.map(
-            (n) => n.workstationId
-          );
-        }
+
         // 人员反显
         this.$nextTick(() => {
           if (row.userVOList) {
@@ -236,7 +231,7 @@ export default {
     // 获取工位
     getlistByProductionLineId() {
       return work.list({pageNum: 1,  size: -1}).then((res) => {
-        this.options.workStationIds = res.list.map((n) => {
+        this.options.workCenterIds = res.list.map((n) => {
           return {
             value: n.id,
             label: n.name