fix:修改作业上传保存文件格式,编辑回显

This commit is contained in:
wyx
2022-12-05 13:58:31 +08:00
parent ddd86d07c6
commit d7b1c05173

View File

@@ -261,7 +261,8 @@ export default {
console.log("info", info);
if (info.file.status !== "uploading") {
console.log(info.file, info.fileList);
state.workEnclosureAddress = info.fileList[0].response.data;
// state.workEnclosureAddress = info.fileList[0].response.data;
state.workEnclosureAddress = JSON.stringify(info.fileList);
console.log("state.workEnclosureAddress", state.workEnclosureAddress);
}
@@ -346,6 +347,13 @@ export default {
state.addLoading = true;
queryWorkDetailById({ workId: props.EditWorkId })
.then((res) => {
console.log(res)
try{
fileList.value = JSON.parse(res.data.data.workEnclosureAddress)
}catch(e){
console.log(e)
fileList.value = []
}
formState.workName = res.data.data.workName;
formState.workRequirement = res.data.data.workRequirement;
formState.choosedTime = [