Parcourir la source

优化住院医生

DESKTOP-0GD05B0\Administrator il y a 2 ans
Parent
commit
a6da0cbce7
25 fichiers modifiés avec 747 ajouts et 766 suppressions
  1. 6 6
      src/App.vue
  2. 2 3
      src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js
  3. 0 6
      src/components/index.ts
  4. 51 0
      src/components/xiao-chan/checkbox/XcCheckbox.vue
  5. 0 169
      src/components/xiao-chan/select-v2/VirtualizationSelect.vue
  6. 0 334
      src/components/xiao-chan/select-v2/XcSelectV2.vue
  7. 0 1
      src/components/xiao-chan/select-v3/XcSelectV3.vue
  8. 0 0
      src/components/xiao-chan/select-v3/XcTableColumn.vue
  9. 88 74
      src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue
  10. 2 1
      src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue
  11. 84 0
      src/components/zhu-yuan-yi-sheng/public/PatientList.vue
  12. 2 2
      src/components/zhu-yuan-yi-sheng/shou-shu-shen-qing/BianJiShouShu.vue
  13. 56 0
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YzQueryCondition.vue
  14. 75 0
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YzTable.vue
  15. 0 5
      src/main.js
  16. 0 3
      src/utils/public.js
  17. 0 3
      src/utils/websocket.js
  18. 3 3
      src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue
  19. 32 3
      src/views/hospitalization/zhu-yuan-yi-sheng/OpenNewWindiow.vue
  20. 2 2
      src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/EmrMain.vue
  21. 2 4
      src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init.js
  22. 4 3
      src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/BianJiJianChaJianYanShenQing.vue
  23. 230 11
      src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue
  24. 83 59
      src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue
  25. 25 74
      src/views/settings/Test.vue

+ 6 - 6
src/App.vue

@@ -37,12 +37,12 @@ export default defineComponent({
         store.commit('user/tokenChange', data.token)
       })
 
