| | |
| | | <template> |
| | | <div class="dashboard-container" style="height: 100%"> |
| | | <div |
| | | class="dashboard-container" |
| | | style="height: 100%" |
| | | > |
| | | <el-container style="height: 100%; border: 1px solid #eee"> |
| | | <el-aside |
| | | v-if="this.$store.state.aside" |
| | | v-if="$store.state.aside" |
| | | width="260px" |
| | | style="background-color: rgb(238, 241, 246)" |
| | | > |
| | |
| | | prefix-icon="el-icon-search" |
| | | /> |
| | | </div> |
| | | <el-menu :default-openeds="openeds" class="elwidth"> |
| | | <el-menu |
| | | :default-openeds="openeds" |
| | | class="elwidth" |
| | | > |
| | | <el-submenu |
| | | v-for="(item, index) in defaultData" |
| | | :key="index" |
| | |
| | | 'circle-3': item.state == 3, |
| | | 'circle-4': item.state == 4, |
| | | 'circle-5': item.state == 5, |
| | | 'circle-6': item.state == 6, |
| | | 'circle-6': item.state >= 6, |
| | | }" |
| | | /> |
| | | |
| | |
| | | <el-container> |
| | | <!-- <Map :mpid="monitorPointId" :rc="regionCode" /> --> |
| | | <compoment |
| | | :is="this.$store.state.type" |
| | | :is="$store.state.type" |
| | | v-if="weidu && jingdu" |
| | | ref="child" |
| | | :weidu="weidu" |
| | |
| | | ReportForm |
| | | // vLineChart |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | openeds: [], |
| | | searchText: '', |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | changeCity() { |
| | | changeCity () { |
| | | return this.$store.state.regionCode |
| | | } |
| | | }, |
| | | watch: { |
| | | searchText(newVal, oldVal) { |
| | | searchText (newVal, oldVal) { |
| | | console.log(typeof (newVal)) |
| | | // console.log(newVal) |
| | | // defaultData是站点名,包含设备 |
| | |
| | | console.log(this.defaultData) |
| | | } |
| | | }, |
| | | changeCity(newVal, oldVal) { |
| | | changeCity (newVal, oldVal) { |
| | | // console.log(newVal) |
| | | if (newVal !== oldVal) { |
| | | // this.$store.state.regionCode = newVal |
| | |
| | | } |
| | | } |
| | | }, |
| | | beforeCreate() { |
| | | beforeCreate () { |
| | | // this.$store.state.regionCode = this.$route.params.cName |
| | | }, |
| | | created() { |
| | | created () { |
| | | this.getData() |
| | | this.getRegion() |
| | | }, |
| | | methods: { |
| | | |
| | | // 百度经纬度转高德经纬度 |
| | | bd09togcj02(bd_lon, bd_lat) { |
| | | bd09togcj02 (bd_lon, bd_lat) { |
| | | var x_pi = (3.14159265358979324 * 3000.0) / 180.0 |
| | | var x = bd_lon - 0.0065 |
| | | var y = bd_lat - 0.006 |
| | |
| | | return [gg_lat, gg_lng] |
| | | }, |
| | | // 父组件点击站点列表子组件跳转地图方法 |
| | | jump(items) { |
| | | jump (items) { |
| | | console.log(items) |
| | | this.jumpData = [] |
| | | // const newLL = this.bd09togcj02(items.longitude, items.latitude) |
| | |
| | | this.$refs.child.jumpMap(this.jumpData) |
| | | }, |
| | | // 跳转设备详情页 |
| | | deviceDetail(mac, item, items, indexs) { |
| | | deviceDetail (mac, item, items, indexs) { |
| | | // this.$message.warning('该功能优化中,暂不支持开放') |
| | | // console.log('这是传输过去的值') |
| | | // console.log(mac) |
| | |
| | | }) |
| | | }, |
| | | // 改变regionCode触发子组件重新请求五分钟接口功能 |
| | | getRegionApi() { |
| | | getRegionApi () { |
| | | // console.log('执行getRegionApi') |
| | | // console.log(this.newRegion[this.newRegion.length - 1]) |
| | | this.$store.state.regionCode = this.newRegion[this.newRegion.length - 1] |
| | |
| | | console.log(this.jingdu, '经度') |
| | | }, |
| | | // 请求左侧设备数据 |
| | | getData() { |
| | | getData () { |
| | | this.monitorPointIds = [] |
| | | this.$request({ |
| | | url: '/monitorPoint/queryMonitorPointsState', |
| | |
| | | this.defaultData = [] |
| | | }) |
| | | }, |
| | | getRegion() { |
| | | getRegion () { |
| | | this.$request({ |
| | | url: '/organization/getMapPath', |
| | | method: 'get', |