Browse Source

医嘱领量

xiaochan 2 years ago
parent
commit
cc4140d62c

+ 0 - 36
src/components/blood-sugar-table/BloodSugarTable.vue

@@ -1,36 +0,0 @@
-<template>
-  <td @contextmenu.prevent="rightClick($event)">
-    {{ props.data?.testResult }}
-  </td>
-  <td @contextmenu.prevent="rightClick($event)">
-    {{ props.data?.formatTestTime }}
-    <div style="border-top: 1px solid #000;width: 100%;margin-bottom: 3px"/>
-    {{ props.data?.nurseIdName }}
-  </td>
-</template>
-
-<script setup name='BloodSugarTable'>
-const props = defineProps({
-  data: {
-    type: Object
-  }
-})
-
-const emit = defineEmits(['rightClick'])
-
-const rightClick = (event) => {
-  if (props.data) {
-    emit('rightClick', props.data, event)
-  }
-}
-
-
-</script>
-
-<style scoped>
-td {
-  border: 1px solid #000;
-  text-align: center;
-  padding: 10px 0;
-}
-</style>

+ 41 - 0
src/components/xiao-chan/sd-table/SdTable.vue

@@ -0,0 +1,41 @@
+<template>
+    <div ref="hiddenColumns" class="hidden-columns">
+        <slot/>
+    </div>
+    <sd-table-header :default-sort="defaultSort"/>
+</template>
+
+<script setup name='SdTable'>
+import SdTableHeader from "@/components/xiao-chan/sd-table/table-header/sd-table-header";
+
+const props = defineProps({
+    data: {
+        type: Array,
+        default: []
+    },
+    defaultSort: Object
+})
+
+const store = ref()
+
+const setStore = (val) => {
+    store.value = val
+}
+
+const getStore = () => {
+    return store.value
+}
+
+defineExpose({
+    setStore,
+    getStore
+})
+</script>
+
+<style scoped lang="scss">
+.hidden-columns {
+  visibility: hidden;
+  position: absolute;
+  z-index: -1;
+}
+</style>

+ 43 - 0
src/components/xiao-chan/sd-table/sd-column.js

@@ -0,0 +1,43 @@
+export default defineComponent({
+    name: 'SdColumn',
+    props: {
+        prop: String,
+        label: String
+    },
+    setup(props, {slots}) {
+        const instance = getCurrentInstance()
+        let parent = instance.parent
+        parent.exposed.setStore(123)
+        console.log(parent.exposed.getStore());
+    },
+    render() {
+        try {
+            const renderDefault = this.$slots.default?.({
+                row: {},
+                column: {},
+                $index: -1,
+            })
+            const children = []
+            if (Array.isArray(renderDefault)) {
+                for (const childNode of renderDefault) {
+                    if (
+                        childNode.type?.name === 'ElTableColumn' ||
+                        childNode.shapeFlag & 2
+                    ) {
+                        children.push(childNode)
+                    } else if (Array.isArray(childNode.children)) {
+                        childNode.children.forEach((vnode) => {
+                            // No rendering when vnode is dynamic slot or text
+                            if (vnode?.patchFlag !== 1024 && typeof vnode?.children !== 'string') {
+                                children.push(vnode)
+                            }
+                        })
+                    }
+                }
+            }
+            return h('div', children)
+        } catch {
+            return h('div', [])
+        }
+    },
+})

+ 20 - 0
src/components/xiao-chan/sd-table/table-header/sd-table-header.js

@@ -0,0 +1,20 @@
+export default defineComponent({
+    name: 'SdTableHeader',
+    props: {
+        defaultSort: {
+            type: Object,
+            default: () => {
+                return {
+                    prop: '',
+                    order: '',
+                }
+            },
+        }
+    },
+    setup(props, {emit}) {
+        console.log(props)
+    },
+    render() {
+
+    }
+})

+ 6 - 0
src/components/xiao-chan/sd-table/util.js

