|
@@ -51,7 +51,7 @@
|
|
|
<template #dialogs>
|
|
<template #dialogs>
|
|
|
<SmartDialog v-for="dialog in activeDialogs" :key="dialog.id" :id="dialog.id" :visible.sync="dialog.visible"
|
|
<SmartDialog v-for="dialog in activeDialogs" :key="dialog.id" :id="dialog.id" :visible.sync="dialog.visible"
|
|
|
:title="dialog.title" :defaultWidth="dialog.width || 400" :defaultHeight="dialog.height || 300"
|
|
:title="dialog.title" :defaultWidth="dialog.width || 400" :defaultHeight="dialog.height || 300"
|
|
|
- :center="dialog.center !== false" :position="dialog.position" :showClose="dialog.showClose" :enableDblclickExpand="dialog.enableDblclickExpand"
|
|
|
|
|
|
|
+ :center="dialog.center !== false" :position="dialog.position" :showClose="dialog.showClose" :enableDblclickExpand="dialog.enableDblclickExpand" :noPadding="dialog.noPadding"
|
|
|
|
|
|
|
|
@close="handleDialogClose(dialog.id)" @expand="handleDoubleClickExpend(dialog.id)">
|
|
@close="handleDialogClose(dialog.id)" @expand="handleDoubleClickExpend(dialog.id)">
|
|
|
|
|
|
|
@@ -75,6 +75,7 @@ import SecurityRoutePanel from '@/components/ui/SecurityRoutePanel.vue';
|
|
|
import IntersectionMapVideos from '@/components/ui/IntersectionMapVideos.vue';
|
|
import IntersectionMapVideos from '@/components/ui/IntersectionMapVideos.vue';
|
|
|
import TrafficTimeSpace from '@/components/ui/TrafficTimeSpace.vue';
|
|
import TrafficTimeSpace from '@/components/ui/TrafficTimeSpace.vue';
|
|
|
import MenuItem from '@/components/ui/MenuItem.vue';
|
|
import MenuItem from '@/components/ui/MenuItem.vue';
|
|
|
|
|
+import RingDonutChart from '@/components/ui/RingDonutChart.vue';
|
|
|
import { getIntersectionData, makeTrafficTimeSpaceData } from '@/mock/data';
|
|
import { getIntersectionData, makeTrafficTimeSpaceData } from '@/mock/data';
|
|
|
|
|
|
|
|
|
|
|
|
@@ -92,7 +93,8 @@ export default {
|
|
|
DeviceStatusPanel,
|
|
DeviceStatusPanel,
|
|
|
SecurityRoutePanel,
|
|
SecurityRoutePanel,
|
|
|
IntersectionMapVideos,
|
|
IntersectionMapVideos,
|
|
|
- TrafficTimeSpace
|
|
|
|
|
|
|
+ TrafficTimeSpace,
|
|
|
|
|
+ RingDonutChart
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -228,7 +230,25 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
-
|
|
|
|
|
|
|
+ // this.openDialog({
|
|
|
|
|
+ // id: 'test', // 这里的 ID 可以根据实际业务场景动态生成,例如 'dev-security-route' 代表特勤安保路线弹窗
|
|
|
|
|
+ // title: '',
|
|
|
|
|
+ // component: 'RingDonutChart',
|
|
|
|
|
+ // width: 228,
|
|
|
|
|
+ // height: 124,
|
|
|
|
|
+ // center: false,
|
|
|
|
|
+ // showClose: false,
|
|
|
|
|
+ // position: { x: 750, y: 130 },
|
|
|
|
|
+ // noPadding: true,
|
|
|
|
|
+ // data: {
|
|
|
|
|
+ // chartData: [
|
|
|
|
|
+ // { name: '在线', value: 38, color: '#4DF5F8' },
|
|
|
|
|
+ // { name: '离线', value: 3, color: '#FFD369' }
|
|
|
|
|
+ // ],
|
|
|
|
|
+ // centerTitle: "98%",
|
|
|
|
|
+ // centerSubTitle: "38/41"
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 处理tab点击
|
|
// 处理tab点击
|
|
@@ -281,6 +301,7 @@ export default {
|
|
|
height: config.height || 300, // 自定义高度
|
|
height: config.height || 300, // 自定义高度
|
|
|
center: config.center !== false, // 是否居中显示
|
|
center: config.center !== false, // 是否居中显示
|
|
|
position: config.position || null, // 自定义坐标 {x, y}
|
|
position: config.position || null, // 自定义坐标 {x, y}
|
|
|
|
|
+ noPadding: config.noPadding !== false, // 无边距
|
|
|
enableDblclickExpand: config.enableDblclickExpand !== false, // 是否启用双击
|
|
enableDblclickExpand: config.enableDblclickExpand !== false, // 是否启用双击
|
|
|
showClose: config.showClose !== false, // 是否显示关闭按钮
|
|
showClose: config.showClose !== false, // 是否显示关闭按钮
|
|
|
data: config.data || {} // 传给内部组件的业务数据
|
|
data: config.data || {} // 传给内部组件的业务数据
|
|
@@ -301,6 +322,50 @@ export default {
|
|
|
// 显示路口弹窗组
|
|
// 显示路口弹窗组
|
|
|
showCrossingDalogs(nodeData) {
|
|
showCrossingDalogs(nodeData) {
|
|
|
console.log('显示干线弹窗组', nodeData.id, nodeData.label);
|
|
console.log('显示干线弹窗组', nodeData.id, nodeData.label);
|
|
|
|
|
+
|
|
|
|
|
+ this.openDialog({
|
|
|
|
|
+ id: 'crossing_' + nodeData.id, // 这里的 ID 可以根据实际业务场景动态生成,例如 'dev-security-route' 代表特勤安保路线弹窗
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ component: 'RingDonutChart',
|
|
|
|
|
+ width: 228,
|
|
|
|
|
+ height: 124,
|
|
|
|
|
+ center: false,
|
|
|
|
|
+ showClose: false,
|
|
|
|
|
+ position: { x: 730, y: 130 },
|
|
|
|
|
+ noPadding: true,
|
|
|
|
|
+ data: {
|
|
|
|
|
+ chartData: [
|
|
|
|
|
+ { name: '在线', value: 38, color: '#4DF5F8' },
|
|
|
|
|
+ { name: '离线', value: 3, color: '#FFD369' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ centerTitle: "98%",
|
|
|
|
|
+ centerSubTitle: "38/41"
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.openDialog({
|
|
|
|
|
+ id: 'crossing2_' + nodeData.id, // 这里的 ID 可以根据实际业务场景动态生成,例如 'dev-security-route' 代表特勤安保路线弹窗
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ component: 'RingDonutChart',
|
|
|
|
|
+ width: 228,
|
|
|
|
|
+ height: 124,
|
|
|
|
|
+ center: false,
|
|
|
|
|
+ showClose: false,
|
|
|
|
|
+ position: { x: 980, y: 130 },
|
|
|
|
|
+ noPadding: true,
|
|
|
|
|
+ data: {
|
|
|
|
|
+ chartData: [
|
|
|
|
|
+ { name: '通信', value: 10, color: '#4DF5F8' },
|
|
|
|
|
+ { name: '检测器', value: 8, color: '#FFA033' },
|
|
|
|
|
+ { name: '灯控', value: 15, color: '#FFF587' },
|
|
|
|
|
+ { name: '冲突', value: 5, color: '#FF4D4F' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ centerTitle: "98%",
|
|
|
|
|
+ centerSubTitle: "38/41"
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
// 显示干线弹窗组
|
|
// 显示干线弹窗组
|
|
|
showTrunkLineDalogs(nodeData) {
|
|
showTrunkLineDalogs(nodeData) {
|