This commit is contained in:
joylink_zhaoerwei 2023-07-20 17:07:53 +08:00
parent a62470fcae
commit 5f6c338930
4 changed files with 17 additions and 7 deletions

View File

@ -57,7 +57,7 @@ import { onMounted, ref, watch } from 'vue';
import { queryAlarmInfoById } from 'src/api/DecisionInfo';
import { useQuasar } from 'quasar';
const bgColor = 'yellow';
let bgColor = ref('yellow');
const dialogWidth = window.screen.width * 0.4;
const lineNetStore = useLineNetStore();
@ -65,6 +65,7 @@ watch(
() => lineNetStore.alarmInfo,
(val) => {
if (val.length) {
bgColor.value = 'orange';
search();
updata();
}

View File

@ -188,7 +188,7 @@ export class TrainWindowDraw extends GraphicDrawAssistant<
);
this.app.deleteGraphics(...trainWindowAll);
turnoutSections.forEach((section) => {
const ps = section.localToCanvasPoint(section.getStartPoint());
const ps = section.datas.points[0] as Point;
let direction = 1;
if (ps.y > height.y) {
direction = -1;

View File

@ -215,7 +215,7 @@ async function onRequest(props: any) {
let response = await alarmInfoPageQuery({
current: page,
size: rowsPerPage,
alertType: filter.alertType,
alertType: (saveAlertTypeData as never)[filter.alertType],
});
const pageData = response;
pagination.value.rowsNumber = pageData.total;

View File

@ -67,6 +67,9 @@ function onResize() {
//
const audio = ref();
const $q = useQuasar();
const dialogInstance = ref();
watch(
() => lineNetStore.alarmInfo,
(val) => {
@ -79,15 +82,18 @@ watch(
},
{ deep: true }
);
const $q = useQuasar();
function playAlarmMusic() {
audio.value.play();
}
function alarm() {
lineNetStore.alarmDialog = true;
$q.dialog({ component: errrorMessageBox }).onCancel(() => {
lineNetStore.alarmDialog = false;
});
dialogInstance.value = $q
.dialog({ component: errrorMessageBox })
.onCancel(() => {
lineNetStore.alarmDialog = false;
});
}
onMounted(() => {
@ -101,5 +107,8 @@ onMounted(() => {
onUnmounted(() => {
lineNetStore.destroy();
if (dialogInstance.value) {
dialogInstance.value.hide();
}
});
</script>