From e5b9da3aee25769bc19a7982a7a8fc5886a56f15 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期二, 19 九月 2023 12:38:16 +0800
Subject: [PATCH] 	modified:   src/components/view/Processingproducts.vue 	modified:   src/components/view/sale.vue 	modified:   src/main.js

---
 src/components/view/technology.vue |   63 +++++++++++++++++++++----------
 1 files changed, 42 insertions(+), 21 deletions(-)

diff --git a/src/components/view/technology.vue b/src/components/view/technology.vue
index 79a2d1b..57f1880 100644
--- a/src/components/view/technology.vue
+++ b/src/components/view/technology.vue
@@ -172,7 +172,7 @@
           :data="towTree"
           ref="tree"
           :props="{ children: 'children', label: 'father' }"
-          node-key="name"
+          node-key="father"
           default-expand-all
           @node-click="handleNodeClick"
           :key="upIndex"
@@ -280,7 +280,11 @@
             >鍏冧欢:</el-col
           >
           <el-col :span="16" :offset="1">
-            <el-select
+            <el-input v-model="cell"
+             placeholder="璇疯緭鍏ュ厓浠跺悕绉�"
+             style="width: 200px">
+            </el-input>
+            <!-- <el-select
               v-model="cell"
               style="width: 310px"
               disabled
@@ -294,7 +298,7 @@
                 :value="item.id"
               >
               </el-option>
-            </el-select>
+            </el-select> -->
           </el-col>
         </el-row>
         <el-row style="line-height: 46px">
@@ -350,7 +354,7 @@
               <el-select
                 v-model="form.type"
                 placeholder="璇烽�夋嫨"
-                style="width: 480px"
+                style="width: 100%"
                 @change="edittype"
               >
                 <el-option label="姗¤兌杩炴帴鍣�" :value="0"></el-option>
@@ -367,8 +371,9 @@
                 allow-create
                 filterable
                 @create=""
+               
                 placeholder="璇烽�夋嫨"
-                style="width: 480px"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in procedure"
@@ -385,7 +390,7 @@
               <el-select
                 v-model="form.deviceGroup"
                 placeholder="璇烽�夋嫨"
-                style="width: 480px"
+                style="width: 100%"
               >
                 <el-option
                   v-for="item in equipment"
@@ -398,10 +403,10 @@
             </template>
           </el-form-item>
           <el-row>
-            <el-col :span="10">
+            <el-col :span="12">
               <el-form-item label="鍏冧欢">
                 <template>
-                  <el-input v-model="form.elementId" placeholder="璇疯緭鍏ュ厓浠跺悕绉�" style="width: 200px"></el-input>
+                  <el-input v-model="form.elementId" placeholder="璇疯緭鍏ュ厓浠跺悕绉�" style="width: 100%"></el-input>
                   <!-- <el-select
                     v-model="form.elementId"
                     multiple
@@ -419,9 +424,9 @@
                 </template>
               </el-form-item>
             </el-col>
-            <el-col :span="10" :offset="2">
+            <el-col :span="12">
               <el-form-item label="宸ヨ壓鍚嶇О">
-                <el-input v-model="form.name" style="width: 200px"></el-input>
+                <el-input placeholder="璇疯緭鍏ュ伐鑹哄悕绉�" v-model="form.name" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -616,7 +621,6 @@
       this.$axios
         .post(
           this.$api.url.addTechTemp,
-
           {
             deviceGroup: this.form.deviceGroup,
             // elementId: JSON.stringify(this.form.elementId).replace("[","").replace("]",""),
@@ -654,7 +658,9 @@
         // console.log(this.equipment);
       });
     },
-
+    // onTypeBlur(e) {
+    // if (e.target.value) {
+    // this.type = e.target.value;}},
     //宸ュ簭
     chooseTech() {
       this.$axios.get(this.$api.url.chooseTech,{
@@ -702,7 +708,8 @@
           this.$api.url.writeTechById + `?id=${this.upData.id}`,
             {
                 deviceGroup: this.upData.device_group,
-                elementId:this.cell.join(','),
+                element:JSON.stringify(this.cell.split(',')),
+                // element:JSON.stringify(this.form.elementId.split(','))
                 father: this.edit.father,
                 name: this.edit.name,
                 type: this.edit.type
@@ -863,19 +870,34 @@
         })
         .then((res) => {
           this.edit = res.data[0];
-          console.log(this.edit.children);
-          this.cell = this.edit.children.map(el => {
-					return el.id
-				})
-          // this.cell = this.cell.join(',')
-          // this.cell = nn
-          // console.log(this.cell);
+          this.cell = this.edit.element
+          console.log(this.cell);
+          let cc = JSON.parse(this.cell).join(",")
+          console.log(cc);
+          this.cell = cc
+          console.log(this.cell);
+        //   this.cell = this.edit.children.map(el => {
+				// 	return el.id
+				// })
+        //   this.cell = this.cell.join(',')
+        //   this.cell = nn
+        //   console.log(this.cell);
+
+
+
+          //  let cc = this.edit.element.join(", ")
+          //  let str = cc.join(", ");
+            // let cc = JSON.parse(this.edit.element)
+            // console.log(cc);
+            // console.log(gg);
+            // console.log(json.parse(gg));
 
         });
     },
     //缂栬緫鍐呭
     upContent(ob) {
       this.upData = ob;
+      this.chooseDevGroup();
       this.selecTechById()
       this.upDia = true;
     },
@@ -888,7 +910,6 @@
       // 	}
       // })
       this.writeTechById();
-
       this.$message.success("淇敼鎴愬姛");
       this.upIndex++;
       this.upDia = false;

--
Gitblit v1.9.3