增加批量审核按钮

This commit is contained in:
BianLzhaoMin 2025-02-11 15:17:24 +08:00
parent b674045ca3
commit 3967e0e333
4 changed files with 194 additions and 147 deletions

View File

@ -4,7 +4,7 @@ export function getList(query) {
return request({
url: '/project/sub/enterPersonList',
method: 'get',
params: query
params: query,
})
}
@ -16,7 +16,7 @@ export function getProOptions(params) {
return request({
url: '/system/select/getProOptions',
method: 'post',
data: params
data: params,
})
}
/**
@ -27,7 +27,7 @@ export function getConsOptions(params) {
return request({
url: '/system/select/getConsOptions',
method: 'post',
data: params
data: params,
})
}
/**
@ -38,6 +38,16 @@ export function getSubOptions(params) {
return request({
url: '/system/select/getSubOptions',
method: 'post',
data: params
data: params,
})
}
/**
* 批量审核接口
*/
export function batchAuditingApi(data) {
return request({
url: '/project/sub/submitPersonApprovalBach',
method: 'post',
data,
})
}

View File

@ -1,6 +1,6 @@
import { Message, MessageBox, Notification, Loading } from 'element-ui'
let loadingInstance;
let loadingInstance
export default {
// 消息提示
@ -9,6 +9,7 @@ export default {
},
// 错误消息
msgError(content) {
Message.closeAll()
Message.error(content)
},
// 成功消息
@ -21,19 +22,19 @@ export default {
},
// 弹出提示
alert(content) {
MessageBox.alert(content, "系统提示")
MessageBox.alert(content, '系统提示')
},
// 错误提示
alertError(content) {
MessageBox.alert(content, "系统提示", { type: 'error' })
MessageBox.alert(content, '系统提示', { type: 'error' })
},
// 成功提示
alertSuccess(content) {
MessageBox.alert(content, "系统提示", { type: 'success' })
MessageBox.alert(content, '系统提示', { type: 'success' })
},
// 警告提示
alertWarning(content) {
MessageBox.alert(content, "系统提示", { type: 'warning' })
MessageBox.alert(content, '系统提示', { type: 'warning' })
},
// 通知提示
notify(content) {
@ -41,7 +42,7 @@ export default {
},
// 错误通知
notifyError(content) {
Notification.error(content);
Notification.error(content)
},
// 成功通知
notifySuccess(content) {
@ -53,19 +54,19 @@ export default {
},
// 确认窗体
confirm(content) {
return MessageBox.confirm(content, "系统提示", {
return MessageBox.confirm(content, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
dangerouslyUseHTMLString: true
type: 'warning',
dangerouslyUseHTMLString: true,
})
},
// 提交内容
prompt(content) {
return MessageBox.prompt(content, "系统提示", {
return MessageBox.prompt(content, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
type: 'warning',
})
},
// 打开遮罩层
@ -73,12 +74,12 @@ export default {
loadingInstance = Loading.service({
lock: true,
text: content,
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
})
},
// 关闭遮罩层
closeLoading() {
loadingInstance.close();
}
loadingInstance.close()
},
}

View File

@ -4,8 +4,10 @@
<el-form-item label="施工人员姓名" label-width="120px" prop="name">
<el-input
v-model="personQueryParams.name"
placeholder="请输入施工人员姓名" v-no-whitespace
maxlength="20" show-word-limit
placeholder="请输入施工人员姓名"
v-no-whitespace
maxlength="20"
show-word-limit
clearable
@keyup.enter.native="handleQueryPerson"
/>
@ -22,20 +24,19 @@
</el-form-item>
<el-form-item label="审批状态" prop="status">
<el-select v-model="personQueryParams.status" placeholder="请选择审批状态" clearable>
<el-option
v-for="dict in statusDict"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<el-option v-for="dict in statusDict" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item style="display: flex; justify-content: flex-end;">
<el-form-item style="display: flex; justify-content: flex-end">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="onHandleBatchAuditing" plain>
批量审核
</el-button>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryPerson">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryPerson">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="personList">
<el-table v-loading="loading" :data="personList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column
type="index"
width="55"
@ -50,22 +51,22 @@
<el-table-column label="特殊工种种类" width="100" align="center" prop="specialJobType" />
<el-table-column label="体检文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row,1)">查看</el-button>
<el-button size="mini" @click="handleShow(scope.row, 1)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="保险文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row,2)">查看</el-button>
<el-button size="mini" @click="handleShow(scope.row, 2)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="特殊工种文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row,3)">查看</el-button>
<el-button size="mini" @click="handleShow(scope.row, 3)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="其他文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row,4)">查看</el-button>
<el-button size="mini" @click="handleShow(scope.row, 4)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="性别" width="50" align="center" prop="sex" />
@ -78,7 +79,8 @@
</template>
</el-table-column>
<el-table-column label="籍贯" width="70" align="center" prop="nativePlace" />
<el-table-column label="身份证号码" width="160" align="center" ><template slot-scope="scope">
<el-table-column label="身份证号码" width="160" align="center">
<template slot-scope="scope">
<!-- 检查是否存在身份证号 -->
<span v-if="scope.row.idCard">{{ hideSensitiveInfo(scope.row.idCard) }}</span>
<span v-else>-</span>
@ -90,9 +92,17 @@
<el-table-column label="人脸照片" align="center" prop="facePath">
<template slot-scope="scope">
<el-popover placement="right" title="" trigger="hover">
<img :src="`${scope.row.facePath ? lookFaceFile+scope.row.facePath : ''}`" :min-width="300" :height="300" alt="照片" />
<img slot="reference" :src="`${scope.row.facePath ? lookFaceFile+scope.row.facePath : ''}`" style="max-height: 50px; max-width: 50px"
:alt="`${scope.row.facePath ? lookFaceFile+scope.row.facePath : ''}`"
<img
:src="`${scope.row.facePath ? lookFaceFile + scope.row.facePath : ''}`"
:min-width="300"
:height="300"
alt="照片"
/>
<img
slot="reference"
:src="`${scope.row.facePath ? lookFaceFile + scope.row.facePath : ''}`"
style="max-height: 50px; max-width: 50px"
:alt="`${scope.row.facePath ? lookFaceFile + scope.row.facePath : ''}`"
/>
</el-popover>
</template>
@ -100,65 +110,63 @@
<el-table-column label="审批状态" align="center" prop="intoStatus">
<template slot-scope="scope">
<!-- 检查是否存在身份证号 -->
<span v-if="scope.row.intoStatus">{{ updateStatus(scope.row.intoStatus)
}}</span>
<span v-if="scope.row.intoStatus">{{ updateStatus(scope.row.intoStatus) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150" align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="scope.row.status==='1'"
<el-button
v-if="scope.row.status === '1'"
size="mini"
type="text"
v-hasPermi="['system:subPersonApply:list']"
@click="handleApprove(scope.row)"
>审批
</el-button>
<el-button
size="mini"
type="text"
@click="handleView(scope.row)"
v-else
>查看
</el-button>
<el-button
size="mini"
type="text"
@click="handleAuditRecord(scope.row)"
>审核记录
>
审批
</el-button>
<el-button size="mini" type="text" @click="handleView(scope.row)" v-else>查看</el-button>
<el-button size="mini" type="text" @click="handleAuditRecord(scope.row)">审核记录</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="personTotal>0"
v-show="personTotal > 0"
:total="personTotal"
:page.sync="personQueryParams.pageNum"
:limit.sync="personQueryParams.pageSize"
@pagination="getList"
/>
<bns-person-approval-tabs :items="personQueryParams" v-on:pass="approval" v-on:turnDown="turnDown" v-on:finalInstance="finalInstance"/>
<bns-person-approval-tabs
:items="personQueryParams"
v-on:pass="approval"
v-on:turnDown="turnDown"
v-on:finalInstance="finalInstance"
/>
<el-dialog title="文件查看" :visible.sync="document" width="80%" top="5vh" append-to-body>
<div style="width: 100%;height:720px">
<div style="width: 100%; height: 720px">
<bns-file-list-tabs :items="fileList" />
</div>
</el-dialog>
<el-dialog title="文件查看" :visible.sync="documentPreview" width="80%" top="5vh" append-to-body>
<div style="width: 100%;height:720px">
<div style="width: 100%; height: 720px">
<bns-kkFile-preview :items="kkFilePreview"></bns-kkFile-preview>
</div>
</el-dialog>
</div>
</template>
<script>
import { hideSensitiveInfo, indexContinuous, lookFaceFile } from '@/utils/bonus'
import bnsConsPersonDetailsTabs from '@/components/pro-tabs/bns-cons-person-details-tabs.vue'
import bnsGenerateWorkCardTabs from '@/components/pro-tabs/bns-generate-work-card-tabs.vue'
import { getProOptions, getConsOptions, getSubOptions, getList } from '@/api/pro/subManagement/approval/personApproval'
import {
getProOptions,
getConsOptions,
getSubOptions,
getList,
batchAuditingApi,
} from '@/api/pro/subManagement/approval/personApproval'
import BnsPersonApprovalTabs from '@/components/pro-tabs/bns-person-approval-tabs.vue'
import { dictTableOption, selectFile } from '@/api/tool/select'
@ -167,10 +175,11 @@ import bnsFileListTabs from '@/components/pro-tabs/bns-file-list-tabs.vue'
import bnsKkFilePreview from '@/components/pro-tabs/bns-kkFile-preview.vue'
export default {
components: {
bnsKkFilePreview, bnsFileListTabs,
bnsKkFilePreview,
bnsFileListTabs,
BnsPersonApprovalTabs,
bnsConsPersonDetailsTabs,
bnsGenerateWorkCardTabs
bnsGenerateWorkCardTabs,
},
data() {
return {
@ -183,8 +192,8 @@ export default {
consName: undefined,
},
personList: [],
proOptions: [],//
consOptions: [],//
proOptions: [], //
consOptions: [], //
//
statusDict: [],
personTotal: 0,
@ -196,16 +205,19 @@ export default {
kkFilePreview: {
filePreviewUrl: '',
fileName: '',
showDownloadButton: false
showDownloadButton: false,
},
auditStatusDict: {
'1': '待审批',
'2': '审批中',
'3': '已通过',
'4': '已驳回',
'5': '已撤销'
1: '待审批',
2: '审批中',
3: '已通过',
4: '已驳回',
5: '已撤销',
},
lookFaceFile:''
lookFaceFile: '',
//
selectList: [],
}
},
created() {
@ -228,13 +240,13 @@ export default {
1: '体检文件',
2: '保险文件',
3: '特殊工种文件',
4: '其他文件'
4: '其他文件',
}
selectFile({
classification: 9,
uuid: row.uuid,
informationType: informationType,
fromType: 2
fromType: 2,
}).then(response => {
console.log(response)
if (response.data.length === 0) {
@ -244,7 +256,7 @@ export default {
this.kkFilePreview = {
filePreviewUrl: response.data[0].filePath,
fileName: response.data[0].fileName,
showDownloadButton: false
showDownloadButton: false,
}
this.documentPreview = true
} else {
@ -254,12 +266,10 @@ export default {
this.loading = false
})
},
finalInstance(e) {
},
turnDown(e) {
},
approval(e){
console.log("============================")
finalInstance(e) {},
turnDown(e) {},
approval(e) {
console.log('============================')
// console.log("tongg")
// console.log(JSON.stringify(e))
// console.log(JSON.stringify(this.paramsData))
@ -282,18 +292,18 @@ export default {
// })
},
//
getProOption(){
getProOption() {
const params = {
id: ''
id: '',
}
getProOptions(params).then(res => {
this.proOptions = res.data
})
},
//
getConsOption(){
getConsOption() {
const params = {
id: ''
id: '',
}
getConsOptions(params).then(res => {
this.consOptions = res.data
@ -303,88 +313,114 @@ export default {
getStatus() {
const params = {
dictType: 'sys_approval_state',
dictValue: ''
dictValue: '',
}
dictTableOption(params).then(response => {
this.statusDict = response.data;
});
this.statusDict = response.data
})
},
/** 人员入场查询 */
getList(){
getList() {
const proId = this.$store.state.user.thisIds.proId
const consUuid = this.$store.state.user.thisIds.consUuid
const supUuid = this.$store.state.user.thisIds.supUuid
let userType = this.$store.state.user.userType
if(userType ==='' || userType==="null" || userType ===undefined){
userType = "00";
if (userType === '' || userType === 'null' || userType === undefined) {
userType = '00'
}
const params = {
proId : proId,
consUuid : consUuid,
proId: proId,
consUuid: consUuid,
supUuid: supUuid,
userType:userType,
userType: userType,
type: '入场',
...this.personQueryParams
...this.personQueryParams,
}
console.log("人员入场查询=="+JSON.stringify(params))
console.log('人员入场查询==' + JSON.stringify(params))
getList(params).then(res => {
console.log("人员入场查询=="+res)
console.log('人员入场查询==' + res)
this.personList = res.rows
this.personTotal = res.total
this.loading = false
})
},
//
handleQueryPerson(){
this.loading = true;
this.personQueryParams.pageNum = 1;
this.getList();
handleQueryPerson() {
this.loading = true
this.personQueryParams.pageNum = 1
this.getList()
},
//
resetQueryPerson(){
this.loading = true;
this.resetForm("personQueryForm");
this.handleQueryPerson();
resetQueryPerson() {
this.loading = true
this.resetForm('personQueryForm')
this.handleQueryPerson()
},
//
handleApprove(row){
console.log("审核++"+JSON.stringify(row))
this.$router.push("/system/subManagement-personApproval-auth/personApproval/" + encryptCBC(JSON.stringify({
uuid:row.uuid,
taskId:row.taskId,
procInstId:row.procInsId,
contUuid:row.contUuid,
showType:2,
isExamine:true,
btnShow:true,
finalCheck: row.finalCheck
})));
handleApprove(row) {
console.log('审核++' + JSON.stringify(row))
this.$router.push(
'/system/subManagement-personApproval-auth/personApproval/' +
encryptCBC(
JSON.stringify({
uuid: row.uuid,
taskId: row.taskId,
procInstId: row.procInsId,
contUuid: row.contUuid,
showType: 2,
isExamine: true,
btnShow: true,
finalCheck: row.finalCheck,
})
)
)
},
//
handleView(row){
this.$router.push("/system/subManagement-personApproval-auth/personApproval/" + encryptCBC(JSON.stringify({
uuid:row.uuid,
taskId:row.taskId,
procInstId:row.procInsId,
contUuid:row.contUuid,
showType:1,
isExamine:false,
btnShow:false,
finalCheck: row.finalCheck
})));
handleView(row) {
this.$router.push(
'/system/subManagement-personApproval-auth/personApproval/' +
encryptCBC(
JSON.stringify({
uuid: row.uuid,
taskId: row.taskId,
procInstId: row.procInsId,
contUuid: row.contUuid,
showType: 1,
isExamine: false,
btnShow: false,
finalCheck: row.finalCheck,
})
)
)
},
//
handleAuditRecord(row){
this.$router.push("/flow/auditRecord/" + encryptCBC(JSON.stringify({
handleAuditRecord(row) {
this.$router.push(
'/flow/auditRecord/' +
encryptCBC(
JSON.stringify({
taskId: row.taskId,
checkType:'2'
})));
checkType: '2',
})
)
)
},
//
handleSelectionChange(list) {
this.selectList = list
},
//
async onHandleBatchAuditing() {
if (this.selectList.length < 1) {
this.$modal.msgError('请勾选需要审核的数据!')
return
}
console.log(this.selectList, 'this.selectList')
// const res = batchAuditingApi()
},
},
}
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

View File

@ -38,10 +38,10 @@ module.exports = {
// target: `http://localhost:18080`,
// target: 'http://192.168.0.176:18080',
// target: 'http://192.168.0.58:19090', // 杰
target: 'http://192.168.0.14:18080', // 测试环境
// target: 'http://192.168.0.14:18080', // 测试环境
// target: 'http://218.21.27.6:1999/prod-api', // 生产环境
// target: 'http://192.168.0.38:18080', // 郝志权
// target: 'http://192.168.2.122:18080', // 梁超
target: 'http://192.168.2.122:18080', // 梁超
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '',