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 @@
@@ -48,6 +48,10 @@ const prop = defineProps({
url: {
type: String,
},
+ importData: {
+ type: Object,
+ default: () => { },
+ },
title: {
type: String,
},
@@ -75,7 +79,7 @@ const state = reactive({
* 下载模板文件
*/
const downExcelTemp = async () => {
- if (prop.tempUrl) {
+ if (prop.tempUrl && prop.tempUrl !== 'null') {
try {
await other.downBlobFile(other.adaptationUrl(prop.tempUrl), {}, 'temp.xlsx');
} catch (error) {
diff --git a/src/views/duty/sysDuty/components/duty-table.vue b/src/views/duty/sysDuty/components/duty-table.vue
new file mode 100644
index 0000000..7657bfc
--- /dev/null
+++ b/src/views/duty/sysDuty/components/duty-table.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/duty/sysDuty/index.vue b/src/views/duty/sysDuty/index.vue
index 2bfee80..430376a 100644
--- a/src/views/duty/sysDuty/index.vue
+++ b/src/views/duty/sysDuty/index.vue
@@ -43,11 +43,14 @@
{{ row.endTime }}
-
+
导入
+
+ 排班表
+
编辑
@@ -64,9 +67,11 @@
+
+
-
+
@@ -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("基地周值班表模版下载失败");
}
}