|
@ -25,145 +25,150 @@ |
|
|
@keyup.enter="handleQuery" |
|
|
@keyup.enter="handleQuery" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="通讯来源设备ID" prop="deviceSourceId"> |
|
|
<el-collapse-transition> |
|
|
<el-input |
|
|
<div v-show="collapseVisible"> |
|
|
v-model="queryParams.deviceSourceId" |
|
|
<el-form-item label="通讯来源设备ID" prop="deviceSourceId"> |
|
|
placeholder="请输入通讯来源设备ID" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.deviceSourceId" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入通讯来源设备ID" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="是否可用" prop="enabledFlag"> |
|
|
/> |
|
|
<el-select v-model="queryParams.enabledFlag" placeholder="请选择是否可用" clearable> |
|
|
</el-form-item> |
|
|
<el-option |
|
|
<el-form-item label="是否可用" prop="enabledFlag"> |
|
|
v-for="dict in enabledFlag" |
|
|
<el-select v-model="queryParams.enabledFlag" placeholder="请选择是否可用" clearable> |
|
|
:key="dict.value" |
|
|
<el-option |
|
|
:label="dict.label" |
|
|
v-for="dict in enabledFlag" |
|
|
:value="dict.value" |
|
|
:key="dict.value" |
|
|
/> |
|
|
:label="dict.label" |
|
|
</el-select> |
|
|
:value="dict.value" |
|
|
</el-form-item> |
|
|
/> |
|
|
<el-form-item label="设备类型" prop="deviceType"> |
|
|
</el-select> |
|
|
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable> |
|
|
</el-form-item> |
|
|
<el-option |
|
|
<el-form-item label="设备类型" prop="deviceType"> |
|
|
v-for="dict in dc_device_type" |
|
|
<el-select v-model="queryParams.deviceType" placeholder="请选择设备类型" clearable> |
|
|
:key="dict.value" |
|
|
<el-option |
|
|
:label="dict.label" |
|
|
v-for="dict in dc_device_type" |
|
|
:value="dict.value" |
|
|
:key="dict.value" |
|
|
/> |
|
|
:label="dict.label" |
|
|
</el-select> |
|
|
:value="dict.value" |
|
|
</el-form-item> |
|
|
/> |
|
|
<el-form-item label="所属组织编码" prop="orgCode"> |
|
|
</el-select> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.orgCode" |
|
|
<el-form-item label="所属组织编码" prop="orgCode"> |
|
|
placeholder="请输入所属组织编码" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.orgCode" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入所属组织编码" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="所属组织名称" prop="orgName"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.orgName" |
|
|
<el-form-item label="所属组织名称" prop="orgName"> |
|
|
placeholder="请输入所属组织名称" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.orgName" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入所属组织名称" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="位置编码" prop="locationCode"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.locationCode" |
|
|
<el-form-item label="位置编码" prop="locationCode"> |
|
|
placeholder="请输入位置编码" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.locationCode" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入位置编码" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="位置名称" prop="locationName"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.locationName" |
|
|
<el-form-item label="位置名称" prop="locationName"> |
|
|
placeholder="请输入位置名称" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.locationName" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入位置名称" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="设备应用范围" prop="deviceClass"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.deviceClass" |
|
|
<el-form-item label="设备应用范围" prop="deviceClass"> |
|
|
placeholder="请输入设备应用范围" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.deviceClass" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入设备应用范围" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="接口名称" prop="apiName"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.apiName" |
|
|
<el-form-item label="接口名称" prop="apiName"> |
|
|
placeholder="请输入接口名称" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.apiName" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入接口名称" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="服务器地址" prop="serverIp"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.serverIp" |
|
|
<el-form-item label="服务器地址" prop="serverIp"> |
|
|
placeholder="请输入服务器地址" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.serverIp" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入服务器地址" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="从属网关ID" prop="gatewayId"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.gatewayId" |
|
|
<el-form-item label="从属网关ID" prop="gatewayId"> |
|
|
placeholder="请输入从属网关ID" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.gatewayId" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入从属网关ID" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="纬度" prop="latValue"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.latValue" |
|
|
<el-form-item label="纬度" prop="latValue"> |
|
|
placeholder="请输入纬度" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.latValue" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入纬度" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="经度" prop="lagValue"> |
|
|
/> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.lagValue" |
|
|
<el-form-item label="经度" prop="lagValue"> |
|
|
placeholder="请输入经度" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.lagValue" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入经度" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="是否告警" prop="alertEnabled"> |
|
|
/> |
|
|
<el-select v-model="queryParams.alertEnabled" placeholder="请选择设备类型" clearable> |
|
|
</el-form-item> |
|
|
<el-option |
|
|
<el-form-item label="是否告警" prop="alertEnabled"> |
|
|
v-for="dict in alertEnabled" |
|
|
<el-select v-model="queryParams.alertEnabled" placeholder="请选择设备类型" clearable> |
|
|
:key="dict.value" |
|
|
<el-option |
|
|
:label="dict.label" |
|
|
v-for="dict in alertEnabled" |
|
|
:value="dict.value" |
|
|
:key="dict.value" |
|
|
/> |
|
|
:label="dict.label" |
|
|
</el-select> |
|
|
:value="dict.value" |
|
|
</el-form-item> |
|
|
/> |
|
|
<el-form-item label="设备模型" prop="deviceModelId"> |
|
|
</el-select> |
|
|
<el-select v-model="queryParams.deviceModelId" placeholder="请选择设备模型id" clearable> |
|
|
</el-form-item> |
|
|
<el-option label="请选择设备模型" value="deviceModelId" /> |
|
|
<el-form-item label="设备模型" prop="deviceModelId"> |
|
|
</el-select> |
|
|
<el-select v-model="queryParams.deviceModelId" placeholder="请选择设备模型id" clearable> |
|
|
</el-form-item> |
|
|
<el-option label="请选择设备模型" value="deviceModelId" /> |
|
|
<el-form-item label="租户号" prop="tentantId"> |
|
|
</el-select> |
|
|
<el-input |
|
|
</el-form-item> |
|
|
v-model="queryParams.tentantId" |
|
|
<el-form-item label="租户号" prop="tentantId"> |
|
|
placeholder="请输入租户号" |
|
|
<el-input |
|
|
clearable |
|
|
v-model="queryParams.tentantId" |
|
|
@keyup.enter="handleQuery" |
|
|
placeholder="请输入租户号" |
|
|
/> |
|
|
clearable |
|
|
</el-form-item> |
|
|
@keyup.enter="handleQuery" |
|
|
<el-form-item label="设备分组" prop="deviceGroupId"> |
|
|
/> |
|
|
<el-select v-model="queryParams.deviceGroupId" placeholder="请选择设备分组ID" clearable> |
|
|
</el-form-item> |
|
|
<el-option label="请添加设备分组" value="" /> |
|
|
<el-form-item label="设备分组" prop="deviceGroupId"> |
|
|
</el-select> |
|
|
<el-select v-model="queryParams.deviceGroupId" placeholder="请选择设备分组ID" clearable> |
|
|
</el-form-item> |
|
|
<el-option label="请添加设备分组" value="" /> |
|
|
<el-form-item> |
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-collapse-transition> |
|
|
|
|
|
<el-form-item class="childTextAlignCenter"> |
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
|
|
|
<el-button @click="toggleCollapse">{{editName}}</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
@ -175,13 +180,13 @@ |
|
|
@click="handleAdd" |
|
|
@click="handleAdd" |
|
|
>新增</el-button> |
|
|
>新增</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<!-- <el-col :span="1.5"> |
|
|
<el-button |
|
|
<el-button |
|
|
type="success" |
|
|
type="success" |
|
|
icon="Edit" |
|
|
icon="Edit" |
|
|
@click="handleUpdate" |
|
|
@click="handleUpdate" |
|
|
>修改</el-button> |
|
|
>修改</el-button> |
|
|
</el-col> |
|
|
</el-col> --> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<el-button |
|
|
<el-button |
|
|
type="success" |
|
|
type="success" |
|
@ -201,41 +206,41 @@ |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange"> |
|
|
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange"> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="selection" width="55" align="center" fixed="left"/> |
|
|
<el-table-column label="中台设备编码" align="center" prop="centerDeviceCode" /> |
|
|
<el-table-column label="中台设备编码" align="center" prop="centerDeviceCode" :width="120"/> |
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" /> |
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" :width="120"/> |
|
|
<el-table-column label="通讯来源类型" align="center" prop="deviceSource" /> |
|
|
<el-table-column label="通讯来源类型" align="center" prop="deviceSource" :width="120"/> |
|
|
<el-table-column label="通讯来源设备ID" align="center" prop="deviceSourceId" /> |
|
|
<el-table-column label="通讯来源设备ID" align="center" prop="deviceSourceId" :width="120"/> |
|
|
<el-table-column label="是否可用" align="center" prop="enabledFlag" > |
|
|
<el-table-column label="是否可用" align="center" prop="enabledFlag" :width="120"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<dict-tag :options="enabledFlag" :value="scope.row.enabledFlag"/> |
|
|
<dict-tag :options="enabledFlagTable" :value="scope.row.enabledFlag"/> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="设备类型" align="center" prop="deviceType"> |
|
|
<el-table-column label="设备类型" align="center" prop="deviceType" :width="120"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<dict-tag :options="dc_device_type" :value="scope.row.deviceType"/> |
|
|
<dict-tag :options="dc_device_type" :value="scope.row.deviceType"/> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="所属组织编码" align="center" prop="orgCode" /> |
|
|
<el-table-column label="所属组织编码" align="center" prop="orgCode" :width="120"/> |
|
|
<el-table-column label="所属组织名称" align="center" prop="orgName" /> |
|
|
<el-table-column label="所属组织名称" align="center" prop="orgName" :width="120" /> |
|
|
<el-table-column label="位置编码" align="center" prop="locationCode" /> |
|
|
<el-table-column label="位置编码" align="center" prop="locationCode" :width="120"/> |
|
|
<el-table-column label="位置名称" align="center" prop="locationName" /> |
|
|
<el-table-column label="位置名称" align="center" prop="locationName" :width="120"/> |
|
|
<el-table-column label="设备应用范围" align="center" prop="deviceClass" /> |
|
|
<el-table-column label="设备应用范围" align="center" prop="deviceClass" :width="120"/> |
|
|
<el-table-column label="接口名称" align="center" prop="apiName" /> |
|
|
<el-table-column label="接口名称" align="center" prop="apiName" :width="120"/> |
|
|
<el-table-column label="服务器地址" align="center" prop="serverIp" /> |
|
|
<el-table-column label="服务器地址" align="center" prop="serverIp" :width="120"/> |
|
|
<el-table-column label="从属网关ID" align="center" prop="gatewayId" /> |
|
|
<el-table-column label="从属网关ID" align="center" prop="gatewayId" :width="120"/> |
|
|
<el-table-column label="纬度" align="center" prop="latValue" /> |
|
|
<el-table-column label="纬度" align="center" prop="latValue" :width="120"/> |
|
|
<el-table-column label="经度" align="center" prop="lagValue" /> |
|
|
<el-table-column label="经度" align="center" prop="lagValue" :width="120"/> |
|
|
<el-table-column label="是否告警" align="center" prop="alertEnabled" > |
|
|
<el-table-column label="是否告警" align="center" prop="alertEnabled" :width="120"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<dict-tag :options="alert_enabled" :value="scope.row.alertEnabled"/> |
|
|
<dict-tag :options="alertEnabledTable" :value="scope.row.alertEnabled"/> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="设备模型" align="center" prop="deviceModelId" > |
|
|
<el-table-column label="设备模型" align="center" prop="deviceModelId" :width="120"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="租户号" align="center" prop="tentantId" /> |
|
|
<el-table-column label="租户号" align="center" prop="tentantId" :width="120"/> |
|
|
<el-table-column label="设备分组" align="center" prop="deviceGroupId" /> |
|
|
<el-table-column label="设备分组" align="center" prop="deviceGroupId" :width="120"/> |
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" :width="300"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<el-button |
|
|
<el-button |
|
|
type="text" |
|
|
type="text" |
|
@ -267,134 +272,133 @@ |
|
|
<!-- 添加或修改设备信息对话框 --> |
|
|
<!-- 添加或修改设备信息对话框 --> |
|
|
<el-dialog :title="title" v-model="open" width="800px" append-to-body> |
|
|
<el-dialog :title="title" v-model="open" width="800px" append-to-body> |
|
|
<el-form ref="deviceRef" :model="form" :rules="rules" label-width="120px"> |
|
|
<el-form ref="deviceRef" :model="form" :rules="rules" label-width="120px"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="中台设备编码" prop="centerDeviceCode"> |
|
|
<el-form-item label="中台设备编码" prop="centerDeviceCode"> |
|
|
<el-input v-model="form.centerDeviceCode" placeholder="请输入中台设备编码" /> |
|
|
<el-input disabled v-model="form.centerDeviceCode" placeholder="请输入中台设备编码" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="设备名称" prop="deviceName"> |
|
|
<el-form-item label="设备名称" prop="deviceName"> |
|
|
<el-input v-model="form.deviceName" placeholder="请输入设备名称" /> |
|
|
<el-input v-model="form.deviceName" placeholder="请输入设备名称" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="通讯来源类型" prop="deviceSource"> |
|
|
<el-form-item label="通讯来源类型" prop="deviceSource"> |
|
|
<el-input v-model="form.deviceSource" placeholder="请输入通讯来源类型;ThingsDB/KingIO/Tk" /> |
|
|
<el-input v-model="form.deviceSource" placeholder="请输入通讯来源类型;ThingsDB/KingIO/Tk" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="通讯来源设备ID" prop="deviceSourceId"> |
|
|
<el-form-item label="通讯来源设备ID" prop="deviceSourceId"> |
|
|
<el-input v-model="form.deviceSourceId" placeholder="请输入通讯来源设备ID" /> |
|
|
<el-input v-model="form.deviceSourceId" placeholder="请输入通讯来源设备ID" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="是否可用" prop="enabledFlag"> |
|
|
<el-form-item label="是否可用" prop="enabledFlag"> |
|
|
<el-select v-model="form.enabledFlag" placeholder="请选择是否可用"> |
|
|
<el-select v-model="form.enabledFlag" placeholder="请选择是否可用"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in enabledFlag" |
|
|
v-for="dict in enabledFlag" |
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="设备类型" prop="deviceType"> |
|
|
<el-form-item label="设备类型" prop="deviceType"> |
|
|
<el-select v-model="form.deviceType" placeholder="请选择设备类型"> |
|
|
<el-select v-model="form.deviceType" placeholder="请选择设备类型"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in dc_device_type" |
|
|
v-for="dict in dc_device_type" |
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value"> |
|
|
:value="dict.value"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="所属组织编码" prop="orgCode"> |
|
|
<el-form-item label="所属组织编码" prop="orgCode"> |
|
|
<el-input v-model="form.orgCode" placeholder="请输入所属组织编码" /> |
|
|
<el-input v-model="form.orgCode" placeholder="请输入所属组织编码" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="所属组织名称" prop="orgName"> |
|
|
<el-form-item label="所属组织名称" prop="orgName"> |
|
|
<el-input v-model="form.orgName" placeholder="请输入所属组织名称" /> |
|
|
<el-input v-model="form.orgName" placeholder="请输入所属组织名称" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="位置编码" prop="locationCode"> |
|
|
<el-form-item label="位置编码" prop="locationCode"> |
|
|
<el-input v-model="form.locationCode" placeholder="请输入位置编码" /> |
|
|
<el-input v-model="form.locationCode" placeholder="请输入位置编码" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="位置名称" prop="locationName"> |
|
|
<el-form-item label="位置名称" prop="locationName"> |
|
|
<el-input v-model="form.locationName" placeholder="请输入位置名称" /> |
|
|
<el-input v-model="form.locationName" placeholder="请输入位置名称" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="设备应用范围" prop="deviceClass"> |
|
|
<el-form-item label="设备应用范围" prop="deviceClass"> |
|
|
<el-input v-model="form.deviceClass" placeholder="请输入设备应用范围" /> |
|
|
<el-input v-model="form.deviceClass" placeholder="请输入设备应用范围" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="接口名称" prop="apiName"> |
|
|
<el-form-item label="接口名称" prop="apiName"> |
|
|
<el-input v-model="form.apiName" placeholder="请输入接口名称" /> |
|
|
<el-input v-model="form.apiName" placeholder="请输入接口名称" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="服务器地址" prop="serverIp"> |
|
|
<el-form-item label="服务器地址" prop="serverIp"> |
|
|
<el-input v-model="form.serverIp" placeholder="请输入服务器地址" /> |
|
|
<el-input v-model="form.serverIp" placeholder="请输入服务器地址" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="从属网关ID" prop="gatewayId"> |
|
|
<el-form-item label="从属网关ID" prop="gatewayId"> |
|
|
<el-input v-model="form.gatewayId" placeholder="请输入从属网关ID" /> |
|
|
<el-input v-model="form.gatewayId" placeholder="请输入从属网关ID" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="纬度" prop="latValue"> |
|
|
<el-form-item label="纬度" prop="latValue"> |
|
|
<el-input v-model="form.latValue" placeholder="请输入纬度" /> |
|
|
<el-input v-model="form.latValue" placeholder="请输入纬度" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="经度" prop="lagValue"> |
|
|
<el-form-item label="经度" prop="lagValue"> |
|
|
<el-input v-model="form.lagValue" placeholder="请输入经度" /> |
|
|
<el-input v-model="form.lagValue" placeholder="请输入经度" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="是否告警" prop="alertEnabled"> |
|
|
<el-form-item label="是否告警" prop="alertEnabled"> |
|
|
<el-select v-model="form.alertEnabled" placeholder="请选择是否告警"> |
|
|
<el-select v-model="form.alertEnabled" placeholder="请选择是否告警"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in alertEnabled" |
|
|
v-for="dict in alertEnabled" |
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="设备模型" prop="deviceModelId"> |
|
|
<el-form-item label="设备模型" prop="deviceModelId"> |
|
|
<el-select v-model="form.deviceModelId" placeholder="请选择设备模型id"> |
|
|
<el-select v-model="form.deviceModelId" placeholder="请选择设备模型id"> |
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="租户号" prop="tentantId"> |
|
|
<el-form-item label="租户号" prop="tentantId"> |
|
|
<el-input v-model="form.tentantId" placeholder="请输入租户号" /> |
|
|
<el-input v-model="form.tentantId" placeholder="请输入租户号" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="设备分组" prop="deviceGroupId"> |
|
|
<el-form-item label="设备分组" prop="deviceGroupId"> |
|
|
<el-select v-model="form.deviceGroupId" placeholder="请选择设备分组ID"> |
|
|
<el-select v-model="form.deviceGroupId" placeholder="请选择设备分组ID"> |
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<div class="dialog-footer"> |
|
|
<div class="dialog-footer"> |
|
@ -405,9 +409,11 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<style lang="scss" > |
|
|
|
|
|
@import "@/assets/styles/self-defined.scss"; |
|
|
|
|
|
</style> |
|
|
<script setup name="Device"> |
|
|
<script setup name="Device"> |
|
|
import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/model/device"; |
|
|
import { getUuid, listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/model/device"; |
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { dc_device_type } = proxy.useDict('dc_device_type'); |
|
|
const { dc_device_type } = proxy.useDict('dc_device_type'); |
|
@ -422,11 +428,21 @@ const single = ref(true); |
|
|
const multiple = ref(true); |
|
|
const multiple = ref(true); |
|
|
const total = ref(0); |
|
|
const total = ref(0); |
|
|
const title = ref(""); |
|
|
const title = ref(""); |
|
|
|
|
|
const collapseVisible = ref(false); |
|
|
|
|
|
const editName = ref("更多筛选项"); |
|
|
const enabledFlag = ref([ |
|
|
const enabledFlag = ref([ |
|
|
|
|
|
{label: '可用', value: true, elTagType: 'default', elTagClass: null}, |
|
|
|
|
|
{label: '不可用', value: false, elTagType: 'default', elTagClass: null} |
|
|
|
|
|
]); |
|
|
|
|
|
const alertEnabled = ref([ |
|
|
|
|
|
{label: '告警', value: true, elTagType: 'default', elTagClass: null}, |
|
|
|
|
|
{label: '不告警', value: false, elTagType: 'default', elTagClass: null} |
|
|
|
|
|
]); |
|
|
|
|
|
const enabledFlagTable = ref([ |
|
|
{label: '可用', value: 'true', elTagType: 'default', elTagClass: null}, |
|
|
{label: '可用', value: 'true', elTagType: 'default', elTagClass: null}, |
|
|
{label: '不可用', value: 'false', elTagType: 'default', elTagClass: null} |
|
|
{label: '不可用', value: 'false', elTagType: 'default', elTagClass: null} |
|
|
]); |
|
|
]); |
|
|
const alert_enabled = ref([ |
|
|
const alertEnabledTable = ref([ |
|
|
{label: '告警', value: 'true', elTagType: 'default', elTagClass: null}, |
|
|
{label: '告警', value: 'true', elTagType: 'default', elTagClass: null}, |
|
|
{label: '不告警', value: 'false', elTagType: 'default', elTagClass: null} |
|
|
{label: '不告警', value: 'false', elTagType: 'default', elTagClass: null} |
|
|
]); |
|
|
]); |
|
@ -539,6 +555,11 @@ function handleSelectionChange(selection) { |
|
|
|
|
|
|
|
|
/** 新增按钮操作 */ |
|
|
/** 新增按钮操作 */ |
|
|
function handleAdd() { |
|
|
function handleAdd() { |
|
|
|
|
|
loading.value = true; |
|
|
|
|
|
getUuid().then(response=>{ |
|
|
|
|
|
form.value.centerDeviceCode = response.msg; |
|
|
|
|
|
loading.value = false; |
|
|
|
|
|
}); |
|
|
reset(); |
|
|
reset(); |
|
|
open.value = true; |
|
|
open.value = true; |
|
|
title.value = "添加设备信息"; |
|
|
title.value = "添加设备信息"; |
|
@ -615,5 +636,14 @@ function handleParams(row){ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function toggleCollapse() { |
|
|
|
|
|
collapseVisible.value = !collapseVisible.value; |
|
|
|
|
|
if(collapseVisible.value){ |
|
|
|
|
|
editName.value = "折叠筛选项"; |
|
|
|
|
|
}else{ |
|
|
|
|
|
editName.value = "更多筛选项" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
getList(); |
|
|
getList(); |
|
|
</script> |
|
|
</script> |
|
|