From fde4758dd43927cce678d99ffe71e05931616f26 Mon Sep 17 00:00:00 2001 From: “dzb” <2632970487@qq.com> Date: 星期日, 09 十月 2022 10:46:35 +0800 Subject: [PATCH] 创建车辆管理 --- src/views/operate/disposal/casepool/pool/index.vue | 133 ++++++++++++++++++++++---------------------- 1 files changed, 67 insertions(+), 66 deletions(-) diff --git a/src/views/operate/disposal/casepool/pool/index.vue b/src/views/operate/disposal/casepool/pool/index.vue index f85ea4e..89d9262 100644 --- a/src/views/operate/disposal/casepool/pool/index.vue +++ b/src/views/operate/disposal/casepool/pool/index.vue @@ -26,9 +26,10 @@ <el-dialog :before-close="handleClose" :visible.sync="dialogNewAdd" :title="newAddType === 0 ? '杩濊浜嬩欢鐧昏' : '杩濆缓浜嬩欢鐧昏' " width="60%" v-if="dialogNewAdd"> <!-- 杩濆缓鐧昏 --> - <MyIll v-if="newAddType === 1" :mytype=newAddType @changeDialog=changeDialog /> + <MyIll v-if="newAddType === 1" :refresh="getUserList" :mytype=newAddType + @changeDialog=changeDialog /> <!-- 杩濊鐧昏 --> - <myVio v-else :mytype=newAddType @changeDialog=changeDialog /> + <myVio v-else :mytype=newAddType @changeDialog=changeDialog :refresh="getUserList" /> </el-dialog> </div> </div> @@ -94,13 +95,13 @@ <!-- 璋冨害 --> <el-dialog :visible.sync="dialogDispatch" width="80%" title="璋冨害淇℃伅" v-if="dialogDispatch" :before-close="handleClose"> - <MyDispatch :id="baseId" @changeDialog="changeDialog"></MyDispatch> + <MyDispatch :id="baseId" @changeDialog="changeDialog" :refresh="getUserList"></MyDispatch> </el-dialog> <!-- tools --> <div class="tools"> <div class="funs"> <div class="funsItem"> - <el-checkbox v-model="all" @change="selectAll()">鍏ㄩ��</el-checkbox> + <el-checkbox v-model="all" @change="selectAll()" :disabled="tableData.length !== 0 ? false : true">鍏ㄩ��</el-checkbox> </div> <div class="funsItem"> <el-checkbox v-model="unsame" @change="disSame(tableData)">鍙嶉��</el-checkbox> @@ -152,7 +153,7 @@ dialogCreate: false, dialogView: false, dialogNewAdd: false, - dialogDispatch:false, + dialogDispatch: false, newAddType: 0, totalNum: null, pageSize: 10, @@ -223,7 +224,7 @@ ], mystatus: '', statusArr: [], - baseId:0 + baseId: 0 } }, @@ -267,7 +268,7 @@ .then(_ => { this.$axios({ method: 'delete', - url: 'sccg/base-case/batch_deletion?ids=' + idArr + '&type=' + statusArr[1], + url: 'sccg/base_case/batch_deletion?ids=' + idArr + '&type=' + statusArr[1], }).then(res => { if (res.code === 200) { this.getUserList(); @@ -305,7 +306,7 @@ tableChange(list) { this.tempList = []; list.forEach(item => { - this.tempList.push(item.code); + this.tempList.push(item.id); }) if (list.length === this.tableData.length) { this.all = true; @@ -335,10 +336,10 @@ this.tableData = res.data.records; console.log(res); }) - .catch(err=>{ - console.log(err) - this.tableData = []; - }) + .catch(err => { + console.log(err) + this.tableData = []; + }) }, // 璁剧疆琛ㄦ牸鏂戦┈绾� tableRowClassName({ row, rowIndex }) { @@ -369,12 +370,12 @@ this.currentPage = page; this.getUserList(); }, - changeDialog(val) { - this.dialogNewAdd = val.dialogView; - this.dialogCreate = val.dialogView; - this.dialogView = val.dialogView; - this.dialogDispatch = val.dialogView; - this.getUserList(); + changeDialog({ flag }) { + this.dialogNewAdd = flag; + this.dialogCreate = flag; + this.dialogView = flag; + this.dialogDispatch = flag; + // this.getUserList(); }, handleClose(done) { this.$confirm('纭鍏抽棴锛�') @@ -431,62 +432,62 @@ }) }, // 鍦ㄥ涔� - handleLearn({id}){ + handleLearn({ id }) { console.log(id); this.$axios({ - method:'put', - url:'sccg/base_case/case_status_update?caseId='+id + '&state='+3 + method: 'put', + url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 3 }) - .then(res=>{ - console.log(res); - if(res.code === 200){ - this.$notify({ - title:'娓╅Θ鎻愮ず', - message:'姝や簨浠跺凡蹇界暐,杩斿洖绯荤粺鍦ㄥ涔�', - type:'success', - position: 'bottom-right' - }) - // this.$message({ - // type:'success', - // message:'鎿嶄綔鎴愬姛', - // }) - this.getUserList(); - }else{ - this.$message({ - type:'error', - message:'鎿嶄綔澶辫触' - }) - } - }) + .then(res => { + console.log(res); + if (res.code === 200) { + this.$notify({ + title: '娓╅Θ鎻愮ず', + message: '姝や簨浠跺凡蹇界暐,杩斿洖绯荤粺鍦ㄥ涔�', + type: 'success', + position: 'bottom-right' + }) + // this.$message({ + // type:'success', + // message:'鎿嶄綔鎴愬姛', + // }) + this.getUserList(); + } else { + this.$message({ + type: 'error', + message: '鎿嶄綔澶辫触' + }) + } + }) }, // 鏆備笉澶勭悊 - handleNotDeal({id}){ + handleNotDeal({ id }) { console.log(id); this.$axios({ - method:'put', - url:'sccg/base_case/case_status_update?caseId='+id + '&state='+4 + method: 'put', + url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 4 }) - .then(res=>{ - console.log(res); - if(res.code === 200){ - this.$notify({ - title:'娓╅Θ鎻愮ず', - message:'姝や簨浠舵殏涓嶅鐞�,璇峰墠寰�鏆備笉澶勭悊鐣岄潰鏌ョ湅璇︽儏', - type:'success', - position: 'bottom-right' - }) - // this.$message({ - // type:'success', - // message:'鎿嶄綔鎴愬姛', - // }) - this.getUserList(); - }else{ - this.$message({ - type:'error', - message:'鎿嶄綔澶辫触' - }) - } - }) + .then(res => { + console.log(res); + if (res.code === 200) { + this.$notify({ + title: '娓╅Θ鎻愮ず', + message: '姝や簨浠舵殏涓嶅鐞�,璇峰墠寰�鏆備笉澶勭悊鐣岄潰鏌ョ湅璇︽儏', + type: 'success', + position: 'bottom-right' + }) + // this.$message({ + // type:'success', + // message:'鎿嶄綔鎴愬姛', + // }) + this.getUserList(); + } else { + this.$message({ + type: 'error', + message: '鎿嶄綔澶辫触' + }) + } + }) } } } -- Gitblit v1.8.0