From 4901d92ce68d1e1f7880c87a7c345c089645c3a0 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 14 九月 2023 17:39:32 +0800
Subject: [PATCH] modified: src/components/view/rawInsDetail.vue
---
src/components/view/technology.vue | 94 +++++++++++++++++++++++++++++++++--------------
1 files changed, 66 insertions(+), 28 deletions(-)
diff --git a/src/components/view/technology.vue b/src/components/view/technology.vue
index c0ad40a..93e60ed 100644
--- a/src/components/view/technology.vue
+++ b/src/components/view/technology.vue
@@ -223,6 +223,9 @@
</el-table>
</div>
</div>
+
+
+
<el-dialog title="缂栬緫璁板綍鍐呭" :visible.sync="upDia" width="500px">
<div class="body">
<el-row style="line-height: 46px">
@@ -273,7 +276,7 @@
>
<el-col :span="16" :offset="1">
<el-select
- v-model="edit.children"
+ v-model="cell"
style="width: 310px"
disabled
multiple
@@ -283,7 +286,7 @@
v-for="item in element"
:key="item.id"
:label="item.name"
- :value="item.name"
+ :value="item.id"
>
</el-option>
</el-select>
@@ -297,18 +300,35 @@
<el-input v-model="edit.name" size="small" clearable></el-input>
</el-col>
</el-row>
+
<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
+ <!-- <el-input
v-model="upData.device_group"
size="small"
clearable
- ></el-input>
+ ></el-input> -->
+ <template>
+ <el-select
+ v-model="upData.device_group"
+ placeholder="璇烽�夋嫨"
+ style="width: 306px"
+ >
+ <el-option
+ v-for="item in equipment"
+ :key="item.index"
+ :label="item.father"
+ :value="item.father"
+ >
+ </el-option>
+ </el-select>
+ </template>
</el-col>
</el-row>
+
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitUpData">纭� 瀹�</el-button>
@@ -341,6 +361,7 @@
v-model="form.father"
allow-create
filterable
+ @create=""
placeholder="璇烽�夋嫨"
style="width: 480px"
>
@@ -498,9 +519,9 @@
elementId: "",
deviceGroup: "",
},
- search: {
- type: "",
- },
+ // search: {
+ // type: "",
+ // },
delete: [],
treetrunk: [],
process: [],
@@ -519,6 +540,7 @@
upDia: false,
element: [],
equipment: [0],
+ cell:[],
AAA: [
{
id: "",
@@ -602,9 +624,10 @@
}
)
.then((res) => {
- this.$parent.removeAllTab()
- this.selectAllTechNam();
+ console.log(res);
+ /* this.selectAllTechNam(); */
this.form = {};
+ this.$parent.removeAllTab()
});
},
@@ -640,35 +663,40 @@
},
//鎵归噺鍒犻櫎
delAllTech() {
+ console.log(this.delete);
this.$axios.post(this.$api.url.delAllTech, {
- ids: this.delete
+ ids: this.delete,
+ }).then(res=>{
+ this.$parent.removeAllTab()
});
- this.$parent.removeAllTab()
},
//鍒犻櫎
delTechById() {
+ console.log(this.$api.url.delTechById, this.upData.id);
this.$axios.post(this.$api.url.delTechById, {
- id: this.upData.id
+ id: this.upData.id,
+ }).then(res=>{
+ this.$parent.removeAllTab()
});
- this.$parent.removeAllTab()
},
//缂栬緫
writeTechById() {
+ // console.log(JSON.stringify(this.edit.children));
+ // console.log(JSON.stringify(this.edit.children));
+ // var str = ''
+ // this.edit.children.forEach((a,ai)=>{
+ // str += a.id
+ // if(ai!=this.edit.children.length-1) str+=','
+ // })
this.$axios
.post(
- this.$api.url.writeTechById,
- {
- params: {
- id: this.upData.id,
- technologyTemplateDto: {
+ this.$api.url.writeTechById + `?id=${this.upData.id}`,
+ {
deviceGroup: this.upData.device_group,
- elementId: this.edit.elementId,
+ elementId:this.cell.join(','),
father: this.edit.father,
name: this.edit.name,
- type: this.edit.type,
- },
- // id:this.upData.id,
- },
+ type: this.edit.type
},
{
headers: {
@@ -677,14 +705,15 @@
}
)
.then((res) => {
- this.$parent.removeAllTab()
+ /* this.selectAllTechNam(), */
+ this.$parent.removeAllTab()
});
},
query(val) {
this.selectAllTechTem();
},
- selectAllTechTem() {
+ selectAllTechTem() {
this.$axios
.get(this.$api.url.selectAllTechTem, {
params: { type: this.typeselect, message: this.search.technology },
@@ -698,7 +727,8 @@
let one=this.towTree.filter(item=>{
return item.children.length>0
})[0]
- let name=one.children[0].name
+ let name=one.children[0].name
+ this.checkTreeNode.name=name
this.selectAllTechNamStart(name)
this.selectDataList();
});
@@ -789,6 +819,7 @@
return el.id;
});
this.delete = cc.join(",");
+ console.log(this.delete);
this.delAllTech();
this.$message.success("鍒犻櫎瀹屾垚");
},
@@ -806,7 +837,14 @@
})
.then((res) => {
this.edit = res.data[0];
- console.log(this.edit);
+ 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);
+
});
},
//缂栬緫鍐呭
@@ -831,4 +869,4 @@
},
},
};
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3