Browse Source

身份信息页面添加HIS身份信息

lighter 3 years ago
parent
commit
2b4f8d7707
2 changed files with 23 additions and 1 deletions
  1. 23 0
      src/components/inpatient/IdentifyImage.vue
  2. 0 1
      src/data/inpatient.js

+ 23 - 0
src/components/inpatient/IdentifyImage.vue

@@ -4,6 +4,13 @@
     <el-button type="primary" icon="el-icon-refresh" @click="resetIdCard" circle title="还原"></el-button>
     <el-button type="danger" icon="el-icon-close" @click="closeIdCard" circle title="关闭"></el-button>
   </div>
+  <div class="his-info-box">
+    <span>HIS信息</span>
+    <span>姓名:{{ patient.name }}</span>
+    <span>性别:{{ patient.sex === 1 ? '男' : '女' }}</span>
+    <span>出生日期:{{ patient.birthDate }}</span>
+    <span>身份证:{{ patient.socialNo }}</span>
+  </div>
   <img id="idCardImg" :style="idCardImgStyle" :src="identifyImageFile" />
 </template>
 
@@ -27,6 +34,7 @@ export default {
   },
   emits: ['close'],
   setup(props, ctx) {
+    const patient = ref({})
     const identifyImageFile = ref('')
     const idCardImgStyle = ref({
       width: '856px',
@@ -54,6 +62,8 @@ export default {
     }
     const checkIdInfo = () => {
       getIdCardInfo(props.patNo, props.times).then((res) => {
+        console.log(res)
+        patient.value = res.patient
         if (res.idCard.length > 0) {
           identifyImageFile.value = 'data:image/png;base64,' + res.idCard[0].fileSfz
         } else {
@@ -74,6 +84,7 @@ export default {
       checkIdInfo()
     })
     return {
+      patient,
       identifyImageFile,
       idCardImgStyle,
       zoomInIdCard,
@@ -87,4 +98,16 @@ export default {
 <style scoped>
 .affix-container {
 }
+.his-info-box {
+  margin-top: -20px;
+  margin-bottom: 20px;
+  font-size: 15px;
+}
+.his-info-box > span {
+  font-weight: bold;
+  padding: 8px 12px;
+  background: gray;
+  color: white;
+  border-right: 1px solid white;
+}
 </style>

+ 0 - 1
src/data/inpatient.js

@@ -8,7 +8,6 @@ export function baseinfo() {
 }
 
 export function setBaseinfo(val) {
-  console.log(val)
   store.commit('ptnt/setInjuryMode', val.medType === '42')
   info.value = val
 }