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