|
@@ -6,25 +6,17 @@
|
|
|
<ContentWrap v-loading="loading" style="border: none">
|
|
<ContentWrap v-loading="loading" style="border: none">
|
|
|
<div style="border: none" class="px-2 py-3 rounded-sm bg-white">
|
|
<div style="border: none" class="px-2 py-3 rounded-sm bg-white">
|
|
|
<!-- 搜索工作栏 -->
|
|
<!-- 搜索工作栏 -->
|
|
|
- <el-form
|
|
|
|
|
- class="-mb-15px"
|
|
|
|
|
- :model="queryParams"
|
|
|
|
|
- ref="queryFormRef"
|
|
|
|
|
- :inline="true"
|
|
|
|
|
- label-width="68px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
:label="t('monitor.deviceName')"
|
|
:label="t('monitor.deviceName')"
|
|
|
prop="deviceName"
|
|
prop="deviceName"
|
|
|
- style="margin-left: 20px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ style="margin-left: 20px">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.deviceName"
|
|
v-model="queryParams.deviceName"
|
|
|
:placeholder="t('monitor.nameHolder')"
|
|
:placeholder="t('monitor.nameHolder')"
|
|
|
clearable
|
|
clearable
|
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
|
- class="!w-240px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-240px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('monitor.deviceCode')" prop="deviceCode">
|
|
<el-form-item :label="t('monitor.deviceCode')" prop="deviceCode">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -32,36 +24,42 @@
|
|
|
:placeholder="t('monitor.codeHolder')"
|
|
:placeholder="t('monitor.codeHolder')"
|
|
|
clearable
|
|
clearable
|
|
|
@keyup.enter="handleQuery"
|
|
@keyup.enter="handleQuery"
|
|
|
- class="!w-240px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="!w-240px" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('monitor.ifInline')" prop="ifInline">
|
|
<el-form-item :label="t('monitor.ifInline')" prop="ifInline">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="queryParams.ifInline"
|
|
v-model="queryParams.ifInline"
|
|
|
:placeholder="t('monitor.ifInlineHolder')"
|
|
:placeholder="t('monitor.ifInlineHolder')"
|
|
|
clearable
|
|
clearable
|
|
|
- class="!w-240px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ class="!w-240px">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.IOT_DEVICE_STATUS)"
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.IOT_DEVICE_STATUS)"
|
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :value="dict.value" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="数采查询" prop="source">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryParams.source"
|
|
|
|
|
+ placeholder="请选择数采来源"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ class="!w-240px">
|
|
|
|
|
+ <el-option label="全部" value="all" />
|
|
|
|
|
+ <el-option label="网关设备" value="gateway" />
|
|
|
|
|
+ <el-option label="中行北斗" value="zhbd" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="float-right !mr-0 !mb-0">
|
|
<el-form-item class="float-right !mr-0 !mb-0">
|
|
|
<el-button-group>
|
|
<el-button-group>
|
|
|
<el-button
|
|
<el-button
|
|
|
:type="viewMode === 'card' ? 'primary' : 'default'"
|
|
:type="viewMode === 'card' ? 'primary' : 'default'"
|
|
|
- @click="viewMode = 'card'"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click="viewMode = 'card'">
|
|
|
<Icon icon="ep:grid" />
|
|
<Icon icon="ep:grid" />
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
:type="viewMode === 'list' ? 'primary' : 'default'"
|
|
:type="viewMode === 'list' ? 'primary' : 'default'"
|
|
|
- @click="viewMode = 'list'"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click="viewMode = 'list'">
|
|
|
<Icon icon="ep:list" />
|
|
<Icon icon="ep:list" />
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-button-group>
|
|
</el-button-group>
|
|
@@ -80,8 +78,7 @@
|
|
|
plain
|
|
plain
|
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
|
- v-hasPermi="['iot:device:export']"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ v-hasPermi="['iot:device:export']">
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -99,12 +96,10 @@
|
|
|
:sm="12"
|
|
:sm="12"
|
|
|
:md="12"
|
|
:md="12"
|
|
|
:lg="6"
|
|
:lg="6"
|
|
|
- class="mb-4"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ class="mb-4">
|
|
|
<el-card
|
|
<el-card
|
|
|
class="h-full transition-colors relative overflow-hidden custom-card"
|
|
class="h-full transition-colors relative overflow-hidden custom-card"
|
|
|
- :body-style="{ padding: '0' }"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ :body-style="{ padding: '0' }">
|
|
|
<!-- 添加渐变背景层 -->
|
|
<!-- 添加渐变背景层 -->
|
|
|
<div
|
|
<div
|
|
|
class="absolute top-0 left-0 right-0 h-[50px] pointer-events-none"
|
|
class="absolute top-0 left-0 right-0 h-[50px] pointer-events-none"
|
|
@@ -112,8 +107,7 @@
|
|
|
item.ifInline === 3
|
|
item.ifInline === 3
|
|
|
? 'bg-gradient-to-b from-[#eefaff] to-transparent'
|
|
? 'bg-gradient-to-b from-[#eefaff] to-transparent'
|
|
|
: 'bg-gradient-to-b from-[#fff1f1] to-transparent'
|
|
: 'bg-gradient-to-b from-[#fff1f1] to-transparent'
|
|
|
- ]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ]">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="p-4 relative">
|
|
<div class="p-4 relative">
|
|
|
<!-- 标题区域 -->
|
|
<!-- 标题区域 -->
|
|
@@ -132,13 +126,11 @@
|
|
|
item.ifInline === 3
|
|
item.ifInline === 3
|
|
|
? 'bg-[var(--el-color-success)]'
|
|
? 'bg-[var(--el-color-success)]'
|
|
|
: 'bg-[var(--el-color-danger)]'
|
|
: 'bg-[var(--el-color-danger)]'
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ">
|
|
|
</div>
|
|
</div>
|
|
|
<el-text
|
|
<el-text
|
|
|
class="!text-xs font-bold"
|
|
class="!text-xs font-bold"
|
|
|
- :type="item.ifInline === 3 ? 'success' : 'danger'"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ :type="item.ifInline === 3 ? 'success' : 'danger'">
|
|
|
{{ getDictLabel(DICT_TYPE.IOT_DEVICE_STATUS, item.ifInline) }}
|
|
{{ getDictLabel(DICT_TYPE.IOT_DEVICE_STATUS, item.ifInline) }}
|
|
|
</el-text>
|
|
</el-text>
|
|
|
</div>
|
|
</div>
|
|
@@ -172,8 +164,7 @@
|
|
|
<img
|
|
<img
|
|
|
v-if="!item.carId"
|
|
v-if="!item.carId"
|
|
|
src="@/assets/imgs/iot/device.png"
|
|
src="@/assets/imgs/iot/device.png"
|
|
|
- class="w-full h-full"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ class="w-full h-full" />
|
|
|
<img v-if="item.carId" src="@/assets/imgs/iot/car.png" class="mt-4 ml-4" />
|
|
<img v-if="item.carId" src="@/assets/imgs/iot/car.png" class="mt-4 ml-4" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -198,8 +189,7 @@
|
|
|
item.vehicleName,
|
|
item.vehicleName,
|
|
|
item.carOnline ?? ''
|
|
item.carOnline ?? ''
|
|
|
)
|
|
)
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ">
|
|
|
<Icon icon="ep:view" class="mr-1" />
|
|
<Icon icon="ep:view" class="mr-1" />
|
|
|
{{ t('monitor.details') }}
|
|
{{ t('monitor.details') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -218,8 +208,7 @@
|
|
|
:data="list"
|
|
:data="list"
|
|
|
:stripe="true"
|
|
:stripe="true"
|
|
|
height="60vh"
|
|
height="60vh"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
<zm-table-column :label="t('monitor.serial')" width="60" align="center">
|
|
<zm-table-column :label="t('monitor.serial')" width="60" align="center">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
{{ scope.$index + 1 }}
|
|
{{ scope.$index + 1 }}
|
|
@@ -248,14 +237,12 @@
|
|
|
align="center"
|
|
align="center"
|
|
|
prop="lastInlineTime"
|
|
prop="lastInlineTime"
|
|
|
:formatter="dateFormatter"
|
|
:formatter="dateFormatter"
|
|
|
- width="180px"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ width="180px" />
|
|
|
<zm-table-column
|
|
<zm-table-column
|
|
|
:label="t('monitor.operation')"
|
|
:label="t('monitor.operation')"
|
|
|
align="center"
|
|
align="center"
|
|
|
min-width="120px"
|
|
min-width="120px"
|
|
|
- action
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ action>
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button
|
|
<el-button
|
|
|
link
|
|
link
|
|
@@ -271,8 +258,7 @@
|
|
|
scope.row.vehicleName,
|
|
scope.row.vehicleName,
|
|
|
scope.row.carOnline ?? ''
|
|
scope.row.carOnline ?? ''
|
|
|
)
|
|
)
|
|
|
- "
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ">
|
|
|
{{ t('monitor.check') }}
|
|
{{ t('monitor.check') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -284,8 +270,7 @@
|
|
|
:total="total"
|
|
:total="total"
|
|
|
v-model:page="queryParams.pageNo"
|
|
v-model:page="queryParams.pageNo"
|
|
|
v-model:limit="queryParams.pageSize"
|
|
v-model:limit="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ @pagination="getList" />
|
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -340,7 +325,8 @@ const queryParams = reactive({
|
|
|
infoUrl: undefined,
|
|
infoUrl: undefined,
|
|
|
templateJson: undefined,
|
|
templateJson: undefined,
|
|
|
creator: undefined,
|
|
creator: undefined,
|
|
|
- ifInline: undefined
|
|
|
|
|
|
|
+ ifInline: undefined,
|
|
|
|
|
+ source: undefined
|
|
|
})
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出加载状态
|
|
const exportLoading = ref(false) // 导出加载状态
|