Przeglądaj źródła

检验新增数量和没有上级医生就无法确认医嘱。

xiaochan 2 lat temu
rodzic
commit
30156936f5

+ 101 - 100
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -1,76 +1,76 @@
 <template>
-    <el-select v-model="currentWard"
-               :clearable="wardsClearable"
-               style="width: 150px"
-               @change="fetchOverviews">
-        <el-option v-for="item in allWards"
-                   :key="item.code"
-                   :label="item.name"
-                   :value="item.code"/>
-    </el-select>
-    <br>
-    <xc-checkbox v-model="myPatient" @change="myPatientChange" label="我的病人"/>
-    <el-table :data="cptOverviews"
-              :height="props.height"
-              @row-click="handleClickOverview"
-              ref="elTableRef"
-              :row-class-name="rowClass"
-              class="remove_hover"
-              @row-contextmenu="settingUpAThirdLevelDoctor">
-        <el-table-column label="床" prop="bedNo" width="30"/>
-        <el-table-column label="姓名" width="70" prop="name">
-            <template #default="{row}">
+  <el-select v-model="currentWard"
+             :clearable="wardsClearable"
+             style="width: 150px"
+             @change="fetchOverviews">
+    <el-option v-for="item in allWards"
+               :key="item.code"
+               :label="item.name"
+               :value="item.code"/>
+  </el-select>
+  <br>
+  <xc-checkbox v-model="myPatient" @change="myPatientChange" label="我的病人"/>
+  <el-table :data="cptOverviews"
+            :height="props.height"
+            @row-click="handleClickOverview"
+            ref="elTableRef"
+            :row-class-name="rowClass"
+            class="remove_hover"
+            @row-contextmenu="settingUpAThirdLevelDoctor">
+    <el-table-column label="床" prop="bedNo" width="30"/>
+    <el-table-column label="姓名" width="70" prop="name">
+      <template #default="{row}">
             <span>
               {{ row.name }}
             </span>
-                <span v-if="row.orderNoCount > 0" style="color: red">
+        <span v-if="row.orderNoCount > 0" style="color: red">
               {{ row.orderNoCount }}
           </span>
-            </template>
-        </el-table-column>
-        <el-table-column label="住院号" prop="inpatientNo" width="65">
-            <template #default="{row}">
-                <div :style="{color: row.dismissOrder ===1 ? 'red' : 'black'}">
-                    {{ row.inpatientNo }}
-                </div>
-            </template>
-        </el-table-column>
-        <el-table-column label="性别" prop="sex" width="65">
-            <template #default="scope">
-                {{ cptSex(scope.row.sex) }}
-            </template>
-        </el-table-column>
-    </el-table>
-
-    <xc-dialog-v2 v-model="thirdLevelDoctorSetting.dialog" width="450px" title="三级医生设置">
-        <el-form label-width="80px">
-            <el-form-item label="患者:">
-                {{ thirdLevelDoctorSetting.data.name }}
-            </el-form-item>
-            <el-form-item label="管床医生:">
-                <select-staff-code v-model="thirdLevelDoctorSetting.data"
-                                   :name="['referPhysician', 'referPhysicianName']"
-                                   dept-code/>
-            </el-form-item>
-            <el-form-item label="主治医生:">
-                <select-staff-code v-model="thirdLevelDoctorSetting.data"
-                                   :name="['consultPhysician', 'consultPhysicianName']"
-                                   dept-code/>
-            </el-form-item>
-            <el-form-item label="主任医生:">
-                <select-staff-code v-model="thirdLevelDoctorSetting.data"
-                                   :name="['deptDirector', 'deptDirectorName']" dept-code/>
-            </el-form-item>
-            <el-form-item label=" ">
-                <el-button @click="submitToTheThirdLevelDoctor">提交</el-button>
-            </el-form-item>
-        </el-form>
-    </xc-dialog-v2>
+      </template>
+    </el-table-column>
+    <el-table-column label="住院号" prop="inpatientNo" width="65">
+      <template #default="{row}">
+        <div :style="{color: row.dismissOrder ===1 ? 'red' : 'black'}">
+          {{ row.inpatientNo }}
+        </div>
+      </template>
+    </el-table-column>
+    <el-table-column label="性别" prop="sex" width="65">
+      <template #default="scope">
+        {{ cptSex(scope.row.sex) }}
+      </template>
+    </el-table-column>
+  </el-table>
+
+  <xc-dialog-v2 v-model="thirdLevelDoctorSetting.dialog" width="450px" title="三级医生设置">
+    <el-form label-width="80px">
+      <el-form-item label="患者:">
+        {{ thirdLevelDoctorSetting.data.name }}
+      </el-form-item>
+      <el-form-item label="管床医生:">
+        <select-staff-code v-model="thirdLevelDoctorSetting.data"
+                           :name="['referPhysician', 'referPhysicianName']"
+                           dept-code/>
+      </el-form-item>
+      <el-form-item label="主治医生:">
+        <select-staff-code v-model="thirdLevelDoctorSetting.data"
+                           :name="['consultPhysician', 'consultPhysicianName']"
+                           dept-code/>
+      </el-form-item>
+      <el-form-item label="主任医生:">
+        <select-staff-code v-model="thirdLevelDoctorSetting.data"
+                           :name="['deptDirector', 'deptDirectorName']" dept-code/>
+      </el-form-item>
+      <el-form-item label=" ">
+        <el-button @click="submitToTheThirdLevelDoctor">提交</el-button>
+      </el-form-item>
+    </el-form>
+  </xc-dialog-v2>
 </template>
 
 <script setup name='PatientList'>
 import {computed, onMounted, ref} from "vue";
