From 002b322741c9f9577e099356fe8201cea32f7bab Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 11 九月 2023 12:53:25 +0800
Subject: [PATCH] modified: src/components/view/standard.vue
---
src/components/view/Technicalindex.vue | 188 +++++++++++++++++++++++++++++++---------------
1 files changed, 125 insertions(+), 63 deletions(-)
diff --git a/src/components/view/Technicalindex.vue b/src/components/view/Technicalindex.vue
index 39c1af3..c48d631 100644
--- a/src/components/view/Technicalindex.vue
+++ b/src/components/view/Technicalindex.vue
@@ -5,7 +5,7 @@
<el-col :span="12" style="line-height: 32px;">鎶�鏈寚鏍囩淮鎶�</el-col>
<el-col :span="12" style="text-align: right;">
<el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" @click="event">鏂板</el-button>
- <el-button icon="el-icon-edit-outline" @click="modify">淇敼</el-button>
+ <!-- <el-button icon="el-icon-edit-outline" @click="modify">淇敼</el-button> -->
<el-button icon="el-icon-delete" @click="dels" >鍒犻櫎</el-button>
</el-col>
</el-row>
@@ -22,7 +22,7 @@
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="绫诲瀷">
<template>
- <el-select v-model="value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 560px;">
+ <el-select v-model="value" placeholder="璇烽�夋嫨" style="width: 560px;">
<el-option
v-for="item in options"
:key="item.value"
@@ -47,8 +47,8 @@
<el-row>
<el-col :span="11">
- <el-form-item label="涓婄骇">
- <el-input v-model="form.name" placeholder="璇烽�夋嫨涓婄骇"></el-input>
+ <el-form-item label="椤圭洰缁�">
+ <el-input v-model="form.name" placeholder="璇烽�夋嫨"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="2">
@@ -91,7 +91,7 @@
<el-form-item label="宸ュ簭">
<template>
<el-select v-model="form.work"
- placeholder="璇烽�夋嫨绫诲瀷"
+ placeholder="璇烽�夋嫨"
allow-create
filterable
@change="workevent"
@@ -110,7 +110,7 @@
<el-form-item label="宸ヨ壓">
<template>
<el-select v-model="form.name"
- placeholder="璇烽�夋嫨绫诲瀷"
+ placeholder="璇烽�夋嫨"
allow-create
filterable
>
@@ -128,10 +128,10 @@
<el-row>
<el-col :span="11">
- <el-form-item label="涓婄骇">
+ <el-form-item label="椤圭洰缁�">
<template>
<el-select v-model="form.father"
- placeholder="璇烽�夋嫨绫诲瀷"
+ placeholder="璇烽�夋嫨"
allow-create
filterable
>
@@ -189,14 +189,14 @@
size="small"
clearable @input="query" ></el-input>
<el-tree :data="list" ref="tree" :props="{children: 'children',label: 'father'}" node-key="id" default-expand-all
- @node-click="handleNodeClick"
+ @node-click="handleNodeClick" highlight-current
>
<div class="custom-tree-node" slot-scope="{ node, data }">
- <span><i :class="`node_i ${data.code != '[3]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i>
- {{data.father}} {{ data.name }}</span>
- <el-button type="text" size="mini" @click.stop="remove(node, data)">
+ <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i>
+ {{data.code}} {{ data.name }}</span>
+ <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)">
<i class="el-icon-delete"></i>
- </el-button>
+ </el-button> -->
</div>
</el-tree>
</div>
@@ -207,7 +207,6 @@
style="width: 100%;margin-bottom: 20px;"
row-key="name"
border
-
@selection-change="handleSelectionChange"
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
@@ -249,58 +248,71 @@
</el-table-column>
</el-table>
</div>
-
-<!--
<div>
<el-dialog title="缂栬緫鎶�鏈唴瀹�" :visible.sync="upDia" width="500px">
<div class="body">
- <el-row style="line-height: 46px;">
+
+ <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">
<template>
- <el-select v-model="upData.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>
- <el-option label="鍒嗘敮缁勪欢" :value="3"></el-option>
+ <el-select v-model="form.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>
+ <el-option label="鍒嗘敮缁勪欢" :value="3"></el-option>
</el-select>
</template>
</el-col>
</el-row>
- <el-row style="line-height: 46px;">
+ <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-option
- v-for="item in procedure"
- :key="item"
- :label="item"
- :value="item">
- </el-option>
- </el-select>
+ <template>
+ <el-select v-model="form.work"
+ placeholder="璇烽�夋嫨"
+ allow-create
+ filterable
+ @change="workevent"
+ >
+ <el-option
+ v-for="(item,index) in process"
+ :key="item.name"
+ :label="item.name"
+ :value="item.name">
+ </el-option>
+ </el-select>
+ </template>
</el-col>
</el-row>
- <el-row style="line-height: 46px;">
- <el-col :span="4" style="font-size: 14px;text-align: right;">鍏冧欢:</el-col>
+ <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-option
- v-for="item in element"
- :key="item.index"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
+ <template>
+ <el-select v-model="form.name"
+ placeholder="璇烽�夋嫨"
+ allow-create
+ filterable
+ >
+ <el-option
+ v-for="item in craftapi"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ </template>
</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="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-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="4" style="font-size: 14px;text-align: right;">鍗曚綅:</el-col>
<el-col :span="16" :offset="1">
<el-input v-model="upData.device_group" size="small" clearable></el-input>
</el-col>
@@ -311,7 +323,7 @@
<el-button @click="upDia = false">鍙� 娑�</el-button>
</span>
</el-dialog>
- </div> -->
+ </div>
</div>
</div>
</template>
@@ -320,11 +332,13 @@
data() {
return {
search:{
- type:'',
- technology:'',
+ type:0,
+ technology:null,
},
// handleClose:[],
- checkTreeNode :[],
+ checkTreeNode :{
+ id:1,
+ },
higherlevel:[],
value:{},
options:[],
@@ -343,28 +357,71 @@
dialogVisible:false,
tableData: [],
typeselect:0,
- upDat:{},
+ upData:{},
+ upDia:false,
craftapi:[],
+ edit:{
+
+ }
}
},
mounted() {
this.selectAllleft()
+ this.selectAllright()
},
methods:{
+ selectDataList() {
+ this.list.forEach(a => {
+ a.code = '[1]'
+ if (a.children != undefined) {
+ a.children.forEach(b => {
+ b.code = '[2]'
+ if (b.children != undefined) {
+ b.children.forEach(c => {
+ c.code = '[3]'
+ })
+ }
+ })
+ }
+ })
+ this.upIndex++
+ },
+ //缂栬緫
+ selecTech() {
+ this.$axios.get(this.$api.url.selecTech,{
+ params:{
+ id:this.upData.id
+ }
+ }).then(res => {
+ this.edit = res.data[0]
+ console.log(this.edit);
+ })
+ },
+ childrenClick() {
+ this.selecTech()
+ this.upDia = true
+ },
+ submitUpData() {//纭畾
+
+ },
//鍒犻櫎
- // delTechBy() {
- // console.log(this.$api.url.delTechBy,this.upData.id);
- // this.$axios.post(this.$api.url.delTechBy,{
- // id:this.upData.id
- // })
- // },
- // deleteRow(index, rows) {
- // this.tableData.splice(index,1)
- // this.upData.id = rows.id
- // this.delTechBy()
- // },
+ delTechBy() {
+ console.log(this.$api.url.delTechBy,this.upData.id);
+ this.$axios.post(this.$api.url.delTechBy,{
+ id:this.upData.id
+ }).then(res =>{
+ this.selectAllright()
+ this.$message.success('鍒犻櫎瀹屾垚')
+ })
+ },
+ deleteRow(index, rows) {
+ this.tableData.splice(index,1)
+ this.upData = rows
+ this.upData.id = rows.id
+ this.delTechBy()
+ },
add() {
this.dialogVisible = false
this.addTechMode()
@@ -379,7 +436,10 @@
headers: {
"Content-Type": "application/json"
}
- })
+ }).then(res =>{
+ this.$message.success('鏂板瀹屾垚')
+ this.selectAllright()
+ })
},
handleClose() {
@@ -396,6 +456,7 @@
}).then(res => {
this.list = res.data;
console.log(this.list);
+ this.selectDataList()
})
},
//
@@ -456,9 +517,10 @@
modify(){
this.modifyevent = true
},
- deleteRow(index, rows) {
- rows.splice(index, 1);
- },
+ // deleteRow(index, rows) {
+ // console.log();
+ // rows.splice(index, 1);
+ // },
handleSelectionChange(val) {
this.selects = val;
},
--
Gitblit v1.9.3