diff --git a/public/config/config.json b/public/config/config.json index 0c03887..5a63ff5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -10,7 +10,7 @@ "maxZoom": "18", "zoom": "15", "timeGap": 600000, - "systemType": "gm", + "systemType": "sm", "lineWidth": "3", "lineColor": "#1aa034", "lineColors": [ @@ -65,5 +65,5 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "false" + "useGateway": "true" } diff --git a/public/config/config.json b/public/config/config.json index 0c03887..5a63ff5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -10,7 +10,7 @@ "maxZoom": "18", "zoom": "15", "timeGap": 600000, - "systemType": "gm", + "systemType": "sm", "lineWidth": "3", "lineColor": "#1aa034", "lineColors": [ @@ -65,5 +65,5 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "false" + "useGateway": "true" } diff --git a/src/router/modules/monitor.ts b/src/router/modules/monitor.ts index b8ed151..e269664 100644 --- a/src/router/modules/monitor.ts +++ b/src/router/modules/monitor.ts @@ -22,8 +22,8 @@ // import('@/views/monitor/realTime/index-noPlugin-single.vue'), // SDK单路 // import('@/views/monitor/realTime/index-noPlugin.vue'), // SDK4路 // import('@/views/monitor/realTime/index-isc-single.vue'), // isc - // import('@/views/monitor/realTime/index-media-single.vue'), // 商流媒体单路 - import('@/views/monitor/realTime/index-new-gm-plugin.vue'), // 国 + import('@/views/monitor/realTime/index-media-single.vue'), // 商流媒体单路 + // import('@/views/monitor/realTime/index-new-gm-plugin.vue'), // 国 meta: { title: '实时监控', auth: '/realTime', diff --git a/public/config/config.json b/public/config/config.json index 0c03887..5a63ff5 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -10,7 +10,7 @@ "maxZoom": "18", "zoom": "15", "timeGap": 600000, - "systemType": "gm", + "systemType": "sm", "lineWidth": "3", "lineColor": "#1aa034", "lineColors": [ @@ -65,5 +65,5 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "false" + "useGateway": "true" } diff --git a/src/router/modules/monitor.ts b/src/router/modules/monitor.ts index b8ed151..e269664 100644 --- a/src/router/modules/monitor.ts +++ b/src/router/modules/monitor.ts @@ -22,8 +22,8 @@ // import('@/views/monitor/realTime/index-noPlugin-single.vue'), // SDK单路 // import('@/views/monitor/realTime/index-noPlugin.vue'), // SDK4路 // import('@/views/monitor/realTime/index-isc-single.vue'), // isc - // import('@/views/monitor/realTime/index-media-single.vue'), // 商流媒体单路 - import('@/views/monitor/realTime/index-new-gm-plugin.vue'), // 国 + import('@/views/monitor/realTime/index-media-single.vue'), // 商流媒体单路 + // import('@/views/monitor/realTime/index-new-gm-plugin.vue'), // 国 meta: { title: '实时监控', auth: '/realTime', diff --git a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue index b1832ea..b24bd75 100644 --- a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue +++ b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue @@ -131,14 +131,14 @@ mousePos.y = props.height } // 根据实际多边形边数计算索引 - let currentIndex = 0; + let currentIndex = 0 for (let i = 0; i < pointsInfo.value.length; i++) { - const polygon = pointsInfo.value[i]; - const boundaryLength = polygon.boundary.length; + const polygon = pointsInfo.value[i] + const boundaryLength = polygon.boundary.length if (pointIndex < currentIndex + boundaryLength) { - const remainder = pointIndex - currentIndex; - const rect = polygon.boundary; - const draggedPoint = rect[remainder]; + const remainder = pointIndex - currentIndex + const rect = polygon.boundary + const draggedPoint = rect[remainder] if (props.currentDrawButton === '1') { // 矩形拖拽 console.log('矩形拖拽') // 保存原始矩形的宽高(基于未拖拽前的坐标) @@ -158,7 +158,7 @@ // 左下角顶点x与左上角相同,y为高 rect[3].x = draggedPoint.x rect[3].y = useCalc(Number(draggedPoint.y), Number(originalHeight), '+') - break; + break case 1: // 右上角顶点(x1,y1) // 保持宽高不变,左下角顶点 = 右上角 - 宽高(x减宽,y增高) @@ -170,7 +170,7 @@ // 右下角顶点x相同,y = 右上角y + 高 rect[2].x = draggedPoint.x // rect[2].y = draggedPoint.y + originalHeight - break; + break case 2: // 右下角顶点(x2,y2) @@ -183,7 +183,7 @@ // 左下角顶点x = 右下角x - 宽,y相同 // rect[3].x = draggedPoint.x - originalWidth rect[3].y = draggedPoint.y - break; + break case 3: // 左下角顶点(x3,y3) @@ -196,7 +196,7 @@ // 右下角顶点x = 左下角x + 宽,y相同 rect[2].x = useCalc(Number(draggedPoint.x), Number(originalWidth), '+') rect[2].y = draggedPoint.y - break; + break } // 更新坐标(注意:顶点对象是引用类型,直接修改即可) @@ -205,14 +205,15 @@ draggedPoint.y = mousePos.y // 更新当前拖拽点的y坐标 // 限制拖拽点在画布内 - } else { // 多边形拖拽 + } + else { // 多边形拖拽 console.log('-----修改-----', pointsInfo.value) polygon.boundary[remainder].x = mousePos.x polygon.boundary[remainder].y = mousePos.y } - break; + break } - currentIndex += boundaryLength; + currentIndex += boundaryLength } draw()