From 26a3bd00a6c5c726b8d1ff634d87e2bcfe894f80 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 29 May 2025 08:54:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=91=E7=90=86=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=8F=90=E4=BA=A4=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pro/supervisor-person-manage.js | 18 ++--- src/utils/aescbc.js | 4 +- .../supervisorPersonManage/addPersonnel.vue | 62 +++++++++++---- .../pro/supervisorPersonManage/index.vue | 78 +++++++++++++++---- 4 files changed, 120 insertions(+), 42 deletions(-) diff --git a/src/api/pro/supervisor-person-manage.js b/src/api/pro/supervisor-person-manage.js index db69d77..2dc567e 100644 --- a/src/api/pro/supervisor-person-manage.js +++ b/src/api/pro/supervisor-person-manage.js @@ -1,19 +1,19 @@ import request from '@/utils/request' -// 人员入场查询列表 -export function listAdmissionRequest(query) { +// 获取监理人员列表接口 +export function getPtSupPersonApi(data) { return request({ - url: '/project/admissionRequest/list', + url: '/project/SupervisionUnit/getPtSupPerson', method: 'get', - params: query, + params: data, }) } -// 人员信息列表查询 -export function listPersonnelInformation(query) { +// 提交审核接口 +export function submitApprovalApi(data) { return request({ - url: '/project/admissionRequest/listPersonnelInformation', - method: 'get', - params: query, + url: '/flowable/business/submitApproval', + method: 'post', + data, }) } diff --git a/src/utils/aescbc.js b/src/utils/aescbc.js index aa1625e..2fc8cf1 100644 --- a/src/utils/aescbc.js +++ b/src/utils/aescbc.js @@ -6,12 +6,12 @@ const cbc_iv = CryptoJS.enc.Utf8.parse('1234567812345678') * 默认参数需要加密 * @type {boolean} */ -const jia_mi = true +const jia_mi = process.env.NODE_ENV === 'development' ? false : true /** * 默认后台会自动加密 * @type {boolean} */ -const jie_mi = true +const jie_mi = process.env.NODE_ENV === 'development' ? false : true /** * 加密 * @param word diff --git a/src/views/pro/supervisorPersonManage/addPersonnel.vue b/src/views/pro/supervisorPersonManage/addPersonnel.vue index 5c25719..20615f9 100644 --- a/src/views/pro/supervisorPersonManage/addPersonnel.vue +++ b/src/views/pro/supervisorPersonManage/addPersonnel.vue @@ -184,6 +184,8 @@ import { decryptCBC } from '@/utils/aescbc' import { addSupervisoryPersonApply } from '@/api/pro/supervisory' +import { listSupervisorPersonById } from '@/api/pro/outsourcingPro' + export default { components: { BnsTimelineTabs, bnsKkFilePreview, Treeselect, uploadFile }, data() { @@ -256,7 +258,6 @@ export default { const params = this.$route.params && this.$route.params.data this.paramsData = JSON.parse(decryptCBC(params)) if (this.paramsData.type !== 'view') { - this.showOrNot = true if (this.paramsData.type === 'edit') { this.getData() } @@ -270,6 +271,24 @@ export default { this.getStatus() }, methods: { + //获取详情 + // getDetails(row) { + // this.loading = true + // const params = { + // id: row.id, + // proId: row.proId, + // uuid: row.uuid, + // supUuid: row.supUuid, + // } + + // listSupervisorPersonById(params).then(response => { + // console.log(response) + // this.form = { ...response.data } + // this.fileUuid = response.data.id + // this.personId = response.data.uuid + // this.loading = false + // }) + // }, getStatus() { const params = { dictType: 'sys_sup_post', @@ -309,23 +328,36 @@ export default { } }, getData() { + // const params = { + // consUserId: this.paramsData.consUserId, + // uuid: this.paramsData.uuid, + // proId: '2', + // supId: '1', + // consId: '1', + // } + // getData(params).then(response => { + // console.log(response) + // this.form = response.data + // if (this.form.post === '1') { + // this.showSpecialWorkType = true + // } + // if (this.paramsData.type === 'view') { + // this.form.phone = hideSensitiveInfo(response.data.phone) + // this.form.idCard = hideSensitiveInfo(response.data.idCard) + // } + // }) const params = { - consUserId: this.paramsData.consUserId, + id: this.paramsData.id, + proId: this.paramsData.proId, uuid: this.paramsData.uuid, - proId: '2', - supId: '1', - consId: '1', + supUuid: this.paramsData.supUuid, } - getData(params).then(response => { + listSupervisorPersonById(params).then(response => { console.log(response) - this.form = response.data - if (this.form.post === '1') { - this.showSpecialWorkType = true - } - if (this.paramsData.type === 'view') { - this.form.phone = hideSensitiveInfo(response.data.phone) - this.form.idCard = hideSensitiveInfo(response.data.idCard) - } + this.form = { ...response.data } + this.fileUuid = response.data.id + this.personId = response.data.uuid + // this.loading = false }) }, //上传组件-图片查看 @@ -398,7 +430,7 @@ export default { } addSupervisoryPersonApply(reqData) .then(response => { - this.$modal.msgSuccess('新增成功') + this.$modal.msgSuccess(this.paramsData.type === 'edit' ? '修改成功' : '新增成功') // this.supervisorOpen = false this.delFileIds = [] // this.getSupervisorPersonList() diff --git a/src/views/pro/supervisorPersonManage/index.vue b/src/views/pro/supervisorPersonManage/index.vue index 0f1e440..772a46d 100644 --- a/src/views/pro/supervisorPersonManage/index.vue +++ b/src/views/pro/supervisorPersonManage/index.vue @@ -96,9 +96,18 @@ + + + @@ -384,6 +393,8 @@ import debounce from 'lodash/debounce' import { listSupervisor, listSupervisorPerson } from '@/api/pro/outsourcingPro' +import { getPtSupPersonApi, submitApprovalApi } from '@/api/pro/supervisor-person-manage' + export default { name: 'Post', components: { bnsKkFilePreview, BnsFileListTabs }, @@ -432,17 +443,14 @@ export default { queryParams: { pageNum: 1, pageSize: 10, - deviceName: undefined, - createUser: undefined, - deviceUser: undefined, - deviceType: undefined, + proId: this.$store.state.user.thisIds.proId, supUuid: this.$store.state.user.thisIds.supUuid, - contUuid: this.$store.state.user.thisIds.contUuid, - subUuid: this.$store.state.user.thisIds.subUuid, - userType: this.$store.state.user.thisIds.userType, - consName: undefined, - status: undefined, + // contUuid: this.$store.state.user.thisIds.contUuid, + // subUuid: this.$store.state.user.thisIds.subUuid, + userType: '', + // consName: undefined, + // status: undefined, }, // 表单参数 form: {}, @@ -510,7 +518,7 @@ export default { 3: '特殊工种文件', 4: '其他文件', } - selectFile({ classification: 9, uuid: row.uuid, informationType: informationType, fromType: 2 }).then( + selectFile({ classification: 9, uuid: row.uuid, informationType: informationType, fromType: 3 }).then( response => { console.log(response) if (response.data.length === 0) { @@ -546,11 +554,11 @@ export default { /** 查询设备列表 */ getList() { this.loading = true - this.queryParams.proId = this.$store.state.user.thisIds.proId - this.queryParams.contUuid = this.$store.state.user.thisIds.consUuid - this.queryParams.subUuid = this.$store.state.user.thisIds.subUuid - // this.queryParams.userType = this.$store.state.user.userType - listSupervisorPerson(this.queryParams).then(response => { + // this.queryParams.proId = this.$store.state.user.thisIds.proId + // this.queryParams.contUuid = this.$store.state.user.thisIds.consUuid + // this.queryParams.subUuid = this.$store.state.user.thisIds.subUuid + this.queryParams.userType = this.$store.state.user.userType + getPtSupPersonApi(this.queryParams).then(response => { console.log(response, 'response') this.supervisorList = response.rows this.total = response.total @@ -1012,6 +1020,44 @@ export default { // 提交审核 onHandleAudit(row) { console.log(row, '行信息') + this.$confirm('确定提交审核吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(async () => { + const res = await submitApprovalApi({ + parentUuid: row.supUuid, + proId: row.proId, + supUuid: row.supUuid, + uuid: row.uuid, + taskType: '1', + userType: this.$store.state.user.userType, + }) + console.log('确定', res) + }) + }, + + // 编辑 + handleEdit(row) { + // console.log(row, '行信息') + // this.$router.push({ + // path: '/project/supervisor-person-manage/addPersonnel/', + // query: { + // id: row.id, + // proId: row.proId, + // uuid: row.uuid, + // supUuid: row.supUuid, + // }, + // }) + + const params = { + id: row.id, + proId: row.proId, + uuid: row.uuid, + supUuid: row.supUuid, + type: 'edit', + } + this.$router.push('/project/supervisor-person-manage/addPersonnel/' + encryptCBC(JSON.stringify(params))) }, }, }