@@ -0,0 +1,6 @@
+import {createGlobalState} from "@vueuse/core";
+
+export const SdTableStore = createGlobalState(() => {
+    const store = ref()
+    return {store}
+})

+ 5 - 0
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -518,6 +518,11 @@ const jiSuanLingLiang = async (val) => {
     }
 
     let drugQuanA = Math.ceil(Dig.division(val, jiLiangValue.value))
+
+    if (yiZhuData.value.serial === '99') {
+        drugQuanA = Math.ceil(Dig.division(drugQuanA, yiZhuData.value.packSize))
+    }
+
     yiZhuData.value.drugQuan = drugQuanA;
 }
 /* 选择剂量 */

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

@@ -340,7 +340,7 @@ const route = [
             {
                 name: 'bloodSugarQuery',
                 path: 'bloodSugarQuery',
-                component: createNameComponent(() => import('@/views/examination/BloodSugarQuery.vue')),
+                component: createNameComponent(() => import('@/views/examination/BloodSugarQuery/BloodSugarQuery.vue')),
                 meta: {title: '血糖查询'},
             },
         ],

+ 0 - 248
src/views/examination/BloodSugarQuery.vue

@@ -1,248 +0,0 @@
-<template>
-    <page-layer>
-        <template #header>
-            住院号:
-            <el-input style="width: 120px" v-model="patNo" @blur="inputBlur"/>
-            住院次数:
-            <el-input-number v-model="times" :min="0"/>
-            <el-button @click="inquire">查询</el-button>
-            <el-button @click="print">打印</el-button>
-        </template>
-        <template #main>
-            <div style="width: 1122px;height: 793px" ref="printDiv">
-                <table style="width: 100%;max-height:  793px">
-                    <thead>
-                    <tr>
-                        <th colspan="23">泰和医院内分泌科血糖单</th>
-                    </tr>
-                    <tr>
-                        <th colspan="23">
-                            <div style="width: 100%;display: flex;justify-content: space-between">
-
-                                <div>
-                                    床号: {{ patientInfo?.bedNo }}
-                                </div>
-
-                                <div>
-                                    姓名: {{ patientInfo?.name }}
-                                </div>
-
-                                <div>
-                                    年龄: {{ patientInfo?.age }}
-                                </div>
-
-                                <div>
-                                    住院号:{{ patientInfo?.inpatientNo }}
-                                </div>
-
-                                <div>
-                                    单位: mmol/l
-                                </div>
-
-                            </div>
-                        </th>
-                    </tr>
-
-                    <tr class="tr">
-                        <th style="width: 110px">日期</th>
-                        <th style="width: 30px">空腹</th>
-                        <th>时间签名</th>
-                        <th>早餐后</th>
-                        <th>时间签名</th>
-                        <th>中餐前</th>
-                        <th>时间签名</th>
-                        <th>中餐后</th>
-                        <th>时间签名</th>
-                        <th>晚餐前</th>
-                        <th>时间签名</th>
-                        <th>晚餐后</th>
-                        <th>时间签名</th>
-                        <th style="width: 30px">零点</th>
-                        <th>时间签名</th>
-                        <th style="width: 30px">三点</th>
-                        <th>时间签名</th>
-                        <th>随机血糖</th>
-                        <th>时间签名</th>
-                        <th>随机血糖</th>
-                        <th>时间签名</th>
-                        <th>随机血糖</th>
-                        <th>时间签名</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-
-                    <tr v-for="item in data">
-                        <td style="padding: 10px">
-                            {{ item.date }}
-                        </td>
-                        <blood-sugar-table v-for="index in 11"
-                                           @right-click="rightClick"
-                                           :data="htmlTd(index - 1,item.data)"/>
-                    </tr>
-                    </tbody>
-                </table>
-            </div>
-            <!--            <right-click-menu :mouse-position="position" closeManually ref="RightClickMenuRef">-->
-            <!--                <div>-->
-            <!--                    {{ position.data.timecodeName }}-->
-            <!--                    <el-form label-width="70px">-->
-            <!--                        <el-form-item label="医生签名">-->
-            <!--                            <SelectStaffCode v-model="position.data" :name="['nurseId', 'nurseIdName']"/>-->
-            <!--                        </el-form-item>-->
-
-            <!--                        <el-form-item label="结果">-->
-            <!--                            <el-input style="width: 120px;" v-model="position.data.testResult"/>-->
-            <!--                        </el-form-item>-->
-
-            <!--                        <el-form-item label="时间">-->
-            <!--                            <el-time-picker-->
-            <!--                                    format="HH:mm:ss"-->
-            <!--                                    value-format="YYYY-MM-DD HH:mm:ss"-->
-            <!--                                    v-model="position.data.testTime"/>-->
-            <!--                        </el-form-item>-->
-
-            <!--                    </el-form>-->
-
-            <!--                    <el-button @click="confirmTheChanges">确认</el-button>-->
-            <!--                    <el-button @click="cancel">取消</el-button>-->
-            <!--                </div>-->
-            <!--            </right-click-menu>-->
-        </template>
-    </page-layer>
-</template>
-
-<script setup name='BloodSugarQuery'>
-import {
-    getPatientLoodSugar,
-    getThePatienMaxHospitalizationTimes,
-    modifyPatientBloodGlucoseInfo
-} from "@/api/blood-sugar/query";
-import BloodSugarTable from "@/components/blood-sugar-table/BloodSugarTable.vue";
-import {getLodop, initLodop} from "@/utils/c-lodop";
-import RightClickMenu from "@/components/menu-item/RightClickMenu.vue";
-import SelectStaffCode from "@/components/SelectStaffCode.vue";
-import {clone} from "@/utils/clone";
-import {getFormatDatetime} from "@/utils/date";
-import PageLayer from "@/layout/PageLayer";
-import router from "@/router";
-
-let patNo = $ref('')
-let times = $ref(0)
-
-const queryPatientSBloodSugarInformation = () => {
-    getPatientLoodSugar(patNo, times).then((res) => {
-        data = res.bloodSugarData
-        patientInfo = res.patientInfo
-    })
-}
-
-const inquire = () => {
-    queryPatientSBloodSugarInformation()
-}
-
-let data = $ref()
-let patientInfo = $ref()
-
-let thead = ["空腹", "早餐后", "中餐前", "中餐后", "晚餐前", "晚餐后", "零点", "三点", "随机血糖1", "随机血糖2", "随机血糖3"]
-
-const inputBlur = () => {
-    if (patNo) {
-        getThePatienMaxHospitalizationTimes(patNo).then((res) => {
-            console.log(res)
-        })
-    }
-}
-
-let position = $ref()
-const RightClickMenuRef = ref()
-let tempBloodSugarData = $ref()
-const rightClick = (val, event) => {
-    position = {
-        event: event,
-        data: val
-    }
-    tempBloodSugarData = clone(val)
-}
-
-const confirmTheChanges = () => {
-    modifyPatientBloodGlucoseInfo(position.data).then((res) => {
-        position.data.formatTestTime = getFormatDatetime(position.data.testTime, 'HH:mm')
-        RightClickMenuRef.value.close()
-    })
-}
-
-const cancel = () => {
-    position.data.nurseId = tempBloodSugarData.nurseId
-    position.data.nurseIdName = tempBloodSugarData.nurseIdName
-    position.data.testResult = tempBloodSugarData.testResult
-    position.data.testTime = tempBloodSugarData.testTime
-    RightClickMenuRef.value.close()
-}
-
-const htmlTd = (index, data) => {
-    return data[thead[index]]
-}
-
-const printDiv = ref()
-
-const print = () => {
-    let LODOP = getLodop()
-    let style = `<style>td {
-  border: 1px solid #000;
-  text-align: center;
-  padding: 10px 0;
-}
-
-.tr th {
-  border: 1px solid #000;
-  text-align: center;
-}
-
-table, tr, td {
-  border-collapse: collapse;
-}</style>`
-
-    const strHtml = style + '<body>' + printDiv.value.innerHTML + '</body>'
-    LODOP.PRINT_INIT('泰和医院内分泌科血糖单') // 初始化打印机 名字
-    LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') // 设置纸张大小  A4
-    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-    LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strHtml) //要打印的内容
-    LODOP.SET_PRINT_STYLE('ItemType', 3) //设置对象风格
-    LODOP.ADD_PRINT_TEXT('290mm', '190mm', '20mm', '2mm', '第#页/共&页') //增加纯文本项
-    LODOP.PREVIEW() // 关闭
-    console.log(printDiv)
-}
-
-
-onMounted(() => {
-    initLodop()
-})
-
-
-onActivated(() => {
-    let data = router.currentRoute.value.params
-    if (data.patNo) {
-        patNo = data.patNo;
-        times = parseInt(data.times)
-        queryPatientSBloodSugarInformation()
-    }
-})
-
-</script>
-
-<style scoped lang="scss">
-td {
-  border: 1px solid #000;
-  text-align: center;
-  padding: 10px 0;
-}
-
-.tr th {
-  border: 1px solid #000;
-  text-align: center;
-}
-
-table, tr, td {
-  border-collapse: collapse;
-}
-</style>