-import {getOverView} from "@/api/inpatient/patient";
+import {getOverView, getPatientInfo} from "@/api/inpatient/patient";
 import {allWardsVisible} from "@/utils/permission";
 import XcCheckbox from "@/components/xiao-chan/checkbox/XcCheckbox";
 import {cptSex} from "@/utils/computed";
@@ -81,10 +81,10 @@ import SelectStaffCode from "@/components/SelectStaffCode.vue";
 import {getAllWards} from "@/api/zhu-yuan-yi-sheng/resident-doctor";
 
 const props = defineProps({
-    height: {
-        type: Number,
-        default: null
-    }
+  height: {
+    type: Number,
+    default: null
+  }
 })
 
 
@@ -95,64 +95,65 @@ const currentWard = ref()
 const overviews = ref([])
 
 const fetchOverviews = () => {
-    getOverView(currentWard.value).then((res) => {
-        overviews.value = res
-    })
+  getOverView(currentWard.value).then((res) => {
+    overviews.value = res
+  })
 }
 
 const cptOverviews = computed(() => {
-    return overviews.value
+  return overviews.value
 })
 
 const elTableRef = ref(null)
 const handleClickOverview = (row) => {
-    clickOnThePatient(row.inpatientNo)
+  clickOnThePatient(row.inpatientNo)
 }
 
 const myPatientChange = () => {
-    if (myPatient.value) {
-        getMyPatient().then((res) => {
-            overviews.value = res
-            currentWard.value = ''
-        });
-    } else {
-        currentWard.value = allWards.value[0].code
-        fetchOverviews()
-    }
+  if (myPatient.value) {
+    getMyPatient().then((res) => {
+      overviews.value = res
+      currentWard.value = ''
+    });
+  } else {
+    currentWard.value = allWards.value[0].code
+    fetchOverviews()
+  }
 };
 
 const rowClass = ({row}) => {
-    if (huanZheXinXi.value.inpatientNo === row.inpatientNo) {
-        return 'el_table__current'
-    }
+  if (huanZheXinXi.value.inpatientNo === row.inpatientNo) {
+    return 'el_table__current'
+  }
 }
 
 const thirdLevelDoctorSetting = $ref({
-    dialog: false,
-    data: {},
-    deptList: []
+  dialog: false,
+  data: {},
+  deptList: []
 })
 
 const settingUpAThirdLevelDoctor = (row, column, event) => {
-    event.returnValue = false
-    thirdLevelDoctorSetting.dialog = true
-    thirdLevelDoctorSetting.data = row
+  event.returnValue = false
+  thirdLevelDoctorSetting.dialog = true
+  thirdLevelDoctorSetting.data = row
 }
 
 const submitToTheThirdLevelDoctor = () => {
-    saveTheThirdLevelDoctor(thirdLevelDoctorSetting.data).then(() => {
-        thirdLevelDoctorSetting.dialog = false
-    })
+  saveTheThirdLevelDoctor(thirdLevelDoctorSetting.data).then(async () => {
+    thirdLevelDoctorSetting.dialog = false
+    huanZheXinXi.value = await getPatientInfo(huanZheXinXi.value.inpatientNo)
+  })
 }
 
 onMounted(() => {
-    getAllWards().then((res) => {
-        if (res.length > 0) {
-            allWards.value = res
-            currentWard.value = wardsClearable ? '' : res[0].code
-            fetchOverviews()
-        }
-    })
+  getAllWards().then((res) => {
+    if (res.length > 0) {
+      allWards.value = res
+      currentWard.value = wardsClearable ? '' : res[0].code
+      fetchOverviews()
+    }
+  })
 })
 </script>
 

