package.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pnpm-lock.yaml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/Barcode/index.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/Barcode/src/Barcode.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/store/modules/checkType.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ecg/doctor/components/DevInstallPanel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/ecg/doctor/components/DevReadyPanel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
package.json
@@ -72,7 +72,8 @@ "web-storage-cache": "^1.1.1", "xml-js": "^1.6.11", "vue3-scroll-seamless": "^1.0.6", "vue-plugin-hiprint": "^0.0.18" "vue-plugin-hiprint": "^0.0.18", "jsbarcode": "^3.11.6" }, "devDependencies": { "@commitlint/cli": "^19.0.1", pnpm-lock.yaml
@@ -80,6 +80,9 @@ highlight.js: specifier: ^11.9.0 version: 11.9.0 jsbarcode: specifier: ^3.11.6 version: 3.11.6 jsencrypt: specifier: ^3.3.2 version: 3.3.2 @@ -6578,6 +6581,10 @@ argparse: 2.0.1 dev: true /jsbarcode@3.11.6: resolution: {integrity: sha512-G5TKGyKY1zJo0ZQKFM1IIMfy0nF2rs92BLlCz+cU4/TazIc4ZH+X1GYeDRt7TKjrYqmPfTjwTBkU/QnQlsYiuA==} dev: false /jsencrypt@3.3.2: resolution: {integrity: sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==} dev: false src/components/Barcode/index.ts
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,3 @@ import Barcode from './src/Barcode.vue' export { Barcode } src/components/Barcode/src/Barcode.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,43 @@ <template> <div> <svg class="barcode" /> </div> </template> <script lang="ts" setup> import { ref, onMounted, nextTick } from 'vue' import JsBarcode from 'jsbarcode' defineOptions({ name: 'Barcode' }) const props = defineProps({ // æ°æ® // å½åçå¼ value: String }); onMounted(() => { nextTick(() => { JsBarcode('.barcode', String(props.value), { format: "CODE39",//éæ©è¦ä½¿ç¨çæ¡å½¢ç ç±»å width:1,//设置æ¡ä¹é´ç宽度 height:40,//é«åº¦ displayValue:true,//æ¯å¦å¨æ¡å½¢ç 䏿¹æ¾ç¤ºæå // text:"456",//è¦çæ¾ç¤ºçææ¬ // fontOptions:"bold italic",//使æåå ç²ä½æåæä½ // font:"fantasy",//è®¾ç½®ææ¬çåä½ // textAlign:"left",//è®¾ç½®ææ¬çæ°´å¹³å¯¹é½æ¹å¼ // textPosition:"top",//è®¾ç½®ææ¬çåç´ä½ç½® // textMargin:5,//设置æ¡å½¢ç åææ¬ä¹é´çé´è· fontSize:15,//è®¾ç½®ææ¬çå¤§å° // background:"#eee",//设置æ¡å½¢ç çèæ¯ // lineColor:"#2196f3",//设置æ¡åææ¬çé¢è²ã margin:15//设置æ¡å½¢ç å¨å´ç空ç½è¾¹è· }); }) }) </script> <style lang="scss" scoped> </style> src/store/modules/checkType.ts
@@ -8,15 +8,16 @@ export interface CheckTypeSimpleVO { value: number name: string displayBarcode: number } export interface CheckTypeState { checkTypeMap: Map<number, string> checkTypeMap: Map<number, CheckTypeSimpleVO> isSetCheckType: boolean } export const useCheckTypeStore = defineStore('checktype ', { state: (): CheckTypeState => ({ checkTypeMap: new Map<number, string>(), checkTypeMap: new Map<number, CheckTypeSimpleVO>(), isSetCheckType: false }), getters: { @@ -40,12 +41,12 @@ } else { const res = await CheckTypeApi.getSimpleCheckTypeList() // è®¾ç½®æ°æ® const checkTypeMap = new Map<number, string>() const checkTypeMap = new Map<number, CheckTypeSimpleVO>() res.forEach((simpleVO: CheckTypeSimpleVO) => { // è·å¾ dictType å±çº§ const enumValueObj = checkTypeMap[simpleVO.value] if (!enumValueObj) { checkTypeMap[simpleVO.value] = simpleVO.name checkTypeMap[simpleVO.value] = simpleVO } }) this.checkTypeMap = checkTypeMap @@ -57,7 +58,7 @@ if (!this.isSetCheckType) { this.setCheckTypeMap() } return this.checkTypeMap[type] return this.checkTypeMap[type].name }, getCheckTypeOptions() { if (!this.isSetCheckType) { @@ -66,20 +67,26 @@ return Object.keys(this.checkTypeMap).map((key) => { return { value: parseInt(key, 10), label: this.checkTypeMap[key] label: this.checkTypeMap[key].name } }); }, getCheckTypeDispBarCode(type: number) { if (!this.isSetCheckType) { this.setCheckTypeMap() } return this.checkTypeMap[type].displayBarcode }, async resetCheckTypeInfo() { wsCache.delete(CACHE_KEY.CHECKTYPE_CACHE) const res = await CheckTypeApi.getSimpleCheckTypeList() // è®¾ç½®æ°æ® const checkTypeMap = new Map<number, string>() const checkTypeMap = new Map<number, CheckTypeSimpleVO>() res.forEach((simpleVO: CheckTypeSimpleVO) => { // è·å¾ dictType å±çº§ const enumValueObj = checkTypeMap[simpleVO.value] if (!enumValueObj) { checkTypeMap[simpleVO.value] = simpleVO.name checkTypeMap[simpleVO.value] = simpleVO } }) this.checkTypeMap = checkTypeMap src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -10,7 +10,8 @@ <el-col :span="12"> <el-form-item label="æ£è ç¼å·" prop="patId"> <el-input v-model="formData.patId" placeholder="请è¾å ¥æ£è ç¼å·" @input="getRentInfoByPatId" /> <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 /> <!-- <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" width=100 />--> <Barcode v-if="!isStringEmpty(formData.patId) && 1 === checkTypeStore.getCheckTypeDispBarCode(formData.checkType)" :value="formData.patId" :width=100 /> </el-form-item> <el-form-item label="æ£è åç§°" prop="patName"> <el-input v-model="formData.patName" placeholder="请è¾å ¥æ£è åç§°" /> @@ -119,6 +120,8 @@ import {DeviceApi} from "@/api/ecg/devmanage"; import {QueueVO} from "@/api/ecg/queue"; import {RoomBedVO} from "@/api/ecg/doctor"; import {Barcode} from "@/components/Barcode"; import {useCheckTypeStore} from "@/store/modules/checkType"; /** 设å¤è£ æº è¡¨å */ defineComponent({ name: 'DevInstallPanel' }) @@ -132,6 +135,8 @@ const emit = defineEmits(['event_dev_install']) // å®ä¹ success äºä»¶ï¼ç¨äºæä½æååçåè° const checkTypeStore = useCheckTypeStore() const setPatient = (queueVO: QueueVO | undefined) => { resetForm() formData.value.patId = queueVO?.patId src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -12,7 +12,7 @@ > <el-form-item label="æ£è ç¼å·" prop="patId"> <el-input v-model="formData.patId" placeholder="请è¾å ¥æ£è ç¼å·" @input="getRentInfoByPatId" /> <Qrcode v-if="formData.patId !== undefined && formData.patId !== ''" :text="formData.patId" logo="/logo.gif" :width=100 /> <Barcode v-if="!isStringEmpty(formData.patId) && 1 === checkTypeStore.getCheckTypeDispBarCode(formData.checkType)" :value="formData.patId" :width=100 /> </el-form-item> <el-form-item label="æ£è åç§°" prop="patName"> <el-input v-model="formData.patName" placeholder="请è¾å ¥æ£è åç§°" /> @@ -126,6 +126,7 @@ <script setup lang="ts"> import {defineComponent, PropType} from "vue"; import {Barcode} from "@/components/Barcode"; import { DevRentApi, DevRentVO } from '@/api/ecg/devrent' import {QueueVO} from "@/api/ecg/queue"; import {isStringEmpty} from "@/utils/stringUtil"; @@ -136,8 +137,7 @@ import {RoomBedVO} from "@/api/ecg/doctor"; import {hiprint} from "vue-plugin-hiprint"; import {AppointmentApi, AppointmentVO} from "@/api/ecg/appointment"; import { useCheckTypeStoreWithOut } from '@/store/modules/checkType' import {PrefixInteger} from "@/utils/formatter"; import {useCheckTypeStore} from '@/store/modules/checkType' import {calGender, getBookBeginTime} from "@/utils"; /** 设å¤é¢ç¨ 表å */ @@ -161,7 +161,7 @@ const autoPrint = ref<boolean>(true); const checkTypeStore = useCheckTypeStoreWithOut() const checkTypeStore = useCheckTypeStore() const formData = ref<DevRentVO>({ id: undefined,