王震
2023-09-06 2c71f29aded2e3885e210d82dc0d74b834500163
src/components/view/technology.vue
@@ -186,7 +186,7 @@
               <el-col :span="4" style="font-size: 14px;text-align: right;">类型:</el-col>
               <el-col :span="16" :offset="1">
                  <template>
                        <el-select v-model="upData.type" placeholder="请选择类型" style="width: 310px;">
                        <el-select v-model="edit.type" placeholder="请选择类型" style="width: 310px;">
                     <el-option label="橡胶连接器" :value="0"></el-option>
                     <el-option label="金属连接器" :value="1"></el-option>
                     <el-option label="湿插拔电连接器" :value="2"></el-option>
@@ -198,7 +198,7 @@
            <el-row style="line-height: 46px;">
               <el-col :span="4" style="font-size: 14px;text-align: right;">工序:</el-col>
               <el-col :span="16" :offset="1">
                  <el-select v-model="upData.father"   style="width: 310px;" placeholder="请选择">
                  <el-select v-model="edit.father"   style="width: 310px;" placeholder="请选择">
                     <el-option
                     v-for="item in procedure"
                     :key="item"
@@ -211,10 +211,10 @@
            <el-row style="line-height: 46px;">
               <el-col :span="4" style="font-size: 14px;text-align: right;">元件:</el-col>
               <el-col :span="16" :offset="1">
                  <el-select v-model="upData.ele" style="width: 310px;" multiple placeholder="请选择">
                  <el-select v-model="AAA.id" style="width: 310px;" multiple placeholder="请选择">
                     <el-option
                     v-for="item in element"
                     :key="item.index"
                     :key="item.id"
                     :label="item.name"
                     :value="item.id">
                     </el-option>
@@ -224,7 +224,7 @@
            <el-row style="line-height: 46px;">
               <el-col :span="4" style="font-size: 14px;text-align: right;">工艺名称:</el-col>
               <el-col :span="16" :offset="1">
                  <el-input v-model="upData.name" size="small" clearable></el-input>
                  <el-input v-model="edit.name" size="small" clearable></el-input>
               </el-col>
            </el-row>
            <el-row style="line-height: 46px;">
@@ -409,10 +409,20 @@
            upDia: false,
            element:[],
            equipment:[0],
            edit:[],
            AAA:[{
               id:'',
            }],
            edit:{
               deviceGroup:'',
               elementId:'',
               father:'',
               name:'',
               type:'',
               // children:[],
            },
            upData: {
               name:'',
               device_group:'',
               deviceGroup:'',
               ele:'',
               father:'',
               type:'',
@@ -514,10 +524,10 @@
               id:this.upData.id,
               technologyTemplateDto:{
                  deviceGroup:this.upData.device_group,
                  elementId:this.upData.ele[0],
                  father:this.upData.father,
                  name:this.upData.name,
                  type:this.upData.type
                  elementId:this.edit.elementId,
                  father:this.edit.father,
                  name:this.edit.name,
                  type:this.edit.type
               }               
               // id:this.upData.id,
            }
@@ -625,7 +635,6 @@
            this.$message.success('删除完成')
         },
         deleteRow(index, rows) {
            this.tableData.splice(index,1)
            this.upData.id = rows.id
            this.delTechById()
@@ -635,21 +644,26 @@
               params:{
               id:this.upData.id,   
               }                        
            }
            // , {
            //    headers: {
                //       "Content-Type": "application/json"
                 //    }
            // }
            ).then(res =>{
               this.edit = res.data
            }).then(res =>{
               this.edit = res.data[0]
               this.AAA = res.data[0].children
               console.log(this.edit);
               console.log(this.AAA);
               // this.edit.forEach(el => {
                    // // el.children.forEach(ele =>{
                    // //     this.AAA.push(ele)
               // console.log(el);
                    // })
               // console.log(this.AAA.id);
                // })
               // console.log(this.edit);
            })
         },
         //编辑内容
         upContent(ob) {
            this.upData = ob
            this.selecTechById()
            this.selecTechById()
            console.log(this.upData);
            this.upDia = true
         },