diff --git a/src/api/hazard/audit.js b/src/api/hazard/audit.js index 8603b7a..475e0c7 100644 --- a/src/api/hazard/audit.js +++ b/src/api/hazard/audit.js @@ -8,6 +8,15 @@ export function getHazardAuditDetail(id) { }) } +// 根据流程实例 ID 获取流程详情,用于补齐当前待办任务 taskId +export function getHazardProcessDetail(flowInstanceId) { + return request({ + url: '/flowable/busiInfo/getProcessDetail', + method: 'get', + params: { id: flowInstanceId } + }) +} + // 查询隐患附件 export function listHazardAttachments(reportId) { return request({ @@ -16,17 +25,18 @@ export function listHazardAttachments(reportId) { }) } -// 上传隐患附件,接口定义为二进制文件流 +// 上传隐患附件,后端要求 multipart/form-data export function uploadHazardAttachment(file, attachmentType) { + const formData = new FormData() + formData.append('files', file, file.name || 'hazard-attachment') return request({ - url: '/flowable/hazard/uploadAttachment', + url: '/business/hazard/uploadAttachment', method: 'post', params: { attachmentType }, headers: { - 'Content-Type': file.type || 'application/octet-stream', repeatSubmit: false }, - data: file + data: formData }) } diff --git a/src/api/hazard/ledger.js b/src/api/hazard/ledger.js index f05fada..fec01e8 100644 --- a/src/api/hazard/ledger.js +++ b/src/api/hazard/ledger.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -export function listHazardLedger(query) { return request({ url: '/business/hazard/getListByPage', method: 'get', params: query }) } +export function listHazardLedger(query) { return request({ url: '/flowable/hazard/todoList', method: 'get', params: query }) } export function getHazardLedgerDetail(id) { return request({ url: '/business/hazard/info/' + id, method: 'get' }) } export function listHazardLedgerAttachments(reportId) { return request({ url: '/business/hazard/attachment/' + reportId, method: 'get' }) } export function exportHazardLedger(data) { return request({ url: '/business/hazard/export', method: 'post', data, responseType: 'blob' }) } diff --git a/src/components/SelectTree/index.vue b/src/components/SelectTree/index.vue index 2771c46..f610e9f 100644 --- a/src/components/SelectTree/index.vue +++ b/src/components/SelectTree/index.vue @@ -102,6 +102,9 @@ export default { if (val) { this.orgdata_bm_list = this.formatData(val); } + if (val && val.length && this.echoBack) { + this.setDefault(this.echoBack); + } }, immediate: true, deep: true, @@ -236,7 +239,7 @@ export default { }, findNodeById(tree, id) { for (let node of tree) { - if (node.id === id) { + if (String(node.id) === String(id)) { return node; } else if (node.children && node.children.length > 0) { let result = this.findNodeById(node.children, id); @@ -330,4 +333,4 @@ export default { ::v-deep .el-input__suffix { // display: none; } - \ No newline at end of file + diff --git a/src/views/hazard/audit/components/AuditActionForm.vue b/src/views/hazard/audit/components/AuditActionForm.vue index 5af157c..4bbbf90 100644 --- a/src/views/hazard/audit/components/AuditActionForm.vue +++ b/src/views/hazard/audit/components/AuditActionForm.vue @@ -46,9 +46,7 @@ - - - + @@ -132,9 +130,35 @@ - - {{ item.fileName || '新附件' }} - + + + + + + + + + {{ item.fileName || '新附件' }} + + + 严禁处理或传输国家秘密、商业秘密及敏感信息;最多 8 个附件。 @@ -148,7 +172,7 @@ 驳回 重新评估等级 - 当前记录不可审批,请确认 `canApprove` 和待办任务状态。 + {{ disabledTip }} @@ -202,6 +226,7 @@