报警跳页面

This commit is contained in:
joylink_zhaoerwei 2023-07-27 15:22:39 +08:00
parent 791857c1ba
commit cc4c6b0d65
3 changed files with 12 additions and 4 deletions

View File

@ -112,6 +112,7 @@
</q-form>
</q-card>
</q-dialog>
<commonAlarm v-show="route.path.includes('monitor')" />
</template>
<script setup lang="ts">
@ -122,6 +123,7 @@ import { Dialog, useQuasar } from 'quasar';
import { clearJwtToken } from 'src/configs/TokenManage';
import { mockAlertSet } from 'src/api/AlertMock';
import alarmInfoList from 'src/components/alarm/alarmInfoList.vue';
import commonAlarm from 'src/components/alarm/commonAlarm.vue';
const leftDrawerOpen = ref(false);
const router = useRouter();

View File

@ -2,7 +2,6 @@
<q-page class="row items-center justify-evenly">
<div id="line-app-container"></div>
</q-page>
<commonAlarm />
</template>
<script setup lang="ts">
@ -10,7 +9,6 @@ import { onMounted, ref, watch } from 'vue';
import { useLineStore } from 'src/stores/line-store';
import { useRoute } from 'vue-router';
import { loadLineDatas, getLineApp } from 'src/drawApp/lineApp';
import commonAlarm from 'src/components/alarm/commonAlarm.vue';
const props = withDefaults(
defineProps<{

View File

@ -2,7 +2,6 @@
<q-page class="row items-center justify-evenly">
<div id="line-app-container"></div>
</q-page>
<commonAlarm />
</template>
<script setup lang="ts">
@ -11,7 +10,6 @@ import { useLineNetStore } from 'src/stores/line-net-store';
import { loadLineNetDatas, getLineNetApp } from 'src/drawApp/lineNetApp';
import { RunLine } from 'src/graphics/runLine/RunLine';
import { useRouter } from 'vue-router';
import commonAlarm from 'src/components/alarm/commonAlarm.vue';
const props = withDefaults(
defineProps<{
@ -47,6 +45,16 @@ watch(
}
);
watch(
() => lineNetStore.alarmInfo,
(val) => {
if (val.length && !lineNetStore.alarmDialog) {
router.replace('/line/monitor/3');
}
},
{ deep: true }
);
function onResize() {
const dom = document.getElementById('line-app-container');
if (dom) {