diff --git a/App.vue b/App.vue index f034845..8a1e5ae 100644 --- a/App.vue +++ b/App.vue @@ -4,7 +4,7 @@ import { onLaunch, onShow, onError } from '@dcloudio/uni-app' import { NxInit } from './nx' import $store from '@/nx/store' // #ifdef APP-PLUS -import * as chainway from '@/uni_modules/zzjc-chainway-p100' +import * as urovo from '@/uni_modules/zzjc-urovo' // #endif onLaunch(async () => { // 加载nx底层依赖 @@ -15,9 +15,8 @@ onLaunch(async () => { if (brand === 'chainway') { plus.screen.lockOrientation('landscape') } - - chainway.scanRegister(data => { - console.log('扫码结果:' + data) + urovo.scanRegister(data => { + console.log('优博讯扫码结果:' + data) $store('biz').scanQRInfo = data }) // #endif diff --git a/components/n-verify/n-verify.vue b/components/n-verify/n-verify.vue index c01a44b..0aa73b2 100644 --- a/components/n-verify/n-verify.vue +++ b/components/n-verify/n-verify.vue @@ -363,7 +363,10 @@ defineExpose({ diff --git a/pages/analysis/sample/sample-work-detail.vue b/pages/analysis/sample/sample-work-detail.vue index b44a054..267188a 100644 --- a/pages/analysis/sample/sample-work-detail.vue +++ b/pages/analysis/sample/sample-work-detail.vue @@ -84,13 +84,25 @@ > - + + + + - + {{ currentAuncel.code }} 杯号:{{ currentCupNum }} @@ -123,7 +135,7 @@ 确认采集 - + @@ -354,7 +366,7 @@ const parameterClassifyChange = v => { const fieldClick = (field, key) => { if (!field.isEdit) return - if (field.fillingWay === 'input') { + if (currentFillingWay.value === 'input') { inputValue.value = field.value } selectedField.value = field @@ -366,13 +378,26 @@ const fieldClick = (field, key) => { let decimalPosition = field.decimalPosition if (decimalPosition == null || decimalPosition < -1) decimalPosition = -1 numKeyboardParam.decimal = decimalPosition - if (field.fillingWay == 'collect') { + if (currentFillingWay.value == 'collect') { listenDeviceData() } else { closeDeviceListener() } } - +const currentFillingIndex = ref(0) +const fillingWay = computed(() => { + if (selectedField.value.fillingWay) { + return selectedField.value.fillingWay.split(',') + } else { + return [] + } +}) +const currentFillingWay = computed(() => { + return fillingWay.value[currentFillingIndex.value] || '' +}) +const switchFillingWay = () => { + currentFillingIndex.value = (currentFillingIndex.value + 1) % fillingWay.value.length +} //自动切换到下一个字段 const autoNextField = () => { let groupIndex = 0 @@ -1053,9 +1078,13 @@ const listenNumKeyboard = () => { return } //自动补全小数位数 - const decimalPosition = selectedField.value.decimalPosition || 0 + const decimalPosition = selectedField.value.decimalPosition let val = res.val - selectedField.value.value = handleRoundFiveNumber(val, decimalPosition) + if (decimalPosition == null) { + selectedField.value.value = val + } else { + selectedField.value.value = handleRoundFiveNumber(val, decimalPosition) + } calcAnalysisValue(fieldGroup.value) //自动跳转下一个字段 setTimeout(() => { @@ -1098,7 +1127,8 @@ const releaseDeviceControl = deviceId => { data: { deviceId: deviceId, isControl: false, - controlRealName: userInfo.value.nickname + controlRealName: userInfo.value.nickname, + controlUserId: userInfo.value.id } } //发送控制数据 @@ -1304,8 +1334,8 @@ onBackPress(() => { position: relative; .code { position: absolute; - top: 10px; - left: 50px; + top: 15px; + left: 55px; } } @@ -1375,6 +1405,7 @@ onBackPress(() => { .field-name { font-size: 26px; padding: 8px; + width: 100%; } .my-collapse { @@ -1401,6 +1432,7 @@ onBackPress(() => { } .field-name { font-size: 16px; + width: 100%; } } diff --git a/pages/index/index.vue b/pages/index/index.vue index b34f532..ab3b480 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -14,11 +14,13 @@ import nx from '@/nx' import { useGridCol } from '@/nx/hooks/useGridCol' let list = reactive([ { url: '/pages/lims/index/index', name: '设备管理', icon: 'device' }, - { url: '/pages/analysis/index/index', name: '分析管理', icon: 'analyse' } + { url: '/pages/analysis/index/index', name: '分析管理', icon: 'analyse' }, + { url: '/pages/sampleWarehouse/index/index', name: '样品库管理', icon: 'sampleWarehouse' } ]) // const sysMenus = computed(() => nx.$store('user').sysMenus) function goSystem(url) { + uni.setStorageSync('defaultModule', url) uni.reLaunch({ url }) } diff --git a/pages/index/me-popup.vue b/pages/index/me-popup.vue index be78526..b3be615 100644 --- a/pages/index/me-popup.vue +++ b/pages/index/me-popup.vue @@ -9,6 +9,7 @@ + diff --git a/pages/lims/index/index.vue b/pages/lims/index/index.vue index d20816f..debbac2 100644 --- a/pages/lims/index/index.vue +++ b/pages/lims/index/index.vue @@ -1,7 +1,12 @@