From 46a7bbc98a7f061ef9e70a29f50cc1b2bc99178f Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Thu, 23 Jan 2025 10:41:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Didcard=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=8F=8A=E5=AF=86=E7=A0=81=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=BD=AF=E9=94=AE?= =?UTF-8?q?=E7=9B=989=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 5 ----- src/components/SimpleKeyboard.vue | 12 ++++++++++-- src/pages/Index/Index.vue | 14 ++++++++++---- src/pages/Index/components/Consumables/Warn/InitWarn.vue | 11 ++++++----- src/pages/Index/components/Setting/EnterPinModal.vue | 11 +++++++++-- src/pages/Index/components/Setting/UpdatePinModal.vue | 10 +++++++++- 6 files changed, 44 insertions(+), 19 deletions(-) diff --git a/components.d.ts b/components.d.ts index ec94045..d3cedde 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,14 +9,12 @@ declare module 'vue' { export interface GlobalComponents { Confirm: typeof import('./src/components/Confirm.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] - ElCol: typeof import('element-plus/es')['ElCol'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElFooter: typeof import('element-plus/es')['ElFooter'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElRow: typeof import('element-plus/es')['ElRow'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ErrorModal: typeof import('./src/components/dialogs/ErrorModal.vue')['default'] @@ -26,7 +24,4 @@ declare module 'vue' { SimpleKeyboard: typeof import('./src/components/SimpleKeyboard.vue')['default'] StackInfoModal: typeof import('./src/components/dialogs/StackInfoModal.vue')['default'] } - export interface ComponentCustomProperties { - vLoading: typeof import('element-plus/es')['ElLoadingDirective'] - } } diff --git a/src/components/SimpleKeyboard.vue b/src/components/SimpleKeyboard.vue index f088c43..9400a2d 100644 --- a/src/components/SimpleKeyboard.vue +++ b/src/components/SimpleKeyboard.vue @@ -20,15 +20,23 @@ export default { type: Function, default: () => { }, }, + layout: Object }, data: () => ({ keyboard: null, }), mounted() { - this.keyboard = new Keyboard(this.keyboardClass, { + let keyParams = { onChange: this.onChange, onKeyPress: this.onKeyPress, - }) + layout: this.layout, + } + if(this.layout){ + keyParams.display = { + '{bksp}': "回退" // 设置删除键的显示字符 + } + } + this.keyboard = new Keyboard(this.keyboardClass, keyParams) }, methods: { onChange(input) { diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index 239ece8..dfc3175 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -467,10 +467,15 @@ const handleAppEvent = (data: AppEventMessage['data']) => { consumableStore.setIdCardInfo(projectInfo) //显示部分id卡信息。 项目名称,过期时间,批次号 idCardInserted.value = true - idCardMessage.value = `
-
项目名称:${projectInfo.projName}, 批次号:${projectInfo.lotId}, 过期时间:${formatDate(projectInfo.expiryDate)}
-
id卡已插入,是否确保?
-
` + idCardMessage.value = ` +
+
+
项目名称:
${projectInfo.projName}
+
批次号:
${projectInfo.lotId}
+
过期时间:
${formatDate(projectInfo.expiryDate)}
+
+
id卡已插入,是否保存?
+

` } else if (data.typeName === 'AppIDCardUnmountEvent') { consumableStore.setIdCardInserted(false) consumableStore.setIdCardInfo(null) @@ -1116,6 +1121,7 @@ watch( .pd-5{ padding: 0 5px; + font-size: 25px; } .loading-overlay { diff --git a/src/pages/Index/components/Consumables/Warn/InitWarn.vue b/src/pages/Index/components/Consumables/Warn/InitWarn.vue index 9f49afd..188c371 100644 --- a/src/pages/Index/components/Consumables/Warn/InitWarn.vue +++ b/src/pages/Index/components/Consumables/Warn/InitWarn.vue @@ -12,9 +12,9 @@ - @@ -47,7 +47,14 @@ const confirmPin = () => { const keyboardVisible = ref(false) const currentInputValue = ref('') const currentInputField = ref<'sampleBarcode' | 'userid' | ''>('') - +const keyLayout = ref({ + default: [ + "1 2 3", + "4 5 6", + "7 8 9", + "0 {bksp}" + ] +}) // 隐藏键盘 const hideKeyboard = () => { keyboardVisible.value = false diff --git a/src/pages/Index/components/Setting/UpdatePinModal.vue b/src/pages/Index/components/Setting/UpdatePinModal.vue index 64ad2bd..642d8b5 100644 --- a/src/pages/Index/components/Setting/UpdatePinModal.vue +++ b/src/pages/Index/components/Setting/UpdatePinModal.vue @@ -72,6 +72,7 @@
@@ -98,7 +99,14 @@ const showConfirmPassword = ref(false) const oldpasswd = ref('') const password = ref('') const confirmPassword = ref('') - +const keyLayout = ref({ + default: [ + "1 2 3", + "4 5 6", + "7 8 9", + "0 {bksp}" + ] +}) const confirmPin = () => { if (!oldpasswd.value) { eMessage.error('请输入旧密码')