From 9558a021310c22ec73d144e8af70c0877a50e8c1 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 03 九月 2024 15:02:42 +0800
Subject: [PATCH] 叫号屏
---
src/locales/zh-CN.ts | 5 +
src/router/modules/remaining.ts | 22 +++++
/dev/null | 0
src/views/ecg/callingscreen/bigscreen.vue | 140 +++++++++++++++++++++++++++++++++++
src/views/ecg/callingscreen/roomscreen.vue | 20 +++++
src/permission.ts | 19 ++--
6 files changed, 197 insertions(+), 9 deletions(-)
diff --git a/public/home.png b/public/home.png
deleted file mode 100644
index ccd4145..0000000
--- a/public/home.png
+++ /dev/null
Binary files differ
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 0721651..aa30b3f 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -448,5 +448,10 @@
btn_zoom_out: '缂╁皬',
preview: '棰勮'
},
+ ecg: {
+ roomselect: '璇婂閫夋嫨',
+ callingscreen_big: '鍙彿灞�',
+ callingscreen_room: '璇婇棿灞�'
+ },
'OAuth 2.0': 'OAuth 2.0' // 閬垮厤鑿滃崟鍚嶆槸 OAuth 2.0 鏃讹紝涓�鐩� warn 鎶ラ敊
}
diff --git a/src/permission.ts b/src/permission.ts
index 7f20ed4..a4ea69d 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -53,7 +53,9 @@
'/auth-redirect',
'/bind',
'/register',
- '/oauthLogin/gitee'
+ '/oauthLogin/gitee',
+ '/calling-screen-big',
+ '/calling-screen-room'
]
// 璺敱鍔犺浇鍓�
@@ -61,14 +63,15 @@
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') {
diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts
index 5bb6a4d..f0dc9d0 100644
--- a/src/router/modules/remaining.ts
+++ b/src/router/modules/remaining.ts
@@ -210,7 +210,27 @@
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
}
},
diff --git a/src/views/ecg/callingscreen/bigscreen.vue b/src/views/ecg/callingscreen/bigscreen.vue
new file mode 100644
index 0000000..98b4cab
--- /dev/null
+++ b/src/views/ecg/callingscreen/bigscreen.vue
@@ -0,0 +1,140 @@
+<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>
diff --git a/src/views/ecg/callingscreen/roomscreen.vue b/src/views/ecg/callingscreen/roomscreen.vue
new file mode 100644
index 0000000..1e46c94
--- /dev/null
+++ b/src/views/ecg/callingscreen/roomscreen.vue
@@ -0,0 +1,20 @@
+<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>
--
Gitblit v1.9.3