+解决标签不显示问题,加入判断右侧添加标签失败提示
| | |
| | | // return; |
| | | // this.$store.commit("set_closeMapClick", false); //开启其他操作 |
| | | add(d).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | (res) => { |
| | | // console.log(res); |
| | | if (res.data.code == 200) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "新增失败!", |
| | | }); |
| | | } |
| | | |
| | | this.closeaddIconsLayerIconPopup(); |
| | | }, |
| | | (error) => { |
| | |
| | | ); |
| | | |
| | | // eslint-disable-next-line no-unused-vars |
| | | const popup = new global.DC.DivForms(global.viewer, { |
| | | new global.DC.DivForms(global.viewer, { |
| | | domId: "AddTagBox", |
| | | position: [ |
| | | global.DC.Transform.transformWGS84ToCartesian( |
| | |
| | | import leftNavsData from './pc/leftNavsData' |
| | | window.labelLayer = null; |
| | | window.divIcon = null; |
| | | |
| | | window.divIcononces = null; |
| | | |
| | | const popupParams = { |
| | | state: { |
| | |
| | | return |
| | | } |
| | | for (const i in list) { |
| | | const divIcon = new global.DC.DivIcon( |
| | | window.divIcononces = new global.DC.DivIcon( |
| | | new global.DC.Position( |
| | | Number(list[i].jd), |
| | | Number(list[i].wd), |
| | |
| | | ` |
| | | ) |
| | | // 订阅事件 |
| | | window.divIcon.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | window.divIcononces.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | // console.log(e); |
| | | // return; |
| | | // 定制化窗体 |
| | |
| | | data: list[i] |
| | | }) |
| | | }) |
| | | window.labelLayer.addOverlay(window.divIcon) |
| | | window.labelLayer.addOverlay(window.divIcononces) |
| | | } |
| | | }, |
| | | addLabelLayerIconMobelUse({ |