diff --git a/src/components/Upload/Excel.vue b/src/components/Upload/Excel.vue index 002e47b..1e0941c 100644 --- a/src/components/Upload/Excel.vue +++ b/src/components/Upload/Excel.vue @@ -2,7 +2,7 @@ - + @@ -81,10 +86,13 @@ import { useDict } from '/@/hooks/dict'; // 引入组件 const FormDialog = defineAsyncComponent(() => import('./form.vue')); +const DutyTableDialog = defineAsyncComponent(() => import('./components/duty-table.vue')); + // 定义查询字典 // 定义变量内容 const formDialogRef = ref() +const dutyTableDialogRef = ref() const excelUploadRef = ref() // 搜索变量 const queryRef = ref() @@ -92,6 +100,8 @@ const showSearch = ref(true) // 多选变量 const selectObjs = ref([]) as any const multiple = ref(true) +const currentRow = ref() +const importData = ref({}) const state: BasicTableProps = reactive({ queryForm: {}, @@ -129,14 +139,22 @@ const selectionChangHandle = (objs: { id: string }[]) => { }; const importDutyItem = (row: any) => { + currentRow.value = row + importData.value = { + id: currentRow.value.id + } excelUploadRef.value.show() } +const dutyTable = (row: any) => { + dutyTableDialogRef.value.openDialog(row.id) +} + const downExcelTemp = async () => { try { - await other.downBlobFile(other.adaptationUrl(""), {}, 'temp.xlsx'); + await other.downBlobFile("/admin/sys-duty/export-template", { dutyId: currentRow.value.id }, "基地周值班表模版.xlsx"); } catch (error) { - useMessage().error("模板下载失败"); + useMessage().error("基地周值班表模版下载失败"); } }