-      // setCallback('sidSingle', async () => {
-      //   await store.dispatch('user/loginOut')
-      //   await ElMessageBox.alert('您的账号已在其他地方登陆,如需修改密码请在个人中心中修改。', '提示', {
-      //     type: 'warning',
-      //   })
-      // })
+      setCallback('sidSingle', async () => {
+        await store.dispatch('user/loginOut')
+        await ElMessageBox.alert('您的账号已在其他地方登陆,如需修改密码请在个人中心中修改。', '提示', {
+          type: 'warning',
+        })
+      })
 
       setCallback('systemNotification', async (data) => {
         if (data.count) {

+ 2 - 3
src/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru.js

@@ -4,11 +4,10 @@ import request from '@/utils/request'
 const url = '/yiZhuLuRu'
 
 // 下面是 api 请求
-export function huoQuHuanZheLieBiao(wardCode) {
+export function getMyPatient() {
     return request({
-        url: url + '/huoQuHuanZheLieBiao',
+        url: url + '/getMyPatient',
         method: 'get',
-        params: {wardCode},
     })
 }
 

+ 0 - 6
src/components/index.ts

@@ -1,6 +0,0 @@
-export {default as XcSelect} from '../components/xiao-chan/select/XcSelect.vue'
-export {default as XcOption} from '../components/xiao-chan/select/XcOption.vue'
-export {default as XcCode} from '../components/xiao-chan/code/XcCode.vue'
-
-export {default as XcSelectV2} from '../components/xiao-chan/select-v2/XcSelectV2.vue'
-export {default as XcTableV3} from '../components/xiao-chan/table-v3/XcTableV3.vue'

+ 51 - 0
src/components/xiao-chan/checkbox/XcCheckbox.vue

@@ -0,0 +1,51 @@
+<template>
+  <label class="xc_checkbox">
+    <input type="checkbox" v-model="tempValue" @change="changeCheckbox">
+    {{ label }}
+  </label>
+</template>
+
+<script setup name='XcCheckbox'>
+const props = defineProps({
+  modelValue: {
+    type: [String, Number, Boolean]
+  },
+  activeValue: {
+    type: [Boolean, String, Number],
+    default: true
+  },
+  inactiveValue: {
+    type: [Boolean, String, Number],
+    default: false
+  },
+  label: {
+    type: String
+  }
+})
+const emit = defineEmits(['update:modelValue'])
+const tempValue = ref(false)
+
+const changeCheckbox = () => {
+  emit('update:modelValue', tempValue.value ? props.activeValue : props.inactiveValue)
+}
+
+watch(() => props.modelValue, () => {
+  if (props.modelValue === props.activeValue) {
+    tempValue.value = true
+  } else {
+    tempValue.value = false
+  }
+}, {deep: true, immediate: true})
+
+</script>
+
+<style scoped lang="scss">
+.xc_checkbox {
+  cursor: pointer;
+  display: inline-flex;
+  align-items: center;
+  white-space: nowrap;
+  user-select: none;
+}
+
+</style>

+ 0 - 169
src/components/xiao-chan/select-v2/VirtualizationSelect.vue

@@ -1,169 +0,0 @@
-<template>
-  <div v-if="props.dataLength === 0" class="nullData">
-    暂无数据
-  </div>
-  <div v-else class="container" ref="container"
-       :style="{ height: containerHeight + 'px' }">
-    <div class="empty" :style="{ height: emptyHeight + 'px' }"></div>
-    <ul class="list" :style="{ transform: `translateY(${translateY})` }">
-      <li v-for="(item,index) in listData"
-          @click="clickLi(item,index)" :key="item" class="item"
-          :style="styleToLi(item,index)">
-        <slot :item="item"></slot>
-      </li>
-    </ul>
-  </div>
-</template>
-
-<script setup name="VirtualizationSelect">
-import {functionDebounce} from "@/utils/debounce";
-
-const props = defineProps({
-  modelValue: {
-    type: Number
-  },
-  data: {
-    type: Array,
-    default: []
-  },
-  value: {
-    type: [String, Number],
-  },
-  dataLength: {
-    type: Number,
-    default: 0
-  },
-  localSearch: {
-    type: Boolean,
-    default: false
-  }
-})
-
-const emit = defineEmits(['change', 'update:modelValue'])
-
-const itemHeight = 34
-let emptyHeight = $ref(itemHeight * props.dataLength)
-let containerHeight = $ref(300)
-let itemCount = $ref(Math.ceil(containerHeight / itemHeight))
-
-const container = ref(null)
-const start = ref(0)
-const translateY = ref(0)
-
-const listData = computed(() => {
-  return props.data.slice(start.value, start.value + itemCount + 1)
-})
-
-const clickLi = async (item, index) => {
-  await emit('update:modelValue', start.value + index);
-  await emit('change', item)
-}
-
-const selectedDataSubscript = (idx) => {
-  try {
-    container.value.scrollTop = idx * itemHeight;
-  } catch (e) {
-    // console.error(e)
-  }
-}
-
-const styleToLi = (item, index) => {
-  if (props.value === item.value) {
-    return {
-      height: itemHeight + 'px',
-      backgroundColor: '#409EFF',
-      color: '#ffffff'
-    };
-  } else if (start.value + index === props.modelValue) {
-    return {
-      height: itemHeight + 'px',
-      backgroundColor: '#909399',
-      color: '#ffffff'
-    }
-  } else {
-    return {
-      height: itemHeight + 'px',
-    };
-  }
-}
-
-const enableScrollBar = functionDebounce(() => {
-  try {
-    container.value.addEventListener('scroll', e => {
-      const {scrollTop} = e.target
-      start.value = Math.floor(scrollTop / itemHeight)
-      translateY.value = scrollTop + 'px'
-    })
-  } catch (e) {
-  }
-}, 200)
-
-
-const resetData = () => {
-  emptyHeight = itemHeight * props.dataLength
-  containerHeight = emptyHeight > 300 ? 300 : emptyHeight
-  start.value = 0
-  translateY.value = 0 + 'px'
-  container.value.scrollTop = 0
-  itemCount = Math.ceil(containerHeight / itemHeight)
-  enableScrollBar()
-}
-
-defineExpose({selectedDataSubscript, $el: container, enableScrollBar, resetData})
-
-
-</script>
-<style scoped lang="scss">
-
-.nullData {
-  padding: 10px 0;
-  margin: 0;
-  text-align: center;
-  width: 100%;
-  color: var(--el-text-color-secondary);
-  font-size: var(--el-select-font-size);
-}
-
-.container {
-  overflow: auto;
-  display: flex;
-  width: 100%;
-  direction: rtl;
-
-
-  ul {
-    list-style: none;
-    margin: 0;
-    width: 100%;
-    padding: 0;
-    direction: ltr;
-
-    .item {
-      font-size: var(--el-font-size-base);
-      padding: 0 32px 0 20px;
-      position: relative;
-      white-space: nowrap;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      color: var(--el-text-color-regular);
-      height: 34px;
-      line-height: 34px;
-      box-sizing: border-box;
-      cursor: pointer;
-      width: 100%;
-    }
-
-    .checked {
-      background-color: #4e91f8;
-      color: white;
-    }
-
-    .item:hover {
-      background-color: #fac44d;
-      color: white;
-    }
-  }
-}
-
-
-</style>

+ 0 - 334
src/components/xiao-chan/select-v2/XcSelectV2.vue

@@ -1,334 +0,0 @@
-<template>
-  <div class="xc-select-v2_main" style="width: 120px"
-       @mousedown="stopLosingFocus($event)" ref="xcSelectV2Main"
-       @keydown.esc.stop.prevent="handleEsc">
-    <el-input ref="xcInput"
-              @input="inputChange"
-              v-model="label"
-              @blur="loseFocus"
-              :placeholder="placeholder"
-              @keydown.up.stop.prevent="onKeyboardNavigate('up')"
-              @keydown.down.stop.prevent="onKeyboardNavigate('down')"
-              @keydown.enter.stop.prevent="onKeyboardSelect"
-              @click="isShow = !isShow" @focus="getFocus">
-      <template #suffix>
-        <el-icon class="finger"
-                 @mouseenter="isClearable = true"
-                 @mouseleave="isClearable = false">
-            <span v-if="isClearable && props.clearable && props.modelValue[props.value]">
-              <CircleClose @click="clear"/>
-            </span>
-          <span v-else>
-              <ArrowUp v-show="isShow" @mousedown="clickIcon($event,false)"/>
-              <ArrowDown v-show="!isShow" @mousedown="clickIcon($event,true)"/>
-            </span>
-        </el-icon>
-      </template>
-    </el-input>
-    <transition name="el-zoom-in-top">
-      <div v-show="isShow" class="xc-select-v2" :style="inputStyle">
-        <VirtualizationSelect :data="props.data" @change="change"
-                              :value="props.modelValue[props.value]"
-                              v-model="selectedSubscript"
-                              :local-search="whetherToSearchLocally"
-                              ref="selectItem"
-                              :data-length="dataLenght">
-          <template #default="{item}">
-            {{ item.value }}
-            {{ item.label }}
-          </template>
-        </VirtualizationSelect>
-      </div>
-    </transition>
-  </div>
-</template>
-
-<script setup name='XcSelectV2'>
-import {debounce} from "@/utils/debounce";
-import VirtualizationSelect from './VirtualizationSelect.vue'
-import sleep from "@/utils/sleep";
-import {nextTick} from "vue";
-
-const props = defineProps({
-  modelValue: {
-    type: Object,
-  },
-  value: {
-    type: String,
-    default: 'code'
-  },
-  label: {
-    type: String,
-    default: 'name'
-  },
-  data: {
-    type: Array,
-    default: []
-  },
-  clearable: {
-    type: Boolean,
-    default: false
-  },
-  remoteMethod: {
-    type: Function,
-    default: null
-  }
-})
-
-const emit = defineEmits(['change'])
-
-let label = $ref('')
-let isGetFocus = $ref(false)
-let selectItem = $ref(null)
-let xcInput = $ref(null)
-let top = $ref(22)
-let selectedSubscript = $ref(0)
-let dataLenght = $ref(0)
-let isClearable = $ref(false)
-let inputStyle = $ref({})
-let xcSelectV2Main = $ref()
-let whetherToSearchLocally = $ref(!props.remoteMethod)
-
-let isShow = $ref(false)
-
-let placeholder = computed(() => {
-  if (!label) {
-    return props.modelValue[props.label] ? props.modelValue[props.label] : '请选择'
-  }
-})
-
-const clickIcon = async (e, val) => {
-  e.preventDefault()
-  isShow = val
-  await sleep(100)
-}
-
-const inputChange = debounce(value => {
-  if (value) {
-    method(value);
-  }
-}, 1000)
-
-
-const onKeyboardNavigate = (val) => {
-  if (val === 'up') {
-    selectedSubscript - 1 < 0 ? selectedSubscript = dataLenght - 1 : selectedSubscript -= 1
-  } else if (val === 'down') {
-    selectedSubscript + 1 > dataLenght - 1 ? selectedSubscript = 0 : selectedSubscript += 1
-  }
-  selectItem.selectedDataSubscript(selectedSubscript)
-}
-
-const onKeyboardSelect = () => {
-  if (isShow) {
-    change(props.data[selectedSubscript]);
-  } else {
-    isShow = true
-  }
-}
-
-const handleEsc = () => {
-  isShow = false
-}
-
-const method = (val) => {
-  if (props.remoteMethod) {
-    props.remoteMethod(val)
-  }
-}
-
-const change = async (data) => {
-  if (data) {
-    props.modelValue[props.value] = data.value
-    props.modelValue[props.label] = data.label
-    label = data.label
-    emit('change', data)
-    await sleep(200)
-    isShow = false
-  }
-}
-
-const clear = () => {
-  props.modelValue[props.value] = ''
-  props.modelValue[props.label] = ''
-}
-
-const stopLosingFocus = (e) => {
-  // 阻止失去焦点
-  e.preventDefault()
-  xcInput.focus()
-}
-
-const getFocus = async () => {
-  await sleep(100)
-  if (!isShow) {
-    isShow = true
-  }
-  label = ''
-  isGetFocus = true
-}
-
-const loseFocus = async () => {
-  label = props.modelValue[props.label] ? props.modelValue[props.label] : props.modelValue[props.value]
-  await sleep(100)
-  isShow = false
-  isGetFocus = false
-}
-
-const focus = () => {
-  xcInput.focus()
-}
-
-const blur = () => {
-  xcInput.focus()
-}
-
-defineExpose({focus, blur})
-
-const selectItemResetData = async () => {
-  try {
-    await selectItem.resetData()
-  } catch (e) {
-    // console.log(e)
-  }
-}
-
-const selectItemDelectedDataSubscript = async () => {
-  try {
-    await selectItem.selectedDataSubscript(selectedSubscript)
-  } catch (e) {
-    // console.log(e)
-  }
-}
-
-
-const valueChange = async (whetherToChangeTheValue) => {
-  dataLenght = props.data.length
-  if (isGetFocus) {
-    return;
-  }
-  let val = props.modelValue[props.value]
-  if (val) {
-    // 在 数据中寻找 找到里就没有必要在找了
-    for (let i = 0; i < dataLenght; i++) {
-      let data = props.data[i];
-      if (data.value === val) {
-        props.modelValue[props.value] = data.value
-        props.modelValue[props.label] = data.label
-        label = data.label
-        selectedSubscript = i
-        return;
-      }
-    }
-
-    if (props.modelValue[props.value] && props.modelValue[props.label]) {
-      label = props.modelValue[props.label]
-      props.data.push({
-        value: props.modelValue[props.value],
-        label: props.modelValue[props.label]
-      })
-      return;
-    }
-
-
-    if (whetherToChangeTheValue) {
-      label = props.modelValue[props.value]
-      await method(props.modelValue[props.value])
-    }
-  }
-}
-
-watch(
-    () => props.modelValue[props.value],
-    (newValue, oldValue) => {
-      if (!newValue) {
-        label = ''
-      }
-      valueChange(true)
-    },
-    {immediate: true, deep: true}
-)
-
-watch(
-    () => props.data,
-    async () => {
-      await valueChange(false)
-      await nextTick()
-      await selectItemResetData()
-      selectedSubscript = 0
-    },
-    {immediate: true, deep: true}
-)
-
-
-watch(
-    () => isShow,
-    () => {
-      if (isShow && dataLenght > 0) {
-        nextTick(() => {
-          if (props.data[selectedSubscript].value !== props.modelValue[props.value]) {
-            for (let i = 0; i < dataLenght; i++) {
-              let data = props.data[i];
-              if (data.value === props.modelValue[props.value]) {
-                selectedSubscript = i
-                break
-              }
-            }
-          }
-          selectItemDelectedDataSubscript()
-
-          let docInput = xcInput.input;
-          let inputTop = docInput.getBoundingClientRect().top
-          let inputLeft = docInput.getBoundingClientRect().left
-          let selectBox = selectItem.$el
-          const {innerWidth: windowWidth, innerHeight: windowHeight} = window;
-          selectBox.style.direction = 'rtl'
-          if (inputLeft + selectBox.clientWidth > innerWidth) {
-            inputStyle['right'] = xcSelectV2Main.clientWidth + 'px'
-            inputStyle['top'] = 0 - (selectBox.clientHeight / 2) + 'px'
-            selectBox.style.direction = 'ltr'
-          }
-          if (inputTop + 320 >= innerHeight) {
-            inputStyle['top'] = 0 - (selectBox.clientHeight) + 'px'
-          }
-        });
-      }
-    }
-)
-
-onMounted(() => {
-  nextTick(() => {
-    let docInput = xcInput.input
-    inputStyle = {
-      top: docInput.scrollHeight + 5 + 'px',
-      minWidth: xcSelectV2Main.scrollWidth + 'px',
-      minHeight: '40px',
-    }
-  })
-})
-
-</script>
-
-<style lang="scss">
-.xc-select-v2_main {
-  position: relative;
-  display: inline-block;
-
-  .xc-select-v2 {
-    box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
-    border-radius: 5px;
-    display: flex;
-    position: absolute;
-    flex-direction: column;
-    z-index: 1000;
-    top: 28px;
-    background-color: white;
-  }
-
-  .finger:hover {
-    cursor: pointer; //悬浮时变手指
-  }
-}
-
-
-</style>

+ 0 - 1
src/components/xiao-chan/table-v3/XcTableV3.vue → src/components/xiao-chan/select-v3/XcSelectV3.vue

@@ -58,7 +58,6 @@
                 {{ item[itemTd.prop] }}
               </td>
             </tr>
-
             </tbody>
           </table>
         </div>

+ 0 - 0
src/components/xiao-chan/table-v3/XcTableColumn.vue → src/components/xiao-chan/select-v3/XcTableColumn.vue


+ 88 - 74
src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue

@@ -1,80 +1,75 @@
 <template>
-  <div>
-    <el-row>
-      <el-col :span="2" style="text-align: right">住院号:</el-col>
-      <el-col :span="4">
-        {{ huanZheXinXi.inpatientNo }}
-      </el-col>
-      <el-col :span="2" style="text-align: right">住院次数:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.admissTimes }}</el-col>
-      <el-col :span="2" style="text-align: right">床号:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.bedNo }}</el-col>
-      <el-col :span="2" style="text-align: right">身份证号:</el-col>
-      <el-col :span="4">{{ huanZheXinXi.socialNo }}</el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="2" style="text-align: right">姓名:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.name }}</el-col>
-      <el-col :span="2" style="text-align: right">性别:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.sexName }}</el-col>
-      <el-col :span="2" style="text-align: right">联系电话:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.homeTel }}</el-col>
-      <el-col :span="2" style="text-align: right">入院日期:</el-col>
-      <el-col :span="4">
-        <span>{{ huanZheXinXi.admissDate }}</span> &nbsp;
-        <span>{{ huanZheXinXi.actIptDays }}天</span>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="2" style="text-align: right">管床医生:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.referPhysicianName }}</el-col>
-      <el-col :span="2" style="text-align: right">病区:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.admissWardName }}</el-col>
-      <el-col :span="2" style="text-align: right">入院医生:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.admissPhysicianName }}</el-col>
-      <el-col :span="2" :title="huanZheXinXi.admissDiagStr"
-              style="text-align: right">
-        入院诊断:
-      </el-col>
-      <el-col :span="4" :title="huanZheXinXi.admissDiagStr"
-              style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
-        {{ huanZheXinXi.admissDiagStr }}
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="2" style="text-align: right">小科室:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.smallDeptName }}</el-col>
-      <el-col :span="2" style="text-align: right">登记日期:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.ybRegisterDate }}</el-col>
-      <el-col :span="2" style="text-align: right">身份:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.medTypeName }}</el-col>
-      <el-col :span="2" style="text-align: right">出生日期:</el-col>
-      <el-col :span="4">
-        <span>{{ huanZheXinXi.birthDate }}</span> &nbsp;&nbsp;
-        <span>{{ huanZheXinXi.age }} 岁</span>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="2" style="text-align: right">总费用:</el-col>
-      <el-col :span="4">
-        <span>{{ huanZheXinXi.totalCharge }}</span> &nbsp;&nbsp;
-        <span style="color: red">{{ huanZheXinXi.balance }}</span>
-      </el-col>
-      <el-col :span="2" style="text-align: right">药品占比:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.yp }}</el-col>
-      <el-col :span="2" style="text-align: right">检验检查:</el-col>
-      <el-col :span="4"> {{ huanZheXinXi.jyjc }}</el-col>
-      <el-col :span="2" style="text-align: right">医保:</el-col>
-      <el-col :span="4">
-        <span>{{ huanZheXinXi.chargeYb }}</span> &nbsp;&nbsp;
-        <span>{{ huanZheXinXi.yb }}</span>
-      </el-col>
-    </el-row>
+  <div class="header" style="border: 0px">
+    <div class="box">
+      <div>
+        住院号:{{ huanZheXinXi.inpatientNo }}_{{ huanZheXinXi.admissTimes }}
+      </div>
+      <div>
+        床号:{{ huanZheXinXi.bedNo }}
+      </div>
+      <div>
+        姓名:{{ huanZheXinXi.name }}
+      </div>
+      <div>
+        身份证号:{{ huanZheXinXi.socialNo }}
+      </div>
+      <div>
+        出生日期:{{ huanZheXinXi.birthDate }} {{ huanZheXinXi.age }} 岁
+      </div>
+      <div>
+        性别:{{ huanZheXinXi.sexName }}
+      </div>
+      <div>
+        联系电话:{{ huanZheXinXi.homeTel }}
+      </div>
+      <div>
+        入院日期:{{ huanZheXinXi.admissDate }}
+        {{ huanZheXinXi.actIptDays }}天
+      </div>
+    </div>
+
+    <div class="box">
+      <div>
+        管床医生:{{ huanZheXinXi.referPhysicianName }}
+      </div>
+      <div>
+        病区:{{ huanZheXinXi.admissWardName }}
+      </div>
+      <div>
+        入院医生:{{ huanZheXinXi.admissPhysicianName }}
+      </div>
+      <div>
+        入院诊断:{{ huanZheXinXi.admissDiagStr }}
+      </div>
+      <div>
+        小科室:{{ huanZheXinXi.smallDeptName }}
+      </div>
+      <div>
+        身份:{{ huanZheXinXi.medTypeName }}
+      </div>
+
+    </div>
+
+    <div class="box">
+      <div>
+        总费用:{{ huanZheXinXi.totalCharge }} {{ huanZheXinXi.balance }} 岁
+      </div>
+      <div>
+        药品占比:{{ huanZheXinXi.yp }}
+      </div>
+      <div>
+        检验检查:{{ huanZheXinXi.jyjc }}
+      </div>
+      <div>
+        医保:{{ huanZheXinXi.chargeYb }} {{ huanZheXinXi.yb }}
+      </div>
+    </div>
+
   </div>
