| | |
| | | <el-dialog |
| | | title="技术指标编辑" |
| | | :visible.sync="modifyevent" |
| | | width="40%" |
| | | :before-close="handleClose"> |
| | | width="40%"> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="form.type" placeholder="请选择" > |
| | | <el-select v-model="edit.type" disabled placeholder="请选择" style="width: 560px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | |
| | | <el-col :span="11"> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="form.work" |
| | | <el-select v-model="edit.techFather" disabled |
| | | placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in process" |
| | |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="工艺"> |
| | | <el-input v-model="edit.techName" :disabled="true" placeholder="请选择"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="设备"> |
| | | <el-input v-model="form.father" placeholder="请选择"></el-input> |
| | | <el-input v-model="edit.dname" disabled placeholder="请选择"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="项目"> |
| | | <el-input v-model="form.name" placeholder="请输入项目"></el-input> |
| | | <!-- <el-input v-model="edit.father" :disabled="true" placeholder="请输入项目"></el-input> --> |
| | | <template> |
| | | <el-select v-model="edit.father" @change="projectApi" placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in project" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="form.unit" placeholder="请输入单位" style="width: 220px;"></el-input> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="指标"> |
| | | <template> |
| | | <el-select v-model="edit.name" @change="scale" placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in quota" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="单位"> |
| | | <el-input v-model="unitrow" :value="unitrow" :disabled="true" placeholder="请输入项目"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="modifyevent = false">取 消</el-button> |
| | | <el-button type="primary" @click="modifyevent = false">确 定</el-button> |
| | | <el-button type="primary" @click="editApi">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | <el-dialog |
| | | title="技术指标新增" |
| | | :visible.sync="dialogVisible" |
| | | width="40%" |
| | | :before-close="handleClose"> |
| | | width="40%"> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="类型"> |
| | | <template> |
| | | <el-select v-model="form.type" placeholder="请选择" style="width: 480px;"> |
| | | <el-select v-model="form.type" placeholder="请选择" @change="edittype" style="width: 480px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | |
| | | <el-col :span="11"> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="form.father" |
| | | <el-select v-model="form.father" @change="workevent" |
| | | placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="工艺名称"> |
| | | <template> |
| | | <el-select v-model="form.craft" placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | <el-select v-model="form.work" placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in higherlevel" |
| | | :key="item.name" |
| | | :key="item.devId" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | :value="item.devId"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="项目"> |
| | | <el-input v-model="form.name" placeholder="请输入项目"></el-input> |
| | | <template> |
| | | <el-select v-model="form.ee" @change="projectApi" placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in project" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="单位"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="指标"> |
| | | <template> |
| | | <el-select v-model="form.aa" @change="scale" placeholder="请选择" > |
| | | <el-option |
| | | v-for="item in quota" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <el-form-item label="单位"> |
| | | <template> |
| | | <el-input v-model="unitrow" :disabled="true" placeholder="请输入单位" style="width: 200px;"></el-input> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- <el-form-item label="单位"> |
| | | <el-input v-model="form.unit" placeholder="请输入单位" style="width: 220px;"></el-input> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | |
| | | <!-- 主体左 --> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" |
| | | @input="query" |
| | | suffix-icon="el-icon-search" |
| | | placeholder="请输入搜索内容" |
| | | size="small" clearable ></el-input> |
| | | <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" highlight-current node-key="id" default-expand-all |
| | | highlight-current :filter-node-method="filterNode" |
| | | <el-tree :data="list" ref="tree" |
| | | style="height: 500px;overflow-y: auto;" |
| | | :props="{children: 'children',label: 'name'}" highlight-current node-key="name" default-expand-all |
| | | |
| | | @node-click="handleNodeClick" |
| | | > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | |
| | | <el-table-column |
| | | label="设备名称" |
| | | sortable |
| | | prop="dname" |
| | | width="300px"> |
| | | <template slot-scope="scope"> |
| | | <el-tag> |
| | | <!-- <el-tag> |
| | | <div class="firstDiv" :style="`color: ${scope.row.children ? '#16a7ff' : '#58c173'}`"> |
| | | {{ scope.row.children ? "01" : "02" }} |
| | | </div> |
| | | </el-tag> |
| | | <span style="children: black">{{ scope.row.name }}</span> |
| | | |
| | | <span style="children: black">{{ scope.row.name }}</span> --> |
| | | <el-tag v-if="scope.row.children" type="primary">01</el-tag> |
| | | <span style="color: black" v-if="scope.row.children"> |
| | | {{ scope.row.dname }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="项目" |
| | | sortable |
| | | width="300px"> |
| | | <template slot-scope="scope"> |
| | | <el-tag> |
| | | <div class="firstDiv" :style="`color: ${scope.row.children ? '#16a7ff' : '#58c173'}`"> |
| | | {{ scope.row.children ? "01" : "02" }} |
| | | </div> |
| | | </el-tag> |
| | | <span style="color: black">{{ scope.row.name }}</span> |
| | | |
| | | <el-tag type="success" v-if="!scope.row.children">02</el-tag> |
| | | <span style="color: black" v-if="!scope.row.children">{{ scope.row.father }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="单位"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | prop="name" |
| | | label="指标"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="操作" |
| | | width="200px"> |
| | | <template slot-scope="scope" style="text-align: center;"> |
| | | <el-button type="text" size="mini" @click="childrenClick(scope)">编辑</el-button> |
| | | <el-button type="text" size="mini" @click="deleteRow(scope.$index, tableData)">删除</el-button> |
| | | </template> |
| | | <div v-if="!scope.row.children"> |
| | | <el-button type="text" size="mini" @click="childrenClick(scope.row)">编辑</el-button> |
| | | <el-button type="text" size="mini" @click="deleteRow(scope.$index, scope.row)">删除</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | options:[], |
| | | process:[], |
| | | list: [], |
| | | TYpe:'', |
| | | selects:'', |
| | | process:{}, |
| | | options:{}, |
| | | craftapi:{}, |
| | | project:{}, |
| | | edit:{}, |
| | | upData:{ |
| | | |
| | | }, |
| | | checkTreeNode:{ |
| | | id:2, |
| | | id:1, |
| | | }, |
| | | form:{ |
| | | type:'', |
| | |
| | | work:'', |
| | | name:'', |
| | | unit:'', |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | modifyevent:false, |
| | | dialogVisible:false, |
| | | tableData: [], |
| | | higherlevel:{}, |
| | | quota:{}, |
| | | unitrow:'', |
| | | } |
| | | |
| | | }, |
| | |
| | | this.upIndex++ |
| | | }, |
| | | elForm() {}, |
| | | //新增 |
| | | choosePro() {//工序 |
| | | // //新增 |
| | | choosePro() {//项目 |
| | | this.$axios.get(this.$api.url.choosePro,{ |
| | | params:{techTemId:this.checkTreeNode.id} |
| | | }).then(res => { |
| | | this.process = res.data; |
| | | this.project = res.data; |
| | | console.log(this.process); |
| | | }, { |
| | | headers: { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | //新增 |
| | | edittype(val) { |
| | | this.typeselect = val |
| | | this.chooseTechFath() |
| | | }, |
| | | projectApi(val) { |
| | | console.log(val); |
| | | let idx = this.project.findIndex(el => el.name === val) |
| | | this.quota = this.project[idx].children |
| | | console.log( this.quota); |
| | | }, |
| | | scale(val) { |
| | | console.log(val); |
| | | let cc = this.quota.findIndex(el => el.id === val) |
| | | console.log(cc); |
| | | this.unitrow = this.quota[cc].unit |
| | | console.log(this.unitrow); |
| | | }, |
| | | workevent(val){ |
| | | console.log(val); |
| | | let idx = this.process.findIndex(el => el.name === val) |
| | | this.craftapi = this.process[idx].children |
| | | console.log( this.craftapi); |
| | | }, |
| | | chooseTechFath() { |
| | | this.$axios.get(this.$api.url.chooseTechFath,{ |
| | | params:{type:this.typeselect} |
| | | }).then(res => { |
| | | this.process = res.data; |
| | | console.log(this.process); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res =>{ |
| | | |
| | | }) |
| | | }, |
| | | //新增 |
| | | event(){ |
| | | this.dialogVisible = true |
| | |
| | | //确认 |
| | | add() { |
| | | this.dialogVisible = false |
| | | this.addQeMode() |
| | | }, |
| | | addQeMode(){ |
| | | this.$axios.get(this.$api.url.addQeMode,{ |
| | | devId:this.form.xxx, |
| | | techTemId:this.form.xxx, |
| | | technicalModelId:this.form.xxx, |
| | | this.$axios.post(this.$api.url.addQeMode,{ |
| | | devId:this.form.work, |
| | | techTemId:this.form.craft, |
| | | technicalModelId:this.form.aa, |
| | | }, {headers: {"Content-Type": "application/json"} |
| | | }).then(res =>{ |
| | | this.selectAllTeque() |
| | | this.form = {} |
| | | this.unitrow = "" |
| | | }) |
| | | }, |
| | | |
| | | //编辑 |
| | | childrenClick() { |
| | | childrenClick(ob) { |
| | | this.modifyevent=true |
| | | this.chooseTechFath() |
| | | this.upData = ob |
| | | this.selecQueById() |
| | | this.choosePro() |
| | | }, |
| | | TYpe() { |
| | | //编辑 selecQueById |
| | | selecQueById() { |
| | | this.$axios.get(this.$api.url.selecQueById,{ |
| | | params:{id:this.upData.id} |
| | | }).then(res => { |
| | | console.log(res); |
| | | this.edit = res.data[0] |
| | | console.log(this.edit); |
| | | this.unitrow = this.edit.unit |
| | | }) |
| | | }, |
| | | editApi() { |
| | | this.modifyevent = false |
| | | this.writeQueById() |
| | | }, |
| | | writeQueById() { |
| | | this.$axios.post(this.$api.url.writeQueById,{ |
| | | devId:this.edit.did, |
| | | techTemId:this.edit.tid, |
| | | technicalModelId:this.edit.name, |
| | | }, {headers: {"Content-Type": "application/json"} |
| | | }).then(res =>{ |
| | | }) |
| | | }, |
| | | //======================== |
| | | TYpe(val) { |
| | | this.typeselect = val |
| | | this.selectAllleft() |
| | | }, |
| | |
| | | this.selectAllTeque() |
| | | |
| | | }, |
| | | |
| | | //查询 |
| | | query(val) { |
| | | this.selectAllleft() |
| | | }, |
| | | //主体左 |
| | | selectAllleft() { |
| | | this.$axios.get(this.$api.url.selectAllleft,{ |
| | | params:{type:this.typeselect} |
| | | params:{type:this.typeselect,message:this.search.technology} |
| | | }).then(res => { |
| | | this.list = res.data; |
| | | console.log(this.list); |
| | | this.selectDataList() |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个 |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | //主体右 |
| | | selectAllTeque() { |
| | | this.$axios.get(this.$api.url.selectAllTeque,{ |
| | |
| | | modify(){ |
| | | this.modifyevent = true |
| | | }, |
| | | deleteRow(index, rows) { |
| | | rows.splice(index, 1); |
| | | //delQueById |
| | | delQueById() { |
| | | this.$axios.post(this.$api.url.delQueById,{ |
| | | id:this.upData.id |
| | | }).then(res =>{ |
| | | this.selectAllTeque() |
| | | this.$message.success('删除完成') |
| | | }) |
| | | }, |
| | | deleteRow(index, row) { |
| | | this.tableData.splice(index,1) |
| | | this.upData.id = row.id |
| | | console.log(this.upData.id); |
| | | this.delQueById() |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = val |
| | | }, |
| | | //批量删除 |
| | | delAllQue() { |
| | | this.$axios.post(this.$api.url.delAllQue,{ |
| | | ids:this.delete |
| | | }).then(res =>{ |
| | | this.selectAllTeque() |
| | | this.$message.success('删除完成') |
| | | }) |
| | | }, |
| | | |
| | | dels() { |
| | | this.selects.forEach(a => { |
| | | for (var b = 0; b < this.tableData.length; b++) { |
| | |
| | | } |
| | | } |
| | | }) |
| | | let cc = this.selects.map(el => { |
| | | return el.id |
| | | }) |
| | | this.delete = cc.join(',') |
| | | console.log(this.delete); |
| | | this.delAllQue() |
| | | this.$message.success('删除完成') |
| | | }, |
| | | handleClose(){ |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => {}) |
| | | }, |
| | | filterNode(){ |
| | | // handleClose(){ |
| | | // // this.$confirm('确认关闭?') |
| | | // // .then(_ => { |
| | | // // done(); |
| | | // // }) |
| | | // // .catch(_ => {}) |
| | | // // }, |
| | | // // filterNode(){ |
| | | |
| | | }, |
| | | // }, |
| | | |
| | | } |
| | | } |