浏览代码

准备添加合理用药

xiaochan 3 年之前
父节点
当前提交
1d64e4a537

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

@@ -0,0 +1,48 @@
+<template>
+  <el-dialog v-model="dialog" title="药品说明书" @close="emit('close')">
+    <el-container>
+      <iframe v-if="showIframe" :height="windowSize.h / 1.4"
+              :src="src"
+              :width="windowSize.w / 1.2">
+      </iframe>
+    </el-container>
+  </el-dialog>
+</template>
+
+<script name="YaoPingXiangQing" setup>
+/**
+ * <p>
+ * 描述:
+ * </p>
+ * @author xc
+ * @date 2022-03-29 15:36
+ */
+import store from '@/store'
+
+const props = defineProps({
+  code: {
+    type: String,
+  }
+})
+const emit = defineEmits(['close'])
+
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
+
+let dialog = $ref(true)
+let src = "http://172.16.32.121:9097/web/sms/hpms_medi_show.aspx?his_code=" + props.code
+
+let showIframe = $ref(false)
+
+onMounted(() => {
+  setTimeout(() => {
+    showIframe = true
+  }, 100)
+})
+
+</script>
+
+<style scoped>
+
+</style>

+ 41 - 41
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue

@@ -24,6 +24,11 @@
       <el-table-column label="厂家" prop="manuName"></el-table-column>
       <el-table-column label="类型" prop="orderType"></el-table-column>
       <el-table-column label="毒麻类型" prop="drugFlagName"></el-table-column>
+      <el-table-column label="药品详情">
+        <template #default="scope">
+          <el-button @click="yaoPinXiangQing.dialog = true;yaoPinXiangQing.code = scope.row.orderCode">药品详情</el-button>
+        </template>
+      </el-table-column>
     </el-table>
     <el-pagination
         :current-page="orderData.currentPage"
@@ -33,58 +38,53 @@
         @current-change="orderDataCurrent"
     >
     </el-pagination>
+    <yao-ping-xiang-qing v-if="yaoPinXiangQing.dialog" :code="yaoPinXiangQing.code"
+                         @close="yaoPinXiangQing.dialog = false"></yao-ping-xiang-qing>
   </el-dialog>
 </template>
 
-<script>
+<script name="SouSuoYiZhu" setup>
 import {huoQuXiangMu} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
 import {computed, onMounted, ref} from "vue";
 import store from "@/store";
+import YaoPingXiangQing from "@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue";
 
-export default {
-  name: "SouSuoYiZhu",
-  emits: ['xuanZhongFeiYong', 'close'],
-  setup(props, {emit}) {
-    const windowSize = computed(() => {
-      return store.state.app.windowSize
-    })
-    const orderName = ref('')  // 01672
-    const searchInput = ref(null)
-    const orderData = ref({
-      currentPage: 1,
-      pageSize: 10,
-      data: [],
-    })
-
-    const dianJiChaXunYiZhu = () => {
-      huoQuXiangMu(orderName.value).then((res) => {
-        orderData.value.data = res
-        orderData.value.currentPage = 1
-      })
-    }
+const emit = defineEmits(['xuanZhongFeiYong', 'close'])
 
-    const orderDataCurrent = (val) => {
-      orderData.value.currentPage = val
-    }
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
+const dialog = $ref(true)
+const orderName = ref('')  // 01672
+const searchInput = ref(null)
+const orderData = ref({
+  currentPage: 1,
+  pageSize: 10,
+  data: [],
+})
 
-    onMounted(() => {
-      setTimeout(() => {
-        searchInput.value.focus()
-      }, 100)
-    })
+const dianJiChaXunYiZhu = () => {
+  huoQuXiangMu(orderName.value).then((res) => {
+    orderData.value.data = res
+    orderData.value.currentPage = 1
+  })
+}
 
-    return {
-      dialog: true,
-      dianJiChaXunYiZhu,
-      orderName,
-      orderData,
-      orderDataCurrent,
-      windowSize,
-      searchInput,
-      emit
-    }
-  }
+const orderDataCurrent = (val) => {
+  orderData.value.currentPage = val
 }
+
+const yaoPinXiangQing = $ref({
+  dialog: false,
+  code: '',
+})
+
+onMounted(() => {
+  setTimeout(() => {
+    searchInput.value.focus()
+  }, 200)
+})
+
 </script>
 
 <style scoped>

+ 25 - 8
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -12,16 +12,27 @@
   <el-button icon="el-icon-check" type="success" @click="baoCunYiZhuClick">保存</el-button>
   {{ count }}
   <cuo-wu-xin-xi/>
+  <el-divider direction="vertical"></el-divider>
+  <el-button :disabled="yiZhuData.serial === '00' || stringIsBlank(yiZhuData.serial)" icon="el-icon-view"
+             type="success" @click="HeLiYongYao.dialog = 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="mini">
     <el-row>
       <el-col :span="span" @click="yiZhuMingDialog = true">
         <el-form-item class="bi_tian" label="医嘱名称:" prop="orderName">
-          <el-input v-model="yiZhuData.orderName" disabled></el-input>
+          <div style="border-bottom: 1px  solid #000;height: 29px">
+            {{ yiZhuData.orderName }}
+          </div>
         </el-form-item>
       </el-col>
       <el-col :span="span">
         <el-form-item label="规格:" prop="orderName">
-          <el-input v-model="yiZhuData.drugSpecification" disabled></el-input>
+          <div style="border-bottom: 1px  solid #000;height: 29px">
+            {{ yiZhuData.drugSpecification }}
+          </div>
         </el-form-item>
       </el-col>
       <el-col :span="span">
@@ -298,6 +309,7 @@ import {getServerDateApi, yaoPinShiFouPiPeiYiBao} from '@/api/public-api'
 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";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -375,9 +387,9 @@ watch(
 )
 
 // 搜索医嘱
-const yiZhuMingDialog = ref(false)
+let yiZhuMingDialog = $ref(false)
 const xuanZhongFeiYong = (row) => {
-  yiZhuMingDialog.value = false
+  yiZhuMingDialog = false
   qingKong()
   yiZhuData.value = clone(row)
   if (row.serial !== '00') {
@@ -839,10 +851,10 @@ onUnmounted(() => {
 const kaiQiDaoJiShi = () => {
   seconds.value = 600
   clearInterval(daoJiShi)
-  daoJiShi = setInterval(() => {
-    seconds.value--
-    countDown()
-  }, 1000)
+  // daoJiShi = setInterval(() => {
+  //   seconds.value--
+  //   countDown()
+  // }, 1000)
 }
 
 const countDown = () => {
@@ -870,6 +882,11 @@ const countDown = () => {
   }
 }
 
+let HeLiYongYao = $ref({
+  dialog: false,
+  code: ''
+})
+
 </script>
 
 <style scoped>