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

View File

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

View File

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

View File

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