+ 166 - 0
src/views/examination/BloodSugarQuery/BloodSugarQuery.vue

@@ -0,0 +1,166 @@
+<template>
+    <page-layer>
+        <template #header>
+            住院号:
+            <el-input style="width: 120px" v-model="patNo"/>
+            住院次数:
+            <el-input-number v-model="times" :min="0"/>
+            <el-button @click="inquire">查询</el-button>
+            <el-button @click="print">打印</el-button>
+        </template>
+        <template #main>
+            <blood-sugar-table ref="printDiv" :data="tempData" :page="page" :patient-info="patientInfo"/>
+        </template>
+    </page-layer>
+</template>
+
+<script setup name='BloodSugarQuery'>
+import {
+    getPatientLoodSugar,
+} from "@/api/blood-sugar/query";
+import {getLodop, initLodop} from "@/utils/c-lodop";
+import PageLayer from "@/layout/PageLayer.vue";
+import router from "@/router";
+import {isDev} from "@/utils/public";
+import BloodSugarTable from "@/views/examination/BloodSugarQuery/components/BloodSugarTable.vue";
+import Dig from "@/utils/math";
+
+let patNo = $ref('')
+let times = $ref(0)
+
+let page = $ref({
+    total: 0,
+    currentPage: 1,
+    totalPage: 1,
+    pageSize: 10,
+})
+
+let data = $ref([])
+let patientInfo = $ref()
+
+
+const queryPatientSBloodSugarInformation = () => {
+    getPatientLoodSugar(patNo, times).then((res) => {
+        page.total = res.size
+        data = res.bloodSugarData
+        patientInfo = res.patientInfo
+        page.totalPage = Math.ceil(Dig.division(data.length, page.pageSize))
+    })
+}
+
+const inquire = () => {
+    queryPatientSBloodSugarInformation()
+}
+
+
+const tempData = computed(() => {
+    return data.slice((page.currentPage - 1) * page.pageSize, page.pageSize * page.currentPage);
+})
+
+const printDiv = ref(null)
+
+const print = () => {
+    let LODOP = getLodop()
+    let style = `<style>
+
+ table {
+    font-size: 9pt;
+     table-layout:fixed;word-break:break-all;
+ }
+
+td {
+  border: 0.75pt solid #000;
+  text-align: center;
+  padding: 7.5pt 0;
+}
+
+.tr th {
+  border: 0.75pt solid #000;
+  text-align: center;
+}
+
+select{
+    appearance: none;
+    border: none;
+    -webkit-appearance: none;
+}
+
+table, tr, td {
+  border-collapse: collapse;
+  word-break: break-all;
+}</style>`
+
+    LODOP.PRINT_INIT('泰和医院内分泌科血糖单') // 初始化打印机 名字
+    LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') // 设置纸张大小  A4
+    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
+
+    for (let i = 1, len = page.totalPage + 1; i < len; i++) {
+        let temp = data.slice((i - 1) * page.pageSize, page.pageSize * i);
+        const table = createApp(BloodSugarTable, {
+            patientInfo: patientInfo,
+            data: temp,
+            page: {
+                total: page.total,
+                currentPage: i,
+                totalPage: page.totalPage,
+                pageSize: page.pageSize
+            }
+        })
+
+        const parentNode = document.createElement('div')
+        document.body.appendChild(parentNode)
+        table.mount(parentNode)
+        parentNode.style.width = '841.5pt'
+        parentNode.style.height = '793px'
+
+        const strHtml = style + '<body>' + parentNode.innerHTML + '</body>'
+        LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strHtml) //要打印的内容
+        table.unmount()
+        document.body.removeChild(parentNode)
+        if (i !== len) {
+            LODOP.NewPage();
+        }
+    }
+
+    LODOP.SET_PRINT_STYLE('ItemType', 3)
+    LODOP.PREVIEW() // 关闭
+}
+
+
+onMounted(() => {
+    initLodop()
+    if (isDev) {
+        patNo = '0372621'
+        times = 8
+        queryPatientSBloodSugarInformation()
+    }
+})
+
+
+onActivated(() => {
+    let data = router.currentRoute.value.params
+    if (data.patNo) {
+        patNo = data.patNo;
+        times = parseInt(data.times)
+        queryPatientSBloodSugarInformation()
+    }
+})
+
+</script>
+
+<style scoped lang="scss">
+td {
+  border: 1px solid #000;
+  text-align: center;
+  padding: 10px 0;
+}
+
+.tr th {
+  border: 1px solid #000;
+  text-align: center;
+}
+
+table, tr, td {
+  border-collapse: collapse;
+}
+</style>

