修改完成
This commit is contained in:
parent
bbe8fd48f6
commit
0010c55676
|
|
@ -19,7 +19,7 @@ var proxyUrl = (module.exports = {
|
|||
proxyTable: {
|
||||
'/screen': {
|
||||
// target: 'http://112.29.103.165:21626',//重庆
|
||||
target: 'http://localhost:39080', //测试
|
||||
target: 'http://192.168.2.216:39080', //测试
|
||||
// target: 'http://10.40.92.74:8080',
|
||||
changeOrigin: true,
|
||||
// secure: true, //如果是https接口,需要配置这个参数
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ axios.defaults.timeout = 30000
|
|||
// 默认配置
|
||||
// axios.defaults.baseURL = process.env.API_ROOT;
|
||||
// axios.defaults.baseURL = 'http://192.168.0.56:21627/bigScreen'
|
||||
// axios.defaults.baseURL = 'screen'
|
||||
axios.defaults.baseURL = 'http://localhost:8080/screen'
|
||||
axios.defaults.baseURL = 'screen'
|
||||
// axios.defaults.baseURL = 'http://localhost:8080/screen'
|
||||
|
||||
axios.interceptors.request.use(
|
||||
(config) => {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ export const getMaintenanceByMonthApi = (params) =>
|
|||
//设备分布图
|
||||
export const getEquipmentDisByMapApi = (params) =>
|
||||
POST(`/material/base/largeScreen/home/getEquipmentDisByMap`)
|
||||
//获取工程的位置信息
|
||||
export const getProjectByMapApi = (params) =>
|
||||
GET(`/material/base/largeScreen/home/getEquipmentDis`, params)
|
||||
//获取设备的位置信息
|
||||
export const getDeviceByMapApi = (params) =>
|
||||
GET(`/material/base/largeScreen/home/getIotMaCodeMachine`, params)
|
||||
//施工机具/
|
||||
export const getTotalOwnershipApi = (params) =>
|
||||
POST(`/material/base/largeScreen/home/getTotalOwnership`)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export default {
|
|||
isCity: 0,
|
||||
cityCount: [],
|
||||
gozoom: 1,
|
||||
mapList: [], // 查询后的地图数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -37,13 +38,20 @@ export default {
|
|||
// this.getCityCount()
|
||||
},
|
||||
mounted() {
|
||||
this.getEquipmentDisByMapApiPage()
|
||||
this.getInitData()
|
||||
getEquipmentDisByMapApi().then((res) => {
|
||||
console.log('res=====地图数据---', res)
|
||||
|
||||
this.mapList = res.data
|
||||
this.getInitData()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getEquipmentDisByMapApiPage() {
|
||||
async getEquipmentDisByMapApiPage() {
|
||||
getEquipmentDisByMapApi().then((res) => {
|
||||
console.log('res=====', res)
|
||||
console.log('res=====地图数据---', res)
|
||||
|
||||
this.mapList = res.data
|
||||
console.log('mapList=====地图数据---', this.mapList)
|
||||
})
|
||||
},
|
||||
getCompanyList() {
|
||||
|
|
@ -115,7 +123,7 @@ export default {
|
|||
}
|
||||
})
|
||||
|
||||
let mapData = [
|
||||
// let mapData = [
|
||||
// {
|
||||
// name: '青海省',
|
||||
// value: ['101.778', '36.623'],
|
||||
|
|
@ -136,19 +144,20 @@ export default {
|
|||
// value: ['112.982', '28.194'],
|
||||
// a: '100',
|
||||
// },
|
||||
{
|
||||
name: '重庆市',
|
||||
// {
|
||||
// name: '重庆市',
|
||||
// value: [],
|
||||
// a: 100,
|
||||
// },
|
||||
// ]
|
||||
console.log('this.mapList',this.mapList)
|
||||
let mapData = this.mapList.map((e) => {
|
||||
return {
|
||||
name: e.province,
|
||||
a: e.num,
|
||||
value: [],
|
||||
a: 100,
|
||||
},
|
||||
]
|
||||
// let mapData = this.mapList.map((e) => {
|
||||
// return {
|
||||
// name: e.province,
|
||||
// a: e.num,
|
||||
// value: [],
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
|
||||
for (let i = 0; i < mapData.length; i++) {
|
||||
let geoCoord = geoCoordMap[mapData[i].name]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
// import { getProjectByMapApi, getDeviceByMapApi } from '@/api/screen.js'
|
||||
import { getProjectByMapApi, getDeviceByMapApi } from '@/api/screen.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -13,12 +13,12 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
// Promise.all([this.getProjectByMapData(), this.getDeviceByMapData()]).then(
|
||||
// () => {
|
||||
// this.initMap()
|
||||
// }
|
||||
// )
|
||||
this.initMap()
|
||||
Promise.all([this.getProjectByMapData(), this.getDeviceByMapData()]).then(
|
||||
() => {
|
||||
this.initMap()
|
||||
}
|
||||
)
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
/** 组件销毁之前 先清除地图实例 */
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<!-- <CenterFold /> -->
|
||||
<CenterBottom />
|
||||
<div class="tip-container">
|
||||
<dv-border-box-8>
|
||||
<div class="loginCss">
|
||||
<img src="../../assets/img/project-icon.png" alt="" />
|
||||
<span>工程位置</span>
|
||||
<img
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
style="margin-left: 12px"
|
||||
/>
|
||||
<span>定位设备位置</span>
|
||||
</dv-border-box-8>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="screen-right">
|
||||
|
|
@ -288,7 +288,7 @@ export default {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
// display: flex;
|
||||
.screen-left,
|
||||
.screen-right {
|
||||
width: 25%;
|
||||
|
|
@ -390,19 +390,24 @@ export default {
|
|||
height: 60px;
|
||||
right: 30px;
|
||||
width: 260px;
|
||||
top: -90px;
|
||||
top: -50px;
|
||||
|
||||
/deep/ .dv-border-box-8 .border-box-content {
|
||||
width: 100%;
|
||||
.loginCss {
|
||||
width: 85%;
|
||||
padding: 0 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color:black;
|
||||
border: 2px solid #34586b;
|
||||
border-radius:4px;
|
||||
|
||||
img {
|
||||
width: 27px;
|
||||
height: 32px;
|
||||
margin-top:5px;
|
||||
margin-right: 5px;
|
||||
margin-bottom:5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue