| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-03-09 15:22:53 |
| | | * @LastEditTime: 2023-03-15 09:15:07 |
| | | * @FilePath: \srs-police-affairs\src\views\activity\index.vue |
| | | * @Description: 安保活 |
| | | * |
| | |
| | | chooseArrow.on(global.DC.MouseEventType.CLICK, this.reeditArrowClick) |
| | | let point = new global.DC.Point(pointPosition) |
| | | arrowsListLayer.addOverlay(point) |
| | | point.attrParams = { 'id': item.id, 'color': item.color, 'item':item ,'pointOverlayData':point} |
| | | point.attrParams = { 'id': item.id, 'color': item.color, 'item': item, 'pointOverlayData': point } |
| | | // point.on(global.DC.MouseEventType.CLICK, this.reeditArrowClick) |
| | | point.setStyle({ |
| | | "color": color, //颜色 |
| | |
| | | "outlineWidth": 0, //边框大小, |
| | | "pixelSize": 32, |
| | | }) |
| | | chooseArrow.attrParams = { 'id': item.id, 'color': item.color, 'item':item ,'pointOverlayData':point} |
| | | chooseArrow.attrParams = { 'id': item.id, 'color': item.color, 'item': item, 'pointOverlayData': point } |
| | | } else if (item.type == 9 && showType == 'plot') { |
| | | position = position.split(';')[0].split(',') |
| | | position = new global.DC.Position(Number(position[0]), Number(position[1])) |
| | |
| | | arrowsListLayer.addOverlay(label) |
| | | } |
| | | if (chooseArrow != null) { |
| | | if(!(item.type == 6 || item.type == 7 || item.type == 8)){ |
| | | if (!(item.type == 6 || item.type == 7 || item.type == 8)) { |
| | | chooseArrow.attrParams = { 'id': item.id, 'color': item.color, item } |
| | | } |
| | | chooseArrow.setStyle({ |
| | |
| | | }, |
| | | |
| | | lookStartVideo () { |
| | | this.$refs.VIDEOCONTROLBOX.watchVideo(curLinePolygonPosition) |
| | | this.$refs.VIDEOCONTROLBOX.watchVideo(curLinePosition, curLinePolygonPosition) |
| | | }, |
| | | |
| | | loading () { |
| | |
| | | getCarList () { |
| | | getCarList().then(res => { |
| | | res.data.data.forEach(item => { |
| | | policecarOption.push({ value: `${item.id}`, label: `${item.serialNumber}`, carType: `${item.carType}`,serialNumber:`${item.serialNumber}`,unitCode:`${item.unitCode}`,unitName:`${item.unitName}`,carNo:`${item.carNo}`,deptName:`${item.deptName}`}) |
| | | policecarOption.push({ value: `${item.id}`, label: `${item.serialNumber}`, carType: `${item.carType}`, serialNumber: `${item.serialNumber}`, unitCode: `${item.unitCode}`, unitName: `${item.unitName}`, carNo: `${item.carNo}`, deptName: `${item.deptName}` }) |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | addActivityPolice (params) { |
| | | addActivityPolice(params).then(res => { |
| | | if (res.data.success) { |
| | | this.$refs.DRAWBTNBOX.addNewPolice(res.data.data,'policecar') |
| | | this.$refs.DRAWBTNBOX.addNewPolice(res.data.data, 'policecar') |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success' |
| | |
| | | |
| | | // 双击修改箭头 |
| | | reeditArrowDbClick (e) { |
| | | if(e.overlay.attrParams.item.type == 5){ |
| | | if (e.overlay.attrParams.item.type == 5) { |
| | | let polygonNewPositions = [] |
| | | e.overlay.positions.forEach((item,index)=>{ |
| | | if(index%2==0){ |
| | | e.overlay.positions.forEach((item, index) => { |
| | | if (index % 2 == 0) { |
| | | polygonNewPositions.push(item) |
| | | } |
| | | }) |
| | |
| | | |
| | | // 保存标绘修改 |
| | | savePlot () { |
| | | this.$refs.DRAWBTNBOX.updateSecurityPlot({ id: plotOverlayData.overlay.attrParams.id, color: this.choosePlotColor + ',' + this.choosePlotColorAlpha },plotOverlayData.overlay) |
| | | this.$refs.DRAWBTNBOX.updateSecurityPlot({ id: plotOverlayData.overlay.attrParams.id, color: this.choosePlotColor + ',' + this.choosePlotColorAlpha }, plotOverlayData.overlay) |
| | | this.editPlotVisible = false |
| | | }, |
| | | |
| | |
| | | deleteSecurityPlot(id).then(res => { |
| | | if (res.data.success) { |
| | | plotOverlayData.overlay.remove() |
| | | if('pointOverlayData' in plotOverlayData.overlay.attrParams){ |
| | | if ('pointOverlayData' in plotOverlayData.overlay.attrParams) { |
| | | plotOverlayData.overlay.attrParams.pointOverlayData.remove() |
| | | } |
| | | this.$message({ |
| | |
| | | }, |
| | | |
| | | // 获取标绘图层覆盖物 |
| | | getArrowsListLayerOverlayList(){ |
| | | return arrowsListLayer.getOverlays() |
| | | getArrowsListLayerOverlayList () { |
| | | return arrowsListLayer.getOverlays() |
| | | }, |
| | | |
| | | }, |