存取任务多选
This commit is contained in:
parent
ce9e86cdbc
commit
c8b74b57ee
|
|
@ -41,6 +41,7 @@
|
|||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchDel"
|
||||
>撤回任务</el-button>
|
||||
</el-col>
|
||||
|
|
@ -50,8 +51,7 @@
|
|||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:dict:export']"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -60,6 +60,7 @@
|
|||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleTask"
|
||||
>出入境核验
|
||||
</el-button>
|
||||
|
|
@ -71,16 +72,15 @@
|
|||
<div style="font-weight: bold;">取证任务数/已完成数:235/230</div>
|
||||
</div>
|
||||
<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="25" align="center" :selectable="selectablerow2"/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table-column type="selection" width="60" align="center" fixed="left"/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务编号" align="center" prop="taskNo" :show-overflow-tooltip="true" width="180" />
|
||||
<el-table-column label="姓名" align="center" prop="name" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="身份证号" align="center" prop="idNumber" :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" fixed="left"/>
|
||||
<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="birthAddr" :show-overflow-tooltip="true"/> -->
|
||||
<el-table-column label="证件类型" align="center" prop="certificateTypeName" :show-overflow-tooltip="true"/>
|
||||
|
|
@ -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<this.exitTimes.length;k++){
|
||||
if(this.exitTimes[k]==null){
|
||||
this.$modal.msgError("请选择取证列表!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
param.userIds=this.chosenList.map(item => 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("验证下发成功");
|
||||
|
|
|
|||
Loading…
Reference in New Issue