From 5bcd8495e03b08ff417f74f816d20e028f9b1fe0 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期日, 20 二月 2022 16:22:43 +0800 Subject: [PATCH] 兼容海康不规范的xml,大幅度提高通道分页查询速度,优化节点的保活。 --- web_src/src/components/channelList.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index 2b06870..3cd4bc9 100644 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -84,7 +84,7 @@ <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">鎾斁</el-button> --> <el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">鎾斁</el-button> <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId" @click="stopDevicePush(scope.row)">鍋滄</el-button> - <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">鏌ョ湅</el-button> + <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0" @click="changeSubchannel(scope.row)">鏌ョ湅</el-button> <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">璁惧褰曡薄</el-button> <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">褰曞儚鏌ヨ</el-button> --> </el-button-group> @@ -212,10 +212,10 @@ url: '/api/play/start/' + deviceId + '/' + channelId }).then(function (res) { that.isLoging = false; - if (res.data.code == 0) { + if (res.data.code === 0) { setTimeout(()=>{ - console.log("涓嬭浇鎴浘") + let snapId = deviceId + "_" + channelId; that.loadSnap[snapId] = 0; that.getSnapErrorEvent(snapId) @@ -224,7 +224,10 @@ streamInfo: res.data.data, hasAudio: itemData.hasAudio }); - that.initData(); + setTimeout(()=>{ + that.initData(); + },1000) + }else { that.$message.error(res.data.msg); } -- Gitblit v1.8.0