|
@@ -36,12 +36,17 @@
|
|
|
<upload-button
|
|
|
v-if="perm.BUTTON_BatchImport"
|
|
|
upload-url="/api/sys/device/import"
|
|
|
+ :format="['xlsx']"
|
|
|
>
|
|
|
<t-button variant="outline">
|
|
|
<template #icon><svg-icon name="import" color="#262626" /></template
|
|
|
>批量导入
|
|
|
</t-button>
|
|
|
</upload-button>
|
|
|
+ <t-button v-if="perm.BUTTON_BatchImport" variant="outline" @click="downloadImportTemplate({type:'TEMPLATE_DEVICE'})">
|
|
|
+ <template #icon><svg-icon name="export" color="#262626" /></template
|
|
|
+ >下载模版
|
|
|
+ </t-button>
|
|
|
</t-space>
|
|
|
</div>
|
|
|
<SearchForm :fields="fields" :params="params">
|
|
@@ -152,6 +157,7 @@ import { dictToOptionList } from '@/utils/tool';
|
|
|
import { ABLE_TYPE, RUNNING_STATUS, INOUT_TYPE } from '@/config/constants';
|
|
|
import usePermission from '@/hooks/usePermission';
|
|
|
import {omit} from "lodash";
|
|
|
+import {downloadImportTemplate} from "@/api/common";
|
|
|
const { perm } = usePermission();
|
|
|
|
|
|
const showEditDeviceDialog = ref(false);
|