Commit aa963ba2 authored by 姬鋆屾's avatar 姬鋆屾

feat:修改上传附件接口及修改材料无法编辑的问题

parent 1c8f9f80
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
}, },
action: { action: {
type: String, type: String,
default: "/basic_api/base/file/commonupload", default: "/base/file/commonupload",
}, },
}, },
......
...@@ -437,41 +437,45 @@ export default { ...@@ -437,41 +437,45 @@ export default {
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.addTitle = "编辑材料"; this.addTitle = "编辑材料";
let { matterDatumFileList } = data; console.log(data);
let emptyFile = matterDatumFileList.filter((v) => v.filetype == 2); if (data.matterDatumFileList && data.matterDatumFileList.length > 0) {
let exampleFile = matterDatumFileList.filter((v) => v.filetype == 1); let { matterDatumFileList } = data;
if (emptyFile.length > 0) { let emptyFile = matterDatumFileList.filter((v) => v.filetype == 2);
this.fileList2 = emptyFile.map((v) => { let exampleFile = matterDatumFileList.filter((v) => v.filetype == 1);
return { if (emptyFile.length > 0) {
uid: v.id, this.fileList2 = emptyFile.map((v) => {
name: v.fileName, return {
status: "done", uid: v.id,
url: v.fileUrl, name: v.fileName,
materialName: v.materialName, status: "done",
fileName: v.fileName, url: v.fileUrl,
id: v.id, materialName: v.materialName,
fileUrl: v.fileUrl, fileName: v.fileName,
filetype: v.filetype, id: v.id,
source: 1, fileUrl: v.fileUrl,
}; filetype: v.filetype,
}); source: 1,
} };
if (exampleFile.length > 0) { });
this.fileList1 = exampleFile.map((v) => { }
return { if (exampleFile.length > 0) {
uid: v.id, this.fileList1 = exampleFile.map((v) => {
name: v.fileName, return {
status: "done", uid: v.id,
url: v.fileUrl, name: v.fileName,
materialName: v.materialName, status: "done",
id: v.id, url: v.fileUrl,
fileName: v.fileName, materialName: v.materialName,
fileUrl: v.fileUrl, id: v.id,
filetype: v.filetype, fileName: v.fileName,
source: 1, fileUrl: v.fileUrl,
}; filetype: v.filetype,
}); source: 1,
};
});
}
} }
this.$nextTick(() => { this.$nextTick(() => {
this.form = { ...data }; this.form = { ...data };
}); });
......
...@@ -8,7 +8,7 @@ module.exports = { ...@@ -8,7 +8,7 @@ module.exports = {
logout: `${BASE_URL}/base/login/logout`, logout: `${BASE_URL}/base/login/logout`,
}, },
upload: { upload: {
file: `${BASE_URL}/basic_api/base/file/commonupload`, file: `${BASE_URL}/base/file/commonupload`,
}, },
// 模块 // 模块
model: { model: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment