|
|
@@ -16,7 +16,11 @@
|
|
|
:inline="true"
|
|
|
label-width="68px"
|
|
|
>
|
|
|
- <el-form-item :label="t('devicePerson.deviceCode')" prop="deviceCode" style="margin-left: 25px">
|
|
|
+ <el-form-item
|
|
|
+ :label="t('devicePerson.deviceCode')"
|
|
|
+ prop="deviceCode"
|
|
|
+ style="margin-left: 25px"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="queryParams.deviceCode"
|
|
|
:placeholder="t('devicePerson.codeHolder')"
|
|
|
@@ -49,7 +53,12 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-show="ifShow" :label="t('devicePerson.status')" label-width="85px" prop="deviceStatus">
|
|
|
+ <el-form-item
|
|
|
+ v-show="ifShow"
|
|
|
+ :label="t('devicePerson.status')"
|
|
|
+ label-width="85px"
|
|
|
+ prop="deviceStatus"
|
|
|
+ >
|
|
|
<el-select
|
|
|
v-model="queryParams.deviceStatus"
|
|
|
:label="t('devicePerson.status')"
|
|
|
@@ -97,7 +106,8 @@
|
|
|
{{ t('devicePerson.moreSearch') }}</el-button
|
|
|
>
|
|
|
<el-button v-if="ifShow" @click="moreQuery(false)" type="danger"
|
|
|
- ><Icon icon="ep:search" class="mr-5px" /> {{ t('devicePerson.closeSearch') }}</el-button
|
|
|
+ ><Icon icon="ep:search" class="mr-5px" />
|
|
|
+ {{ t('devicePerson.closeSearch') }}</el-button
|
|
|
>
|
|
|
<el-button @click="handleQuery"
|
|
|
><Icon icon="ep:search" class="mr-5px" /> {{ t('devicePerson.search') }}</el-button
|
|
|
@@ -113,13 +123,8 @@
|
|
|
>
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> {{ t('deviceStatus.setUp') }}
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- @click="handleExport"
|
|
|
- :loading="exportLoading"
|
|
|
- v-hasPermi="['rq:iot-device:export']"
|
|
|
- >
|
|
|
+ <!-- v-hasPermi="['rq:iot-device:export']" -->
|
|
|
+ <el-button type="success" plain @click="handleExport" :loading="exportLoading">
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -129,7 +134,7 @@
|
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
|
- <el-table-column :label="t('monitor.serial')" width="70" align="center" >
|
|
|
+ <el-table-column :label="t('monitor.serial')" width="70" align="center">
|
|
|
<template #default="scope">
|
|
|
{{ scope.$index + 1 }}
|
|
|
</template>
|
|
|
@@ -181,7 +186,7 @@
|
|
|
</el-row>
|
|
|
<DeviceStatusLogDrawer
|
|
|
:model-value="drawerVisible"
|
|
|
- @update:model-value="val => drawerVisible = val"
|
|
|
+ @update:model-value="(val) => (drawerVisible = val)"
|
|
|
:device-id="currentDeviceId"
|
|
|
ref="showDrawer"
|
|
|
/>
|
|
|
@@ -191,10 +196,9 @@
|
|
|
import download from '@/utils/download'
|
|
|
import { IotDeviceApi, IotDeviceVO } from '@/api/pms/device'
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
|
-import { dateFormatter } from '@/utils/formatTime'
|
|
|
import DeptTree from '@/views/system/user/DeptTree.vue'
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
|
-import DeviceStatusLogDrawer from "@/views/pms/device/statuslog/DeviceStatusLogDrawer.vue";
|
|
|
+import DeviceStatusLogDrawer from '@/views/pms/device/statuslog/DeviceStatusLogDrawer.vue'
|
|
|
|
|
|
/** 设备台账 列表 */
|
|
|
defineOptions({ name: 'IotDeviceStatus' })
|
|
|
@@ -271,7 +275,7 @@ const resultOptions = computed(() => [
|
|
|
{
|
|
|
label: '否',
|
|
|
value: 'N' // 空值会触发 clearable 效果
|
|
|
- },
|
|
|
+ }
|
|
|
])
|
|
|
|
|
|
const showDrawer = ref()
|
|
|
@@ -344,12 +348,12 @@ const handleDetail = (id: number) => {
|
|
|
/** 导出按钮操作 */
|
|
|
const handleExport = async () => {
|
|
|
try {
|
|
|
- // 导出的二次确认
|
|
|
- await message.exportConfirm()
|
|
|
- // 发起导出
|
|
|
+ // // 导出的二次确认
|
|
|
+ // await message.exportConfirm()
|
|
|
+ // // 发起导出
|
|
|
exportLoading.value = true
|
|
|
- const data = await IotDeviceApi.exportIotDevice(queryParams)
|
|
|
- download.excel(data, '设备台账.xls')
|
|
|
+ const data = await IotDeviceApi.exportIotDeviceAdjust(queryParams)
|
|
|
+ download.excel(data, '设备状态调整.xls')
|
|
|
} catch {
|
|
|
} finally {
|
|
|
exportLoading.value = false
|