【模态框居中】
This commit is contained in:
parent
490d38ddfa
commit
9235c5c9d6
|
|
@ -53,9 +53,15 @@ export default {
|
||||||
Object.keys(mapLayerTypeToPointIcon).forEach(layerType => {
|
Object.keys(mapLayerTypeToPointIcon).forEach(layerType => {
|
||||||
this.layerCreator(layerType)
|
this.layerCreator(layerType)
|
||||||
})
|
})
|
||||||
this.map.on(mars3d.EventType.click, function (event) {
|
/*this.map.on(mars3d.EventType.click, function (event) {
|
||||||
console.log('单击了地图对象', event)
|
var point = mars3d.LngLatPoint.fromCartesian(event.cartesian); //转为经纬度
|
||||||
})
|
const [ longitude, latitude ] = point.toString().split(',')
|
||||||
|
|
||||||
|
console.log("鼠标单击坐标", JSON.stringify({
|
||||||
|
longitude: longitude,
|
||||||
|
latitude: latitude
|
||||||
|
}));
|
||||||
|
})*/
|
||||||
this.addPoints()
|
this.addPoints()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,10 +150,11 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 图层构造器
|
* 图层构造器
|
||||||
* @param { 'cems' | 'sdjcy' | 'zkz' | 'gbz' | 'ssc' | 'shisc' | 'wz' | 'jkd' } layerType 图层类型 jkd(监控点) wz(微站) sdjcy(深度检测仪) zkz(质控站) gbz(国标站) ssc(洒水车) shisc(湿扫车) cems(CEMS)
|
* @param { object } props
|
||||||
* @param { object } data 图层类型
|
* @param { 'cems' | 'sdjcy' | 'zkz' | 'gbz' | 'ssc' | 'shisc' | 'wz' | 'jkd' } props.layerType 图层类型 jkd(监控点) wz(微站) sdjcy(深度检测仪) zkz(质控站) gbz(国标站) ssc(洒水车) shisc(湿扫车) cems(CEMS)
|
||||||
|
* @param { object } props.data 图层类型
|
||||||
*/
|
*/
|
||||||
pointClick (layerType, data) {
|
pointClick ({ layerType, data }) {
|
||||||
// todo
|
// todo
|
||||||
},
|
},
|
||||||
getAutoStyle() {
|
getAutoStyle() {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ var confirm = function confirmFn(props) {
|
||||||
|
|
||||||
Vue.prototype.$open = function (vNode, props, dialogProps) {
|
Vue.prototype.$open = function (vNode, props, dialogProps) {
|
||||||
return confirm({
|
return confirm({
|
||||||
|
centered: true,
|
||||||
prefixCls: 'visual-dialog ant-modal',
|
prefixCls: 'visual-dialog ant-modal',
|
||||||
content: (h) => h(vNode, { props }),
|
content: (h) => h(vNode, { props }),
|
||||||
...dialogProps
|
...dialogProps
|
||||||
|
|
|
||||||
38
store/map.js
38
store/map.js
|
|
@ -1,14 +1,14 @@
|
||||||
export const state = {
|
export const state = {
|
||||||
cems: [
|
cems: [
|
||||||
{
|
{
|
||||||
longitude: 114.116195,
|
longitude: 114.101417,
|
||||||
latitude: 36.555232
|
latitude: 36.55345
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
sdjcy: [
|
sdjcy: [
|
||||||
{
|
{
|
||||||
longitude: 114.116195,
|
longitude: 114.103577,
|
||||||
latitude: 36.555232
|
latitude: 36.555522,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
zkz: [],
|
zkz: [],
|
||||||
|
|
@ -16,28 +16,18 @@ export const state = {
|
||||||
ssc: [],
|
ssc: [],
|
||||||
shisc: [],
|
shisc: [],
|
||||||
wz: [
|
wz: [
|
||||||
{
|
{"longitude":"114.100153","latitude":"36.55161"}
|
||||||
longitude: 114.116195,
|
|
||||||
latitude: 36.555232
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
jkd: [
|
jkd: [
|
||||||
{
|
{"longitude":"114.103822","latitude":"36.5538"},
|
||||||
longitude: 114.116195,
|
{"longitude":"114.106595","latitude":"36.555299"},
|
||||||
latitude: 36.555232
|
{"longitude":"114.10958","latitude":"36.553373"},
|
||||||
},
|
{"longitude":"114.109771","latitude":"36.555942"},
|
||||||
{
|
|
||||||
longitude: 114.116195,
|
{"longitude":"114.113151","latitude":"36.554402"},
|
||||||
latitude: 36.555232
|
{"longitude":"114.113226","latitude":"36.556436"},
|
||||||
},
|
{"longitude":"114.117084","latitude":"36.555458"},
|
||||||
{
|
{"longitude":"114.116374","latitude":"36.554366"}
|
||||||
longitude: 114.116195,
|
|
||||||
latitude: 36.555232
|
|
||||||
},
|
|
||||||
{
|
|
||||||
longitude: 114.116195,
|
|
||||||
latitude: 36.555232
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue