|
@@ -13,8 +13,8 @@
|
|
|
</div>
|
|
|
<div class="ctl-item">
|
|
|
<cons-unit-tree
|
|
|
- :placeholder="$t('common.select', {name: $t('cons.consUnit')})"
|
|
|
- v-model="consUnit"
|
|
|
+ :placeholder="$t('common.select', {name: $t('cons.consUnit')})"
|
|
|
+ v-model="consUnit"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -74,18 +74,18 @@
|
|
|
<MachineIndex v-if="selectMachine" :select-machine="selectMachine">
|
|
|
<template v-slot:title-right="scop">
|
|
|
<el-tooltip
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- content="click to machine"
|
|
|
- placement="top"
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="click to machine"
|
|
|
+ placement="top"
|
|
|
>
|
|
|
<svg-icon icon-class="location" @click="()=>{locationMachine(scop.data)}"/>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- content="close"
|
|
|
- placement="top"
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="close"
|
|
|
+ placement="top"
|
|
|
>
|
|
|
<i class="el-icon-close" @click="()=>{locationClose()}" style="margin-left: 5px"/>
|
|
|
</el-tooltip>
|
|
@@ -98,7 +98,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <PileHoleDetail ref="pileHoleDialog"/>
|
|
|
+ <!-- <PileHoleDetail ref="pileHoleDialog"/>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -178,6 +178,7 @@ export default {
|
|
|
pileHoleLayer: null,
|
|
|
machineStatusCnt: {},
|
|
|
onlineMachine: [],
|
|
|
+ hisClickGeom: null,
|
|
|
machineOpt: {
|
|
|
color: ['#006699', '#4cabce'],
|
|
|
tooltip: {
|
|
@@ -329,99 +330,58 @@ export default {
|
|
|
lineWidth: 1,
|
|
|
polygonFill: '#1bbc9b',
|
|
|
polygonOpacity: 0.2
|
|
|
- },
|
|
|
- {
|
|
|
- textName: item.holeNum,
|
|
|
- textFill: "#FF0000",
|
|
|
- textSize: 4
|
|
|
}
|
|
|
]
|
|
|
}).geojson);
|
|
|
|
|
|
geom.cust = item
|
|
|
geom.on('click', (e) => {
|
|
|
- // const comp = ComponentHandle.createComponent({
|
|
|
- // wrapper: 'testHH',
|
|
|
- // component: ContentBlock,
|
|
|
- // props: {
|
|
|
- // title: '信息编辑huahuahu',
|
|
|
- // }
|
|
|
- // });
|
|
|
- // geom.setPopWindow({
|
|
|
- // title: '信息编辑',
|
|
|
- // content: comp.$el
|
|
|
- // });
|
|
|
- this.pileHoleClick(e.target.cust)
|
|
|
+ if (this.hisClickGeom) {
|
|
|
+ this.hisClickGeom.updateSymbol([
|
|
|
+ {
|
|
|
+ lineColor: '#34495e',
|
|
|
+ lineWidth: 1,
|
|
|
+ polygonFill: '#1bbc9b',
|
|
|
+ polygonOpacity: 0.2
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ this.hisClickGeom = geom
|
|
|
+ geom.updateSymbol([
|
|
|
+ {
|
|
|
+ lineColor: 'green',
|
|
|
+ lineWidth: 1,
|
|
|
+ polygonFill: '#1bbc9b',
|
|
|
+ polygonOpacity: 0.2
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ const pileHoleInfo = e.target.cust
|
|
|
+ geom.setPopWindow({
|
|
|
+ autoPan: true,
|
|
|
+ content: `<div id='pop-window' class="window-content"></div>`
|
|
|
+ });
|
|
|
+ ComponentHandle.createComponent({
|
|
|
+ wrapper: 'pop-window',
|
|
|
+ component: PileHoleDetail,
|
|
|
+ props: pileHoleInfo,
|
|
|
+ onclose: () => {
|
|
|
+ if (this.hisClickGeom) {
|
|
|
+ this.hisClickGeom.updateSymbol([
|
|
|
+ {
|
|
|
+ lineColor: '#34495e',
|
|
|
+ lineWidth: 1,
|
|
|
+ polygonFill: '#1bbc9b',
|
|
|
+ polygonOpacity: 0.2
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ geom.closePopWindow();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
})
|
|
|
this.pileHoleLayer.addGeometry(geom);
|
|
|
})
|
|
|
- // const geomCollection = [];
|
|
|
- // Circle()
|
|
|
- // const geomUpdateSymbol = [{
|
|
|
- // lineColor: '#FFFF00',
|
|
|
- // polygonFill: '#00FFFF'
|
|
|
- // }];
|
|
|
- // geomCollection.forEach((item, index) => {
|
|
|
- // let geoJson = item.geojson
|
|
|
- // const geom = new BDLayers.Lib.Overlays.FromGeoJson(geoJson);
|
|
|
- // geom.index = index;
|
|
|
- // const geomSymbol = geoJson.symbol;
|
|
|
- // item.isSelected = false;
|
|
|
- // item.symbol = geomSymbol;
|
|
|
- // // 多边形编辑的信息
|
|
|
- // item.attr = {
|
|
|
- // name: '',
|
|
|
- // desc: ''
|
|
|
- // };
|
|
|
- //
|
|
|
- // geom.on('click', e => {
|
|
|
- // const curSelectedGeom = geomCollection.filter((item, i) => i !== index && item.isSelected)[0];
|
|
|
- // if (curSelectedGeom) {
|
|
|
- // curSelectedGeom.isSelected = false;
|
|
|
- // curSelectedGeom.geom.updateSymbol(curSelectedGeom.symbol);
|
|
|
- // }
|
|
|
- //
|
|
|
- // // geom根据选中状态切换样式
|
|
|
- // geomCollection[index].isSelected = !geomCollection[index].isSelected;
|
|
|
- // const isSelected = geomCollection[index].isSelected;
|
|
|
- // geom.updateSymbol(isSelected ? geomUpdateSymbol : geomSymbol);
|
|
|
- //
|
|
|
- // if (isSelected) {
|
|
|
- // const comp = ComponentHandle.createComponent({
|
|
|
- // wrapper: 'testHH',
|
|
|
- // component: ContentBlock,
|
|
|
- // props: {
|
|
|
- // title: '信息编辑huahuahu',
|
|
|
- // }
|
|
|
- // });
|
|
|
- // geom.setPopWindow({
|
|
|
- // title: '信息编辑',
|
|
|
- // content: comp.$el
|
|
|
- // });
|
|
|
- // // 点击确认按钮 保存信息
|
|
|
- // document.querySelector('.btn-save').addEventListener('click', () => {
|
|
|
- // geomCollection[index].attr.name = document.querySelector('.input-name').value;
|
|
|
- // geomCollection[index].attr.desc = document.querySelector('.textarea-desc').value;
|
|
|
- //
|
|
|
- // geom.trigger('click');
|
|
|
- // });
|
|
|
- //
|
|
|
- // // 点击取消按钮 关闭气泡弹窗
|
|
|
- // document.querySelector('.btn-quit').addEventListener('click', () => {
|
|
|
- // geom.closePopWindow();
|
|
|
- // });
|
|
|
- // // 点击气泡弹窗关闭按钮 geom取消选中状态
|
|
|
- // geom.on('closePopWindow', () => {
|
|
|
- // geomCollection[index].isSelected = false;
|
|
|
- // geom.updateSymbol(geomSymbol);
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // geom.closePopWindow();
|
|
|
- // }
|
|
|
- // })
|
|
|
- // this.pileHoleLayer.addGeometry(geom);
|
|
|
- // geomCollection[index].geom = geom;
|
|
|
- // });
|
|
|
})
|
|
|
},
|
|
|
loaded(map) {
|
|
@@ -450,9 +410,6 @@ export default {
|
|
|
locationClose() {
|
|
|
this.selectMachine = null
|
|
|
},
|
|
|
- pileHoleClick(pileHole) {
|
|
|
- this.$refs.pileHoleDialog.showDialog(pileHole)
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|