Преглед изворни кода

优化住院医生以及组件

DESKTOP-MINPJAU\Administrator пре 3 година
родитељ
комит
59b78ef22c

+ 7 - 5
src/App.vue

@@ -2,16 +2,16 @@
   <el-config-provider :locale="locale">
     <router-view v-slot="{ Component }">
       <keep-alive>
-        <component :is="Component" />
+        <component :is="Component"/>
       </keep-alive>
     </router-view>
   </el-config-provider>
 </template>
 
 <script>
-import { defineComponent } from 'vue'
+import {defineComponent} from 'vue'
 import locale from 'element-plus/lib/locale/lang/zh-cn'
-import { useStore } from 'vuex'
+import {useStore} from 'vuex'
 
 export default defineComponent({
   name: 'App',
@@ -38,7 +38,7 @@ export default defineComponent({
 function getWindowSize() {
   const w = window.innerWidth
   const h = window.innerHeight - 96
-  return { w, h }
+  return {w, h}
 }
 </script>
 
@@ -199,5 +199,7 @@ table th.star div::before {
   margin-right: 4px;
 }
 
-
+.el-select-dropdown__item.selected {
+  background-color: #71abed66;
+}
 </style>

+ 0 - 1
src/components/si-sheet-upload/jie-suan-dan-xiu-gai/JieSuanDanXiuGaiShouShu.vue

@@ -144,7 +144,6 @@ const addShouShuClick = async () => {
   try {
     await form.validate()
     emit('addShouShuClick', formShouShu)
-    console.log(formShouShu)
   } catch (e) {
 
   }

+ 78 - 35
src/components/xc/select/XcSelect.vue

@@ -1,35 +1,40 @@
 <template>
   <el-select v-model="modelObj" :clearable="props.clearable"
-             :filter-method="xcFilter" :remote="props.remote"
-             :remote-method="xcMethod" :style="{width: props.width}"
+             :remote="props.remote" :remote-method="xcMethod"
+             :style="{width: props.width + 'px'}"
              filterable @change="changeStaff" @clear="clear">
-    <el-option v-for="(item,index) in tempData" :key="item.index"
+    <el-option v-for="(item,index) in props.data" :key="item.index"
                :label="item.name"
                :value="{value:item.code,label:item.name}">
-      <template v-for="(opitem,index) in optionList">
+      <template v-for="(opitem,index) in optionList" v-if="optionList.length > 0">
         <el-divider v-if="index !== 0" direction='vertical'></el-divider>
         <span :style="opitem.style">{{ item[opitem.label] }}</span>
       </template>
+      <template v-else>
+        <span>{{ item.code }}</span>
+        <el-divider direction='vertical'></el-divider>
+        <span>{{ item.name }}</span>
+      </template>
     </el-option>
   </el-select>
 </template>
 
 <script name="XcSelect" setup>
-
 import {debounce} from "@/utils/debounce";
+import {stringNotBlank} from "@/utils/blank-utils";
+import {onMounted, watch} from 'vue'
 
 const props = defineProps({
   modelValue: {
     type: Object,
-    default: ''
   },
   name: {
     type: Array,
     default: ['code', 'name']
   },
   width: {
-    type: String,
-    default: '220px'
+    type: Number,
+    default: 120
   },
   data: {
     type: Array,
@@ -45,7 +50,7 @@ const props = defineProps({
   }
 })
 
-const emit = defineEmits(['method'])
+const emit = defineEmits(['method', 'change'])
 
 let modelObj = $ref({
   value: '',
@@ -60,9 +65,10 @@ const colorList = {
   'warning': '#E6A23C'
 }
 
-const changeStaff = () => {
+const changeStaff = (val) => {
   props.modelValue[props.name[0]] = modelObj.value
   props.modelValue[props.name[1]] = modelObj.label
+  emit('change', props.data.find((i) => i.code === modelObj.value))
 }
 
 const clear = () => {
@@ -75,42 +81,79 @@ const clear = () => {
 }
 
 const xcMethod = debounce(value => {
-  if (value.length > 1) {
-    emit('method', value)
+  if (stringNotBlank(value) && value.length > 1) {
+    method(value)
   }
 }, 400)
 
-const xcFilter = (val) => {
-  if (props.data.length > 0) {
-    console.log(val)
+/**
+ * 监听父组件的值是否改变
+ * 如果改变了那么就,要执行查询动作
+ * 如果 props.data 里面有值了就不用查询
+ * props.data 里面没有值对得上那就需要执行查询动作了
+ *
+ */
+watch(() => props.modelValue[props.name[0]], () => {
+  modelObj = {
+    value: props.modelValue[props.name[0]],
+    label: props.modelValue[props.name[1]],
   }
-}
+  let code = props.modelValue[props.name[0]]
+  if (!updateData()) {
+    if (stringNotBlank(code)) {
+      method(code)
+    }
+  }
+})
 
-const tempData = computed(() => {
-  return props.data.filter(item => {
-    console.log(item.code.toString().indexOf(modelObj) > -1)
-    return item.code.toString().indexOf(modelObj) > -1 // && item.name.toString().indexOf(modelObj) > -1
-  })
+watch(() => props.data, () => {
+  updateData()
 })
 
+const updateData = () => {
+
+  let code = props.modelValue[props.name[0]]
+  if (stringNotBlank(code)) {
+    let codeList = props.data.find((i) => i.code === code)
+    if (typeof codeList !== 'undefined') {
+      modelObj = {
+        value: codeList.code,
+        label: codeList.name,
+      }
+      props.modelValue[props.name[0]] = modelObj.value
+      props.modelValue[props.name[1]] = modelObj.label
+      return true
+    }
+    return false
+  }
+}
+
+const method = (value) => {
+  emit('method', value)
+}
+
 onMounted(() => {
-  for (let item of useSlots().default()) {
-    if (item.props !== null) {
-      let style = {}
-      if (typeof item.props.style === 'undefined') {
-        if (typeof item.props.type === 'undefined') {
-          style = {'color': '#8492a6'}
+  // 判断组件是否使用了 slot
+  if (!!useSlots().default) {
+    // 判断 slot 有没有想要的值
+    for (let item of useSlots().default()) {
+      if (item.props !== null) {
+        let style = {}
+        if (typeof item.props.style === 'undefined') {
+          if (typeof item.props.type === 'undefined') {
+            style = {'color': '#8492a6'}
+          } else {
+            style = {'color': colorList[item.props.type]}
+          }
         } else {
-          style = {'color': colorList[item.props.type]}
+          style = item.props.style
         }
-      } else {
-        style = item.props.style
-      }
-      let data = {
-        label: item.props.label,
-        style: style,
+        let data = {
+          label: item.props.label,
+          style: style,
+        }
+        optionList.push(data)
       }
-      optionList.push(data)
     }
   }
 })

+ 14 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunMuBan.vue

@@ -45,6 +45,19 @@ const inputType = ref(3)
 const sortNo = ref(0)
 const list = ref([])
 
+const daKaiBaoCunMuBan = (val) => {
+  if (stringNotBlank(muBanMing.value.patternName)) {
+    patternName.value = muBanMing.value.patternName
+    sortNo.value = muBanMing.value.sortNo
+    inputType.value = muBanMing.value.inputType
+  }
+  list.value = val
+  dialog.value = true
+  title.value = '保存模板'
+  flag.value = 1
+
+}
+
 const dianJiBaoCun = () => {
   if (flag.value === 1) {
     let data = {
@@ -92,6 +105,7 @@ const qingKong = () => {
   muBanMing.value = {}
 }
 
+defineExpose({daKaiBaoCunMuBan})
 </script>
 
 <style scoped>

+ 6 - 1
src/router/modules/dashboard.js

@@ -364,7 +364,12 @@ const route = [
                         path: 'xinZengShuJu',
                         name: 'xinZengShuJu',
                         component: createNameComponent(() => import('@/views/hospitalization/zhu-yuan-yi-sheng/XinZengShuJu.vue')),
-                        meta: {title: '新增数据', hideTabs: true, blankPage: true},
+                        meta: {
+                            title: '新增数据',
+                            hideTabs: true,
+                            activeMenu: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
+                            blankPage: true
+                        },
                     },
                     {
                         path: 'yiZhuLuRu',

+ 120 - 181
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -37,34 +37,22 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="频率:" prop="frequCode">
-          <el-select
-              v-model="yiZhuData.frequCode"
-              :remote-method="pinLvRemoteMethod"
-              clearable
-              filterable
-              remote
-              size="mini"
-              @change="yiZhuData.frequCode === 'ONCE' ? (yiZhuData.endTime = null) : ''"
-          >
-            <el-option v-for="item in yaoPinPingLvData" :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>
+          <XcSelect v-model="yiZhuData" :data="yaoPinPingLvData"
+                    :name="['frequCode','frequCodeName']" clearable remote
+                    @method="pinLvRemoteMethod">
+          </XcSelect>
         </el-form-item>
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="一次剂量:" prop="dose">
           <el-input-number v-model="yiZhuData.dose" :min="0" :precision="2" style="width: 110px"
                            @change="jiSuanLingLiang"></el-input-number>
-          <el-select v-model="yiZhuData.doseUnit" size="mini" style="width: 80px" @change="xuanZheJiLiang">
-            <el-option v-for="item in yaoPinJiLiangData" :key="item.code" :label="item.name" :value="item.code">
-              <span style="color: #8492a6; font-size: 12px">{{ item.value }}</span>
-              <el-divider direction="vertical"></el-divider>
-              <span>{{ item.name }}</span>
-            </el-option>
-          </el-select>
+          <XcSelect v-model="yiZhuData" :data="yaoPinJiLiangData"
+                    :name="['doseUnit','doseUnitName']" :width="80"
+                    @change="xuanZheJiLiang">
+            <XcOption label="value"></XcOption>
+            <XcOption label="name"></XcOption>
+          </XcSelect>
         </el-form-item>
       </el-col>
       <el-col :span="span">
@@ -72,14 +60,11 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="给药方式:" prop="supplyCode">
-          <el-select v-model="yiZhuData.supplyCode" :remote-method="geiYaoFangShiRemoteMethod" filterable remote
-                     size="mini">
-            <el-option v-for="item in geiYaoFangShiData" :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>
+          <XcSelect v-model="yiZhuData" :data="geiYaoFangShiData"
+                    :name="['supplyCode','supplyCodeName']" clearable
+                    remote
+                    @method="geiYaoFangShiRemoteMethod">
+          </XcSelect>
         </el-form-item>
       </el-col>
       <el-col :span="span">
@@ -117,14 +102,10 @@
       </el-col>
       <el-col :span="span">
         <el-form-item class="bi_tian" label="执行科室:" prop="execUnit">
-          <el-select v-model="yiZhuData.execUnit" :remote-method="metZhiXingKeShi" filterable remote
-                     style="width: 120px">
-            <el-option v-for="item in zhiXingKeShiData" :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>
+          <XcSelect v-model="yiZhuData" :data="zhiXingKeShiData"
+                    :name="['execUnit','execUnitName']"
+                    remote @method="metZhiXingKeShi">
+          </XcSelect>
         </el-form-item>
       </el-col>
       <el-col :span="span">
@@ -134,8 +115,8 @@
             <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
-            >
+              <span>{{ item.name }}</span>
+            </el-option>
           </el-select>
         </el-form-item>
       </el-col>
@@ -310,6 +291,9 @@ import router from '@/router'
 import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue'
 import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
 import YaoPingXiangQing from '@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue'
+import XcSelect from "@/components/xc/select/XcSelect.vue";
+import XcOption from "@/components/xc/select/XcOption.vue";
+
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -319,8 +303,6 @@ const windowSize = computed(() => {
 const seconds = ref(600)
 // 倒计时提示
 const count = ref('')
-// 搜索药品的输入框
-const searchInput = ref(null)
 
 const yiZhuData = ref({
   id: '',
@@ -387,131 +369,115 @@ watch(
 // 搜索医嘱
 let yiZhuMingDialog = $ref(false)
 const xuanZhongFeiYong = (row) => {
-  yiZhuMingDialog = false
   qingKong()
-  yiZhuData.value = clone(row)
-  if (row.serial !== '00') {
-    huoQuFeiYongXinXi(row.orderCode, row.serial)
-        .then((res) => {
-          yiZhuData.value.drugFlag = row.orderType
-          // 判断是否 是皮试的药 如果是就只能有这些 给药方式
-          if (res.data.psFlag === 1) {
-            geiYaoFangShiData.value = res.piShi
-            tiShiBiaoTi.value.push({title: '该药品为皮试药品给药方式只能是皮试类型', type: 'warning'})
-            yiZhuData.value.psFlag = true
-          } else {
-            geiYaoFangShiData.value = []
-            yiZhuData.value.psFlag = false
-          }
-          yiZhuData.value.kjywFlag = res.data.kjywFlag
-          if (yiZhuData.value.kjywFlag === 1) {
-            tiShiBiaoTi.value.push({title: '该药品为抗菌药物,请填写抗菌药物医嘱附注信息录入。', type: 'error'})
-          }
-          if (res.data.selfFlagYb === 1) {
-            tiShiBiaoTi.value.push({title: '该药品医保自费药品,如符合条件请填写记账,不是请填写自费。'})
-          }
-          yiZhuData.value.miniUnitName = res.data.miniUnitName
-          yaoPinJiLiangData.value = res.yaoPingJiLiang
-          // 加载 剂量单位
-          if (stringNotBlank(yiZhuData.value.doseUnit)) {
-            yaoPinJiLiangData.value.forEach((item) => {
-              if (item.code === yiZhuData.value.doseUnit) {
-                jiLiangValue.value = item.value
+  setTimeout(() => {
+    yiZhuMingDialog = false
+    yiZhuData.value = row
+    if (row.serial !== '00') {
+      huoQuFeiYongXinXi(row.orderCode, row.serial)
+          .then((res) => {
+            yiZhuData.value.drugFlag = row.orderType
+            // 判断是否 是皮试的药 如果是就只能有这些 给药方式
+            if (res.data.psFlag === 1) {
+              geiYaoFangShiData.value = res.piShi
+              tiShiBiaoTi.value.push({title: '该药品为皮试药品给药方式只能是皮试类型', type: 'warning'})
+              yiZhuData.value.psFlag = true
+            } else {
+              yiZhuData.value.psFlag = false
+            }
+            yiZhuData.value.kjywFlag = res.data.kjywFlag
+            if (yiZhuData.value.kjywFlag === 1) {
+              tiShiBiaoTi.value.push({title: '该药品为抗菌药物,请填写抗菌药物医嘱附注信息录入。', type: 'error'})
+            }
+            if (res.data.selfFlagYb === 1) {
+              tiShiBiaoTi.value.push({title: '该药品医保自费药品,如符合条件请填写记账,不是请填写自费。'})
+            }
+            yiZhuData.value.miniUnitName = res.data.miniUnitName
+            yaoPinJiLiangData.value = res.yaoPingJiLiang
+            // 加载 剂量单位
+            if (stringNotBlank(yiZhuData.value.doseUnit)) {
+              yaoPinJiLiangData.value.forEach((item) => {
+                if (item.code === yiZhuData.value.doseUnit) {
+                  jiLiangValue.value = item.value
+                }
+              })
+            } else if (listNotBlank(yaoPinJiLiangData.value)) {
+              // 没有剂量单位的时候默认加载第一个计量单位 并且计算
+              yiZhuData.value.doseUnit = yaoPinJiLiangData.value[0].code
+              yiZhuData.value.dose = yaoPinJiLiangData.value[0].value
+              jiLiangValue.value = yaoPinJiLiangData.value[0].value
+              jiSuanLingLiang(yaoPinJiLiangData.value[0].value)
+            }
+            // 加载默认频率 如果已经填写了 就用有的
+            if (stringIsBlank(row.frequCode)) {
+              if (stringNotBlank(res.data.frequCode)) {
+                yiZhuData.value.frequCode = res.data.frequCode
+              } else {
+                yiZhuData.value.frequCode = 'ONCE'
               }
-            })
-          } else if (listNotBlank(yaoPinJiLiangData.value)) {
-            // 没有剂量单位的时候默认加载第一个计量单位 并且计算
-            yiZhuData.value.doseUnit = yaoPinJiLiangData.value[0].code
-            yiZhuData.value.dose = yaoPinJiLiangData.value[0].value
-            jiLiangValue.value = yaoPinJiLiangData.value[0].value
-            jiSuanLingLiang(yaoPinJiLiangData.value[0].value)
-          }
-          // 加载默认频率 如果已经填写了 就用有的
-          if (stringNotBlank(row.frequCode)) {
-            pinLvRemoteMethod(yiZhuData.value.frequCode)
-          } else if (stringNotBlank(res.data.frequCode)) {
-            yiZhuData.value.frequCode = res.data.frequCode
-            pinLvRemoteMethod(yiZhuData.value.frequCode)
-          } else {
+            }
+            // 加载给药方式
+            if (stringIsBlank(yiZhuData.value.supplyCode)) {
+              if (stringNotBlank(res.data.supplyCode)) {
+                yiZhuData.value.supplyCode = res.data.supplyCode
+              }
+            }
+          })
+          .catch((e) => {
+            setTimeout(() => {
+              console.error(e)
+              qingKong()
+            }, 500)
+          })
+    } else {
+      yiZhuData.value.kjywFlag = 0
+      huoQuFeiYongXinXi(row.orderCode, '00')
+          .then((res) => {
+            yiZhuData.value.drugFlag = row.orderType
             yiZhuData.value.frequCode = 'ONCE'
-            pinLvRemoteMethod('ONCE')
-          }
-          // 加载给药方式
-          if (stringNotBlank(yiZhuData.value.supplyCode)) {
-            geiYaoFangShiRemoteMethod(yiZhuData.value.supplyCode)
-          } else if (stringNotBlank(res.data.supplyCode)) {
-            yiZhuData.value.supplyCode = res.data.supplyCode
-            geiYaoFangShiRemoteMethod(yiZhuData.value.supplyCode)
-          }
-        })
-        .catch((e) => {
-          setTimeout(() => {
-            console.error(e)
-            qingKong()
-          }, 100)
-        })
-  } else {
-    yiZhuData.value.kjywFlag = 0
-    huoQuFeiYongXinXi(row.orderCode, '00')
-        .then((res) => {
-          yiZhuData.value.drugFlag = row.orderType
-          yiZhuData.value.frequCode = 'ONCE'
-          pinLvRemoteMethod('ONCE')
-          if (stringNotBlank(res.paiChiYiZhu)) {
-            tiShiBiaoTi.value.push({title: res.paiChiYiZhu, type: 'error'})
-          }
-        })
-        .catch((e) => {
-          setTimeout(() => {
-            qingKong()
-          }, 100)
-        })
-  }
-  // 判断这个是不是 新添加的数据 如果是空的就是 新数据
-  if (stringIsBlank(row.newData)) {
-    getServerDateApi().then((res) => {
-      yiZhuData.value.orderTime = res
-      yiZhuData.value.startTime = res
-    })
-  }
-  // 加载剂量单位 )
-  // 用来加载默认的执行科室
-  if (stringIsBlank(row.execUnit)) {
-    if (stringNotBlank(huanZheXinXi.value.smallDept)) {
-      yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
-      zhiXingKeShiData.value.push({
-        code: huanZheXinXi.value.smallDept,
-        name: huanZheXinXi.value.smallDeptName,
+            if (stringNotBlank(res.paiChiYiZhu)) {
+              tiShiBiaoTi.value.push({title: res.paiChiYiZhu, type: 'error'})
+            }
+          })
+          .catch((e) => {
+            setTimeout(() => {
+              qingKong()
+            }, 500)
+          })
+    }
+    // 判断这个是不是 新添加的数据 如果是空的就是 新数据
+    if (stringIsBlank(row.newData)) {
+      getServerDateApi().then((res) => {
+        yiZhuData.value.orderTime = res
+        yiZhuData.value.startTime = res
       })
     }
-  } else {
-    metZhiXingKeShi(yiZhuData.value.execUnit)
-  }
-  if (stringIsBlank(row.id)) {
-    yiZhuData.value.id = uuid(8, 10)
-  }
+    // 用来加载默认的执行科室
+    if (stringIsBlank(row.execUnit)) {
+      if (stringNotBlank(huanZheXinXi.value.smallDept)) {
+        yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
+      }
+    }
+    if (stringIsBlank(row.id)) {
+      yiZhuData.value.id = uuid(8, 10)
+    }
+  }, 500)
 }
 
 /* 频率 */
 const yaoPinPingLvData = ref([])
 const pinLvRemoteMethod = (val) => {
-  if (val.length > 1) {
-    huoQuZhuYuanPinLv(val).then((res) => {
-      yaoPinPingLvData.value = res
-    })
-  }
+  huoQuZhuYuanPinLv(val).then((res) => {
+    yaoPinPingLvData.value = res
+  })
 }
 /* 选择剂量 */
 const yaoPinJiLiangData = ref([])
 const jiLiangValue = ref(0)
 const xuanZheJiLiang = (val) => {
-  yaoPinJiLiangData.value.forEach((item) => {
-    if (item.code === val) {
-      jiLiangValue.value = item.value
-      yiZhuData.value.dose = item.value
-      yiZhuData.value.drugQuan = 1
-    }
-  })
+  jiLiangValue.value = val.value
+  yiZhuData.value.dose = val.value
+  yiZhuData.value.drugQuan = 1
 }
 /*计算领量*/
 const jiSuanLingLiang = (val) => {
@@ -544,7 +510,6 @@ const fuYiZhuClick = () => {
 /* 获取执行科室 */
 const zhiXingKeShiData = ref([])
 const metZhiXingKeShi = (val) => {
-  if (stringIsBlank(val)) return
   huoQuZhiXinKeShi(val).then((res) => {
     zhiXingKeShiData.value = res
   })
@@ -576,7 +541,6 @@ const tianJiaYiZhu = () => {
           tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
           ElMessage.error('重复添加,老记录已删除。')
         }
-        tianJiaShiHuoQuXiaLaKuangDeZhi()
         tianJiaYiZhuWeiYiBiaoShi.value.push(yiZhuData.value.id)
         yiZhuList.value.push(clone(yiZhuData.value))
         qingKong()
@@ -586,35 +550,13 @@ const tianJiaYiZhu = () => {
       })
 }
 
-// 这里是获取下拉框中的值的
-const tianJiaShiHuoQuXiaLaKuangDeZhi = () => {
-  yaoPinPingLvData.value.forEach((item) => {
-    if (item.code === yiZhuData.value.frequCode) {
-      yiZhuData.value.frequCodeName = item.name
-    }
-  })
-  yaoPinJiLiangData.value.forEach((item) => {
-    if (item.code === yiZhuData.value.doseUnit) {
-      yiZhuData.value.doseUnitName = item.name
-    }
-  })
-  geiYaoFangShiData.value.forEach((item) => {
-    if (item.code === yiZhuData.value.supplyCode) {
-      yiZhuData.value.supplyCodeName = item.name
-    }
-  })
-  zhiXingKeShiData.value.forEach((item) => {
-    if (item.code === yiZhuData.value.execUnit) {
-      yiZhuData.value.execUnitName = item.name
-    }
-  })
-}
-
 /* 这个是点击单个修改的 */
 const xiuGaiYiZhu = (val) => {
   val.newData = true
   xuanZhongFeiYong(val)
   ElMessage.success('你点击了修改')
+  yiZhuList.value.splice(val, 1)
+  tianJiaYiZhuWeiYiBiaoShi.value.splice(val, 1)
 }
 
 /* 删除表格医嘱 */
@@ -776,10 +718,7 @@ const dianJiXiuGaiZhiXingKeShi = () => {
 
 const qingKong = () => {
   cuoWuXinXi.value = ''
-  zhiXingKeShiData.value = []
   yaoPinJiLiangData.value = []
-  yaoPinPingLvData.value = []
-  geiYaoFangShiData.value = []
   jiLiangValue.value = 0
   tiShiBiaoTi.value = []
   yiZhuData.value = {

+ 7 - 29
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -1,12 +1,6 @@
 <template>
   <el-container>
     <el-header>
-      <XcSelect v-model="te.teobj" :data="te.data" :name="['tea','teb']"
-                clearable>
-        <XcOption label="code" type="success"></XcOption>
-        <XcOption label="name" style="color: red"></XcOption>
-        <XcOption label="te"></XcOption>
-      </XcSelect>
       <el-date-picker
           v-model="dateRange"
           :shortcuts="shortcuts"
@@ -16,8 +10,7 @@
           size="mini"
           start-placeholder="开始日期"
           style="width: 220px"
-          type="daterange"
-      >
+          type="daterange">
       </el-date-picker>
       医嘱名称:
       <el-select v-model="orderName" :remote-method="remoteMethodChargeCode" clearable filterable remote
@@ -179,26 +172,6 @@ import store from '@/store'
 import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
 import {getServerDateApi} from '@/api/public-api'
 import router from '@/router'
-import XcSelect from "@/components/xc/select/XcSelect.vue";
-import XcOption from "@/components/xc/select/XcOption.vue";
-
-const te = $ref({
-  data: [
-    {code: 1, name: '小子1', te: '测试'},
-    {code: 2, name: '小子2', te: '测试'},
-    {code: 3, name: '小子3', te: '测试'},
-    {code: 4, name: '小子', te: '测试'},
-    {code: 5, name: '小子', te: '测试'}
-  ],
-  teobj: {
-    tea: '',
-    teb: '',
-  }
-})
-
-onUpdated(() => {
-  console.log(te.teobj)
-})
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -255,7 +228,6 @@ const zhuangTaiXuanZhe = (val) => {
 }
 
 const chaXunYiZhuClick = (total) => {
-  console.log(te.teobj)
   if (youWuXuanZheHuanZhe()) return
   const dateS = getDateRangeFormatDate(dateRange.value)
   let data = {
@@ -407,6 +379,12 @@ const dianJiFuZhuXuanZhongYiZhu = () => {
   fuZhiYiZhu.value = xuanZhongDeShuJu.value
 }
 
+// onMounted(() => {
+//   setTimeout(() => {
+//     addYiZhuClick()
+//   }, 300)
+// })
+
 onActivated(() => {
   getServerDateApi().then((res) => {
     dateRange.value[0] = getFormatDatetime(res, 'YYYY-MM-DD')