|
@@ -33,20 +33,25 @@
|
|
|
<template #icon><svg-icon name="disable" color="#262626" /></template>
|
|
|
批量禁用
|
|
|
</t-button>
|
|
|
- <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-popup v-if="perm.BUTTON_BatchImport" trigger="hover">
|
|
|
+ <template #content>
|
|
|
+ <t-button
|
|
|
+ variant="outline"
|
|
|
+ @click="downloadImportTemplate('TEMPLATE_DEVICE')"
|
|
|
+ >
|
|
|
+ <template #icon
|
|
|
+ ><svg-icon name="export" color="#262626" /></template
|
|
|
+ >下载模板
|
|
|
+ </t-button>
|
|
|
+ </template>
|
|
|
+ <upload-button 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-popup>
|
|
|
</t-space>
|
|
|
</div>
|
|
|
<SearchForm :fields="fields" :params="params">
|
|
@@ -138,7 +143,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="DeviceManage">
|
|
|
-import {ref, reactive, onMounted, computed} from 'vue';
|
|
|
+import { ref, reactive, onMounted, computed } from 'vue';
|
|
|
import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
import EditDeviceDialog from './edit-device-dialog.vue';
|
|
@@ -156,8 +161,8 @@ import {
|
|
|
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";
|
|
|
+import { omit } from 'lodash';
|
|
|
+import { downloadImportTemplate } from '@/api/common';
|
|
|
const { perm } = usePermission();
|
|
|
|
|
|
const showEditDeviceDialog = ref(false);
|
|
@@ -313,8 +318,7 @@ const {
|
|
|
fetchData,
|
|
|
search,
|
|
|
onChange,
|
|
|
-} = useFetchTable(deviceQueryApi,{ params: params });
|
|
|
-
|
|
|
+} = useFetchTable(deviceQueryApi, { params: params });
|
|
|
|
|
|
const selectChange = (value) => {
|
|
|
selectedRowKeys.value = value;
|