|
@@ -16,7 +16,7 @@
|
|
|
批量作废
|
|
|
</t-button>
|
|
|
<t-button
|
|
|
- v-if="perm.BUTTON_enable"
|
|
|
+ v-if="perm.BUTTON_BatchEnable"
|
|
|
variant="outline"
|
|
|
:disabled="!selectedRowKeys.length"
|
|
|
@click="handleEnable(selectedRowKeys, true)"
|
|
@@ -25,7 +25,7 @@
|
|
|
批量启用
|
|
|
</t-button>
|
|
|
<t-button
|
|
|
- v-if="perm.BUTTON_disable"
|
|
|
+ v-if="perm.BUTTON_BatchUnEnable"
|
|
|
variant="outline"
|
|
|
:disabled="!selectedRowKeys.length"
|
|
|
@click="handleEnable(selectedRowKeys, false)"
|
|
@@ -34,14 +34,19 @@
|
|
|
批量禁用
|
|
|
</t-button>
|
|
|
<upload-button
|
|
|
- v-if="perm.BUTTON_import"
|
|
|
+ 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">
|
|
@@ -133,7 +138,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="DeviceManage">
|
|
|
-import { ref, reactive, onMounted } 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';
|
|
@@ -151,6 +156,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";
|
|
|
const { perm } = usePermission();
|
|
|
|
|
|
const showEditDeviceDialog = ref(false);
|
|
@@ -306,7 +313,8 @@ const {
|
|
|
fetchData,
|
|
|
search,
|
|
|
onChange,
|
|
|
-} = useFetchTable(deviceQueryApi);
|
|
|
+} = useFetchTable(deviceQueryApi,{ params: params });
|
|
|
+
|
|
|
|
|
|
const selectChange = (value) => {
|
|
|
selectedRowKeys.value = value;
|