+
 </template>
 
 <script setup name="HuanZheXinXi">
-import {ref} from "vue";
 
 const props = defineProps({
   huanZheXinXi: {
@@ -82,11 +77,30 @@ const props = defineProps({
   }
 })
 
-const activeNames = ref('1')
-
 </script>
 
 <style lang="scss" scoped>
+
+.header {
+  width: 100%;
+
+  div {
+    white-space: nowrap;
+    padding: 5px;
+  }
+
+  .box {
+    display: flex;
+    border: 1px solid;
+
+    div {
+      border-left: 1px solid;
+      border-right: 1px solid;
+    }
+  }
+
+}
+
 .el-col-4 span {
   border-bottom: 1px solid;
 }

+ 2 - 1
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue

@@ -59,7 +59,8 @@
           </template>
         </el-table-column>
         <el-table-column v-if="!jianCha" label="标本" prop="inspectStuffName" show-overflow-tooltip></el-table-column>
-        <el-table-column :label="jianCha ? '病室摘要' : '申请说明'" prop="reqComment" show-overflow-tooltip></el-table-column>
+        <el-table-column :label="jianCha ? '病室摘要' : '申请说明'" prop="reqComment"
+                         show-overflow-tooltip></el-table-column>
         <el-table-column v-if="jianCha" label="体征信息" prop="reqTzComment" show-overflow-tooltip></el-table-column>
         <el-table-column v-if="jianCha" label="辅检结果" prop="reqOtherResult" show-overflow-tooltip></el-table-column>
         <el-table-column v-if="jianCha" label="临床诊断" prop="diagText" show-overflow-tooltip></el-table-column>

+ 84 - 0
src/components/zhu-yuan-yi-sheng/public/PatientList.vue

@@ -0,0 +1,84 @@
+<template>
+  <el-select v-model="currentWard"
+             :clearable="wardsClearable"
+             style="width: 90px"
+             @change="fetchOverviews">
+    <el-option v-for="item in allWards"
+               :key="item.code"
+               :label="item.name"
+               :value="item.code"/>
+  </el-select>
+  <xc-checkbox v-model="myPatient" @change="myPatientChange" label="我的病人"/>
+  <el-table :data="cptOverviews" height="400" @row-click="handleClickOverview">
+    <el-table-column label="床" prop="bedNo" width="30"/>
+    <el-table-column label="姓名" width="70" prop="name"/>
+    <el-table-column label="住院号" prop="inpatientNo" width="65"/>
+    <el-table-column label="性别" prop="sex" width="65">
+      <template #default="scope">
+        {{ cptSex(scope.row.sex) }}
+      </template>
+    </el-table-column>
+  </el-table>
+</template>
+
+<script setup name='PatientList'>
+import {computed, onMounted, ref} from "vue";
+import {getWardsApi} from "@/api/login";
+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";
+import {setBaseinfo} from "@/data/inpatient";
+import {getMyPatient} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
+
+const myPatient = ref(false)
+const wardsClearable = allWardsVisible()
+const allWards = ref([])
+const currentWard = ref()
+const overviews = ref([])
+
+const fetchOverviews = () => {
+  getOverView(currentWard.value).then((res) => {
+    overviews.value = res
+    console.log(res)
+  })
+}
+
+const cptOverviews = computed(() => {
+  return overviews.value
+})
+
+const handleClickOverview = (row) => {
+  getPatientInfo(row.inpatientNo).then((res) => {
+    setBaseinfo(res)
+  })
+}
+
+const myPatientChange = () => {
+  if (myPatient.value) {
+    getMyPatient().then((res) => {
+      console.log(res)
+      overviews.value = res
+      currentWard.value = ''
+    });
+  } else {
+    currentWard.value = allWards.value[0].code
+    fetchOverviews()
+  }
+
+};
+
+onMounted(() => {
+  getWardsApi().then((res) => {
+    if (res.length > 0) {
+      allWards.value = res
+      currentWard.value = wardsClearable ? '' : res[0].code
+      fetchOverviews()
+    }
+  })
+})
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 2 - 2
src/components/zhu-yuan-yi-sheng/shou-shu-shen-qing/BianJiShouShu.vue

@@ -213,8 +213,8 @@ import {huoQuShouShuBuWei} from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
 import {getRenYuan, maZuiFangShi} from "@/api/public-api";
 import moment from "moment";
 import {ElMessage, ElMessageBox} from "element-plus";
-import XcTableV3 from "@/components/xiao-chan/table-v3/XcTableV3";
-import XcTableColumn from "@/components/xiao-chan/table-v3/XcTableColumn";
+import XcTableV3 from "@/components/xiao-chan/select-v3/XcSelectV3.vue";
+import XcTableColumn from "@/components/xiao-chan/select-v3/XcTableColumn";
 
 const emit = defineEmits(['qu-xiao'])
 

+ 56 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YzQueryCondition.vue

@@ -0,0 +1,56 @@
+<template>
+  <label>
+    显示范围:
+    <select v-model="quertParam.displayRange" @change="queryYz">
+      <option :value="0">全部</option>
+      <option :value="1">停止</option>
+      <option :value="2">当前</option>
+      <option :value="3">当日</option>
+    </select>
+  </label>
+  <label>
+    医嘱类型:
+    <select v-model="quertParam.frequCode" @change="queryYz">
+      <option :value="0">全部</option>
+      <option :value="1">临时</option>
+      <option :value="2">长期</option>
+    </select>
+  </label>
+  <label>
+    医嘱状态:
+    <select v-model="quertParam.zhuangTai" @change="queryYz">
+      <option :value="0">全部</option>
+      <option :value="1">录入</option>
+      <option :value="2">确认</option>
+      <option :value="3">执行</option>
+      <option :value="5">停止</option>
+    </select>
+  </label>
+</template>
+
+<script setup name='YzQueryCondition'>
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+
+const props = defineProps({
+  patientInfo: {
+    type: Object
+  }
+})
+
+const quertParam = ref({
+  displayRange: 2,
+  frequCode: 2,
+  zhuangTai: 0
+})
+
+const queryYz = () => {
+  if (!props.patientInfo.inpatientNo) return xcMessage.error('请先选择一个患者。')
+  console.log(props.patientInfo)
+  console.log(quertParam.value)
+}
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 75 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YzTable.vue

@@ -0,0 +1,75 @@
+<template>
+  <table border="1" cellspacing="0" cellpadding="0" class="table">
+    <thead>
+    <tr>
+      <th v-for="item in header">
+        {{ item.name }}
+      </th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr v-for="item in props.data">
+      <td v-for="he in header">
+        <div v-if="he.func" v-html="he.func(item)"/>
+        <div v-else>
+          {{ item[he.code] }}
+        </div>
+      </td>
+    </tr>
+    </tbody>
+  </table>
+</template>
+
+<script setup name='YzTable'>
+const props = defineProps({
+  data: {
+    type: Array
+  },
+})
+
+const header = [
+  {code: 'actOrderNo', name: '医嘱号'},
+  {code: 'orderName', name: '医嘱名称'},
+  {
+    code: 'dose', name: '剂量', func: (val) => {
+      return val.dose + ' ' + nu(val.doseUnitName)
+    }
+  },
+  {code: 'frequCode', name: '频率'},
+  {code: 'supplyCodeName', name: '给药方式'},
+  {code: 'startTime', name: '开始时间'},
+  {code: 'endTime', name: '结束时间'},
+  {code: 'orderTime', name: '医嘱时间'},
+  {code: 'emergencyFlag', name: '紧急'},
+  {code: 'ybSelfFlag', name: '医保自费'},
+  {code: 'physicianName', name: '医生'},
+  {code: 'selfBuyName', name: '费用标志'},
+  {code: 'execUnitName', name: '执行科室'},
+  {
+    code: 'drugQuan', name: '领量', func: (val) => {
+      return nu(val.drugQuan) + nu(val.miniUnitName)
+    }
+  },
+  {code: 'groupNoName', name: '药房'},
+  {code: 'serialName', name: '序号'},
+  {code: 'serialName', name: '医保备注'},
+  {code: 'patientNo', name: '父医嘱'},
+]
+
+const nu = (val) => {
+  if (val === null) {
+    return ''
+  } else if (typeof val === 'undefined') {
+    return ''
+  } else {
+    return val
+  }
+}
+
+</script>
+
+<style scoped lang="scss">
+.table {
+  width: 100%;
+}
+</style>

+ 0 - 5
src/main.js

@@ -7,7 +7,6 @@ import './assets/style/common.scss' // 公共css
 import App from './App.vue'
 import store from './store'
 import router, {addRoutes} from './router'
-import * as Component from '@/components/index.ts'
 import * as ElementPlusIconsVue from '@element-plus/icons-vue'
 import zhCn from 'element-plus/es/locale/lang/zh-cn'
 import JsonViewer from "vue3-json-viewer";
@@ -28,7 +27,3 @@ app.use(router)
 app.use(JsonViewer);
 app.mount('#app')
 
-// 注册全局组件
-for (const [key, component] of Object.entries(Component)) {
-    app.component(key, component)
-}

+ 0 - 3
src/utils/public.js

@@ -16,6 +16,3 @@ export function needRule(...val) {
 export function noNeedRule(...val) {
     return !needRule(val)
 }
-
-
-

+ 0 - 3
src/utils/websocket.js

@@ -42,9 +42,6 @@ function sendAMessage(name, data) {
 }
 
 export function initWebSocket(sid, force) {
-    if (unwantedSocket.includes(router.currentRoute.value.path)) {
-        return
-    }
 
     if ('WebSocket' in window) {
         if (webSocket === null || force) {

+ 3 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/Home.vue

@@ -5,8 +5,8 @@
       <huan-zhe-xin-xi v-show="basicPatientInformation" :huan-zhe-xin-xi="patientInfo"></huan-zhe-xin-xi>
     </template>
 
-    <template #aside="{size}">
-      <Overview v-show="xianShiLieBiao" :showSelection="false" :subtract-height="200"/>
+    <template #aside="{size}" v-show="xianShiLieBiao">
+      <patient-list/>
     </template>
 
     <template #main>
@@ -32,12 +32,12 @@ import store from '@/store'
 import {computed, ref, watch} from "vue";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import router from "@/router";
-import Overview from '@/components/medical-insurance/patient-overview/Index.vue'
 import PageLayer from "@/layout/PageLayer";
 import {
   huanZheXinXi as patientInfo,
   youWuXuanZheHuanZhe
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import PatientList from "@/components/zhu-yuan-yi-sheng/public/PatientList";
 
 const tableHeight = computed(() => {
   return store.state.app.windowSize.h

+ 32 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/OpenNewWindiow.vue

@@ -1,7 +1,6 @@
 <template>
   <div v-if="show">
-    <div ref="divRef">
-      <br>
+    <div ref="divRef" style="width: 100vw;">
       <huan-zhe-xin-xi :huan-zhe-xin-xi="patientInfo" v-if="patientInfo"/>
     </div>
     <emr-main :huan-zhe-xin-xi="patientInfo" :max-height="maxHeight" v-if="path === 'emr'"/>
@@ -15,6 +14,7 @@ import {getPatientInfo} from "@/api/inpatient/patient";
 import router from "@/router";
 import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
 import TianJiaYiZhu from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue";
+import {ElMessageBox} from "element-plus";
 
 let show = $ref(false)
 let patientInfo = $ref({})
@@ -46,12 +46,15 @@ const queryPatientInformation = async () => {
 
 
 const yzOrder = () => {
-
   show = true
 }
 
+let counts = (arr, value) => arr.reduce((a, v) => v === value ? a + 1 : a + 0, 0);
+
+
 onActivated(async () => {
   path = router.currentRoute.value.query.path
+  let query = router.currentRoute.value.query
   await queryPatientInformation()
   switch (path) {
     case "yzOrder":
@@ -61,6 +64,32 @@ onActivated(async () => {
       await emrFunc();
       break;
   }
+
+  let key = query.patNo + query.times + path
+  let temp = localStorage.getItem('residentDoctor')
+  if (temp === null) {
+    temp = []
+  } else {
+    temp = JSON.parse(temp)
+  }
+  temp.push(key)
+
+  if (counts(temp, key) > 1) {
+    show = false
+    ElMessageBox.alert('请勿打开多个相同的窗口', '提示', {
+      type: "error"
+    }).then(r => {
+    })
+    return
+  }
+
+  localStorage.setItem('residentDoctor', JSON.stringify(temp))
+  window.onbeforeunload = function (event) {
+    let index = temp.indexOf(key)
+    temp.splice(index, 1)
+    localStorage.setItem('residentDoctor', JSON.stringify(temp))
+  }
+
 })
 
 

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

@@ -315,8 +315,8 @@ const emrEvent = {
     editor = currentEmr.value.getEditor()
     loaded = false
     setEditorModeFun()
-    setTheProgressAnchor()
     courseSegmentLocking()
+    setTheProgressAnchor()
     deleteDataElement()
     reQueryPatientInformation()
   },
@@ -472,7 +472,7 @@ onMounted(() => {
   nextTick(async () => {
     emrSidebarRef.value.queryData()
     patientId = props.huanZheXinXi.inpatientNo
-    currentEmr.value = new EMRInteractive(patientData, emrEvent);
+    currentEmr.value = new EMRInteractive(JSON.stringify(patientData), emrEvent);
     emrSnippetRef.value.setPatientData(patientData)
     emrRef.value.parentElement.emr = currentEmr.value
     window.addEventListener('beforeunload', monitorPageRefresh, {capture: true})

+ 2 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-init.js

@@ -3,8 +3,6 @@ import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {deletePatientEmrByDocumentId, existCourseRecord, insertEmrData} from "@/api/zhu-yuan-yi-sheng/emr-patient";
 import store from '@/store'
 
-export let courseOfDisease = 'bingchengjiluzhuanyong'
-
 export function EMRInteractive(data, editorEvent) {
     this.setEditor = (editor, runtime) => {
         this.editor = editor;
@@ -50,7 +48,7 @@ export function EMRInteractive(data, editorEvent) {
         return this.editor[name](...value)
     }
 
-    this.insertSnippet = (content, styles) => {
+    this.insertSnippet = (content, styles, patientData) => {
         //病历片段相关参数
         let insertContent = {
             // 内容
@@ -59,7 +57,7 @@ export function EMRInteractive(data, editorEvent) {
             styles: styles,
             isFragment: true,
             // 就是在这里填充的值
-            defaultData: data
+            defaultData: patientData
         }
         this.editor.execute("insertContents", insertContent);
     }

+ 4 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/BianJiJianChaJianYanShenQing.vue

@@ -64,12 +64,12 @@
         </el-col>
         <el-col v-if="jianCha" :span="12">
           <el-form-item class="bi_tian" label="临床诊断:" prop="diagCode">
-            <XcSelectV2
+            <xc-select-v3
                 v-model="bianJiJianChaShuJu"
                 :data="linChuangZhenDuanShuJu"
                 :remote-method="linChuangZhenDuanSuoSou"
-                value="diagCode"
-                label="diagText"
+                code="diagCode"
+                name="diagText"
             />
           </el-form-item>
         </el-col>
@@ -128,6 +128,7 @@ import {ElMessage} from 'element-plus'
 import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
 import {biaoBenApi, huoQuLinChuangZhenDuan} from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
 import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
+import XcSelectV3 from "@/components/xiao-chan/select-v3/XcSelectV3.vue";
 
 const props = defineProps({
   jianCha: {

+ 230 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -31,7 +31,195 @@
   <el-button @click="allergenDialog = true">患者过敏信息</el-button>
   <yao-ping-xiang-qing v-if="HeLiYongYao.dialog" :code="HeLiYongYao.code"
                        @close="HeLiYongYao.dialog = false"></yao-ping-xiang-qing>
-  <el-form ref="yiZhuRef" v-model="yiZhuData" label-width="90px" size="small">
+  <div class="yz_input__box">
+    <div>
+      医嘱名称:
+      <xc-combo-grid
+          style="width: 240px"
+          ref="searchRef"
+          v-model="yiZhuData.orderName"
+          :table-header="tableHeader"
+          :query-data-func="huoQuXiangMu"
+          :current-key="yiZhuData.orderCode + yiZhuData.orderName"
+          @rowClick="xuanZhongFeiYong">
+      </xc-combo-grid>
+    </div>
+    <div class="input__style">
+      {{ yiZhuData.drugSpecification }}
+    </div>
+    <div>
+      频率:
+      <xc-select-v3 style="width: 120px"
+                   v-model="yiZhuData"
+                   :data="yaoPinPingLvData"
+                   code="frequCode"
+                   name="frequCodeName"
+                   :remote-method="pinLvRemoteMethod"
+                   id="yz_frequCode"
+                   ref="pingLv"/>
+    </div>
+    <div>
+      一次剂量:
+      <el-input-number v-model="yiZhuData.dose"
+                       :min="0"
+                       ref="doseRef"
+                       id="yz_dose"
+                       :precision="yiZhuData.doseUnitName === yiZhuData.miniUnitName ? 0 : 2"
+                       style="width: 110px"
+                       @change="jiSuanLingLiang"/>
+      <XcSelect v-model="yiZhuData"
+                id="yz_doseUnit"
+                :data="yaoPinJiLiangData"
+                :name="['doseUnit', 'doseUnitName']" :width="80"
+                @change="xuanZheJiLiang">
+        <XcOption label="value"></XcOption>
+        <XcOption label="name"></XcOption>
+      </XcSelect>
+    </div>
+    <div>
+      领量:
+      <el-input-number v-model="yiZhuData.drugQuan"
+                       :min="minimumPickingQuantity"
+                       placeholder="请输入领量">
+        {{ yiZhuData.drugQuan }}
+      </el-input-number>
+      {{ yiZhuData.miniUnitName }}
+    </div>
+  </div>
+
+  <div class="yz_input__box">
+    <div>
+      给药方式:
+      <xc-select-v3
+          style="width: 120px"
+          v-model="yiZhuData"
+          :data="geiYaoFangShiData"
+          id="yz_supplyCode"
+          code="supplyCode"
+          name="supplyCodeName"
+          :remote-method="geiYaoFangShiRemoteMethod"
+          clearable/>
+    </div>
+    <div>
+      开始时间:
+      <el-date-picker
+          style="width: 160px"
+          v-model="yiZhuData.startTime"
+          :disabled-date="disabledDate"
+          id="yz_startTime"
+          format="YYYY-MM-DD HH:mm:ss"
+          type="datetime"
+          value-format="YYYY-MM-DD HH:mm:ss"
+      ></el-date-picker>
+    </div>
+    <div>
+      停止时间:
+      <el-date-picker
+          style="width: 160px"
+          v-model="yiZhuData.endTime"
+          id="yz_endTime"
+          :disabled="yiZhuData.frequCode === 'ONCE'"
+          :disabled-date="disabledDate"
+          format="YYYY-MM-DD HH:mm:ss"
+          type="datetime"
+          value-format="YYYY-MM-DD HH:mm:ss"
+      ></el-date-picker>
+    </div>
+    <div class="input__style" style="width: 120px">
+      医生: {{ store.state.user.info.name }}
+    </div>
+    <div>
+      执行科室:
+      <xc-select-v3
+          style="width: 120px"
+          v-model="yiZhuData"
+          :data="zhiXingKeShiData"
+          id="yz_execUnit"
+          code="execUnit"
+          name="execUnitName"
+          :remote-method="metZhiXingKeShi"/>
+    </div>
+  </div>
+
+  <div class="yz_input__box">
+    <div class="div_center__box">
+      医嘱时间:
+      <div class="input__style"> {{ yiZhuData.orderTime }}</div>
+    </div>
+    <div>
+      父医嘱:
+      <el-select v-model="yiZhuData.parentNo"
+                 :disabled="yiZhuData.serial === '00'"
+                 id="yz_parentNo"
+                 clearable
+                 @clear="yiZhuData.parentNo = null" @focus="fuYiZhuClick">
+        <el-option v-for="item in fuYiZhuData" :key="item.code" :label="item.name" :value="item.code">
+          <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
+          <el-divider direction="vertical"></el-divider>
+          <span>{{ item.name }}</span>
+        </el-option>
+      </el-select>
+    </div>
+    <div :title="yiZhuData.discription" class="div_center__box">
+      描述:
+      <div class="input__style" style="overflow: auto;width: 240px">
+        {{ yiZhuData.discription }}
+      </div>
+    </div>
+    <div>
+      <!--  皮试药品    -->
+      <el-select></el-select>
+    </div>
+  </div>
+
+  <div class="yz_input__box">
+    <div class="div_center__box" :title="yiZhuData.instruction">
+      <div style="width: 87px">
+        医生嘱托:
+      </div>
+
+      <el-input v-model="yiZhuData.instruction"
+                clearable
+                maxlength="50"
+                show-word-limit></el-input>
+    </div>
+    <div class="div_center__box">
+      <el-select v-model="yiZhuData.kfFlag"
+                 id="yz_kfFlag"
+                 clearable style="width: 80px" @clear="yiZhuData.kfFlag = null">
+        <el-option key="1" label="饭前" value="1"></el-option>
+        <el-option key="2" label="饭后" value="2"></el-option>
+      </el-select>
+    </div>
+    <div>
+      费用标志:
+      <el-select v-model="yiZhuData.selfBuy"
+                 id="yz_selfBuy"
+                 clearable style="width: 120px"
+                 @clear="yiZhuData.selfBuy = null">
+        <el-option key="1" label="自备" value="1"></el-option>
+        <el-option key="2" label="嘱托" value="2"></el-option>
+        <el-option key="3" label="基数药" value="3"></el-option>
+      </el-select>
+    </div>
+    <div class="div_center__box">
+      <xc-checkbox
+          label="医保自费"
+          v-model="yiZhuData.ybSelfFlag"
+          inactive-value="0"
+          active-value="1"/>
+      &nbsp;&nbsp;&nbsp;
+      <xc-checkbox
+          label="紧急"
+          v-model="yiZhuData.emergencyFlag"
+          active-value="1"
+          inactive-value="0"
+      />
+    </div>
+
+  </div>
+
+  <el-form v-if="false" ref="yiZhuRef" v-model="yiZhuData" label-width="90px" size="small">
     <el-row>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="医嘱名称:" prop="orderName">
@@ -60,7 +248,7 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="频率:" prop="frequCode">
-          <xc-table-v3 style="width: 120px"
+          <xc-select-v3 style="width: 120px"
                        v-model="yiZhuData"
                        :data="yaoPinPingLvData"
                        code="frequCode"
@@ -102,7 +290,7 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="给药方式:" prop="supplyCode">
-          <xc-table-v3
+          <xc-select-v3
               style="width: 120px"
               v-model="yiZhuData"
               :data="geiYaoFangShiData"
@@ -150,7 +338,7 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="执行科室:" prop="execUnit">
-          <xc-table-v3
+          <xc-select-v3
               style="width: 120px"
               v-model="yiZhuData"
               :data="zhiXingKeShiData"
@@ -299,10 +487,15 @@
   <xc-code code="Alt + ← / →" description="编辑(←) / 复制 (→)"/>
   <xc-code code="Alt + D " description="删除选中的医嘱"/>
   <el-button @click="dianJiXiuGaiZhiXingKeShi">修改执行科室</el-button>
+  <yz-table
+      :data="yiZhuList">
+
+  </yz-table>
   <el-table
+      v-if="false"
       :data="yiZhuList"
       ref="elTableRef"
-      :height="windowSize.h / 2.4"
+      :height="200"
       @selection-change="dianJiXuanZhongShuJu"
       :row-class-name="doctorSOrderForm"
       @row-click="whenClickingOnTheForm"
@@ -384,7 +577,6 @@
                  @muBanShuJu="muBanShuJu"/>
   <!-- 保存模板用 -->
   <bao-cun-mu-ban v-if="baoCunMuBanRef" v-model="baoCunMuBanRef" :list="yiZhuList"/>
-
 </template>
 
 <script name="TianJiaYiZhu" setup="props,context">
@@ -412,19 +604,21 @@ import {uuid} from '@/utils/getUuid'
 import BaoCunMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunMuBan.vue'
 import {getServerDateApi, whetherThePatientHasAllergens} from '@/api/public-api'
 import router from '@/router'
-import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue'
 import YaoPingXiangQing from '@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue'
 import AllergenEntry from '@/components/zhu-yuan-yi-sheng/AllergenEntry.vue'
 import Sleep from '@/utils/sleep'
 import {disableShortcutKeys, enableShortcutKeys, logoutShortcut, xcHotKey} from '@/utils/xckeydown'
 import {BizException, ExceptionEnum} from '@/utils/BizException'
 import {setScrollTop} from "@/utils/el-table-scroll";
-import XcTableV3 from "@/components/xiao-chan/table-v3/XcTableV3.vue";
+
 import sleep from "@/utils/sleep";
 import BaoCunXinXi from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunXinXi.vue";
 import {useDocumentVisibility} from "@vueuse/core";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
 import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid";
+import XcCheckbox from "@/components/xiao-chan/checkbox/XcCheckbox";
+import YzTable from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YzTable";
+import XcSelectV3 from "@/components/xiao-chan/select-v3/XcSelectV3";
 
 
 const props = defineProps({
@@ -501,6 +695,7 @@ const yiZhuData = ref({
   kfFlag: null,
   selfBuy: null,
   ybSelfFlag: '0',
+  ybSelfFlagBoolean: false,
   emergencyFlag: '0',
   drugQuan: 0,
   miniUnitName: '',
@@ -538,6 +733,8 @@ watch(
 
 // 搜索医嘱
 const xuanZhongFeiYong = async (row) => {
+
+
   fuYiZhuClick()
   qingKong()
   await Sleep(200)
@@ -1227,7 +1424,6 @@ onMounted(async () => {
     ElMessage.warning('您现在进入的是医嘱模板编辑')
   } else {
     document.title = `医嘱录入:【${props.patientInfo.name}】`
-    ElMessage.warning('您现在进入的是医嘱编辑模块,' + '您的编辑时间有 30 分钟,你准备好了吗?')
     kaiQiDaoJiShi()
     whetherThePatientHasAllergens(props.patientInfo.inpatientNo).then((res) => {
       allergenDialog = res
@@ -1244,7 +1440,7 @@ onMounted(async () => {
     ]
   }
   fuZhiYiZhu.value = []
-  // testData()
+  testData()
 })
 
 
@@ -1428,7 +1624,7 @@ const testData = () => {
       "drugQuan": null,
       "supplyCode": null,
       "supplyCodeName": null,
-      "actOrderNo": null,
+      "actOrderNo": "56547553",
       "drugFlag": "o",
       "enterOper": null,
       "enterTime": null,
@@ -1508,6 +1704,29 @@ const testData = () => {
   color: #0a84fd;
 }
 
+.yz_input__box {
+  display: flex;
+  margin-top: 6px;
+  flex-wrap: wrap;
+
+  div {
+    margin-left: 3px;
+  }
+
+  .div_center__box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+
+  .input__style {
+    width: 125px;
+    line-height: 22px;
+    height: 22px;
+    border: 1px solid
+  }
+}
+
 
 </style>
 

+ 83 - 59
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -1,61 +1,64 @@
 <template>
   <div style="width: 100%;">
-    <el-date-picker
-        v-model="dateRange"
-        :shortcuts="shortcuts"
-        end-placeholder="结束日期"
-        placeholder="选择日期"
-        range-separator="至"
-        size="small"
-        start-placeholder="开始日期"
-        style="width: 220px"
-        type="daterange"/>
-    医嘱名称:
-    <el-select v-model="orderName" :remote-method="remoteMethodChargeCode" clearable filterable remote
-               style="width: 120px">
-      <el-option v-for="item in yiZhuMingZiData" :key="item.code" :label="item.name" :value="item.code">
-        <span>{{ item.name }}</span>
-      </el-option>
-    </el-select>
-    医嘱号:
-    <el-input v-model="actOrderNo"
-              style="width: 120px"
-              onkeyup="this.value=this.value.replace(/[^\d]/g,'') "/>
-    频率:
-    <el-select v-model="pinLv" :disabled="zhuangTai === 8 || zhuangTai === 9" clearable filterable size="small"
-               style="width: 120px">
-      <el-option v-for="item in huanZhePinLvData" :key="item.code" :label="item.name" :value="item.code">
-        <span>{{ item.name }}</span>
-      </el-option>
-    </el-select>
-    状态:
-    <el-select v-model="zhuangTai" filterable size="small" style="width: 120px" @change="zhuangTaiXuanZhe">
-      <el-option v-for="item in zhuangTaiList" :key="item.code" :label="item.name" :value="item.code">
-        <span>{{ item.code }}</span>
-        <el-divider direction="vertical"/>
-        <span>{{ item.name }}</span>
-      </el-option>
-    </el-select>
-    <el-divider direction="vertical"/>
-    <el-button icon="Search" type="primary" @click="chaXunYiZhuClick(0)">查询</el-button>
-    <el-divider style="margin: 2px 0"></el-divider>
-    <el-tag effect="dark" type="info">录入</el-tag>
-    <el-tag effect="dark" type="success">确认</el-tag>
-    <el-tag effect="dark">执行</el-tag>
-    <el-tag effect="dark" type="danger">停止</el-tag>
-    <el-divider direction="vertical"></el-divider>
-    <el-button icon="Plus" type="primary" @click="addYiZhuClick"> 添加</el-button>
-    <el-button type="warning" :disabled="xuanZhongDeShuJu.length === 0" @click="clickBatchStop">批量停止</el-button>
-    <el-divider direction="vertical"></el-divider>
-    <el-button :disabled="xuanZhongDeShuJu.length === 0" type="success" @click="dianJiFuZhuXuanZhongYiZhu">复制选中医嘱
-    </el-button>
-    <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
-               @click="clickToModifyTheDoctorSOrderTime"> 修改医嘱时间
-    </el-button>
-    <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
-    </el-button>
-    <el-button type="primary" @click="openElectronicMedicalRecord"> 电子病历</el-button>
-    <el-button type="danger" @click="clickDrugReturn"> 退药</el-button>
+    <yz-query-condition :patient-info="huanZheXinXi"/>
+    <div v-if="false">
+      <el-date-picker
+          v-model="dateRange"
+          :shortcuts="shortcuts"
+          end-placeholder="结束日期"
+          placeholder="选择日期"
+          range-separator="至"
+          size="small"
+          start-placeholder="开始日期"
+          style="width: 220px"
+          type="daterange"/>
+      医嘱名称:
+      <el-select v-model="orderName" :remote-method="remoteMethodChargeCode" clearable filterable remote
+                 style="width: 120px">
+        <el-option v-for="item in yiZhuMingZiData" :key="item.code" :label="item.name" :value="item.code">
+          <span>{{ item.name }}</span>
+        </el-option>
+      </el-select>
+      医嘱号:
+      <el-input v-model="actOrderNo"
+                style="width: 120px"
+                onkeyup="this.value=this.value.replace(/[^\d]/g,'') "/>
+      频率:
+      <el-select v-model="pinLv" :disabled="zhuangTai === 8 || zhuangTai === 9" clearable filterable size="small"
+                 style="width: 120px">
+        <el-option v-for="item in huanZhePinLvData" :key="item.code" :label="item.name" :value="item.code">
+          <span>{{ item.name }}</span>
+        </el-option>
+      </el-select>
+      状态:
+      <el-select v-model="zhuangTai" filterable size="small" style="width: 120px" @change="zhuangTaiXuanZhe">
+        <el-option v-for="item in zhuangTaiList" :key="item.code" :label="item.name" :value="item.code">
+          <span>{{ item.code }}</span>
+          <el-divider direction="vertical"/>
+          <span>{{ item.name }}</span>
+        </el-option>
+      </el-select>
+      <el-divider direction="vertical"/>
+      <el-button icon="Search" type="primary" @click="chaXunYiZhuClick(0)">查询</el-button>
+      <el-divider style="margin: 2px 0"></el-divider>
+      <el-tag effect="dark" type="info">录入</el-tag>
+      <el-tag effect="dark" type="success">确认</el-tag>
+      <el-tag effect="dark">执行</el-tag>
+      <el-tag effect="dark" type="danger">停止</el-tag>
+      <el-divider direction="vertical"></el-divider>
+      <el-button icon="Plus" type="primary" @click="addYiZhuClick"> 添加</el-button>
+      <el-button type="warning" :disabled="xuanZhongDeShuJu.length === 0" @click="clickBatchStop">批量停止</el-button>
+      <el-divider direction="vertical"></el-divider>
+      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="success" @click="dianJiFuZhuXuanZhongYiZhu">复制选中医嘱
+      </el-button>
+      <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)"
+                 @click="clickToModifyTheDoctorSOrderTime"> 修改医嘱时间
+      </el-button>
+      <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
+      </el-button>
+      <el-button type="primary" @click="openElectronicMedicalRecord"> 电子病历</el-button>
+      <el-button type="danger" @click="clickDrugReturn"> 退药</el-button>
+    </div>
     <xc-table :data="yiZhuPage"
               row-key="id"
               @currentChange="handleCurrentChange"
@@ -71,8 +74,6 @@
           <el-tag :type="getYiZhuFlag(scope.row.statusFlag)" effect="dark">
             {{ scope.row.actOrderNo }}
           </el-tag>
-          <span v-html="getFeeInfor(scope.row.actOrderNo)">
-                        </span>
         </template>
       </el-table-column>
       <el-table-column fixed="left" width="20">
@@ -200,6 +201,7 @@ import sleep from "@/utils/sleep";
 import DoctorSOrderFee from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/DoctorSOrderFee.vue";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
 import {ElMessage, ElMessageBox} from "element-plus";
+import YzQueryCondition from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YzQueryCondition";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -303,7 +305,18 @@ const clearSelection = () => {
  * 下面这里是添加医嘱了
  */
 const addYiZhuClick = () => {
+  let key = huanZheXinXi.value.inpatientNo + huanZheXinXi.value.admissTimes + 'yzOrder'
+  let temp = localStorage.getItem('residentDoctor')
+  if (temp !== null) {
+    temp = JSON.parse(temp)
 
+    if (temp.length > 5) {
+      BizException(ExceptionEnum.LOGICAL_ERROR, '打开的窗口太多了请先关闭一些。')
+    }
+    if (temp.includes(key)) {
+      BizException(ExceptionEnum.LOGICAL_ERROR, '此患者,已经有打开的医嘱窗口了,请勿重新打开。')
+    }
+  }
   let routeData = router.resolve({
     name: 'openNewWindow',
     query: {
@@ -320,6 +333,18 @@ const addYiZhuClick = () => {
  */
 const openElectronicMedicalRecord = () => {
   if (youWuXuanZheHuanZhe()) return
+  let key = huanZheXinXi.value.inpatientNo + huanZheXinXi.value.admissTimes + 'yzOrder'
+  let temp = localStorage.getItem('residentDoctor')
+  if (temp !== null) {
+    temp = JSON.parse(temp)
+    if (temp.length > 5) {
+      BizException(ExceptionEnum.LOGICAL_ERROR, '打开的窗口太多了请先关闭一些。')
+    }
+
+    if (temp.includes(key)) {
+      BizException(ExceptionEnum.LOGICAL_ERROR, '此患者,已经有打开的医嘱窗口了,请勿重新打开。')
+    }
+  }
   let routeData = router.resolve({
     name: 'openNewWindow',
     query: {
@@ -535,7 +560,6 @@ const jumpToMedicalRecord = () => {
  * 点击医嘱退药
  */
 const clickDrugReturn = () => {
-  console.log(xuanZhongDeShuJu.value)
   if (xuanZhongDeShuJu.value.length === 0) {
     return ElMessage.error('请先选中数据')
   }

+ 25 - 74
src/views/settings/Test.vue

@@ -1,88 +1,39 @@
 <template>
-  <xc-combo-grid
-      style="width: 240px"
-      clearable
-      row-key="id"
-      :current-key="obj.code + obj.serial"
-      @rowClick="rowClick"
-      :table-header="tableHeader"
-      :query-data-func="huoQuXiangMu"
-      v-model="obj.name">
-    <el-table-column label="药品详情" fixed="left">
-      <template #default="scope">
-        <el-button
-            v-if="scope.row.serial !== '00'"
-            @click.stop.prevent="queryDrugDetails(scope.row.orderCode.trim() + '_' + scope.row.serial.trim())">
-          药品详情
-        </el-button>
-      </template>
-    </el-table-column>
-  </xc-combo-grid>
 </template>
 
 <script setup name='Test'>
 
 
-import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid";
-import {huoQuXiangMu} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
-
-let obj = $ref({
-  code: '01128',
-  name: '注射用脂溶性维生素(Ⅱ)',
-  serial: '01'
-})
-
-const rowClick = (row) => {
-  obj.code = row.orderCode
-  obj.name = row.orderName
-  obj.serial = row.serial
-  console.log(row)
-}
-
-const queryDrugDetails = (row) => {
-  console.log(row)
-}
-
-watch(() => obj, () => {
-  console.log(obj)
-}, {deep: true})
-
-let data = $ref([])
-
-let tableHeader = [
-  {label: '编码', prop: 'orderCode'},
-  {label: '名称', prop: 'orderName'},
-  {label: '规格', prop: 'drugSpecification'},
-  {label: '描述', prop: 'discription'},
-  {label: '库存', prop: 'stockAmount'},
-  {label: '大包装', prop: 'specPack'},
-  {label: '医保类型', prop: 'ybFlagNew'},
-  {label: '医保编码', prop: 'nationalCode'},
-  {label: '医保名称', prop: 'nationalName'},
-  {label: '医保备注', prop: 'ybComment'},
-  {label: '大输液', prop: 'infusionFlagName'},
-  {label: '厂家', prop: 'manuName'},
-  {label: '类型', prop: 'orderType'},
-  {label: '毒麻类型', prop: 'drugFlagName'}
+let tableData = [
+  {
+    no: 0,
+    date: "2022-01-01",
+    name: "徐凤年",
+    address: "北凉国",
+  },
+  {
+    no: 1,
+    date: "2022-01-02",
+    name: "姜泥",
+    address: "楚国",
+  },
+  {
+    no: 2,
+    date: "2022-01-03",
+    name: "王仙芝",
+    address: "武帝城",
+  },
+  {
+    no: 3,
+    date: "2022-01-04",
+    name: "李淳罡",
+    address: "剑仙一键开天门",
+  }
 ]
-for (let i = 0; i < 100; i++) {
-  data.push({
-    name: i + 'name',
-    data: i + 'name'
-  })
-}
-
 </script>
 
 <style lang="scss" scoped>
-table, tr, td {
-  border-collapse: collapse;
-  border: 1px solid;
-}
 
-table {
-  width: 100%;
-}
 
 </style>