From 9f680a2e9e8560cf5f38acdc30335e51d88b2001 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 26 八月 2022 18:03:09 +0800 Subject: [PATCH] 修复bug以及日志按照,错误/sip/数据库 分割 --- web_src/src/components/channelList.vue | 46 +++++++++++++++++++++++++++------------------- 1 files changed, 27 insertions(+), 19 deletions(-) diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index bea4b39..933cc44 100644 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -32,7 +32,7 @@ <el-button v-if="!showTree" icon="iconfont icon-tree" circle size="mini" @click="switchTree()"></el-button> </div> </div> - <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer> + <devicePlayer ref="devicePlayer" ></devicePlayer> <el-container v-loading="isLoging" style="height: 82vh;"> <el-aside width="auto" style="height: 82vh; background-color: #ffffff; overflow: auto" v-if="showTree" > <DeviceTree ref="deviceTree" :device="device" :onlyCatalog="true" :clickEvent="treeNodeClickEvent" ></DeviceTree> @@ -215,12 +215,15 @@ channelType: that.channelType } }).then(function (res) { - that.total = res.data.total; - that.deviceChannelList = res.data.list; - // 闃叉鍑虹幇琛ㄦ牸閿欎綅 - that.$nextTick(() => { - that.$refs.channelListTable.doLayout(); - }) + if (res.data.code === 0) { + that.total = res.data.data.total; + that.deviceChannelList = res.data.data.list; + // 闃叉鍑虹幇琛ㄦ牸閿欎綅 + that.$nextTick(() => { + that.$refs.channelListTable.doLayout(); + }) + } + }).catch(function (error) { console.log(error); }); @@ -339,12 +342,15 @@ channelType: this.channelType } }).then( (res) =>{ - this.total = res.data.total; - this.deviceChannelList = res.data.list; - // 闃叉鍑虹幇琛ㄦ牸閿欎綅 - this.$nextTick(() => { - this.$refs.channelListTable.doLayout(); - }) + if (res.data.code === 0) { + this.total = res.data.data.total; + this.deviceChannelList = res.data.data.list; + // 闃叉鍑虹幇琛ㄦ牸閿欎綅 + this.$nextTick(() => { + this.$refs.channelListTable.doLayout(); + }) + } + }).catch(function (error) { console.log(error); }); @@ -358,12 +364,14 @@ count: this.count, } }).then((res)=> { - this.total = res.data.total; - this.deviceChannelList = res.data.list; - // 闃叉鍑虹幇琛ㄦ牸閿欎綅 - this.$nextTick(() => { - this.$refs.channelListTable.doLayout(); - }) + if (res.data.code === 0) { + this.total = res.data.total; + this.deviceChannelList = res.data.list; + // 闃叉鍑虹幇琛ㄦ牸閿欎綅 + this.$nextTick(() => { + this.$refs.channelListTable.doLayout(); + }) + } }).catch(function (error) { console.log(error); }); -- Gitblit v1.8.0