+ 15 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -272,7 +272,7 @@ import {
   huoQuZhiXinKeShi,
   toDeleteAnOrder
 } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
-import {listNotBlank, stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
+import {listNotBlank, listToStr, stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
 import {getServerDateApi} from '@/api/public-api'
 import Sleep from '@/utils/sleep'
 import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid";
@@ -294,7 +294,7 @@ import {
   frequCodeEnum,
   yaoPinPingLvData,
   geiYaoFangShiData,
-  yzMitt
+  yzMitt, huanZheXinXi
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {ElMessageBox} from "element-plus";
 import YzDialog from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/dialog/YzDialog";
@@ -773,6 +773,19 @@ const toAddAnOrder = async () => {
  */
 const confirmOrdersClick = async () => {
   try {
+    let errorList = []
+    if (stringIsBlank(huanZheXinXi.value.referPhysician)) {
+      errorList.push('管床医生为空')
+    }
+    if (stringIsBlank(huanZheXinXi.value.consultPhysician)) {
+      errorList.push('主治医生为空')
+    }
+    if (stringIsBlank(huanZheXinXi.value.deptDirector)) {
+      errorList.push('主任医生为空')
+    }
+    if (listNotBlank(errorList)) {
+      return xcMessage.error(listToStr(errorList))
+    }
     let res = await confirmOrders(props.patientInfo)
     if (res !== null && res.error) {
       baoCunXinXiRef.value.openOrClose()

+ 17 - 0
src/utils/blank-utils.js

@@ -1,4 +1,9 @@
 export function stringIsBlank(val) {
+    try {
+        val = val.trim()
+    } catch {
+
+    }
     return typeof val === 'undefined' || val === null || val === ''
 }
 
@@ -13,3 +18,15 @@ export function listIsBlank(val) {
 export function listNotBlank(val) {
     return !listIsBlank(val)
 }
+
+export function listToStr(val) {
+    if (listNotBlank(val)) {
+        let str = "";
+        for (let i = 0, len = val.length; i < len; i++) {
+            let item = val[i];
+            str += item + (i === len - 1 ? "。" : ",");
+        }
+        return str;
+    }
+    return "";
+}

+ 2 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -442,7 +442,7 @@ import EmrPopup from "@/components/zhu-yuan-yi-sheng/emr/EmrPopup.vue";
 import EmrAuxiliaryTools from "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrAuxiliaryTools.vue";
 import sleep from "@/utils/sleep";
 import EmrWebSocket from "@/components/zhu-yuan-yi-sheng/emr/web-socket/EmrWebSocket.vue";
-import {stringIsBlank} from "@/utils/blank-utils";
+import {listToStr, stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
 import {isDev, needRule} from "@/utils/public";
 import {isThereADoctorEditing} from "@/api/zhu-yuan-yi-sheng/emr-socket";
 import {onDeactivated} from "vue";
@@ -758,12 +758,11 @@ const editJudgment = async () => {
 
 // 点击保存病历
 const clickSaveData = async () => {
+  if (caseHistoryUrl === '/emr/runtime/#/editor') return
   // 只读模式无法保存数据
   if (readonlyPattern()) {
     BizException(ExceptionEnum.MESSAGE_ERROR, "当前为只读模式,无法保存病历。");
   }
-  editor = currentEmr.value.getEditor()
-  if (caseHistoryUrl === '/emr/runtime/#/editor') return
   if (editor === null) return
   waitForLoadingToComplete()
   // 判断是否有必填项目

+ 175 - 174
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/Home.vue

@@ -1,40 +1,40 @@
 <template>
-    <div class="modHeaderRef" v-show="conciseMode">
-        <div ref="modHeaderRef" class="modHeaderDiv"/>
+  <div class="modHeaderRef" v-show="conciseMode">
+    <div ref="modHeaderRef" class="modHeaderDiv"/>
+  </div>
+  <div ref="headerRefOld">
+    <div ref="headerRef">
+      <emr-select-pat :pat-info="patientInfo" v-if="emrConfig.editor" @selected="selected"/>
+      住院号:
+      <el-input v-model="query.patNo" style="width: 120px" @blur="query.patNo = $event.target.value.trim()"/>
+      次数 ({{ query.times }})
+      <emr-leave-hospital-patient @rowClick="disPatients"/>
+      <el-button @click="allPatientsInTheHospital" :disabled="query.state === 4">全院患者</el-button>
+      <el-button @click="emrSocketUnlock">解锁重复打开病历</el-button>
+      <!--    解锁病历质控        -->
+      <emr-quality-control-relieve/>
+      <el-button @click="patientListDrawer = !patientListDrawer">患者列表</el-button>
+      <el-checkbox v-model="conciseMode" @change="openOrCloseMode" label="简洁模式"/>
+      出院天数:{{ dischargeDays }}
+      <span style="color: red">出院七天后就无法编辑患者病历</span>
     </div>
-    <div ref="headerRefOld">
-        <div ref="headerRef">
-            <emr-select-pat :pat-info="patientInfo" v-if="emrConfig.editor" @selected="selected"/>
-            住院号:
-            <el-input v-model="query.patNo" style="width: 120px" @blur="query.patNo = $event.target.value.trim()"/>
-            次数 ({{ query.times }})
-            <emr-leave-hospital-patient @rowClick="disPatients"/>
-            <el-button @click="allPatientsInTheHospital" :disabled="query.state === 4">全院患者</el-button>
-            <el-button @click="emrSocketUnlock">解锁重复打开病历</el-button>
-            <!--    解锁病历质控        -->
-            <emr-quality-control-relieve/>
-            <el-button @click="patientListDrawer = !patientListDrawer">患者列表</el-button>
-            <el-checkbox v-model="conciseMode" @change="openOrCloseMode" label="简洁模式"/>
-            出院天数:{{ dischargeDays }}
-            <span style="color: red">出院七天后就无法编辑患者病历</span>
-        </div>
-    </div>
-
-    <div v-if="show">
-        <div ref="patInfoRefOld">
-            <div ref="patInfoRef">
-                <huan-zhe-xin-xi
-                        :huan-zhe-xin-xi="patientInfo"
-                        @isShow="patientInfoIsShow"/>
-            </div>
-        </div>
+  </div>
 
-        <emr-main
-                ref="emrMainRef"
-                :huan-zhe-xin-xi="patientInfo"
-                :max-height="maxHeight"/>
+  <div v-if="show">
+    <div ref="patInfoRefOld">
+      <div ref="patInfoRef">
+        <huan-zhe-xin-xi
+            :huan-zhe-xin-xi="patientInfo"
+            @isShow="patientInfoIsShow"/>
+      </div>
     </div>
-    <emr-patient-list @rowClick="listRowClick" v-model="patientListDrawer"/>
+
+    <emr-main
+        ref="emrMainRef"
+        :huan-zhe-xin-xi="patientInfo"
+        :max-height="maxHeight"/>
+  </div>
+  <emr-patient-list @rowClick="listRowClick" v-model="patientListDrawer"/>
 
   <!--    <xc-dialog-v2 v-model="dialog" title="病历限制" manual-shutdown>-->
   <!--        <div style="color: red;font-size: 24px">-->
@@ -57,12 +57,12 @@ import {isDisReqEdit} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import {getOperationGuide, getServerDateApi} from "@/api/public-api";
 import {subtractTime} from "@/utils/date";
 import {
-    applicationData, canIUnlockIt,
-    completeModeSwitch,
-    conciseMode,
-    emrConfig, emrMitt,
-    query,
-    resolveRoute, unlockEnum
+  applicationData, canIUnlockIt,
+  completeModeSwitch,
+  conciseMode,
+  emrConfig, emrMitt,
+  query,
+  resolveRoute, unlockEnum
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import EmrPatientList from "@/components/zhu-yuan-yi-sheng/emr/EmrPatientList.vue";
 import EmrLeaveHospitalPatient from "@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue";
@@ -71,7 +71,7 @@ import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
 import {emrSocketUnlockApi, repeatedlyOpenTheSamePatient} from "@/api/zhu-yuan-yi-sheng/emr-socket";
 import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
 import EmrQualityControlRelieve
-    from "@/components/zhu-yuan-yi-sheng/emr/EmrQualityControlRelieve/EmrQualityControlRelieve.vue";
+  from "@/components/zhu-yuan-yi-sheng/emr/EmrQualityControlRelieve/EmrQualityControlRelieve.vue";
 import {getMyUnlockByPatNo} from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
 import store from "@/store";
 
@@ -98,189 +98,190 @@ let patientListDrawer = $ref(false)
 let dialog = $ref(true)
 
 const selected = ({inpatientNo, admissTimes}) => {
-    query.value.patNo = inpatientNo
-    query.value.times = admissTimes
-    query.value.maxTimes = admissTimes
-    allPatientsInTheHospital()
+  query.value.patNo = inpatientNo
+  query.value.times = admissTimes
+  query.value.maxTimes = admissTimes
+  allPatientsInTheHospital()
 }
 
 // 点击查询出院患者
 const disPatients = async () => {
-    if (query.value.times === 0 || !query.value.patNo) {
-        BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号,住院次数不能为 0 ')
-    }
-    query.value.state = 2
-    let te = JSON.stringify(query.value)
-    await router.push('/myEmrEditor/' + window.btoa(te))
-    location.reload()
-    await routerFunc()
+  if (query.value.times === 0 || !query.value.patNo) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号,住院次数不能为 0 ')
+  }
+  query.value.state = 2
+  let te = JSON.stringify(query.value)
+  await router.push('/myEmrEditor/' + window.btoa(te))
+  location.reload()
+  await routerFunc()
 }
 
 // 解析路由数据
 const routerFunc = async () => {
-    emrMainRef.value?.closeWebSocket()
-    show = false
-    if (router.currentRoute.value.params.pat) {
-        resolveRoute(router.currentRoute.value.params.pat)
-        let sid = 'emr_' + query.value.patNo.trim() + "_" + query.value.times
-        let res = await repeatedlyOpenTheSamePatient(sid)
-        console.log('重复打开病历 %o 连接 %s', res, sid);
-        if (res) {
-            show = false
-            BizException(ExceptionEnum.LOGICAL_ERROR, "请勿重复打开病历。")
-        }
-        let reqUnlock = await getMyUnlockByPatNo(query.value.patNo, query.value.times)
-        console.log('申请数据 %o', reqUnlock)
-        if (reqUnlock != null) {
-            reqUnlock.unlockJson = JSON.parse(reqUnlock.unlockJson)
-            applicationData.value = reqUnlock
-        } else {
-            applicationData.value = null
-        }
-        if (query.value.state !== 2) {
-            patientInfo = await getPatientInfo(query.value.patNo);
-            patientInfo.$inOutFlag = 1;
-        }
-        if (query.value.state === 1) {
-            await queryActPatient()
-        } else if (query.value.state === 2) {
-            await queryDisPatient()
-        } else if (query.value.state === 3) {
-            await queryAllPatients(true)
-        } else if (query.value.state === 4) {
-            await queryAllPatients(false)
-        } else if (query.value.state === 5) {
-            await queryDisPatient()
-            emrConfig.value.editor = false
-        }
-        await nextTick();
+  emrMainRef.value?.closeWebSocket()
+  show = false
+  if (router.currentRoute.value.params.pat) {
+    resolveRoute(router.currentRoute.value.params.pat)
+    let sid = 'emr_' + query.value.patNo.trim() + "_" + query.value.times
+    let res = await repeatedlyOpenTheSamePatient(sid)
+    console.log('重复打开病历 %o 连接 %s', res, sid);
+    if (res) {
+      show = false
+      BizException(ExceptionEnum.LOGICAL_ERROR, "请勿重复打开病历。")
+    }
+    let reqUnlock = await getMyUnlockByPatNo(query.value.patNo, query.value.times)
+    console.log('申请数据 %o', reqUnlock)
+    if (reqUnlock != null) {
+      reqUnlock.unlockJson = JSON.parse(reqUnlock.unlockJson)
+      applicationData.value = reqUnlock
     } else {
-        show = false
+      applicationData.value = null
+    }
+    if (query.value.state !== 2) {
+      patientInfo = await getPatientInfo(query.value.patNo);
+      patientInfo.$inOutFlag = 1;
+    }
+    if (query.value.state === 1) {
+      await queryActPatient()
+    } else if (query.value.state === 2) {
+      await queryDisPatient()
+    } else if (query.value.state === 3) {
+      await queryAllPatients(true)
+    } else if (query.value.state === 4) {
+      await queryAllPatients(false)
+    } else if (query.value.state === 5) {
+      await queryDisPatient()
+      emrConfig.value.editor = false
     }
+    await nextTick();
+    console.log(patientInfo)
+  } else {
+    show = false
+  }
 }
 
 // 查询在院患者数据
 const queryActPatient = async () => {
-    show = true
+  show = true
 }
 
 // 查询出院患者信息
 const queryDisPatient = async () => {
-    patientInfo = await getDisPatient(query.value.patNo, query.value.times)
-    patientInfo.$inOutFlag = 2
-    dischargeDays = subtractTime(await getServerDateApi(), patientInfo.disDate)
-    // 如果患者的出院时间大于 7 天就只能看病历和打印病历了
-    emrConfig.value.editor = dischargeDays <= 7;
-    // 如果超过了七天就去查看是否有申请编辑
-    if (!emrConfig.value.editor) {
-        emrConfig.value.editor = canIUnlockIt(unlockEnum.出院编辑)
-    }
-    show = true;
+  patientInfo = await getDisPatient(query.value.patNo, query.value.times)
+  patientInfo.$inOutFlag = 2
+  dischargeDays = subtractTime(await getServerDateApi(), patientInfo.disDate)
+  // 如果患者的出院时间大于 7 天就只能看病历和打印病历了
+  emrConfig.value.editor = dischargeDays <= 7;
+  // 如果超过了七天就去查看是否有申请编辑
+  if (!emrConfig.value.editor) {
+    emrConfig.value.editor = canIUnlockIt(unlockEnum.出院编辑)
+  }
+  show = true;
 }
 
 // 点击全院患者数据
 const allPatientsInTheHospital = async () => {
-    if (!query.value.patNo) {
-        BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号。 ')
-    }
-    query.value.state = 3
-    let te = JSON.stringify(query.value)
-    await router.push('/myEmrEditor/' + window.btoa(te))
-    location.reload()
-    await routerFunc()
+  if (!query.value.patNo) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号。 ')
+  }
+  query.value.state = 3
+  let te = JSON.stringify(query.value)
+  await router.push('/myEmrEditor/' + window.btoa(te))
+  location.reload()
+  await routerFunc()
 }
 
 
 const queryAllPatients = async (flag) => {
-    query.value.times = patientInfo.admissTimes
-    query.value.maxTimes = patientInfo.admissTimes
-    show = true
-    emrConfig.value.editor = flag
+  query.value.times = patientInfo.admissTimes
+  query.value.maxTimes = patientInfo.admissTimes
+  show = true
+  emrConfig.value.editor = flag
 }
 
 const listRowClick = async (val) => {
-    let temp = {
-        patNo: val.inpatientNo,
-        times: val.admissTimes,
-        maxTimes: val.admissTimes,
-        state: 4
-    }
-    let te = JSON.stringify(temp)
-    await router.push('/myEmrEditor/' + window.btoa(te))
-    location.reload()
-    await routerFunc()
+  let temp = {
+    patNo: val.inpatientNo,
+    times: val.admissTimes,
+    maxTimes: val.admissTimes,
+    state: 4
+  }
+  let te = JSON.stringify(temp)
+  await router.push('/myEmrEditor/' + window.btoa(te))
+  location.reload()
+  await routerFunc()
 }
 
 const patientInfoIsShow = (flag, height) => {
-    maxHeight = window.innerHeight - height - 24
+  maxHeight = window.innerHeight - height - 24
 }
 
 const 操作指南 = (val) => {
-    let fileName = null
-    getOperationGuide("住院医生教程").then((res) => {
-        fileName = res
-        if (val === 1) {
-            window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生教程/住院医生操作指南 ${fileName}.docx`, '_blank')
-        } else {
-            window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生教程/住院医生操作指南 ${fileName}.pdf`, '_blank')
-        }
-        localStorage.setItem("电子病历限制", "false")
-        dialog = false
-    })
+  let fileName = null
+  getOperationGuide("住院医生教程").then((res) => {
+    fileName = res
+    if (val === 1) {
+      window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生教程/住院医生操作指南 ${fileName}.docx`, '_blank')
+    } else {
+      window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生教程/住院医生操作指南 ${fileName}.pdf`, '_blank')
+    }
+    localStorage.setItem("电子病历限制", "false")
+    dialog = false
+  })
 }
 
 const openOrCloseMode = (val) => {
-    if (val) {
-        modHeaderRef.value.appendChild(headerRef.value);
-        modHeaderRef.value.appendChild(patInfoRef.value);
-        emrMainRef.value.turnOnConciseMode();
-    } else {
-        headerRefOld.value.appendChild(headerRef.value)
-        patInfoRefOld.value.appendChild(patInfoRef.value)
-        emrMainRef.value.exitConciseMode();
-    }
-    completeModeSwitch.value = val
+  if (val) {
+    modHeaderRef.value.appendChild(headerRef.value);
+    modHeaderRef.value.appendChild(patInfoRef.value);
+    emrMainRef.value.turnOnConciseMode();
+  } else {
+    headerRefOld.value.appendChild(headerRef.value)
+    patInfoRefOld.value.appendChild(patInfoRef.value)
+    emrMainRef.value.exitConciseMode();
+  }
+  completeModeSwitch.value = val
 }
 
 const channel = new BroadcastChannel('login-channel');
 channel.addEventListener('message', (event) => {
-    if (navigator.userAgent.indexOf("Firefox") !== -1 || navigator.userAgent.indexOf("Chrome") !== -1) {
-        emrMainRef.value.changeClear()
-        window.location.href = "about:blank";
-        window.close();
-    } else {
-        emrMainRef.value.changeClear()
-        window.opener = null;
-        window.open("", "_self");
-        window.close();
-    }
+  if (navigator.userAgent.indexOf("Firefox") !== -1 || navigator.userAgent.indexOf("Chrome") !== -1) {
+    emrMainRef.value.changeClear()
+    window.location.href = "about:blank";
+    window.close();
+  } else {
+    emrMainRef.value.changeClear()
+    window.opener = null;
+    window.open("", "_self");
+    window.close();
+  }
 })
 
 const emrSocketUnlock = async () => {
-    let documentSid = ''
-    try {
-        let editor = emrMitt.emit('editor')
-        let id = editor.documentData._id
-        let userData = store.state.user.info
-        if (stringNotBlank(id)) {
-            documentSid = 'documentEmr_' + id + '_' + userData.code;
-        }
-    } catch {
-
+  let documentSid = ''
+  try {
+    let editor = emrMitt.emit('editor')
+    let id = editor.documentData._id
+    let userData = store.state.user.info
+    if (stringNotBlank(id)) {
+      documentSid = 'documentEmr_' + id + '_' + userData.code;
     }
-    await emrSocketUnlockApi('emr_' + query.value.patNo.trim() + '_' + query.value.times, documentSid)
-    show = false
-    location.reload()
-    await routerFunc()
+  } catch {
+
+  }
+  await emrSocketUnlockApi('emr_' + query.value.patNo.trim() + '_' + query.value.times, documentSid)
+  show = false
+  location.reload()
+  await routerFunc()
 }
 
 onMounted(async () => {
-    let temp = localStorage.getItem("电子病历限制")
-    if (temp !== null) {
-        dialog = false
-    }
-    await nextTick();
-    await routerFunc()
+  let temp = localStorage.getItem("电子病历限制")
+  if (temp !== null) {
+    dialog = false
+  }
+  await nextTick();
+  await routerFunc()
 })
 
 

+ 2 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue

@@ -266,9 +266,10 @@ onMounted(() => {
         </el-switch>
       </template>
     </el-table-column>
-    <el-table-column label="数量" prop="quantity" width="90">
+    <el-table-column label="数量" prop="quantity" width="90" v-if="!isCheck">
       <template #default="scope">
         <el-input-number :step="1"
+                         :disabled="scope.row.classes !== PATHOLOGY"
                          v-model="scope.row.quantity"
                          :min="1"
                          style="width: 77px"