+ 117 - 0
src/views/examination/BloodSugarQuery/components/BloodSugarTable.vue

@@ -0,0 +1,117 @@
+<template>
+    <div style="width: 841.5pt;height: 594.75pt" ref="printDiv">
+        <table style="width: 100%;max-height:  594.75pt; ">
+            <thead>
+            <tr>
+                <th colspan="23">长沙泰和医院</th>
+            </tr>
+            <tr>
+                <th colspan="3">
+                    姓名: {{ patientInfo?.name }}
+                </th>
+                <th colspan="3">
+                    性别: {{ patientInfo?.sexName }}
+                </th>
+                <th colspan="3">
+                    年龄: {{ patientInfo?.age }}
+                </th>
+                <th colspan="3">
+                    科室: {{ patientInfo?.zkWardName }}
+                </th>
+                <th colspan="3">
+                    床号: {{ patientInfo?.bedNo }}
+                </th>
+                <th colspan="3">
+                    住院号: {{ patientInfo?.inpatientNo }}
+                </th>
+                <th colspan="3">
+                    单位: mmol/L
+                </th>
+            </tr>
+
+            <tr class="tr">
+                <th style="min-width:82.5pt " rowspan="2" colspan="1">日期</th>
+                <th v-for="item in thead" colspan="2" width="75pt">
+                    {{ item }}
+                </th>
+            </tr>
+
+            <tr class="tr">
+                <template v-for="item in thead">
+                    <th>时间</th>
+                    <th>签名</th>
+                </template>
+            </tr>
+
+            </thead>
+            <tbody>
+            <tr v-for="item in data" style="height:47.25pt">
+                <td style="padding: 7.5pt; ">
+                    {{ item.date }}
+                </td>
+                <blood-sugar-td v-for="index in 11"
+                                :data="htmlTd(index - 1,item.data)"/>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr>
+                <td colspan="23">
+                    共&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ page.total }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;条&nbsp;&nbsp;&nbsp;&nbsp;
+                    当前第 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                    <select v-model="page.currentPage">
+                        <option v-for="item in page.totalPage" :value="item">{{ item }}</option>
+                    </select>
+                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                    页/共&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ page.totalPage }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 页
+                </td>
+            </tr>
+            </tfoot>
+        </table>
+    </div>
+</template>
+
+<script setup name='BloodSugarTable'>
+import BloodSugarTd from "@/views/examination/BloodSugarQuery/components/BloodSugarTd.vue";
+
+const props = defineProps({
+    patientInfo: Object,
+    page: Object,
+    data: Array
+})
+
+let thead = ["空腹", "早餐后", "中餐前", "中餐后", "晚餐前", "晚餐后", "零点", "三点", "随机血糖1", "随机血糖2", "随机血糖3"]
+
+const htmlTd = (index, data) => {
+    return data[thead[index]]
+}
+
+const printDiv = ref(null)
+
+const returnHtml = () => {
+    return printDiv.value.innerHTML
+}
+
+
+defineExpose({
+    returnHtml
+})
+
+</script>
+
+<style scoped lang="scss">
+td {
+  border: 0.75pt solid #000;
+  text-align: center;
+  padding: 7.5pt 0;
+  word-break: break-all;
+}
+
+.tr th {
+  border: 0.75pt solid #000;
+  text-align: center;
+}
+
+table, tr, td {
+  border-collapse: collapse;
+}
+</style>

