Browse Source

fix: 初始化后检测ID卡;登录去除版本信息

master
guoapeng 3 days ago
parent
commit
af2e6367d7
  1. 20
      src/pages/Index/Index.vue
  2. 2
      src/pages/Login/index.vue
  3. 12
      src/services/Index/init.ts

20
src/pages/Index/Index.vue

@ -433,7 +433,7 @@ import {
getBloodTypes,
confirmPromptInfo,
openBuzzer,
disableDevice, getSystemSettings
disableDevice, getSystemSettings, getIdCardInfo
} from '../../services/index'
import {
@ -1144,6 +1144,24 @@ const handleConfirm = async () => {
async function startInit() {
await initDevice()
await pollingInitState()
// ID
const res = await getIdCardInfo()
if (!res) {
return
}
consumableStore.setIdCardInserted(true)
consumableStore.setIdCardInfo(res)
//id
idCardInserted.value = true
//v-html
idCardMessage.value = `
<div style='line-height:0.5;margin-top: -90px;'>
<div style='margin-left:25%'>
<div style='display:flex'><div>项目名称</div><div>${res.projName}</div></div>
<div style='display:flex'><div>批次号</div><div>${res.lotId}</div></div>
<div style='display:flex'><div>过期时间</div><div>${formatDate(res.expiryDate)}</div></div>
</div>
</div>`
}
const pollingInitState = async () => {

2
src/pages/Login/index.vue

@ -146,7 +146,7 @@ const version = __APP_VERSION__
</div>
</div>
</transition>
<div class="version">版本号v {{version}}</div>
<!-- <div class="version">版本号v {{version}}</div>-->
</div>
</template>

12
src/services/Index/init.ts

@ -22,6 +22,18 @@ export const getInitState = async () => {
}
}
//获取挂载ID卡信息
export const getIdCardInfo = async () => {
try {
const res = await apiClient.post(
'/api/v1/app/a8kProjectCard/readMountedCardInfo',
)
return res.data
} catch (error) {
console.log('获取初始化状态接口出错', error)
}
}
export const confirmPromptInfo = async (eventId: string) => {
try {
console.log('confirmPromoptInfo=========',eventId)

Loading…
Cancel
Save