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

+ 11 - 3
src/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue

@@ -22,6 +22,9 @@ import store from '@/store'
 const props = defineProps({
   code: {
     type: String,
+  },
+  url: {
+    type: String,
   }
 })
 const emit = defineEmits(['close'])
@@ -31,14 +34,19 @@ const windowSize = computed(() => {
 })
 
 let dialog = $ref(true)
-let src = "http://172.16.32.121:9097/web/sms/hpms_medi_show.aspx?his_code=" + props.code
+let src = $ref('')
 
 let showIframe = $ref(false)
 
 onMounted(() => {
-  setTimeout(() => {
+  nextTick(() => {
+    if (props.url) {
+      src = props.url
+    } else {
+      src = "http://172.16.32.121:9097/web/sms/hpms_medi_show.aspx?his_code=" + props.code
+    }
     showIframe = true
-  }, 100)
+  })
 })
 
 </script>

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

@@ -18,6 +18,7 @@
   </el-button>
   <el-divider direction="vertical"></el-divider>
   <el-button @click="tiaoZhuanZhiHeLiYongYao">合理用药</el-button>
+  <el-button @click="drugProblem.dialog = true">分析结果</el-button>
   <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>
@@ -287,11 +288,12 @@
         <el-tag v-if="scope.row.emergencyFlag === '1'">是</el-tag>
       </template>
     </el-table-column>
-    <el-table-column fixed="right" label="操作" width="120">
+    <el-table-column fixed="right" label="操作" width="220">
       <template #default="scope">
         <el-button circle icon="Edit" type="warning" @click="xiuGaiYiZhu(scope.row,scope.$index)"></el-button>
         <el-button circle icon="Delete" type="danger" @click="shanChuBiaoGeYiZhu(scope.$index)"></el-button>
         <el-button circle class="iconfont icon-fuzhi" type="info" @click="dianJiFuZhiYiZhu(scope.row)"></el-button>
+        <el-button circle icon="View" type="warning" @click="synopsis(scope.row)"></el-button>
       </template>
     </el-table-column>
   </el-table>
@@ -301,6 +303,12 @@
   <!-- 这个是过敏源的 -->
   <AllergenEntry v-if="allergenDialog" :pat-no="huanZheXinXi.inpatientNo"
                  @close="allergenDialog = false"></AllergenEntry>
+  <yao-ping-xiang-qing v-if="drugProblem.dialog"
+                       :url="drugProblem.url"
+                       @close="drugProblem.dialog = false"/>
+  <yao-ping-xiang-qing v-if="synopsisDialog.dialog"
+                       :code="synopsisDialog.code"
+                       @close="synopsisDialog.dialog = false"/>
 </template>
 
 <script name="TianJiaYiZhu" setup>
@@ -339,7 +347,6 @@ import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
 import {BizException, ExceptionEnum} from '@/utils/BizException'
 import {setScrollTop} from "@/utils/el-table-scroll";
 import XcSelectV2 from "@/components/xc/select-v2/XcSelectV2.vue";
-import {nextTick} from "vue";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -355,6 +362,11 @@ const zkCode = '06286'
 let dataIndex = $ref(-1)
 // 表格的 ref
 let elTableRef = $ref(null)
+// 药品问题
+let drugProblem = $ref({
+  dialog: false,
+  url: ''
+})
 
 const yiZhuData = ref({
   id: '',
@@ -670,6 +682,16 @@ const dianJiFuZhiYiZhu = (val) => {
   ElMessage.success('复制成功')
 }
 
+let synopsisDialog = $ref({
+  dialog: false,
+  code: ''
+})
+
+const synopsis = (val) => {
+  synopsisDialog.dialog = true
+  synopsisDialog.code = val.orderCode + '_' + val.serial
+}
+
 /* 保存信息 */
 const baoCunYiZhuClick = () => {
   if (listIsBlank(yiZhuList.value)) {
@@ -713,9 +735,14 @@ function baoCunYiZhu() {
   if (listNotBlank(list)) {
     // 合理用药校验
     jiaoYan(data).then((res) => {
+      if (res.code !== 0) {
+        drugProblem.dialog = true
+        drugProblem.url = res.ShowUrl
+      }
       console.log(res)
     })
   }
+  return
   ElMessageBox.confirm('您确定要保存这些数据吗?请仔细检查数据。', '提示', {
     type: 'warning',
     closeOnClickModal: false,