chenyc
2022-08-26 94f16f6a5770c10fce8267e9e851dfc35d8dfbc2
新增读卡器功能
4个文件已修改
1个文件已删除
87 ■■■■ 已修改文件
electron/main/index.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/samples/sockteStomp.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/meun.ts 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/sockteInfo.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
electron/main/index.ts
@@ -37,7 +37,7 @@
  win = new BrowserWindow({
    title: 'Main window',
    fullscreen: true,
    autoHideMenuBar:true,
    // autoHideMenuBar:true,
    webPreferences: {
      preload: splash,
      nodeIntegration: true,
src/samples/sockteStomp.ts
@@ -30,9 +30,11 @@
            return de.deviceName===resultInfo.deviceNumber
        })
        console.log(deviceInfo,'更具设备number查找到的设备')
        console.log(resultInfo)
        if(deviceInfo!==undefined){
            switch(deviceInfo.deviceType){
                case '读卡器':
                    console.log('读卡器收到消息')
                    sockteStore().setdkqSockte(
                        {
                            deviceName:resultInfo.deviceNumber,
src/stores/meun.ts
File was deleted
src/stores/sockteInfo.ts
@@ -77,8 +77,8 @@
        xyjSockte.value.state=state
    }
      /**
     * 更新血压计结果
     * @param info 体重结果
     * 更新读卡器结果
     * @param info 读卡器结果
     */
    function setdkqSockte(info:info){
        dkqSockte.value.deviceName=info.deviceName
src/views/home/index.vue
@@ -34,6 +34,9 @@
        const xyjInfo = computed(() => {
            return sockte.xyjSockte
        })
        const dkqInfo = computed(() => {
            return sockte.dkqSockte
        })
        const patientInfo = computed(() => {
            return patientInfoStore().patientInfo
        })
@@ -193,6 +196,17 @@
                }
            }
        )
        watch(
            () => dkqInfo.value.resultTime,
            () => {
              console.log(dkqInfo.value,'读卡器')
                if (dkqInfo.value.result !== ''&&dkqInfo.value.result !== undefined) {
                  const code=dkqInfo.value.result.split(",")[0]
                  console.log('获取读卡器的code',code)
                  sendPationCode(code)
                }
            }
        )
        watch(() => viewNumber,
            () => {
                state.clockNum = viewNumber.value
@@ -252,7 +266,6 @@
              class="inputCode"
              @change="inputChabge"
              placeholder="请输入患者卡号或扫描条码"
              :prefix-icon="Search"
            />
        <span class="text_1">自助签到</span> <span class="text_2">{{clockNum}}</span>
      </div>