|
|
@ -1,283 +1,327 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px" class="my-custom-form"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="中台设备编码" prop="centerDeviceCode"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="card-box"> |
|
|
|
<div class="head-container"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.centerDeviceCode" |
|
|
|
placeholder="请输入中台设备编码" |
|
|
|
v-model="deptName" |
|
|
|
placeholder="请输入部门名称" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
prefix-icon="Search" |
|
|
|
style="margin-bottom: 20px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="设备名称" prop="deviceName"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.deviceName" |
|
|
|
placeholder="请输入设备名称" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="通讯来源类型" prop="deviceSourceId"> |
|
|
|
<el-select v-model="queryParams.deviceSourceId" placeholder="请选择通讯来源类型" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in dc_device_source" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
@change="deviceSourceChange" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="所属组织名称" prop="orgName"> |
|
|
|
<el-tree-select v-model="queryParams.orgName" :data="deptOptions" |
|
|
|
:props="{ value: 'label', label: 'label', children: 'children' }" value-key="id" placeholder="请选择组织名称" |
|
|
|
check-strictly :default-expand-all="true" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="是否可用" prop="enabledFlag"> |
|
|
|
<el-select v-model="queryParams.enabledFlag" placeholder="请选择是否可用" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in enabledFlag" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备类型" prop="deviceType"> |
|
|
|
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in dc_device_type" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="位置编码" prop="locationCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationCode" |
|
|
|
placeholder="请输入位置编码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="位置名称" prop="locationName"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationName" |
|
|
|
placeholder="请输入位置名称" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备应用范围" prop="deviceClass"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.deviceClass" |
|
|
|
placeholder="请输入设备应用范围" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="服务器地址" prop="serverIp"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.serverIp" |
|
|
|
placeholder="请输入服务器地址" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="从属网关ID" prop="gatewayId"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.gatewayId" |
|
|
|
placeholder="请输入从属网关ID" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="纬度" prop="latValue"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.latValue" |
|
|
|
placeholder="请输入纬度" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="经度" prop="lagValue"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.lagValue" |
|
|
|
placeholder="请输入经度" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
</div> |
|
|
|
<div class="head-container"> |
|
|
|
<el-tree |
|
|
|
:data="deptOptions" |
|
|
|
:props="{ label: 'label', children: 'children' }" |
|
|
|
:expand-on-click-node="false" |
|
|
|
:filter-node-method="filterNode" |
|
|
|
ref="deptTreeRef" |
|
|
|
node-key="id" |
|
|
|
highlight-current |
|
|
|
default-expand-all |
|
|
|
@node-click="handleNodeClick" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="是否告警" prop="alertEnabled"> |
|
|
|
<el-select v-model="queryParams.alertEnabled" placeholder="请选择设备类型" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in alertEnabled" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备模型" prop="deviceModelId"> |
|
|
|
<el-select v-model="queryParams.deviceModelId" placeholder="请选择设备模型id" clearable> |
|
|
|
<el-option label="请选择设备模型" value="deviceModelId" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备分组" prop="deviceGroupName"> |
|
|
|
<el-select v-model="queryParams.deviceGroupName" placeholder="请选择设备分组ID" clearable> |
|
|
|
<el-option label="请添加设备分组" value="" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item class="childTextAlignRight"> |
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
|
<el-button @click="toggleCollapse">{{editName}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="Plus" |
|
|
|
@click="handleAdd" |
|
|
|
>新增</el-button> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="Edit" |
|
|
|
@click="handleUpdate" |
|
|
|
>修改</el-button> |
|
|
|
</el-col> --> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="Delete" |
|
|
|
@click="handleDelete" |
|
|
|
>删除</el-button> |
|
|
|
</div> |
|
|
|
<!-- <el-form-item label="所属组织名称" prop="orgName"> |
|
|
|
<el-tree-select v-model="queryParams.orgName" :data="deptOptions" |
|
|
|
:props="{ value: 'label', label: 'label', children: 'children' }" value-key="id" placeholder="请选择组织名称" |
|
|
|
check-strictly :default-expand-all="true" clearable/> |
|
|
|
</el-form-item> --> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="warning" |
|
|
|
icon="Download" |
|
|
|
@click="handleExport" |
|
|
|
>导出</el-button> |
|
|
|
<el-col :span="20" class="card-box"> |
|
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px" class="my-custom-form"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="中台设备编码" prop="centerDeviceCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.centerDeviceCode" |
|
|
|
placeholder="请输入中台设备编码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="设备名称" prop="deviceName"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.deviceName" |
|
|
|
placeholder="请输入设备名称" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="通讯来源类型" prop="deviceSourceId"> |
|
|
|
<el-select v-model="queryParams.deviceSourceId" placeholder="请选择通讯来源类型" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in dc_device_source" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
@change="deviceSourceChange" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="是否可用" prop="enabledFlag"> |
|
|
|
<el-select v-model="queryParams.enabledFlag" placeholder="请选择是否可用" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in enabledFlag" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备类型" prop="deviceType"> |
|
|
|
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in dc_device_type" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="位置编码" prop="locationCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationCode" |
|
|
|
placeholder="请输入位置编码" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="位置名称" prop="locationName"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.locationName" |
|
|
|
placeholder="请输入位置名称" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备应用范围" prop="deviceClass"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.deviceClass" |
|
|
|
placeholder="请输入设备应用范围" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="服务器地址" prop="serverIp"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.serverIp" |
|
|
|
placeholder="请输入服务器地址" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="从属网关ID" prop="gatewayId"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.gatewayId" |
|
|
|
placeholder="请输入从属网关ID" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="纬度" prop="latValue"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.latValue" |
|
|
|
placeholder="请输入纬度" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="经度" prop="lagValue"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.lagValue" |
|
|
|
placeholder="请输入经度" |
|
|
|
clearable |
|
|
|
@keyup.enter="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="是否告警" prop="alertEnabled"> |
|
|
|
<el-select v-model="queryParams.alertEnabled" placeholder="请选择设备类型" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in alertEnabled" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备模型" prop="deviceModelId"> |
|
|
|
<el-select v-model="queryParams.deviceModelId" placeholder="请选择设备模型id" clearable> |
|
|
|
<el-option label="请选择设备模型" value="deviceModelId" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="设备分组" prop="deviceGroupName"> |
|
|
|
<el-select v-model="queryParams.deviceGroupName" placeholder="请选择设备分组" clearable> |
|
|
|
<el-option label="请添加设备分组" value="" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="collapseVisible"> |
|
|
|
<el-form-item label="组态图片名称" prop="imgConfiguration"> |
|
|
|
<el-select v-model="queryParams.imgConfiguration" placeholder="请选择组态图片名称" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in dc_img_configuration" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item class="childTextAlignRight"> |
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
|
<el-button @click="toggleCollapse">{{editName}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="Plus" |
|
|
|
@click="handleAdd" |
|
|
|
>新增</el-button> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="Edit" |
|
|
|
@click="handleUpdate" |
|
|
|
>修改</el-button> |
|
|
|
</el-col> --> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="Delete" |
|
|
|
@click="handleDelete" |
|
|
|
>删除</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="warning" |
|
|
|
icon="Download" |
|
|
|
@click="handleExport" |
|
|
|
>导出</el-button> |
|
|
|
</el-col> |
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"> |
|
|
|
</right-toolbar> |
|
|
|
</el-row> |
|
|
|
<el-table ref="deviceTable" v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" @sort-change="sortChange" @filter-change="filterChange" :max-height="tableHeight" :border="true" :column-width-draggable="true"> |
|
|
|
<el-table-column type="selection" width="55" align="center" fixed="left"/> |
|
|
|
<el-table-column label="中台设备编码" align="center" prop="centerDeviceCode" :width="150" sortable/> |
|
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" :width="150" sortable/> |
|
|
|
<el-table-column label="通讯来源类型" align="center" prop="deviceSource" :width="150" column-key="deviceSource" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceSource')" :filter-method="filterMethod" sortable/> |
|
|
|
<el-table-column label="是否可用" align="center" prop="enabledFlag" :width="120" column-key="enabledFlag" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('enabledFlag')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="enabledFlagTable" :value="scope.row.enabledFlag"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备类型" align="center" prop="deviceType" :width="120" column-key="deviceType" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceType')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="dc_device_type" :value="scope.row.deviceType"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="所属组织名称" align="center" prop="orgName" :width="150" sortable/> |
|
|
|
<el-table-column label="位置编码" align="center" prop="locationCode" :width="120" sortable/> |
|
|
|
<el-table-column label="位置名称" align="center" prop="locationName" :width="120" sortable/> |
|
|
|
<el-table-column label="设备应用范围" align="center" prop="deviceClass" :width="150" sortable/> |
|
|
|
<el-table-column label="接口名称" align="center" prop="apiName" :width="120" sortable/> |
|
|
|
<el-table-column label="服务器地址" align="center" prop="serverIp" :width="120" sortable/> |
|
|
|
<el-table-column label="从属网关ID" align="center" prop="gatewayId" :width="120" sortable/> |
|
|
|
<el-table-column label="纬度" align="center" prop="latValue" :width="120" sortable/> |
|
|
|
<el-table-column label="经度" align="center" prop="lagValue" :width="120" sortable/> |
|
|
|
<el-table-column label="是否告警" align="center" prop="alertEnabled" :width="120" column-key="alertEnabled" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('alertEnabled')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="alertEnabledTable" :value="scope.row.alertEnabled"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备模型" align="center" prop="deviceModelId" :width="120" column-key="deviceModelId" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceModelId')" :filter-method="filterMethod" sortable> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="租户号" align="center" prop="tentantId" :width="120" sortable/> --> |
|
|
|
<el-table-column label="设备分组" align="center" prop="deviceGroupName" :width="150" column-key="deviceGroupName" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceGroupName')" :filter-method="filterMethod" sortable/> |
|
|
|
<el-table-column label="设备排序" align="center" prop="sort" :width="120" sortable/> |
|
|
|
<el-table-column label="组态图片名称" align="center" prop="imgConfiguration" :width="150" column-key="imgConfiguration" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('imgConfiguration')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="dc_img_configuration" :value="scope.row.imgConfiguration"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="300" :fixed="fixedColumns?'right':false"> |
|
|
|
<template #header> |
|
|
|
<div class="fixed-column-header" style="text-align: center;display: block;" @dblclick="toggleFixedColumns"> |
|
|
|
<span style="text-align: center;display: block;">操作<img style="width:10px;margin-left:5px" v-show="fixedColumns" :src="lock" alt="Image"/></span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
icon="Edit" |
|
|
|
@click="handleParams(scope.row)" |
|
|
|
>维护设备参数</el-button> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
icon="Edit" |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
>修改</el-button> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
icon="Delete" |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
>删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<pagination |
|
|
|
v-show="total>0" |
|
|
|
:total="total" |
|
|
|
v-model:page="params.pageNum" |
|
|
|
v-model:limit="params.pageSize" |
|
|
|
@pagination="getList" |
|
|
|
class="paddingBothLeftRight" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"> |
|
|
|
</right-toolbar> |
|
|
|
</el-row> |
|
|
|
<el-table ref="deviceTable" v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" @sort-change="sortChange" @filter-change="filterChange" :max-height="tableHeight" :border="true" :column-width-draggable="true"> |
|
|
|
<el-table-column type="selection" width="55" align="center" fixed="left"/> |
|
|
|
<el-table-column label="中台设备编码" align="center" prop="centerDeviceCode" :width="150" sortable/> |
|
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" :width="150" sortable/> |
|
|
|
<el-table-column label="通讯来源类型" align="center" prop="deviceSource" :width="150" column-key="deviceSource" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceSource')" :filter-method="filterMethod" sortable/> |
|
|
|
<el-table-column label="是否可用" align="center" prop="enabledFlag" :width="120" column-key="enabledFlag" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('enabledFlag')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="enabledFlagTable" :value="scope.row.enabledFlag"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备类型" align="center" prop="deviceType" :width="120" column-key="deviceType" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceType')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="dc_device_type" :value="scope.row.deviceType"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="所属组织名称" align="center" prop="orgName" :width="150" sortable/> |
|
|
|
<el-table-column label="位置编码" align="center" prop="locationCode" :width="120" sortable/> |
|
|
|
<el-table-column label="位置名称" align="center" prop="locationName" :width="120" sortable/> |
|
|
|
<el-table-column label="设备应用范围" align="center" prop="deviceClass" :width="150" sortable/> |
|
|
|
<el-table-column label="接口名称" align="center" prop="apiName" :width="120" sortable/> |
|
|
|
<el-table-column label="服务器地址" align="center" prop="serverIp" :width="120" sortable/> |
|
|
|
<el-table-column label="从属网关ID" align="center" prop="gatewayId" :width="120" sortable/> |
|
|
|
<el-table-column label="纬度" align="center" prop="latValue" :width="120" sortable/> |
|
|
|
<el-table-column label="经度" align="center" prop="lagValue" :width="120" sortable/> |
|
|
|
<el-table-column label="是否告警" align="center" prop="alertEnabled" :width="120" column-key="alertEnabled" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('alertEnabled')" :filter-method="filterMethod" sortable> |
|
|
|
<template #default="scope"> |
|
|
|
<dict-tag :options="alertEnabledTable" :value="scope.row.alertEnabled"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备模型" align="center" prop="deviceModelId" :width="120" column-key="deviceModelId" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceModelId')" :filter-method="filterMethod" sortable> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="租户号" align="center" prop="tentantId" :width="120" sortable/> --> |
|
|
|
<el-table-column label="设备分组" align="center" prop="deviceGroupName" :width="150" column-key="deviceGroupName" filter-placement="bottom-end" |
|
|
|
:filters="getfilterNameItem('deviceGroupName')" :filter-method="filterMethod" sortable/> |
|
|
|
<el-table-column label="设备排序" align="center" prop="sort" :width="120" sortable/> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="300" :fixed="fixedColumns?'right':false"> |
|
|
|
<template #header> |
|
|
|
<div class="fixed-column-header" style="text-align: center;display: block;" @dblclick="toggleFixedColumns"> |
|
|
|
<span style="text-align: center;display: block;">操作<img style="width:10px;margin-left:5px" v-show="fixedColumns" :src="lock" alt="Image"/></span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
icon="Edit" |
|
|
|
@click="handleParams(scope.row)" |
|
|
|
>维护设备参数</el-button> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
icon="Edit" |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
>修改</el-button> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
icon="Delete" |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
>删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<pagination |
|
|
|
v-show="total>0" |
|
|
|
:total="total" |
|
|
|
v-model:page="params.pageNum" |
|
|
|
v-model:limit="params.pageSize" |
|
|
|
@pagination="getList" |
|
|
|
class="paddingBothLeftRight" |
|
|
|
/> |
|
|
|
<!-- 添加或修改设备信息对话框 --> |
|
|
|
<el-dialog :title="title" v-model="open" width="800px" append-to-body> |
|
|
|
<el-form ref="deviceRef" :model="form" :rules="rules" label-width="125px"> |
|
|
@ -421,6 +465,18 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="组态图片名称" prop="imgConfiguration"> |
|
|
|
<el-select v-model="form.imgConfiguration" placeholder="请选择组态图片名称" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in dc_img_configuration" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="设备排序" prop="sort"> |
|
|
|
<el-input v-model="form.sort" placeholder="请输入设备排序" /> |
|
|
@ -467,7 +523,7 @@ import lock from "@/assets/icons/svg/lock.svg"; |
|
|
|
import { ref,onMounted,onUnmounted } from "vue"; |
|
|
|
import { ElMessageBox } from 'element-plus'; |
|
|
|
const { proxy } = getCurrentInstance(); |
|
|
|
const { dc_device_type, dc_device_source } = proxy.useDict('dc_device_type','dc_device_source'); |
|
|
|
const {dc_img_configuration, dc_device_type, dc_device_source } = proxy.useDict('dc_img_configuration','dc_device_type','dc_device_source'); |
|
|
|
const router = useRouter(); |
|
|
|
const deviceList = ref([]); |
|
|
|
const open = ref(false); |
|
|
@ -963,6 +1019,12 @@ function sortChange({column, prop, order }){ |
|
|
|
getList(); |
|
|
|
} |
|
|
|
|
|
|
|
/** 节点单击事件 */ |
|
|
|
function handleNodeClick(data) { |
|
|
|
queryParams.value.orgCode = data.id; |
|
|
|
handleQuery(); |
|
|
|
}; |
|
|
|
|
|
|
|
getDeptTree(); |
|
|
|
getList(); |
|
|
|
</script> |