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 + }) +}