diff --git a/src/api/AlertMock.ts b/src/api/AlertMock.ts index 206e94c..c228e23 100644 --- a/src/api/AlertMock.ts +++ b/src/api/AlertMock.ts @@ -4,6 +4,21 @@ import { AlarmInfo } from './DecisionInfo'; const alertUriBase = '/api/alert/mock'; +//故障测试 +export function mockLocalDemoTestSet( + alertType: string, + data: { + lineId: number; + rtuId: number; + deviceInfos: { deviceName: string; deviceType: string }[]; + status: string; + groupId?: string; + } +) { + return api.post(`${alertUriBase}/localDemoTest/${alertType}`, data); +} + +//故障演练 export function mockAlertSet(data: { lineId: number; alertType: string; diff --git a/src/components/alarm/setAlarmText.vue b/src/components/alarm/setAlarmText.vue new file mode 100644 index 0000000..7f27582 --- /dev/null +++ b/src/components/alarm/setAlarmText.vue @@ -0,0 +1,247 @@ + + + diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 0b890b3..52a0b7f 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -19,10 +19,17 @@ +
-
设置模拟故障
+
设置故障演练
diff --git a/src/stores/draw-store.ts b/src/stores/draw-store.ts index b50d12b..c5addd0 100644 --- a/src/stores/draw-store.ts +++ b/src/stores/draw-store.ts @@ -1,12 +1,6 @@ import { defineStore } from 'pinia'; import { destroyDrawApp, getDrawApp, initDrawApp } from 'src/drawApp'; -import { - DrawAssistant, - IJlCanvas, - IDrawApp, - JlGraphic, - GraphicData, -} from 'src/jl-graphic'; +import { DrawAssistant, IJlCanvas, IDrawApp, JlGraphic } from 'src/jl-graphic'; import { markRaw } from 'vue'; export const useDrawStore = defineStore('draw', { @@ -78,14 +72,6 @@ export const useDrawStore = defineStore('draw', { this.selectedGraphics = []; return app; }, - bindFormData(form: GraphicData): void { - const app = this.getDrawApp(); - app.bindFormData(form); - }, - unbindFormData(form: GraphicData): void { - const app = this.getDrawApp(); - app.unbindFormData(form); - }, destroy() { // console.log('绘制状态清空,绘制应用销毁'); this.drawAssistant = null; diff --git a/src/stores/line-net-store.ts b/src/stores/line-net-store.ts index d35e904..0585e5f 100644 --- a/src/stores/line-net-store.ts +++ b/src/stores/line-net-store.ts @@ -57,7 +57,7 @@ export const useLineNetStore = defineStore('lineNet', { }, initLineNetApp() { const app = initLineNetApp(); - app.on('graphicselectedchange', () => { + app.on('graphicselected', () => { this.selectedGraphics = app.selectedGraphics; }); this.selectedGraphics = [];