提交 854ea877 authored 作者: lidongxu's avatar lidongxu

refactor(plan): pC环境_城市经理上传表格功能受限提示

同上
上级 4a29a4be
import { defineStore } from 'pinia';
export const usePlanStore = defineStore('plan', {
state: () => ({
shouldRefresh: false
}),
actions: {
setShouldRefresh(value) {
this.shouldRefresh = value;
}
}
});
\ No newline at end of file
...@@ -816,14 +816,20 @@ const uploadFile = async (file) => { ...@@ -816,14 +816,20 @@ const uploadFile = async (file) => {
const month = date.getMonth() + 1 const month = date.getMonth() + 1
const excelUrl = await uploadFileToOSSAPI(`planExcel/${date.getFullYear()}-${month}/${userStore().employeeNo}/${uuidv4()}.xlsx`, file.file) const excelUrl = await uploadFileToOSSAPI(`planExcel/${date.getFullYear()}-${month}/${userStore().employeeNo}/${uuidv4()}.xlsx`, file.file)
const targetAPI = isCityManager.value ? addPlanAPI : addPlanByRoleAPI const targetAPI = isCityManager.value ? addPlanAPI : addPlanByRoleAPI
const res = await targetAPI({ try {
"excelUrl": excelUrl, const res = await targetAPI({
"employeeNo": userStore().employeeNo "excelUrl": excelUrl,
}) "employeeNo": userStore().employeeNo
planTableList.value = res.data.table })
confirmExcelUUID.value = res.data.uuid
dialogVisible.value = true planTableList.value = res.data.table
proxy.$modal.closeLoading(); confirmExcelUUID.value = res.data.uuid
dialogVisible.value = true
proxy.$modal.closeLoading();
} catch (err) {
proxy.$modal.closeLoading();
}
return true return true
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论