增加是否播报语音

This commit is contained in:
joylink_zhaoerwei 2024-11-14 18:14:13 +08:00
parent 05896cb241
commit e932e7d0ae
4 changed files with 17 additions and 3 deletions

View File

@ -81,6 +81,7 @@ function playAlarmMusic(type: number, lineId: number) {
i--;
}
}
if (!lineNetStore.handlePlayAble) return;
if (lineNetStore.playAble && audio.value.paused) {
const alarmType = (showAlertTypeData as never)[type + ''];
let mapAlarmMusic = new Map();

View File

@ -15,7 +15,7 @@
<img :src="NCC" style="width: 80px" />
</div>
<q-toolbar-title> 西安NCC调度辅助决策系统 </q-toolbar-title>
<!-- <q-btn
<!-- <q-btn
v-show="route.path.includes('line/monitor')"
color="info"
label="故障查询"
@ -51,6 +51,14 @@
label="返回"
@click="backConfirm"
/>
<q-btn
round
dense
flat
:color="lineNetStore.handlePlayAble ? 'white' : 'red'"
:icon="lineNetStore.handlePlayAble ? 'alarm_on' : 'alarm_off'"
@click="changeCanPlayAlarmMusic"
/>
<q-btn
round
dense
@ -288,4 +296,8 @@ function resetFn() {
});
});
}
function changeCanPlayAlarmMusic() {
lineNetStore.handlePlayAble = !lineNetStore.handlePlayAble;
}
</script>

View File

@ -147,7 +147,7 @@ const tableTitle = reactive({
faultNameShower: '',
faultDriverShower: '',
});
const inputSearchName = ref('');
const inputSearchName = ref('故障现象');
watch(tab, (tabVal) => {
if (tabVal == 'GUIDE') {
inputSearchName.value = '故障现象';

View File

@ -33,7 +33,8 @@ export const useLineNetStore = defineStore('lineNet', {
alarmInfo: [] as AlarmInfo[], //报警信息
untreatedMap: new Map(), // 未处理的报警
alarmInfoListTable: undefined as QTable | undefined,
playAble: false, //是否允许播放音乐
playAble: false, //是否允许播放音乐(与页面交互之后为true)
handlePlayAble: true, //默认交互之后可播放音乐
closeAllAlarmInfoDialog: false,
connectButtonColor: 'green',
connectInfo: null as state.WarnLineMessage | null,