| | |
| | | <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> |
| | |
| | | <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" |
| | |
| | | |
| | | <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"> |
| | |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="form.work" |
| | | placeholder="请选择类型" |
| | | placeholder="请选择" |
| | | allow-create |
| | | filterable |
| | | @change="workevent" |
| | |
| | | <el-form-item label="工艺"> |
| | | <template> |
| | | <el-select v-model="form.name" |
| | | placeholder="请选择类型" |
| | | placeholder="请选择" |
| | | allow-create |
| | | filterable |
| | | > |
| | |
| | | |
| | | <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 |
| | | > |
| | |
| | | @node-click="handleNodeClick" |
| | | > |
| | | <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> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | | {{data.father}} {{ data.name }}</span> |
| | | <el-button type="text" size="mini" @click.stop="remove(node, data)"> |
| | | <!-- <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> |
| | |
| | | style="width: 100%;margin-bottom: 20px;" |
| | | row-key="name" |
| | | border |
| | | |
| | | @selection-change="handleSelectionChange" |
| | | default-expand-all |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | |
| | | </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> |
| | |
| | | <el-button @click="upDia = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | data() { |
| | | return { |
| | | search:{ |
| | | type:'', |
| | | technology:'', |
| | | type:0, |
| | | technology:null, |
| | | }, |
| | | // handleClose:[], |
| | | checkTreeNode :[], |
| | | checkTreeNode :{ |
| | | id:1, |
| | | }, |
| | | higherlevel:[], |
| | | value:{}, |
| | | options:[], |
| | |
| | | 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() |
| | |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }).then(res =>{ |
| | | this.$message.success('新增完成') |
| | | this.selectAllright() |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | |
| | |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | this.selectDataList() |
| | | }) |
| | | }, |
| | | // |
| | |
| | | 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; |
| | | }, |