mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
feat合并
This commit is contained in:
@@ -1025,7 +1025,7 @@
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
action="/api/file/upload"
|
||||
action="/manageApi/file/upload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<span
|
||||
@@ -3382,33 +3382,23 @@ export default {
|
||||
};
|
||||
//end---------项目概览
|
||||
|
||||
const handleChange = (info) => {
|
||||
const handleChange = ({ file, fileList }) => {
|
||||
let list = [];
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file.response.data, info.fileList);
|
||||
// info.fileList.map((item) => {
|
||||
// //把地址放到list里
|
||||
// // list.push(item.response.data);
|
||||
// // list.push(JSON.stringify(item))
|
||||
// state.fileList.push(item)
|
||||
// });
|
||||
|
||||
state.fileList.push(info.file);
|
||||
if (file.status !== "uploading") {
|
||||
console.log("上传的list", fileList);
|
||||
console.log(file);
|
||||
list = state.fileList;
|
||||
console.log("list", list);
|
||||
// let str = list.join(",");
|
||||
let str = JSON.stringify(list);
|
||||
console.log("str", str);
|
||||
//要编辑项目
|
||||
editProj({
|
||||
attach: str,
|
||||
beginTime: state.tstartTime.slice(0, 10),
|
||||
// beginTime:1668643200,
|
||||
boeFlag: state.boeFlag,
|
||||
category: state.category,
|
||||
courseSyncFlag: state.courseSyncFlag,
|
||||
endTime: state.tendTime.slice(0, 10),
|
||||
// endTime: 1668816000,
|
||||
level: state.tlevel,
|
||||
manager: state.manager,
|
||||
managerId: state.managerId,
|
||||
@@ -3433,10 +3423,10 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
message.success(`${info.file.name} 文件上传成功`);
|
||||
} else if (info.file.status === "error") {
|
||||
message.error(`${info.file.name} 文件上传失败.`);
|
||||
if (file.status === "done") {
|
||||
message.success(`${file.name} 文件上传成功`);
|
||||
} else if (file.status === "error") {
|
||||
message.error(`${file.name} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user