diff --git a/package.json b/package.json
index 44fa537..0db58d6 100644
--- a/package.json
+++ b/package.json
@@ -62,6 +62,8 @@
"postcss-url": "^10.1.3",
"postcss-viewport-units": "^0.1.6",
"postcss-write-svg": "^3.0.1",
+ "simple-keyboard": "^3.8.64",
+ "simple-keyboard-layouts": "^3.4.102",
"vue": "^3.5.13",
"vue-chart-3": "^3.1.8",
"vue-i18n": "^11.1.6",
diff --git a/src/components/common/FTKeyboard/index.vue b/src/components/common/FTKeyboard/index.vue
new file mode 100644
index 0000000..6a8d90c
--- /dev/null
+++ b/src/components/common/FTKeyboard/index.vue
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index c40ce94..b3a1482 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -4,6 +4,7 @@ import WifiUnconnSvg from 'assets/images/wifi-unconn.svg'
import ErrorEventsModal from 'components/system/ErrorEventsModal.vue'
import NetReconnection from 'components/system/NetReconnection.vue'
import { formatDateTime, openFullscreen } from 'libs/utils'
+import { authRoutes } from 'router/routes'
import { useDeviceStore } from 'stores/deviceStore'
import { computed, onMounted, onUnmounted, ref, watch, watchEffect } from 'vue'
import { useI18n } from 'vue-i18n'
@@ -11,14 +12,13 @@ import { useRouter } from 'vue-router'
import { getDeviceStatus } from '@/libs/deviceComm'
import { FtMessageBox } from '@/libs/messageBox'
-import { generateRoutes } from '@/router/routes'
import { useHomeStore } from '@/stores/homeStore'
import { useLiquidStore } from '@/stores/liquidStore'
import { useSealStore } from '@/stores/sealStore'
import { useSystemStore } from '@/stores/systemStore'
-const routes = generateRoutes()
-const childrenRoutes = routes.find(r => r.path === '/')?.children || []
+// const routes = generateRoutes()
+// const childrenRoutes = routes.find(r => r.path === '/')?.children || []
const { locale } = useI18n()
const router = useRouter()
const liquidStore = useLiquidStore()
@@ -41,6 +41,25 @@ const websocketConnected = ref(systemStore.websocketConnected)
let touchStartTime = 0
let touchCount = 0
+const userData = localStorage.getItem('user')
+const userInfo = userData ? JSON.parse(userData) : {}
+const userRole = userInfo.roleType || ''
+
+const deviceType = __DEVICE_TYPE__
+
+const menuList = computed(() => {
+ return authRoutes.filter((item) => {
+ if (
+ (deviceType === deviceStore.deviceTypeMap.LargeSpaceDM_B && (item.name === 'seal' || item.name === 'liquid'))
+ || (deviceType === deviceStore.deviceTypeMap.LargeSpaceDM && item.name === 'seal')
+ || (deviceType === deviceStore.deviceTypeMap.SmallSpaceDM && item.name === 'seal')
+ || (deviceType === deviceStore.deviceTypeMap.DrawBarDM && item.name === 'liquid')
+ ) {
+ return false
+ }
+ return !(item.name === 'debug' && userRole !== 'admin')
+ })
+})
onMounted(() => {
// 连续3次点击任意地方,全屏显示
onFullScreen()
@@ -167,10 +186,6 @@ const statusMap = {
name: '设备告警信息',
},
}
-
-const deviceType = computed(() => {
- return __DEVICE_TYPE__
-})
@@ -183,7 +198,7 @@ const deviceType = computed(() => {