| | |
| | | </div> |
| | | <div class="choose"> |
| | | <span>类型:</span> |
| | | <el-select v-model="search.type" size="small" placeholder="请选择" 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> |
| | |
| | | <el-select v-model="search.name" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="(a, ai) in product" key="ai" :label="a.name" :value="a.id"></el-option> |
| | | </el-select> --> |
| | | <el-button size="mini" @click="clean()"><span>重 置</span></el-button> |
| | | <!-- <el-button size="mini" @click="clean()"><span>重 置</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>查 |
| | | 询</span></el-button> |
| | | 询</span></el-button> --> |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable @input="(val)=>$refs.tree.filter(val)"></el-input> |
| | | <el-input v-model="search.technology" suffix-icon="el-icon-search" |
| | | placeholder="请输入搜索内容" size="small" |
| | | clearable @input="query"> |
| | | <!-- clearable @input="(val)=>$refs.tree.filter(val)"> --> |
| | | </el-input> |
| | | <el-tree |
| | | :data="towTree" ref="tree" |
| | | :props="{children: 'children',label: 'father'}" |
| | |
| | | <el-table-column label="操作" width="130"> |
| | | <template slot-scope="scope"> |
| | | <span class="table_do" @click="upContent(scope.row)">编辑 </span> |
| | | <span class="table_do" @click="deleteRow(scope.$index, tableData)">删除</span> |
| | | <span class="table_do" @click="deleteRow(scope.$index, scope.row)">删除</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-col :span="10"> |
| | | <el-form-item label="元件"> |
| | | <template> |
| | | <el-select v-model="form.elementId" placeholder="请选择类型" style="width: 200px;" > |
| | | <el-select v-model="form.elementId" placeholder="请选择类型" style="width: 200px;" > |
| | | <el-option |
| | | v-for="item in element" |
| | | :key="item.value" |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="Neworder">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="Deleteapi">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 工艺路线修改 --> |
| | |
| | | search:{ |
| | | type:'', |
| | | }, |
| | | delete:[], |
| | | treetrunk:[], |
| | | process: [], |
| | | product: [], |
| | | procedure:[], |
| | | checkTreeNode:'', |
| | | checkTreeNode:'下料', |
| | | towTree:[], |
| | | value:"", |
| | | modifyevent:false, |
| | |
| | | upDia: false, |
| | | element:[], |
| | | equipment:[0], |
| | | edit:[], |
| | | upData: { |
| | | name:'', |
| | | device_group:'', |
| | |
| | | father:'', |
| | | type:'', |
| | | }, |
| | | typeselect:0, |
| | | newdata:{ |
| | | type:'' |
| | | } |
| | |
| | | this.chooseElement() |
| | | }, |
| | | methods: { |
| | | type(val){ |
| | | this.typeselect = val |
| | | console.log(this.typeselect); |
| | | this.selectAllTechTem() |
| | | }, |
| | | |
| | | Neworder() { |
| | | this.dialogVisible = false |
| | | this.addTechTemp() |
| | | this.selectAllTechNam() |
| | | // this.form = ''; |
| | | }, |
| | | Deleteapi() { |
| | | this.dialogVisible = false |
| | | this.form = ''; |
| | | }, |
| | | addTechTemp() { |
| | | // console.log(this.$api.url.addTechTemp); |
| | |
| | | console.log(this.procedure); |
| | | }) |
| | | }, |
| | | //批量删除 |
| | | delAllTech() { |
| | | console.log(this.delete); |
| | | this.$axios.post(this.$api.url.delAllTech,{ |
| | | ids:this.delete |
| | | }) |
| | | }, |
| | | //删除 |
| | | 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 |
| | | }) |
| | | }, |
| | | //编辑 |
| | | writeTechById() { |
| | | this.$axios.post(this.$api.url.writeTechById,{ |
| | | deviceGroup:this.upData.device_group, |
| | | elementId:this.upData.ele[0], |
| | | father:this.upData.father, |
| | | name:this.upData.name, |
| | | type:this.upData.type, |
| | | // id:this.this.upData.id, |
| | | params:{ |
| | | 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 |
| | | } |
| | | // id:this.upData.id, |
| | | } |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | query(val){ |
| | | this.selectAllTechTem() |
| | | }, |
| | | selectAllTechTem() { |
| | | console.log(this.typeselect,'222'); |
| | | this.$axios.get(this.$api.url.selectAllTechTem,{ |
| | | params:{type: 0} |
| | | params:{type: this.typeselect,message:this.search.technology} |
| | | }).then(res => { |
| | | // let list = res.data; |
| | | // list.forEach(i => { |
| | |
| | | } |
| | | } |
| | | }) |
| | | // 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) { |
| | | rows.splice(index, 1); |
| | | // console.log(rows); |
| | | // rows.splice(index, 1); |
| | | this.tableData.splice(index,1) |
| | | this.upData.id = rows.id |
| | | this.delTechById() |
| | | }, |
| | | selecTechById() { |
| | | this.$axios.get(this.$api.url.selecTechById,{ |
| | | params:{ |
| | | id:this.upData.id, |
| | | } |
| | | } |
| | | // , { |
| | | // headers: { |
| | | // "Content-Type": "application/json" |
| | | // } |
| | | // } |
| | | ).then(res =>{ |
| | | this.edit = res.data |
| | | console.log(this.edit); |
| | | }) |
| | | }, |
| | | //编辑内容 |
| | | upContent(ob) { |
| | | this.upData = ob |
| | | this.selecTechById() |
| | | console.log(this.upData); |
| | | this.upDia = true |
| | | }, |
| | |
| | | // } |
| | | // }) |
| | | this.writeTechById() |
| | | |
| | | |
| | | this.$message.success('修改成功') |
| | | this.upIndex++ |
| | | this.upDia = false |