资源监测页面

dev
zc 3 years ago
parent 022334236f
commit e337450537
  1. 6
      cjy-project/src/main/java/com/cjy/iot/controller/IotInfoController.java
  2. 4
      cjy-project/src/main/java/com/cjy/iot/mapper/IotInfoMapper.java
  3. 2
      cjy-project/src/main/java/com/cjy/iot/service/IIotInfoService.java
  4. 4
      cjy-project/src/main/java/com/cjy/iot/service/impl/IotInfoServiceImpl.java
  5. 15
      cjy-project/src/main/resources/mapper/iotInfo/IotInfoMapper.xml
  6. 6
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  7. 24
      ruoyi-ui/src/views/picture/resource-monitoring/dialog-module/iot-detail.vue
  8. 4
      ruoyi-ui/src/views/picture/resource-monitoring/dialog-module/spot-detail.vue
  9. 4
      ruoyi-ui/src/views/picture/resource-monitoring/index.vue
  10. 2
      ruoyi-ui/src/views/picture/resource-monitoring/resoure-dialog.vue

@ -67,10 +67,10 @@ public class IotInfoController extends BaseController
* 获取物联设备基础信息 详细信息
*/
@PreAuthorize("@ss.hasPermi('iotInfo:iot:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
@GetMapping(value = "/{id}/{type}")
public AjaxResult getInfo(@PathVariable("id") Long id,@PathVariable("type") String type)
{
return success(iotInfoService.selectIotInfoById(id));
return success(iotInfoService.selectIotInfoById(id,type));
}
/**

@ -1,6 +1,8 @@
package com.cjy.iot.mapper;
import com.cjy.iot.domain.IotInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import java.util.List;
import java.util.Map;
@ -19,7 +21,7 @@ public interface IotInfoMapper
* @param id 物联设备基础信息 主键
* @return 物联设备基础信息
*/
public Map<String,Object> selectIotInfoById(Long id);
public Map<String,Object> selectIotInfoById(@Param("id") Long id, @Param("type")String type);
/**
* 查询物联设备基础信息 列表

@ -19,7 +19,7 @@ public interface IIotInfoService
* @param id 物联设备基础信息 主键
* @return 物联设备基础信息
*/
public Map<String,Object> selectIotInfoById(Long id);
public Map<String,Object> selectIotInfoById(Long id,String type);
/**
* 查询物联设备基础信息 列表

@ -41,9 +41,9 @@ public class IotInfoServiceImpl implements IIotInfoService
* @return 物联设备基础信息
*/
@Override
public Map<String,Object> selectIotInfoById(Long id)
public Map<String,Object> selectIotInfoById(Long id,String type)
{
return iotInfoMapper.selectIotInfoById(id);
return iotInfoMapper.selectIotInfoById(id,type);
}
/**

@ -72,13 +72,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="videoUrl" column="videoUrl" />
<result property="introduction" column="introduction" />
<result property="resourceDescribe" column="resourceDescribe" />
<result property="onLineNum" column="onLineNum" />
<result property="downloadSpeed" column="downloadSpeed" />
<result property="uploadSpeed" column="uploadSpeed" />
</resultMap>
<sql id="selectIotInfoVo">
select id, type, resource_code, resource_name,run_status, sort, in_resources, inside_area, dev_brand, dev_model, buy_time, lon, lat, remarks,monitor_path, status, del_flag, update_time, create_time, update_by, create_by, organ_code from b_iot_info
</sql>
<select id="selectIotInfoList" parameterType="IotInfo" resultType="java.util.Map">
<select id="selectIotInfoList" parameterType="IotInfo" resultMap="MapResult">
select t1.id,t1.type,t4.name as typeName,t1.resource_code as resourceCode,t1.resource_name as resourceName,t1.dev_brand as devBrand,t1.dev_model as devModel,t1.run_status as runStatus
from b_iot_info as t1
left join b_graphic_info as t3 on t1.resource_code = t3.resource_code
@ -113,13 +116,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY t1.sort ASC,t1.create_time DESC
</select>
<select id="selectIotInfoById" parameterType="Long" resultType="java.util.Map">
<select id="selectIotInfoById" parameterType="Long" resultMap="MapResult">
select t1.id,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
,t2.introduction,t2.resource_describe as resourceDescribe
<if test="type == 'wifi'">
,t3.on_line_num as onLineNum,
t3.download_speed as downloadSpeed,
t3.upload_speed as uploadSpeed
</if>
from b_iot_info as t1
left join b_graphic_info as t2 on t1.resource_code = t2.resource_code
<if test="type == 'wifi'">
LEFT JOIN (SELECT resource_code,on_line_num,download_speed,upload_speed,MAX(statistics_time) statistics_time FROM d_wifi_data WHERE del_flag != '2' GROUP BY resource_code) t3 ON t1.resource_code = t3.resource_code
</if>
where t1.id = #{id} and t1.del_flag != '2'
</select>

@ -52,11 +52,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectUserVo">
select u.user_type, u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.organ_code,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,e.organ_name as organName
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
left join ti_enterprise_info e on u.organ_code = e.organ_code
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
@ -93,12 +94,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,e.organ_name as organName
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
left join ti_enterprise_info e on u.organ_code = e.organ_code
where u.del_flag = '0' and r.role_id = #{roleId}
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')

@ -11,11 +11,11 @@
<div class="p-dialog-card-title">设备信息</div>
<div class="p-dialog-card-body">
<div class="p-dialog-form display-flex">
<div class="p-iot-img"> <img src="@/assets/test-images/pic01.png"></div>
<div class="p-iot-img"> <img :src="baseUrl+detailData.coverImg"></div>
<div class="flex-auto m-l-large">
<el-row :gutter="20">
<el-col :span="24">
<div class="d-form-top">设备编码3829192145555988</div>
<div class="d-form-top">设备编码{{detailData.resourceCode}}</div>
</el-col>
<el-col :span="12">
<!-- form-item -->
@ -54,11 +54,28 @@
</div>
</div>
</div>
<div class="p-dialog-card p-b-small m-t-small">
<div v-if="dataType == 'video'" class="p-dialog-card p-b-small m-t-small">
<div class="p-iot-bottom">
<img src="@/assets/test-images/pic01.png">
</div>
</div>
<div v-if="dataType == 'led'" class="p-dialog-card p-b-small m-t-small">
<div class="p-iot-bottom">
<img src="@/assets/test-images/pic01.png">
</div>
</div>
<div v-if="dataType == 'wifi'" class="p-dialog-card p-b-small m-t-small">
<div class="p-iot-bottom">
<div>连接数量{{detailData.onLineNum}}</div>
<div>上传速度{{detailData.uploadSpeed}}KB/s</div>
<div>下载速度{{detailData.downloadSpeed}}KB/s</div>
</div>
</div>
<div v-if="dataType == 'vibe'" class="p-dialog-card p-b-small m-t-small">
<div class="p-iot-bottom">
<img src="@/assets/test-images/pic01.png">
</div>
</div>
</div>
</template>
@ -69,6 +86,7 @@ export default {
dicts: ['dev_brand_dict','dev_model_dict'],
data() {
return {
baseUrl: process.env.VUE_APP_BASE_API,
navList: [{name: "首页"}, {name: "客流"}, {name: "网评"}, {name: "投诉"}, {name: "全景"}, {name: "微信"}],
navActive: '0',
viewNavList: [{name: "全屏"}, {name: "图片"}, {name: "视频"}, {name: "广播"}],

@ -36,7 +36,7 @@
</div>
<div class="p-dialog-bigView">
<template v-if="dataType == 'carpark'">
<template v-if="dataType == 'carpark' || dataType == 'emergmange' || dataType == 'medicala' || dataType == 'fireco' || dataType == 'takerefuge' || dataType == 'armed'">
<img :src="baseUrl+detailData.coverImg" class="p-dialog-bigView-img">
</template>
<template v-if="dataType == 'spot'">
@ -49,7 +49,7 @@
:class="'icon-'+ getViewIcon(item.name)"></i></span>
</div>
<!-- <div class="p-dialog-bigView-title-text">初祖庵<span class="p-dialog-bigView-title-tip">游玩景点</span></div>-->
<div v-if="dataType == 'carpark'" class="p-dialog-bigView-title-address">
<div v-if="dataType == 'carpark' || dataType == 'emergmange' || dataType == 'medicala' || dataType == 'fireco' || dataType == 'takerefuge' || dataType == 'armed'" class="p-dialog-bigView-title-address">
联系信息{{detailData.contacts}} {{detailData.telephone}}
</div>
<div v-else-if="dataType == 'spot'" class="p-dialog-bigView-title-address">q

@ -528,12 +528,14 @@ export default {
this.dialogName = '导游信息';
}else if(this.currentData.dataType == '01'){
this.dialogName = '工作人员信息'
}else{
this.dialogName = title
}
this.dialogType = type
},
getBasicDetail(id){
let url = this.currentData.interfacePath + id;
if(!this.currentData.interfacePath.includes("guide") && !this.currentData.interfacePath.includes("user") && !this.currentData.interfacePath.includes("venue") && !this.currentData.interfacePath.includes("iot") && !this.currentData.interfacePath.includes("iot")){
if(!this.currentData.interfacePath.includes("guide") && !this.currentData.interfacePath.includes("user") && !this.currentData.interfacePath.includes("venue") && !this.currentData.interfacePath.includes("emergency")){
url += "/" + this.currentData.dataType;
}
console.log(url);

@ -33,7 +33,7 @@
<guideDetail v-if="type == 'guidedetail'" :detailData="propsData" :dataType="dataType" :interfacePath="interfacePath"></guideDetail>
<!-- 游玩景点 spot -->
<!-- <spotList v-if="type == 'spotlist'" :listData="propsData" :total="total" :dataType="dataType" :interfacePath="interfacePath"></spotList>-->
<spotDetail v-if="type == 'spotdetail' || type == 'carparkdetail' || type == 'bustopdetail' || type == 'railstationdetail' || type == 'airportdetail' || type == 'chargingdetail' || type == 'gastationdetail' || type == 'trafficdetail' || type == 'wharfdetail' || type == 'tourservicedetail' || type == 'entrepotdetail' || type == 'ticketdetail' || type == 'inletexitdetail' || type == 'cablewaydetail' || type == 'placedetail' || type == 'buildingdetail' || type == 'otherdetail' || type == 'flowerdetail' || type == 'halldetail' || type == 'exhibitdetail' || type == 'collectiondetail'" :detailData="propsData" :dataType="dataType" :interfacePath="interfacePath"></spotDetail>
<spotDetail v-if="type == 'spotdetail' || type == 'carparkdetail' || type == 'bustopdetail' || type == 'railstationdetail' || type == 'airportdetail' || type == 'chargingdetail' || type == 'gastationdetail' || type == 'trafficdetail' || type == 'wharfdetail' || type == 'tourservicedetail' || type == 'entrepotdetail' || type == 'ticketdetail' || type == 'inletexitdetail' || type == 'cablewaydetail' || type == 'placedetail' || type == 'buildingdetail' || type == 'otherdetail' || type == 'flowerdetail' || type == 'halldetail' || type == 'exhibitdetail' || type == 'collectiondetail' || type == 'emergmangedetail' || type == 'medicaladetail' || type == 'firecodetail' || type == 'takerefugedetail' || type == 'armeddetail'" :detailData="propsData" :dataType="dataType" :interfacePath="interfacePath"></spotDetail>
<!-- name type -->
</div>

Loading…
Cancel
Save