| | |
| | | <template> |
| | | <div class="msgBox"> |
| | | |
| | | <div class="aside-title"> |
| | | <div>故障信息</div> |
| | | <div @click="sendDataToParent()" class="closeMsg"> |
| | | X |
| | | </div> |
| | | <div @click="sendDataToParent()" class="closeMsg">X</div> |
| | | </div> |
| | | <div class="menuTable"> |
| | | <table> |
| | | <tr> |
| | | <th style="width: 100px;">设备名称</th> |
| | | <th style="width: 80px">设备名称</th> |
| | | <th>设备位置</th> |
| | | <th style="width: 100px;">操作</th> |
| | | <th style="width: 40px">操作</th> |
| | | </tr> |
| | | <tr v-for="(item, indx) in $store.state.mapLayers.msgList" :key="indx"> |
| | | <td>{{ item.msg }}</td> |
| | |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import mapConfig from '../../assets/js/mapSdk/mapConfig'; |
| | | import menuManager from '../../assets/js/mapSdk/menuManager'; |
| | | |
| | | |
| | | import msgList from './msgList.js'; |
| | | export default { |
| | | components: { |
| | | |
| | | }, |
| | | props: { |
| | | |
| | | }, |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | label: null, |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: {}, |
| | | mounted() { }, |
| | | methods: { |
| | | sendDataToParent() { |
| | | this.removeLabel(); |
| | | console.log(23); |
| | | |
| | | this.$emit('childData', '子组件数据'); |
| | | |
| | | msgList.removeLabel(); |
| | | this.$emit('childData', 'close'); |
| | | }, |
| | | removeLabel() { |
| | | if (this.label) { |
| | | this.label.removeFromMap() |
| | | this.label = null; |
| | | } |
| | | }, |
| | | |
| | | handleClick(item) { |
| | | this.removeLabel(); |
| | | // const point = mapConfig.getWKTParse(item.point) |
| | | const point = item.point.split(",") |
| | | this.label = earthCtrl.factory.createLabel({ |
| | | lon: point[0], |
| | | lat: point[1], |
| | | alt: 40, |
| | | text: item.msg, |
| | | image: config.sdkImg + 'Workers/image/mark.png', |
| | | // 文本偏移量 |
| | | pixelOffset: new SmartEarth.Cesium.Cartesian2(0, -50), |
| | | // 图片偏移量 |
| | | iPixelOffset: new SmartEarth.Cesium.Cartesian2(0, -20) |
| | | }); |
| | | earthCtrl.userScene.flyTo(this.label) |
| | | this.$store.state.mapLayers.msgInfoData = {...item}; |
| | | this.$emit('childData', 'showMsgInfoFlag'); |
| | | msgList.removeLabel(); |
| | | msgList.setInit(item) |
| | | }, |
| | | handleClick2(item) { |
| | | |
| | | }, |
| | | setMsgClose() { |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | color: #fff; |
| | | width: 100%; |
| | | height: 45px; |
| | | line-height: 45px; |
| | | line-height: 35px; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | display: flex; |
| | |
| | | } |
| | | |
| | | .closeMsg :hover { |
| | | color: #409EFF; |
| | | color: #409eff; |
| | | } |
| | | |
| | | } |
| | | |
| | | .menuTable { |
| | |
| | | |
| | | th { |
| | | text-align: center; |
| | | |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | td { |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | line-height: 30px; |
| | | border-bottom: 1px solid #409EFF; |
| | | ; |
| | | border-bottom: 1px solid #409eff; |
| | | } |
| | | } |
| | | } |
| | |
| | | ::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | background: #409EFF; |
| | | background: #409eff; |
| | | } |
| | | |
| | | /*滚动条里面轨道*/ |
| | | ::-webkit-scrollbar-track { |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px; |
| | | background: rgba(237, 237, 237, .1); |
| | | background: rgba(237, 237, 237, 0.1); |
| | | } |
| | | </style> |