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

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

parent 1c8f9f80
......@@ -107,7 +107,7 @@ export default {
},
action: {
type: String,
default: "/basic_api/base/file/commonupload",
default: "/base/file/commonupload",
},
},
......
......@@ -437,41 +437,45 @@ export default {
// 编辑
onEdit(data) {
this.addTitle = "编辑材料";
let { matterDatumFileList } = data;
let emptyFile = matterDatumFileList.filter((v) => v.filetype == 2);
let exampleFile = matterDatumFileList.filter((v) => v.filetype == 1);
if (emptyFile.length > 0) {
this.fileList2 = emptyFile.map((v) => {
return {
uid: v.id,
name: v.fileName,
status: "done",
url: v.fileUrl,
materialName: v.materialName,
fileName: v.fileName,
id: v.id,
fileUrl: v.fileUrl,
filetype: v.filetype,
source: 1,
};
});
}
if (exampleFile.length > 0) {
this.fileList1 = exampleFile.map((v) => {
return {
uid: v.id,
name: v.fileName,
status: "done",
url: v.fileUrl,
materialName: v.materialName,
id: v.id,
fileName: v.fileName,
fileUrl: v.fileUrl,
filetype: v.filetype,
source: 1,
};
});
console.log(data);
if (data.matterDatumFileList && data.matterDatumFileList.length > 0) {
let { matterDatumFileList } = data;
let emptyFile = matterDatumFileList.filter((v) => v.filetype == 2);
let exampleFile = matterDatumFileList.filter((v) => v.filetype == 1);
if (emptyFile.length > 0) {
this.fileList2 = emptyFile.map((v) => {
return {
uid: v.id,
name: v.fileName,
status: "done",
url: v.fileUrl,
materialName: v.materialName,
fileName: v.fileName,
id: v.id,
fileUrl: v.fileUrl,
filetype: v.filetype,
source: 1,
};
});
}
if (exampleFile.length > 0) {
this.fileList1 = exampleFile.map((v) => {
return {
uid: v.id,
name: v.fileName,
status: "done",
url: v.fileUrl,
materialName: v.materialName,
id: v.id,
fileName: v.fileName,
fileUrl: v.fileUrl,
filetype: v.filetype,
source: 1,
};
});
}
}
this.$nextTick(() => {
this.form = { ...data };
});
......
......@@ -8,7 +8,7 @@ module.exports = {
logout: `${BASE_URL}/base/login/logout`,
},
upload: {
file: `${BASE_URL}/basic_api/base/file/commonupload`,
file: `${BASE_URL}/base/file/commonupload`,
},
// 模块
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