|
|
|
|
@ -2,11 +2,13 @@
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="100px">
|
|
|
|
|
<el-form-item label="点位编码" prop="attributeCode">
|
|
|
|
|
<el-input v-model="queryParams.attributeCode" placeholder="请输入点位编码" clearable @keyup.enter="handleQuery"
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.attributeCode" placeholder="请输入点位编码" clearable @keyup.enter="handleQuery"
|
|
|
|
|
class="!w-240px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="点位名称" prop="attributeName">
|
|
|
|
|
<el-input v-model="queryParams.attributeName" placeholder="请输入点位名称" clearable @keyup.enter="handleQuery"
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.attributeName" placeholder="请输入点位名称" clearable @keyup.enter="handleQuery"
|
|
|
|
|
class="!w-240px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="点位类型" prop="attributeType">
|
|
|
|
|
@ -24,7 +26,8 @@
|
|
|
|
|
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['iot:device:create']">
|
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="success" plain @click="handleExport" :loading="exportLoading"
|
|
|
|
|
<el-button
|
|
|
|
|
type="success" plain @click="handleExport" :loading="exportLoading"
|
|
|
|
|
v-hasPermi="['iot:device:export']">
|
|
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
|
|
</el-button>
|
|
|
|
|
@ -36,7 +39,8 @@
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
|
|
|
|
|
<el-table
|
|
|
|
|
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
|
|
|
|
|
@selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" reserve-selection />
|
|
|
|
|
<el-table-column label="点位编码" align="left" prop="attributeCode" width="150px" />
|
|
|
|
|
@ -59,7 +63,8 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="dataUnit" width="80px" />
|
|
|
|
|
<el-table-column label="倍率" align="center" prop="ratio" width="80px" />
|
|
|
|
|
<el-table-column label="最新采集时间" align="center" prop="latestCollectTime" :formatter="dateFormatter"
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="最新采集时间" align="center" prop="latestCollectTime" :formatter="dateFormatter"
|
|
|
|
|
width="170px" />
|
|
|
|
|
<el-table-column label="顺序" align="center" prop="sort" width="80px">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
@ -78,7 +83,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
|
|
|
|
<Pagination
|
|
|
|
|
:total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
|
|
|
|
@pagination="getList" />
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
|
|
@ -89,6 +95,7 @@ import { DICT_TYPE } from '@/utils/dict'
|
|
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
import download from '@/utils/download'
|
|
|
|
|
import { DeviceApi } from '@/api/iot/device'
|
|
|
|
|
import { DeviceModelAttributeApi } from '@/api/iot/devicemodelattribute'
|
|
|
|
|
import DeviceAttributeForm from './DeviceAttributeForm.vue'
|
|
|
|
|
import { DeviceAttributeTypeApi, DeviceAttributeTypeVO } from '@/api/iot/deviceattributetype'
|
|
|
|
|
|
|
|
|
|
@ -226,7 +233,7 @@ const handleExport = async () => {
|
|
|
|
|
try {
|
|
|
|
|
await message.exportConfirm()
|
|
|
|
|
exportLoading.value = true
|
|
|
|
|
const data = await DeviceApi.exportDeviceAttribute({ ids: selectedIds.value.join(',') })
|
|
|
|
|
const data = await DeviceModelAttributeApi.exportDeviceModelAttribute({ ids: selectedIds.value.join(',') })
|
|
|
|
|
download.excel(data, '采集设备-点位管理.xls')
|
|
|
|
|
} catch {
|
|
|
|
|
} finally {
|
|
|
|
|
|