|
@@ -27,6 +27,16 @@
|
|
|
</el-select>
|
|
|
<el-button type="danger" :icon="Delete" style="margin-top: 8rem;width: 30%;" @click="removeAll()">清除</el-button>
|
|
|
</div>
|
|
|
+ <div v-show="value=='点标绘类'">
|
|
|
+ <el-row :gutter="20" style="margin-left: 0rem; margin-right: 0rem">
|
|
|
+ <el-col v-for="(item,index) in point" :span="8" @click="createDrawPoint(item.drawType,index)">
|
|
|
+ <el-avatar shape="circle" :size="70" :class="currentIndex===index?'selectStyle':'defaultStyle'">
|
|
|
+ <i :class="[item.icon,currentIndex===index?'selectFontStyle':'']" />
|
|
|
+ </el-avatar>
|
|
|
+ <div style="margin-top: 5rem; font-size: 14rem;" :class="currentIndex===index?'selectFontStyle':''">{{item.label}}</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
<div v-show="value=='二维平面类'">
|
|
|
<el-row :gutter="20" style="margin-left: 0rem; margin-right: 0rem">
|
|
|
<el-col v-for="(item,index) in towDimension" :span="8" @click="createGraphics(item.drawType,index)">
|
|
@@ -71,8 +81,47 @@
|
|
|
data() {
|
|
|
return {
|
|
|
currentIndex: -1,
|
|
|
- value: "二维平面类",
|
|
|
+ value: "点标绘类",
|
|
|
+ point: [{
|
|
|
+ label: '小模型',
|
|
|
+ drawType: 'model',
|
|
|
+ number: 1,
|
|
|
+ icon: 'iconfont icon-jihedi'
|
|
|
+ }, {
|
|
|
+ label: '文字',
|
|
|
+ drawType: 'label',
|
|
|
+ number: 2,
|
|
|
+ icon: 'iconfont icon-jihedi'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '点',
|
|
|
+ drawType: 'point',
|
|
|
+ number: 3,
|
|
|
+ icon: 'iconfont icon-jihedi'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '点及文字',
|
|
|
+ drawType: 'point2Label',
|
|
|
+ number: 4,
|
|
|
+ icon: 'iconfont icon-jihedi'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '广告牌',
|
|
|
+ drawType: 'billboard',
|
|
|
+ number: 5,
|
|
|
+ icon: 'iconfont icon-jihedi'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '广告牌及文字',
|
|
|
+ drawType: 'billboard2Label',
|
|
|
+ number: 6,
|
|
|
+ icon: 'iconfont icon-jihedi'
|
|
|
+ }
|
|
|
+ ],
|
|
|
options: [{
|
|
|
+ value: '点标绘类',
|
|
|
+ label: '点标绘类',
|
|
|
+ },{
|
|
|
value: '二维平面类',
|
|
|
label: '二维平面类',
|
|
|
},
|
|
@@ -180,21 +229,33 @@
|
|
|
],
|
|
|
militaryPlotting: [{
|
|
|
label: '直线箭头',
|
|
|
- drawType: 'straightArrow',
|
|
|
+ drawType: 'DrawStraightArrow',
|
|
|
number: 1,
|
|
|
icon: 'iconfont icon-zhijiantou'
|
|
|
},
|
|
|
{
|
|
|
label: '攻击箭头',
|
|
|
- drawType: 'attackArrow',
|
|
|
+ drawType: 'DrawAttackArrow',
|
|
|
number: 2,
|
|
|
icon: 'iconfont icon-tujifangxiang'
|
|
|
},
|
|
|
{
|
|
|
label: '钳击箭头',
|
|
|
- drawType: 'pincerArrow',
|
|
|
+ drawType: 'DrawPincerArrow',
|
|
|
number: 3,
|
|
|
icon: 'iconfont icon-qianji'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '集结地',
|
|
|
+ drawType: 'DrawGatheringPlace',
|
|
|
+ number: 4,
|
|
|
+ icon: 'iconfont icon-qianji'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '闭合曲面',
|
|
|
+ drawType: 'DrawClosedCurve',
|
|
|
+ number: 5,
|
|
|
+ icon: 'iconfont icon-qianji'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -233,12 +294,13 @@
|
|
|
/* 创建监听 */
|
|
|
jt3d.DrawMilitaryPlot.onEditProperty = {};
|
|
|
// 开始绘制
|
|
|
- jt3d.DrawMilitaryPlot.draw(type, {
|
|
|
- onComplete(cPoint, gPoint) {
|
|
|
- // _self.$parent.$parent.param = param;
|
|
|
- // _self.$parent.$parent.showDialog = true;
|
|
|
- }
|
|
|
- });
|
|
|
+ jt3d.DrawMilitaryPlot.drawActivate(type);
|
|
|
+ // jt3d.DrawMilitaryPlot.draw(type, {
|
|
|
+ // onComplete(cPoint, gPoint) {
|
|
|
+ // // _self.$parent.$parent.param = param;
|
|
|
+ // // _self.$parent.$parent.showDialog = true;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
//创建二维标会和三维标会
|
|
|
createGraphics(type, index) {
|
|
@@ -262,6 +324,30 @@
|
|
|
console.log('错误原因', message)
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+
|
|
|
+ //创建点类标绘
|
|
|
+ createDrawPoint(type, index) {
|
|
|
+ let _self = this;
|
|
|
+ this.currentIndex = index;
|
|
|
+
|
|
|
+ //移除左键单击事件
|
|
|
+ if (jt3d.handlerLeftClick) {
|
|
|
+ jt3d.handlerLeftClick.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 创建监听 */
|
|
|
+ jt3d.DrawPointEdit.onEditProperty = {};
|
|
|
+ // 开始绘制
|
|
|
+ jt3d.DrawPointEdit.draw(type, {
|
|
|
+ isEdit: true,
|
|
|
+ onComplete(cPoint, gPoint) {
|
|
|
+
|
|
|
+ },
|
|
|
+ onError(message) {
|
|
|
+ console.log('错误原因', message)
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
},
|