| | |
| | | <div class="line"> |
| | | <div class="value-name-box">选择颜色:</div> |
| | | <div class="pick-color-box"> |
| | | <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small"> |
| | | <el-color-picker v-model="choosePlotColor" :predefine="predefineColors" size="small" show-alpha> |
| | | </el-color-picker> |
| | | </div> |
| | | </div> |
| | |
| | | polygonName: '', |
| | | polygonPositionStr: '', |
| | | chooseColor: '#1CA085', |
| | | choosePlotColor: '#1CA085', |
| | | choosePlotColor: 'rgba(255, 69, 0, 0.68)', |
| | | chooseCarColor: '#1CA085', |
| | | choosePoliceColor: '#1CA085', |
| | | chooseLineData: {}, |
| | |
| | | // overlay.on(global.DC.MouseEventType.CLICK, this.polygonClick) |
| | | document.oncontextmenu = function () { |
| | | if (flag) { |
| | | that.choosePlotColor = '#1CA085' |
| | | that.choosePlotColor = 'rgba(255, 69, 0, 0.68)' |
| | | that.isNeedName = true |
| | | that.polygonName = '' |
| | | that.polygonAddVisible = true |
| | |
| | | drawArrowLayers.addOverlay(overlay) |
| | | document.oncontextmenu = function () { |
| | | if (flag) { |
| | | that.choosePlotColor = '#1CA085' |
| | | that.choosePlotColor = 'rgba(255, 69, 0, 0.68)' |
| | | that.isNeedName = false |
| | | that.polygonAddVisible = true |
| | | flag = false |
| | |
| | | } |
| | | let color = '' |
| | | if (item.color == '') { |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(255, 69, 0, 173) |
| | | } else { |
| | | let r = parseInt(item.color.slice(1, 3), 16) |
| | | let g = parseInt(item.color.slice(3, 5), 16) |
| | | let b = parseInt(item.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150) |
| | | // if(item.type == 5){ |
| | | let colorNumber =item.color.slice(5,item.color.length-1) |
| | | let colorArr = colorNumber.split(',') |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(Number(colorArr[0]), Number(colorArr[1]), Number(colorArr[2]),Math.floor(Number(colorArr[3])*255)) |
| | | // }else{ |
| | | // let r = parseInt(item.color.slice(1, 3), 16) |
| | | // let g = parseInt(item.color.slice(3, 5), 16) |
| | | // let b = parseInt(item.color.slice(5, 7), 16) |
| | | // color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150) |
| | | // } |
| | | console.log('color',item.color,color); |
| | | } |
| | | chooseArrow.attrParams = { 'id': item.id, 'color': item.color, 'name': item.name } |
| | | arrowsListLayer.addOverlay(chooseArrow) |
| | |
| | | // 单击。标绘箭头 |
| | | reeditArrowClick (e) { |
| | | this.plotOverlayData = e |
| | | this.choosePlotColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#1CA085' |
| | | this.choosePlotColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : 'rgba(255, 69, 0, 0.68)' |
| | | this.polygonName = e.overlay.attrParams.name |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.plotId = e.overlay.attrParams.id |