打回后编辑图标无法保存bug修复
parent
39a3ded06b
commit
6af1ff1f0b
|
@ -114,7 +114,7 @@ export default {
|
||||||
{name: '作业地点', key_name: 'WORK_PLACE', type: 0},
|
{name: '作业地点', key_name: 'WORK_PLACE', type: 0},
|
||||||
{name: '作业内容', key_name: 'JOB_CONTENT', type: 0},
|
{name: '作业内容', key_name: 'JOB_CONTENT', type: 0},
|
||||||
{name: '作业内容、范围、方式', key_name: 'WORK_CONTENT', type: 0},
|
{name: '作业内容、范围、方式', key_name: 'WORK_CONTENT', type: 0},
|
||||||
{name: '作业内容、范围、方式简图', key_name: 'CONTENT_IMG_PATH', type: 1},
|
{name: '作业内容、范围、方式简图', key_name: 'CONTENT_IMG_PATH', type: 1, oldUrl: ''},
|
||||||
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
{name: '关联的其他特殊作业及安全作业票编号', key_name: 'SPECIAL_WORK', type: 0},
|
||||||
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
{name: '风险辨识结果', key_name: 'RISK_IDENTIFICATION', type: 0},
|
||||||
{name: '申请人签字', key_name: 'SIGN', type: 5},
|
{name: '申请人签字', key_name: 'SIGN', type: 5},
|
||||||
|
|
|
@ -28,7 +28,7 @@ const processFormData = async (formData, formItems) => {
|
||||||
const currentItem = uni.$u.deepClone(formData[formItem.key_name])
|
const currentItem = uni.$u.deepClone(formData[formItem.key_name])
|
||||||
const codeList = []
|
const codeList = []
|
||||||
for (let j = 0; j < currentItem.length; j++) {
|
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)
|
codeList.push(CODE)
|
||||||
}
|
}
|
||||||
obj.ITEM_VALUE = ''
|
obj.ITEM_VALUE = ''
|
||||||
|
@ -52,7 +52,7 @@ const processFormData = async (formData, formItems) => {
|
||||||
}
|
}
|
||||||
if (formItem.type === 5) {
|
if (formItem.type === 5) {
|
||||||
if (typeof formData[formItem.key_name] === 'string') {
|
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
|
obj.ITEM_VALUE = CODE
|
||||||
} else {
|
} else {
|
||||||
throw Error('签字只支持字符串')
|
throw Error('签字只支持字符串')
|
||||||
|
@ -269,6 +269,7 @@ export const getData = async (taskId) => {
|
||||||
if (item.TYPE === 1) {
|
if (item.TYPE === 1) {
|
||||||
form[item.ITEM_NAME] = item.list.map((item) => ({
|
form[item.ITEM_NAME] = item.list.map((item) => ({
|
||||||
url: filePath + item.ITEM_VALUE,
|
url: filePath + item.ITEM_VALUE,
|
||||||
|
oldUrl: item.ITEM_VALUE
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (item.TYPE === 4) {
|
if (item.TYPE === 4) {
|
||||||
|
@ -283,6 +284,7 @@ export const getData = async (taskId) => {
|
||||||
}
|
}
|
||||||
if (item.TYPE === 5) {
|
if (item.TYPE === 5) {
|
||||||
form[item.ITEM_NAME] = filePath + item.ITEM_VALUE;
|
form[item.ITEM_NAME] = filePath + item.ITEM_VALUE;
|
||||||
|
form[item.ITEM_NAME + 'oldUrl'] = item.ITEM_VALUE;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return form;
|
return form;
|
||||||
|
|
Loading…
Reference in New Issue