| | |
| | | <analysis v-if="isShow == '数据分析'"></analysis> |
| | | <statistics v-if="isShow == '数据统计'"></statistics> |
| | | <line-loss v-if="isShow == '数字线损'"></line-loss> |
| | | <semanticFunction v-if="isShow == '语义功能'"></semanticFunction> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div v-show="showMsgFlag" @click="ShowMenuList" class="elBadge" |
| | | :disabled="$store.state.mapLayers.msgList.length == 0"> |
| | | <el-badge :value="$store.state.mapLayers.msgList.length" class="item"> |
| | | <i class="el-icon-chat-dot-square"></i> |
| | | </el-badge> |
| | | </div> |
| | | <div class="msgList" v-show="!showMsgFlag" > |
| | | <msg-list @childData="receiveDataFromChild"></msg-list> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import analysis from '@/views/visual/analysis/index.vue' |
| | | import lineLoss from './lineLoss.vue'; |
| | | import statistics from '@/views/visual/statistics/index.vue' |
| | | import { type } from 'jquery'; |
| | | import semanticFunction from '@/views/dataManager/semanticFunction/index.vue' |
| | | import msgList from './msgList.vue'; |
| | | export default { |
| | | components: { |
| | | mapView, leftMenu, |
| | | rightMenu, bottomMenu, atlas, analysis, statistics, lineLoss |
| | | rightMenu, |
| | | bottomMenu, |
| | | atlas, |
| | | analysis, |
| | | statistics, |
| | | lineLoss, |
| | | semanticFunction, |
| | | msgList |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | showInfo: false, |
| | | wsSocket: null, |
| | | rightChartData: {}, |
| | | leftChartData:{}, |
| | | leftChartData: {}, |
| | | showMsgFlag: true |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | }, |
| | | mounted() { |
| | | if (!this.wsSocket) { |
| | | this.createSocket(); |
| | | // this.createSocket(); |
| | | } |
| | | }, |
| | | methods: { |
| | | receiveDataFromChild(data) { |
| | | console.log(data); |
| | | |
| | | this.showMsgFlag = true |
| | | }, |
| | | ShowMenuList() { |
| | | if (this.$store.state.mapLayers.msgList.length == 0) return; |
| | | this.showMsgFlag = !this.showMsgFlag |
| | | |
| | | }, |
| | | createSocket() { |
| | | this.wsSocket = new WebSocket(config.pySocket); |
| | | this.wsSocket.onopen = (event) => { |
| | |
| | | |
| | | if (event.data != "连接成功") { |
| | | const obj = JSON.parse(event.data) |
| | | |
| | | |
| | | |
| | | |
| | | this.leftChartData = { |
| | | type: 'left1', |
| | | val: obj |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // 处理接收到的消息 |
| | | }; |
| | | }, |
| | | childData(res) { |
| | |
| | | bottom: 0px; |
| | | } |
| | | |
| | | .elBadge { |
| | | // width: 15%; |
| | | top: 90px; |
| | | right: 16%; |
| | | z-index: 40; |
| | | padding: 10px; |
| | | position: absolute; |
| | | background: url(~@/assets/images/treeClose.png)no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | .el-icon-chat-dot-square { |
| | | color: white; |
| | | font-size: 22px; |
| | | margin-right: 5px; |
| | | } |
| | | } |
| | | |
| | | .msgList { |
| | | width: 15%; |
| | | top: 90px; |
| | | right: 16%; |
| | | z-index: 40; |
| | | position: absolute; |
| | | |
| | | height: 30%; |
| | | } |
| | | |
| | | .visualInfo { |
| | | width: 60%; |
| | | height: 60%; |