From 4fa97f6b365035a1f811833b54ada53a9a1a35da Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期五, 08 九月 2023 16:45:48 +0800
Subject: [PATCH] 设备维护,标准Bom
---
src/components/view/technology.vue | 76 +++++++++++++++++++++++---------------
1 files changed, 46 insertions(+), 30 deletions(-)
diff --git a/src/components/view/technology.vue b/src/components/view/technology.vue
index a34acbe..e9ffa98 100644
--- a/src/components/view/technology.vue
+++ b/src/components/view/technology.vue
@@ -120,7 +120,7 @@
</div>
<div class="choose">
<span>绫诲瀷锛�</span>
- <el-select v-model="search.type" size="small" placeholder="璇烽�夋嫨" @change="type" style="width: 224px;margin-right: 30px;">
+ <el-select v-model="search.type" size="small" placeholder="璇烽�夋嫨" @change="type" style="width: 224px;margin-right: 30px;">
<el-option label="姗¤兌杩炴帴鍣�" :value="0"></el-option>
<el-option label="閲戝睘杩炴帴鍣�" :value="1"></el-option>
<el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option>
@@ -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;">
@@ -396,22 +396,33 @@
process: [],
product: [],
procedure:[],
- checkTreeNode:'涓嬫枡',
+ checkTreeNode:{
+ name:'涓嬫枡'
+ },
towTree:[],
value:"",
modifyevent:false,
dialogVisible:false,
- checkTreeNode: {},
tableData: [],
upIndex: 0,
selects: [],
upDia: false,
element:[],
equipment:[0],
- edit:[],
+ AAA:[{
+ id:'',
+ }],
+ edit:{
+ deviceGroup:'',
+ elementId:'',
+ father:'',
+ name:'',
+ type:'',
+ // children:[],
+ },
upData: {
name:'',
- device_group:'',
+ deviceGroup:'',
ele:'',
father:'',
type:'',
@@ -427,10 +438,12 @@
this.chooseTech()
this.chooseDevGroup()
this.chooseElement()
+ this.selectAllTechNam()
},
methods: {
type(val){
this.typeselect = val
+ this.upData.type = val
console.log(this.typeselect);
this.selectAllTechTem()
},
@@ -438,8 +451,8 @@
Neworder() {
this.dialogVisible = false
this.addTechTemp()
- this.selectAllTechNam()
// this.form = '';
+
},
Deleteapi() {
this.dialogVisible = false
@@ -463,6 +476,8 @@
}
).then(res=>{
console.log(res);
+ this.selectAllTechNam()
+ this.form = {}
})
},
@@ -509,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,
}
@@ -520,6 +535,9 @@
headers: {
"Content-Type": "application/json"
}
+ }).then(res =>{
+ console.log(res);
+
})
},
@@ -608,22 +626,15 @@
}
}
})
- // console.log(this.selects);
let cc = this.selects.map(el => {
- // console.log(el.id);
return el.id
})
- // console.log(this.delete);
this.delete = cc.join(',')
console.log(this.delete);
this.delAllTech()
- // this.delete =
- // console.log('444');
this.$message.success('鍒犻櫎瀹屾垚')
},
deleteRow(index, rows) {
- // console.log(rows);
- // rows.splice(index, 1);
this.tableData.splice(index,1)
this.upData.id = rows.id
this.delTechById()
@@ -633,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
},
--
Gitblit v1.9.3