增加批量审核按钮

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({ return request({
url: '/project/sub/enterPersonList', url: '/project/sub/enterPersonList',
method: 'get', method: 'get',
params: query params: query,
}) })
} }
@ -16,7 +16,7 @@ export function getProOptions(params) {
return request({ return request({
url: '/system/select/getProOptions', url: '/system/select/getProOptions',
method: 'post', method: 'post',
data: params data: params,
}) })
} }
/** /**
@ -27,7 +27,7 @@ export function getConsOptions(params) {
return request({ return request({
url: '/system/select/getConsOptions', url: '/system/select/getConsOptions',
method: 'post', method: 'post',
data: params data: params,
}) })
} }
/** /**
@ -38,6 +38,16 @@ export function getSubOptions(params) {
return request({ return request({
url: '/system/select/getSubOptions', url: '/system/select/getSubOptions',
method: 'post', 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' import { Message, MessageBox, Notification, Loading } from 'element-ui'
let loadingInstance; let loadingInstance
export default { export default {
// 消息提示 // 消息提示
@ -9,6 +9,7 @@ export default {
}, },
// 错误消息 // 错误消息
msgError(content) { msgError(content) {
Message.closeAll()
Message.error(content) Message.error(content)
}, },
// 成功消息 // 成功消息
@ -21,19 +22,19 @@ export default {
}, },
// 弹出提示 // 弹出提示
alert(content) { alert(content) {
MessageBox.alert(content, "系统提示") MessageBox.alert(content, '系统提示')
}, },
// 错误提示 // 错误提示
alertError(content) { alertError(content) {
MessageBox.alert(content, "系统提示", { type: 'error' }) MessageBox.alert(content, '系统提示', { type: 'error' })
}, },
// 成功提示 // 成功提示
alertSuccess(content) { alertSuccess(content) {
MessageBox.alert(content, "系统提示", { type: 'success' }) MessageBox.alert(content, '系统提示', { type: 'success' })
}, },
// 警告提示 // 警告提示
alertWarning(content) { alertWarning(content) {
MessageBox.alert(content, "系统提示", { type: 'warning' }) MessageBox.alert(content, '系统提示', { type: 'warning' })
}, },
// 通知提示 // 通知提示
notify(content) { notify(content) {
@ -41,7 +42,7 @@ export default {
}, },
// 错误通知 // 错误通知
notifyError(content) { notifyError(content) {
Notification.error(content); Notification.error(content)
}, },
// 成功通知 // 成功通知
notifySuccess(content) { notifySuccess(content) {
@ -53,19 +54,19 @@ export default {
}, },
// 确认窗体 // 确认窗体
confirm(content) { confirm(content) {
return MessageBox.confirm(content, "系统提示", { return MessageBox.confirm(content, '系统提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: "warning", type: 'warning',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true,
}) })
}, },
// 提交内容 // 提交内容
prompt(content) { prompt(content) {
return MessageBox.prompt(content, "系统提示", { return MessageBox.prompt(content, '系统提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: "warning", type: 'warning',
}) })
}, },
// 打开遮罩层 // 打开遮罩层
@ -73,12 +74,12 @@ export default {
loadingInstance = Loading.service({ loadingInstance = Loading.service({
lock: true, lock: true,
text: content, text: content,
spinner: "el-icon-loading", spinner: 'el-icon-loading',
background: "rgba(0, 0, 0, 0.7)", background: 'rgba(0, 0, 0, 0.7)',
}) })
}, },
// 关闭遮罩层 // 关闭遮罩层
closeLoading() { closeLoading() {
loadingInstance.close(); loadingInstance.close()
} },
} }

View File

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

View File

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