Commit 945851bb by YG8999

设备网关

parent 385f3cd6
......@@ -9,14 +9,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备MAC" prop="devMac">
<el-input
v-model="queryParams.devMac"
placeholder="请输入设备MAC"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备ID" prop="devId">
<el-input
v-model="queryParams.devId"
......@@ -25,78 +17,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="设备密码" prop="devPsw">-->
<!-- <el-input-->
<!-- v-model="queryParams.devPsw"-->
<!-- placeholder="请输入设备密码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="设备版本号" prop="devVer">-->
<!-- <el-input-->
<!-- v-model="queryParams.devVer"-->
<!-- placeholder="请输入设备版本号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="项目ID" prop="projtId">
<el-input
v-model="queryParams.projtId"
placeholder="请输入项目ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="项目密码" prop="projtPsw">-->
<!-- <el-input-->
<!-- v-model="queryParams.projtPsw"-->
<!-- placeholder="请输入项目密码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="分组" prop="group">-->
<!-- <el-input-->
<!-- v-model="queryParams.group"-->
<!-- placeholder="请输入分组"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="设备位置" prop="devPosition">-->
<!-- <el-input-->
<!-- v-model="queryParams.devPosition"-->
<!-- placeholder="请输入设备位置"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="设备网关dev_id" prop="gatewayId">-->
<!-- <el-input-->
<!-- v-model="queryParams.gatewayId"-->
<!-- placeholder="请输入设备网关dev_id"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="电量、电压" prop="voltage">-->
<!-- <el-input-->
<!-- v-model="queryParams.voltage"-->
<!-- placeholder="请输入电量、电压"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="信号值" prop="signalValue">-->
<!-- <el-input-->
<!-- v-model="queryParams.signalValue"-->
<!-- placeholder="请输入信号值"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -157,27 +78,26 @@
<el-table-column type="selection" width="70" align="center"/>
<!-- <el-table-column label="${comment}" align="center" prop="id" />-->
<el-table-column label="设备名称" align="center" prop="devName"/>
<el-table-column label="设备MAC" align="center" prop="devMac"/>
<!-- <el-table-column label="设备MAC" align="center" prop="devMac"/>-->
<el-table-column label="设备ID" align="center" prop="devId"/>
<el-table-column label="设备密码" align="center" prop="devPsw"/>
<el-table-column label="设备版本号" align="center" prop="devVer"/>
<el-table-column label="设备类型 " align="center" prop="devType">
<el-table-column label="版本号" align="center" prop="devVer"/>
<el-table-column label="设备类型" align="center" prop="devType">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_type" :value="scope.row.devType"/>
</template>
</el-table-column>
<el-table-column label="项目ID" align="center" prop="projtId"/>
<el-table-column label="项目密码" align="center" prop="projtPsw"/>
<!-- <el-table-column label="项目ID" align="center" prop="projtId"/>-->
<!-- <el-table-column label="项目密码" align="center" prop="projtPsw"/>-->
<el-table-column label="分组" align="center" prop="group"/>
<el-table-column label="设备状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="设备位置" align="center" prop="devPosition"/>
<el-table-column label="设备网关dev_id" align="center" prop="gatewayId"/>
<el-table-column label="电量、电压" align="center" prop="voltage"/>
<!-- <el-table-column label="备注" align="center" prop="remark"/>-->
<!-- <el-table-column label="设备位置" align="center" prop="devPosition"/>-->
<el-table-column label="电量" align="center" prop="voltage"/>
<el-table-column label="信号值" align="center" prop="signalValue"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -210,8 +130,8 @@
/>
<!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-form-item label="设备名称" prop="devName">
<el-input v-model="form.devName" placeholder="请输入设备名称"/>
</el-form-item>
......@@ -224,13 +144,16 @@
<el-form-item label="设备密码" prop="devPsw">
<el-input v-model="form.devPsw" placeholder="请输入设备密码"/>
</el-form-item>
<el-form-item label="设备版本号" prop="devVer">
<el-select v-model="form.devVer" placeholder="请选择设备版本号">
<el-form-item label="分组" prop="group">
<el-input v-model="form.group" placeholder="请输入分组"/>
</el-form-item>
<el-form-item label="版本号" prop="devVer">
<el-select v-model="form.devVer" placeholder="请选择版本号">
<el-option
v-for="dict in dict.type.device_ver_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
......@@ -240,7 +163,7 @@
v-for="dict in dict.type.device_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
......@@ -250,18 +173,13 @@
<el-form-item label="项目密码" prop="projtPsw">
<el-input v-model="form.projtPsw" placeholder="请输入项目密码"/>
</el-form-item>
<!-- <el-form-item label="分组" prop="group">-->
<!-- <el-input v-model="form.group" placeholder="请输入分组"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>-->
<!-- </el-form-item>-->
<el-form-item label="设备位置" prop="devPosition">
<el-input v-model="form.devPosition" placeholder="请输入设备位置"/>
</el-form-item>
<el-form-item label="设备网关id" prop="gatewayId">
<el-input v-model="form.gatewayId" placeholder="请输入设备网关id"/>
</el-form-item>
<!-- <el-form-item label="电量、电压" prop="voltage">-->
<!-- <el-input v-model="form.voltage" placeholder="请输入电量、电压" />-->
<!-- </el-form-item>-->
......@@ -326,12 +244,12 @@ export default {
form: {},
// 表单校验
rules: {
devMac: [
{required: true, message: "设备MAC不能为空", trigger: "blur"}
],
// devId: [
// { required: true, message: "设备ID不能为空", trigger: "blur" }
// devMac: [
// {required: true, message: "设备MAC不能为空", trigger: "blur"}
// ],
devId: [
{ required: true, message: "设备ID不能为空", trigger: "blur" }
],
devName: [
{required: true, message: "设备名称不能为空", trigger: "blur"}
]
......
......@@ -148,34 +148,21 @@
<el-table-column label="设备 MAC" align="center" prop="devMac" />
<el-table-column label="设备ID" align="center" prop="devId" />
<el-table-column label="设备密码" align="center" prop="devPsw" />
<el-form-item label="设备版本号" prop="devVer">
<el-select v-model="form.devVer" placeholder="请选择设备版本号">
<el-option
v-for="dict in dict.type.device_ver_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备类型" prop="devType">
<el-select v-model="form.devType" placeholder="请选择设备类型">
<el-option
v-for="dict in dict.type.device_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-table-column label="版本号" align="center" prop="devVer"/>
<el-table-column label="设备类型" align="center" prop="devType">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_type" :value="scope.row.devType"/>
</template>
</el-table-column>
<el-table-column label="网络分组" align="center" prop="group" />
<el-table-column label="设备状态" align="center" prop="status" />
<el-table-column label="mqtt服务器IP/域名" align="center" prop="mqttIp" />
<el-table-column label="mqtt服务器端口" align="center" prop="mqttPort" />
<el-table-column label="mqtt用户名" align="center" prop="mqttUser" />
<el-table-column label="mqtt用户密码" align="center" prop="mqttPaswd" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="设备位置" align="center" prop="devPosition" />
<!-- <el-table-column label="设备状态" align="center" prop="status" />-->
<!-- <el-table-column label="mqtt服务器IP/域名" align="center" prop="mqttIp" />-->
<!-- <el-table-column label="mqtt服务器端口" align="center" prop="mqttPort" />-->
<!-- <el-table-column label="mqtt用户名" align="center" prop="mqttUser" />-->
<!-- <el-table-column label="mqtt用户密码" align="center" prop="mqttPaswd" />-->
<!-- <el-table-column label="备注" align="center" prop="remark" />-->
<!-- <el-table-column label="设备位置" align="center" prop="devPosition" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -205,8 +192,8 @@
/>
<!-- 添加或修改设备网关信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-form-item label="设备名称" prop="devName">
<el-input v-model="form.devName" placeholder="请输入设备名称" />
</el-form-item>
......@@ -220,18 +207,28 @@
<el-input v-model="form.devPsw" placeholder="请输入设备密码" />
</el-form-item>
<el-form-item label="设备版本号" prop="devVer">
<el-select v-model="form.devVer" placeholder="请选择设备版本号">
<el-select v-model="form.devVer" placeholder="请选择版本号">
<el-option
v-for="dict in dict.type.device_ver_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="网络分组" prop="group">-->
<!-- <el-input v-model="form.group" placeholder="请输入网络分组" />-->
<!-- </el-form-item>-->
<el-form-item label="设备类型" prop="devType">
<el-select v-model="form.devType" placeholder="请选择设备类型">
<el-option
v-for="dict in dict.type.device_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="网络分组" prop="group">
<el-input v-model="form.group" placeholder="请输入网络分组" />
</el-form-item>
<el-form-item label="mqtt服务器IP/域名" prop="mqttIp">
<el-input v-model="form.mqttIp" placeholder="请输入mqtt服务器IP/域名" />
</el-form-item>
......@@ -310,6 +307,9 @@ export default {
devMac: [
{ required: true, message: "设备MAC不能为空", trigger: "blur" }
],
devId: [
{ required: true, message: "设备ID不能为空", trigger: "blur" }
],
devName: [
{ required: true, message: "设备名称不能为空", trigger: "blur" }
],
......
......@@ -101,7 +101,7 @@
<el-table-column label="请求的序列号" align="center" prop="seq" />
<el-table-column label="消息类型" align="center" prop="mqttType" />
<el-table-column label="消息描述" align="center" prop="mqttDescribe" />
<el-table-column label="消息主体参数" align="center" prop="payload" />
<!-- <el-table-column label="消息主体参数" align="center" prop="payload" />-->
<el-table-column label="消息主题" align="center" prop="topic" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment