From 2c71f29aded2e3885e210d82dc0d74b834500163 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期三, 06 九月 2023 14:13:13 +0800 Subject: [PATCH] 基础数据 --- src/components/view/technology.vue | 54 +++-- src/components/view/mbom.vue | 71 +++++-- src/components/view/self-inspection.vue | 11 src/components/view/equipmentmaintain.vue | 162 +++++++++++++---- src/components/view/record-content.vue | 52 ++++- src/main.js | 2 src/components/view/Technicalindex.vue | 140 ++++++++++----- src/assets/api/controller.js | 16 + 8 files changed, 359 insertions(+), 149 deletions(-) diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js index 7a4dac8..7f75ef9 100644 --- a/src/assets/api/controller.js +++ b/src/assets/api/controller.js @@ -70,23 +70,37 @@ delTechById:"/technologyTemplate/delTechById",//鏂板宸ヨ壓璺嚎==>鍒犻櫎 selecTechById:"/technologyTemplate/selecTechById",//鏂板宸ヨ壓璺嚎--銆嬬紪杈� delAllTech:"/technologyTemplate/delAllTech",//鎵归噺鍒犻櫎 + addTechMode:"/technicalModel/addTechMode",//鎶�鏈寚鏍�---銆嬫柊澧� delTechBy:"/technicalModel/delTechById",//鎶�鏈�--.鍒犻櫎 selectAllleft:"/technicalModel/selectAllTechTem",//鎶�鏈寚鏍�-->宸﹁竟 selectAllright:"/technicalModel/selectAllTechNam",//鎶�鏈寚鏍�--銆嬪彸杈� chooseProFath:"/technicalModel/chooseProFath",//鎶�鏈寚鏍�---銆嬬埗绫婚�夋嫨 chooseTechFath: "/technicalModel/chooseTechFath",// 鎶�鏈�--->宸ュ簭宸ヨ壓 + selecTech:"/technicalModel/selecTechById",//鎶�鏈�--->缂栬緫 + selectAllMbom:"/mbomModel/selectAllMbom",//鐗╂枡缁存姢--銆嬪彸杈� + addMbom:"/mbomModel/addMbom",//鐗╂枡--->鏂板 material:"/mbomModel/delMbomById",//鐗╂枡娓呭崟鍒犻櫎 + selectAllTeque:"/techniqueModel/selectAllTeque",//鐢熶骇宸ヨ壓缁存姢---銆傚彸杈� + selectAllSelf:"/selfcheckModel/selectAllSelf",//鑷缓缁存姢-----銆嬪彸杈� addSelfcheck:"/selfcheckModel/addSelfcheck",//鑷 ------銆嬫柊澧� delSelfcheck:"/selfcheckModel/delSelfcheckById",//鑷----.鍒犻櫎 delAll:"selfcheckModel/delAllTech",//鎵归噺鍒犻櫎---.鑷 + selectjilu:"/recordModel/selectAllRecord",//鐢熶骇璁板綍缁存姢---銆嬪彸杈� selecRecord:"/recordModel/selecRecordById",//鐢熶骇璁板綍----.缂栬緫 delQueById:"/recordModel/delQueById",//鍒犻櫎---.璁板綍鍐呭 - addRecord:"/recordModel/addRecord"//鐢熶骇璁板綍-------.鏂板 + delAllRecord:"/recordModel/delAllRecord",//鍒犻櫎鎵归噺--->璁板綍 + addRecord:"/recordModel/addRecord",//鐢熶骇璁板綍-------.鏂板 + + choosePro:"/techniqueModel/choosePro",//鏂板鐢熶骇宸ヨ壓缁存姢---銆嬮�夋嫨鐖剁被 + chooseDeiv:"/techniqueModel/chooseDeiv",//鏂板----->璁惧 + addQeMode:"/techniqueModel/addQeMode",//鏂板----銆嬩紶鍙� + delQueById:"/techniqueModel/delQueById",//鍒犻櫎 + delAllQue:"/techniqueModel/delAllQue",//鎵归噺鍒犻櫎 } const url = { enter: "user/enter", //鐧诲綍 diff --git a/src/components/view/Technicalindex.vue b/src/components/view/Technicalindex.vue index 39c1af3..6117dd3 100644 --- a/src/components/view/Technicalindex.vue +++ b/src/components/view/Technicalindex.vue @@ -249,58 +249,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 +324,7 @@ <el-button @click="upDia = false">鍙� 娑�</el-button> </span> </el-dialog> - </div> --> + </div> </div> </div> </template> @@ -324,7 +337,9 @@ technology:'', }, // handleClose:[], - checkTreeNode :[], + checkTreeNode :{ + id:2, + }, higherlevel:[], value:{}, options:[], @@ -343,28 +358,55 @@ dialogVisible:false, tableData: [], typeselect:0, - upDat:{}, + upData:{}, + upDia:false, craftapi:[], + edit:{ + + } } }, mounted() { this.selectAllleft() + this.selectAllright() }, methods:{ + //缂栬緫 + 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 +421,10 @@ headers: { "Content-Type": "application/json" } - }) + }).then(res =>{ + this.$message.success('鏂板瀹屾垚') + this.selectAllright() + }) }, handleClose() { @@ -456,9 +501,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; }, diff --git a/src/components/view/equipmentmaintain.vue b/src/components/view/equipmentmaintain.vue index 8992125..1b18d0b 100644 --- a/src/components/view/equipmentmaintain.vue +++ b/src/components/view/equipmentmaintain.vue @@ -22,33 +22,36 @@ <el-form ref="form" :model="form" label-width="80px"> <el-form-item label="绫诲瀷"> <template> - <el-select v-model="value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 560px;"> - <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> - </el-option> + <el-select v-model="form.type" placeholder="璇烽�夋嫨绫诲瀷" > + <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-form-item> <el-row> <el-col :span="11"> <el-form-item label="宸ュ簭"> - <el-input v-model="form.name" placeholder="璇疯緭鍏ユ垨閫夋嫨宸ュ簭"></el-input> + <template> + <el-select v-model="form.work" + 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="宸ヨ壓"> - <el-input v-model="form.name" 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.name" placeholder="璇烽�夋嫨涓婄骇"></el-input> + <el-form-item label="璁惧"> + <el-input v-model="form.father" placeholder="璇烽�夋嫨涓婄骇"></el-input> </el-form-item> </el-col> <el-col :span="11" :offset="2"> @@ -59,7 +62,7 @@ </el-row> <el-form-item label="鍗曚綅"> - <el-input v-model="form.name" placeholder="璇疯緭鍏ュ崟浣�" style="width: 220px;"></el-input> + <el-input v-model="form.unit" placeholder="璇疯緭鍏ュ崟浣�" style="width: 220px;"></el-input> </el-form-item> </el-form> <span slot="footer" class="dialog-footer"> @@ -78,33 +81,44 @@ <el-form ref="form" :model="form" label-width="80px"> <el-form-item label="绫诲瀷"> <template> - <el-select v-model="value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 560px;"> - <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> - </el-option> + <el-select v-model="form.type" placeholder="璇烽�夋嫨绫诲瀷" 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-option label="鍒嗘敮缁勪欢" :value="3"></el-option> </el-select> </template> </el-form-item> <el-row> <el-col :span="11"> <el-form-item label="宸ュ簭"> - <el-input v-model="form.name" placeholder="璇疯緭鍏ユ垨閫夋嫨宸ュ簭"></el-input> + <template> + <el-select v-model="form.father" + 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="宸ヨ壓"> - <el-input v-model="form.name" 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.name" placeholder="璇烽�夋嫨涓婄骇"></el-input> + <el-form-item label="璁惧"> + <template> + <el-select v-model="form.work" placeholder="璇烽�夋嫨绫诲瀷" > + <el-option + v-for="item in higherlevel" + :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"> @@ -115,12 +129,12 @@ </el-row> <el-form-item label="鍗曚綅"> - <el-input v-model="form.name" placeholder="璇疯緭鍏ュ崟浣�" style="width: 220px;"></el-input> + <el-input v-model="form.unit" placeholder="璇疯緭鍏ュ崟浣�" style="width: 220px;"></el-input> </el-form-item> - </el-form> + </el-form> <span slot="footer" class="dialog-footer"> <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="dialogVisible = false">纭� 瀹�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> </span> </el-dialog> </div> @@ -135,12 +149,12 @@ <el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option> <el-option label="鍒嗘敮缁勪欢" :value="3"></el-option> </el-select> - <span>宸ュ簭锛�</span> + <!-- <span>宸ュ簭锛�</span> <el-select v-model="search.name" size="small" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;"> <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option> </el-select> <el-button size="mini"><span>閲� 缃�</span></el-button> - <el-button size="mini" type="primary" style="background: #004EA2;"><span>鏌ヨ</span></el-button> + <el-button size="mini" type="primary" style="background: #004EA2;"><span>鏌ヨ</span></el-button> --> </div> <div class="thing"> <!-- 涓讳綋宸� --> @@ -237,25 +251,87 @@ return { search:{}, value:{}, - TYpe:[], typeselect:0, options:[], process:[], list: [], TYpe:'', selects:'', - checkTreeNode:[], - form:{}, + process:{}, + options:{}, + checkTreeNode:{ + id:2, + }, + form:{ + type:'', + father:'', + work:'', + name:'', + unit:'', + + + }, modifyevent:false, dialogVisible:false, tableData: [], + higherlevel:{}, } }, mounted() { - this.selectAllleft() + this.selectAllleft() + this.selectAllTeque() }, methods:{ + elForm() {}, + //鏂板 + choosePro() {//宸ュ簭 + this.$axios.get(this.$api.url.choosePro,{ + params:{techTemId:this.checkTreeNode.id} + }).then(res => { + this.process = res.data; + console.log(this.process); + }, { + headers: { + "Content-Type": "application/json" + } + }) + }, + chooseDeiv() {//璁惧 + this.$axios.get(this.$api.url.chooseDeiv,{ + params:{techTemId:this.checkTreeNode.id} + }).then(res => { + this.higherlevel = res.data; + console.log(this.process); + }, { + headers: { + "Content-Type": "application/json" + } + }) + }, + //鏂板 + event(){ + this.dialogVisible = true + this.choosePro() + this.chooseDeiv() + }, + //纭 + add() { + this.dialogVisible = false + }, + addQeMode(){ + this.$axios.get(this.$api.url.addQeMode,{ + devId:this.form.xxx, + techTemId:this.form.xxx, + technicalModelId:this.form.xxx, + }) + }, + + //缂栬緫 + childrenClick() { + this.modifyevent=true + this.chooseTechFath() + }, TYpe() { this.typeselect = val this.selectAllleft() @@ -266,6 +342,7 @@ this.selectAllTeque() }, + //涓讳綋宸� selectAllleft() { this.$axios.get(this.$api.url.selectAllleft,{ @@ -285,9 +362,6 @@ }) }, - event(){ - this.dialogVisible = true - }, modify(){ this.modifyevent = true }, diff --git a/src/components/view/mbom.vue b/src/components/view/mbom.vue index 985a9fd..155fb78 100644 --- a/src/components/view/mbom.vue +++ b/src/components/view/mbom.vue @@ -77,7 +77,7 @@ label="渚涘簲鍟嗗悕绉�" width="180"> <template slot-scope="scope"> - <el-input v-model="scope.row.input" placeholder="" ></el-input> + <el-input v-model="scope.row.supplier" placeholder="" ></el-input> </template> </el-table-column> <el-table-column @@ -85,7 +85,7 @@ label="璐ㄩ噺杩芥函鍙�" width="180"> <template slot-scope="scope"> - <el-input v-model="scope.row.input" placeholder="" ></el-input> + <el-input v-model="scope.row.qualityTraceability" placeholder="" ></el-input> </template> </el-table-column> <el-table-column @@ -99,7 +99,7 @@ prop="address" label="瑙勬牸鍨嬪彿"> <template slot-scope="scope"> - <el-input v-model="scope.row.input" placeholder="" ></el-input> + <el-input v-model="scope.row.specifications" placeholder="" ></el-input> </template> </el-table-column> <el-table-column @@ -186,10 +186,16 @@ process:{}, // handleClose:[], checkTreeNode:{ - name:'鍓ョ紗' + id:2, }, tableData:[], - tableapi:[], + tableapi:[{ + supplier:'', + qualityTraceability:'', + name:'', + specifications:'', + unit:'', + }], search:{ type:'', work:'', @@ -201,7 +207,6 @@ form:{}, dialogVisible:false, typeselect:0, - tableData: [], input:'', craftapi:[], } @@ -229,14 +234,37 @@ } }) }, - //鍒犻櫎 - material() { - this.$axios.post(this.$api.url.material,{ - id:this.upData.id - }, { + addMbom(data) { + this.$axios.post(this.$api.url.addMbom,data + // { + // name:this.tableapi.name, + // qualityTraceability:this.tableapi.qualityTraceability, + // specifications:this.tableapi.specifications, + // supplier:this.tableapi.supplier, + // techTemId:this.craftapi.id, + // unit:this.tableapi.unit, + // } + , { headers: { "Content-Type": "application/json" } + }).then(res =>{ + console.log(res); + this.$message.success('娣诲姞瀹屾垚') + this.selectAllMbom() + this.tableapi = [{}] + }) + }, + //鍒犻櫎 + material(index) { + console.log(this.upData.id); + this.$axios.post(this.$api.url.material,{ + id:this.upData.id + }).then(res =>{ + this.$message.success(res.message) + this.tableData.splice(index,1) + + // console.log(res); }) }, TYpe(val) { @@ -262,6 +290,7 @@ params:{id:this.checkTreeNode.id} }).then(res => { this.tableData = res.data; + console.log(this.tableData); }, { headers: { "Content-Type": "application/json" @@ -285,17 +314,22 @@ this.chooseTechFath() }, Addrow() { - if (this.tableData == undefined) { - this.tableData = new Array(); + if (this.tableapi == undefined) { + this.tableapi = new Array(); } let obj = []; - this.tableData.push(obj); + this.tableapi.push(obj); }, skipshow(){ console.log('666'); - const data = this.tableData.at(-1) - console.log(data); + let data = this.tableapi.at(-1) + // this.addMbom() + data.techTemId = this.search.craft + // console.log(this.search.craft); + // console.log(data); + + this.addMbom(data) this.dialogVisible = false }, @@ -315,9 +349,10 @@ }, deleteRow(index, rows) { console.log(rows); - this.tableData.splice(index,1) + // this.tableData.splice(index,1) this.upData.id = rows.id - this.material() + console.log(this.upData); + this.material(index) }, } diff --git a/src/components/view/record-content.vue b/src/components/view/record-content.vue index ff679d3..ffe9f91 100644 --- a/src/components/view/record-content.vue +++ b/src/components/view/record-content.vue @@ -166,7 +166,7 @@ <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> @@ -178,7 +178,7 @@ <el-col :span="4" style="font-size: 14px;text-align: right;">绫诲瀷:</el-col> <el-col :span="16" :offset="1"> <template> - <el-select v-model="edit.techFathe" placeholder="璇烽�夋嫨绫诲瀷" style="width: 310px;"> + <el-select v-model="edit.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> @@ -188,11 +188,13 @@ </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"> <template> <el-select v-model="edit.techFather" - placeholder="璇烽�夋嫨绫诲瀷" style="width: 310px;"> + placeholder="璇烽�夋嫨绫诲瀷" + @change="workevent" + style="width: 310px;"> <el-option v-for="item in process" :key="item.name" @@ -207,7 +209,7 @@ <el-col :span="4" style="font-size: 14px;text-align: right;">宸ヨ壓:</el-col> <el-col :span="16" :offset="1"> <template> - <el-select v-model="edit.techFathe" placeholder="璇烽�夋嫨绫诲瀷" style="width: 310px;"> + <el-select v-model="edit.techName" placeholder="璇烽�夋嫨绫诲瀷" style="width: 310px;"> <el-option v-for="item in craftapi" :key="item.id" @@ -387,9 +389,13 @@ tableData: [], upIndex: 0, selects: [], + delete:[], typeselect:0, upDia: false, - checkTreeNode:[], + checkTreeNode:{ + id:2, + }, + upData:{}, edit:{ name:'', note:'', @@ -408,10 +414,11 @@ }, mounted() { this.selectAllleft() + this.selectjilu() }, methods: { delQueById() { - this.$axios.get(this.$api.url.chooseTechFath) + this.$axios.get(this.$api.url.delQueById,) }, childrenClick() {}, //鏂板 @@ -459,8 +466,8 @@ id:this.upData.id } }).then(res => { - this.edit = res.data - console.log(this.edit); + this.edit = res.data[0] + // console.log(this.edit); }) }, TYpe(val) { @@ -548,15 +555,38 @@ } } }) + let cc = this.selects.map(el => { + return el.id + }) + this.delete = cc.join(',') + console.log(this.delete); + this.delAllRecord() this.$message.success('鍒犻櫎瀹屾垚') }, - deleteRow(index, rows) { - rows.splice(index, 1); + //鎵归噺鍒犻櫎 + delAllRecord() { + this.$axios.post(this.$api.url.delAllRecord,{ + ids:this.delete + }) }, + + //鍒犻櫎 + delQueById() { + this.$axios.post(this.$api.url.delQueById,{ + id:this.upData.id + }) + }, + deleteRow(index, rows) { + this.tableData.splice(index,1) + this.upData.id = rows.id + this.delQueById() + }, + upContent(ob) { this.upData = ob console.log(this.upData); this.selecRecord() + this.chooseTechFath() this.upDia = true }, submitUpData() { diff --git a/src/components/view/self-inspection.vue b/src/components/view/self-inspection.vue index 7989a10..e52bfac 100644 --- a/src/components/view/self-inspection.vue +++ b/src/components/view/self-inspection.vue @@ -382,7 +382,7 @@ product: [], list: [], checkTreeNode: { - name:'鍓ョ紗', + id:2, }, tableData: [], upIndex: 0, @@ -403,19 +403,16 @@ }, mounted() { this.selectAllleft() + this.selectAllSelf() }, methods: { //鍒犻櫎 delSelfcheck() { console.log(this.upData.id); - this.$axios.post(this.$api.url.addSelfcheck,{ + this.$axios.post(this.$api.url.delSelfcheck,{ id:this.upData.id } - , { - headers: { - "Content-Type": "application/json" - } - } + ) }, deleteRow(index, row) { diff --git a/src/components/view/technology.vue b/src/components/view/technology.vue index debe67f..e9ffa98 100644 --- a/src/components/view/technology.vue +++ b/src/components/view/technology.vue @@ -186,7 +186,7 @@ <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-select v-model="edit.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> @@ -198,7 +198,7 @@ <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-select v-model="edit.father" style="width: 310px;" placeholder="璇烽�夋嫨"> <el-option v-for="item in procedure" :key="item" @@ -211,10 +211,10 @@ <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-select v-model="AAA.id" style="width: 310px;" multiple placeholder="璇烽�夋嫨"> <el-option v-for="item in element" - :key="item.index" + :key="item.id" :label="item.name" :value="item.id"> </el-option> @@ -224,7 +224,7 @@ <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 v-model="upData.name" size="small" clearable></el-input> + <el-input v-model="edit.name" size="small" clearable></el-input> </el-col> </el-row> <el-row style="line-height: 46px;"> @@ -409,10 +409,20 @@ upDia: false, element:[], equipment:[0], - edit:[], + AAA:[{ + id:'', + }], + edit:{ + deviceGroup:'', + elementId:'', + father:'', + name:'', + type:'', + // children:[], + }, upData: { name:'', - device_group:'', + deviceGroup:'', ele:'', father:'', type:'', @@ -514,10 +524,10 @@ 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 + elementId:this.edit.elementId, + father:this.edit.father, + name:this.edit.name, + type:this.edit.type } // id:this.upData.id, } @@ -625,7 +635,6 @@ this.$message.success('鍒犻櫎瀹屾垚') }, deleteRow(index, rows) { - this.tableData.splice(index,1) this.upData.id = rows.id this.delTechById() @@ -635,21 +644,26 @@ params:{ id:this.upData.id, } - } - // , { - // headers: { - // "Content-Type": "application/json" - // } - // } - ).then(res =>{ - this.edit = res.data + }).then(res =>{ + this.edit = res.data[0] + this.AAA = res.data[0].children console.log(this.edit); + console.log(this.AAA); + // this.edit.forEach(el => { + // // el.children.forEach(ele =>{ + // // this.AAA.push(ele) + // console.log(el); + // }) + // console.log(this.AAA.id); + // }) + // console.log(this.edit); }) }, //缂栬緫鍐呭 upContent(ob) { this.upData = ob this.selecTechById() + this.selecTechById() console.log(this.upData); this.upDia = true }, diff --git a/src/main.js b/src/main.js index 905840f..41f2bc4 100644 --- a/src/main.js +++ b/src/main.js @@ -24,7 +24,7 @@ Vue.use(api); // const javaApi = 'http://127.0.0.1:8001/' -const javaApi = 'http://192.168.65.249:8001/' +const javaApi = 'http://192.168.218.251:8001/' -- Gitblit v1.9.3