Browse Source

修改线条高度设置-搜索-工艺属性更换后分类没清空 ---cjh

17767204043 3 năm trước cách đây
mục cha
commit
824be55c15
1 tập tin đã thay đổi với 17 bổ sung15 xóa
  1. 17 15
      src/views/BasicSettings/PartSettings/list.vue

+ 17 - 15
src/views/BasicSettings/PartSettings/list.vue

@@ -5,7 +5,7 @@
         >新增方案</Button
       >
     </Toptitle>
-    <Row style="padding:10px 0">
+    <Row style="padding: 10px 0">
       <Col span="6">
         <span>工艺属性:</span>
         <span>
@@ -75,7 +75,7 @@
       </Col>
     </Row>
     <div>
-      <div style="height:600px">
+      <div style="height: 600px">
         <Table
           :columns="tableColumns"
           border
@@ -84,10 +84,10 @@
         >
           <template slot="setSlot" slot-scope="{ row }">
             <div>
-              <a style="margin:0 5px;" @click="handleSet(row, 1)">复制</a>
-              <a style="margin:0 5px;" @click="handleSet(row, 2)">编辑</a>
-              <a style="margin:0 5px;" @click="handleSet(row, 3)">查看</a>
-              <a style="margin:0 5px;" @click="handleSet(row, 4)">删除</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 1)">复制</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 2)">编辑</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 3)">查看</a>
+              <a style="margin: 0 5px" @click="handleSet(row, 4)">删除</a>
             </div>
           </template>
         </Table>
@@ -169,16 +169,18 @@ export default {
         });
     },
     handleProcessSelected(p_id) {
-      p_id &&
-        this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
-          this.searchData.type_title= '';
-          res.data.forEach(element => {
-            if(element){
-              this.type_title_list.push(element);
-            }
+      this.type_title_list = [];
+      if (p_id.length > 0) {
+        p_id &&
+          this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
+            this.searchData.type_title = "";
+            res.data.forEach((element) => {
+              if (element) {
+                this.type_title_list.push(element);
+              }
+            });
           });
-          
-        });
+      }
     },
     changeSize(e) {
       this.searchData.page_size = e;