From 253b9c48b02d995540b84c1831e54e6baf8a1000 Mon Sep 17 00:00:00 2001 From: XiaoRuby <3114200645@qq.com> Date: 星期五, 08 九月 2023 10:21:58 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/view/self-inspection.vue | 164 ++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 122 insertions(+), 42 deletions(-) diff --git a/src/components/view/self-inspection.vue b/src/components/view/self-inspection.vue index be60b33..e52bfac 100644 --- a/src/components/view/self-inspection.vue +++ b/src/components/view/self-inspection.vue @@ -113,7 +113,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="addend">鏂板</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> @@ -126,8 +126,8 @@ <el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option> <el-option label="鍒嗘敮缁勪欢" :value="3"></el-option> </el-select> - <span>宸ュ簭锛�</span> - <el-select v-model="search.name" size="small" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;"> + <!-- <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> <span>椤圭洰锛�</span> @@ -136,7 +136,7 @@ </el-select> <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"> @@ -170,14 +170,15 @@ </el-table-column> <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="upContent(scope.row)">缂栬緫 --> + <!-- </span> --> + <span class="table_do" @click="deleteRow(scope.$index, scope.row)">鍒犻櫎</span> </template> </el-table-column> </el-table> </div> </div> - <el-dialog title="缂栬緫璁板綍鍐呭" :visible.sync="upDia" width="500px"> + <!-- <el-dialog title="缂栬緫璁板綍鍐呭" :visible.sync="upDia" width="500px"> <div class="body"> <el-row style="line-height: 46px;"> <el-col :span="4" style="font-size: 14px;text-align: right;">鍚嶇О:</el-col> @@ -194,13 +195,13 @@ <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.stand" size="small" clearable></el-input> + <el-input v-model="upData.required" 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="16" :offset="1"> - <el-input v-model="upData.ask" size="small" clearable></el-input> + <el-input v-model="upData.internal" size="small" clearable></el-input> </el-col> </el-row> </div> @@ -208,31 +209,31 @@ <el-button type="primary" @click="submitUpData">纭� 瀹�</el-button> <el-button @click="upDia = false">鍙� 娑�</el-button> </span> - </el-dialog> + </el-dialog> --> <!-- 鏂板寮圭獥 --> <el-dialog title="鑷缓鏂板" :visible.sync="dialogVisible" width="35%"> <div> <el-form ref="form" :model="form" label-width="80px"> <el-form-item label="绫诲瀷"> <template> - <el-select v-model="value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 480px;"> - <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> - </el-option> + <el-select v-model="form.value" 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-form-item label="宸ュ簭"> <template> - <el-select v-model="value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 480px;"> + <el-select v-model="form.procedure" + @change="workevent" + placeholder="璇烽�夋嫨绫诲瀷" style="width: 480px;"> <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> + v-for="item in process" + :key="item.name" + :label="item.name" + :value="item.name"> </el-option> </el-select> </template> @@ -241,48 +242,48 @@ <el-col :span="10"> <el-form-item label="宸ヨ壓鍚嶇О"> <template> - <el-select v-model="value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 180px;"> + <el-select v-model="form.name" placeholder="璇烽�夋嫨绫诲瀷" style="width: 180px;"> <el-option - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> + v-for="item in craftapi" + :key="item.id" + :label="item.name" + :value="item.id"> </el-option> </el-select> </template> </el-form-item> </el-col> <el-col :span="10" :offset="3"> - <el-form-item label="鑷缓椤圭洰"> - <el-input v-model="form.name" style="width: 180px;"></el-input> + <el-form-item label="鑷椤圭洰"> + <el-input v-model="form.project" style="width: 180px;"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="10"> <el-form-item label="鍗曚綅"> - <el-input v-model="form.vvvv" style="width: 180px;"></el-input> + <el-input v-model="form.unit" style="width: 180px;"></el-input> </el-form-item> </el-col> <el-col :span="10" :offset="3"> <el-form-item label="鏍囧噯鍊�"> - <el-input v-model="form.aaaa" style="width: 180px;"></el-input> + <el-input v-model="form.standard" style="width: 180px;"></el-input> </el-form-item> </el-col> </el-row> <el-form-item label="鍐呮帶鍊�" > - <el-input v-model="form.aaaa" style="width: 180px;"></el-input> + <el-input v-model="form.control" style="width: 180px;"></el-input> </el-form-item> </el-form> </div> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="dialogVisible = false">纭� 瀹�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> <el-button @click="dialogVisible = false">鍙� 娑�</el-button> </span> </el-dialog> <!-- 淇敼寮圭獥 --> - <el-dialog title="宸ヨ壓璺嚎淇敼" :visible.sync="modifyVisible" width="35%"> + <!-- <el-dialog title="宸ヨ壓璺嚎淇敼" :visible.sync="modifyVisible" width="35%"> <div> <el-form ref="form" :model="form" label-width="80px"> <el-form-item label="绫诲瀷"> @@ -351,7 +352,7 @@ <el-button type="primary" @click="modifyVisible = false">纭� 瀹�</el-button> <el-button @click="modifyVisible = false">鍙� 娑�</el-button> </span> - </el-dialog> + </el-dialog> --> </div> </template> @@ -366,19 +367,31 @@ }, options:[], value:{}, - form:{}, + form:{ + value:'', + procedure:'', + name:'', + project:'', + unit:'', + standard:'', + control:'', + }, modifyVisible:false, dialogVisible:false, process: [], product: [], list: [], - checkTreeNode: {}, + checkTreeNode: { + id:2, + }, tableData: [], upIndex: 0, selects: [], - upDia: false, + upDia: [], typeselect:0, - checkTreeNode:[], + process:[], + craftapi:[], + delete:{}, upData: { id: 0, name: null, @@ -390,8 +403,71 @@ }, mounted() { this.selectAllleft() + this.selectAllSelf() }, methods: { + //鍒犻櫎 + delSelfcheck() { + console.log(this.upData.id); + this.$axios.post(this.$api.url.delSelfcheck,{ + id:this.upData.id + } + + ) + }, + deleteRow(index, row) { + this.tableData.splice(index,1) + this.upData.id = row.id + this.delSelfcheck() + }, + //鎵归噺鍒犻櫎 + delAll() { + this.$axios.post(this.$api.url.delAll,{ + ids:this.delete + }) + }, + + + + //鏂板 + add() { + this.dialogVisible = false + this.addSelfcheck() + }, + addSelfcheck() { + this.$axios.post(this.$api.url.addSelfcheck,{ + internal:this.form.control, + name:this.form.project, + required:this.form.standard, + techTemId:this.form.name, + unit:this.form.unit, + }, { + headers: { + "Content-Type": "application/json" + } + }).then(res=>{ + this.selectAllSelf() + this.form = {} + }) + }, + //宸ュ簭宸ヨ壓 + 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" + } + }) + }, + workevent(val){ + console.log(val); + let idx = this.process.findIndex(el => el.name === val) + this.craftapi = this.process[idx].children + }, TYpe(val) { this.typeselect = val console.log(this.typeselect); @@ -420,6 +496,7 @@ }, addend(){ this.dialogVisible = true + this.chooseTechFath() }, filterNode(value, data) { if (!value) return true; @@ -471,10 +548,13 @@ } } }) + let cc = this.selects.map(el => { + return el.id + }) + this.delete = cc.join(',') + console.log(this.delete); + this.delAll() this.$message.success('鍒犻櫎瀹屾垚') - }, - deleteRow(index, rows) { - rows.splice(index, 1); }, upContent(ob) { this.upData = this.HaveJson(ob) -- Gitblit v1.9.3