1.返回运行状态字段

2.运行状态取字典
dev
862857010@qq.com 2 years ago
parent 71d336ea7a
commit 7b20812373
  1. 2
      cjy-project/src/main/resources/mapper/iotInfo/IotInfoMapper.xml
  2. 4
      ruoyi-ui/src/views/picture/resource-monitoring/dialog-module/iot-detail.vue
  3. 13
      ruoyi-ui/src/views/picture/resource-monitoring/dialog-module/iot-list.vue

@ -230,7 +230,7 @@
select t1.id,t1.out_code,t1.type,t1.resource_code as resourceCode,t1.resource_name as resourceName,t1.sort
,t1.status,t1.dev_brand as devBrand,t1.dev_model as devModel,t1.label,t1.manufacturer,t1.buy_time as buyTime
,t1.lon,t1.lat,t1.remarks,t1.monitor_path,t1.in_resources as inResources,t1.inside_area as
insideArea,t2.cover_img as coverImg
insideArea,t2.cover_img as coverImg,t1.run_status as runStatus
,t2.introduction,t2.resource_describe as resourceDescribe
<if test="type == 'wifi'">
,t3.on_line_num as onLineNum,

@ -34,7 +34,7 @@
运行状态
</div>
<div class="d-form-body">
{{ detailData.runStatus == 0 ? '离线' : '在线' }}
<dict-tag :options="dict.type.operating_state" :value="detailData.runStatus"/>
</div>
</div>
</el-col>
@ -102,7 +102,7 @@ export default {
},
name: "iot-detail",
props: ['detailData', 'interfacePath', 'dataType'],
dicts: ['dev_brand_dict', 'dev_model_dict'],
dicts: ['dev_brand_dict', 'dev_model_dict','operating_state'],
data() {
return {

@ -26,10 +26,15 @@
<dict-tag :options="dict.type.dev_model_dict" :value="scope.row.devModel"/>
</template>
</el-table-column>
<el-table-column prop="runStatus" label="运行状态">
<!-- <el-table-column prop="runStatus" label="运行状态">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; 如果 runStatus 0则显示红色标签离线否则显示绿色标签在线 &ndash;&gt;-->
<!-- <el-tag :type="[scope.row.runStatus === '0' ? 'danger' : 'success']">{{ scope.row.runStatus === '0' ? '离线' : '在线' }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="运行状态" prop="runStatus">
<template slot-scope="scope">
<!-- 如果 runStatus 0则显示红色标签离线否则显示绿色标签在线 -->
<el-tag :type="[scope.row.runStatus === '0' ? 'danger' : 'success']">{{ scope.row.runStatus === '0' ? '离线' : '在线' }}</el-tag>
<dict-tag :options="dict.type.operating_state" :value="scope.row.runStatus"/>
</template>
</el-table-column>
</el-table>
@ -49,7 +54,7 @@
export default {
name: "video-list",
props: ['listData','total','interfacePath','dataType'],
dicts: ['dev_brand_dict','dev_model_dict'],
dicts: ['dev_brand_dict','dev_model_dict','operating_state'],
data(){
return{
resourcePage:0,

Loading…
Cancel
Save