| | |
| | | btn_zoom_out: '缩å°', |
| | | preview: 'é¢è§' |
| | | }, |
| | | ecg: { |
| | | roomselect: 'è¯å®¤éæ©', |
| | | callingscreen_big: 'å«å·å±', |
| | | callingscreen_room: 'è¯é´å±' |
| | | }, |
| | | 'OAuth 2.0': 'OAuth 2.0' // é¿å
èå忝 OAuth 2.0 æ¶ï¼ä¸ç´ warn æ¥é |
| | | } |
| | |
| | | '/auth-redirect', |
| | | '/bind', |
| | | '/register', |
| | | '/oauthLogin/gitee' |
| | | '/oauthLogin/gitee', |
| | | '/calling-screen-big', |
| | | '/calling-screen-room' |
| | | ] |
| | | |
| | | // è·¯ç±å è½½å |
| | |
| | | console.info("router.beforeEach to: " + to.fullPath + " from: " + from.fullPath) |
| | | start() |
| | | loadStart() |
| | | |
| | | if (whiteList.indexOf(to.path) !== -1) { |
| | | next() |
| | | return |
| | | } |
| | | |
| | | if (!getAccessToken()) { |
| | | if (whiteList.indexOf(to.path) !== -1) { |
| | | next() |
| | | return |
| | | } else { |
| | | next(`/login?redirect=${to.fullPath}`) // å¦åå
¨é¨éå®åå°ç»å½é¡µ |
| | | return |
| | | } |
| | | next(`/login?redirect=${to.fullPath}`) // å¦åå
¨é¨éå®åå°ç»å½é¡µ |
| | | return |
| | | } |
| | | |
| | | if (to.path === '/login') { |
| | |
| | | name: 'LoginRoomSelect', |
| | | meta: { |
| | | hidden: true, |
| | | title: t('router.login'), |
| | | title: t('ecg.roomselect'), |
| | | noTagsView: true |
| | | } |
| | | }, |
| | | { |
| | | path: '/calling-screen-big', |
| | | component: () => import('@/views/ecg/callingscreen/bigscreen.vue'), |
| | | name: 'bigCallingScreen', |
| | | meta: { |
| | | hidden: true, |
| | | title: t('ecg.callingscreen_big'), |
| | | noTagsView: true |
| | | } |
| | | }, |
| | | { |
| | | path: '/calling-screen-room', |
| | | component: () => import('@/views/ecg/callingscreen/roomscreen.vue'), |
| | | name: 'roomCallingScreen', |
| | | meta: { |
| | | hidden: true, |
| | | title: t('ecg.callingscreen_room'), |
| | | noTagsView: true |
| | | } |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <script setup lang="ts"> |
| | | |
| | | defineOptions({ name: 'bigscreen' }) |
| | | |
| | | const tableData = [{ |
| | | date: '2016-05-02', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1518 å¼' |
| | | }, { |
| | | date: '2016-05-04', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1517 å¼' |
| | | }, { |
| | | date: '2016-05-01', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1519 å¼' |
| | | }, { |
| | | date: '2016-05-03', |
| | | name: 'çå°è', |
| | | address: '䏿µ·å¸æ®éåºéæ²æ±è·¯ 1516 å¼' |
| | | }] |
| | | |
| | | const names = ["Alice", "Bob", "Charlie", "David", "Eve", "Frank", "Grace", |
| | | "ç¹ææ®", "马å¡é¾", "æ®é", "ç©è¿ªèä»", "æç»", "å¡ç¹"] |
| | | const visibleCount = 5 // å¯åæ¶æ¾ç¤ºçååæ°é |
| | | const startIndex = ref<number>(0); |
| | | |
| | | const visibleNames : string[] = computed(() => { |
| | | const endIndex = (startIndex.value + visibleCount) % names.length; |
| | | if (endIndex > startIndex.value) { |
| | | return names.slice(startIndex.value, endIndex); |
| | | } else { |
| | | return [...names.slice(startIndex.value), ...names.slice(0, endIndex)]; |
| | | } |
| | | }) |
| | | |
| | | const startScrolling = () => { |
| | | setInterval(() => { |
| | | // console.info("...") |
| | | startIndex.value = (startIndex.value + visibleCount) % names.length; |
| | | }, 3000); // æ¯ä¸¤ç§æ»å¨ä¸æ¬¡ |
| | | } |
| | | |
| | | onMounted( () => { |
| | | startScrolling() |
| | | }) |
| | | |
| | | const speak = (msg) => { |
| | | //const msg = new SpeechSynthesisUtterance(`请${this.currentNumber}å·å°±è¯`); |
| | | const repeatNum = 3 |
| | | var speech = new SpeechSynthesisUtterance() |
| | | speech.text = msg |
| | | speech.pitch = 1 // è·å并设置è¯è¯çé³è°(0-2 é»è®¤1ï¼å¼è¶å¤§è¶å°é,è¶ä½è¶ä½æ²) |
| | | speech.rate = 0.9 // è·å并设置说è¯çé度(0.1-10 é»è®¤1ï¼å¼è¶å¤§è¯éè¶å¿«,è¶å°è¯éè¶æ
¢) |
| | | speech.volume = 100 // è·å并设置说è¯çé³é |
| | | speech.lang = 'zh-CN' // è®¾ç½®ææ¾è¯è¨ |
| | | // å¢å æ§å¶ææ¾æ¬¡æ° |
| | | let count = 1 |
| | | speechSynthesis.speak(speech) |
| | | while (count < repeatNum) { |
| | | speechSynthesis.speak(speech) |
| | | count++ |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <el-container> |
| | | <el-header>Header</el-header> |
| | | <el-container> |
| | | <el-aside width="500px"> |
| | | <el-table |
| | | :data="tableData" |
| | | stripe |
| | | :show-header="false" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | prop="date" |
| | | label="æ¥æ" |
| | | width="180"/> |
| | | <el-table-column |
| | | prop="name" |
| | | label="å§å" |
| | | width="180"/> |
| | | <el-table-column |
| | | prop="address" |
| | | label="å°å"/> |
| | | </el-table> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-main> |
| | | <div class="name-scroller"> |
| | | <div class="name-box"> |
| | | <span v-for="(name, index) in visibleNames" :key="index">{{ name }}</span> |
| | | </div> |
| | | </div> |
| | | </el-main> |
| | | <el-footer>Footer</el-footer> |
| | | </el-container> |
| | | </el-container> |
| | | <el-button @click="speak('请 ç¹ææ® å°äºå·è¯å®¤ å°±è¯')" >å«å·</el-button> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <style scoped lang="scss"> |
| | | .el-header, .el-footer { |
| | | background-color: #B3C0D1; |
| | | color: #333; |
| | | text-align: center; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .el-aside { |
| | | background-color: #D3DCE6; |
| | | color: #333; |
| | | text-align: center; |
| | | line-height: 200px; |
| | | } |
| | | |
| | | .el-main { |
| | | background-color: #E9EEF3; |
| | | color: #333; |
| | | text-align: center; |
| | | line-height: 160px; |
| | | } |
| | | |
| | | body > .el-container { |
| | | margin-bottom: 40px; |
| | | } |
| | | |
| | | .el-container:nth-child(5) .el-aside, |
| | | .el-container:nth-child(6) .el-aside { |
| | | line-height: 260px; |
| | | } |
| | | |
| | | .el-container:nth-child(7) .el-aside { |
| | | line-height: 320px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <script setup lang="ts"> |
| | | |
| | | defineOptions({ name: 'roomscreen' }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <el-container> |
| | | <el-aside width="200px">Aside</el-aside> |
| | | <el-container> |
| | | <el-header>Header</el-header> |
| | | <el-main>Main</el-main> |
| | | <el-footer>Footer</el-footer> |
| | | </el-container> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |