Browse Source

Merge branch 'fixbug/style_0123' into release/version1.0

release/version1.0
LiLongLong 6 months ago
parent
commit
14588fb442
  1. 5
      components.d.ts
  2. 12
      src/components/SimpleKeyboard.vue
  3. 14
      src/pages/Index/Index.vue
  4. 11
      src/pages/Index/components/Consumables/Warn/InitWarn.vue
  5. 11
      src/pages/Index/components/Setting/EnterPinModal.vue
  6. 10
      src/pages/Index/components/Setting/UpdatePinModal.vue

5
components.d.ts

@ -9,14 +9,12 @@ declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
Confirm: typeof import('./src/components/Confirm.vue')['default'] Confirm: typeof import('./src/components/Confirm.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCol: typeof import('element-plus/es')['ElCol']
ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElFooter: typeof import('element-plus/es')['ElFooter'] ElFooter: typeof import('element-plus/es')['ElFooter']
ElHeader: typeof import('element-plus/es')['ElHeader'] ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElRow: typeof import('element-plus/es')['ElRow']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ErrorModal: typeof import('./src/components/dialogs/ErrorModal.vue')['default'] ErrorModal: typeof import('./src/components/dialogs/ErrorModal.vue')['default']
@ -26,7 +24,4 @@ declare module 'vue' {
SimpleKeyboard: typeof import('./src/components/SimpleKeyboard.vue')['default'] SimpleKeyboard: typeof import('./src/components/SimpleKeyboard.vue')['default']
StackInfoModal: typeof import('./src/components/dialogs/StackInfoModal.vue')['default'] StackInfoModal: typeof import('./src/components/dialogs/StackInfoModal.vue')['default']
} }
export interface ComponentCustomProperties {
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
}
} }

12
src/components/SimpleKeyboard.vue

@ -20,15 +20,23 @@ export default {
type: Function, type: Function,
default: () => { }, default: () => { },
}, },
layout: Object
}, },
data: () => ({ data: () => ({
keyboard: null, keyboard: null,
}), }),
mounted() { mounted() {
this.keyboard = new Keyboard(this.keyboardClass, {
let keyParams = {
onChange: this.onChange, onChange: this.onChange,
onKeyPress: this.onKeyPress, onKeyPress: this.onKeyPress,
})
layout: this.layout,
}
if(this.layout){
keyParams.display = {
'{bksp}': "回退" //
}
}
this.keyboard = new Keyboard(this.keyboardClass, keyParams)
}, },
methods: { methods: {
onChange(input) { onChange(input) {

14
src/pages/Index/Index.vue

@ -467,10 +467,15 @@ const handleAppEvent = (data: AppEventMessage['data']) => {
consumableStore.setIdCardInfo(projectInfo) consumableStore.setIdCardInfo(projectInfo)
//id //id
idCardInserted.value = true idCardInserted.value = true
idCardMessage.value = `<div>
<div>项目名称${projectInfo.projName}, 批次号${projectInfo.lotId}, 过期时间${formatDate(projectInfo.expiryDate)}</div>
<div>id卡已插入是否确保</div>
</div>`
idCardMessage.value = `
<div style='line-height:0.5;margin-top: -90px;'>
<div style='margin-left:25%'>
<div style='display:flex'><div>项目名称</div><div>${projectInfo.projName}</div></div>
<div style='display:flex'><div>批次号</div><div>${projectInfo.lotId}</div></div>
<div style='display:flex'><div>过期时间</div><div>${formatDate(projectInfo.expiryDate)}</div></div>
</div>
<div style='font-weight: 700;font-size: 1.75rem'>id卡已插入是否保存</div>
</div><br/>`
} else if (data.typeName === 'AppIDCardUnmountEvent') { } else if (data.typeName === 'AppIDCardUnmountEvent') {
consumableStore.setIdCardInserted(false) consumableStore.setIdCardInserted(false)
consumableStore.setIdCardInfo(null) consumableStore.setIdCardInfo(null)
@ -1116,6 +1121,7 @@ watch(
.pd-5{ .pd-5{
padding: 0 5px; padding: 0 5px;
font-size: 25px;
} }
.loading-overlay { .loading-overlay {

11
src/pages/Index/components/Consumables/Warn/InitWarn.vue

@ -12,9 +12,9 @@
<!-- 错误提示信息 --> <!-- 错误提示信息 -->
<p v-if="errorTip" class="modal-error">{{ errorTip }}</p> <p v-if="errorTip" class="modal-error">{{ errorTip }}</p>
</div> </div>
<div class="modal-buttons" style="float:right">
<el-button style="width:100px;" v-if="cancelText" @click="onCancel" class="cancel-btn">{{ cancelText }}</el-button>
<el-button style="width:auto;" type="primary" @click="onConfirm" class="confirm-btn">
<div class="modal-buttons">
<el-button v-if="cancelText" @click="onCancel" class="cancel-btn">{{ cancelText }}</el-button>
<el-button type="primary" @click="onConfirm" class="confirm-btn">
{{ confirmText }} {{ confirmText }}
</el-button> </el-button>
</div> </div>
@ -163,7 +163,8 @@ const onConfirm = () => {
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
border: none; border: none;
height: 50px;
height: 5rem;
width:200px;
transition: transition:
background-color 0.3s ease, background-color 0.3s ease,
color 0.3s ease; // color 0.3s ease; //
@ -172,7 +173,7 @@ const onConfirm = () => {
.cancel-btn { .cancel-btn {
background-color: #ddd; background-color: #ddd;
color: #333; color: #333;
width:200px;
&:hover { &:hover {
background-color: #bbb; // background-color: #bbb; //
} }

11
src/pages/Index/components/Setting/EnterPinModal.vue

@ -20,7 +20,7 @@
<!-- 键盘 --> <!-- 键盘 -->
<transition name="slide-up"> <transition name="slide-up">
<div class="keyboard" v-if="keyboardVisible"> <div class="keyboard" v-if="keyboardVisible">
<SimpleKeyboard :input="currentInputValue" @onChange="handleKeyboardInput" @onKeyPress="handleKeyPress" />
<SimpleKeyboard :layout="keyLayout" :input="currentInputValue" @onChange="handleKeyboardInput" @onKeyPress="handleKeyPress" />
</div> </div>
</transition> </transition>
</div> </div>
@ -47,7 +47,14 @@ const confirmPin = () => {
const keyboardVisible = ref(false) const keyboardVisible = ref(false)
const currentInputValue = ref('') const currentInputValue = ref('')
const currentInputField = ref<'sampleBarcode' | 'userid' | ''>('') const currentInputField = ref<'sampleBarcode' | 'userid' | ''>('')
const keyLayout = ref({
default: [
"1 2 3",
"4 5 6",
"7 8 9",
"0 {bksp}"
]
})
// //
const hideKeyboard = () => { const hideKeyboard = () => {
keyboardVisible.value = false keyboardVisible.value = false

10
src/pages/Index/components/Setting/UpdatePinModal.vue

@ -72,6 +72,7 @@
<div class="keyboard" v-if="keyboardVisible"> <div class="keyboard" v-if="keyboardVisible">
<SimpleKeyboard <SimpleKeyboard
:input="currentInputValue" :input="currentInputValue"
:layout="keyLayout"
@onChange="handleKeyboardInput" @onChange="handleKeyboardInput"
@onKeyPress="handleKeyPress" @onKeyPress="handleKeyPress"
/> />
@ -98,7 +99,14 @@ const showConfirmPassword = ref(false)
const oldpasswd = ref('') const oldpasswd = ref('')
const password = ref('') const password = ref('')
const confirmPassword = ref('') const confirmPassword = ref('')
const keyLayout = ref({
default: [
"1 2 3",
"4 5 6",
"7 8 9",
"0 {bksp}"
]
})
const confirmPin = () => { const confirmPin = () => {
if (!oldpasswd.value) { if (!oldpasswd.value) {
eMessage.error('请输入旧密码') eMessage.error('请输入旧密码')

Loading…
Cancel
Save