From 757873c9b9387af364270951cd0f81057bc704d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Wed, 11 Dec 2024 13:05:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 +- src/main.js | 29 ++- src/router/index.js | 7 + src/views/touchScreen/components/kbTime.vue | 34 ++++ .../touchScreen/components/scanInput.vue | 63 ++++++ src/views/touchScreen/main/index.vue | 146 ++++++++++++++ src/views/touchScreen/report/index.vue | 185 +++++++++++++++--- src/vuetify-theme.json | 37 ++++ 8 files changed, 477 insertions(+), 28 deletions(-) create mode 100644 src/views/touchScreen/components/kbTime.vue create mode 100644 src/views/touchScreen/components/scanInput.vue create mode 100644 src/views/touchScreen/main/index.vue create mode 100644 src/vuetify-theme.json diff --git a/package.json b/package.json index 323e8ac..a9a1909 100644 --- a/package.json +++ b/package.json @@ -44,13 +44,15 @@ "vue-cropper": "1.0.2", "vue-i18n": "9.2.2", "vue-router": "^4.2.2", - "vxe-pc-ui": "^4.0.12", "vue3-print-nb": "^0.1.4", "vue3-qr-reader": "^1.0.0", + "vuetify": "^3.7.5", + "vxe-pc-ui": "^4.0.12", "vxe-table": "^4.7.14", "xe-utils": "^3.5.13" }, "devDependencies": { + "@mdi/font": "^7.4.47", "@vitejs/plugin-vue": "^4.5.2", "@vue/compiler-sfc": "^3.3.4", "consola": "^3.2.3", diff --git a/src/main.js b/src/main.js index 0dc8a0f..46bef90 100644 --- a/src/main.js +++ b/src/main.js @@ -6,6 +6,33 @@ import { dayjs } from 'element-plus' import 'dayjs/locale/zh-cn' import '@/assets/styles/index.scss' // global css +// Vuetify +import 'vuetify/styles' +import { createVuetify } from 'vuetify' +import * as components from 'vuetify/components' +import * as directives from 'vuetify/directives' +import '@mdi/font/css/materialdesignicons.css' +import { aliases, mdi } from 'vuetify/iconsets/mdi' +import theme from './vuetify-theme.json' +const myTheme = theme +console.log(myTheme) +const vuetify = createVuetify({ + theme: { + defaultTheme: 'myTheme', + themes: { myTheme } + }, + icons: { + defaultSet: 'mdi', + aliases, + sets: { + mdi + } + }, + ssr: true, + components, + directives +}) + import App from './App' import router from './router' import directive from './directive' // directive @@ -78,4 +105,4 @@ app.component('MyTable', MyTable) directive(app) vxetb(app) -app.use(pinia).use(router).use(plugins).use(ElementPlus, {}).use(elementIcons).use(vueI18n).mount('#app') +app.use(pinia).use(router).use(plugins).use(ElementPlus, {}).use(elementIcons).use(vueI18n).use(vuetify).mount('#app') diff --git a/src/router/index.js b/src/router/index.js index 3e10920..1215aed 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -64,6 +64,13 @@ export const constantRoutes = [ component: () => import('@/views/error/Error'), hidden: true }, + // 触摸屏 + { + path: '/productManagement/touchScreen', + component: () => import('@/views/touchScreen/main/index'), + hidden: true + }, + { path: '', component: Layout, diff --git a/src/views/touchScreen/components/kbTime.vue b/src/views/touchScreen/components/kbTime.vue new file mode 100644 index 0000000..be30c59 --- /dev/null +++ b/src/views/touchScreen/components/kbTime.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/views/touchScreen/components/scanInput.vue b/src/views/touchScreen/components/scanInput.vue new file mode 100644 index 0000000..bd9306e --- /dev/null +++ b/src/views/touchScreen/components/scanInput.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/views/touchScreen/main/index.vue b/src/views/touchScreen/main/index.vue new file mode 100644 index 0000000..22e80fb --- /dev/null +++ b/src/views/touchScreen/main/index.vue @@ -0,0 +1,146 @@ + + + + + \ No newline at end of file diff --git a/src/views/touchScreen/report/index.vue b/src/views/touchScreen/report/index.vue index 318d9d7..8ab71f7 100644 --- a/src/views/touchScreen/report/index.vue +++ b/src/views/touchScreen/report/index.vue @@ -1,44 +1,177 @@ \ No newline at end of file diff --git a/src/vuetify-theme.json b/src/vuetify-theme.json new file mode 100644 index 0000000..d8c6465 --- /dev/null +++ b/src/vuetify-theme.json @@ -0,0 +1,37 @@ +{ + "dark": false, + "colors": { + "background": "#3F51B5", + "surface": "#303F9F", + "surface-bright": "#3D5AFE", + "surface-light": "#5C6BC0", + "surface-variant": "#303F9F", + "on-surface-variant": "#E8EAF6", + "primary": "#3F51B5", + "primary-darken-1": "#303F9F", + "secondary": "#E8EAF6", + "secondary-darken-1": "#B39DDB", + "error": "#D32F2F", + "info": "#2196F3", + "success": "#4CAF50", + "warning": "#FFC107" + }, + "variables": { + "border-color": "#000000", + "border-opacity": 0.12, + "high-emphasis-opacity": 0.87, + "medium-emphasis-opacity": 0.6, + "disabled-opacity": 0.38, + "idle-opacity": 0.04, + "hover-opacity": 0.04, + "focus-opacity": 0.12, + "selected-opacity": 0.08, + "activated-opacity": 0.12, + "pressed-opacity": 0.12, + "dragged-opacity": 0.08, + "theme-kbd": "#212529", + "theme-on-kbd": "#FFFFFF", + "theme-code": "#1A237E", + "theme-on-code": "#FFFFFF" + } +} \ No newline at end of file