+ 36 - 0
src/views/examination/BloodSugarQuery/components/BloodSugarTd.vue

@@ -0,0 +1,36 @@
+<template>
+    <td @contextmenu.prevent="rightClick($event)">
+        {{ props.data?.formatTestTime }}
+        <div style="border-top: 1px solid #000;width: 100%;margin-bottom: 3px"/>
+        {{ props.data?.testResult }}
+    </td>
+    <td @contextmenu.prevent="rightClick($event)">
+        {{ props.data?.nurseIdName }}
+    </td>
+</template>
+
+<script setup name='BloodSugarTable'>
+const props = defineProps({
+    data: {
+        type: Object
+    }
+})
+
+const emit = defineEmits(['rightClick'])
+
+const rightClick = (event) => {
+    if (props.data) {
+        emit('rightClick', props.data, event)
+    }
+}
+
+
+</script>
+
+<style scoped>
+td {
+    border: 1px solid #000;
+    text-align: center;
+    padding: 10px 0;
+}
+</style>

+ 7 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/BloodSugar.vue

@@ -1,5 +1,6 @@
 <template>
-    <button @click="routerBloodSugarClick">血糖</button>
+    <button @click="routerBloodSugarClick" v-if="oldButton">血糖</button>
+    <el-button @click="routerBloodSugarClick" v-else>血糖</el-button>
 </template>
 
 <script setup name='BloodSugar'>
