From c8b74b57eefa7b2e06dbc82c3f0def7db65f978f Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Thu, 6 Nov 2025 17:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E5=8F=96=E4=BB=BB=E5=8A=A1=E5=A4=9A?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certificateTask/index.vue | 86 ++++++++----------- 1 file changed, 35 insertions(+), 51 deletions(-) diff --git a/src/views/certificate/certificateReturnManage/certificateTask/index.vue b/src/views/certificate/certificateReturnManage/certificateTask/index.vue index 8d66f69..76301aa 100644 --- a/src/views/certificate/certificateReturnManage/certificateTask/index.vue +++ b/src/views/certificate/certificateReturnManage/certificateTask/index.vue @@ -41,6 +41,7 @@ type="danger" plain size="mini" + :disabled="multiple" @click="handleBatchDel" >撤回任务 @@ -50,8 +51,7 @@ plain icon="el-icon-download" size="mini" - @click="handleExport" - v-hasPermi="['system:dict:export']" + @click="handleExport" >导出 @@ -60,6 +60,7 @@ plain icon="el-icon-plus" size="mini" + :disabled="multiple" @click="handleTask" >出入境核验 @@ -71,16 +72,15 @@
取证任务数/已完成数:235/230
- - - + + - - - + + + @@ -188,6 +188,7 @@ userIds: [], exitTimes:[], entryTimes:[], + chosenList:[], // 非单个禁用 single: true, // 非多个禁用 @@ -306,25 +307,10 @@ }; }, mounted(){ - this.getList(); - + this.getList(); }, - methods: { - selectablerow(row,index){ - if(row.processState=="2"||row.processState=="1"){ - return false; - }else{ - return true; - } - }, - selectablerow2(row,index){ - if(row.checkState=="0"||row.checkState=="1"){ - return false; - }else{ - return true; - } - }, + methods: { /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -438,8 +424,7 @@ }); }, /** 删除按钮操作 */ - handleDelete(row) { - // const dictIds = row.dictId || this.ids; + handleDelete(row) { this.$modal.confirm('是否确认删除数据项?').then(function() { return deleteCertificateInfoApi({deviceId:row.deviceId}); }).then(() => { @@ -483,26 +468,25 @@ }, /** 批量撤回 */ handleBatchDel(){ - const taskNos = this.ids - if(taskNos!=null&&taskNos.length>0){ - - }else{ - this.$modal.msgError("请选择证件"); - return; - } - this.$modal.confirm('是否确定撤回任务?').then(() => { + console.log(this.chosenList) + let index = this.chosenList.findIndex(v=>v.processState=='2'||v.processState=='1') + console.log(index) + if(index>-1){ + this.$modal.msgError("撤回只能选择未执行任务!"); + }else{ + const taskNos = this.chosenList.map(item => item.taskNo) + this.$modal.confirm('是否确定撤回任务?').then(() => { getCertificateTakeReturnPageApi({"taskNos":taskNos}).then(response => { this.getList(); this.$modal.msgSuccess("撤回成功"); }); }).catch(() => {}); + } }, // 多选框选中数据 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.taskNo); - this.userIds=selection.map(item => item.userId); - this.exitTimes=selection.map(item => item.exitTime); - this.entryTimes=selection.map(item => item.entryTime); + handleSelectionChange(selection) { + this.chosenList = selection; + this.single = selection.length!=1 this.multiple = !selection.length }, @@ -523,8 +507,15 @@ }, /** 远程校验按钮操作 */ handleTask() { + console.log(this.chosenList) + let index = this.chosenList.findIndex(v=>v.type==1||v.type==2) + console.log(index) + if(index>-1){ + this.$modal.msgError("请选择取证任务核验出入境!"); + }else{ this.resetTask() this.openTask = true + } }, // 取消按钮 cancelTask() { @@ -542,19 +533,12 @@ submitTask: function () { this.$refs['taskForm'].validate((valid) => { let param = Object.assign({},this.taskForm) - console.log(param) - console.log(this.userIds) if (valid) { - param.userIds=this.userIds; - param.exitTimes=this.exitTimes; - param.entryTimes=this.entryTimes; - for(var k=0;k item.userId); + param.exitTimes=this.chosenList.map(item => item.exitTime); + param.entryTimes=this.chosenList.map(item => item.entryTime); param.checkType="3"; + console.log(param) addCertificateCheckApi(param).then(response => { if(response.code=200){ this.$modal.msgSuccess("验证下发成功");