From a897ff8c11b4500bfc0dc32d00eba1858fb1cc56 Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 5 Nov 2024 14:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AB=E9=A1=B9=E4=BD=9C=E4=B8=9A=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BDapp=E7=AB=AF=E5=8A=9F=E8=83=BD=E4=B8=8A?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 6 ++ pages/eight_assignments/blind_board/apply.vue | 7 +- .../eight_assignments/break_ground/apply.vue | 7 +- pages/eight_assignments/completed_list.vue | 13 ++- .../confined_space/apply.vue | 5 +- pages/eight_assignments/cut_road/apply.vue | 9 +- pages/eight_assignments/electricity/apply.vue | 9 +- pages/eight_assignments/high_work/apply.vue | 9 +- pages/eight_assignments/hoisting/apply.vue | 9 +- pages/eight_assignments/hot_work/apply.vue | 4 +- .../hot_work/select_operator.vue | 3 +- .../hot_work/select_position.vue | 97 +++++++++++++++++++ pages/eight_assignments/select_corp_info.vue | 6 +- pages/eight_assignments/select_department.vue | 1 - .../select_review_personnel.vue | 1 + pages/eight_assignments/view_info.vue | 10 +- utils/submitHomeworkProcess.js | 36 +++++-- 17 files changed, 201 insertions(+), 31 deletions(-) create mode 100644 pages/eight_assignments/hot_work/select_position.vue diff --git a/pages.json b/pages.json index 81c51d1..2012cfe 100644 --- a/pages.json +++ b/pages.json @@ -534,6 +534,12 @@ "style": { "navigationBarTitleText": "安全承诺" } + }, + { + "path": "pages/eight_assignments/hot_work/select_position", + "style": { + "navigationBarTitleText": "定位" + } } ], "globalStyle": { diff --git a/pages/eight_assignments/blind_board/apply.vue b/pages/eight_assignments/blind_board/apply.vue index ba30b93..77d7840 100644 --- a/pages/eight_assignments/blind_board/apply.vue +++ b/pages/eight_assignments/blind_board/apply.vue @@ -1,5 +1,5 @@ diff --git a/utils/submitHomeworkProcess.js b/utils/submitHomeworkProcess.js index 5b512dd..40e095f 100644 --- a/utils/submitHomeworkProcess.js +++ b/utils/submitHomeworkProcess.js @@ -6,6 +6,7 @@ import { setTaskSave } from "@/api"; import {addFormInfo} from "../api"; +import {filePath} from '@/utils/tools.js' // 处理表单数据 // TYPE 0 纯文本 1 图片 2 视频 3 divider标签 4 动态添加 5 签字 @@ -27,7 +28,7 @@ const processFormData = async (formData, formItems) => { const currentItem = uni.$u.deepClone(formData[formItem.key_name]) const codeList = [] for (let j = 0; j < currentItem.length; j++) { - const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: currentItem[j].url}) + const {CODE} = await setTaskFile({formData: {type: currentItem[j].oldUrl}, name: 'files', filePath: currentItem[j].url}) codeList.push(CODE) } obj.ITEM_VALUE = '' @@ -51,7 +52,7 @@ const processFormData = async (formData, formItems) => { } if (formItem.type === 5) { if (typeof formData[formItem.key_name] === 'string') { - const {CODE} = await setTaskFile({formData: {type: 0}, name: 'files', filePath: formData[formItem.key_name]}) + const {CODE} = await setTaskFile({formData: {type: formData[formItem.key_name + 'oldUrl']}, name: 'files', filePath: formData[formItem.key_name]}) obj.ITEM_VALUE = CODE } else { throw Error('签字只支持字符串') @@ -97,7 +98,7 @@ const processSelectedPersonnelData = (formData, list) => { return form } // 提交人员信息 -export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE,vernier}) => { +export const setPersonnelForm = async ({form, list, taskId, EW_RU_JOB_ID, CORP_ID, TYPE,vernier}) => { await addFormInfo({ job: processSelectedPersonnelData(form,list), EW_RU_TASK_ID: taskId, @@ -109,6 +110,7 @@ export const setPersonnelForm = async ({form, list, taskId, CORP_ID, TYPE,vernie EW_RU_TASK_ID: taskId, CORP_ID, TYPE, + EW_RU_JOB_ID, vernier }) } @@ -154,7 +156,7 @@ const endCurrentPersonnelTechnologicalProcess = async ({EW_RU_TASK_ID}) => { }) } // 在审批过程中指定下一节点人 -export const addFlowInfo = async ({form,list, taskId,EW_RU_JOB_ID, TYPE,CORP_ID, vernier}) => { +export const addFlowInfo = async ({form, list, taskId, EW_RU_JOB_ID, TYPE,CORP_ID, vernier}) => { // 在审批过程中添加节点信息 await addFormInfo({ job: processSelectedPersonnelData(form,list), @@ -265,7 +267,8 @@ export const getData = async (taskId) => { } if (item.TYPE === 1) { form[item.ITEM_NAME] = item.list.map((item) => ({ - url: this.$filePath + item.ITEM_VALUE, + url: filePath + item.ITEM_VALUE, + oldUrl: item.ITEM_VALUE })); } if (item.TYPE === 4) { @@ -279,9 +282,30 @@ export const getData = async (taskId) => { } } if (item.TYPE === 5) { - form[item.ITEM_NAME] = this.$filePath + item.ITEM_VALUE; + form[item.ITEM_NAME] = filePath + item.ITEM_VALUE; + form[item.ITEM_NAME + 'oldUrl'] = item.ITEM_VALUE; } }); return form; } }; +// 针对在某些节点要新增报表信息 +export const addReport = async ({form, formItems, TYPE, CORP_ID, EW_RU_TASK_ID, EW_RU_JOB_ID, vernier}) => { + // 在审批过程中添加节点信息 + await addFormInfo({ + reports: await processFormData(form,formItems), + EW_RU_TASK_ID: EW_RU_TASK_ID, + EW_RU_JOB_ID: EW_RU_JOB_ID, + TYPE, + postMethod: 'application/json' + } + ) + // 结束后续流程 + await resolveNextOperation({ + EW_RU_TASK_ID: EW_RU_TASK_ID, + CORP_ID, + TYPE, + EW_RU_JOB_ID, + vernier + }) +}