存取任务多选

This commit is contained in:
zzyuan 2025-11-06 17:54:54 +08:00
parent ce9e86cdbc
commit c8b74b57ee
1 changed files with 35 additions and 51 deletions

View File

@ -41,6 +41,7 @@
type="danger" type="danger"
plain plain
size="mini" size="mini"
:disabled="multiple"
@click="handleBatchDel" @click="handleBatchDel"
>撤回任务</el-button> >撤回任务</el-button>
</el-col> </el-col>
@ -50,8 +51,7 @@
plain plain
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -60,6 +60,7 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
:disabled="multiple"
@click="handleTask" @click="handleTask"
>出入境核验 >出入境核验
</el-button> </el-button>
@ -71,16 +72,15 @@
<div style="font-weight: bold;">取证任务数/已完成数235/230</div> <div style="font-weight: bold;">取证任务数/已完成数235/230</div>
</div> </div>
<el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800"> <el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800">
<el-table-column type="selection" width="25" align="center" :selectable="selectablerow"/> <el-table-column type="selection" width="60" align="center" fixed="left"/>
<el-table-column type="selection" width="25" align="center" :selectable="selectablerow2"/> <el-table-column label="序号" align="center" width="80" type="index" fixed="left">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span> <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务编号" align="center" prop="taskNo" :show-overflow-tooltip="true" width="180" /> <el-table-column label="任务编号" align="center" prop="taskNo" :show-overflow-tooltip="true" width="180" fixed="left"/>
<el-table-column label="姓名" align="center" prop="name" :show-overflow-tooltip="true" width="120" /> <el-table-column label="姓名" align="center" prop="name" :show-overflow-tooltip="true" width="120" fixed="left"/>
<el-table-column label="身份证号" align="center" prop="idNumber" :show-overflow-tooltip="true" width="180" /> <el-table-column label="身份证号" align="center" prop="idNumber" :show-overflow-tooltip="true" width="180" fixed="left"/>
<!-- <el-table-column label="出生日期" align="center" prop="birthday" :show-overflow-tooltip="true" width="120"/> <!-- <el-table-column label="出生日期" align="center" prop="birthday" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="出生地点" align="center" prop="birthAddr" :show-overflow-tooltip="true"/> --> <el-table-column label="出生地点" align="center" prop="birthAddr" :show-overflow-tooltip="true"/> -->
<el-table-column label="证件类型" align="center" prop="certificateTypeName" :show-overflow-tooltip="true"/> <el-table-column label="证件类型" align="center" prop="certificateTypeName" :show-overflow-tooltip="true"/>
@ -188,6 +188,7 @@
userIds: [], userIds: [],
exitTimes:[], exitTimes:[],
entryTimes:[], entryTimes:[],
chosenList:[],
// //
single: true, single: true,
// //
@ -306,25 +307,10 @@
}; };
}, },
mounted(){ mounted(){
this.getList(); this.getList();
}, },
methods: { 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;
}
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -438,8 +424,7 @@
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
// const dictIds = row.dictId || this.ids;
this.$modal.confirm('是否确认删除数据项?').then(function() { this.$modal.confirm('是否确认删除数据项?').then(function() {
return deleteCertificateInfoApi({deviceId:row.deviceId}); return deleteCertificateInfoApi({deviceId:row.deviceId});
}).then(() => { }).then(() => {
@ -483,26 +468,25 @@
}, },
/** 批量撤回 */ /** 批量撤回 */
handleBatchDel(){ handleBatchDel(){
const taskNos = this.ids console.log(this.chosenList)
if(taskNos!=null&&taskNos.length>0){ let index = this.chosenList.findIndex(v=>v.processState=='2'||v.processState=='1')
console.log(index)
}else{ if(index>-1){
this.$modal.msgError("请选择证件"); this.$modal.msgError("撤回只能选择未执行任务!");
return; }else{
} const taskNos = this.chosenList.map(item => item.taskNo)
this.$modal.confirm('是否确定撤回任务?').then(() => { this.$modal.confirm('是否确定撤回任务?').then(() => {
getCertificateTakeReturnPageApi({"taskNos":taskNos}).then(response => { getCertificateTakeReturnPageApi({"taskNos":taskNos}).then(response => {
this.getList(); this.getList();
this.$modal.msgSuccess("撤回成功"); this.$modal.msgSuccess("撤回成功");
}); });
}).catch(() => {}); }).catch(() => {});
}
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskNo); this.chosenList = selection;
this.userIds=selection.map(item => item.userId);
this.exitTimes=selection.map(item => item.exitTime);
this.entryTimes=selection.map(item => item.entryTime);
this.single = selection.length!=1 this.single = selection.length!=1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -523,8 +507,15 @@
}, },
/** 远程校验按钮操作 */ /** 远程校验按钮操作 */
handleTask() { 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.resetTask()
this.openTask = true this.openTask = true
}
}, },
// //
cancelTask() { cancelTask() {
@ -542,19 +533,12 @@
submitTask: function () { submitTask: function () {
this.$refs['taskForm'].validate((valid) => { this.$refs['taskForm'].validate((valid) => {
let param = Object.assign({},this.taskForm) let param = Object.assign({},this.taskForm)
console.log(param)
console.log(this.userIds)
if (valid) { if (valid) {
param.userIds=this.userIds; param.userIds=this.chosenList.map(item => item.userId);
param.exitTimes=this.exitTimes; param.exitTimes=this.chosenList.map(item => item.exitTime);
param.entryTimes=this.entryTimes; param.entryTimes=this.chosenList.map(item => item.entryTime);
for(var k=0;k<this.exitTimes.length;k++){
if(this.exitTimes[k]==null){
this.$modal.msgError("请选择取证列表!");
return;
}
}
param.checkType="3"; param.checkType="3";
console.log(param)
addCertificateCheckApi(param).then(response => { addCertificateCheckApi(param).then(response => {
if(response.code=200){ if(response.code=200){
this.$modal.msgSuccess("验证下发成功"); this.$modal.msgSuccess("验证下发成功");