【模态框居中】

This commit is contained in:
DESKTOP-VMMLSOQ\wangzg 2024-02-28 23:38:04 +08:00
parent 490d38ddfa
commit 9235c5c9d6
4 changed files with 28 additions and 30 deletions

View File

@ -53,9 +53,15 @@ export default {
Object.keys(mapLayerTypeToPointIcon).forEach(layerType => {
this.layerCreator(layerType)
})
this.map.on(mars3d.EventType.click, function (event) {
console.log('单击了地图对象', event)
})
/*this.map.on(mars3d.EventType.click, function (event) {
var point = mars3d.LngLatPoint.fromCartesian(event.cartesian); //
const [ longitude, latitude ] = point.toString().split(',')
console.log("鼠标单击坐标", JSON.stringify({
longitude: longitude,
latitude: latitude
}));
})*/
this.addPoints()
})

View File

@ -150,10 +150,11 @@ export default {
methods: {
/**
* 图层构造器
* @param { 'cems' | 'sdjcy' | 'zkz' | 'gbz' | 'ssc' | 'shisc' | 'wz' | 'jkd' } layerType 图层类型 jkd(监控点) wz(微站) sdjcy(深度检测仪) zkz质控站 gbz(国标站) ssc(洒水车) shisc(湿扫车) cemsCEMS
* @param { object } data 图层类型
* @param { object } props
* @param { 'cems' | 'sdjcy' | 'zkz' | 'gbz' | 'ssc' | 'shisc' | 'wz' | 'jkd' } props.layerType 图层类型 jkd(监控点) wz(微站) sdjcy(深度检测仪) zkz质控站 gbz(国标站) ssc(洒水车) shisc(湿扫车) cemsCEMS
* @param { object } props.data 图层类型
*/
pointClick (layerType, data) {
pointClick ({ layerType, data }) {
// todo
},
getAutoStyle() {

View File

@ -13,6 +13,7 @@ var confirm = function confirmFn(props) {
Vue.prototype.$open = function (vNode, props, dialogProps) {
return confirm({
centered: true,
prefixCls: 'visual-dialog ant-modal',
content: (h) => h(vNode, { props }),
...dialogProps

View File

@ -1,14 +1,14 @@
export const state = {
cems: [
{
longitude: 114.116195,
latitude: 36.555232
longitude: 114.101417,
latitude: 36.55345
}
],
sdjcy: [
{
longitude: 114.116195,
latitude: 36.555232
longitude: 114.103577,
latitude: 36.555522,
}
],
zkz: [],
@ -16,28 +16,18 @@ export const state = {
ssc: [],
shisc: [],
wz: [
{
longitude: 114.116195,
latitude: 36.555232
},
{"longitude":"114.100153","latitude":"36.55161"}
],
jkd: [
{
longitude: 114.116195,
latitude: 36.555232
},
{
longitude: 114.116195,
latitude: 36.555232
},
{
longitude: 114.116195,
latitude: 36.555232
},
{
longitude: 114.116195,
latitude: 36.555232
}
{"longitude":"114.103822","latitude":"36.5538"},
{"longitude":"114.106595","latitude":"36.555299"},
{"longitude":"114.10958","latitude":"36.553373"},
{"longitude":"114.109771","latitude":"36.555942"},
{"longitude":"114.113151","latitude":"36.554402"},
{"longitude":"114.113226","latitude":"36.556436"},
{"longitude":"114.117084","latitude":"36.555458"},
{"longitude":"114.116374","latitude":"36.554366"}
]
}