通道树支持展示在线离线状态

pull/1653/head
648540858 2024-10-21 12:29:15 +08:00
parent e91f34a983
commit 022b16dbbe
8 changed files with 20 additions and 6 deletions

View File

@ -19,4 +19,7 @@ public class GroupTree extends Group{
@Schema(description = "类型, 行政区划:0 摄像头: 1") @Schema(description = "类型, 行政区划:0 摄像头: 1")
private int type; private int type;
@Schema(description = "在线状态")
private String status;
} }

View File

@ -18,4 +18,7 @@ public class RegionTree extends Region {
@Schema(description = "类型, 行政区划:0 摄像头: 1") @Schema(description = "类型, 行政区划:0 摄像头: 1")
private int type; private int type;
@Schema(description = "在线状态")
private String status;
} }

View File

@ -267,6 +267,7 @@ public interface CommonGBChannelMapper {
" coalesce(gb_device_id, device_id) as device_id," + " coalesce(gb_device_id, device_id) as device_id," +
" coalesce(gb_name, name) as name, " + " coalesce(gb_name, name) as name, " +
" coalesce(gb_parent_id, parent_id) as parent_device_id, " + " coalesce(gb_parent_id, parent_id) as parent_device_id, " +
" coalesce(gb_status, status) as status, " +
" 1 as type, " + " 1 as type, " +
" true as is_leaf " + " true as is_leaf " +
" from wvp_device_channel " + " from wvp_device_channel " +
@ -358,6 +359,7 @@ public interface CommonGBChannelMapper {
" coalesce(gb_name, name) as name, " + " coalesce(gb_name, name) as name, " +
" coalesce(gb_parent_id, parent_id) as parent_device_id, " + " coalesce(gb_parent_id, parent_id) as parent_device_id, " +
" coalesce(gb_business_group_id, business_group_id) as business_group, " + " coalesce(gb_business_group_id, business_group_id) as business_group, " +
" coalesce(gb_status, status) as status, " +
" 1 as type, " + " 1 as type, " +
" true as is_leaf " + " true as is_leaf " +
" from wvp_device_channel " + " from wvp_device_channel " +

View File

@ -69,7 +69,8 @@ public interface GroupMapper {
" * , " + " * , " +
" concat('group', id) as tree_id," + " concat('group', id) as tree_id," +
" 0 as type," + " 0 as type," +
" false as is_leaf" + " false as is_leaf," +
" 'ON' as status" +
" from wvp_common_group " + " from wvp_common_group " +
" where 1=1 " + " where 1=1 " +
" <if test='parentId != null'> and parent_id = #{parentId} </if> " + " <if test='parentId != null'> and parent_id = #{parentId} </if> " +

View File

@ -74,6 +74,7 @@ public interface RegionMapper {
" *, " + " *, " +
" concat('region', id) as tree_id," + " concat('region', id) as tree_id," +
" 0 as type," + " 0 as type," +
" 'ON' as status," +
" false as is_leaf" + " false as is_leaf" +
" from wvp_common_region " + " from wvp_common_region " +
" where " + " where " +

View File

@ -30,13 +30,14 @@
</el-aside> </el-aside>
<el-main style="padding-bottom: 10px;"> <el-main style="padding-bottom: 10px;">
<div class="playBox" :style="playerStyle"> <div class="playBox" :style="playerBoxStyle">
<player ref="recordVideoPlayer" <player ref="recordVideoPlayer"
:videoUrl="videoUrl" :videoUrl="videoUrl"
:error="videoError" :error="videoError"
:message="videoError" :message="videoError"
:hasAudio="hasAudio" :hasAudio="hasAudio"
style="max-height: 100%" style="max-height: 100%"
:height="playerHeight"
fluent autoplay live ></player> fluent autoplay live ></player>
</div> </div>
<div class="player-option-box"> <div class="player-option-box">
@ -136,10 +137,11 @@
overflow: "auto", overflow: "auto",
margin: "10px auto 10px auto" margin: "10px auto 10px auto"
}, },
playerStyle: { playerBoxStyle: {
"margin": "0 auto 20px auto", "margin": "0 auto 20px auto",
"height": this.winHeight + "px", "height": this.winHeight + "px",
}, },
playerHeight: this.winHeight,
winHeight: window.innerHeight - 240, winHeight: window.innerHeight - 240,
playTime: null, playTime: null,
timeRange: null, timeRange: null,
@ -179,7 +181,7 @@
}, },
mounted() { mounted() {
this.recordListStyle.height = this.winHeight + "px"; this.recordListStyle.height = this.winHeight + "px";
this.playerStyle["height"] = this.winHeight + "px"; this.playerBoxStyle["height"] = this.winHeight + "px";
this.chooseDate = moment().format('YYYY-MM-DD') this.chooseDate = moment().format('YYYY-MM-DD')
this.dateChange(); this.dateChange();
window.addEventListener('beforeunload', this.stopPlayRecord) window.addEventListener('beforeunload', this.stopPlayRecord)

View File

@ -32,7 +32,8 @@
<el-radio v-if="node.data.type === 0 && node.level > 2" style="margin-right: 0" v-model="chooseId" @input="chooseIdChange(node.data.treeId, node.data.deviceId, node.data.businessGroup)" :label="node.data.deviceId">{{''}}</el-radio> <el-radio v-if="node.data.type === 0 && node.level > 2" style="margin-right: 0" v-model="chooseId" @input="chooseIdChange(node.data.treeId, node.data.deviceId, node.data.businessGroup)" :label="node.data.deviceId">{{''}}</el-radio>
</span> </span>
<span v-if="node.data.type === 0" style="color: #409EFF" class="iconfont icon-bianzubeifen3"></span> <span v-if="node.data.type === 0" style="color: #409EFF" class="iconfont icon-bianzubeifen3"></span>
<span v-if="node.data.type === 1" style="color: #409EFF" class="iconfont icon-shexiangtou2"></span> <span v-if="node.data.type === 1 && node.data.status === 'ON'" style="color: #409EFF" class="iconfont icon-shexiangtou2"></span>
<span v-if="node.data.type === 1 && node.data.status !== 'ON'" style="color: #808181" class="iconfont icon-shexiangtou2"></span>
<span style=" padding-left: 1px" v-if="node.data.deviceId !=='' && showCode" :title="node.data.deviceId">{{ node.label }}{{ node.data.deviceId }}</span> <span style=" padding-left: 1px" v-if="node.data.deviceId !=='' && showCode" :title="node.data.deviceId">{{ node.label }}{{ node.data.deviceId }}</span>
<span style=" padding-left: 1px" v-if="node.data.deviceId ==='' || !showCode" :title="node.data.deviceId">{{ node.label }}</span> <span style=" padding-left: 1px" v-if="node.data.deviceId ==='' || !showCode" :title="node.data.deviceId">{{ node.label }}</span>
</span> </span>

View File

@ -32,7 +32,8 @@
<el-radio v-if="node.data.type === 0 && node.level !== 1 " style="margin-right: 0" v-model="chooseId" @input="chooseIdChange(node.data.treeId, node.data.deviceId)" :label="node.data.deviceId">{{''}}</el-radio> <el-radio v-if="node.data.type === 0 && node.level !== 1 " style="margin-right: 0" v-model="chooseId" @input="chooseIdChange(node.data.treeId, node.data.deviceId)" :label="node.data.deviceId">{{''}}</el-radio>
</span> </span>
<span v-if="node.data.type === 0" style="color: #409EFF" class="iconfont icon-bianzubeifen3"></span> <span v-if="node.data.type === 0" style="color: #409EFF" class="iconfont icon-bianzubeifen3"></span>
<span v-if="node.data.type === 1" style="color: #409EFF" class="iconfont icon-shexiangtou2"></span> <span v-if="node.data.type === 1 && node.data.status === 'ON'" style="color: #409EFF" class="iconfont icon-shexiangtou2"></span>
<span v-if="node.data.type === 1 && node.data.status !== 'ON'" style="color: #808181" class="iconfont icon-shexiangtou2"></span>
<span style=" padding-left: 1px" v-if="node.data.deviceId !=='' && showCode" :title="node.data.deviceId">{{ node.label }}{{ node.data.deviceId }}</span> <span style=" padding-left: 1px" v-if="node.data.deviceId !=='' && showCode" :title="node.data.deviceId">{{ node.label }}{{ node.data.deviceId }}</span>
<span style=" padding-left: 1px" v-if="node.data.deviceId ==='' || !showCode" :title="node.data.deviceId">{{ node.label }}</span> <span style=" padding-left: 1px" v-if="node.data.deviceId ==='' || !showCode" :title="node.data.deviceId">{{ node.label }}</span>
</span> </span>