浏览代码

Merge branch 'master' of https://172.16.32.165/lighter/vue-intergration-platform

# Conflicts:
#	src/views/settings/Test.vue
lighter 3 年之前
父节点
当前提交
0d4d7c8d74

+ 13 - 5
src/components/xc/xc-table/XcTable.vue

@@ -1,8 +1,7 @@
 <template>
   <el-table
       ref="tableRef"
-      :data="!props.localPaging ? props.data.data :
-       props.data.data.slice((props.data.currentPage - 1) * props.data.pageSize,props.data.currentPage * props.data.pageSize) "
+      :data="tableData"
       style="width: 100%"
       :height="!props.height ? windowSize.h - 100 :props.height"
       @selection-change="selectionChange"
@@ -31,6 +30,7 @@
 import store from "@/store";
 import {ElMessage} from "element-plus";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
+import sleep from "@/utils/sleep";
 
 const props = defineProps({
   data: {
@@ -50,6 +50,7 @@ const props = defineProps({
   },
   localPaging: {
     type: Boolean,
+    default: false
   },
   openPaging: {
     type: Boolean,
@@ -81,6 +82,14 @@ const windowSize = computed(() => {
   return store.state.app.windowSize
 })
 
+const tableData = computed(() => {
+  if (props.localPaging) {
+    return props.data.data.slice((props.data.currentPage - 1) * props.data.pageSize, props.data.currentPage * props.data.pageSize)
+  } else {
+    return props.data.data
+  }
+})
+
 let flag = false // 默认 为全不选
 const selectAll = (selection) => {
   flag = !flag
@@ -111,13 +120,12 @@ const selectionChange = (selection) => {
 }
 
 const rowClick = (row, column, event) => {
-  let data = tableRef.value.getSelectionRows()
   if (row.children) {
     for (let i = 0, len = row.children.length; i < len; i++) {
-      tableRef.value.toggleRowSelection(row.children[i], !data.includes(row))
+      tableRef.value.toggleRowSelection(row.children[i])
     }
   }
-  tableRef.value.toggleRowSelection(row, !data.includes(row))
+  tableRef.value.toggleRowSelection(row)
   emit('rowClick', row, column, event);
 }
 

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

@@ -6,12 +6,13 @@
         <el-radio-button :label="2">个人模板</el-radio-button>
         <el-radio-button :label="3">科室模板</el-radio-button>
       </el-radio-group>
-      <el-table :data="jianChaFenLeiShuJu.data" :height="windowSize.h / 1.4" highlight-current-row stripe>
+      <el-table :data="jianChaFenLeiShuJu.data" :height="windowSize.h / 1.4" highlight-current-row stripe
+                @row-click="clickToViewData">
         <el-table-column label="名称" prop="name"></el-table-column>
         <el-table-column label="操作">
           <template #default="scope">
-            <el-button size="small" split-button type="primary" @click="ceBianLanDianJi('查看', scope.row)">查看</el-button>
-            <el-button v-if="chaZhaoLeiXing !== 1" type="danger" @click="ceBianLanDianJi('删除', scope.row)">删除
+            <el-button v-if="chaZhaoLeiXing !== 1" type="danger"
+                       @click.stop="clickDeleteTemplate( scope.row,scope.$index)">删除
             </el-button>
           </template>
         </el-table-column>
@@ -65,14 +66,16 @@
       </el-table>
     </el-main>
   </el-container>
-  <el-dialog v-model="xiangXiShuJu.dialog">
+  <el-dialog v-model="xiangXiShuJu.dialog" title="查询">
+    <el-button @click="okAndEdit">确定并编辑</el-button>
     <el-button @click="dianJiQueRenXuanZhong">确定</el-button>
     <el-button @click="xiangXiShuJu.dialog = false">取消</el-button>
-    <el-table :data="xiangXiShuJu.data" :height="windowSize.h / 2" @selection-change="xuanZhong">
+    <xc-table :data="{'data':xiangXiShuJu.data}" :height="windowSize.h / 2" @selection-change="xuanZhong"
+              :open-paging="false">
       <el-table-column type="selection"></el-table-column>
       <el-table-column label="项目名称" prop="orderName"></el-table-column>
       <el-table-column label="说明" prop="ybComment"></el-table-column>
-    </el-table>
+    </xc-table>
   </el-dialog>
   <el-dialog v-model="baoCunMuBan.dialog" center title="保存检查模板" width="30%">
     <el-form ref="baoCunMuBanRef" :model="baoCunMuBan" :rules="baoCunMuBanJiaoYan" label-width="80px">
@@ -140,6 +143,8 @@ import {yaoPinXiangMuPiPeiYiBao} from '@/api/public-api'
 import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
 import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
 import Sleep from '@/utils/sleep'
+import XcTable from "@/components/xc/xc-table/XcTable.vue";
+import {BizException, ExceptionEnum} from "@/utils/BizException";
 
 const props = defineProps({
   jianCha: {
@@ -199,8 +204,16 @@ const xuanZhong = (val) => {
   xuanZhongJianCha.value.daiXuanZhong = val
 }
 
+const okAndEdit = () => {
+  dianJiQueRenXuanZhong()
+  dianJiBianJi(xuanZhongJianCha.value.data[0], 0)
+}
+
 const dianJiQueRenXuanZhong = () => {
-  let tiShi = false
+  if (xuanZhongJianCha.value.daiXuanZhong.length === 0) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, "请先选中数据")
+  }
+  let tiShi = false;
   xuanZhongJianCha.value.daiXuanZhong.forEach((item) => {
     if (xuanZhongJianCha.value.weiBianMa.indexOf(item.orderCode) > -1) {
       tiShi = true
@@ -271,6 +284,34 @@ function baoCunShuJu() {
       })
 }
 
+
+const clickToViewData = ({code, bwCode}) => {
+  if (!props.jianCha) {
+    bwCode = ''
+  }
+  chaKanFenLeiXiangQing(code, chaZhaoLeiXing.value === 1 ? bwCode : 'mb', props.jianCha).then((res) => {
+    if (listNotBlank(res)) {
+      xiangXiShuJu.value.data = res
+      xiangXiShuJu.value.dialog = true
+    } else {
+      ElMessage.error('没有找到对应的数据')
+    }
+  })
+}
+
+const clickDeleteTemplate = ({code}, index) => {
+  ElMessageBox.confirm('是否要删除该检查模板', '提示', {
+    type: 'warning',
+  })
+      .then(() => {
+        shanShuJianChaMuBan(code, store.state.user.info.deptCode).then(() => {
+          jianChaFenLeiShuJu.value.data.splice(index, 1)
+        })
+      })
+      .catch(() => {
+      })
+}
+
 const ceBianLanDianJi = (name, {code, bwCode}) => {
   if (!props.jianCha) {
     bwCode = ''
@@ -285,14 +326,7 @@ const ceBianLanDianJi = (name, {code, bwCode}) => {
       }
     })
   } else if (name === '删除') {
-    ElMessageBox.confirm('是否要删除该检查模板', '提示', {
-      type: 'warning',
-    })
-        .then(() => {
-          shanShuJianChaMuBan(code, store.state.user.info.deptCode)
-        })
-        .catch((e) => {
-        })
+
   }
 }
 
@@ -312,7 +346,7 @@ const dianJiBaoCunMuBan = async (form) => {
     await form.validate()
     jianChaJianYanMuBanMing(baoCunMuBan.value.tcName, props.jianCha ? '3' : '2').then((res) => {
       if (res) {
-        ElMessageBox.confirm('已经存在相同的模板名称,请选择覆盖历史数据还是新增相同名称的数据', '温馨提示', {
+        ElMessageBox.confirm('已经存在相同的模板名称,是否覆盖数据', '温馨提示', {
           type: 'warning',
           distinguishCancelAndClose: true,
           confirmButtonText: '覆盖',

+ 1 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue

@@ -79,7 +79,7 @@
                     :data="{'data':muBanShuJu}"
                     :open-paging="false"
                     :height="windowSize.h / 1.6">
-            <el-table-column fixed="left" type="selection" reserve-selection/>
+            <el-table-column fixed="left" type="selection"/>
             <el-table-column fixed="left" label="uuid" prop="id"></el-table-column>
             <el-table-column label="医嘱名称" prop="orderName" show-overflow-tooltip width="135"></el-table-column>
             <el-table-column label="规格" prop="drugSpecification"></el-table-column>
@@ -165,7 +165,6 @@ const dianJiChaXun = () => {
 const dianJiMuBanMing = async (row) => {
   dianJiFuJiXinXi.value = row
   muBanShuJu.value = await huoQuMuBanShuJu(row.inputType === '4' ? row.collectCode : row.patternCode)
-  console.log(muBanShuJu.value)
   let serverDate = await getServerDateApi()
   orderTime.value = serverDate
   startTime = serverDate

+ 10 - 0
src/router/modules/dashboard.js

@@ -456,6 +456,16 @@ const route = [
                             activeMenu: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
                         },
                     },
+                    {
+                        path: 'electronicMedicalRecord',
+                        component: createNameComponent(() => import('../../views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/index.vue')),
+                        meta: {
+                            title: '电子病历',
+                            hideTabs: true,
+                            passRule: true,
+                            activeMenu: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
+                        },
+                    },
                 ],
             },
         ],

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

@@ -5,7 +5,7 @@
         <Overview v-show="xianShiLieBiao" :showSelection="false"/>
       </el-aside>
       <el-main>
-        <huan-zhe-xin-xi></huan-zhe-xin-xi>
+        <huan-zhe-xin-xi v-show="basicPatientInformation"></huan-zhe-xin-xi>
         <el-row v-show="xianShiLieBiao" class="tabs">
           <template v-for="item in pathList">
             <el-col :span="3" :style="currentPagePosition(item.path)" class="tab-item" @click="handleClick(item.path)">
@@ -35,9 +35,11 @@ const tableHeight = computed(() => {
 })
 
 const xianShiLieBiao = ref(true)
+const basicPatientInformation = ref(true)
 
 watch(() => router.currentRoute.value.path, () => {
   xianShiLieBiao.value = !router.currentRoute.value.meta.blankPage;
+  basicPatientInformation.value = router.currentRoute.value.path !== '/inpatient/zhuYuanYiSheng/electronicMedicalRecord'
 })
 
 const handleClick = (path) => {
@@ -56,7 +58,7 @@ let pathList = $ref([
 
 onActivated(() => {
   router.push(store.state.app.yiZhuLuRu.path)
-
+  basicPatientInformation.value = router.currentRoute.value.path !== '/inpatient/zhuYuanYiSheng/electronicMedicalRecord'
 })
 
 const currentPagePosition = (val) => {

+ 4 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/XinZengShuJu.vue

@@ -5,6 +5,7 @@
   </tian-jia-jian-cha-jian-yan>
   <xin-zeng-shou-shu-shen-qing v-if="name === '手术'"></xin-zeng-shou-shu-shen-qing>
   <xin-zhen-cao-yao v-if="name === '草药'"></xin-zhen-cao-yao>
+  <electronic-medical-record v-if="name==='电子病历'"/>
 </template>
 <script>
 
@@ -19,10 +20,12 @@ import {ElNotification} from "element-plus";
 import {cuoWuXinXi, huanZheXinXi} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {stringIsBlank} from "@/utils/blank-utils";
 import store from '@/store'
+import electronicMedicalRecord from '@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/index.vue'
+
 
 export default {
   name: "XinZengShuJu",
-  components: {XinZhenCaoYao, XinZengShouShuShenQing, TianJiaJianChaJianYan, TianJiaYiZhu},
+  components: {XinZhenCaoYao, XinZengShouShuShenQing, TianJiaJianChaJianYan, TianJiaYiZhu, electronicMedicalRecord},
   setup() {
     const name = ref('')
 
@@ -30,7 +33,6 @@ export default {
       return store.state.user.info
     })
 
-
     let notify = null
 
     onActivated(() => {

+ 33 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/index.vue

@@ -0,0 +1,33 @@
+<template>
+  <div :style="{height: windowSize.h / 1.1 + 'px'}" style="width: 100%;">
+    <iframe style="width: 100%;height: 100%;border: 0" :src="caseHistoryUrl">
+
+    </iframe>
+  </div>
+</template>
+
+<script setup name='index'>
+import store from "@/store";
+import {huanZheXinXi, youWuXuanZheHuanZhe} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
+
+let caseHistoryUrl = $ref('')
+
+watch(() => huanZheXinXi.value, () => {
+      if (youWuXuanZheHuanZhe()) return
+      caseHistoryUrl = `http://172.16.32.122:8001/emr/runtime/#/?documentId=&categoryCode=de3d5335c2b311ebb37d8c1645d540b7&patientId=${huanZheXinXi.value.inpatientNo}`;
+      console.log(caseHistoryUrl)
+      console.log(huanZheXinXi.value)
+    },
+    {immediate: true, deep: true}
+)
+
+
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -743,7 +743,7 @@ const kangJunYaoYongYaoFangShiGaiBian = (val) => {
 }
 
 // 模板数据
-let muBanDuiHuaKuang = $ref(true)
+let muBanDuiHuaKuang = $ref(false)
 // 这里是返回的模板数据
 const muBanShuJu = (val) => {
   let tongZhiCiShu = 0
@@ -766,6 +766,7 @@ const muBanShuJu = (val) => {
       }, 200)
     }
   }
+
   muBanDuiHuaKuang = false
   ElMessage.success('添加成功。')
 }

+ 20 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -53,6 +53,7 @@
       </el-button>
       <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo)" @click="jumpToMedicalRecord"> 病案首页
       </el-button>
+      <el-button type="primary" @click="openElectronicMedicalRecord"> 电子病历</el-button>
     </el-header>
     <el-main>
       <xc-table :data="yiZhuPage"
@@ -62,7 +63,7 @@
                 :height="windowSize.h / 1.5"
                 @selectionChange="huoQuXuanZhongDeShuJu"
                 ref="tableRef">
-        <el-table-column fixed="left" reserve-selection type="selection"></el-table-column>
+        <el-table-column fixed="left" type="selection"></el-table-column>
         <el-table-column fixed="left" label="医嘱号" prop="actOrderNo" width="120">
           <template #default="scope">
             <el-tag :type="getYiZhuFlag(scope.row.statusFlag)" effect="dark">
@@ -284,6 +285,23 @@ const addYiZhuClick = () => {
   })
 }
 
+/**
+ * 打开电子病历
+ */
+const openElectronicMedicalRecord = () => {
+  if (youWuXuanZheHuanZhe()) return
+  router.push({
+    name: 'xinZengShuJu',
+    params: {
+      passRule: true,
+      name: '电子病历',
+    },
+    query: {
+      path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu',
+    },
+  })
+}
+
 const dianJiYiZhuChaoZuo = ({actOrderNo, orderName}, flag, name) => {
   chaoZuoBiaoZhi = flag
   yiZhuHao.value = actOrderNo
@@ -364,7 +382,7 @@ const dianJiFuZhuXuanZhongYiZhu = () => {
 
 onMounted(async () => {
   await sleep(200)
-  addYiZhuClick()
+  // addYiZhuClick()
   zkList.value = await getTheTransferList()
 })
 

+ 1 - 5
src/views/medical-insurance/inpatient/DiscSettlement.vue

@@ -520,11 +520,7 @@ export default {
           }
           getSiPatInfo(param).then((res) => {
             patient.value.medType = res.medType
-            if (res.mdtrtId) {
-              yibaoDismiss()
-            } else {
-              ziFeiDismiss()
-            }
+            res.mdtrtId ? yibaoDismiss() : ziFeiDismiss()
           })
         }
       }

+ 1 - 1
src/views/settings/Test.vue

@@ -81,7 +81,7 @@ function EMRInteractive() {
       },
     };
   };
-  
+
   this.saveDocument = (cb) => {
     console.log('save document.', this)