From 508e43b52cfea5356971b526dfab38f10fce584d Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Thu, 25 Jul 2024 16:01:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?flx:=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E9=BB=98=E8=AE=A4=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FilesUpload/FilesUpload.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/FilesUpload/FilesUpload.vue b/src/components/FilesUpload/FilesUpload.vue index 7c328dc..540b774 100644 --- a/src/components/FilesUpload/FilesUpload.vue +++ b/src/components/FilesUpload/FilesUpload.vue @@ -205,8 +205,8 @@ const getType = (type: Type) => { }; const props = withDefaults(defineProps(), { - maxFileSize: 5 * 1024 * 1024, - maxTotalFileSize: 50 * 1024 * 1024, + maxFileSize: 500 * 1024 * 1024, + maxTotalFileSize: 500 * 1024 * 1024, checkDuplicateFile: true, timeout: 30000 }); From 58f7d41023ac469b37169589c34ca73e6e08136f Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Thu, 1 Aug 2024 18:03:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20flx=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 8 +++---- src/enums/httpEnum.ts | 2 +- src/utils/util.ts | 13 ++++++++++ .../ProjectSupervisionDiv/index.vue | 10 ++++++-- .../ProjectSupervisionDiv/overview.vue | 12 ++++++---- .../ProjectSupervisionDiv/overview2.vue | 4 ++-- .../ProjectSupervisionDiv/overview3.vue | 4 ++-- .../ProjectSupervisionDiv/overview4.vue | 4 ++-- .../ProjectSupervisionDiv/overview5.vue | 4 ++-- .../ProjectSupervisionDiv/overview6.vue | 4 ++-- .../ProjectSupervisionDiv/overview7.vue | 4 ++-- .../ProjectSupervisionDiv/overview8.vue | 8 ++++--- .../components/readonlyDialogDiv/index.vue | 11 +++++---- .../components/transformInfo.vue | 17 +++++++++++-- .../components/transformInfo.vue | 24 +++++++++++++++---- 15 files changed, 91 insertions(+), 38 deletions(-) diff --git a/.env.development b/.env.development index e274eaa..a8a9f1c 100644 --- a/.env.development +++ b/.env.development @@ -2,14 +2,14 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) -VITE_API_URL = 'http://192.168.34.155:6688' +# VITE_API_URL = 'http://192.168.34.155:6688' # VITE_API_URL = 'http://183.63.230.59:6090' # VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296' VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081" # VITE_API_URL = "http://jxjzw.zhgdyun.com:9013" -# VITE_API_URL = 'https://xmglcs.hyjgxt.cn:6090' +VITE_API_URL = 'https://xmglcs.hyjgxt.cn:6090' # 上传 -VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' -# VITE_ULD_API_URL = 'http://jxjzw.zhgdyun.com:8012/onlinePreview?url=' +# VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' +VITE_ULD_API_URL = 'http://jxjzw.zhgdyun.com:8012/onlinePreview?url=' diff --git a/src/enums/httpEnum.ts b/src/enums/httpEnum.ts index 06b968f..b7d0147 100644 --- a/src/enums/httpEnum.ts +++ b/src/enums/httpEnum.ts @@ -6,7 +6,7 @@ export enum ResultEnum { SUCCESS = 200, ERROR = 500, OVERDUE = 401, - TIMEOUT = 30000, + TIMEOUT = 60000, TYPE = "success" } diff --git a/src/utils/util.ts b/src/utils/util.ts index 270d57a..6145d1e 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -321,3 +321,16 @@ export function sendIframeMessage(msg: any, type: any, iframeEle: any | undefine window.parent.postMessage(msg, "*"); } } +// 替换指定字符串内容 +export function getSubstringAfter(str: string, searchStr: string) { + // 查找searchStr在str中的位置 + const index = str.indexOf(searchStr); + console.log(index, searchStr); + // 如果找到了,则截取searchStr之后的内容(包括searchStr之后的所有字符) + // 如果不想包括searchStr本身,可以调整startIndex为index + searchStr.length + if (index !== -1) { + return str.substring(index + searchStr.length); + } + // 如果没有找到,返回原字符串或null等,根据需求决定 + return false; // 或者返回空字符串"",表示没有找到 +} diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/index.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/index.vue index ec54b52..256622a 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/index.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/index.vue @@ -88,7 +88,9 @@ const next = async (data: { [key: string]: OverviewForm }, isTemporary: any) => annexFileList.value.push(...item.files); } }); - addRepostData.value.annexFiles = annexFileList.value; + console.log(annexFileList.value, 22222222); + const map = new Map(); + addRepostData.value.annexFiles = annexFileList.value.filter(v => !map.has(v.fileUrl) && map.set(v.fileUrl, v)); console.log(annexFileList.value, 111222); console.log(addRepostData.value, 111222); if (isTemporary) { @@ -111,6 +113,7 @@ const submit = async () => { if (Array.isArray(requestData.projectSecondType)) { requestData.projectSecondType = requestData.projectSecondType.join(","); } + if (!store.Message) { const data = await addPreEngineering(requestData); ElMessage.success(data.message); @@ -129,7 +132,10 @@ const temporarySave = async () => { let requestData = { ...addRepostData.value, isDraft: 1 // 1代表暂存 - }; + } as any; + if (Array.isArray(requestData.projectSecondType)) { + requestData.projectSecondType = requestData.projectSecondType.join(","); + } if (!store.Message) { const data = await addPreEngineering(requestData); store.Message = { id: data.result }; diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview.vue index 807ded1..fc081f7 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview.vue @@ -38,8 +38,8 @@
- - + + @@ -144,7 +144,7 @@
@@ -315,7 +315,11 @@ onMounted(async () => { item.files = files; }); } - form.value.projectSecondType = store.Message.projectSecondType.split(",").map((item: string) => Number(item)); + // console.log(111111, store.Message.projectSecondType, store.Message.projectSecondType.split(",")); + form.value.projectSecondType = + store.Message.projectSecondType && store.Message.projectSecondType.split(",").map((item: string) => Number(item)); + // console.log(form.value.projectSecondType); + form.value.allCost = store.Message.allCost; } // if (store.Message) { // form.value = store.Message; diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview2.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview2.vue index 9993549..5739f37 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview2.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview2.vue @@ -116,7 +116,7 @@
- 保存 + 保存 上一步 下一步
@@ -150,7 +150,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview3.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview3.vue index ea80d7d..4334c6e 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview3.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview3.vue @@ -154,7 +154,7 @@
- 保存 + 保存 上一步 下一步
@@ -188,7 +188,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview4.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview4.vue index 9e1e5a2..0cda0e9 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview4.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview4.vue @@ -78,7 +78,7 @@
- 保存 + 保存 上一步 下一步
@@ -112,7 +112,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview5.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview5.vue index 0328153..808da60 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview5.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview5.vue @@ -105,7 +105,7 @@
- 保存 + 保存 上一步 下一步
@@ -139,7 +139,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview6.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview6.vue index ceaf051..9fcee36 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview6.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview6.vue @@ -102,7 +102,7 @@
- 保存 + 保存 上一步 下一步
@@ -136,7 +136,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview7.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview7.vue index 51d37df..db54f52 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview7.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview7.vue @@ -86,7 +86,7 @@
- 保存 + 保存 上一步 下一步
@@ -120,7 +120,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ diff --git a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview8.vue b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview8.vue index fdeb123..61643ff 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview8.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/ProjectSupervisionDiv/overview8.vue @@ -242,7 +242,9 @@
- 保存 + 保存 上一步 提交
@@ -276,7 +278,7 @@ const showFilesUpload = ref(false); const current = ref({} as AnnexFilesOptions); const dictLabel = ref(undefined); -const store = GlobalStore(); +const store: any = GlobalStore(); const isOpen = ref(false); const props = defineProps(["reportPersonList"]); const emit = defineEmits<{ @@ -408,7 +410,7 @@ const addFormContentFn = (index: number) => { form.value.isNine = true; let arr = [ { dictValue: "编制文件", files: [] }, - { dictValue: "批复文件", files: [] }, + { dictValue: "批复文件", files: [] } // { dictValue: "其他文件", files: [] } ]; form.value.engineeringSingles.push(...arr); diff --git a/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue b/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue index 74a872c..2d0b136 100644 --- a/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue +++ b/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue @@ -32,8 +32,8 @@
- - + + @@ -1214,9 +1214,10 @@ const onPreview = (row: any) => { const onAppendix = row => { console.log(row); dialogVisible.value = true; - if (row.files.length) { - current.value = row.files; - } + // if (row.files.length) { + // current.value = row.files; + // } + current.value = row.files; }; const getDataDetail = async () => { // console.log(row); diff --git a/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/transformInfo.vue b/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/transformInfo.vue index 62b6b5b..d25efa0 100644 --- a/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/transformInfo.vue +++ b/src/views/goverment/huizhou/projectMonitoring/qualityControl/components/transformInfo.vue @@ -313,6 +313,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; import type { FormInstance, UploadProps } from "element-plus"; import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment"; import { submitReform } from "@/api/modules/project"; +import { getSubstringAfter } from "@/utils/util"; import printJS from "print-js"; const props = defineProps({ detailsDialog: Boolean, @@ -506,7 +507,13 @@ const getInfo = async () => { basicData.value = res.result; recordData.value = res.result.inspectQuestionList; recordData.value.map(item => { - item.image = eval(item.image); + item.image = eval(item.image).map((ele: any) => { + const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090"); + return { + ...ele, + url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl + }; + }); }); console.log(recordData); }; @@ -515,7 +522,13 @@ const getTimeLineList = async () => { const res = await timeLineData({ inspectQuestionId: recordRowData.value.id }); res.result.map(item => { - item.solveImage = eval(item.solveImage); + item.solveImage = eval(item.solveImage).map((ele: any) => { + const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090"); + return { + ...ele, + url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl + }; + }); }); timelineList.value = res.result; }; diff --git a/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/transformInfo.vue b/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/transformInfo.vue index ce35f6f..afebafb 100644 --- a/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/transformInfo.vue +++ b/src/views/goverment/huizhou/projectMonitoring/safetyManagement/components/transformInfo.vue @@ -307,6 +307,7 @@ import type { FormInstance, UploadProps } from "element-plus"; import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment"; import { submitReform } from "@/api/modules/project"; import printJS from "print-js"; +import { getSubstringAfter } from "@/utils/util"; const baseUrl = window.location.protocol + "//" + window.location.host; // const baseUrl = import.meta.env.VITE_API_URL; const props = defineProps({ @@ -492,13 +493,20 @@ const rowClick = row => { }; // 相关信息接口调用 const getInfo = async () => { - const res = await relativeInfo({ id: props.relativeId }); + const res: any = await relativeInfo({ id: props.relativeId }); basicData.value = res.result; recordData.value = res.result.inspectQuestionList; - recordData.value.map(item => { - item.image = eval(item.image); + recordData.value.map((item: any) => { + item.image = eval(item.image).map((ele: any) => { + const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090"); + return { + ...ele, + url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl + }; + }); }); - console.log(recordData); + + console.log(33333, recordRowData.value); }; const timelineList = ref([{ name: 1 }]); // 获取整改情况时间轴列表 @@ -506,7 +514,13 @@ const getTimeLineList = async () => { const res = await timeLineData({ inspectQuestionId: recordRowData.value.id }); res.result.map(item => { - item.solveImage = eval(item.solveImage); + item.solveImage = eval(item.solveImage).map((ele: any) => { + const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090"); + return { + ...ele, + url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl + }; + }); }); timelineList.value = res.result; }; From 607c699ca33c29c65797cb193f2e1be0a5af5809 Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Mon, 26 Aug 2024 17:31:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=F0=9F=9A=80=20flx:=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FilesUpload/FilesUpload.vue | 59 +++++++++++++++---- .../unitScore/components/scoreTableNew.vue | 6 +- .../ProjectSupervisionDiv/annex.vue | 48 ++++++++++----- 3 files changed, 84 insertions(+), 29 deletions(-) diff --git a/src/components/FilesUpload/FilesUpload.vue b/src/components/FilesUpload/FilesUpload.vue index 540b774..f1b96cb 100644 --- a/src/components/FilesUpload/FilesUpload.vue +++ b/src/components/FilesUpload/FilesUpload.vue @@ -30,14 +30,20 @@

- + + + 温馨提示:将文件添加到上传队列, 然后点击“开始上传”按钮。

- + + + 文件大小错误: 文件大小不超过 {{ calculateFileSize(maxTotalFileSize!) }}

- + + +
@@ -55,9 +61,16 @@ @@ -73,9 +86,15 @@

{{ calculateFileSize(file.size) }}

- - - + + + + + + + + +
@@ -84,7 +103,12 @@
{{ !fileList.length ? "未选择" : calculateFileSize(totalFileSize) }} -
+
@@ -305,11 +329,18 @@ const selectFile = (e: Event) => { * @description 删除指定文件对象 * @param row 文件对象 */ -const remove = (row: UploadFile) => { +const remove = (row: UploadFile, type?: number) => { if (isUploading.value) return ElMessage.warning("上传中, 请不要执行任何操作"); const i = fileList.value.indexOf(row); + if (type == 1) { + const findIndex = successList.value.findIndex(item => item.id === row.id); + if (findIndex > -1) { + successList.value.splice(findIndex, 1); + } + } + if (i >= 0) { fileList.value.splice(i, 1); @@ -367,7 +398,11 @@ const handlerUpload = () => { controllerList.value.push(controller); - upload(data, { signal: controller.signal, onUploadProgress, headers: { noLoading: true } }) + upload(data, { + signal: controller.signal, + onUploadProgress, + headers: { noLoading: true } + }) .then(res => { if (res.code == "200") { file.response = res.result; diff --git a/src/views/goverment/huizhou/assessmentManagement/unitScore/components/scoreTableNew.vue b/src/views/goverment/huizhou/assessmentManagement/unitScore/components/scoreTableNew.vue index c92c357..c6a49a4 100644 --- a/src/views/goverment/huizhou/assessmentManagement/unitScore/components/scoreTableNew.vue +++ b/src/views/goverment/huizhou/assessmentManagement/unitScore/components/scoreTableNew.vue @@ -95,10 +95,10 @@
- - + +
diff --git a/src/views/goverment/huizhou/projectList/components/ProjectSupervisionDiv/annex.vue b/src/views/goverment/huizhou/projectList/components/ProjectSupervisionDiv/annex.vue index ffe3780..8fec5b3 100644 --- a/src/views/goverment/huizhou/projectList/components/ProjectSupervisionDiv/annex.vue +++ b/src/views/goverment/huizhou/projectList/components/ProjectSupervisionDiv/annex.vue @@ -70,32 +70,52 @@ const handlechange = e => { const handleSubmit = (isTemporary?: any) => { const fileList: AnnexFile[] = []; - + console.log(annexFiles.value, 888999); annexFiles.value.forEach(item => { const files = item.files; - files.forEach(file => { - const curr: AnnexFile = {}; + files.forEach((file: any) => { + if (file.response.fileId) { + const curr: AnnexFile = {}; - curr.createTime = file.response?.createTime; - curr.extendName = file.response?.ext; + curr.createTime = file.response?.createTime; + curr.extendName = file.response?.extendName; - // TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename - curr.fileName = file.response?.originalFilename; - // curr.fileName = file.response?.filename; + // TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename + curr.fileName = file.response?.fileName; + // curr.fileName = file.response?.filename; - // curr.fileId = file.response && +file.response.id; - curr.fileSize = `${file.response?.size || ""}`; - curr.fileUrl = file.response?.url; + // curr.fileId = file.response && +file.response.id; + curr.fileSize = `${file.response?.fileSize || ""}`; + curr.fileUrl = file.response?.fileUrl; - curr.label = file.label; + curr.label = file.response?.label; - fileList.push(curr); + fileList.push(curr); + } else { + const curr: AnnexFile = {}; + + curr.createTime = file.response?.createTime; + curr.extendName = file.response?.ext; + + // TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename + curr.fileName = file.response?.originalFilename; + // curr.fileName = file.response?.filename; + + // curr.fileId = file.response && +file.response.id; + curr.fileSize = `${file.response?.size || ""}`; + curr.fileUrl = file.response?.url; + + curr.label = file.label; + + fileList.push(curr); + } }); item.files = files; }); - + console.log(fileList, 888999); + // return; emit("next", { annexFiles: fileList }, isTemporary); };