@@ -7,7 +8,11 @@ import router from "@/router";
 
 const props = defineProps({
     patNo: String,
-    times: Number
+    times: Number,
+    oldButton: {
+        type: Boolean,
+        default: true
+    }
 })
 
 const routerBloodSugarClick = () => {

+ 79 - 76
src/views/medical-insurance/inpatient/Home.vue

@@ -1,35 +1,37 @@
 <template>
-  <page-layer>
-    <template #header>
-      <el-select v-model="search.current" style="width: 70px" @change="handleSelectSearchMehtod">
-        <el-option v-for="item in search.methods" :key="item.code" :value="item.code" :label="item.name"></el-option>
-      </el-select>
-      <span v-if="permission < 10" style="margin-left: 8px">
+    <page-layer>
+        <template #header>
+            <el-select v-model="search.current" style="width: 70px" @change="handleSelectSearchMehtod">
+                <el-option v-for="item in search.methods" :key="item.code" :value="item.code"
+                           :label="item.name"></el-option>
+            </el-select>
+            <span v-if="permission < 10" style="margin-left: 8px">
             <el-input v-model="search.zyh" style="width: 100px" clearable @keyup.enter="searchPatient"
                       placeholder="住院号"></el-input>
             <el-button type="primary" icon="Search" @click="searchPatient">检索</el-button>
           </span>
-      <el-button type="primary" icon="Postcard" @click="checkIdCard" style="margin-left: 8px">身份信息</el-button>
-      <el-button style="margin-left: 10px" type="success" icon="Document" @click="getRegInfo">登记信息</el-button>
-      <el-button style="margin-left: 10px" type="danger" icon="MagicStick" @click="toEmpiView">360视图</el-button>
-      <el-button style="margin-left: 10px" icon="Document" @click="openEmr">电子病历</el-button>
-    </template>
-    <template #aside>
-      <Overview ref="overview" :showSelection="isUploadPage"/>
-    </template>
-    <template #main>
-      <router-view v-slot="{ Component }">
-        <transition name="fade-transform" mode="out-in">
-          <keep-alive>
-            <component :is="Component"/>
-          </keep-alive>
-        </transition>
-      </router-view>
-      <Registinfo v-if="showRegisterInfo" :params="patient" @close="showRegisterInfo = false"></Registinfo>
-      <IdentifyImage v-if="showIdCardImg" :pat-no="patient.inpatientNo" :times="patient.admissTimes"
-                     @close="showIdCardImg = false"></IdentifyImage>
-    </template>
-  </page-layer>
+            <el-button type="primary" icon="Postcard" @click="checkIdCard" style="margin-left: 8px">身份信息</el-button>
+            <el-button style="margin-left: 10px" type="success" icon="Document" @click="getRegInfo">登记信息</el-button>
+            <el-button style="margin-left: 10px" type="danger" icon="MagicStick" @click="toEmpiView">360视图</el-button>
+            <el-button style="margin-left: 10px" icon="Document" @click="openEmr">电子病历</el-button>
+            <bloodSugar :pat-no="patient.inpatientNo" :times="patient.admissTimes" :old-button="false"/>
+        </template>
+        <template #aside>
+            <Overview ref="overview" :showSelection="isUploadPage"/>
+        </template>
+        <template #main>
+            <router-view v-slot="{ Component }">
+                <transition name="fade-transform" mode="out-in">
+                    <keep-alive>
+                        <component :is="Component"/>
+                    </keep-alive>
+                </transition>
+            </router-view>
+            <Registinfo v-if="showRegisterInfo" :params="patient" @close="showRegisterInfo = false"></Registinfo>
+            <IdentifyImage v-if="showIdCardImg" :pat-no="patient.inpatientNo" :times="patient.admissTimes"
+                           @close="showIdCardImg = false"></IdentifyImage>
+        </template>
+    </page-layer>
 </template>
 
 <script setup>
@@ -44,89 +46,90 @@ import IdentifyImage from '../../../components/inpatient/IdentifyImage.vue'
 import Registinfo from '../../../components/medical-insurance/registinfo/Index.vue'
 import PageLayer from "@/layout/PageLayer";
 import {getEmrUrl} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
+import BloodSugar from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/BloodSugar.vue";
 
 
 const search = initSearchParam()
 const permission = getGreatestRole()
 const handleSelectSearchMehtod = (val) => {
-  store.commit('ptnt/setSearchMethod', val)
+    store.commit('ptnt/setSearchMethod', val)
 }
 const patient = computed(() => {
-  return baseinfo()
+    return baseinfo()
 })
 const isUploadPage = computed(() => {
-  return store.state.app.currentPageName === 'inHospFeeUpload' && !store.state.ptnt.injuryMode
+    return store.state.app.currentPageName === 'inHospFeeUpload' && !store.state.ptnt.injuryMode
 })
 
 const overview = ref(null)
 
 const searchPatient = () => {
-  if (!search.zyh) {
-    overview.value.fetchOverviews()
-    setBaseinfo({})
-  } else {
-    if (permission < 10) {
-      overview.value.overviews = []
-      store.commit('ptnt/setBaseinfo', {totalCharge: '0.00', chargeYb: '0.00'})
-      getPatientInfo(search.zyh).then((res) => {
-        overview.value.currentWard = res.admissWard
-        store.commit('user/wardChange', res.admissWard)
-        store.commit('ptnt/setCurrentMedType', res.medType)
-        setBaseinfo(res)
-        overview.value.overviews.push(makeOverview(res))
-      })
+    if (!search.zyh) {
+        overview.value.fetchOverviews()
+        setBaseinfo({})
+    } else {
+        if (permission < 10) {
+            overview.value.overviews = []
+            store.commit('ptnt/setBaseinfo', {totalCharge: '0.00', chargeYb: '0.00'})
+            getPatientInfo(search.zyh).then((res) => {
+                overview.value.currentWard = res.admissWard
+                store.commit('user/wardChange', res.admissWard)
+                store.commit('ptnt/setCurrentMedType', res.medType)
+                setBaseinfo(res)
+                overview.value.overviews.push(makeOverview(res))
+            })
+        }
     }
-  }
 }
 
 const showRegisterInfo = ref(false)
 const getRegInfo = () => {
-  if (nullPatient()) return
-  showRegisterInfo.value = true
+    if (nullPatient()) return
+    showRegisterInfo.value = true
 }
 
 const toEmpiView = () => {
-  if (nullPatient()) return
-  getEmpiViewUrl(patient.value.inpatientNo).then((res) => {
-    window.open(res, '_blank')
-  })
+    if (nullPatient()) return
+    getEmpiViewUrl(patient.value.inpatientNo).then((res) => {
+        window.open(res, '_blank')
+    })
 }
 
 const showIdCardImg = ref(false)
 const checkIdCard = () => {
-  if (nullPatient()) return
-  showIdCardImg.value = true
+    if (nullPatient()) return
+    showIdCardImg.value = true
 }
 
 function initSearchParam() {
-  return reactive({
-    current: 'alpha',
-    methods: [
-      {code: 'alpha', name: '拼音'},
-      {code: 'code', name: '编码'},
-      {code: 'name', name: '名称'},
-    ],
-    zyh: '',
-  })
+    return reactive({
+        current: 'alpha',
+        methods: [
+            {code: 'alpha', name: '拼音'},
+            {code: 'code', name: '编码'},
+            {code: 'name', name: '名称'},
+        ],
+        zyh: '',
+    })
 }
 
 const openEmr = () => {
-  if (nullPatient()) return
-  window.open(getEmrUrl(patient.value.inpatientNo, patient.value.admissTimes, 4), '_blank')
+    if (nullPatient()) return
+    window.open(getEmrUrl(patient.value.inpatientNo, patient.value.admissTimes, 4), '_blank')
 }
 
 function makeOverview(val) {
-  return {
-    bedNo: val.bedNo,
-    inpatientNo: val.inpatientNo,
-    admissTimes: val.admissTimes,
-    name: val.name,
-    sex: val.sex,
-    medType: val.medType,
-    dismissOrder: val.dismissOrder,
-    mdtrtId: val.mdtrtId,
-    injurySerialNo: val.injurySerialNo,
-    status: val.mdtrtId || val.injurySerialNo ? 1 : 0,
-  }
+    return {
+        bedNo: val.bedNo,
+        inpatientNo: val.inpatientNo,
+        admissTimes: val.admissTimes,
+        name: val.name,
+        sex: val.sex,
+        medType: val.medType,
+        dismissOrder: val.dismissOrder,
+        mdtrtId: val.mdtrtId,
+        injurySerialNo: val.injurySerialNo,
+        status: val.mdtrtId || val.injurySerialNo ? 1 : 0,
+    }
 }
 </script>

+ 3 - 15
src/views/settings/Test.vue

@@ -1,23 +1,11 @@
 <template>
+    <div ref="headerRef">
 
+    </div>
 </template>
 
 <script setup>
 
 
-onMounted(() => {
-
-    let a = `return {
-              click : (a) => {
-                  console.log(123)
-                  console.log(a)
-              }
-          }`
-
-    let te = new Function(a)
-
-    console.log(te().click(222));
-
-})
-
 </script>
+