提交 6cb635ac 编写于 作者: xiaonannet's avatar xiaonannet

子设备状态上报bug

上级 0cca13b3
......@@ -293,7 +293,7 @@ public class DeviceServiceImpl implements DeviceService {
//更新数据库设备状态
Device device = new Device();
device.setId(oneByClientId.getId());
device.setConnectStatus(DeviceConnectStatus.INIT.getValue());
device.setConnectStatus(DeviceConnectStatus.OFFLINE.getValue());
device.setUpdateTime(DateUtils.getNowDate());
deviceMapper.updateByPrimaryKeySelective(device);
}
......
......@@ -153,34 +153,34 @@
<dict-tag :options="dict.type.link_device_connector" :value="scope.row.connector" />
</template>
</el-table-column>
<el-table-column label="设备描述" align="center" prop="deviceDescription" width="180" />
<el-table-column label="设备状态" align="center" prop="deviceStatus">
<el-table-column label="设备标签" align="center" prop="deviceTags" width="180"/>
<el-table-column label="产品标识" align="center" prop="productIdentification" width="180"/>
<el-table-column label="产品协议类型" align="center" prop="protocolType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.link_device_status" :value="scope.row.deviceStatus" />
<dict-tag :options="dict.type.link_device_protocol_type" :value="scope.row.protocolType" />
</template>
</el-table-column>
<el-table-column label="连接状态" align="center" prop="connectStatus">
<el-table-column label="设备类型" align="center" prop="deviceType">
<template slot-scope="scope">
<dict-tag :options="dict.type.link_device_connect_status" :value="scope.row.connectStatus" />
<dict-tag :options="dict.type.link_device_device_type" :value="scope.row.deviceType" />
</template>
</el-table-column>
<el-table-column label="是否遗言" align="center" prop="isWill">
<el-table-column label="设备状态" align="center" prop="deviceStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.link_device_is_will" :value="scope.row.isWill" />
<dict-tag :options="dict.type.link_device_status" :value="scope.row.deviceStatus" />
</template>
</el-table-column>
<el-table-column label="设备标签" align="center" prop="deviceTags" />
<el-table-column label="产品标识" align="center" prop="productIdentification" />
<el-table-column label="产品协议类型" align="center" prop="protocolType" width="100">
<el-table-column label="连接状态" align="center" prop="connectStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.link_device_protocol_type" :value="scope.row.protocolType" />
<dict-tag :options="dict.type.link_device_connect_status" :value="scope.row.connectStatus" />
</template>
</el-table-column>
<el-table-column label="设备类型" align="center" prop="deviceType">
<el-table-column label="是否遗言" align="center" prop="isWill">
<template slot-scope="scope">
<dict-tag :options="dict.type.link_device_device_type" :value="scope.row.deviceType" />
<dict-tag :options="dict.type.link_device_is_will" :value="scope.row.isWill" />
</template>
</el-table-column>
<el-table-column label="设备描述" align="center" prop="deviceDescription" width="180" />
<el-table-column label="创建者" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
......@@ -317,14 +317,6 @@
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="产品标识" prop="productIdentification">
<el-input v-model="form.productIdentification" placeholder="请输入产品标识" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="产品协议类型" prop="protocolType">
......@@ -343,13 +335,28 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-col :span="11">
<el-form-item label="所属产品">
<el-select v-model="form.productIdentification" placeholder="请选择所属产品">
<el-option
v-for="item in productOptions"
:key="item.productIdentification"
:label="item.productName"
:value="item.productIdentification"
:disabled="item.status === 0"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="设备标签" prop="deviceTags">
<el-input v-model="form.deviceTags" placeholder="请输入设备标签" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="备注" prop="remark">
......@@ -594,8 +601,11 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备档案";
getDevice().then(response => {
this.productOptions = response.products;
this.open = true;
this.title = "添加设备档案";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -603,6 +613,7 @@ export default {
const id = row.id || this.ids;
getDevice(id).then((response) => {
this.form = response.data;
this.productOptions = response.products;
this.open = true;
this.title = "修改设备档案";
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册