瀏覽代碼

Merge branch 'master' into 淮海科技

lighter 6 月之前
父節點
當前提交
98e6693040
共有 30 個文件被更改,包括 8993 次插入5464 次删除
  1. 707 111
      src/components/inpatient/frontsheet-printpage/FullPage.vue
  2. 683 109
      src/components/inpatient/frontsheet-printpage/HeadPage.vue
  3. 496 513
      src/components/medical-advice/temperature/graphics.vue
  4. 250 122
      src/components/medical-insurance/charge-list/ChargeTable.vue
  5. 195 108
      src/components/medical-insurance/inspect/InspectionReport.vue
  6. 196 141
      src/components/operate-monitoring/ReportFirstPage.vue
  7. 156 113
      src/components/operate-monitoring/ReportSecondPage.vue
  8. 125 86
      src/components/operate-monitoring/ReportThirdPage.vue
  9. 45 21
      src/components/outpatient/MzReceipt.vue
  10. 204 105
      src/components/si-sheet-upload/jieSuanDanDaYing.vue
  11. 95 90
      src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckTable.vue
  12. 5 2
      src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/report-of-infectious-diseases/DialogDiseases.vue
  13. 3 2
      src/pinia/system-store.ts
  14. 889 627
      src/views/clinic/chronicDisease/ChronicDiseaseRegister.vue
  15. 961 536
      src/views/clinic/mz-medical/MzMedicalMain.vue
  16. 85 64
      src/views/examination/BloodSugarQuery/BloodSugarQuery.vue
  17. 87 83
      src/views/examination/BloodSugarQuery/components/BloodSugarTable.vue
  18. 229 185
      src/views/examination/InspectionReportIndex.vue
  19. 275 92
      src/views/examination/TjReportInfo.vue
  20. 120 63
      src/views/examination/component/JyResult.vue
  21. 116 78
      src/views/hospitalization/MakeDbzFees.vue
  22. 5 2
      src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue
  23. 318 239
      src/views/hospitalization/case-front-sheet/FrontSheetExport.vue
  24. 128 116
      src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/PoisonAndAnestheticPrinting.vue
  25. 294 217
      src/views/medical-advice/advice-management/CqYzPrint.vue
  26. 291 216
      src/views/medical-advice/advice-management/LsYzPrint.vue
  27. 1634 1131
      src/views/medical-advice/nursing-manage/NursingRecord.vue
  28. 172 101
      src/views/medical-insurance/allpatient/SiSettleDetailList.vue
  29. 171 137
      src/views/medical-insurance/outpatient/DigitalRx.vue
  30. 58 54
      src/views/operate-monitoring/DataBigScreen.vue

File diff suppressed because it is too large
+ 707 - 111
src/components/inpatient/frontsheet-printpage/FullPage.vue


File diff suppressed because it is too large
+ 683 - 109
src/components/inpatient/frontsheet-printpage/HeadPage.vue


+ 496 - 513
src/components/medical-advice/temperature/graphics.vue

@@ -4,51 +4,46 @@
       :key="'comKey' + comKey"
       class="container"
       :style="{
-        marginTop: marginTop + 'px'
+        marginTop: marginTop + 'px',
       }"
     >
       <svg width="100%" height="100%"></svg>
     </div>
     <table class="temperatureChart">
       <caption>
-        <p style="font-size: 20px; font-weight: bold">长沙泰和医院</p>
+        <p style="font-size: 20px; font-weight: bold">
+          {{ env.VITE_HOSPITAL_NAME }}
+        </p>
         <p style="font-size: 20px; font-weight: bold">体温单</p>
         <p style="position: relative; text-align: left">
           <span class="tbale-label">&nbsp&nbsp;姓名:</span
-          ><span
-            style="display: inline-block; width: 75px; text-align: left"
-            >{{ info.name }}</span
-          >
+          ><span style="display: inline-block; width: 75px; text-align: left">{{
+            info.name
+          }}</span>
           <span class="tbale-label">年龄:</span>
-          <span
-            style="display: inline-block; width: 60px; text-align: left"
-            >{{ info.age + "岁"  }}</span
-          >
+          <span style="display: inline-block; width: 60px; text-align: left">{{
+            info.age + "岁"
+          }}</span>
           <span class="tbale-label">性别:</span>
-          <span
-            style="display: inline-block; width: 60px; text-align: left"
-            >{{ info.sexName }}</span
-          >
+          <span style="display: inline-block; width: 60px; text-align: left">{{
+            info.sexName
+          }}</span>
           <span class="tbale-label">入院日期:</span>
-          <span
-                  style="display: inline-block; width: 100px; text-align: left"
-          >{{info.admissDate}}</span
-          >
+          <span style="display: inline-block; width: 100px; text-align: left">{{
+            info.admissDate
+          }}</span>
           <span class="tbale-label">科室:</span>
-          <span
-                  style="display: inline-block; width: 65px; text-align: left"
-          >{{ info.admissWardName }}</span
-          >
+          <span style="display: inline-block; width: 65px; text-align: left">{{
+            info.admissWardName
+          }}</span>
           <span class="tbale-label">床号:</span>
-          <span
-            style="display: inline-block; width: 60px; text-align: left"
-            >{{ info.bedNo }}</span
-          >
+          <span style="display: inline-block; width: 60px; text-align: left">{{
+            info.bedNo
+          }}</span>
           <span class="tbale-label">住院号:</span>
-          <span
-            style="display: inline-block; width: 100px; text-align: left"
-            >{{ info.inpatientNo }}</span
-          >
+          <span style="display: inline-block; width: 100px; text-align: left">{{
+            info.inpatientNo
+          }}</span>
         </p>
       </caption>
 
@@ -142,8 +137,8 @@
         <!-- <record></record> -->
         <tr class="recorde temperature_mark">
           <td colspan="2" rowspan="45" style="border-right: 1px solid white">
-            <div style="margin-top: 476px;height: 31px">
-              <p style="width:35px;">
+            <div style="margin-top: 476px; height: 31px">
+              <p style="width: 35px">
                 <span>口表•</span>
                 <span style="color: blue">腋表x</span>
                 <span>肛表o</span>
@@ -155,7 +150,7 @@
           </td>
           <td colspan="3" rowspan="45">
             <div style="color: red" class="num_wrapper">
-              <p style="margin-top: 0;text-align: right">脉搏次/分</p>
+              <p style="margin-top: 0; text-align: right">脉搏次/分</p>
               <p style="margin-top: 32px">180</p>
               <p style="margin-top: 55px">160</p>
               <p style="margin-top: 55px">140</p>
@@ -436,61 +431,58 @@
 
         <tr>
           <td
-
-                  :colspan="index === 0 ? 8 : 1"
-                  v-for="(item, index) in array42"
-                  :class="[index && 'redLineTd']"
-                  :key="index + '|098'"
+            :colspan="index === 0 ? 8 : 1"
+            v-for="(item, index) in array42"
+            :class="[index && 'redLineTd']"
+            :key="index + '|098'"
           >
             {{
-            index === 0
-            ? "呼吸(次/分)"
-            : typesViewData["098"] && typesViewData["098"][index - 1]
+              index === 0
+                ? "呼吸(次/分)"
+                : typesViewData["098"] && typesViewData["098"][index - 1]
             }}
           </td>
-
         </tr>
         <tr>
           <td
-
-                  :colspan="index === 0 ? 8 : 1"
-                  v-for="(item, index) in array42"
-                  :class="[index && 'redLineTd']"
-                  :key="index + '|099'"
+            :colspan="index === 0 ? 8 : 1"
+            v-for="(item, index) in array42"
+            :class="[index && 'redLineTd']"
+            :key="index + '|099'"
           >
             {{
-            index === 0
-            ? "疼痛强度"
-            : typesViewData["099"] && typesViewData["099"][index - 1]
+              index === 0
+                ? "疼痛强度"
+                : typesViewData["099"] && typesViewData["099"][index - 1]
             }}
           </td>
         </tr>
         <tr>
           <td
-                  :colspan="index === 0 ? 8 : 6"
-                  v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
-                  :class="[index && 'redLineTd']"
-                  :key="index + '|005'"
+            :colspan="index === 0 ? 8 : 6"
+            v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
+            :class="[index && 'redLineTd']"
+            :key="index + '|005'"
           >
             {{
-            index === 0
-            ? "大便(次/日)"
-            : typesViewData["005"] && typesViewData["005"][index - 1]
+              index === 0
+                ? "大便(次/日)"
+                : typesViewData["005"] && typesViewData["005"][index - 1]
             }}
           </td>
         </tr>
 
         <tr>
           <td
-                  :colspan="index === 0 ? 8 : 6"
-                  v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
-                  :class="[index && 'redLineTd']"
-                  :key="index + '|004'"
+            :colspan="index === 0 ? 8 : 6"
+            v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
+            :class="[index && 'redLineTd']"
+            :key="index + '|004'"
           >
             {{
-            index === 0
-            ? "小便(ml)"
-            : typesViewData["004"] && typesViewData["004"][index - 1]
+              index === 0
+                ? "小便(ml)"
+                : typesViewData["004"] && typesViewData["004"][index - 1]
             }}
           </td>
         </tr>
@@ -508,31 +500,31 @@
             }}
           </td>
         </tr>
-        <tr >
+        <tr>
           <td
-                  :colspan="index === 0 ? 8 : 6"
-                  v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
-                  :class="[index && 'redLineTd']"
-                  :key="index + '|030'"
+            :colspan="index === 0 ? 8 : 6"
+            v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
+            :class="[index && 'redLineTd']"
+            :key="index + '|030'"
           >
             {{
-            index === 0
-            ? "身高(cm)"
-            : typesViewData["030"] && typesViewData["030"][index - 1]
+              index === 0
+                ? "身高(cm)"
+                : typesViewData["030"] && typesViewData["030"][index - 1]
             }}
           </td>
         </tr>
         <tr>
           <td
-                  :colspan="index === 0 ? 8 : 6"
-                  v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
-                  :class="[index && 'redLineTd']"
-                  :key="index + '|009'"
+            :colspan="index === 0 ? 8 : 6"
+            v-for="(item, index) in [0, 1, 2, 3, 4, 5, 6, 7]"
+            :class="[index && 'redLineTd']"
+            :key="index + '|009'"
           >
             {{
-            index === 0
-            ? "体重(kg)"
-            : typesViewData["009"] && typesViewData["009"][index - 1]
+              index === 0
+                ? "体重(kg)"
+                : typesViewData["009"] && typesViewData["009"][index - 1]
             }}
           </td>
         </tr>
@@ -566,7 +558,6 @@
           </td>
         </tr>
 
-
         <tr>
           <td
             :colspan="index === 0 ? 8 : 6"
@@ -592,35 +583,39 @@
 </template>
 
 <script>
-import * as d3 from 'd3'
-import dayjs from 'dayjs'
-import { getKeyMap, SectionToChinese } from './utils'
-import {getChartData,getAllPatintInfo} from "@/api/medical-advice/nursing-manage";
-import { getFormatDatetime } from "@/utils/date"
+import * as d3 from "d3";
+import dayjs from "dayjs";
+import { getKeyMap, SectionToChinese } from "./utils";
+import {
+  getChartData,
+  getAllPatintInfo,
+} from "@/api/medical-advice/nursing-manage";
+import { getFormatDatetime } from "@/utils/date";
+import env from "../../../utils/setting.js";
 
 export default {
   props: {
     patientInfo: Object,
     queryParam: Object,
   },
-  data () {
+  data() {
     return {
       marginTop: 0,
       keyMap: getKeyMap(),
       info: {
         age: 0,
-        beginDate: '',
-        inpatientNo: '',
+        beginDate: "",
+        inpatientNo: "",
         hospDate: 0,
-        admissDate:'',
-        bedNo:'',
+        admissDate: "",
+        bedNo: "",
         inDate: 0,
         inDiagName: null,
-        name: '',
-        admissWardName: '',
-        sexName: '',
-        pageNo: '1',
-        operaDays:[]
+        name: "",
+        admissWardName: "",
+        sexName: "",
+        pageNo: "1",
+        operaDays: [],
       },
       xyList: [],
       typesInfo: [],
@@ -629,27 +624,30 @@ export default {
       tdList: new Array(42).fill(0),
       comKey: 1,
       symbolTextArr: [],
-      array42:[],
-    }
+      array42: [],
+    };
   },
   computed: {
+    env() {
+      return env;
+    },
     // 日期
-    inHospitalTime () {
-      const initday = dayjs(this.info.beginDate)
+    inHospitalTime() {
+      const initday = dayjs(this.info.beginDate);
       return [
         null, // 文案天
-        initday.format('YYYY-MM-DD'),
-        initday.add(1, 'day').format('MM-DD'),
-        initday.add(2, 'day').format('MM-DD'),
-        initday.add(3, 'day').format('MM-DD'),
-        initday.add(4, 'day').format('MM-DD'),
-        initday.add(5, 'day').format('MM-DD'),
-        initday.add(6, 'day').format('MM-DD')
-      ]
+        initday.format("YYYY-MM-DD"),
+        initday.add(1, "day").format("MM-DD"),
+        initday.add(2, "day").format("MM-DD"),
+        initday.add(3, "day").format("MM-DD"),
+        initday.add(4, "day").format("MM-DD"),
+        initday.add(5, "day").format("MM-DD"),
+        initday.add(6, "day").format("MM-DD"),
+      ];
     },
     // 住院天数
-    inHospitalDays () {
-      const initday = this.info.hospDays || 0
+    inHospitalDays() {
+      const initday = this.info.hospDays || 0;
       return [
         null, // 文案天
         initday + 1,
@@ -658,105 +656,107 @@ export default {
         initday + 4,
         initday + 5,
         initday + 6,
-        initday + 7
-      ]
+        initday + 7,
+      ];
     },
     // 手术天数
-    surgeryDays () {
-      const initday = this.info.operaDays
-      if (initday.length <=0) {
-        return new Array(8).fill(null)
+    surgeryDays() {
+      const initday = this.info.operaDays;
+      if (initday.length <= 0) {
+        return new Array(8).fill(null);
       } else {
-        return  initday
+        return initday;
       }
-    }
+    },
   },
-  mounted () {
+  mounted() {
     for (let i = 0; i < 43; i++) {
-      this.array42.push(i)
+      this.array42.push(i);
     }
-    this.initData()
+    this.initData();
     const marginTop =
       (Math.round(this.$refs.topTd[0].getBoundingClientRect().height) - 18) *
         10 +
-      28
-    this.marginTop = marginTop
+      28;
+    this.marginTop = marginTop;
     // setTimeout(() => {
     //   this.$emit('done')
     // })
   },
   methods: {
     SectionToChinese,
-    getSymbolTextArr (index) {
-      const current = this.symbolTextArr.find(i => i.x === index)
+    getSymbolTextArr(index) {
+      const current = this.symbolTextArr.find(i => i.x === index);
       if (current) {
-        return current.y
+        return current.y;
       } else {
-        return ''
+        return "";
       }
     },
-    temperatureConverter (c) {
-      const value = (c * 9) / 5 + 32
-      return value.toFixed(1)
+    temperatureConverter(c) {
+      const value = (c * 9) / 5 + 32;
+      return value.toFixed(1);
     },
-    initData () {
+    initData() {
       // this.info = dataModel.grParamBOS
-      this.info.pageNo = this.queryParam.week
-      this.info.beginDate =this.queryParam.startRecTime
-      this.info.hospDays = (Number(this.queryParam.week)-1)*7
+      this.info.pageNo = this.queryParam.week;
+      this.info.beginDate = this.queryParam.startRecTime;
+      this.info.hospDays = (Number(this.queryParam.week) - 1) * 7;
       // this.rowsInfo = dataModel.rows || []
       // this.typesInfo = dataModel.types || []
       let param = {
-        inpatientNo:this.patientInfo.inpatientNo,
-        admissTimes:this.patientInfo.admissTimes,
-        week:this.queryParam.week,
-        startRecTime:this.queryParam.startRecTime,
-        endRecTime:this.queryParam.endRecTime,
-        mbFlag:this.queryParam.checkBoxFlag.mbFlag,
-        hxFlag:this.queryParam.checkBoxFlag.hxFlag,
-        xyFlag:this.queryParam.checkBoxFlag.xyFlag,
-        wcyRqFlag:this.queryParam.checkBoxFlag.wcyRqFlag,
-      }
-      getAllPatintInfo({inpatientNo:this.patientInfo.inpatientNo,
-        admissTimes:this.patientInfo.admissTimes}).then((res)=>{
-          this.info.name = res.name
-        this.info.age = res.age || ''
-        this.info.sexName = res.sexName
-        this.info.bedNo = res.bedNo
-        this.info.inpatientNo = res.inpatientNo
-        this.info.admissWardName = res.admissWardName
-        this.info.admissDate = getFormatDatetime(res.admissDate,'YYYY-MM-DD')
-      })
+        inpatientNo: this.patientInfo.inpatientNo,
+        admissTimes: this.patientInfo.admissTimes,
+        week: this.queryParam.week,
+        startRecTime: this.queryParam.startRecTime,
+        endRecTime: this.queryParam.endRecTime,
+        mbFlag: this.queryParam.checkBoxFlag.mbFlag,
+        hxFlag: this.queryParam.checkBoxFlag.hxFlag,
+        xyFlag: this.queryParam.checkBoxFlag.xyFlag,
+        wcyRqFlag: this.queryParam.checkBoxFlag.wcyRqFlag,
+      };
+      getAllPatintInfo({
+        inpatientNo: this.patientInfo.inpatientNo,
+        admissTimes: this.patientInfo.admissTimes,
+      }).then(res => {
+        this.info.name = res.name;
+        this.info.age = res.age || "";
+        this.info.sexName = res.sexName;
+        this.info.bedNo = res.bedNo;
+        this.info.inpatientNo = res.inpatientNo;
+        this.info.admissWardName = res.admissWardName;
+        this.info.admissDate = getFormatDatetime(res.admissDate, "YYYY-MM-DD");
+      });
 
-      getChartData(param).then((res)=>{
-        this.rowsInfo = res.rows
-        this.typesInfo = res.types
-        this.info.operaDays = res.operaDays
-        this.init()
-      })
+      getChartData(param).then(res => {
+        this.rowsInfo = res.rows;
+        this.typesInfo = res.types;
+        this.info.operaDays = res.operaDays;
+        this.init();
+      });
     },
-    init () {
+    init() {
       //800 758
-      var width = 690
-      var height = 682
+      var width = 690;
+      var height = 682;
       // SVG画布边缘与图表内容的距离
-      var padding = { top: 50, right: 0, bottom: 50, left: 50 }
+      var padding = { top: 50, right: 0, bottom: 50, left: 50 };
       // 创建一个分组用来组合要画的图表元素
       var main = d3
-        .select('.container svg')
-        .append('g')
-        .classed('main', true)
-        .attr('transform', 'translate(' + 80 + ',' + 80 + ')')
+        .select(".container svg")
+        .append("g")
+        .classed("main", true)
+        .attr("transform", "translate(" + 80 + "," + 80 + ")");
       // 模拟数据 体温
-      var dataset = getTypeData('003', this.rowsInfo)
-      var datasetAnus = getTypeData('015', this.rowsInfo)
-      var datasetHeartrate = getTypeData('014', this.rowsInfo)
-      var datasetPulse = getTypeData('002', this.rowsInfo)
-      var symbolTextArr = getTypeData('012', this.rowsInfo, false)
-      this.symbolTextArr = symbolTextArr
+      var dataset = getTypeData("003", this.rowsInfo);
+      var datasetAnus = getTypeData("015", this.rowsInfo);
+      var datasetHeartrate = getTypeData("014", this.rowsInfo);
+      var datasetPulse = getTypeData("002", this.rowsInfo);
+      var symbolTextArr = getTypeData("012", this.rowsInfo, false);
+      this.symbolTextArr = symbolTextArr;
       // 口表【黑实圆】
-      var datasetPain = getTypeData('001', this.rowsInfo)
-      this.breathData = datasetPain
+      var datasetPain = getTypeData("001", this.rowsInfo);
+      this.breathData = datasetPain;
       // const circleNode = document.createElement('circle')
       // circleNode.setAttribute('cx', '179.2439024390244')
       // circleNode.setAttribute('cy', '582')
@@ -766,9 +766,10 @@ export default {
       // circleNode.setAttribute('fill', '#FFFFFF')
       // document.querySelector('.main').appendChild(circleNode)
       // 创建x轴的比例尺(线性比例尺)
-      var xScale = d3.scaleLinear()
+      var xScale = d3
+        .scaleLinear()
         .domain([0, 41])
-        .range([9, width - padding.left - padding.right +75])
+        .range([9, width - padding.left - padding.right + 75]);
       // 创建y轴的比例尺(线性比例尺)
 
       /* var yScale = d3.scale.linear()
@@ -777,101 +778,86 @@ export default {
                         })])
                         .range([height - padding.top - padding.bottom, 0]); */
       // 体温
-      var yScale = d3.scaleLinear()
-              .domain([33, 42])
-              .range([height - padding.top - padding.bottom , -56])
+      var yScale = d3
+        .scaleLinear()
+        .domain([33, 42])
+        .range([height - padding.top - padding.bottom, -56]);
       // 脉搏
-      var yScale1 = d3.scaleLinear()
-              .domain([20, 200])
-              .range([height - padding.top - padding.bottom , -55])
+      var yScale1 = d3
+        .scaleLinear()
+        .domain([20, 200])
+        .range([height - padding.top - padding.bottom, -55]);
       // 呼吸
-      var yScale2 = d3.scaleLinear()
+      var yScale2 = d3
+        .scaleLinear()
         .domain([0, 40])
-        .range([height - padding.top + 22, -55])
+        .range([height - padding.top + 22, -55]);
 
       // 创建x轴
-      var xAxis = d3.axisBottom()
-        .scale(xScale)
+      var xAxis = d3.axisBottom().scale(xScale);
       // 创建y轴
-      var yAxis = d3.axisLeft()
-        .scale(yScale)
-      var yAxis1 = d3.axisLeft()
-        .scale(yScale1)
-      var yAxis2 = d3.axisLeft()
-        .scale(yScale2)
+      var yAxis = d3.axisLeft().scale(yScale);
+      var yAxis1 = d3.axisLeft().scale(yScale1);
+      var yAxis2 = d3.axisLeft().scale(yScale2);
 
       // 添加SVG元素并与x轴进行“绑定”
       main
-        .append('g')
-        .attr('class', 'axis')
+        .append("g")
+        .attr("class", "axis")
         .attr(
-          'transform',
-          'translate(0,' + (height - padding.top - padding.bottom) + ')'
+          "transform",
+          "translate(0," + (height - padding.top - padding.bottom) + ")"
         )
-        .call(xAxis)
+        .call(xAxis);
 
       // 添加SVG元素并与y轴进行“绑定”
-      main
-        .append('g')
-        .attr('class', 'axis')
-        .call(yAxis)
-      main
-        .append('g')
-        .attr('class', 'axis')
-        .call(yAxis1)
-      main
-        .append('g')
-        .attr('class', 'axis')
-        .call(yAxis2)
+      main.append("g").attr("class", "axis").call(yAxis);
+      main.append("g").attr("class", "axis").call(yAxis1);
+      main.append("g").attr("class", "axis").call(yAxis2);
 
       // 添加折线
-      var line = d3.line()
+      var line = d3
+        .line()
         .x(function (d) {
-          return xScale(d.x)
+          return xScale(d.x);
         })
         .y(function (d) {
-          return yScale(d.y)
-        })
+          return yScale(d.y);
+        });
       var line1 = d3
         .line()
         .x(function (d) {
-          return xScale(d.x)
+          return xScale(d.x);
         })
         .y(function (d) {
-          return yScale1(d.y)
-        })
+          return yScale1(d.y);
+        });
       var line2 = d3
         .line()
         .x(function (d) {
-          return xScale(d.x)
+          return xScale(d.x);
         })
         .y(function (d) {
-          return yScale(d.y)
-        })
-        // .interpolate('linear')
+          return yScale(d.y);
+        });
+      // .interpolate('linear')
       // 选择线条的类型
 
       // 添加path元素,并通过line()计算出值来赋值
       main
-        .append('path')
-        .attr('class', 'line tiwenline')
-        .attr('d', line(dataset))
-      main
-        .append('path')
-        .attr('class', 'line')
-        .attr('d', line(datasetAnus))
+        .append("path")
+        .attr("class", "line tiwenline")
+        .attr("d", line(dataset));
+      main.append("path").attr("class", "line").attr("d", line(datasetAnus));
+      main.append("path").attr("class", "line").attr("d", line2(datasetPain));
       main
-        .append('path')
-        .attr('class', 'line')
-        .attr('d', line2(datasetPain))
+        .append("path")
+        .attr("class", "line redColor")
+        .attr("d", line1(datasetHeartrate));
       main
-        .append('path')
-        .attr('class', 'line redColor')
-        .attr('d', line1(datasetHeartrate))
-      main
-        .append('path')
-        .attr('class', 'line redColor')
-        .attr('d', line1(datasetPulse))
+        .append("path")
+        .attr("class", "line redColor")
+        .attr("d", line1(datasetPulse));
       // main.append('path').attr('class', 'line').attr('d', line3(dataset))
 
       // 添加点
@@ -896,141 +882,141 @@ export default {
 
       /* 黑空圆--start */
       main
-        .selectAll('rect')
+        .selectAll("rect")
         .data(datasetAnus)
         .enter()
-        .append('circle')
-        .attr('cx', function (d) {
-          return xScale(d.x)
+        .append("circle")
+        .attr("cx", function (d) {
+          return xScale(d.x);
         })
-        .attr('cy', function (d) {
-          return yScale(d.y)
+        .attr("cy", function (d) {
+          return yScale(d.y);
         })
-        .attr('r', 4)
-        .attr('stroke', '#000000')
-        .attr('stroke-width', 1)
-        .attr('fill', '#FFFFFF')
+        .attr("r", 4)
+        .attr("stroke", "#000000")
+        .attr("stroke-width", 1)
+        .attr("fill", "#FFFFFF");
       /* 黑空圆--end */
 
       /* 红空圆--start */
       main
-        .selectAll('rect')
+        .selectAll("rect")
         .data(datasetHeartrate)
         .enter()
-        .append('circle')
-        .attr('cx', function (d) {
-          return xScale(d.x)
+        .append("circle")
+        .attr("cx", function (d) {
+          return xScale(d.x);
         })
-        .attr('cy', function (d) {
-          return yScale1(d.y)
+        .attr("cy", function (d) {
+          return yScale1(d.y);
         })
-        .attr('r', 4)
-        .attr('stroke', '#EE0000')
-        .attr('stroke-width', 1)
-        .attr('fill', '#FFFFFF')
+        .attr("r", 4)
+        .attr("stroke", "#EE0000")
+        .attr("stroke-width", 1)
+        .attr("fill", "#FFFFFF");
       /* 红空圆--end */
 
       /* 红实圆--start */
       main
-        .selectAll('rect')
+        .selectAll("rect")
         .data(datasetPulse)
         .enter()
-        .append('circle')
-        .attr('cx', function (d) {
-          return xScale(d.x)
+        .append("circle")
+        .attr("cx", function (d) {
+          return xScale(d.x);
         })
-        .attr('cy', function (d) {
-          return yScale1(d.y)
+        .attr("cy", function (d) {
+          return yScale1(d.y);
         })
-        .attr('r', 4)
-        .attr('fill', '#EE0000')
-        // .on('mouseover', function (d) {
-        //   // (1)取得提示显示的位置
-        //   var xPosition = parseFloat(d3.select(this).attr('cx')) + 698
-        //   var yPosition = parseFloat(d3.select(this).attr('cy')) + 24
-        //
-        //   // (2)创建提示条SVG
-        //   d3.select('.container svg')
-        //     .append('text')
-        //     .attr('id', 'tooltip') // 设置id便于移除提示
-        //     .attr('x', xPosition)
-        //     .attr('y', yPosition)
-        //     .attr('text-anchor', 'middle')
-        //     .attr('font-family', 'sans-setif')
-        //     .attr('font-size', '11px')
-        //     .attr('font-weight', 'bold')
-        //     .attr('fill', 'white')
-        //     .text(d.value)
-        // })
+        .attr("r", 4)
+        .attr("fill", "#EE0000");
+      // .on('mouseover', function (d) {
+      //   // (1)取得提示显示的位置
+      //   var xPosition = parseFloat(d3.select(this).attr('cx')) + 698
+      //   var yPosition = parseFloat(d3.select(this).attr('cy')) + 24
+      //
+      //   // (2)创建提示条SVG
+      //   d3.select('.container svg')
+      //     .append('text')
+      //     .attr('id', 'tooltip') // 设置id便于移除提示
+      //     .attr('x', xPosition)
+      //     .attr('y', yPosition)
+      //     .attr('text-anchor', 'middle')
+      //     .attr('font-family', 'sans-setif')
+      //     .attr('font-size', '11px')
+      //     .attr('font-weight', 'bold')
+      //     .attr('fill', 'white')
+      //     .text(d.value)
+      // })
       // (3)移除提示条SVG
 
       /* 红实圆--end */
       /* 黑实圆--start */
       main
-        .selectAll('rect')
+        .selectAll("rect")
         .data(datasetPain)
         .enter()
-        .append('circle')
-        .attr('cx', function (d) {
-          return xScale(d.x)
+        .append("circle")
+        .attr("cx", function (d) {
+          return xScale(d.x);
         })
-        .attr('cy', function (d) {
-          return yScale(d.y)
+        .attr("cy", function (d) {
+          return yScale(d.y);
         })
-        .attr('r', 4)
-        .attr('stroke', '#000000')
-        .attr('fill', '#000000')
+        .attr("r", 4)
+        .attr("stroke", "#000000")
+        .attr("fill", "#000000");
       /* 黑实圆--end */
-      this.drawx(main, dataset, xScale, yScale)
-      this.initTypes()
+      this.drawx(main, dataset, xScale, yScale);
+      this.initTypes();
       // this.hoverEvent(main)
     },
-    drawx (main, dataset, xScale, yScale) {
+    drawx(main, dataset, xScale, yScale) {
       /* 【叉形】--start */
       main
-        .selectAll('rect')
+        .selectAll("rect")
         .data(dataset)
         .enter()
-        .append('line')
-        .attr('x1', function (d) {
-          return xScale(d.x) - 4
-        })
-        .attr('y1', function (d) {
-          return yScale(d.y) - 4
+        .append("line")
+        .attr("x1", function (d) {
+          return xScale(d.x) - 4;
         })
-        .attr('x2', function (d) {
-          return xScale(d.x) + 4
+        .attr("y1", function (d) {
+          return yScale(d.y) - 4;
         })
-        .attr('y2', function (d) {
-          return yScale(d.y) + 4
+        .attr("x2", function (d) {
+          return xScale(d.x) + 4;
         })
-        .attr('stroke', function (d, i) {
-          return 'blue'
+        .attr("y2", function (d) {
+          return yScale(d.y) + 4;
         })
+        .attr("stroke", function (d, i) {
+          return "blue";
+        });
 
       main
-        .selectAll('rect')
+        .selectAll("rect")
         .data(dataset)
         .enter()
-        .append('line')
-        .attr('x1', function (d) {
-          return xScale(d.x) + 4
-        })
-        .attr('y1', function (d) {
-          return yScale(d.y) - 4
+        .append("line")
+        .attr("x1", function (d) {
+          return xScale(d.x) + 4;
         })
-        .attr('x2', function (d) {
-          return xScale(d.x) -4
+        .attr("y1", function (d) {
+          return yScale(d.y) - 4;
         })
-        .attr('y2', function (d) {
-          return yScale(d.y) + 4
+        .attr("x2", function (d) {
+          return xScale(d.x) - 4;
         })
-        .attr('stroke', function (d,i) {
-          return 'blue'
+        .attr("y2", function (d) {
+          return yScale(d.y) + 4;
         })
+        .attr("stroke", function (d, i) {
+          return "blue";
+        });
       /* 体温【叉形】--end */
     },
-    hoverEvent (main) {
+    hoverEvent(main) {
       ///* 鼠标悬停直线--start
       //         var dataset_line = [{x: 0,y: 0}]
       //         main.selectAll('rect')
@@ -1044,24 +1030,24 @@ export default {
       //           .attr('stroke', function(d, i) {
       //             return 'black';
       //           });
-            //  鼠标悬停直线--end */
-      document.querySelector('.lineColor').style.stroke = 'red'
-      const recordeNode = document.createElement('div')
-      recordeNode.setAttribute('class', 'recorde-text')
-      document.querySelector('.recorde td').append(recordeNode)
-      const allTrtd = document.querySelectorAll('.temperatureChart tr td');
+      //  鼠标悬停直线--end */
+      document.querySelector(".lineColor").style.stroke = "red";
+      const recordeNode = document.createElement("div");
+      recordeNode.setAttribute("class", "recorde-text");
+      document.querySelector(".recorde td").append(recordeNode);
+      const allTrtd = document.querySelectorAll(".temperatureChart tr td");
       [...allTrtd].map(ele => {
-        ele.setAttribute('title', ele.innerText)
-      })
+        ele.setAttribute("title", ele.innerText);
+      });
       /* 鼠标悬停提示框 */
       var tooltip = d3
-        .select('body')
-        .append('div')
-        .attr('class', 'tooltip')
-        .style('opacity', 0.0)
+        .select("body")
+        .append("div")
+        .attr("class", "tooltip")
+        .style("opacity", 0.0);
 
       main
-        .on('mouseover', function (d) {
+        .on("mouseover", function (d) {
           /*
                     鼠标移入时,
                     (1)通过 selection.html() 来更改提示框的文字
@@ -1069,205 +1055,202 @@ export default {
                     (3)设定提示框的透明度为1.0(完全不透明)
                     */
           tooltip
-            .html('呼吸:19次/分<br/>录入信息:2017-11-02<br/>姓名:张三')
-            .style('left', d3.event.pageX + 'px')
-            .style('top', d3.event.pageY + 20 + 'px')
-            .style('opacity', 1.0)
+            .html("呼吸:19次/分<br/>录入信息:2017-11-02<br/>姓名:张三")
+            .style("left", d3.event.pageX + "px")
+            .style("top", d3.event.pageY + 20 + "px")
+            .style("opacity", 1.0);
         })
-        .on('mousemove', function (d) {
+        .on("mousemove", function (d) {
           /* 鼠标移动时,更改样式 left 和 top 来改变提示框的位置 */
           tooltip
-            .style('left', d3.event.pageX + 'px')
-            .style('top', d3.event.pageY + 20 + 'px')
+            .style("left", d3.event.pageX + "px")
+            .style("top", d3.event.pageY + 20 + "px");
         })
-        .on('mouseout', function (d) {
+        .on("mouseout", function (d) {
           /* 鼠标移出时,将透明度设定为0.0(完全透明) */
 
-          tooltip.style('opacity', 0.0)
-        })
+          tooltip.style("opacity", 0.0);
+        });
     },
-    initTypes () {
-      const keyMap = {}
+    initTypes() {
+      const keyMap = {};
       this.typesInfo.map(item => {
-        const key = item.typeCode
+        const key = item.typeCode;
         if (keyMap[key]) {
-          keyMap[key].push(item.typeValue)
+          keyMap[key].push(item.typeValue);
         } else {
-          keyMap[key] = [item.typeValue]
+          keyMap[key] = [item.typeValue];
         }
-      })
-      this.typesViewData = keyMap
-    }
-  }
-}
+      });
+      this.typesViewData = keyMap;
+    },
+  },
+};
 
-function getTypeData (type, allData = [], isNumber = true) {
+function getTypeData(type, allData = [], isNumber = true) {
   return allData
     .map((rowBOSItem, index) => {
-      const rowBOS = rowBOSItem.rowBOS
+      const rowBOS = rowBOSItem.rowBOS;
       const cur =
         rowBOS.find(item => {
-          return item.typeCode === type
-        }) || {}
-      return { x: index, y: (isNumber ? +cur.typeValue : cur.typeValue) || '' }
+          return item.typeCode === type;
+        }) || {};
+      return { x: index, y: (isNumber ? +cur.typeValue : cur.typeValue) || "" };
     })
     .filter(item => {
-      return item.y !== ''
-    })
+      return item.y !== "";
+    });
 }
 </script>
 
-<style  scoped>
-  .table_wrap {
-    line-height: normal;
-  }
-  table {
-    font-weight: normal;
-    border-collapse: collapse;
-    font-size: 8px;
-    text-align: center;
-    width: 100%;
-    table-layout: fixed;
-    border: 2px #2f4f4f solid;
-  }
-  td {
-    border: 1px solid #ccc;
-    width: 12px;
-    height: 11px;
-  }
-  .redLineTd {
-    border-right: 1px solid #ff6e71;
-  }
-  .recorde-text {
-    width: 13px;
-    height: 8px;
-    color: #ff0000;
-    font-size: 10px;
-    position: relative;
-    top: -4px;
-  }
-  .table_wrap {
-    position: relative;
-    margin: 0 auto;
-    width: 835px;
-  }
-  .container {
-    /* 高度最好动态计算,不然很容易错位*/
-
-    margin: 30px auto;
-    margin-top: 28px;
-    width: 805px;
-    height: 758px;
-    position: absolute;
-    top: 142px;
-    left: 28px;
-  }
-  .temperature_mark td p {
-    position: relative;
-    top: 0;
-    margin-top: 58px;
-  }
-  .num_wrapper {
-    width: 35px;
-    height: 636px;
-    position: relative;
-  }
-  .pain_wrapper {
-    position: absolute;
-    width: 100%;
-    height: 70px;
-    right: 0;
-    bottom: -3px;
-    border: 1px solid #ccc;
-  }
-  .zeroline {
-    fill: none;
-    stroke: red;
-    stroke-width: 0.5px;
-    stroke-dasharray: 5 5;
-  }
-  .zerolinetext {
-    fill: red;
-  }
-  .overlay {
-    fill: none;
-    stroke: none;
-    pointer-events: all;
-  }
-  .tooltip {
-    font-family: "宋体";
-    font-size: 10px;
-    line-height: 16px;
-    color: #736269;
-    width: auto;
-    height: auto;
-    padding: 4px;
-    position: absolute;
-    text-align: left;
-    border: 1px solid #736269;
-    background-color: #e7e9f3;
-    border-radius: 2px;
-    background: linear-gradient(#fefdff, #e5e5f1);
-    /* 标准的语法(必须放在最后) */
-
-  }
+<style scoped>
+.table_wrap {
+  line-height: normal;
+}
+table {
+  font-weight: normal;
+  border-collapse: collapse;
+  font-size: 8px;
+  text-align: center;
+  width: 100%;
+  table-layout: fixed;
+  border: 2px #2f4f4f solid;
+}
+td {
+  border: 1px solid #ccc;
+  width: 12px;
+  height: 11px;
+}
+.redLineTd {
+  border-right: 1px solid #ff6e71;
+}
+.recorde-text {
+  width: 13px;
+  height: 8px;
+  color: #ff0000;
+  font-size: 10px;
+  position: relative;
+  top: -4px;
+}
+.table_wrap {
+  position: relative;
+  margin: 0 auto;
+  width: 835px;
+}
+.container {
+  /* 高度最好动态计算,不然很容易错位*/
 
+  margin: 30px auto;
+  margin-top: 28px;
+  width: 805px;
+  height: 758px;
+  position: absolute;
+  top: 142px;
+  left: 28px;
+}
+.temperature_mark td p {
+  position: relative;
+  top: 0;
+  margin-top: 58px;
+}
+.num_wrapper {
+  width: 35px;
+  height: 636px;
+  position: relative;
+}
+.pain_wrapper {
+  position: absolute;
+  width: 100%;
+  height: 70px;
+  right: 0;
+  bottom: -3px;
+  border: 1px solid #ccc;
+}
+.zeroline {
+  fill: none;
+  stroke: red;
+  stroke-width: 0.5px;
+  stroke-dasharray: 5 5;
+}
+.zerolinetext {
+  fill: red;
+}
+.overlay {
+  fill: none;
+  stroke: none;
+  pointer-events: all;
+}
+.tooltip {
+  font-family: "宋体";
+  font-size: 10px;
+  line-height: 16px;
+  color: #736269;
+  width: auto;
+  height: auto;
+  padding: 4px;
+  position: absolute;
+  text-align: left;
+  border: 1px solid #736269;
+  background-color: #e7e9f3;
+  border-radius: 2px;
+  background: linear-gradient(#fefdff, #e5e5f1);
+  /* 标准的语法(必须放在最后) */
+}
 </style>
-<style >
-  .table_wrap {
-    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
-  }
-  .table_wrap .tick,
-  .table_wrap .domain {
-    display: none;
-  }
-  .table_wrap .tbale-label {
-    font-weight: 700;
-  }
-  .table_wrap .focusLine {
-    fill: none;
-    stroke: red;
-    stroke-width: 0.5px;
-  }
-  .table_wrap .focusText {
-    color: red;
-  }
-  .table_wrap .breath_td_odd {
-    vertical-align: top;
-    font-size: 10px;
-  }
-  .table_wrap .breath_td_even {
-    vertical-align: bottom;
-    font-size: 10px;
-  }
-  .table_wrap .line {
-    fill: none;
-    stroke: black;
-    stroke-width: 2px;
-  }
-  .table_wrap .line.tiwenline {
-    stroke: blue;
-    fill: none;
-  }
-
-  .table_wrap .line.redColor{
-    stroke: red;
-    fill: none;
-  }
-  .table_wrap .axis path,
-  .table_wrap .axis line,
-  .table_wrap .line {
-    stroke: #000;
-    fill: none;
-  }
-  .table_wrap .legend {
-    display: flex;
-  }
-  .table_wrap .legend .legend-text {
-    display: flex;
-  }
-  .table_wrap .legend .legend-item {
-    margin-right: 20px;
-  }
+<style>
+.table_wrap {
+  font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+.table_wrap .tick,
+.table_wrap .domain {
+  display: none;
+}
+.table_wrap .tbale-label {
+  font-weight: 700;
+}
+.table_wrap .focusLine {
+  fill: none;
+  stroke: red;
+  stroke-width: 0.5px;
+}
+.table_wrap .focusText {
+  color: red;
+}
+.table_wrap .breath_td_odd {
+  vertical-align: top;
+  font-size: 10px;
+}
+.table_wrap .breath_td_even {
+  vertical-align: bottom;
+  font-size: 10px;
+}
+.table_wrap .line {
+  fill: none;
+  stroke: black;
+  stroke-width: 2px;
+}
+.table_wrap .line.tiwenline {
+  stroke: blue;
+  fill: none;
+}
 
+.table_wrap .line.redColor {
+  stroke: red;
+  fill: none;
+}
+.table_wrap .axis path,
+.table_wrap .axis line,
+.table_wrap .line {
+  stroke: #000;
+  fill: none;
+}
+.table_wrap .legend {
+  display: flex;
+}
+.table_wrap .legend .legend-text {
+  display: flex;
+}
+.table_wrap .legend .legend-item {
+  margin-right: 20px;
+}
 </style>

+ 250 - 122
src/components/medical-insurance/charge-list/ChargeTable.vue

@@ -1,131 +1,258 @@
 <template>
   <div class="layout_h-w_max" style="position: relative">
     <div class="layout_h-w_max" style="overflow: auto">
-      <div id="printArea"
-           style="width: 100% ;height: 100%;">
+      <div id="printArea" style="width: 100%; height: 100%">
         <table style="width: 100%">
           <thead ref="theadRef">
-          <tr>
-            <td colspan="8"
-                style="width: 96%;height: 50px;text-align: center;vertical-align:center;">
-              <div style="font-size: 20px;font-weight: bold;">住院病人费用明细清单</div>
-              <div style="margin-top: 5px">
-                机构名称:长沙泰和医院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机构编码:H43010500370
-              </div>
-            </td>
-          </tr>
-          <tr>
-            <td colspan="8" style="font-size: 16px; font-weight: bold">
-              床号:{{ briefPatInfo.bedNo }}
-            </td>
-          </tr>
-          <tr>
-            <td style="height: 22px">住院号:{{ briefPatInfo.patNo }}</td>
-            <td colspan="2">姓名:{{ briefPatInfo.name }}</td>
-            <td colspan="3">性别:{{ briefPatInfo.gender }}</td>
-            <td colspan="2">科室:{{ briefPatInfo.dept }}</td>
-          </tr>
-          <tr>
-            <td style=";height: 22px">入院日期:{{ briefPatInfo.admdate }}</td>
-            <td colspan="2">医疗类别:{{ briefPatInfo.medtype }}</td>
-            <td colspan="3">可用余额:{{ briefPatInfo.balance }}</td>
-            <td colspan="2">总费用:{{ briefPatInfo.totalCost }}</td>
-          </tr>
-          <tr>
-            <td style="border-bottom: 2px solid black;height: 22px">开始日期:{{ briefPatInfo.begndate }}</td>
-            <td colspan="2" style="border-bottom: 2px solid black">结束日期:{{ briefPatInfo.enddate }}</td>
-            <td colspan="3" style="border-bottom: 2px solid black">天数:{{ briefPatInfo.days }}</td>
-            <td colspan="2" style="border-bottom: 2px solid black">账页号:{{ briefPatInfo.ledger }}</td>
-          </tr>
-          <tr>
-            <td style="height:28px;width: 20%;border-bottom: 1px solid lightgray">医保编码</td>
-            <td style="width: 20%;border-bottom: 1px solid lightgray">项目名称</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">规格</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">单位</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">单价</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">数量</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">金额</td>
-            <td style="width: 20%;border-bottom: 1px solid lightgray">执行科室</td>
-          </tr>
+            <tr>
+              <td
+                colspan="8"
+                style="
+                  width: 96%;
+                  height: 50px;
+                  text-align: center;
+                  vertical-align: center;
+                "
+              >
+                <div style="font-size: 20px; font-weight: bold">
+                  住院病人费用明细清单
+                </div>
+                <div style="margin-top: 5px">
+                  机构名称:{{
+                    env.VITE_HOSPITAL_NAME
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机构编码:{{
+                    env.VITE_HOSPITAL_CODE
+                  }}
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td colspan="8" style="font-size: 16px; font-weight: bold">
+                床号:{{ briefPatInfo.bedNo }}
+              </td>
+            </tr>
+            <tr>
+              <td style="height: 22px">住院号:{{ briefPatInfo.patNo }}</td>
+              <td colspan="2">姓名:{{ briefPatInfo.name }}</td>
+              <td colspan="3">性别:{{ briefPatInfo.gender }}</td>
+              <td colspan="2">科室:{{ briefPatInfo.dept }}</td>
+            </tr>
+            <tr>
+              <td style="height: 22px">入院日期:{{ briefPatInfo.admdate }}</td>
+              <td colspan="2">医疗类别:{{ briefPatInfo.medtype }}</td>
+              <td colspan="3">可用余额:{{ briefPatInfo.balance }}</td>
+              <td colspan="2">总费用:{{ briefPatInfo.totalCost }}</td>
+            </tr>
+            <tr>
+              <td style="border-bottom: 2px solid black; height: 22px">
+                开始日期:{{ briefPatInfo.begndate }}
+              </td>
+              <td colspan="2" style="border-bottom: 2px solid black">
+                结束日期:{{ briefPatInfo.enddate }}
+              </td>
+              <td colspan="3" style="border-bottom: 2px solid black">
+                天数:{{ briefPatInfo.days }}
+              </td>
+              <td colspan="2" style="border-bottom: 2px solid black">
+                账页号:{{ briefPatInfo.ledger }}
+              </td>
+            </tr>
+            <tr>
+              <td
+                style="
+                  height: 28px;
+                  width: 20%;
+                  border-bottom: 1px solid lightgray;
+                "
+              >
+                医保编码
+              </td>
+              <td style="width: 20%; border-bottom: 1px solid lightgray">
+                项目名称
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                规格
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                单位
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                单价
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                数量
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                金额
+              </td>
+              <td style="width: 20%; border-bottom: 1px solid lightgray">
+                执行科室
+              </td>
+            </tr>
           </thead>
           <tbody v-for="(val, key) in chargeListMap" :id="key">
-          <tr>
-            <td style="height: 28px;font-weight: bold;font-size: 14px; border-bottom: 1px solid #333">{{ key }}</td>
-          </tr>
-          <tr v-for="(item, index) in val" :key="index">
-            <td style="width: 20%;height: 28px;padding: 4px 12px 4px 0">{{ item.code }}</td>
-            <td style="width: 20%;height: 28px;padding: 4px 12px 4px 0">{{ item.name }}</td>
-            <td style="width: 8%;height: 28px;padding: 4px 12px 4px 0">{{ item.specification }}</td>
-            <td style="width: 8%;height: 28px;padding: 4px 12px 4px 0">{{ item.unit }}</td>
-            <td style="width: 8%;height: 28px;padding: 4px 12px 4px 0">{{ item.priceString }}</td>
-            <td style="width: 8%;height: 28px;padding: 4px 12px 4px 0">{{ item.quantityString }}</td>
-            <td style="width: 8%;height: 28px;padding: 4px 12px 4px 0">{{ item.costString }}</td>
-            <td style="width: 20%;height: 28px;padding: 4px 12px 4px 0">{{ item.execDept }}</td>
-          </tr>
-          <tr>
-            <td colspan="7" style="border-bottom: 1px solid lightgray"></td>
-            <td style="text-align: left; font-size: 15px;font-weight: bold;border-bottom: 1px solid lightgray">
-              小计:{{ sumsMap[key] }}
-            </td>
-          </tr>
+            <tr>
+              <td
+                style="
+                  height: 28px;
+                  font-weight: bold;
+                  font-size: 14px;
+                  border-bottom: 1px solid #333;
+                "
+              >
+                {{ key }}
+              </td>
+            </tr>
+            <tr v-for="(item, index) in val" :key="index">
+              <td style="width: 20%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.code }}
+              </td>
+              <td style="width: 20%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.name }}
+              </td>
+              <td style="width: 8%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.specification }}
+              </td>
+              <td style="width: 8%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.unit }}
+              </td>
+              <td style="width: 8%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.priceString }}
+              </td>
+              <td style="width: 8%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.quantityString }}
+              </td>
+              <td style="width: 8%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.costString }}
+              </td>
+              <td style="width: 20%; height: 28px; padding: 4px 12px 4px 0">
+                {{ item.execDept }}
+              </td>
+            </tr>
+            <tr>
+              <td colspan="7" style="border-bottom: 1px solid lightgray"></td>
+              <td
+                style="
+                  text-align: left;
+                  font-size: 15px;
+                  font-weight: bold;
+                  border-bottom: 1px solid lightgray;
+                "
+              >
+                小计:{{ sumsMap[key] }}
+              </td>
+            </tr>
           </tbody>
           <tbody>
-          <tr>
-            <td colspan="7" style="height:36px;border-bottom: 2px solid black"></td>
-            <td style="text-align: left; font-size: 15px;font-weight: bold;border-bottom: 2px solid black">
-              总计:{{ sumsMap['总计'] }}
-            </td>
-          </tr>
+            <tr>
+              <td
+                colspan="7"
+                style="height: 36px; border-bottom: 2px solid black"
+              ></td>
+              <td
+                style="
+                  text-align: left;
+                  font-size: 15px;
+                  font-weight: bold;
+                  border-bottom: 2px solid black;
+                "
+              >
+                总计:{{ sumsMap["总计"] }}
+              </td>
+            </tr>
           </tbody>
         </table>
       </div>
     </div>
-    <div style="position: absolute ; top: 0 ; left: 0; width: calc(100% - 15px)">
-      <div style="width: 100%;height: max-content;background: white; ">
+    <div style="position: absolute; top: 0; left: 0; width: calc(100% - 15px)">
+      <div style="width: 100%; height: max-content; background: white">
         <table style="width: 100%">
           <thead>
-          <tr>
-            <td colspan="8"
-                style="width: 96%;height: 50px;text-align: center;vertical-align:center;">
-              <div style="font-size: 20px;font-weight: bold;">住院病人费用明细清单</div>
-              <div style="margin-top: 5px">
-                机构名称:长沙泰和医院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机构编码:H43010500370
-              </div>
-            </td>
-          </tr>
-          <tr>
-            <td colspan="8" style="font-size: 16px; font-weight: bold">
-              床号:{{ briefPatInfo.bedNo }}
-            </td>
-          </tr>
-          <tr>
-            <td style="height: 22px">住院号:{{ briefPatInfo.patNo }}</td>
-            <td colspan="2">姓名:{{ briefPatInfo.name }}</td>
-            <td colspan="3">性别:{{ briefPatInfo.gender }}</td>
-            <td colspan="2">科室:{{ briefPatInfo.dept }}</td>
-          </tr>
-          <tr>
-            <td style=";height: 22px">入院日期:{{ briefPatInfo.admdate }}</td>
-            <td colspan="2">医疗类别:{{ briefPatInfo.medtype }}</td>
-            <td colspan="3">可用余额:{{ briefPatInfo.balance }}</td>
-            <td colspan="2">总费用:{{ briefPatInfo.totalCost }}</td>
-          </tr>
-          <tr>
-            <td style="border-bottom: 2px solid black;height: 22px">开始日期:{{ briefPatInfo.begndate }}</td>
-            <td colspan="2" style="border-bottom: 2px solid black">结束日期:{{ briefPatInfo.enddate }}</td>
-            <td colspan="3" style="border-bottom: 2px solid black">天数:{{ briefPatInfo.days }}</td>
-            <td colspan="2" style="border-bottom: 2px solid black">账页号:{{ briefPatInfo.ledger }}</td>
-          </tr>
-          <tr>
-            <td style="height:28px;width: 20%;border-bottom: 1px solid lightgray">医保编码</td>
-            <td style="width: 20%;border-bottom: 1px solid lightgray">项目名称</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">规格</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">单位</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">单价</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">数量</td>
-            <td style="width: 8%;border-bottom: 1px solid lightgray">金额</td>
-            <td style="width: 20%;border-bottom: 1px solid lightgray">执行科室</td>
-          </tr>
+            <tr>
+              <td
+                colspan="8"
+                style="
+                  width: 96%;
+                  height: 50px;
+                  text-align: center;
+                  vertical-align: center;
+                "
+              >
+                <div style="font-size: 20px; font-weight: bold">
+                  住院病人费用明细清单
+                </div>
+                <div style="margin-top: 5px">
+                  机构名称:{{
+                    env.VITE_HOSPITAL_NAME
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机构编码:{{
+                    env.VITE_HOSPITAL_CODE
+                  }}
+                </div>
+              </td>
+            </tr>
+            <tr>
+              <td colspan="8" style="font-size: 16px; font-weight: bold">
+                床号:{{ briefPatInfo.bedNo }}
+              </td>
+            </tr>
+            <tr>
+              <td style="height: 22px">住院号:{{ briefPatInfo.patNo }}</td>
+              <td colspan="2">姓名:{{ briefPatInfo.name }}</td>
+              <td colspan="3">性别:{{ briefPatInfo.gender }}</td>
+              <td colspan="2">科室:{{ briefPatInfo.dept }}</td>
+            </tr>
+            <tr>
+              <td style="height: 22px">入院日期:{{ briefPatInfo.admdate }}</td>
+              <td colspan="2">医疗类别:{{ briefPatInfo.medtype }}</td>
+              <td colspan="3">可用余额:{{ briefPatInfo.balance }}</td>
+              <td colspan="2">总费用:{{ briefPatInfo.totalCost }}</td>
+            </tr>
+            <tr>
+              <td style="border-bottom: 2px solid black; height: 22px">
+                开始日期:{{ briefPatInfo.begndate }}
+              </td>
+              <td colspan="2" style="border-bottom: 2px solid black">
+                结束日期:{{ briefPatInfo.enddate }}
+              </td>
+              <td colspan="3" style="border-bottom: 2px solid black">
+                天数:{{ briefPatInfo.days }}
+              </td>
+              <td colspan="2" style="border-bottom: 2px solid black">
+                账页号:{{ briefPatInfo.ledger }}
+              </td>
+            </tr>
+            <tr>
+              <td
+                style="
+                  height: 28px;
+                  width: 20%;
+                  border-bottom: 1px solid lightgray;
+                "
+              >
+                医保编码
+              </td>
+              <td style="width: 20%; border-bottom: 1px solid lightgray">
+                项目名称
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                规格
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                单位
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                单价
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                数量
+              </td>
+              <td style="width: 8%; border-bottom: 1px solid lightgray">
+                金额
+              </td>
+              <td style="width: 20%; border-bottom: 1px solid lightgray">
+                执行科室
+              </td>
+            </tr>
           </thead>
         </table>
       </div>
@@ -134,24 +261,24 @@
 </template>
 
 <script setup lang="ts">
+import env from "@/utils/setting.js";
+
 const props = defineProps({
   briefPatInfo: {
     type: Object,
-    default: {}
+    default: {},
   },
   chargeListMap: {
     type: Object,
-    default: {}
+    default: {},
   },
   sumsMap: {
     type: Object,
-    default: {}
-  }
-})
-
-const theadRef = ref()
-
+    default: {},
+  },
+});
 
+const theadRef = ref();
 </script>
 
 <style scoped>
@@ -164,7 +291,8 @@ const theadRef = ref()
   font-weight: bold;
 }
 
-table, table * {
+table,
+table * {
   margin: 0;
   padding: 0;
   border-collapse: collapse;

+ 195 - 108
src/components/medical-insurance/inspect/InspectionReport.vue

@@ -2,24 +2,58 @@
   <div class="layout_container layout-horizontal">
     <aside class="layout_el-table">
       <el-table
-          :data="inspectionIndex"
-          stripe highlight-current-row
-          @row-click="queryDetail"
+        :data="inspectionIndex"
+        stripe
+        highlight-current-row
+        @row-click="queryDetail"
       >
-        <el-table-column prop="trscDate" label="报告时间" width="130"></el-table-column>
-        <el-table-column prop="examPurpose" label="检验名称" width="170"></el-table-column>
-        <el-table-column prop="reportType" label="报告类别" width="70"></el-table-column>
+        <el-table-column
+          prop="trscDate"
+          label="报告时间"
+          width="130"
+        ></el-table-column>
+        <el-table-column
+          prop="examPurpose"
+          label="检验名称"
+          width="170"
+        ></el-table-column>
+        <el-table-column
+          prop="reportType"
+          label="报告类别"
+          width="70"
+        ></el-table-column>
       </el-table>
     </aside>
-    <div id="reportDetail" class="layout_main"
-         style="position: relative; width: 90%; height: max-content;
-          min-height: 96%; padding: 0 30px; background-color: white"
+    <div
+      id="reportDetail"
+      class="layout_main"
+      style="
+        position: relative;
+        width: 90%;
+        height: max-content;
+        min-height: 96%;
+        padding: 0 30px;
+        background-color: white;
+      "
     >
-      <h3 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 30px">
-        长沙泰和医院检查报告单</h3>
+      <h3
+        style="
+          width: 100%;
+          text-align: center;
+          font-weight: bold;
+          height: 30px;
+          line-height: 30px;
+        "
+      >
+        {{ env.VITE_HOSPITAL_NAME }}检查报告单
+      </h3>
       <div style="display: flex">
-        <div style="width: 25%">姓名:{{ inspectionDetail.order.ptntName }}</div>
-        <div style="width: 25%">性别:{{ filterSex(inspectionDetail.order.ptntSex) }}</div>
+        <div style="width: 25%">
+          姓名:{{ inspectionDetail.order.ptntName }}
+        </div>
+        <div style="width: 25%">
+          性别:{{ filterSex(inspectionDetail.order.ptntSex) }}
+        </div>
         <div style="width: 25%">
           年龄:{{ inspectionDetail.order.ptntAge }}
           {{ filterAgeUnit(inspectionDetail.order.ptntAgeUnit) }}
@@ -30,16 +64,24 @@
         </div>
       </div>
       <div style="display: flex">
-        <div style="width: 25%">科室:{{ inspectionDetail.order.deptName }}</div>
-        <div style="width: 25%">床号:{{ inspectionDetail.order.ptntBedNo }}</div>
-        <div style="width: 25%">标本类型:{{ inspectionDetail.order.smplName }}</div>
         <div style="width: 25%">
-          <div>申请项目:{{ inspectionDetail.order.aplyCntn.substring(0, 13) }}</div>
+          科室:{{ inspectionDetail.order.deptName }}
+        </div>
+        <div style="width: 25%">
+          床号:{{ inspectionDetail.order.ptntBedNo }}
+        </div>
+        <div style="width: 25%">
+          标本类型:{{ inspectionDetail.order.smplName }}
+        </div>
+        <div style="width: 25%">
+          <div>
+            申请项目:{{ inspectionDetail.order.aplyCntn.substring(0, 13) }}
+          </div>
           <div>{{ inspectionDetail.order.aplyCntn.substring(13) }}</div>
         </div>
       </div>
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-      <div v-if="reportType === '普通' || reportType === '外送'" >
+      <div v-if="reportType === '普通' || reportType === '外送'">
         <div style="display: inline-block; width: 49.7%; vertical-align: top">
           <div style="display: flex">
             <div style="width: 25%">检验项目</div>
@@ -49,9 +91,11 @@
             <div style="width: 25%">参考值</div>
           </div>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-          <div v-for="(item, index) in inspectionDetail.items.slice(0, halfSize)"
-               :key="index"
-               style="display: flex">
+          <div
+            v-for="(item, index) in inspectionDetail.items.slice(0, halfSize)"
+            :key="index"
+            style="display: flex"
+          >
             <div style="width: 25%">
               <div>{{ item.itmName.substring(0, 6) }}</div>
               <div>{{ item.itmName.substring(6) }}</div>
@@ -64,7 +108,11 @@
             </div>
             <div style="width: 16.66%">{{ item.itmUnit }}</div>
             <div style="width: 16.66%">
-              <span v-html="getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)"></span>
+              <span
+                v-html="
+                  getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)
+                "
+              ></span>
             </div>
             <div style="width: 25%">{{ item.range }}</div>
           </div>
@@ -78,8 +126,11 @@
             <div style="width: 25%">参考值</div>
           </div>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-          <div v-for="(item, index) in inspectionDetail.items.slice(halfSize)" :key="index"
-               style="display: flex">
+          <div
+            v-for="(item, index) in inspectionDetail.items.slice(halfSize)"
+            :key="index"
+            style="display: flex"
+          >
             <div style="width: 25%">
               <div>{{ item.itmName.substring(0, 6) }}</div>
               <div>{{ item.itmName.substring(6) }}</div>
@@ -92,7 +143,11 @@
             </div>
             <div style="width: 16.66%">{{ item.itmUnit }}</div>
             <div style="width: 16.66%">
-              <span v-html="getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)"></span>
+              <span
+                v-html="
+                  getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)
+                "
+              ></span>
             </div>
             <div style="width: 25%">{{ item.range }}</div>
           </div>
@@ -104,10 +159,13 @@
           <div style="width: 75%">结果</div>
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-        <div style="margin: 0 30px; padding-bottom: 5px;" v-if="bacterias.length > 0"
-             v-for="(antibioticItem,index) in bacterias"
-             :style="index > 0 ? {borderTop: '1px dashed gray'} : {}">
-          <div style="display: flex;width: 49.7%;margin: 8px 0 4px 0">
+        <div
+          style="margin: 0 30px; padding-bottom: 5px"
+          v-if="bacterias.length > 0"
+          v-for="(antibioticItem, index) in bacterias"
+          :style="index > 0 ? { borderTop: '1px dashed gray' } : {}"
+        >
+          <div style="display: flex; width: 49.7%; margin: 8px 0 4px 0">
             <div style="width: 33.33%">{{ antibioticItem.type }}</div>
             <div style="width: 60%">{{ antibioticItem.germName }}</div>
           </div>
@@ -119,9 +177,14 @@
               <div style="width: 16.66%">敏感性</div>
             </div>
             <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-            <div style="display: flex"
-                 v-for="(bac, index) in antibioticItem.antiList.slice(0, antibioticItem.halfBacSize)"
-                 :key="index">
+            <div
+              style="display: flex"
+              v-for="(bac, index) in antibioticItem.antiList.slice(
+                0,
+                antibioticItem.halfBacSize
+              )"
+              :key="index"
+            >
               <div style="width: 33.33%">
                 <div>{{ bac.antiNameCn.substring(0, 6) }}</div>
                 <div>{{ bac.antiNameCn.substring(6) }}</div>
@@ -139,9 +202,13 @@
               <div style="width: 16.66%">敏感性</div>
             </div>
             <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-            <div style="display: flex"
-                 v-for="(bac, index) in antibioticItem.antiList.slice(antibioticItem.halfBacSize)"
-                 :key="index">
+            <div
+              style="display: flex"
+              v-for="(bac, index) in antibioticItem.antiList.slice(
+                antibioticItem.halfBacSize
+              )"
+              :key="index"
+            >
               <div style="width: 33.33%">
                 <div>{{ bac.antiNameCn.substring(0, 6) }}</div>
                 <div>{{ bac.antiNameCn.substring(6) }}</div>
@@ -162,21 +229,41 @@
       <div style="position: absolute; bottom: 0; left: 30px; right: 30px">
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
         <div style="display: flex">
-          <div style="width: 33.33%">接收时间:{{ inspectionDetail.order.aplyDate }}</div>
           <div style="width: 33.33%">
-            检验时间:{{inspectionDetail.order.ordrCreateDate }}
+            接收时间:{{ inspectionDetail.order.aplyDate }}
+          </div>
+          <div style="width: 33.33%">
+            检验时间:{{ inspectionDetail.order.ordrCreateDate }}
+          </div>
+          <div style="width: 33.33%">
+            报告时间:{{ inspectionDetail.order.audtTime }}
           </div>
-          <div style="width: 33.33%">报告时间:{{ inspectionDetail.order.audtTime }}</div>
         </div>
         <div style="display: flex">
-          <div style="width: 33.33%">送检医生:{{ inspectionDetail.order.testUsrName }}</div>
-          <div style="width: 33.33%">检验人:{{ inspectionDetail.order.ordrUsrName }}</div>
-          <div style="width: 33.33%">审核人:{{ inspectionDetail.order.audtUsrName }}</div>
+          <div style="width: 33.33%">
+            送检医生:{{ inspectionDetail.order.testUsrName }}
+          </div>
+          <div style="width: 33.33%">
+            检验人:{{ inspectionDetail.order.ordrUsrName }}
+          </div>
+          <div style="width: 33.33%">
+            审核人:{{ inspectionDetail.order.audtUsrName }}
+          </div>
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-        <div style="width: 100%; text-align: center; font-weight: bold; height: 30px; font-size: 12px">
+        <div
+          style="
+            width: 100%;
+            text-align: center;
+            font-weight: bold;
+            height: 30px;
+            font-size: 12px;
+          "
+        >
           ***此结果仅对所检测的标本负责***
-          <span style="margin-left: 10px; font-size: 12px">备注:升高(↑),降低(↓),阳性(+),阴性(-)</span>
+          <span style="margin-left: 10px; font-size: 12px"
+            >备注:升高(↑),降低(↓),阳性(+),阴性(-)</span
+          >
         </div>
       </div>
     </div>
@@ -184,131 +271,131 @@
 </template>
 
 <script setup name="inspectionReport">
-import {computed, onMounted, reactive, ref} from 'vue'
-import {checkExamDetail, checkExamIndex} from '@/api/inspections'
-import {ElMessage} from 'element-plus'
+import { computed, onMounted, reactive, ref } from "vue";
+import { checkExamDetail, checkExamIndex } from "@/api/inspections";
+import { ElMessage } from "element-plus";
+import env from "../../../utils/setting.js";
 
 const props = defineProps({
   jyjcInfo: {
     type: Object,
     required: true,
-  }
-})
-const params = props.jyjcInfo
+  },
+});
+const params = props.jyjcInfo;
 const ptntType = computed(() => {
-  if (params.patType === 'InPatient') {
-    return '住院号'
+  if (params.patType === "InPatient") {
+    return "住院号";
   } else if (params.type === 0) {
-    return '门诊号'
+    return "门诊号";
   }
-  return ''
-})
+  return "";
+});
 
-
-const inspectionIndex = ref([])
-const bacterias = ref([])
+const inspectionIndex = ref([]);
+const bacterias = ref([]);
 const inspectionDetail = reactive({
   order: {
-    aplyCntn: '',
+    aplyCntn: "",
   },
   items: [],
-})
-const halfSize = ref(0)
+});
+const halfSize = ref(0);
 
 const queryIndex = () => {
   if (!params.patNo) {
     ElMessage({
-      message: '请输入患者' + ptntType.value + '。',
-      type: 'warning',
+      message: "请输入患者" + ptntType.value + "。",
+      type: "warning",
       duration: 2000,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
   if (!params.reqStartTime) {
     ElMessage({
-      message: '请选择日期范围。',
-      type: 'warning',
+      message: "请选择日期范围。",
+      type: "warning",
       duration: 2000,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
-  checkExamIndex(params).then((res) => {
-    inspectionIndex.value = res
+  checkExamIndex(params).then(res => {
+    inspectionIndex.value = res;
     if (inspectionIndex.value.length > 0) {
       nextTick(() => {
-        queryDetail(inspectionIndex.value[0])
-      })
+        queryDetail(inspectionIndex.value[0]);
+      });
     }
-  })
-}
+  });
+};
 
-const reportType = ref('普通')
-const queryDetail = (row) => {
-  bacterias.value = []
+const reportType = ref("普通");
+const queryDetail = row => {
+  bacterias.value = [];
   checkExamDetail({
-    reportId: row.reportId
-  }).then((res) => {
-    halfSize.value = Math.ceil(res.items.length / 2)
-    inspectionDetail.order = res.order
-    inspectionDetail.items = res.items
-    reportType.value = row.reportType
+    reportId: row.reportId,
+  }).then(res => {
+    halfSize.value = Math.ceil(res.items.length / 2);
+    inspectionDetail.order = res.order;
+    inspectionDetail.items = res.items;
+    reportType.value = row.reportType;
     if (res.bacterias && res.bacterias.length > 0) {
       res.bacterias.forEach(bac => {
-        const bacSize = Math.ceil(bac.antiList.length / 2)
+        const bacSize = Math.ceil(bac.antiList.length / 2);
         const tempBacResult = {
           halfBacSize: bacSize,
           germName: bac.bacNameCn,
           antiList: bac.antiList,
-          type: bac.itmName
-        }
-        bacterias.value.push(tempBacResult)
-      })
+          type: bac.itmName,
+        };
+        bacterias.value.push(tempBacResult);
+      });
     }
-  })
-}
+  });
+};
 
 onMounted(() => {
-  queryIndex()
-})
+  queryIndex();
+});
 
 function filterSex(val) {
   switch (val) {
     case 0:
-      return '未填'
+      return "未填";
     case 1:
-      return '男'
+      return "男";
     case 2:
-      return '女'
+      return "女";
     case 3:
-      return '未知'
+      return "未知";
   }
-  return ''
+  return "";
 }
 
 function filterAgeUnit(val) {
   switch (val) {
     case 0:
-      return '岁'
+      return "岁";
     case 1:
-      return '月'
+      return "月";
     case 2:
-      return '天'
+      return "天";
     case 3:
-      return '时'
+      return "时";
   }
-  return ''
+  return "";
 }
 
 function getItemAlert(val, strValue, value) {
-  if (strValue !== '' || value === '') return ''
+  if (strValue !== "" || value === "") return "";
   switch (val) {
-    case 'L':
-      return '<span style="color:#F56C6C;font-weight:bold">↓</span>'
-    case 'H':
-      return '<span style="color:#F56C6C;font-weight:bold">↑</span>'
+    case "L":
+      return '<span style="color:#F56C6C;font-weight:bold">↓</span>';
+    case "H":
+      return '<span style="color:#F56C6C;font-weight:bold">↑</span>';
   }
-  return ''
+  return "";
 }
 </script>

+ 196 - 141
src/components/operate-monitoring/ReportFirstPage.vue

@@ -1,165 +1,220 @@
 <template>
-    <page-layer>
-        <template #header>
-            <div style="text-align: center">
-                统计日期:
-                <span v-if="kssj1" style="color: #fc6c34;">
-                    {{ kssj1 }} 至 {{ jssj1 }}
-                </span>
-                <span v-else style="color: #fc6c34;">当前</span>
-                统计机构名称:<span style="color: #fc6c34;">长沙泰和医院</span>
-                指标名称: <span style="color: #fc6c34;">{{ reportInfo1.reportName }}</span>
-                统计结果描述: <span style="color: #fc6c34;">{{ reportInfo1.overview }}{{ reportInfo1.unit }}</span>
-                <el-button type="primary" icon="Search" style="margin-left: 10px;" @click="selectReportMx">明细数据
-                </el-button>
-                <el-button type="primary" icon="Download" style="margin-left: 10px;" @click="exportReportFirst">导出数据
-                </el-button>
-            </div>
-        </template>
-        <template #aside>
-            <el-table :data="reportData" :height="tableHeight" highlight-current-row row-key="childKey" stripe border
-                @row-dblclick="reportSecondInfo">
-                <el-table-column prop="x" :label="x1Name" width="120"></el-table-column>
-                <el-table-column prop="y" :label="y1Name"></el-table-column>
-            </el-table>
-        </template>
-        <template #main>
-            <div style="width: 80%; height: 400px; margin-bottom: 5px;" id="firstPie"></div>
-            <div style="width: 80%; height: 400px" id="firstDst"></div>
-        </template>
-    </page-layer>
-    <el-dialog v-if="props.reportFirst.tableInfo.sndGroup !== 'patient'" :title="titleChart" v-model="sndDrawer" fullscreen
-        destroy-on-close>
-        <ReportSecondPage :reportSecond="reportSecond" />
-    </el-dialog>
-    <el-dialog v-else :title="titleChart" v-model="patientDrawer" width="80%" style="height: 800px" top="40px" destroy-on-close>
-        <ReportPatientPage :reportPatient="reportPatient" />
-    </el-dialog>
-    <el-dialog :title="titleChart" v-model="patientMxDrawer" style="height: 800px" width="80%" top="40px" destroy-on-close>
-        <ReportPatientPage :reportPatient="reportPatient" />
-    </el-dialog>
+  <page-layer>
+    <template #header>
+      <div style="text-align: center">
+        统计日期:
+        <span v-if="kssj1" style="color: #fc6c34">
+          {{ kssj1 }} 至 {{ jssj1 }}
+        </span>
+        <span v-else style="color: #fc6c34">当前</span>
+        统计机构名称:<span style="color: #fc6c34">{{
+          env.VITE_HOSPITAL_NAME
+        }}</span>
+        指标名称:
+        <span style="color: #fc6c34">{{ reportInfo1.reportName }}</span>
+        统计结果描述:
+        <span style="color: #fc6c34"
+          >{{ reportInfo1.overview }}{{ reportInfo1.unit }}</span
+        >
+        <el-button
+          type="primary"
+          icon="Search"
+          style="margin-left: 10px"
+          @click="selectReportMx"
+          >明细数据
+        </el-button>
+        <el-button
+          type="primary"
+          icon="Download"
+          style="margin-left: 10px"
+          @click="exportReportFirst"
+          >导出数据
+        </el-button>
+      </div>
+    </template>
+    <template #aside>
+      <el-table
+        :data="reportData"
+        :height="tableHeight"
+        highlight-current-row
+        row-key="childKey"
+        stripe
+        border
+        @row-dblclick="reportSecondInfo"
+      >
+        <el-table-column prop="x" :label="x1Name" width="120"></el-table-column>
+        <el-table-column prop="y" :label="y1Name"></el-table-column>
+      </el-table>
+    </template>
+    <template #main>
+      <div
+        style="width: 80%; height: 400px; margin-bottom: 5px"
+        id="firstPie"
+      ></div>
+      <div style="width: 80%; height: 400px" id="firstDst"></div>
+    </template>
+  </page-layer>
+  <el-dialog
+    v-if="props.reportFirst.tableInfo.sndGroup !== 'patient'"
+    :title="titleChart"
+    v-model="sndDrawer"
+    fullscreen
+    destroy-on-close
+  >
+    <ReportSecondPage :reportSecond="reportSecond" />
+  </el-dialog>
+  <el-dialog
+    v-else
+    :title="titleChart"
+    v-model="patientDrawer"
+    width="80%"
+    style="height: 800px"
+    top="40px"
+    destroy-on-close
+  >
+    <ReportPatientPage :reportPatient="reportPatient" />
+  </el-dialog>
+  <el-dialog
+    :title="titleChart"
+    v-model="patientMxDrawer"
+    style="height: 800px"
+    width="80%"
+    top="40px"
+    destroy-on-close
+  >
+    <ReportPatientPage :reportPatient="reportPatient" />
+  </el-dialog>
 </template>
 <script setup name="ReportFirst">
-import { ref, nextTick } from "vue"
-import { clone } from '@/utils/clone'
-import PageLayer from '@/layout/PageLayer.vue'
-import { highBarUtils, highPieUtils } from '@/utils/high-charts'
-import { selectReportGroup } from '@/api/reports/high-report'
-import { Export } from '@/utils/ExportExcel'
-import ReportSecondPage from '@/components/operate-monitoring/ReportSecondPage.vue'
-import ReportPatientPage from '@/components/operate-monitoring/ReportPatientPage.vue'
+import { ref, nextTick } from "vue";
+import { clone } from "@/utils/clone";
+import PageLayer from "@/layout/PageLayer.vue";
+import { highBarUtils, highPieUtils } from "@/utils/high-charts";
+import { selectReportGroup } from "@/api/reports/high-report";
+import { Export } from "@/utils/ExportExcel";
+import ReportSecondPage from "@/components/operate-monitoring/ReportSecondPage.vue";
+import ReportPatientPage from "@/components/operate-monitoring/ReportPatientPage.vue";
+import env from "../../utils/setting.js";
 
-const tableHeight = window.innerHeight - 105
+const tableHeight = window.innerHeight - 105;
 const props = defineProps({
-    reportFirst: {
-        type: Object,
-        default: {}
-    }
-})
+  reportFirst: {
+    type: Object,
+    default: {},
+  },
+});
 nextTick(() => {
-    showFirstPst()
-})
+  showFirstPst();
+});
 // 报表基本信息
-const reportInfo1 = ref({})
+const reportInfo1 = ref({});
 // 报表展示值
-const reportData = ref({})
+const reportData = ref({});
 // 表格展示信息
-const tableData = ref({})
+const tableData = ref({});
 // 查询信息
-const param1 = ref({})
+const param1 = ref({});
 
-const x1Name = ref('')
-const y1Name = ref('')
-const kssj1 = ref('')
-const jssj1 = ref('')
+const x1Name = ref("");
+const y1Name = ref("");
+const kssj1 = ref("");
+const jssj1 = ref("");
 
-reportData.value = props.reportFirst.data
-reportInfo1.value = props.reportFirst.row
-tableData.value = props.reportFirst.tableInfo
-param1.value = props.reportFirst.params
-kssj1.value = props.reportFirst.kssj
-jssj1.value = props.reportFirst.jssj
+reportData.value = props.reportFirst.data;
+reportInfo1.value = props.reportFirst.row;
+tableData.value = props.reportFirst.tableInfo;
+param1.value = props.reportFirst.params;
+kssj1.value = props.reportFirst.kssj;
+jssj1.value = props.reportFirst.jssj;
 
 const showFirstPst = () => {
-    let barTitle = reportInfo1.value.reportName
-    let yAxisName = '单位:' + reportInfo1.value.unit
-    let tipUnit = reportInfo1.value.unit
-    let xdata = []
-    let ydata = []
-    let pieData = []
-    x1Name.value = tableData.value.fstName
-    y1Name.value = reportInfo1.value.unit
+  let barTitle = reportInfo1.value.reportName;
+  let yAxisName = "单位:" + reportInfo1.value.unit;
+  let tipUnit = reportInfo1.value.unit;
+  let xdata = [];
+  let ydata = [];
+  let pieData = [];
+  x1Name.value = tableData.value.fstName;
+  y1Name.value = reportInfo1.value.unit;
 
-    reportData.value.forEach((item) => {
-        let pieInfo = {}
-        pieInfo.value = item.y
-        pieInfo.name = item.x
-        pieInfo.unit = reportInfo1.value.unit
-        xdata.push(item.x)
-        ydata.push(item.y)
-        pieData.push(pieInfo)
-    })
+  reportData.value.forEach(item => {
+    let pieInfo = {};
+    pieInfo.value = item.y;
+    pieInfo.name = item.x;
+    pieInfo.unit = reportInfo1.value.unit;
+    xdata.push(item.x);
+    ydata.push(item.y);
+    pieData.push(pieInfo);
+  });
 
-    highBarUtils(firstDst, barTitle, xdata, ydata, barTitle, yAxisName, tipUnit, 1)
-    highPieUtils(firstPie, barTitle, pieData)
-}
+  highBarUtils(
+    firstDst,
+    barTitle,
+    xdata,
+    ydata,
+    barTitle,
+    yAxisName,
+    tipUnit,
+    1
+  );
+  highPieUtils(firstPie, barTitle, pieData);
+};
 
 // 钻取的查询结果
-const sndDrawer = ref(false)
-const reportSecond = ref({})
-const patientDrawer = ref(false)
-const reportPatient = ref({})
-const titleChart = ref('')
-const reportSecondInfo = (row) => {
-    reportInfo1.value.fstName = row.x
-    reportInfo1.value.fstValue = row.y
-    let params = clone(param1.value)
-    params.fstName = row.x
-    // 下一级是病人,则走最后固定的病人明细展示页面
-    let sndGroup = tableData.value.sndGroup
-    if (sndGroup === 'patient') {
-        titleChart.value = reportInfo1.value.reportName
-        patientDrawer.value = true
-        reportPatient.value.row = reportInfo1.value
-        reportPatient.value.params = clone(params)
-    } else {
-        selectReportGroup(params).then((res) => {
-            reportSecond.value = res
-            titleChart.value = res.title
-            sndDrawer.value = true
-            reportSecond.value.row = reportInfo1.value
-            reportSecond.value.kssj = kssj1.value
-            reportSecond.value.jssj = jssj1.value
-            reportSecond.value.params = clone(params)
-        })
-    }
-}
+const sndDrawer = ref(false);
+const reportSecond = ref({});
+const patientDrawer = ref(false);
+const reportPatient = ref({});
+const titleChart = ref("");
+const reportSecondInfo = row => {
+  reportInfo1.value.fstName = row.x;
+  reportInfo1.value.fstValue = row.y;
+  let params = clone(param1.value);
+  params.fstName = row.x;
+  // 下一级是病人,则走最后固定的病人明细展示页面
+  let sndGroup = tableData.value.sndGroup;
+  if (sndGroup === "patient") {
+    titleChart.value = reportInfo1.value.reportName;
+    patientDrawer.value = true;
+    reportPatient.value.row = reportInfo1.value;
+    reportPatient.value.params = clone(params);
+  } else {
+    selectReportGroup(params).then(res => {
+      reportSecond.value = res;
+      titleChart.value = res.title;
+      sndDrawer.value = true;
+      reportSecond.value.row = reportInfo1.value;
+      reportSecond.value.kssj = kssj1.value;
+      reportSecond.value.jssj = jssj1.value;
+      reportSecond.value.params = clone(params);
+    });
+  }
+};
 
 // 直接查询病人明细结果
-const patientMxDrawer = ref(false)
+const patientMxDrawer = ref(false);
 const selectReportMx = () => {
-    let params = clone(param1.value)
-    titleChart.value = reportInfo1.value.reportName
-    patientMxDrawer.value = true
-    reportPatient.value.row = reportInfo1.value
-    reportPatient.value.params = clone(params)
-}
+  let params = clone(param1.value);
+  titleChart.value = reportInfo1.value.reportName;
+  patientMxDrawer.value = true;
+  reportPatient.value.row = reportInfo1.value;
+  reportPatient.value.params = clone(params);
+};
 
 const exportReportFirst = () => {
-    if (reportData.value.length <= 0) {
-        ElMessage({
-            message: '没有可以导出的数据!',
-            type: 'warning',
-            duration: 2500,
-            showClose: true,
-        })
-    }
+  if (reportData.value.length <= 0) {
+    ElMessage({
+      message: "没有可以导出的数据!",
+      type: "warning",
+      duration: 2500,
+      showClose: true,
+    });
+  }
 
-    let title = {
-        x: x1Name.value,
-        y: y1Name.value
-    }
-    Export(reportData.value, title, reportInfo1.value.reportName);
-}
-
-</script>
+  let title = {
+    x: x1Name.value,
+    y: y1Name.value,
+  };
+  Export(reportData.value, title, reportInfo1.value.reportName);
+};
+</script>

+ 156 - 113
src/components/operate-monitoring/ReportSecondPage.vue

@@ -1,131 +1,174 @@
 <template>
-    <page-layer>
-        <template #header>
-            <div style="text-align: center">
-                统计日期:
-                <span v-if="kssj2" style="color: #fc6c34;">
-                    {{ kssj2 }} 至 {{ jssj2 }}
-                </span>
-                <span v-else style="color: #fc6c34;">当前</span>
-                统计机构名称:<span style="color: #fc6c34;">长沙泰和医院</span>
-                指标名称: <span style="color: #fc6c34;">{{ reportInfo2.reportName }}</span>
-                统计结果描述: <span style="color: #fc6c34;">{{ reportInfo2.overview }}{{ reportInfo2.unit }}</span>
-                其中<span style="color: #3742fa;">&nbsp;{{ reportInfo2.fstName }}: </span>
-                <span style="color: #fc6c34;">{{ reportInfo2.fstValue }}{{ reportInfo2.unit }}</span>
-            </div>
-        </template>
-        <template #aside>
-            <el-table :data="reportData" :height="tableHeight" highlight-current-row row-key="childKey" stripe border
-                @row-dblclick="reportThirdInfo">
-                <el-table-column prop="x" :label="x2Name" width="120"></el-table-column>
-                <el-table-column prop="y" :label="y2Name"></el-table-column>
-            </el-table>
-        </template>
-        <template #main>
-            <div style="width: 80%; height: 400px; margin-bottom: 5px;" id="secondPie"></div>
-            <div style="width: 80%; height: 400px" id="secondDst"></div>
-        </template>
-    </page-layer>
-    <el-dialog v-if="props.reportSecond.tableInfo.trdGroup !== 'patient'" :title="titleChart" v-model="thirdDrawer"
-        fullscreen destroy-on-close>
-        <ReportThirdPage :reportThird="reportThird" />
-    </el-dialog>
-    <el-dialog v-else :title="titleChart" v-model="patientDrawer" width="80%" style="height: 800px" top="40px" destroy-on-close>
-        <ReportPatientPage :reportPatient="reportPatient" />
-    </el-dialog>
+  <page-layer>
+    <template #header>
+      <div style="text-align: center">
+        统计日期:
+        <span v-if="kssj2" style="color: #fc6c34">
+          {{ kssj2 }} 至 {{ jssj2 }}
+        </span>
+        <span v-else style="color: #fc6c34">当前</span>
+        统计机构名称:<span style="color: #fc6c34">{{
+          env.VITE_HOSPITAL_NAME
+        }}</span>
+        指标名称:
+        <span style="color: #fc6c34">{{ reportInfo2.reportName }}</span>
+        统计结果描述:
+        <span style="color: #fc6c34"
+          >{{ reportInfo2.overview }}{{ reportInfo2.unit }}</span
+        >
+        其中<span style="color: #3742fa"
+          >&nbsp;{{ reportInfo2.fstName }}:
+        </span>
+        <span style="color: #fc6c34"
+          >{{ reportInfo2.fstValue }}{{ reportInfo2.unit }}</span
+        >
+      </div>
+    </template>
+    <template #aside>
+      <el-table
+        :data="reportData"
+        :height="tableHeight"
+        highlight-current-row
+        row-key="childKey"
+        stripe
+        border
+        @row-dblclick="reportThirdInfo"
+      >
+        <el-table-column prop="x" :label="x2Name" width="120"></el-table-column>
+        <el-table-column prop="y" :label="y2Name"></el-table-column>
+      </el-table>
+    </template>
+    <template #main>
+      <div
+        style="width: 80%; height: 400px; margin-bottom: 5px"
+        id="secondPie"
+      ></div>
+      <div style="width: 80%; height: 400px" id="secondDst"></div>
+    </template>
+  </page-layer>
+  <el-dialog
+    v-if="props.reportSecond.tableInfo.trdGroup !== 'patient'"
+    :title="titleChart"
+    v-model="thirdDrawer"
+    fullscreen
+    destroy-on-close
+  >
+    <ReportThirdPage :reportThird="reportThird" />
+  </el-dialog>
+  <el-dialog
+    v-else
+    :title="titleChart"
+    v-model="patientDrawer"
+    width="80%"
+    style="height: 800px"
+    top="40px"
+    destroy-on-close
+  >
+    <ReportPatientPage :reportPatient="reportPatient" />
+  </el-dialog>
 </template>
 <script setup name="ReportFirst">
-import { ref, nextTick } from "vue"
-import { clone } from '@/utils/clone'
-import PageLayer from '@/layout/PageLayer.vue'
-import { highBarUtils, highPieUtils } from '@/utils/high-charts'
-import { selectReportGroup } from '@/api/reports/high-report'
-import ReportThirdPage from '@/components/operate-monitoring/ReportThirdPage.vue'
-import ReportPatientPage from '@/components/operate-monitoring/ReportPatientPage.vue'
+import { ref, nextTick } from "vue";
+import { clone } from "@/utils/clone";
+import PageLayer from "@/layout/PageLayer.vue";
+import { highBarUtils, highPieUtils } from "@/utils/high-charts";
+import { selectReportGroup } from "@/api/reports/high-report";
+import ReportThirdPage from "@/components/operate-monitoring/ReportThirdPage.vue";
+import ReportPatientPage from "@/components/operate-monitoring/ReportPatientPage.vue";
+import env from "../../utils/setting.js";
 
-const tableHeight = window.innerHeight - 105
+const tableHeight = window.innerHeight - 105;
 const props = defineProps({
-    reportSecond: {
-        type: Object,
-        default: {}
-    }
-})
+  reportSecond: {
+    type: Object,
+    default: {},
+  },
+});
 nextTick(() => {
-    showSecondPst()
-})
+  showSecondPst();
+});
 // 报表基本信息
-const reportInfo2 = ref({})
+const reportInfo2 = ref({});
 // 报表展示值
-const reportData = ref({})
+const reportData = ref({});
 // 表格展示信息
-const tableData = ref({})
+const tableData = ref({});
 // 查询信息
-const param2 = ref({})
+const param2 = ref({});
 
-const x2Name = ref('')
-const y2Name = ref('')
-const kssj2 = ref('')
-const jssj2 = ref('')
+const x2Name = ref("");
+const y2Name = ref("");
+const kssj2 = ref("");
+const jssj2 = ref("");
 
-reportData.value = props.reportSecond.data
-reportInfo2.value = props.reportSecond.row
-tableData.value = props.reportSecond.tableInfo
-param2.value = props.reportSecond.params
-kssj2.value = props.reportSecond.kssj
-jssj2.value = props.reportSecond.jssj
+reportData.value = props.reportSecond.data;
+reportInfo2.value = props.reportSecond.row;
+tableData.value = props.reportSecond.tableInfo;
+param2.value = props.reportSecond.params;
+kssj2.value = props.reportSecond.kssj;
+jssj2.value = props.reportSecond.jssj;
 
 const showSecondPst = () => {
-    let barTitle = reportInfo2.value.reportName
-    let yAxisName = '单位:' + reportInfo2.value.unit
-    let tipUnit = reportInfo2.value.unit
-    let xdata = []
-    let ydata = []
-    let pieData = []
-    x2Name.value = tableData.value.sndName
-    y2Name.value = reportInfo2.value.unit
+  let barTitle = reportInfo2.value.reportName;
+  let yAxisName = "单位:" + reportInfo2.value.unit;
+  let tipUnit = reportInfo2.value.unit;
+  let xdata = [];
+  let ydata = [];
+  let pieData = [];
+  x2Name.value = tableData.value.sndName;
+  y2Name.value = reportInfo2.value.unit;
 
-    reportData.value.forEach((item) => {
-        let pieInfo = {}
-        pieInfo.value = item.y
-        pieInfo.name = item.x
-        pieInfo.unit = reportInfo2.value.unit
-        xdata.push(item.x)
-        ydata.push(item.y)
-        pieData.push(pieInfo)
-    })
+  reportData.value.forEach(item => {
+    let pieInfo = {};
+    pieInfo.value = item.y;
+    pieInfo.name = item.x;
+    pieInfo.unit = reportInfo2.value.unit;
+    xdata.push(item.x);
+    ydata.push(item.y);
+    pieData.push(pieInfo);
+  });
 
-    highBarUtils(secondDst, barTitle, xdata, ydata, barTitle, yAxisName, tipUnit, 1)
-    highPieUtils(secondPie, barTitle, pieData)
-}
+  highBarUtils(
+    secondDst,
+    barTitle,
+    xdata,
+    ydata,
+    barTitle,
+    yAxisName,
+    tipUnit,
+    1
+  );
+  highPieUtils(secondPie, barTitle, pieData);
+};
 
 // 钻取的查询结果
-const thirdDrawer = ref(false)
-const reportThird = ref({})
-const patientDrawer = ref(false)
-const reportPatient = ref({})
-const titleChart = ref('')
-const reportThirdInfo = (row) => {
-    reportInfo2.value.sndName = row.x
-    reportInfo2.value.sndValue = row.y
-    let params = clone(param2.value)
-    params.sndName =  row.x
-    // 下一级是病人,则走最后固定的病人明细展示页面
-    let trdGroup = tableData.value.trdGroup
-    if (trdGroup === 'patient') {
-        titleChart.value = reportInfo2.value.reportName
-        patientDrawer.value = true
-        reportPatient.value.row = reportInfo2.value
-        reportPatient.value.params = clone(params)
-    } else {
-        selectReportGroup(params).then((res) => {
-            reportThird.value = res
-            titleChart.value = res.title
-            thirdDrawer.value = true
-            reportThird.value.row = reportInfo2.value
-            reportThird.value.kssj = kssj2.value
-            reportThird.value.jssj = jssj2.value
-            reportThird.value.params = clone(params)
-        })
-    }
-}
-</script>
+const thirdDrawer = ref(false);
+const reportThird = ref({});
+const patientDrawer = ref(false);
+const reportPatient = ref({});
+const titleChart = ref("");
+const reportThirdInfo = row => {
+  reportInfo2.value.sndName = row.x;
+  reportInfo2.value.sndValue = row.y;
+  let params = clone(param2.value);
+  params.sndName = row.x;
+  // 下一级是病人,则走最后固定的病人明细展示页面
+  let trdGroup = tableData.value.trdGroup;
+  if (trdGroup === "patient") {
+    titleChart.value = reportInfo2.value.reportName;
+    patientDrawer.value = true;
+    reportPatient.value.row = reportInfo2.value;
+    reportPatient.value.params = clone(params);
+  } else {
+    selectReportGroup(params).then(res => {
+      reportThird.value = res;
+      titleChart.value = res.title;
+      thirdDrawer.value = true;
+      reportThird.value.row = reportInfo2.value;
+      reportThird.value.kssj = kssj2.value;
+      reportThird.value.jssj = jssj2.value;
+      reportThird.value.params = clone(params);
+    });
+  }
+};
+</script>

+ 125 - 86
src/components/operate-monitoring/ReportThirdPage.vue

@@ -1,103 +1,142 @@
 <template>
-    <page-layer>
-        <template #header>
-            <div style="text-align: center">
-                统计日期:
-                <span v-if="kssj3" style="color: #fc6c34;">
-                    {{ kssj3 }} 至 {{ jssj3 }}
-                </span>
-                <span v-else style="color: #fc6c34;">当前</span>
-                统计机构名称:<span style="color: #fc6c34;">长沙泰和医院</span>
-                指标名称: <span style="color: #fc6c34;">{{ reportInfo3.reportName }}</span>
-                统计结果描述: <span style="color: #fc6c34;">{{ reportInfo3.overview }}{{ reportInfo3.unit }}</span>
-                其中<span style="color: #3742fa;">&nbsp;{{ reportInfo3.fstName }}: </span>
-                <span style="color: #fc6c34;">{{ reportInfo3.fstValue }}{{ reportInfo3.unit }}</span>
-                <span style="color: #3742fa;">&nbsp;{{ reportInfo3.sndName }}: </span>
-                <span style="color: #fc6c34;">{{ reportInfo3.sndValue }}{{ reportInfo3.unit }}</span>
-            </div>
-        </template>
-        <template #aside>
-            <el-table :data="reportData" :height="tableHeight" highlight-current-row row-key="childKey" stripe border
-                @row-dblclick="dbClickPatient">
-                <el-table-column prop="x" :label="x3Name" width="120"></el-table-column>
-                <el-table-column prop="y" :label="y3Name"></el-table-column>
-            </el-table>
-        </template>
-        <template #main>
-            <div style="width: 80%; height: 400px; margin-bottom: 5px;" id="thirdPie"></div>
-            <div style="width: 80%; height: 400px" id="thirdDst"></div>
-        </template>
-    </page-layer>
-    <el-dialog :title="titleChart" v-model="patientDrawer" width="80%" style="height: 800px" top="40px" destroy-on-close>
-        <ReportPatientPage :reportPatient="reportPatient" />
-    </el-dialog>
+  <page-layer>
+    <template #header>
+      <div style="text-align: center">
+        统计日期:
+        <span v-if="kssj3" style="color: #fc6c34">
+          {{ kssj3 }} 至 {{ jssj3 }}
+        </span>
+        <span v-else style="color: #fc6c34">当前</span>
+        统计机构名称:<span style="color: #fc6c34">{{
+          env.VITE_HOSPITAL_NAME
+        }}</span>
+        指标名称:
+        <span style="color: #fc6c34">{{ reportInfo3.reportName }}</span>
+        统计结果描述:
+        <span style="color: #fc6c34"
+          >{{ reportInfo3.overview }}{{ reportInfo3.unit }}</span
+        >
+        其中<span style="color: #3742fa"
+          >&nbsp;{{ reportInfo3.fstName }}:
+        </span>
+        <span style="color: #fc6c34"
+          >{{ reportInfo3.fstValue }}{{ reportInfo3.unit }}</span
+        >
+        <span style="color: #3742fa">&nbsp;{{ reportInfo3.sndName }}: </span>
+        <span style="color: #fc6c34"
+          >{{ reportInfo3.sndValue }}{{ reportInfo3.unit }}</span
+        >
+      </div>
+    </template>
+    <template #aside>
+      <el-table
+        :data="reportData"
+        :height="tableHeight"
+        highlight-current-row
+        row-key="childKey"
+        stripe
+        border
+        @row-dblclick="dbClickPatient"
+      >
+        <el-table-column prop="x" :label="x3Name" width="120"></el-table-column>
+        <el-table-column prop="y" :label="y3Name"></el-table-column>
+      </el-table>
+    </template>
+    <template #main>
+      <div
+        style="width: 80%; height: 400px; margin-bottom: 5px"
+        id="thirdPie"
+      ></div>
+      <div style="width: 80%; height: 400px" id="thirdDst"></div>
+    </template>
+  </page-layer>
+  <el-dialog
+    :title="titleChart"
+    v-model="patientDrawer"
+    width="80%"
+    style="height: 800px"
+    top="40px"
+    destroy-on-close
+  >
+    <ReportPatientPage :reportPatient="reportPatient" />
+  </el-dialog>
 </template>
 <script setup name="ReportFirst">
-import { ref, nextTick } from "vue"
-import PageLayer from '@/layout/PageLayer.vue'
-import { highBarUtils, highPieUtils } from '@/utils/high-charts'
-import ReportPatientPage from '@/components/operate-monitoring/ReportPatientPage.vue'
+import { ref, nextTick } from "vue";
+import PageLayer from "@/layout/PageLayer.vue";
+import { highBarUtils, highPieUtils } from "@/utils/high-charts";
+import ReportPatientPage from "@/components/operate-monitoring/ReportPatientPage.vue";
+import env from "../../utils/setting.js";
 
-const tableHeight = window.innerHeight - 105
+const tableHeight = window.innerHeight - 105;
 const props = defineProps({
-    reportThird: {
-        type: Object,
-        default: {}
-    }
-})
+  reportThird: {
+    type: Object,
+    default: {},
+  },
+});
 nextTick(() => {
-    showSecondPst()
-})
+  showSecondPst();
+});
 // 报表基本信息
-const reportInfo3 = ref({})
+const reportInfo3 = ref({});
 // 报表展示值
-const reportData = ref({})
+const reportData = ref({});
 // 表格展示信息
-const tableData = ref({})
+const tableData = ref({});
 
-const x3Name = ref('')
-const y3Name = ref('')
-const kssj3 = ref('')
-const jssj3 = ref('')
+const x3Name = ref("");
+const y3Name = ref("");
+const kssj3 = ref("");
+const jssj3 = ref("");
 
-reportData.value = props.reportThird.data
-reportInfo3.value = props.reportThird.row
-kssj3.value = props.reportSecond.kssj
-jssj3.value = props.reportSecond.jssj
-tableData.value = props.reportThird.tableInfo
+reportData.value = props.reportThird.data;
+reportInfo3.value = props.reportThird.row;
+kssj3.value = props.reportSecond.kssj;
+jssj3.value = props.reportSecond.jssj;
+tableData.value = props.reportThird.tableInfo;
 
 const showSecondPst = () => {
-    let barTitle = reportInfo3.value.reportName
-    let yAxisName = '单位:' + reportInfo3.value.unit
-    let tipUnit = reportInfo3.value.unit
-    let xdata = []
-    let ydata = []
-    let pieData = []
-    x3Name.value = tableData.value.trdName
-    y3Name.value = reportInfo3.value.unit
+  let barTitle = reportInfo3.value.reportName;
+  let yAxisName = "单位:" + reportInfo3.value.unit;
+  let tipUnit = reportInfo3.value.unit;
+  let xdata = [];
+  let ydata = [];
+  let pieData = [];
+  x3Name.value = tableData.value.trdName;
+  y3Name.value = reportInfo3.value.unit;
 
-    reportData.value.forEach((item) => {
-        let pieInfo = {}
-        pieInfo.value = item.y
-        pieInfo.name = item.x
-        pieInfo.unit = reportInfo3.value.unit
-        xdata.push(item.x)
-        ydata.push(item.y)
-        pieData.push(pieInfo)
-    })
+  reportData.value.forEach(item => {
+    let pieInfo = {};
+    pieInfo.value = item.y;
+    pieInfo.name = item.x;
+    pieInfo.unit = reportInfo3.value.unit;
+    xdata.push(item.x);
+    ydata.push(item.y);
+    pieData.push(pieInfo);
+  });
 
-    highBarUtils(thirdDst, barTitle, xdata, ydata, barTitle, yAxisName, tipUnit, 1)
-    highPieUtils(thirdPie, barTitle, pieData)
-}
+  highBarUtils(
+    thirdDst,
+    barTitle,
+    xdata,
+    ydata,
+    barTitle,
+    yAxisName,
+    tipUnit,
+    1
+  );
+  highPieUtils(thirdPie, barTitle, pieData);
+};
 
 // 钻取病人的查询结果(目前仅限钻取这一层之后必须是病人页)
-const patientDrawer = ref(false)
-const reportPatient = ref({})
-const titleChart = ref('')
-const dbClickPatient = (row) => {
-    reportInfo3.value.trdName = row.x
-    titleChart.value = reportInfo3.value.reportName
-    reportPatient.value.row = reportInfo3.value
-    patientDrawer.value = true
-}
-</script>
+const patientDrawer = ref(false);
+const reportPatient = ref({});
+const titleChart = ref("");
+const dbClickPatient = row => {
+  reportInfo3.value.trdName = row.x;
+  titleChart.value = reportInfo3.value.reportName;
+  reportPatient.value.row = reportInfo3.value;
+  patientDrawer.value = true;
+};
+</script>

+ 45 - 21
src/components/outpatient/MzReceipt.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="layout_container">
-    <div class="receipt-title">长沙泰和医院处方笺</div>
+    <div class="receipt-title">{{ env.VITE_HOSPITAL_NAME }}处方笺</div>
     <el-divider></el-divider>
     <div class="receipt-head">
       <div>姓名:{{ mzVisit.name }}</div>
@@ -10,7 +10,9 @@
     <div class="receipt-head">
       <div>门诊号:{{ mzVisit.patientId }}</div>
       <div>科别:{{ mzVisit.visitDeptName }}</div>
-      <div class="ellipsis-text" :title="mzVisit.icdText">临床诊断:{{ mzVisit.icdText }}</div>
+      <div class="ellipsis-text" :title="mzVisit.icdText">
+        临床诊断:{{ mzVisit.icdText }}
+      </div>
     </div>
     <div class="receipt-head">
       <div>开具日期:{{ mzVisit.opDay }}</div>
@@ -25,30 +27,46 @@
         <div class="receipt-item">
           <div class="w75">
             <div style="font-size: 15px">
-              <el-checkbox v-if="showCheckbox" v-model="item.checked"></el-checkbox>
+              <el-checkbox
+                v-if="showCheckbox"
+                v-model="item.checked"
+              ></el-checkbox>
               <span style="font-weight: bold; color: black">
                 &nbsp;{{ index + 1 }}){{ item.drugName }}&nbsp;
               </span>
-              <span v-if="item.specification">({{ item.specification }})</span>
+              <span v-if="item.specification"
+                >({{ item.specification }})</span
+              >
               <span v-else>({{ item.drugUnit }})</span>
               <span v-if="item.hospApprFlag === '2'" class="self-pay">
                 自费
               </span>
             </div>
             <div>
-              <div class="receipt-tips" style="color: purple;font-size: 12px">
+              <div class="receipt-tips" style="color: purple; font-size: 12px">
                 <span v-if="item.drugQuan">
                   用法:{{ item.drugQuan }}{{ item.drugUnit }} / 次
                 </span>
                 <span v-if="item.frequency"> {{ item.frequency }} </span>
                 <span v-if="item.orderDays"> {{ item.orderDays }}天 </span>
                 <span v-if="item.supplyCode"> {{ item.supplyCode }} </span>
-                <span v-if="item.instructionText"> 备注:{{ item.instructionText }} </span>
+                <span v-if="item.instructionText">
+                  备注:{{ item.instructionText }}
+                </span>
               </div>
-              <div :style="{fontSize: '12px', color: item.nationalCode ? 'green' : 'red', paddingLeft: '64px' }">
-                医保码:{{ item.nationalCode || '未匹配' }}
+              <div
+                :style="{
+                  fontSize: '12px',
+                  color: item.nationalCode ? 'green' : 'red',
+                  paddingLeft: '64px',
+                }"
+              >
+                医保码:{{ item.nationalCode || "未匹配" }}
               </div>
-              <div v-if="item.ybComment" style="font-size: 12px; padding-left: 64px; color: gray">
+              <div
+                v-if="item.ybComment"
+                style="font-size: 12px; padding-left: 64px; color: gray"
+              >
                 用药限制:{{ item.ybComment }}
               </div>
               <div style="margin-bottom: 12px"></div>
@@ -60,43 +78,49 @@
     </div>
     <el-divider></el-divider>
     <div class="receipt-head">
-      <div style="font-size: 15px; width: 70%">医师:{{ mzVisit.doctorName }} / {{ mzVisit.doctorCode }} /
-        <span v-html="highlightYbCode(mzVisit.doctorCode,mzVisit.doctorYbCode)"></span>
+      <div style="font-size: 15px; width: 70%">
+        医师:{{ mzVisit.doctorName }} / {{ mzVisit.doctorCode }} /
+        <span
+          v-html="highlightYbCode(mzVisit.doctorCode, mzVisit.doctorYbCode)"
+        ></span>
       </div>
       <div style="font-size: 15px">
-        总金额:<span style="font-size: 18px; font-weight: bold">¥{{ mzVisit.totalFee }}</span>
+        总金额:<span style="font-size: 18px; font-weight: bold"
+          >¥{{ mzVisit.totalFee }}</span
+        >
       </div>
     </div>
   </div>
-
 </template>
 
 <script setup>
+import env from "../../utils/setting.js";
 
 const props = defineProps({
   showCheckbox: {
     type: Boolean,
-    default: false
+    default: false,
   },
   mzVisit: {
     type: Object,
-    required: true
+    required: true,
   },
   receipts: {
     type: Array,
-    required: true
-  }
-})
+    required: true,
+  },
+});
 
 function highlightYbCode(hisCode, ybCode) {
   if (!hisCode) {
-    return ''
+    return "";
   }
-  return ybCode ? `<span>${ybCode}</span>` : '<span style="color: red">医师无医保编码</span>'
+  return ybCode
+    ? `<span>${ybCode}</span>`
+    : '<span style="color: red">医师无医保编码</span>';
 }
 </script>
 
-
 <style scoped>
 .receipt-title {
   width: 100%;

+ 204 - 105
src/components/si-sheet-upload/jieSuanDanDaYing.vue

@@ -1,22 +1,38 @@
 <template>
-  <el-dialog v-model="jieSuanDanDaYingDialog" fullscreen title="打印结算单" @closed="emit('close')">
+  <el-dialog
+    v-model="jieSuanDanDaYingDialog"
+    fullscreen
+    title="打印结算单"
+    @closed="emit('close')"
+  >
     <el-affix :offset="50" style="margin-left: 800px">
-      <el-button size="small" type="primary" @click="daYingClick">打印</el-button>
+      <el-button size="small" type="primary" @click="daYingClick"
+        >打印</el-button
+      >
     </el-affix>
     <el-affix :offset="100" style="margin-left: 800px">
-      <el-button size="small" type="danger" @click="jieSuanDanDaYingDialog = false">退出</el-button>
+      <el-button
+        size="small"
+        type="danger"
+        @click="jieSuanDanDaYingDialog = false"
+        >退出</el-button
+      >
     </el-affix>
-    <br/>
+    <br />
     <div id="setl">
       <div id="setl1">
-        <h2 style="text-align: center"><span style="text-decoration: underline">湖南省</span>长沙市医疗保障基金结算清单
+        <h2 style="text-align: center">
+          <span style="text-decoration: underline">湖南省</span
+          >长沙市医疗保障基金结算清单
         </h2>
         <div class="tanXingHeZiHeng">
           <!--    1    -->
           <div class="tanXingHeZiShu" style="justify-content: end">
             <div class="wen-zi">
               <div>定点医疗机构名称</div>
-              <div><span>长沙泰和医院</span></div>
+              <div>
+                <span>{{ env.VITE_HOSPITAL_NAME }}</span>
+              </div>
             </div>
             <div class="wen-zi">
               <div>医保编号</div>
@@ -28,7 +44,9 @@
           <div class="tanXingHeZiShu" style="justify-content: end">
             <div class="wen-zi">
               <div>定点医疗机构代码</div>
-              <div><span>H43010500370</span></div>
+              <div>
+                <span>{{ env.VITE_HOSPITAL_CODE }}</span>
+              </div>
             </div>
             <div class="wen-zi">
               <div>病案号</div>
@@ -59,7 +77,13 @@
           </div>
         </div>
         <div
-            style="border: 1px solid #000; line-height: 20px; text-align: center; background-color: rgba(127, 187, 236, 0.8)">
+          style="
+            border: 1px solid #000;
+            line-height: 20px;
+            text-align: center;
+            background-color: rgba(127, 187, 236, 0.8);
+          "
+        >
           <b style="color: #000"> 一、基本信息 </b>
         </div>
         <div class="divBorder" style="padding: 4px; margin-bottom: 4px">
@@ -244,7 +268,13 @@
         <!--  二、门诊慢特病诊疗信息    -->
         <div v-if="!zyFlag">
           <div
-              style="border: 1px solid #000; line-height: 20px; text-align: center; background-color: rgba(127, 187, 236, 0.8)">
+            style="
+              border: 1px solid #000;
+              line-height: 20px;
+              text-align: center;
+              background-color: rgba(127, 187, 236, 0.8);
+            "
+          >
             <b style="color: #000"> 二、门诊慢特病诊疗信息 </b>
           </div>
           <div class="divBorder" style="padding: 0 5px">
@@ -290,7 +320,14 @@
         </div>
         <div v-if="zyFlag">
           <div
-              style="border: 1px solid #000; line-height: 20px; text-align: center; background-color: rgba(127, 187, 236, 0.8); margin-top: 5px">
+            style="
+              border: 1px solid #000;
+              line-height: 20px;
+              text-align: center;
+              background-color: rgba(127, 187, 236, 0.8);
+              margin-top: 5px;
+            "
+          >
             <b style="color: #000"> 三、住院诊疗信息 </b>
           </div>
           <div class="divBorder" style="padding: 0 5px">
@@ -312,8 +349,10 @@
                 <div class="w10">
                   <span>[{{ blankToSpace(setlinfo.admWay) }}]</span>
                 </div>
-                <div>1.急诊 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.门诊&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.其他医疗机构转入&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                  9.其他
+                <div>
+                  1.急诊
+                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.门诊&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  3.其他医疗机构转入&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9.其他
                 </div>
               </div>
             </div>
@@ -416,14 +455,24 @@
                 <th>入院病情</th>
               </tr>
               <tr v-for="(item, index) in diseinfoData">
-                <td>{{
-                    index === 0 ? '主要诊断:' + item.xiYiDisDiagComment : index === 1 ? '其他诊断:' + item.xiYiDisDiagComment : item.xiYiDisDiagComment
+                <td>
+                  {{
+                    index === 0
+                      ? "主要诊断:" + item.xiYiDisDiagComment
+                      : index === 1
+                        ? "其他诊断:" + item.xiYiDisDiagComment
+                        : item.xiYiDisDiagComment
                   }}
                 </td>
                 <td>{{ item.xiYiDisDiag }}</td>
                 <td>{{ getAdmissCond(item.xiYiAdmissCond) }}</td>
-                <td>{{
-                    index === 0 ? '主病:' + item.ZhongYiDiagComment : index === 1 ? '主证:' + item.ZhongYiDiagComment : item.ZhongYiDiagComment
+                <td>
+                  {{
+                    index === 0
+                      ? "主病:" + item.ZhongYiDiagComment
+                      : index === 1
+                        ? "主证:" + item.ZhongYiDiagComment
+                        : item.ZhongYiDiagComment
                   }}
                 </td>
                 <td>{{ item.ZhongYiDisDiag }}</td>
@@ -444,8 +493,20 @@
             <div v-for="(item, index) in oprninfoData">
               <table style="width: 100%">
                 <tr>
-                  <td>{{ index === 0 ? '主要手术及操作名称' : '其他手术及操作名称' + index }}</td>
-                  <td>{{ index === 0 ? '主要手术及操作代码' : '其他手术及操作代码' + index }}</td>
+                  <td>
+                    {{
+                      index === 0
+                        ? "主要手术及操作名称"
+                        : "其他手术及操作名称" + index
+                    }}
+                  </td>
+                  <td>
+                    {{
+                      index === 0
+                        ? "主要手术及操作代码"
+                        : "其他手术及操作代码" + index
+                    }}
+                  </td>
                   <td>麻醉方式</td>
                   <td>术者医师名</td>
                   <td>术者医师代码</td>
@@ -479,7 +540,7 @@
               <span v-if="index === 0"></span>
             </div>
             <div>
-              <br>
+              <br />
               手术操作代码计数: {{ setlinfo.oprnOprtCodeCnt }}
             </div>
             <div class="tanXingHeZiHeng div-border-bottom">
@@ -494,9 +555,13 @@
               <div class="wen-zi">
                 <div>颅脑损伤患者昏迷时间:</div>
                 <div style="height: 40px; border: 0">
-                  <div>入院前 {{ luNeiShiJian(setlinfo.pwcryBfadmComaDura) }}</div>
-                  <br/>
-                  <div>入院后 {{ luNeiShiJian(setlinfo.pwcryAfadmComaDura) }}</div>
+                  <div>
+                    入院前 {{ luNeiShiJian(setlinfo.pwcryBfadmComaDura) }}
+                  </div>
+                  <br />
+                  <div>
+                    入院后 {{ luNeiShiJian(setlinfo.pwcryAfadmComaDura) }}
+                  </div>
                 </div>
               </div>
             </div>
@@ -504,16 +569,16 @@
             <table>
               <tr>
                 <th>
-                  重症监护病房类型 (CCU、NICU、ECU、SICU、<br/>
-                  PICU、RICU、ICU(综合)、其 <br/>
+                  重症监护病房类型 (CCU、NICU、ECU、SICU、<br />
+                  PICU、RICU、ICU(综合)、其 <br />
                   他)
                 </th>
                 <th>
-                  进重症监护室时间 <br/>
+                  进重症监护室时间 <br />
                   (_年_月_日_时_分)
                 </th>
                 <th>
-                  出重症监护室时间<br/>
+                  出重症监护室时间<br />
                   (_年_月_日_时_分)
                 </th>
                 <th>合计( 时 分)</th>
@@ -588,8 +653,11 @@
               </div>
             </div>
 
-            <div class="tanXingHeZiHeng div-border-bottom" style="margin-bottom: 4px">3.转社区、转卫生院机构, 4.非医嘱离院
-              5.死亡 9.其他
+            <div
+              class="tanXingHeZiHeng div-border-bottom"
+              style="margin-bottom: 4px"
+            >
+              3.转社区、转卫生院机构, 4.非医嘱离院 5.死亡 9.其他
             </div>
 
             <div class="tanXingHeZiHeng div-border-bottom">
@@ -609,7 +677,10 @@
               </div>
             </div>
 
-            <div class="tanXingHeZiHeng div-border-bottom" style="justify-content: flex-start">
+            <div
+              class="tanXingHeZiHeng div-border-bottom"
+              style="justify-content: flex-start"
+            >
               <div class="wen-zi">
                 <div>主诊医师姓名</div>
                 <div class="w90">
@@ -625,7 +696,10 @@
               </div>
             </div>
 
-            <div class="tanXingHeZiHeng div-border-bottom" style="justify-content: flex-start">
+            <div
+              class="tanXingHeZiHeng div-border-bottom"
+              style="justify-content: flex-start"
+            >
               <div class="wen-zi">
                 <div>责任护士姓名</div>
                 <div class="w90">
@@ -646,7 +720,14 @@
 
       <div id="setl3">
         <div
-            style="border: 1px solid #000; line-height: 20px; text-align: center; background-color: rgba(127, 187, 236, 0.8); margin-top: 5px">
+          style="
+            border: 1px solid #000;
+            line-height: 20px;
+            text-align: center;
+            background-color: rgba(127, 187, 236, 0.8);
+            margin-top: 5px;
+          "
+        >
           <b style="color: #000"> 四、医疗收费信息</b>
         </div>
 
@@ -703,7 +784,10 @@
           </tr>
         </table>
         <!--第二页-->
-        <div class="tanXingHeZiHeng" :style="{ height: (7 + qiTaPayinfoData.length) * 30 + 'px' }">
+        <div
+          class="tanXingHeZiHeng"
+          :style="{ height: (7 + qiTaPayinfoData.length) * 30 + 'px' }"
+        >
           <div id="yiBaoZhiFu" style="width: 50%">
             <table :style="geRenZhiFuTableHeight">
               <tr>
@@ -713,15 +797,15 @@
               <tr>
                 <th rowspan="3">补充医疗保险支付</th>
                 <th>职工大额补助</th>
-                <td>{{ payinfoData['330100'].fundPayamt }}</td>
+                <td>{{ payinfoData["330100"].fundPayamt }}</td>
               </tr>
               <tr>
                 <th>居民大病保险</th>
-                <td>{{ payinfoData['390200'].fundPayamt }}</td>
+                <td>{{ payinfoData["390200"].fundPayamt }}</td>
               </tr>
               <tr>
                 <th>公务员医疗补助</th>
-                <td>{{ payinfoData['320100'].fundPayamt }}</td>
+                <td>{{ payinfoData["320100"].fundPayamt }}</td>
               </tr>
               <tr>
                 <th colspan="2">医疗救助支付</th>
@@ -730,7 +814,7 @@
               <tr>
                 <th :rowspan="3 + qiTaPayinfoData.length">其他支付</th>
                 <th>企业补充</th>
-                <td>{{ payinfoData['370100'].fundPayamt }}</td>
+                <td>{{ payinfoData["370100"].fundPayamt }}</td>
               </tr>
               <tr>
                 <th>商业保险</th>
@@ -773,7 +857,10 @@
             <div class="w10">
               <span>[{{ blankToSpace(setlinfo.hiPaymtd) }}]</span>
             </div>
-            <div>1.按项目 2.单病种 3.按病种分值 4.疾病诊断相关分组(DRG) 5.按床日 6.按人头……</div>
+            <div>
+              1.按项目 2.单病种 3.按病种分值 4.疾病诊断相关分组(DRG) 5.按床日
+              6.按人头……
+            </div>
           </div>
         </div>
 
@@ -816,9 +903,9 @@
 </template>
 
 <script name="jieSuanDanDaYing" setup>
-import {getLodop, initLodop} from '@/utils/c-lodop'
-import {jieSuanDanYangShiCss} from '@/data/css-for-print'
-import {daYingShangChuanJieSuanDan} from '@/api/medical-insurance/si-setl-upload'
+import { getLodop, initLodop } from "@/utils/c-lodop";
+import { jieSuanDanYangShiCss } from "@/data/css-for-print";
+import { daYingShangChuanJieSuanDan } from "@/api/medical-insurance/si-setl-upload";
 import {
   brdyName,
   fenLeiZhiFuLeiXing,
@@ -835,111 +922,123 @@ import {
   outpatientChronicDisease,
   zhenDuanData,
   zhongZhenJianHu,
-} from './jieSuanDanXiuGai'
-import {stringIsBlank} from '@/utils/blank-utils'
+} from "./jieSuanDanXiuGai";
+import { stringIsBlank } from "@/utils/blank-utils";
+import env from "../../utils/setting.js";
 
 const props = defineProps({
   data: {},
-})
-const emit = defineEmits(['close'])
+});
+const emit = defineEmits(["close"]);
 
-const jieSuanDanDaYingDialog = ref(true)
+const jieSuanDanDaYingDialog = ref(true);
 /**
  * 这个是门特慢病的
  * @type {Ref<UnwrapRef<*[]>>}
  */
-const setlinfo = ref({})
-const opspdiseinfoData = ref([])
+const setlinfo = ref({});
+const opspdiseinfoData = ref([]);
 // 诊断
-const diseinfoData = ref([])
+const diseinfoData = ref([]);
 // 手术信息
-const oprninfoData = ref([])
+const oprninfoData = ref([]);
 // 重症监护时间
-const icuinfoData = ref([])
+const icuinfoData = ref([]);
 // 收费项目信息
-const iteminfoData = ref([])
+const iteminfoData = ref([]);
 // 基金支付
-const payinfoData = ref({})
+const payinfoData = ref({});
 // 其他基金支付方式
-const qiTaPayinfoData = ref([])
+const qiTaPayinfoData = ref([]);
 //输血量
-const bldData = ref([])
+const bldData = ref([]);
 //   查询条件
-const patNo = ref('')
-const times = ref(0)
-const ledgerSn = ref(0)
+const patNo = ref("");
+const times = ref(0);
+const ledgerSn = ref(0);
 
-const zyFlag = ref(true)
+const zyFlag = ref(true);
 
 // 个人支付 表格的长度
 const geRenZhiFuTableHeight = ref({
-  height: '100%',
-})
+  height: "100%",
+});
 
 // 基金支付占位置
-let shuShiHua = ['310100', '330100', '390200', '320100', '610100', '370100']
+let shuShiHua = ["310100", "330100", "390200", "320100", "610100", "370100"];
 for (let i = 0; i < shuShiHua.length; i++) {
   payinfoData.value[shuShiHua[i]] = {
     fundPayType: shuShiHua[i],
-    fundPayamt: '',
-  }
+    fundPayamt: "",
+  };
 }
 
 const daYingClick = () => {
-  let LODOP = getLodop()
-  LODOP.PRINT_INIT('湖南省长沙市医疗保障基金结算清单') // 初始化打印机 名字
-  LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
-  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-  LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', '<style>' + jieSuanDanYangShiCss + '</style>' + '<body>' + document.getElementById('setl').innerHTML + '</body>') //要打印的内容
-  LODOP.PREVIEW() // 关闭
-}
+  let LODOP = getLodop();
+  LODOP.PRINT_INIT("湖南省长沙市医疗保障基金结算清单"); // 初始化打印机 名字
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小  A4
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_HTM(
+    "2mm",
+    "5mm",
+    "100%",
+    "100%",
+    "<style>" +
+      jieSuanDanYangShiCss +
+      "</style>" +
+      "<body>" +
+      document.getElementById("setl").innerHTML +
+      "</body>"
+  ); //要打印的内容
+  LODOP.PREVIEW(); // 关闭
+};
 
 onMounted(() => {
-  patNo.value = props.data.patNo
-  times.value = props.data.times
-  ledgerSn.value = props.data.ledgerSn
-  zyFlag.value = patNo.value.indexOf('-') === -1
-  initLodop()
+  patNo.value = props.data.patNo;
+  times.value = props.data.times;
+  ledgerSn.value = props.data.ledgerSn;
+  zyFlag.value = patNo.value.indexOf("-") === -1;
+  initLodop();
   for (let i = 0; i < 1; i++) {
     bldData.value.push({
-      bldCat: '',
-      bldAmt: '',
-      bldUnt: '',
-    })
+      bldCat: "",
+      bldAmt: "",
+      bldUnt: "",
+    });
   }
-  queryJieSuanDan()
-})
+  queryJieSuanDan();
+});
 
 const queryJieSuanDan = () => {
   daYingShangChuanJieSuanDan(patNo.value, times.value, ledgerSn.value)
-      .then((res) => {
-        jieSuanDanDaYingDialog.value = true
-        setlinfo.value = res.setlinfo
-        diseinfoData.value = zhenDuanData(res.diseinfo)
-        // 手术
-        oprninfoData.value = getShouShuData(res.oprninfo)
-        //  医疗收费信息
-        iteminfoData.value = getMedChrgitmTypeData(res.iteminfo)
-        icuinfoData.value = zhongZhenJianHu(res.icuinfo)
-        // 门诊慢特病
-        opspdiseinfoData.value = outpatientChronicDisease(res.opspdiseinfo)
-        // 基金支付类型
-        let fenLeiJiJing = fenLeiZhiFuLeiXing(res.payinfo)
-        payinfoData.value = fenLeiJiJing.obj
-        qiTaPayinfoData.value = fenLeiJiJing.qiTa
-      })
-      .catch((e) => {
-        jieSuanDanDaYingDialog.value = false
-      })
-}
+    .then(res => {
+      jieSuanDanDaYingDialog.value = true;
+      setlinfo.value = res.setlinfo;
+      diseinfoData.value = zhenDuanData(res.diseinfo);
+      // 手术
+      oprninfoData.value = getShouShuData(res.oprninfo);
+      //  医疗收费信息
+      iteminfoData.value = getMedChrgitmTypeData(res.iteminfo);
+      icuinfoData.value = zhongZhenJianHu(res.icuinfo);
+      // 门诊慢特病
+      opspdiseinfoData.value = outpatientChronicDisease(res.opspdiseinfo);
+      // 基金支付类型
+      let fenLeiJiJing = fenLeiZhiFuLeiXing(res.payinfo);
+      payinfoData.value = fenLeiJiJing.obj;
+      qiTaPayinfoData.value = fenLeiJiJing.qiTa;
+    })
+    .catch(e => {
+      jieSuanDanDaYingDialog.value = false;
+    });
+};
 
-const blankToSpace = (value) => {
+const blankToSpace = value => {
   if (stringIsBlank(value)) {
-    return ' '
+    return " ";
   } else {
-    return value
+    return value;
   }
-}
+};
 </script>
 
 <style scoped>

+ 95 - 90
src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/PrintCheckTable.vue

@@ -1,18 +1,31 @@
 <template>
   <div>
     <el-button v-if="showPrint" @click="printDirectly">打印</el-button>
-    <div ref="printRef" style="width:147mm;height:209mm">
+    <div ref="printRef" style="width: 147mm; height: 209mm">
       <div
-          style="background-color: white;
-          border:1px solid transparent;
-          width:100%;height:100%;font-size: 11pt;position: relative">
-        <div style="position:absolute; margin-top: 12pt">
-          <img ref="svgRef"/>
+        style="
+          background-color: white;
+          border: 1px solid transparent;
+          width: 100%;
+          height: 100%;
+          font-size: 11pt;
+          position: relative;
+        "
+      >
+        <div style="position: absolute; margin-top: 12pt">
+          <img ref="svgRef" />
         </div>
-        <div style="font-size: 20pt;text-align: center;font-weight:bold;margin-bottom: 6pt">
-          长沙泰和医院
+        <div
+          style="
+            font-size: 20pt;
+            text-align: center;
+            font-weight: bold;
+            margin-bottom: 6pt;
+          "
+        >
+          {{ env.VITE_HOSPITAL_NAME }}
         </div>
-        <div style="text-align: center;margin-top: 5pt">
+        <div style="text-align: center; margin-top: 5pt">
           {{ title }}
         </div>
 
@@ -20,13 +33,13 @@
           <tr>
             <td>病人身份:{{ patInfo.responceTypeName }}</td>
             <td>单号:{{ patInfo.reqNo }}</td>
-            <td>
-              急诊: {{ judgeWhetherItIsEmergency(patInfo.zFlag) }}
-            </td>
+            <td>急诊: {{ judgeWhetherItIsEmergency(patInfo.zFlag) }}</td>
           </tr>
         </table>
 
-        <div style="border-top: 0.75pt dashed black; border-bottom: 0;width: 100%">
+        <div
+          style="border-top: 0.75pt dashed black; border-bottom: 0; width: 100%"
+        >
           <table class="no_border">
             <tr>
               <td>住院号:{{ patInfo.inpatientNo }}</td>
@@ -38,28 +51,32 @@
 
             <tr>
               <td colspan="3">病人住址: {{ patInfo.homeStreet }}</td>
-              <td colspan="2" style="width: 90pt">联系电话:{{ patInfo.homeTel }}</td>
+              <td colspan="2" style="width: 90pt">
+                联系电话:{{ patInfo.homeTel }}
+              </td>
             </tr>
           </table>
-
         </div>
 
-        <table class="table_border" cellspacing=0>
+        <table class="table_border" cellspacing="0">
           <tr>
-            <td class="describe" style="border-right: 0;border-top: 0.75pt solid black">
-              <div style="height: 5px"/>
-              病史摘要<br>
-              申请检查<br>
+            <td
+              class="describe"
+              style="border-right: 0; border-top: 0.75pt solid black"
+            >
+              <div style="height: 5px" />
+              病史摘要<br />
+              申请检查<br />
               要求:
             </td>
-            <td style=" border-top: 0.75pt solid black">
+            <td style="border-top: 0.75pt solid black">
               {{ patInfo.reqComment }}
             </td>
           </tr>
 
           <tr>
             <td class="describe" style="border-right: 0">
-              <div style="height: 5px"/>
+              <div style="height: 5px" />
               体征
             </td>
             <td>
@@ -69,8 +86,8 @@
 
           <tr>
             <td class="describe" style="border-right: 0">
-              <div style="height: 5px"/>
-              相关辅检<br>
+              <div style="height: 5px" />
+              相关辅检<br />
               结果
             </td>
             <td>
@@ -80,7 +97,7 @@
 
           <tr>
             <td class="describe" style="border-right: 0">
-              <div style="height: 5px"/>
+              <div style="height: 5px" />
               临床诊断
             </td>
             <td>
@@ -90,8 +107,8 @@
 
           <tr>
             <td class="describe" style="border-right: 0">
-              <div style="height: 5px"/>
-              检查部位<br>
+              <div style="height: 5px" />
+              检查部位<br />
               及项目
             </td>
             <td>
@@ -103,36 +120,27 @@
           </tr>
 
           <tr>
-            <td class="describe" style="border-right: 0;height: 30pt">
-            </td>
+            <td class="describe" style="border-right: 0; height: 30pt"></td>
             <td>
               <table style="width: 100%">
                 <tr>
-                  <td style="border: 0">
-                    申请科室:{{ patInfo.reqDeptName }}
-                  </td>
+                  <td style="border: 0">申请科室:{{ patInfo.reqDeptName }}</td>
                   <td style="border: 0">
                     申请医生: {{ patInfo.reqDoctorName }}
                   </td>
                 </tr>
                 <tr>
-                  <td style="border: 0">
-                    申请日期:{{ patInfo.reqDate }}
-                  </td>
-                  <td style="border: 0">
-                    医师签字:
-                  </td>
+                  <td style="border: 0">申请日期:{{ patInfo.reqDate }}</td>
+                  <td style="border: 0">医师签字:</td>
                 </tr>
               </table>
             </td>
           </tr>
         </table>
         <div style="margin-left: 7.5pt; max-height: 187.5pt">
+          <div>注意事项:</div>
           <div>
-            注意事项:
-          </div>
-          <div>
-            <pre style="margin: 3.75pt 0 0;">{{ mattersNeedingAttention }}</pre>
+            <pre style="margin: 3.75pt 0 0">{{ mattersNeedingAttention }}</pre>
           </div>
         </div>
       </div>
@@ -141,83 +149,80 @@
 </template>
 
 <script setup>
-import {cptSex} from "@/utils/computed";
-import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
+import { cptSex } from "@/utils/computed";
+import { stringIsBlank, stringNotBlank } from "@/utils/blank-utils";
 import JsBarcode from "jsbarcode";
 import sleep from "@/utils/sleep";
-import {getLodop, initLodop} from "@/utils/c-lodop";
+import { getLodop, initLodop } from "@/utils/c-lodop";
+import env from "../../../../utils/setting.js";
 
-const {showPrint} = defineProps({
+const { showPrint } = defineProps({
   showPrint: {
     type: Boolean,
-    default: false
+    default: false,
+  },
+});
+
+const patInfo = ref({});
+const title = ref("检查申请单");
+const mattersNeedingAttention = ref("");
+
+const judgeWhetherItIsEmergency = val => {
+  if (stringIsBlank(val)) return;
+  if (val === "1") {
+    return "√";
   }
-})
+};
 
-const patInfo = ref({})
-const title = ref('检查申请单')
-const mattersNeedingAttention = ref('')
-
-const judgeWhetherItIsEmergency = (val) => {
-  if (stringIsBlank(val)) return
-  if (val === '1') {
-    return '√'
-  }
-}
-
-const svgRef = ref(null)
-const printRef = ref(null)
+const svgRef = ref(null);
+const printRef = ref(null);
 
 onMounted(() => {
-  initLodop()
-})
-
-const printClick = async (data) => {
-  fillData(data)
-  await nextTick()
-  await sleep(200)
-  printDirectly()
-}
+  initLodop();
+});
+
+const printClick = async data => {
+  fillData(data);
+  await nextTick();
+  await sleep(200);
+  printDirectly();
+};
 
 const printDirectly = () => {
-  let css = `@page {size: 147mm 209mm;margin:0; padding: 0} *{margin:0; padding: 0;box-sizing: border-box;} table{width:100%}table td{font-size:12pt}.no_border{border:0;width:100%}.table_border{width:100%}.table_border td{border:0.75pt solid #000;border-top:0;vertical-align:baseline}.describe{width:52.5pt;height:52.5pt;text-align:center;font-size:9pt} `
-  let html = `<style>${css}</style><body>${printRef.value.innerHTML}</body>`
+  let css = `@page {size: 147mm 209mm;margin:0; padding: 0} *{margin:0; padding: 0;box-sizing: border-box;} table{width:100%}table td{font-size:12pt}.no_border{border:0;width:100%}.table_border{width:100%}.table_border td{border:0.75pt solid #000;border-top:0;vertical-align:baseline}.describe{width:52.5pt;height:52.5pt;text-align:center;font-size:9pt} `;
+  let html = `<style>${css}</style><body>${printRef.value.innerHTML}</body>`;
   let LODOP = getLodop();
-  LODOP.PRINT_INIT('检查检验申请单');
-  LODOP.SET_PRINT_PAGESIZE(1, '148mm', '210mm', '');
-  LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width');
+  LODOP.PRINT_INIT("检查检验申请单");
+  LODOP.SET_PRINT_PAGESIZE(1, "148mm", "210mm", "");
+  LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Width");
   LODOP.SET_PRINT_MODE("PRINT_START_PAGE", 1);
   LODOP.SET_PRINT_MODE("PRINT_END_PAGE", 1);
-  LODOP.ADD_PRINT_HTM('1mm', '1mm', '100%', '100%', html)
+  LODOP.ADD_PRINT_HTM("1mm", "1mm", "100%", "100%", html);
   LODOP.PREVIEW();
-}
+};
 
-const fillData = (data) => {
-  patInfo.value = data.data
-  title.value = data.title
-  mattersNeedingAttention.value = data.mattersNeedingAttention
+const fillData = data => {
+  patInfo.value = data.data;
+  title.value = data.title;
+  mattersNeedingAttention.value = data.mattersNeedingAttention;
 
   JsBarcode(svgRef.value, patInfo.value.reqNo, {
-    lineColor: '#333',
+    lineColor: "#333",
     width: 2,
     height: 18,
     displayValue: false,
     margin: 0,
     fontSize: 12,
-  })
-}
-
+  });
+};
 
 defineExpose({
   printClick,
-  fillData
-})
-
-
+  fillData,
+});
 </script>
 
 <style scoped>
-
 @page {
   size: 148mm 210mm;
 }

+ 5 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/report-of-infectious-diseases/DialogDiseases.vue

@@ -417,7 +417,9 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="报告单位:"> 长沙泰和医院</el-form-item>
+              <el-form-item label="报告单位:">
+                {{ env.VITE_HOSPITAL_NAME }}</el-form-item
+              >
             </el-col>
             <el-col :span="12">
               <el-form-item label="退卡原因:" prop="cardRet">
@@ -648,6 +650,7 @@ import {
 import { xcMessage } from "@/utils/xiaochan-element-plus";
 import { ElMessageBox } from "element-plus";
 import { useUserStore } from "@/pinia/user-store";
+import env from "../../../../utils/setting.js";
 
 const props = defineProps({
   patNo: {
@@ -684,7 +687,7 @@ const setDefault = async () => {
   sheetData.value.times = props.times;
   sheetData.value.ageUnit = "岁";
   sheetData.value.reportDept = patInfo.admissWardCode;
-  sheetData.value.reportHospital = "长沙泰和医院";
+  sheetData.value.reportHospital = env.VITE_HOSPITAL_NAME;
 };
 
 const changesInInfectiousDiseases = val => {

+ 3 - 2
src/pinia/system-store.ts

@@ -3,6 +3,7 @@ import { useLocalStorage } from "@vueuse/core";
 import XEUtils from "xe-utils";
 // @ts-ignore
 import { setUserConfig } from "@/api/settings/user-settings";
+import env from "@/utils/setting";
 
 declare interface SystemAttr {
   theme: object;
@@ -45,8 +46,8 @@ export const useSystemStore = defineStore("system", {
       expandOneMenu: true, // 一次是否只能展开一个菜单
       unreadMessageCount: 0, // 未查看的消息数量
       systemMessages: [], // 已经看过的系统通知id
-      hospitalCode: "H43010500370",
-      systemName: "工作集成平台",
+      hospitalCode: env.VITE_HOSPITAL_CODE,
+      systemName: env.VITE_SYSTEM_NAME,
     }).value,
   getters: {
     getCollapse: (state): boolean => {

File diff suppressed because it is too large
+ 889 - 627
src/views/clinic/chronicDisease/ChronicDiseaseRegister.vue


File diff suppressed because it is too large
+ 961 - 536
src/views/clinic/mz-medical/MzMedicalMain.vue


+ 85 - 64
src/views/examination/BloodSugarQuery/BloodSugarQuery.vue

@@ -2,84 +2,105 @@
   <page-layer>
     <template #header>
       住院号:
-      <el-input style="width: 120px" v-model="patNo"/>
+      <el-input style="width: 120px" v-model="patNo" />
       住院次数:
-      <el-input-number v-model="times" :min="0"/>
+      <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"/>
+      <blood-sugar-table
+        ref="printDiv"
+        :data="tempData"
+        :page="page"
+        :patient-info="patientInfo"
+      />
     </template>
   </page-layer>
 </template>
 
 <script setup>
-import {
-  getPatientLoodSugar,
-} from "@/api/blood-sugar/query";
-import {getLodop, initLodop} from "@/utils/c-lodop";
+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, nullToEmpty} from "@/utils/public";
+import { isDev, nullToEmpty } from "@/utils/public";
 import BloodSugarTable from "@/views/examination/BloodSugarQuery/components/BloodSugarTable.vue";
 import Dig from "@/utils/math";
-
+import env from "@/utils/setting.js";
 
 const props = defineProps({
   patNo: String,
-  times: Number
-})
+  times: Number,
+});
 
-const patNo = ref('')
-const times = ref(0)
+const patNo = ref("");
+const times = ref(0);
 
 const page = reactive({
   total: 0,
   currentPage: 1,
   totalPage: 1,
   pageSize: 10,
-})
+});
 
-const data = ref([])
-const patientInfo = ref()
+const data = ref([]);
+const patientInfo = ref();
 
 const queryPatientSBloodSugarInformation = () => {
-  getPatientLoodSugar(patNo.value, times.value).then((res) => {
-    page.total = res.size
-    data.value = res.bloodSugarData
-    patientInfo.value = res.patientInfo
-    page.totalPage = Math.ceil(Dig.division(data.value.length, page.pageSize))
-  }).catch(() => {
-    page.total = 0
-    data.value = []
-    patientInfo.value = {}
-    page.totalPage = 0
-  })
-}
+  getPatientLoodSugar(patNo.value, times.value)
+    .then(res => {
+      page.total = res.size;
+      data.value = res.bloodSugarData;
+      patientInfo.value = res.patientInfo;
+      page.totalPage = Math.ceil(
+        Dig.division(data.value.length, page.pageSize)
+      );
+    })
+    .catch(() => {
+      page.total = 0;
+      data.value = [];
+      patientInfo.value = {};
+      page.totalPage = 0;
+    });
+};
 
 const inquire = () => {
-  queryPatientSBloodSugarInformation()
-}
-
+  queryPatientSBloodSugarInformation();
+};
 
 const tempData = computed(() => {
-  return data.value.slice((page.currentPage - 1) * page.pageSize, page.pageSize * page.currentPage);
-})
+  return data.value.slice(
+    (page.currentPage - 1) * page.pageSize,
+    page.pageSize * page.currentPage
+  );
+});
 
-const printDiv = ref(null)
-let thead = ["空腹", "早餐后", "中餐前", "中餐后", "晚餐前", "晚餐后", "零点", "三点", "随机血糖1", "随机血糖2", "随机血糖3"]
+const printDiv = ref(null);
+let thead = [
+  "空腹",
+  "早餐后",
+  "中餐前",
+  "中餐后",
+  "晚餐前",
+  "晚餐后",
+  "零点",
+  "三点",
+  "随机血糖1",
+  "随机血糖2",
+  "随机血糖3",
+];
 const htmlTd = (index, data) => {
-  return data[thead[index]]
-}
+  return data[thead[index]];
+};
 const print = () => {
-  let trStr = ''
+  let trStr = "";
   for (let i = 0, len = data.value.length; i < len; i++) {
-    let item = data.value[i]
-    let childStr = ``
+    let item = data.value[i];
+    let childStr = ``;
 
     for (let j = 0; j < 11; j++) {
-      let childItem = htmlTd(j, item.data)
+      let childItem = htmlTd(j, item.data);
       childStr += `
             <td>
              ${nullToEmpty(childItem?.formatTestTime)}
@@ -89,7 +110,7 @@ const print = () => {
             <td>
             ${nullToEmpty(childItem?.nurseIdName)}
             </td>
-            `
+            `;
     }
 
     trStr += `
@@ -97,13 +118,13 @@ const print = () => {
             <td>${item.date}</td>
             ${childStr}
         </tr>
-        `
+        `;
   }
   let a = `
 <table style="width: 100%;">
             <thead>
             <tr class="no_border">
-                <th colspan="23">长沙泰和医院</th>
+                <th colspan="23">${env.VITE_HOSPITAL_NAME}</th>
             </tr>
             <tr class="no_border">
                 <th colspan="3">
@@ -249,40 +270,38 @@ const print = () => {
                 </tr>
             </tfoot>
         </table>
- `
+ `;
   const LODOP = getLodop();
   LODOP.PRINT_INIT("血糖");
-  LODOP.SET_PRINT_PAGESIZE(2, '210mm', '297mm', '')
+  LODOP.SET_PRINT_PAGESIZE(2, "210mm", "297mm", "");
 
-  LODOP.SET_PRINT_MODE('RESELECT_PRINTER', true)
-  LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width')
-  LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1)
+  LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
+  LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Width");
+  LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);
 
-  const strStyle = "<style>.no_border th{border:0;}td{border:0.75pt solid #000;text-align:center;padding:0;}thead th{border:0.75pt solid #000;}tbody th{border:0.75pt solid #000;text-align:center;}table,tr,td{border-collapse:collapse;}</style>";
-  LODOP.ADD_PRINT_TABLE('2mm', '5mm', '100%', '100%', strStyle + a);
+  const strStyle =
+    "<style>.no_border th{border:0;}td{border:0.75pt solid #000;text-align:center;padding:0;}thead th{border:0.75pt solid #000;}tbody th{border:0.75pt solid #000;text-align:center;}table,tr,td{border-collapse:collapse;}</style>";
+  LODOP.ADD_PRINT_TABLE("2mm", "5mm", "100%", "100%", strStyle + a);
   LODOP.PREVIEW();
-}
-
+};
 
 onMounted(() => {
-  initLodop()
+  initLodop();
   if (props.patNo) {
     patNo.value = props.patNo;
-    times.value = props.times
-    queryPatientSBloodSugarInformation()
+    times.value = props.times;
+    queryPatientSBloodSugarInformation();
   }
-})
-
+});
 
 onActivated(() => {
-  let data = router.currentRoute.value.params
+  let data = router.currentRoute.value.params;
   if (data.patNo) {
     patNo.value = data.patNo;
-    times.value = parseInt(data.times)
-    queryPatientSBloodSugarInformation()
+    times.value = parseInt(data.times);
+    queryPatientSBloodSugarInformation();
   }
-})
-
+});
 </script>
 
 <style scoped lang="scss">
@@ -297,7 +316,9 @@ td {
   text-align: center;
 }
 
-table, tr, td {
+table,
+tr,
+td {
   border-collapse: collapse;
 }
 </style>

+ 87 - 83
src/views/examination/BloodSugarQuery/components/BloodSugarTable.vue

@@ -1,101 +1,103 @@
 <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>
+  <div style="width: 841.5pt; height: 594.75pt" ref="printDiv">
+    <table style="width: 100%; max-height: 594.75pt">
+      <thead>
+        <tr>
+          <th colspan="23">{{ env.VITE_HOSPITAL_NAME }}</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">
+          <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>
+        <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'>
+<script setup name="BloodSugarTable">
 import BloodSugarTd from "@/views/examination/BloodSugarQuery/components/BloodSugarTd.vue";
+import env from "../../../../utils/setting.js";
 
 const props = defineProps({
-    patientInfo: Object,
-    page: Object,
-    data: Array
-})
+  patientInfo: Object,
+  page: Object,
+  data: Array,
+});
 
-let thead = ["空腹", "早餐后", "中餐前", "中餐后", "晚餐前", "晚餐后", "零点", "三点", "随机血糖1", "随机血糖2", "随机血糖3"]
+let thead = [
+  "空腹",
+  "早餐后",
+  "中餐前",
+  "中餐后",
+  "晚餐前",
+  "晚餐后",
+  "零点",
+  "三点",
+  "随机血糖1",
+  "随机血糖2",
+  "随机血糖3",
+];
 
 const htmlTd = (index, data) => {
-    return data[thead[index]]
-}
+  return data[thead[index]];
+};
 
-const printDiv = ref(null)
+const printDiv = ref(null);
 
 const returnHtml = () => {
-    return printDiv.value.innerHTML
-}
-
+  return printDiv.value.innerHTML;
+};
 
 defineExpose({
-    returnHtml
-})
-
+  returnHtml,
+});
 </script>
 
 <style scoped lang="scss">
@@ -111,7 +113,9 @@ td {
   text-align: center;
 }
 
-table, tr, td {
+table,
+tr,
+td {
   border-collapse: collapse;
 }
 </style>

+ 229 - 185
src/views/examination/InspectionReportIndex.vue

@@ -2,59 +2,60 @@
   <div class="layout_container">
     <header class="round-header">
       <el-select
-          v-model="reportCategory"
-          @change="onCategoryChange"
-          style="width: 100px" >
+        v-model="reportCategory"
+        @change="onCategoryChange"
+        style="width: 100px"
+      >
         <el-option-group
-            v-for="group in reportTypes"
-            :key="group.label"
-            :label="group.label"
+          v-for="group in reportTypes"
+          :key="group.label"
+          :label="group.label"
         >
           <el-option
-              v-for="item in group.options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
+            v-for="item in group.options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
           ></el-option>
         </el-option-group>
       </el-select>
       <el-select v-model="patType" style="width: 80px">
         <el-option
-            v-for="item in patientTypes"
-            :key="item.code"
-            :value="item.code"
-            :label="item.name"
+          v-for="item in patientTypes"
+          :key="item.code"
+          :value="item.code"
+          :label="item.name"
         ></el-option>
       </el-select>
       <el-input
-          v-model="patNo"
-          clearable
-          :placeholder="placeHolder"
-          style="width: 120px"
+        v-model="patNo"
+        clearable
+        :placeholder="placeHolder"
+        style="width: 120px"
       ></el-input>
       <el-date-picker
-          v-model="datePeriod"
-          type="daterange"
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :shortcuts="shortcuts"
-          style="width: 260px"
+        v-model="datePeriod"
+        type="daterange"
+        range-separator="至"
+        start-placeholder="开始日期"
+        end-placeholder="结束日期"
+        :shortcuts="shortcuts"
+        style="width: 260px"
       ></el-date-picker>
       <el-button
-          type="primary"
-          icon="Search"
-          @click="queryIndex"
-          :disabled="inPrintProcess"
-          style="margin-left: 20px"
+        type="primary"
+        icon="Search"
+        @click="queryIndex"
+        :disabled="inPrintProcess"
+        style="margin-left: 20px"
       >
         查询
       </el-button>
       <el-button
-          type="primary"
-          icon="Printer"
-          :disabled="inPrintProcess"
-          @click="beforePrint"
+        type="primary"
+        icon="Printer"
+        :disabled="inPrintProcess"
+        @click="beforePrint"
       >
         打印
       </el-button>
@@ -62,26 +63,53 @@
     <div class="layout_main layout_container layout-horizontal">
       <aside class="layout_el-table">
         <el-table
-            ref="tableRef"
-            :data="inspectionIndex"
-            stripe highlight-current-row
-            @row-click="beforeQueryDetail"
+          ref="tableRef"
+          :data="inspectionIndex"
+          stripe
+          highlight-current-row
+          @row-click="beforeQueryDetail"
         >
-          <el-table-column v-if="reportCategory === 'JY' " type="selection" width="30"></el-table-column>
-          <el-table-column prop="trscDate" label="报告时间" width="130"></el-table-column>
-          <el-table-column prop="examPurpose" label="检验名称" width="170"></el-table-column>
-          <el-table-column v-if="reportCategory === 'JY'" prop="reportType" label="报告类别" width="70"></el-table-column>
+          <el-table-column
+            v-if="reportCategory === 'JY'"
+            type="selection"
+            width="30"
+          ></el-table-column>
+          <el-table-column
+            prop="trscDate"
+            label="报告时间"
+            width="130"
+          ></el-table-column>
+          <el-table-column
+            prop="examPurpose"
+            label="检验名称"
+            width="170"
+          ></el-table-column>
+          <el-table-column
+            v-if="reportCategory === 'JY'"
+            prop="reportType"
+            label="报告类别"
+            width="70"
+          ></el-table-column>
         </el-table>
       </aside>
       <div
-          id="reportDetail"
-          class="layout_main"
-          style="position: relative; width: 90%;
-           min-height: 96%; padding: 0 30px;
-           background-color: white; overflow-y: auto"
+        id="reportDetail"
+        class="layout_main"
+        style="
+          position: relative;
+          width: 90%;
+          min-height: 96%;
+          padding: 0 30px;
+          background-color: white;
+          overflow-y: auto;
+        "
       >
         <div v-if="reportCategory === 'JY'" style="height: 98%">
-          <div v-for="(jyData, index) in jyDataList" :id="'jyData'+index" style="height: 100%">
+          <div
+            v-for="(jyData, index) in jyDataList"
+            :id="'jyData' + index"
+            style="height: 100%"
+          >
             <JyResult :data="jyData" />
           </div>
         </div>
@@ -90,8 +118,16 @@
             <el-image :src="jcbg.reportUrl"></el-image>
           </div>
           <div v-else>
-            <h3 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 30px">
-              长沙泰和医院检查报告单
+            <h3
+              style="
+                width: 100%;
+                text-align: center;
+                font-weight: bold;
+                height: 30px;
+                line-height: 30px;
+              "
+            >
+              {{ env.VITE_HOSPITAL_NAME }}检查报告单
             </h3>
             <div style="display: flex">
               <div style="width: 32%">姓名:{{ jcbg.patientName }}</div>
@@ -114,12 +150,13 @@
             <el-divider content-position="left">检查结论</el-divider>
             <div v-html="jcbg.examinationreSult"></div>
             <div v-if="jcbg.reportUrl" style="margin-top: 30px">
-              <el-button type="primary" size="large" link @click="showJcImage">查看图像</el-button>
+              <el-button type="primary" size="large" link @click="showJcImage"
+                >查看图像</el-button
+              >
             </div>
           </div>
-
         </div>
-        <div v-if="reportCategory === 'BL' || reportCategory === 'XD'" >
+        <div v-if="reportCategory === 'BL' || reportCategory === 'XD'">
           <el-image :src="blxdUrl" style="width: 100%" fit="contain" />
         </div>
       </div>
@@ -128,179 +165,186 @@
 </template>
 
 <script setup>
-import {computed, onActivated, ref, onMounted} from 'vue'
-import {shortcuts} from '@/data/shortcuts'
-import {checkExamDetail, checkIndexByCategory, checkTestDetail} from '@/api/inspections'
-import router from '@/router'
-import {ElMessage} from 'element-plus'
-import {initLodop, getLodop} from '@/utils/c-lodop'
-import {getDateRangeFormatDate} from "@/utils/date";
+import { computed, onActivated, ref, onMounted } from "vue";
+import { shortcuts } from "@/data/shortcuts";
+import {
+  checkExamDetail,
+  checkIndexByCategory,
+  checkTestDetail,
+} from "@/api/inspections";
+import router from "@/router";
+import { ElMessage } from "element-plus";
+import { initLodop, getLodop } from "@/utils/c-lodop";
+import { getDateRangeFormatDate } from "@/utils/date";
 import Sleep from "@/utils/sleep";
 import JyResult from "@/views/examination/component/JyResult.vue";
+import env from "../../utils/setting.js";
 
 const props = defineProps({
   patNo: {
     type: String,
-    default: null
+    default: null,
   },
   start: {
-    type: String
+    type: String,
   },
   end: {
-    type: String
-  }
-})
-const tableRef = ref(null)
-const patType = ref('InPatient')
-const reportCategory = ref('JY')
-const patNo = ref(null)
-const datePeriod = ref([])
+    type: String,
+  },
+});
+const tableRef = ref(null);
+const patType = ref("InPatient");
+const reportCategory = ref("JY");
+const patNo = ref(null);
+const datePeriod = ref([]);
 const placeHolder = computed(() => {
-  return '请输入' + ptntType.value
-})
+  return "请输入" + ptntType.value;
+});
 const ptntType = computed(() => {
-  if (patType.value === 'InPatient') {
-    return '住院号'
-  } else if (patType.value === 'OutPatient') {
-    return '门诊号'
+  if (patType.value === "InPatient") {
+    return "住院号";
+  } else if (patType.value === "OutPatient") {
+    return "门诊号";
   }
-  return ''
-})
+  return "";
+});
 
-const jyDataList = ref([])
+const jyDataList = ref([]);
+
+const inspectionIndex = ref([]);
 
-const inspectionIndex = ref([])
 function onCategoryChange(val) {
-  inspectionIndex.value = []
+  inspectionIndex.value = [];
 }
 
 const queryIndex = () => {
   if (!patNo.value) {
     ElMessage({
-      message: '请输入患者' + ptntType.value + '。',
-      type: 'warning',
+      message: "请输入患者" + ptntType.value + "。",
+      type: "warning",
       duration: 2000,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
   if (!datePeriod.value || datePeriod.value.length < 2) {
     ElMessage({
-      message: '请选择日期范围。',
-      type: 'warning',
+      message: "请选择日期范围。",
+      type: "warning",
       duration: 2000,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
-  let {startTime, endTime} = getDateRangeFormatDate(datePeriod.value)
+  let { startTime, endTime } = getDateRangeFormatDate(datePeriod.value);
   const params = {
     patType: patType.value,
     reportCategory: reportCategory.value,
     patNo: patNo.value,
     reqStartTime: startTime,
     reqEndTime: endTime,
-  }
-  checkIndexByCategory(params).then((res) => {
-    inspectionIndex.value = res
-  })
-}
+  };
+  checkIndexByCategory(params).then(res => {
+    inspectionIndex.value = res;
+  });
+};
 
-const blxdUrl = ref('')
+const blxdUrl = ref("");
 
 function beforeQueryDetail(row) {
-  if (reportCategory.value === 'JY') {
-    queryJyDetail(row, true)
-  } else if (reportCategory.value === 'JC') {
+  if (reportCategory.value === "JY") {
+    queryJyDetail(row, true);
+  } else if (reportCategory.value === "JC") {
     queryJcDetail(row);
   } else {
-    blxdUrl.value = row.reportUrl
+    blxdUrl.value = row.reportUrl;
   }
 }
 
 const jcbg = ref({
-  examPurpose: ''
-})
+  examPurpose: "",
+});
+
 function queryJcDetail(row) {
   checkTestDetail({
-    reportId: row.patientUid
+    reportId: row.patientUid,
   }).then(res => {
-    jcbg.value = res
-  })
+    jcbg.value = res;
+  });
 }
 
 const queryJyDetail = (row, clear) => {
   if (clear) {
-    jyDataList.value = []
+    jyDataList.value = [];
   }
   return new Promise((resolve, reject) => {
     checkExamDetail({
-      reportId: row.reportId
-    }).then((res) => {
-      const bacterias = []
+      reportId: row.reportId,
+    }).then(res => {
+      const bacterias = [];
       if (res.bacterias && res.bacterias.length > 0) {
         res.bacterias.forEach(bac => {
-          const bacSize = bac.antiList ? Math.ceil(bac.antiList.length / 2) : 1
+          const bacSize = bac.antiList ? Math.ceil(bac.antiList.length / 2) : 1;
           const tempBacResult = {
             halfBacSize: bacSize,
             germName: bac.bacNameCn,
             antiList: bac.antiList,
-            type: bac.itmName
-          }
-          bacterias.push(tempBacResult)
-        })
+            type: bac.itmName,
+          };
+          bacterias.push(tempBacResult);
+        });
       }
       const tempJyData = {
         inspectionDetail: {
           order: res.order,
-          items: res.items
+          items: res.items,
         },
         bacterias: bacterias,
         halfSize: Math.ceil(res.items.length / 2),
         ptntType: ptntType.value,
         reportType: row.reportType,
-      }
-      jyDataList.value.push(tempJyData)
-      resolve()
-    })
+      };
+      jyDataList.value.push(tempJyData);
+      resolve();
+    });
   });
-}
+};
 
-const inPrintProcess = ref(false)
+const inPrintProcess = ref(false);
 const beforePrint = async () => {
-  inPrintProcess.value = true
-  const selection = tableRef.value.getSelectionRows()
+  inPrintProcess.value = true;
+  const selection = tableRef.value.getSelectionRows();
   if (selection && selection.length > 0) {
-    jyDataList.value = []
-    for (let i = 0; i<selection.length; i++) {
-      await queryJyDetail(selection[i], false)
-      await Sleep(1000)
+    jyDataList.value = [];
+    for (let i = 0; i < selection.length; i++) {
+      await queryJyDetail(selection[i], false);
+      await Sleep(1000);
     }
-    await doPrint()
-    inPrintProcess.value = false
+    await doPrint();
+    inPrintProcess.value = false;
   } else {
-    await doPrint()
-    inPrintProcess.value = false
+    await doPrint();
+    inPrintProcess.value = false;
   }
-}
+};
 
 onMounted(() => {
-  initLodop()
-  const vueName = router.currentRoute.value.name
-  if (vueName === 'inspectionReportV2') {
-    checkPathParams()
+  initLodop();
+  const vueName = router.currentRoute.value.name;
+  if (vueName === "inspectionReportV2") {
+    checkPathParams();
   } else {
-    checkPropsParams()
+    checkPropsParams();
   }
-})
+});
 
 onActivated(() => {
-  checkPathParams()
-})
+  checkPathParams();
+});
 
 function checkPropsParams() {
   if (props.patNo && props.start && props.end) {
-    patType.value = 'InPatient';
+    patType.value = "InPatient";
     patNo.value = props.patNo;
     datePeriod.value[0] = props.start;
     datePeriod.value[1] = props.end;
@@ -309,76 +353,76 @@ function checkPropsParams() {
 }
 
 function checkPathParams() {
-  const params = router.currentRoute.value.params
+  const params = router.currentRoute.value.params;
   if (params.patNo && params.start && params.end) {
-    patType.value = params.patNo.indexOf('-') === -1 ?
-        'InPatient' : 'OutPatient'
-    patNo.value = params.patNo
-    datePeriod.value[0] = params.start
-    datePeriod.value[1] = params.end
-    queryIndex()
+    patType.value =
+      params.patNo.indexOf("-") === -1 ? "InPatient" : "OutPatient";
+    patNo.value = params.patNo;
+    datePeriod.value[0] = params.start;
+    datePeriod.value[1] = params.end;
+    queryIndex();
   }
 }
 
 function doPrint() {
-  return new Promise((resolve) => {
-    const LODOP = getLodop()
-    LODOP.PRINT_INIT('jyjc')
-    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) //宽度溢出缩放
-    if (reportCategory.value === 'JY') {
-      LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A5');
+  return new Promise(resolve => {
+    const LODOP = getLodop();
+    LODOP.PRINT_INIT("jyjc");
+    LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); //宽度溢出缩放
+    if (reportCategory.value === "JY") {
+      LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "A5");
       for (let i = 0; i < jyDataList.value.length; i++) {
         const printarea = document.getElementById("jyData" + i).innerHTML;
-        LODOP.ADD_PRINT_HTM(0, 0, '208mm', '146mm', printarea);
-        LODOP.NEWPAGE()
+        LODOP.ADD_PRINT_HTM(0, 0, "208mm", "146mm", printarea);
+        LODOP.NEWPAGE();
       }
     } else {
-      const ori = reportCategory.value === 'XD' ? 2 : 1
-      LODOP.SET_PRINT_PAGESIZE(ori, '210mm', '267mm', 'CreateCustomPage');
-      const imgUrl = reportCategory.value === 'JC' ?
-          jcbg.value.reportUrl : blxdUrl.value
-      LODOP.ADD_PRINT_IMAGE(0, 0, '210mm', '267mm', imgUrl)
-      LODOP.SET_PRINT_STYLEA(0,"Horient",3);
-      LODOP.SET_PRINT_STYLEA(0,"Vorient",3);
-      LODOP.SET_PRINT_STYLEA(0,"Stretch",1);
+      const ori = reportCategory.value === "XD" ? 2 : 1;
+      LODOP.SET_PRINT_PAGESIZE(ori, "210mm", "267mm", "CreateCustomPage");
+      const imgUrl =
+        reportCategory.value === "JC" ? jcbg.value.reportUrl : blxdUrl.value;
+      LODOP.ADD_PRINT_IMAGE(0, 0, "210mm", "267mm", imgUrl);
+      LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
+      LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
+      LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
     }
-    LODOP.PREVIEW()
-    resolve()
-  })
+    LODOP.PREVIEW();
+    resolve();
+  });
 }
 
 const patientTypes = [
-  {code: 'InPatient', name: '住院号'},
-  {code: 'OutPatient', name: '门诊号'},
-]
+  { code: "InPatient", name: "住院号" },
+  { code: "OutPatient", name: "门诊号" },
+];
 
 const reportTypes = [
   {
-    label: '检验',
+    label: "检验",
     options: [
       {
-        label: '检验报告',
-        value: 'JY',
-      }
-    ]
+        label: "检验报告",
+        value: "JY",
+      },
+    ],
   },
   {
-    label: '检查',
+    label: "检查",
     options: [
       {
-        label: '检查报告',
-        value: 'JC',
+        label: "检查报告",
+        value: "JC",
       },
       {
-        label: '病理报告',
-        value: 'BL',
+        label: "病理报告",
+        value: "BL",
       },
 
       {
-        label: '心电报告',
-        value: 'XD',
+        label: "心电报告",
+        value: "XD",
       },
-    ]
-  }
-]
+    ],
+  },
+];
 </script>

+ 275 - 92
src/views/examination/TjReportInfo.vue

@@ -1,32 +1,82 @@
 <template>
   <page-layer>
     <template #header>
-      <el-input v-model="tjid" style="width: 260px" clearable placeholder="请输入患者体检编号"><template #prepend>体检号</template>
+      <el-input
+        v-model="tjid"
+        style="width: 260px"
+        clearable
+        placeholder="请输入患者体检编号"
+      >
+        <template #prepend>体检号</template>
       </el-input>
-      <el-button type="primary" icon="Search" style="margin-left: 16px" @click="queryTjData">查询</el-button>
+      <el-button
+        type="primary"
+        icon="Search"
+        style="margin-left: 16px"
+        @click="queryTjData"
+        >查询
+      </el-button>
     </template>
     <template #aside>
-      <el-table :data="inspectionIndex" :height="tableHeight" stripe highlight-current-row @row-click="queryDetail">
-        <el-table-column prop="time" label="报告日期" width="140"></el-table-column>
+      <el-table
+        :data="inspectionIndex"
+        :height="tableHeight"
+        stripe
+        highlight-current-row
+        @row-click="queryDetail"
+      >
+        <el-table-column
+          prop="time"
+          label="报告日期"
+          width="140"
+        ></el-table-column>
         <el-table-column prop="name" label="报告内容"></el-table-column>
       </el-table>
     </template>
     <template #main>
-      <div id="reportDetail" style="width: 100%; height: 100%; padding: 0 2px; background-color: white">
+      <div
+        id="reportDetail"
+        style="
+          width: 100%;
+          height: 100%;
+          padding: 0 2px;
+          background-color: white;
+        "
+      >
         <div v-if="tjxm === '首页'">
           <div style="text-align: right; height: 77px; margin-bottom: 20px">
             <svg id="barcode" v-if="tjid"></svg>
           </div>
           <div style="text-align: right; margin-bottom: 200px">
-            <h1 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 30px">
-              长&emsp;沙&emsp;泰&emsp;和&emsp;医&emsp;院</h1>
-            <h1 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 30px">
-              体&emsp;检&emsp;报&emsp;告</h1>
+            <h1
+              style="
+                width: 100%;
+                text-align: center;
+                font-weight: bold;
+                height: 30px;
+                line-height: 30px;
+              "
+            >
+              长&emsp;沙&emsp;泰&emsp;和&emsp;医&emsp;院
+            </h1>
+            <h1
+              style="
+                width: 100%;
+                text-align: center;
+                font-weight: bold;
+                height: 30px;
+                line-height: 30px;
+              "
+            >
+              体&emsp;检&emsp;报&emsp;告
+            </h1>
           </div>
           <div style="width: 100%; font-size: 18px">
             <el-row :gutter="6">
               <el-col :span="6"></el-col>
-              <el-col :span="6">体检编号:{{ tjReportDetail.reportHeader.条码号 }}</el-col>
+              <el-col :span="6"
+                >体检编号:{{ tjReportDetail.reportHeader.条码号 }}
+              </el-col>
               <el-col :span="6">
                 <el-checkbox-group v-model="checkboxList">
                   <el-checkbox label="个人"></el-checkbox>
@@ -37,60 +87,125 @@
             </el-row>
             <el-row :gutter="6" style="margin-bottom: 8px">
               <el-col :span="6"></el-col>
-              <el-col :span="6">姓&emsp;&emsp;名:{{ tjReportDetail.reportHeader.姓名 }}</el-col>
-              <el-col :span="6">性&emsp;&emsp;别:{{ filterSex(tjReportDetail.reportHeader.性别) }}</el-col>
-              <el-col :span="6">年&emsp;&emsp;龄:{{ tjReportDetail.reportHeader.年龄 }}</el-col>
+              <el-col :span="6"
+                >姓&emsp;&emsp;名:{{ tjReportDetail.reportHeader.姓名 }}
+              </el-col>
+              <el-col :span="6"
+                >性&emsp;&emsp;别:{{
+                  filterSex(tjReportDetail.reportHeader.性别)
+                }}
+              </el-col>
+              <el-col :span="6"
+                >年&emsp;&emsp;龄:{{ tjReportDetail.reportHeader.年龄 }}
+              </el-col>
               <!-- <el-col :span="6"></el-col> -->
             </el-row>
             <el-row :gutter="6" style="margin-bottom: 8px">
               <el-col :span="6"></el-col>
-              <el-col :span="12">单&emsp;&emsp;位:{{ tjReportDetail.reportHeader.工作单位 }}</el-col>
+              <el-col :span="12"
+                >单&emsp;&emsp;位:{{ tjReportDetail.reportHeader.工作单位 }}
+              </el-col>
               <el-col :span="6"></el-col>
             </el-row>
             <el-row :gutter="6" style="margin-bottom: 8px">
               <el-col :span="6"></el-col>
-              <el-col :span="12">部&emsp;&emsp;门:{{ tjReportDetail.reportHeader.所在部门 }}</el-col>
+              <el-col :span="12"
+                >部&emsp;&emsp;门:{{ tjReportDetail.reportHeader.所在部门 }}
+              </el-col>
               <el-col :span="6"></el-col>
             </el-row>
             <el-row :gutter="6" style="margin-bottom: 160px">
               <el-col :span="6"></el-col>
-              <el-col :span="6">体检日期:{{ tjReportDetail.reportHeader.登记日期 }}</el-col>
-              <el-col :span="6">电&emsp;&emsp;话:{{ tjReportDetail.reportHeader.手机 }}</el-col>
+              <el-col :span="6"
+                >体检日期:{{ tjReportDetail.reportHeader.登记日期 }}
+              </el-col>
+              <el-col :span="6"
+                >电&emsp;&emsp;话:{{ tjReportDetail.reportHeader.手机 }}
+              </el-col>
               <el-col :span="6"></el-col>
             </el-row>
             <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-            <h5 style="width: 100%; text-align: center; height: 5px; line-height: 5px">长沙泰和医院</h5>
-            <h5 style="width: 100%; text-align: center; height: 5px; line-height: 5px">咨询电话:0731-88518508</h5>
-            <h4 style="width: 100%; text-align: center; font-weight: bold; height: 5px; line-height: 5px">
-              本体检报告仅供临床参考,不作为诊断依据,谢谢你的光临!</h4>
+            <h5
+              style="
+                width: 100%;
+                text-align: center;
+                height: 5px;
+                line-height: 5px;
+              "
+            >
+              {{ env.VITE_HOSPITAL_NAME }}
+            </h5>
+            <h5
+              style="
+                width: 100%;
+                text-align: center;
+                height: 5px;
+                line-height: 5px;
+              "
+            >
+              咨询电话:0731-88518508
+            </h5>
+            <h4
+              style="
+                width: 100%;
+                text-align: center;
+                font-weight: bold;
+                height: 5px;
+                line-height: 5px;
+              "
+            >
+              本体检报告仅供临床参考,不作为诊断依据,谢谢你的光临!
+            </h4>
           </div>
         </div>
         <div v-else-if="tjxm === '体检总结'">
           <el-row :gutter="6" style="text-align: center; padding-top: 10px">
-            <el-col :span="6">条码号:{{ tjReportDetail.reportSummary.条码 }}</el-col>
-            <el-col :span="6">姓名:{{ tjReportDetail.reportHeader.姓名 }}</el-col>
-            <el-col :span="6">年龄:{{ tjReportDetail.reportHeader.年龄 }}</el-col>
-            <el-col :span="6">日期:{{ filterDate(tjReportDetail.reportSummary.汇总日期) }}</el-col>
+            <el-col :span="6"
+              >条码号:{{ tjReportDetail.reportSummary.条码 }}
+            </el-col>
+            <el-col :span="6"
+              >姓名:{{ tjReportDetail.reportHeader.姓名 }}
+            </el-col>
+            <el-col :span="6"
+              >年龄:{{ tjReportDetail.reportHeader.年龄 }}
+            </el-col>
+            <el-col :span="6"
+              >日期:{{ filterDate(tjReportDetail.reportSummary.汇总日期) }}
+            </el-col>
           </el-row>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-          <el-row :gutter="6" style="padding-bottom: 6px; margin: 0 20px 0 20px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 6px; margin: 0 20px 0 20px"
+          >
             <span style="font-weight: bold">
               尊敬的用户:<br />
-              &emsp;&emsp;您好! 欢迎您莅临长沙泰和医院体检中心。身体健康是学习和工作的基础,注意健康是生活和事业发展的必须。世界卫生组织(WHO)提出:“健康是人的生
+              &emsp;&emsp;您好! 欢迎您莅临{{
+                env.VITE_HOSPITAL_NAME
+              }}体检中心。身体健康是学习和工作的基础,注意健康是生活和事业发展的必须。世界卫生组织(WHO)提出:“健康是人的生
               理、心里和社会的完美状态,而不仅仅是指无疾病或非体弱的状态”。通过体检,检查和发现影响健康的有关因素,成为促进您身心健康的重要措施和保证。为了
               您的健康,我们真诚的建议您定期进行健康体检。
             </span>
           </el-row>
-          <el-row :gutter="6" style="padding-bottom: 6px; margin: 0 20px 0 20px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 6px; margin: 0 20px 0 20px"
+          >
             <span style="font-weight: bold"> 祝您身体健康,工作顺利! </span>
           </el-row>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-          <el-row :gutter="6" style="padding-bottom: 12px; margin: 0 20px 0 20px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 12px; margin: 0 20px 0 20px"
+          >
             <div>
               <span style="font-size: 16px"><b>一丶体检结论及健康建议</b></span>
             </div>
           </el-row>
-          <el-row :gutter="6" style="padding-bottom: 2px; margin: 0 20px 0 40px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 2px; margin: 0 20px 0 40px"
+          >
             <el-col :span="24">
               <span style="font-size: 12px; font-weight: bold">
                 <p v-html="tjReportDetail.reportSummary.汇总建议"></p>
@@ -100,29 +215,62 @@
           <el-row :gutter="6" style="margin: 0 20px 0 20px">
             <el-col :span="6"></el-col>
             <el-col :span="6"></el-col>
-            <el-col :span="6"><span style="font-size: 18px"><b>汇总:{{ tjReportDetail.reportSummary.汇总医生 }}</b></span>
+            <el-col :span="6"
+              ><span style="font-size: 18px"
+                ><b>汇总:{{ tjReportDetail.reportSummary.汇总医生 }}</b></span
+              >
             </el-col>
-            <el-col :span="6"><span style="font-size: 18px"><b>主检:{{ tjReportDetail.reportSummary.审核医生 }}</b></span>
+            <el-col :span="6"
+              ><span style="font-size: 18px"
+                ><b>主检:{{ tjReportDetail.reportSummary.审核医生 }}</b></span
+              >
             </el-col>
           </el-row>
         </div>
         <div v-else>
           <el-row :gutter="6" style="text-align: center; padding-top: 10px">
-            <el-col :span="6">条码号:{{ tjReportDetail.reportSummary.条码 }}</el-col>
-            <el-col :span="6">姓名:{{ tjReportDetail.reportHeader.姓名 }}</el-col>
-            <el-col :span="6">年龄:{{ tjReportDetail.reportHeader.年龄 }}</el-col>
-            <el-col :span="6">日期:{{ filterDate(tjReportDetail.reportSummary.汇总日期) }}</el-col>
+            <el-col :span="6"
+              >条码号:{{ tjReportDetail.reportSummary.条码 }}
+            </el-col>
+            <el-col :span="6"
+              >姓名:{{ tjReportDetail.reportHeader.姓名 }}
+            </el-col>
+            <el-col :span="6"
+              >年龄:{{ tjReportDetail.reportHeader.年龄 }}
+            </el-col>
+            <el-col :span="6"
+              >日期:{{ filterDate(tjReportDetail.reportSummary.汇总日期) }}
+            </el-col>
           </el-row>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-          <el-row :gutter="6" style="padding-bottom: 2px; margin: 0 20px 0 20px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 2px; margin: 0 20px 0 20px"
+          >
             <div style="text-align: center">
               <h2>{{ tjxm }}</h2>
             </div>
           </el-row>
-          <el-row :gutter="6" style="padding-bottom: 8px; margin: 0 20px 0 20px">
-            <el-table :data="inspectionItems.slice(pageSize * (currentPage - 1), pageSize * currentPage)"
-              :height="tableHeight1" stripe highlight-current-row>
-              <el-table-column prop="no" label="序号" width="70px"></el-table-column>
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 8px; margin: 0 20px 0 20px"
+          >
+            <el-table
+              :data="
+                inspectionItems.slice(
+                  pageSize * (currentPage - 1),
+                  pageSize * currentPage
+                )
+              "
+              :height="tableHeight1"
+              stripe
+              highlight-current-row
+            >
+              <el-table-column
+                prop="no"
+                label="序号"
+                width="70px"
+              ></el-table-column>
               <el-table-column prop="item" label="体检项目"></el-table-column>
               <el-table-column label="体检结果">
                 <template #default="scope">
@@ -133,26 +281,48 @@
                 </template>
               </el-table-column>
               <el-table-column prop="unit" label="单位"></el-table-column>
-              <el-table-column prop="norm" label="参考值或范围"></el-table-column>
+              <el-table-column
+                prop="norm"
+                label="参考值或范围"
+              ></el-table-column>
             </el-table>
-            <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[15, 30, 45, 60]"
-              :total="inspectionItems.length" layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
-              @size-change="handleSizeChange" @current-change="handleCurrentChange">
+            <el-pagination
+              :current-page="currentPage"
+              :page-size="pageSize"
+              :page-sizes="[15, 30, 45, 60]"
+              :total="inspectionItems.length"
+              layout="total, sizes, prev, pager, next, jumper"
+              style="margin-top: 5px"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+            >
             </el-pagination>
           </el-row>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-          <el-row :gutter="6" style="padding-bottom: 2px; margin: 0 20px 0 20px" v-if="itemResult.诊断内容">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 2px; margin: 0 20px 0 20px"
+            v-if="itemResult.诊断内容"
+          >
             <h3>
-              科室小结:<span style="color: blue">{{ itemResult.诊断内容 }}</span>
+              科室小结:<span style="color: blue">{{
+                itemResult.诊断内容
+              }}</span>
             </h3>
           </el-row>
-          <el-row :gutter="6" style="padding-bottom: 2px; margin: 0 20px 0 20px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 2px; margin: 0 20px 0 20px"
+          >
             <el-col :span="6"></el-col>
             <el-col :span="6"></el-col>
             <el-col :span="6">检验:{{ itemResult.检查医生签名 }}</el-col>
             <el-col :span="6">审核:{{ itemResult.审核医生签名 }}</el-col>
           </el-row>
-          <el-row :gutter="6" style="padding-bottom: 2px; margin: 0 20px 0 20px">
+          <el-row
+            :gutter="6"
+            style="padding-bottom: 2px; margin: 0 20px 0 20px"
+          >
             <h5>注:此检验报告只对本次标本负责,如有疑问请七日内复查。</h5>
           </el-row>
         </div>
@@ -161,12 +331,19 @@
   </page-layer>
 </template>
 <script>
-import { reactive, ref, onMounted } from 'vue'
-import { getTjReportData } from '@/api/tj-report/tj-report'
-import JsBarcode from 'jsbarcode'
-import { ElMessage } from 'element-plus'
-import PageLayer from '@/layout/PageLayer.vue'
+import { reactive, ref, onMounted } from "vue";
+import { getTjReportData } from "@/api/tj-report/tj-report";
+import JsBarcode from "jsbarcode";
+import { ElMessage } from "element-plus";
+import PageLayer from "@/layout/PageLayer.vue";
+import env from "../../utils/setting.js";
+
 export default {
+  computed: {
+    env() {
+      return env;
+    },
+  },
   setup() {
     const tableHeight = window.innerHeight / 1.02;
     const tableHeight1 = window.innerHeight - 360;
@@ -179,10 +356,10 @@ export default {
     const checkboxList = ref([]);
     const pageSize = ref(30);
     const currentPage = ref(1);
-    const handleSizeChange = (val) => {
+    const handleSizeChange = val => {
       pageSize.value = val;
     };
-    const handleCurrentChange = (val) => {
+    const handleCurrentChange = val => {
       currentPage.value = val;
     };
     const tjReportDetail = reactive({
@@ -193,7 +370,7 @@ export default {
     onMounted(() => {
       inspectionIndex.value = [{ name: "首页" }, { name: "体检总结" }];
     });
-    const queryDetail = (row) => {
+    const queryDetail = row => {
       let item = row.name;
       tjxm.value = item;
       if (tjxm.value && item === "首页") {
@@ -205,8 +382,7 @@ export default {
             displayValue: true, //是否显示文字信息
           });
         });
-      }
-      else if (item != "首页" && item != "体检总结") {
+      } else if (item != "首页" && item != "体检总结") {
         let items = [];
         inspectionItems.value = [];
         for (let i = 0; i < tjReportDetail.reportItems.length; i++) {
@@ -225,7 +401,14 @@ export default {
             if (!items[i]["结果"]) {
               continue;
             }
-            let _item = { no: "", item: "", result: "", unit: "", norm: "", diffset: "" };
+            let _item = {
+              no: "",
+              item: "",
+              result: "",
+              unit: "",
+              norm: "",
+              diffset: "",
+            };
             _item.no = no;
             _item.item = items[i]["检查项目"];
             _item.result = items[i]["结果"];
@@ -261,7 +444,7 @@ export default {
         tjid: tjid.value,
       };
       getTjReportData(param)
-        .then((res) => {
+        .then(res => {
           if (!res || res.length == 0) {
             ElMessage({
               message: "没有体检报告数据",
@@ -275,14 +458,13 @@ export default {
           for (const key in res) {
             if (res[key].reportHeader) {
               tjReportDetail.reportHeader = res[key].reportHeader;
-            }
-            else if (res[key].reportItems) {
-              inspectionIndex.value = inspectionIndex.value.concat(res[key].reportItems);
-            }
-            else if (res[key].reportSummary) {
+            } else if (res[key].reportItems) {
+              inspectionIndex.value = inspectionIndex.value.concat(
+                res[key].reportItems
+              );
+            } else if (res[key].reportSummary) {
               tjReportDetail.reportSummary = res[key].reportSummary;
-            }
-            else {
+            } else {
               tjReportDetail.reportItems.push(res[key]);
             }
           }
@@ -290,15 +472,13 @@ export default {
           tjid.value = tjReportDetail.reportHeader.条码号;
           if (tjReportDetail.reportHeader.团体or个人 === "0") {
             checkboxList.value = ["团体"];
-          }
-          else if (tjReportDetail.reportHeader.团体or个人 === "1") {
+          } else if (tjReportDetail.reportHeader.团体or个人 === "1") {
             checkboxList.value = ["个人"];
-          }
-          else {
+          } else {
             checkboxList.value = [];
           }
         })
-        .catch((e) => {
+        .catch(e => {
           console.log(e);
         });
     };
@@ -323,37 +503,40 @@ export default {
       handleSizeChange,
     };
   },
-  components: { PageLayer }
-}
+  components: { PageLayer },
+};
 
 function filterSex(val) {
   switch (val) {
-    case '0':
-      return '未填'
-    case '1':
-      return '男'
-    case '2':
-      return '女'
-    case '3':
-      return '未知'
+    case "0":
+      return "未填";
+    case "1":
+      return "男";
+    case "2":
+      return "女";
+    case "3":
+      return "未知";
   }
-  return ''
+  return "";
 }
 
 // 根据时间戳返回年月日
 function filterDate(val) {
   if (val) {
-    let date = new Date(val)
+    let date = new Date(val);
 
     if (!date) {
-      return ''
+      return "";
     }
-    let Y = date.getFullYear() + '-'
-    let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
-    let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
-    return Y + M + D
+    let Y = date.getFullYear() + "-";
+    let M =
+      (date.getMonth() + 1 < 10
+        ? "0" + (date.getMonth() + 1)
+        : date.getMonth() + 1) + "-";
+    let D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+    return Y + M + D;
   } else {
-    return ''
+    return "";
   }
 }
-</script>
+</script>

+ 120 - 63
src/views/examination/component/JyResult.vue

@@ -1,11 +1,25 @@
 <template>
-  <div style="position: relative; padding: 0 12px; height: 96%; font-size: 12px">
-    <h3 style="width: 100%; text-align: center; font-weight: bold; height: 30px; line-height: 35px">
-      长沙泰和医院检验报告单
+  <div
+    style="position: relative; padding: 0 12px; height: 96%; font-size: 12px"
+  >
+    <h3
+      style="
+        width: 100%;
+        text-align: center;
+        font-weight: bold;
+        height: 30px;
+        line-height: 35px;
+      "
+    >
+      {{ env.VITE_HOSPITAL_NAME }}检验报告单
     </h3>
     <div style="display: flex">
-      <div style="width: 25%">姓名:{{ data.inspectionDetail.order.ptntName }}</div>
-      <div style="width: 25%">性别:{{ filterSex(data.inspectionDetail.order.ptntSex) }}</div>
+      <div style="width: 25%">
+        姓名:{{ data.inspectionDetail.order.ptntName }}
+      </div>
+      <div style="width: 25%">
+        性别:{{ filterSex(data.inspectionDetail.order.ptntSex) }}
+      </div>
       <div style="width: 25%">
         年龄:{{ data.inspectionDetail.order.ptntAge }}
         {{ filterAgeUnit(data.inspectionDetail.order.ptntAgeUnit) }}
@@ -16,16 +30,24 @@
       </div>
     </div>
     <div style="display: flex">
-      <div style="width: 25%">科室:{{ data.inspectionDetail.order.deptName }}</div>
-      <div style="width: 25%">床号:{{ data.inspectionDetail.order.ptntBedNo }}</div>
-      <div style="width: 25%">标本类型:{{ data.inspectionDetail.order.smplName }}</div>
       <div style="width: 25%">
-        <div>申请项目:{{ data.inspectionDetail.order.aplyCntn.substring(0, 13) }}</div>
+        科室:{{ data.inspectionDetail.order.deptName }}
+      </div>
+      <div style="width: 25%">
+        床号:{{ data.inspectionDetail.order.ptntBedNo }}
+      </div>
+      <div style="width: 25%">
+        标本类型:{{ data.inspectionDetail.order.smplName }}
+      </div>
+      <div style="width: 25%">
+        <div>
+          申请项目:{{ data.inspectionDetail.order.aplyCntn.substring(0, 13) }}
+        </div>
         <div>{{ data.inspectionDetail.order.aplyCntn.substring(13) }}</div>
       </div>
     </div>
     <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-    <div v-if="data.reportType === '普通' || data.reportType === '外送'" >
+    <div v-if="data.reportType === '普通' || data.reportType === '外送'">
       <div style="display: inline-block; width: 49.7%; vertical-align: top">
         <div style="display: flex">
           <div style="width: 30%">检验项目</div>
@@ -36,9 +58,12 @@
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
         <div
-            v-for="(item, index) in data.inspectionDetail.items.slice(0, data.halfSize)"
-            :key="index"
-            style="display: flex"
+          v-for="(item, index) in data.inspectionDetail.items.slice(
+            0,
+            data.halfSize
+          )"
+          :key="index"
+          style="display: flex"
         >
           <div style="width: 30%">
             <div>{{ item.itmName.substring(0, 8) }}</div>
@@ -52,9 +77,13 @@
           </div>
           <div style="width: 16.66%">{{ item.itmUnit }}</div>
           <div style="width: 16.66%">
-            <span v-html="getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)"></span>
+            <span
+              v-html="
+                getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)
+              "
+            ></span>
           </div>
-          <div style="width: 20%">{{ item.range || item.ranGeStr}}</div>
+          <div style="width: 20%">{{ item.range || item.ranGeStr }}</div>
         </div>
       </div>
       <div style="display: inline-block; width: 49.7%; vertical-align: top">
@@ -66,8 +95,13 @@
           <div style="width: 20%">参考值</div>
         </div>
         <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-        <div v-for="(item, index) in data.inspectionDetail.items.slice(data.halfSize)" :key="index"
-             style="display: flex">
+        <div
+          v-for="(item, index) in data.inspectionDetail.items.slice(
+            data.halfSize
+          )"
+          :key="index"
+          style="display: flex"
+        >
           <div style="width: 30%">
             <div>{{ item.itmName.substring(0, 8) }}</div>
             <div>{{ item.itmName.substring(8) }}</div>
@@ -80,7 +114,11 @@
           </div>
           <div style="width: 16.66%">{{ item.itmUnit }}</div>
           <div style="width: 16.66%">
-            <span v-html="getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)"></span>
+            <span
+              v-html="
+                getItemAlert(item.itmAlert, item.itmStrValue, item.itmValue)
+              "
+            ></span>
           </div>
           <div style="width: 20%">{{ item.range || item.ranGeStr }}</div>
         </div>
@@ -93,22 +131,22 @@
       </div>
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
       <div
-          v-if="data.inspectionDetail?.items.length > 0"
-          style="margin: 0 30px;"
-          v-for="item in data.inspectionDetail.items"
+        v-if="data.inspectionDetail?.items.length > 0"
+        style="margin: 0 30px"
+        v-for="item in data.inspectionDetail.items"
       >
-        <div style="display: flex;width: 70%;margin: 2px 0">
+        <div style="display: flex; width: 70%; margin: 2px 0">
           <div style="width: 32%">{{ item.itmName }}</div>
           <div style="width: 66%">{{ item.rsltStrs }}</div>
         </div>
       </div>
       <div
-          v-if="data.bacterias.length > 0"
-          style="margin: 0 30px; padding-bottom: 5px;"
-          v-for="(antibioticItem,index) in data.bacterias"
-          :style="index > 0 ? {borderTop: '1px dashed gray'} : {}"
+        v-if="data.bacterias.length > 0"
+        style="margin: 0 30px; padding-bottom: 5px"
+        v-for="(antibioticItem, index) in data.bacterias"
+        :style="index > 0 ? { borderTop: '1px dashed gray' } : {}"
       >
-        <div style="display: flex;width: 70%;margin: 8px 0 4px 0">
+        <div style="display: flex; width: 70%; margin: 8px 0 4px 0">
           <div style="width: 32%">{{ antibioticItem.type }}</div>
           <div style="width: 66%">{{ antibioticItem.germName }}</div>
         </div>
@@ -121,10 +159,13 @@
           </div>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
           <div
-              v-if="antibioticItem.antiList"
-              style="display: flex"
-              v-for="(bac, index) in antibioticItem.antiList.slice(0, antibioticItem.halfBacSize)"
-              :key="index"
+            v-if="antibioticItem.antiList"
+            style="display: flex"
+            v-for="(bac, index) in antibioticItem.antiList.slice(
+              0,
+              antibioticItem.halfBacSize
+            )"
+            :key="index"
           >
             <div style="width: 33.33%">
               <div>{{ bac.antiNameCn.substring(0, 8) }}</div>
@@ -144,10 +185,12 @@
           </div>
           <div style="margin: 5px 0; border-top: 1px solid gray"></div>
           <div
-              v-if="antibioticItem.halfBacSize > 1"
-              style="display: flex"
-              v-for="(bac, index) in antibioticItem.antiList.slice(antibioticItem.halfBacSize)"
-              :key="index"
+            v-if="antibioticItem.halfBacSize > 1"
+            style="display: flex"
+            v-for="(bac, index) in antibioticItem.antiList.slice(
+              antibioticItem.halfBacSize
+            )"
+            :key="index"
           >
             <div style="width: 33.33%">
               <div>{{ bac.antiNameCn.substring(0, 8) }}</div>
@@ -162,20 +205,22 @@
       <div v-else>
         <div v-for="item in data.inspectionDetail.items" style="display: flex">
           <div style="width: 25%">{{ item.itmName }}</div>
-          <div style="width: 75%">{{ item.itmStrValue || item.rsltStrs}}</div>
+          <div style="width: 75%">{{ item.itmStrValue || item.rsltStrs }}</div>
         </div>
       </div>
     </div>
     <div style="position: absolute; bottom: 10px; left: 0; right: 0">
-      <span style="margin-left: 20px">备注:{{data.inspectionDetail.order.ordrRemark}}</span>
+      <span style="margin-left: 20px"
+        >备注:{{ data.inspectionDetail.order.ordrRemark }}</span
+      >
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
       <div style="display: flex">
         <div style="width: 8%"></div>
-        <div style="width: 25%;">
+        <div style="width: 25%">
           接收时间:{{ data.inspectionDetail.order.aplyDate }}
         </div>
         <div style="width: 33.33%">
-          检验时间:{{data.inspectionDetail.order.ordrCreateDate }}
+          检验时间:{{ data.inspectionDetail.order.ordrCreateDate }}
         </div>
         <div style="width: 33.33%">
           报告时间:{{ data.inspectionDetail.order.audtTime }}
@@ -183,7 +228,7 @@
       </div>
       <div style="display: flex">
         <div style="width: 8%"></div>
-        <div style="width: 25%;">
+        <div style="width: 25%">
           送检医生:{{ data.inspectionDetail.order.docName }}
         </div>
         <div style="width: 33.33%">
@@ -194,59 +239,71 @@
         </div>
       </div>
       <div style="margin: 5px 0; border-top: 1px solid gray"></div>
-      <div style="width: 100%; text-align: center; font-weight: bold; height: 30px; font-size: 12px">
+      <div
+        style="
+          width: 100%;
+          text-align: center;
+          font-weight: bold;
+          height: 30px;
+          font-size: 12px;
+        "
+      >
         ***此结果仅对所检测的标本负责***
-        <span style="margin-left: 10px; font-size: 12px">备注:升高(↑),降低(↓),阳性(+),阴性(-)</span>
+        <span style="margin-left: 10px; font-size: 12px"
+          >备注:升高(↑),降低(↓),阳性(+),阴性(-)</span
+        >
       </div>
-      <el-divider class="el-divider_shorter"/>
+      <el-divider class="el-divider_shorter" />
     </div>
   </div>
 </template>
 
 <script setup>
+import env from "../../../utils/setting.js";
+
 const props = defineProps({
   data: {
     type: Object,
-    required: true
-  }
-})
+    required: true,
+  },
+});
 
 function filterSex(val) {
   switch (val) {
     case 0:
-      return '未填'
+      return "未填";
     case 1:
-      return '男'
+      return "男";
     case 2:
-      return '女'
+      return "女";
     case 3:
-      return '未知'
+      return "未知";
   }
-  return ''
+  return "";
 }
 
 function filterAgeUnit(val) {
   switch (val) {
     case 0:
-      return '岁'
+      return "岁";
     case 1:
-      return '月'
+      return "月";
     case 2:
-      return '天'
+      return "天";
     case 3:
-      return '时'
+      return "时";
   }
-  return ''
+  return "";
 }
 
 function getItemAlert(val, strValue, value) {
-  if (strValue !== '' || value === '') return ''
+  if (strValue !== "" || value === "") return "";
   switch (val) {
-    case 'L':
-      return '<span style="color:#F56C6C;font-weight:bold">↓</span>'
-    case 'H':
-      return '<span style="color:#F56C6C;font-weight:bold">↑</span>'
+    case "L":
+      return '<span style="color:#F56C6C;font-weight:bold">↓</span>';
+    case "H":
+      return '<span style="color:#F56C6C;font-weight:bold">↑</span>';
   }
-  return ''
+  return "";
 }
-</script>
+</script>

+ 116 - 78
src/views/hospitalization/MakeDbzFees.vue

@@ -1,29 +1,51 @@
 <template>
-
   <div class="layout_display_flex_y">
     <div class="m-b_8px">
       <span style="margin-left: 0">选择:</span>
       <el-select v-model="card.cardType" style="width: 100px">
-        <el-option v-for="item in cardTypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
+        <el-option
+          v-for="item in cardTypes"
+          :key="item.code"
+          :value="item.code"
+          :label="item.name"
+        ></el-option>
       </el-select>
       <span>请输入{{ cardName }}:</span>
-      <el-input v-model="card.cardNo" style="width: 110px" clearable :placeholder="cardName"
-                @keyup.enter="fetchReceipts"></el-input>
+      <el-input
+        v-model="card.cardNo"
+        style="width: 110px"
+        clearable
+        :placeholder="cardName"
+        @keyup.enter="fetchReceipts"
+      ></el-input>
       <span></span>
-      <el-button type="primary" icon="Search" @click="fetchReceipts">查询处方</el-button>
-      <el-button type="success" icon="Check" @click="makeZyFees">保存到住院费用</el-button>
+      <el-button type="primary" icon="Search" @click="fetchReceipts"
+        >查询处方</el-button
+      >
+      <el-button type="success" icon="Check" @click="makeZyFees"
+        >保存到住院费用</el-button
+      >
     </div>
     <div class="layout_display_flex">
       <div class="m-r_8px">
         <el-table
-            ref="hisOrdeNumRef"
-            :data="hisOrdNums"
-            stripe
-            highlight-current-row
-            height="100%"
-            @row-click="switchHisOrdNum">
-          <el-table-column prop="patName" label="姓名" width="60"></el-table-column>
-          <el-table-column prop="hisOrdNum" label="HIS单号" width="120"></el-table-column>
+          ref="hisOrdeNumRef"
+          :data="hisOrdNums"
+          stripe
+          highlight-current-row
+          height="100%"
+          @row-click="switchHisOrdNum"
+        >
+          <el-table-column
+            prop="patName"
+            label="姓名"
+            width="60"
+          ></el-table-column>
+          <el-table-column
+            prop="hisOrdNum"
+            label="HIS单号"
+            width="120"
+          ></el-table-column>
           <el-table-column label="金额(¥)">
             <template #default="scope">
               {{ scope.row.totalAmt / 100 }}
@@ -33,7 +55,7 @@
       </div>
       <div class="layout_flex_1-x">
         <div class="layout_display_flex_y">
-          <div class="receipt-title">长沙泰和医院处方笺</div>
+          <div class="receipt-title">{{ env.VITE_HOSPITAL_NAME }}处方笺</div>
           <el-divider></el-divider>
           <div class="receipt-head">
             <div>姓名:{{ currentHisOrdNum.patName }}</div>
@@ -47,26 +69,38 @@
                 <div class="w75">
                   {{ index + 1 }}){{ item.tcName }}
-                  <span v-if="item.specification">{{ item.specification }}</span>
+                  <span v-if="item.specification">{{
+                    item.specification
+                  }}</span>
                   <span v-else>{{ item.drugUnit }}</span>
                 </div>
-                <div class="w25">&times;&nbsp;&nbsp;&nbsp;{{ item.quantity }}</div>
+                <div class="w25">
+                  &times;&nbsp;&nbsp;&nbsp;{{ item.quantity }}
+                </div>
               </div>
               <div class="receipt-tips">
-                <span v-if="item.drugQuan"> 用法:{{ item.drugQuan }}{{ item.drugUnit }}/次 </span>
+                <span v-if="item.drugQuan">
+                  用法:{{ item.drugQuan }}{{ item.drugUnit }}/次
+                </span>
                 <span v-if="item.frequency"> {{ item.frequency }} </span>
                 <span v-if="item.orderDays"> {{ item.orderDays }}天 </span>
                 <span v-if="item.supplyCode"> {{ item.supplyName }} </span>
-                <span v-if="item.instructionText"> 备注:{{ item.instructionText }} </span>
+                <span v-if="item.instructionText">
+                  备注:{{ item.instructionText }}
+                </span>
               </div>
             </div>
           </div>
           <el-divider></el-divider>
           <div class="receipt-head">
-            <div style="font-size: 15px">医师:{{ currentHisOrdNum.doctorName }}</div>
             <div style="font-size: 15px">
-              总金额:<span style="font-size: 18px; font-weight: bold">¥{{ currentHisOrdNum.totalAmt / 100 }}</span>
+              医师:{{ currentHisOrdNum.doctorName }}
+            </div>
+            <div style="font-size: 15px">
+              总金额:<span style="font-size: 18px; font-weight: bold"
+                >¥{{ currentHisOrdNum.totalAmt / 100 }}</span
+              >
             </div>
           </div>
         </div>
@@ -76,90 +110,94 @@
 </template>
 
 <script setup>
-import {computed, reactive, ref} from 'vue'
-import {getReceipts, saveToZyFees} from '@/api/dbz-fees'
-import {ElMessage, ElMessageBox} from 'element-plus'
+import { computed, reactive, ref } from "vue";
+import { getReceipts, saveToZyFees } from "@/api/dbz-fees";
+import { ElMessage, ElMessageBox } from "element-plus";
+import env from "../../utils/setting.js";
 
 const card = reactive({
   cardType: 1,
-  cardNo: '',
-  hisOrdNum: '',
+  cardNo: "",
+  hisOrdNum: "",
   receipts: [],
   totalAmt: null,
-})
-const cardTypes = initCardTypes()
+});
+const cardTypes = initCardTypes();
 const cardName = computed(() => {
-  return card.cardType === 1 ? '住院号' : '门诊ID'
-})
+  return card.cardType === 1 ? "住院号" : "门诊ID";
+});
 
-const hisOrdNums = ref([])
-const receipts = ref({})
-const currentHisOrdNum = ref({})
-const currentReceipts = ref([])
-const hisOrdeNumRef = ref(null)
+const hisOrdNums = ref([]);
+const receipts = ref({});
+const currentHisOrdNum = ref({});
+const currentReceipts = ref([]);
+const hisOrdeNumRef = ref(null);
 
-const switchHisOrdNum = (row) => {
-  currentHisOrdNum.value = row
-  currentReceipts.value = receipts.value[row.hisOrdNum]
-}
+const switchHisOrdNum = row => {
+  currentHisOrdNum.value = row;
+  currentReceipts.value = receipts.value[row.hisOrdNum];
+};
 
 const fetchReceipts = () => {
-  getReceipts(card).then((res) => {
-    hisOrdNums.value = res.hisOrdNums
-    receipts.value = res.receipts
-    hisOrdeNumRef.value.setCurrentRow(res.hisOrdNums[0])
-    currentHisOrdNum.value = res.hisOrdNums[0]
-    currentReceipts.value = res.receipts[res.hisOrdNums[0].hisOrdNum]
-  }).catch(() => {
-    hisOrdNums.value = []
-    currentReceipts.value = []
-    receipts.value = {}
-    currentHisOrdNum.value = {}
-  })
-}
+  getReceipts(card)
+    .then(res => {
+      hisOrdNums.value = res.hisOrdNums;
+      receipts.value = res.receipts;
+      hisOrdeNumRef.value.setCurrentRow(res.hisOrdNums[0]);
+      currentHisOrdNum.value = res.hisOrdNums[0];
+      currentReceipts.value = res.receipts[res.hisOrdNums[0].hisOrdNum];
+    })
+    .catch(() => {
+      hisOrdNums.value = [];
+      currentReceipts.value = [];
+      receipts.value = {};
+      currentHisOrdNum.value = {};
+    });
+};
 
 const makeZyFees = () => {
   if (currentReceipts.value.length === 0) {
     ElMessage({
-      message: '请先选择要保存的处方!',
-      type: 'warning',
+      message: "请先选择要保存的处方!",
+      type: "warning",
       duration: 2500,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
-  ElMessageBox.confirm('是否将选中的处方保存到住院费用?请谨慎操作!', '提示', {
-    type: 'warning',
-    confirmButtonText: '确定保存',
-    cancelButtonText: '返回修改',
-  }).then(() => {
-    card.hisOrdNum = currentHisOrdNum.value.hisOrdNum
-    card.receipts = currentReceipts.value
-    card.totalAmt = currentHisOrdNum.value.totalAmt
-    saveToZyFees(card).then(() => {
-      ElMessage({
-        message: '保存成功!',
-        type: 'success',
-        duration: 2500,
-        showClose: true,
-      })
-      fetchReceipts()
-    })
-  }).catch(() => {
+  ElMessageBox.confirm("是否将选中的处方保存到住院费用?请谨慎操作!", "提示", {
+    type: "warning",
+    confirmButtonText: "确定保存",
+    cancelButtonText: "返回修改",
   })
-}
+    .then(() => {
+      card.hisOrdNum = currentHisOrdNum.value.hisOrdNum;
+      card.receipts = currentReceipts.value;
+      card.totalAmt = currentHisOrdNum.value.totalAmt;
+      saveToZyFees(card).then(() => {
+        ElMessage({
+          message: "保存成功!",
+          type: "success",
+          duration: 2500,
+          showClose: true,
+        });
+        fetchReceipts();
+      });
+    })
+    .catch(() => {});
+};
 
 function initCardTypes() {
   return [
     {
       code: 1,
-      name: '住院号',
+      name: "住院号",
     },
     {
       code: 2,
-      name: '门诊id',
+      name: "门诊id",
     },
-  ]
+  ];
 }
 </script>
 

+ 5 - 2
src/views/hospitalization/case-front-sheet/FillCaseFrontSheet.vue

@@ -178,8 +178,10 @@
           </h3>
           <div style="width: 100%; font-size: 15px; text-align: center">
             医疗机构:
-            <span style="font-weight: 700">长沙泰和医院</span> ( 组织机构代码:
-            <span style="font-weight: 700">43010150145</span>)
+            <span style="font-weight: 700">{{ env.VITE_HOSPITAL_NAME }}</span>
+            ( 组织机构代码:
+            <span style="font-weight: 700">{{ env.VITE_HOSPITAL_CODE }}</span
+            >)
           </div>
           <div style="height: 25px; line-height: 25px; display: flex">
             <div>
@@ -2425,6 +2427,7 @@ import AuditHistory from "@/components/inpatient/frontsheet-printpage/AuditHisto
 import { useUserStore } from "@/pinia/user-store";
 import HistorySheetExport from "@/views/hospitalization/case-front-sheet/component/HistorySheetExport.vue";
 import { useDialog } from "@/components/cy/CyDialog/index";
+import env from "../../../utils/setting.js";
 
 const userStore = useUserStore();
 const userWards = ref([]);

+ 318 - 239
src/views/hospitalization/case-front-sheet/FrontSheetExport.vue

@@ -2,30 +2,39 @@
   <div class="layout_container">
     <header>
       <el-date-picker
-          v-model="month"
-          :clearable="false"
-          placeholder="出院日期"
-          style="width: 110px"
-          type="month"
+        v-model="month"
+        :clearable="false"
+        placeholder="出院日期"
+        style="width: 110px"
+        type="month"
       ></el-date-picker>
       <el-divider direction="vertical"></el-divider>
-      <el-button type="primary" icon="Search" @click="getAnalyzedSheets(false)">检索(省质控)</el-button>
-      <el-button type="success" icon="Search" @click="getAnalyzedSheets(true)">检索(HQMS)</el-button>
+      <el-button type="primary" icon="Search" @click="getAnalyzedSheets(false)"
+        >检索(省质控)</el-button
+      >
+      <el-button type="success" icon="Search" @click="getAnalyzedSheets(true)"
+        >检索(HQMS)</el-button
+      >
       <el-divider direction="vertical" />
-      <el-button type="primary" icon="Download" @click="exportExcel">导出csv</el-button>
+      <el-button type="primary" icon="Download" @click="exportExcel"
+        >导出csv</el-button
+      >
     </header>
     <div class="layout_main layout_el-table">
       <el-table
-          :data="cptSheets.slice(pageSize * (currentPage - 1), pageSize * currentPage)"
-          stripe>
+        :data="
+          cptSheets.slice(pageSize * (currentPage - 1), pageSize * currentPage)
+        "
+        stripe
+      >
         <el-table-column width="33" label="剔除">
           <template #default="scope">
             <el-button
-                icon="Minus"
-                size="small"
-                circle
-                type="danger"
-                @click.prevent="deleteRow(scope.$index, scope.row)"
+              icon="Minus"
+              size="small"
+              circle
+              type="danger"
+              @click.prevent="deleteRow(scope.$index, scope.row)"
             ></el-button>
           </template>
         </el-table-column>
@@ -33,34 +42,79 @@
           <template #default="props">
             <div style="display: flex">
               <div style="width: 40%">
-                <div style="width: 100%; padding: 4px; background: rgb(128,128,128); font-weight: bold; color: white">
+                <div
+                  style="
+                    width: 100%;
+                    padding: 4px;
+                    background: rgb(128, 128, 128);
+                    font-weight: bold;
+                    color: white;
+                  "
+                >
                   出院诊断
                 </div>
-                <div style="display: flex; font-size: 13px; font-weight: bold; padding: 4px 0">
+                <div
+                  style="
+                    display: flex;
+                    font-size: 13px;
+                    font-weight: bold;
+                    padding: 4px 0;
+                  "
+                >
                   <div style="width: 10%">序号</div>
                   <div style="width: 30%">诊断编码</div>
                   <div>诊断名称</div>
                 </div>
                 <div v-for="item in props.row.disdiagList">
-                  <div style="display: flex; padding: 4px 0; border-bottom: 1px dashed lightskyblue">
+                  <div
+                    style="
+                      display: flex;
+                      padding: 4px 0;
+                      border-bottom: 1px dashed lightskyblue;
+                    "
+                  >
                     <div style="width: 10%">{{ item.no }}</div>
                     <div style="width: 30%">{{ item.code }}</div>
                     <div>{{ item.name }}</div>
                   </div>
                 </div>
               </div>
-              <div v-show="props.row.surgeryList.length > 0" style="width: 55%; margin-left: 30px">
-                <div style="width: 100%; padding: 4px; background: rgb(128,128,128); font-weight: bold; color: white">
+              <div
+                v-show="props.row.surgeryList.length > 0"
+                style="width: 55%; margin-left: 30px"
+              >
+                <div
+                  style="
+                    width: 100%;
+                    padding: 4px;
+                    background: rgb(128, 128, 128);
+                    font-weight: bold;
+                    color: white;
+                  "
+                >
                   手术记录
                 </div>
-                <div style="display: flex; font-size: 13px; font-weight: bold; padding: 4px 0">
+                <div
+                  style="
+                    display: flex;
+                    font-size: 13px;
+                    font-weight: bold;
+                    padding: 4px 0;
+                  "
+                >
                   <div style="width: 10%">序号</div>
                   <div style="width: 25%">手术时间</div>
                   <div style="width: 20%">手术编码</div>
                   <div>手术名称</div>
                 </div>
                 <div v-for="item in props.row.surgeryList">
-                  <div style="display: flex; padding: 4px 0; border-bottom: 1px dashed lightskyblue">
+                  <div
+                    style="
+                      display: flex;
+                      padding: 4px 0;
+                      border-bottom: 1px dashed lightskyblue;
+                    "
+                  >
                     <div style="width: 10%">{{ item.no }}</div>
                     <div style="width: 25%">{{ item.date }}</div>
                     <div style="width: 20%">{{ item.code }}</div>
@@ -73,286 +127,311 @@
         </el-table-column>
         <el-table-column prop="bah" width="100">
           <template #header>
-            <el-input v-model="patNo" size="small" placeholder="住院号" clearable/>
+            <el-input
+              v-model="patNo"
+              size="small"
+              placeholder="住院号"
+              clearable
+            />
           </template>
         </el-table-column>
-        <el-table-column prop="admissTimes" label="次数" width="50"></el-table-column>
+        <el-table-column
+          prop="admissTimes"
+          label="次数"
+          width="50"
+        ></el-table-column>
         <el-table-column prop="name" label="姓名" width="100"></el-table-column>
         <el-table-column prop="sex" label="性别" width="50"></el-table-column>
         <el-table-column prop="socialNo" label="身份证号"></el-table-column>
-        <el-table-column prop="birthDate" label="出生日期" width="100"></el-table-column>
-        <el-table-column prop="phone" label="电话" width="100"></el-table-column>
+        <el-table-column
+          prop="birthDate"
+          label="出生日期"
+          width="100"
+        ></el-table-column>
+        <el-table-column
+          prop="phone"
+          label="电话"
+          width="100"
+        ></el-table-column>
         <el-table-column prop="admissDate" label="入院时间"></el-table-column>
         <el-table-column prop="admissDept" label="入院科室"></el-table-column>
         <el-table-column prop="dismissDate" label="出院时间"></el-table-column>
         <el-table-column prop="dismissDept" label="出院科室"></el-table-column>
-        <el-table-column prop="admissDoctorName" label="入院医生" width="100"></el-table-column>
-        <el-table-column prop="mainDoctorName" label="主治医生" width="100"></el-table-column>
+        <el-table-column
+          prop="admissDoctorName"
+          label="入院医生"
+          width="100"
+        ></el-table-column>
+        <el-table-column
+          prop="mainDoctorName"
+          label="主治医生"
+          width="100"
+        ></el-table-column>
       </el-table>
     </div>
     <div>
       <el-pagination
-          :current-page="currentPage"
-          :page-size="pageSize"
-          :page-sizes="[10, 30, 50, 100]"
-          :total="sheets.length"
-          layout="total, sizes, prev, pager, next, jumper"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="pageSize"
+        :page-sizes="[10, 30, 50, 100]"
+        :total="sheets.length"
+        layout="total, sizes, prev, pager, next, jumper"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
       ></el-pagination>
     </div>
   </div>
-
 </template>
 
 <script setup name="FrontSheetExport">
-import {ElMessage} from 'element-plus'
-import {formatMonth} from '@/utils/date'
-import {fetchSheets} from '@/api/case-front-sheet'
-import {exportCSV} from "@/utils/ExportCVS";
+import { ElMessage } from "element-plus";
+import { formatMonth } from "@/utils/date";
+import { fetchSheets } from "@/api/case-front-sheet";
+import { exportCSV } from "@/utils/ExportCVS";
+import env from "@/utils/setting.js";
 
-const month = ref(null)
+const month = ref(null);
 
-const patNo = ref('')
-const sheets = ref([])
+const patNo = ref("");
+const sheets = ref([]);
 
 const cptSheets = computed(() => {
   return sheets.value.filter(item => {
-    return item.bah.indexOf(patNo.value) !== -1
-  })
-})
+    return item.bah.indexOf(patNo.value) !== -1;
+  });
+});
 
-const pageSize = ref(30)
-const currentPage = ref(1)
-const handleSizeChange = (val) => {
-  pageSize.value = val
-}
-const handleCurrentChange = (val) => {
-  currentPage.value = val
-}
+const pageSize = ref(30);
+const currentPage = ref(1);
+const handleSizeChange = val => {
+  pageSize.value = val;
+};
+const handleCurrentChange = val => {
+  currentPage.value = val;
+};
 
-const getAnalyzedSheets = (isHqms) => {
+const getAnalyzedSheets = isHqms => {
   if (!month.value) {
     ElMessage({
-      message: '请先选择出院日期',
-      type: 'warning',
+      message: "请先选择出院日期",
+      type: "warning",
       duration: 2500,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
-  month.value = formatMonth(month.value)
-  fetchSheets(month.value, isHqms).then((res) => {
-    sheets.value = res
-  })
-}
+  month.value = formatMonth(month.value);
+  fetchSheets(month.value, isHqms).then(res => {
+    sheets.value = res;
+  });
+};
 
 function deleteRow(index, row) {
   if (sheets.value[index] !== row) {
     index = sheets.value.findIndex(item => {
-      return item === row
-    })
+      return item === row;
+    });
   }
-  sheets.value.splice(index, 1)
+  sheets.value.splice(index, 1);
 }
 
 const exportExcel = () => {
   if (sheets.value.length === 0) {
     ElMessage({
-      message: '没有可以导出的数据!',
-      type: 'warning',
+      message: "没有可以导出的数据!",
+      type: "warning",
       duration: 2500,
       showClose: true,
-    })
+    });
   } else {
-    sheets.value.forEach((itm) => {
-      itm.instituionCode = '430000150806'
-      itm.instituionName = '长沙泰和医院'
-      itm.certtype = itm.country === '中国' ? '1' : '9'
-      itm.unitinfo = itm.unitName + '/' + itm.unitPlace
-      itm.daytimeSurgery = 0
-      itm.blank = '-'
+    sheets.value.forEach(itm => {
+      itm.instituionCode = env.VITE_HOSPITAL_CODE;
+      itm.instituionName = env.VITE_HOSPITAL_NAME;
+      itm.certtype = itm.country === "中国" ? "1" : "9";
+      itm.unitinfo = itm.unitName + "/" + itm.unitPlace;
+      itm.daytimeSurgery = 0;
+      itm.blank = "-";
 
-      const diagList = itm.disdiagList
-      itm.otherDisdiagSize = diagList.length - 1
+      const diagList = itm.disdiagList;
+      itm.otherDisdiagSize = diagList.length - 1;
       for (let i = 0; i < diagList.length; i++) {
-        itm['disdiagCode' + i] = diagList[i].code
-        itm['disdiagName' + i] = diagList[i].name
-        itm['disdiagAdms' + i] = diagList[0].admissStatus
-        itm['disdiagDiss' + i] = diagList[0].dismissStatus
+        itm["disdiagCode" + i] = diagList[i].code;
+        itm["disdiagName" + i] = diagList[i].name;
+        itm["disdiagAdms" + i] = diagList[0].admissStatus;
+        itm["disdiagDiss" + i] = diagList[0].dismissStatus;
       }
 
-      const surgeryList = itm.surgeryList
+      const surgeryList = itm.surgeryList;
       if (surgeryList.length === 0) {
-        itm.surgeryCode0 = ''
-        itm.surgeryName0 = ''
-        itm.surgeryDate0 = ''
-        itm.surgeryLevel0 = ''
-        itm.surgeryLasttime0 = ''
-        itm.surgeryOptor0 = ''
-        itm.surgeryAst10 = ''
-        itm.surgeryAst20 = ''
-        itm.surgeryWjwCh0 = ''
-        itm.surgeryAnae0 = ''
-        itm.surgeryAnaeLevel0 = ''
-        itm.surgeryAnaeName0 = ''
+        itm.surgeryCode0 = "";
+        itm.surgeryName0 = "";
+        itm.surgeryDate0 = "";
+        itm.surgeryLevel0 = "";
+        itm.surgeryLasttime0 = "";
+        itm.surgeryOptor0 = "";
+        itm.surgeryAst10 = "";
+        itm.surgeryAst20 = "";
+        itm.surgeryWjwCh0 = "";
+        itm.surgeryAnae0 = "";
+        itm.surgeryAnaeLevel0 = "";
+        itm.surgeryAnaeName0 = "";
       } else {
         for (let i = 0; i < surgeryList.length; i++) {
-          itm['surgeryCode' + i] = surgeryList[i].code
-          itm['surgeryName' + i] = surgeryList[i].name
-          itm['surgeryDate' + i] = surgeryList[i].date
-          itm['surgeryLevel' + i] = surgeryList[i].level
-          itm['surgeryLasttime' + i] = ''
-          itm['surgeryOptor' + i] = surgeryList[i].operatorName
-          itm['surgeryAst1' + i] = surgeryList[i].assistantOneName
-          itm['surgeryAst2' + i] = surgeryList[i].assistantTwoName
-          itm['surgeryWjwCh' + i] = surgeryList[i].wjwCutHeal
-          itm['surgeryAnae' + i] = surgeryList[i].anaesthesia
-          itm['surgeryAnaeLevel' + i] = ''
-          itm['surgeryAnaeName' + i] = surgeryList[i].anaesthesiaorName
+          itm["surgeryCode" + i] = surgeryList[i].code;
+          itm["surgeryName" + i] = surgeryList[i].name;
+          itm["surgeryDate" + i] = surgeryList[i].date;
+          itm["surgeryLevel" + i] = surgeryList[i].level;
+          itm["surgeryLasttime" + i] = "";
+          itm["surgeryOptor" + i] = surgeryList[i].operatorName;
+          itm["surgeryAst1" + i] = surgeryList[i].assistantOneName;
+          itm["surgeryAst2" + i] = surgeryList[i].assistantTwoName;
+          itm["surgeryWjwCh" + i] = surgeryList[i].wjwCutHeal;
+          itm["surgeryAnae" + i] = surgeryList[i].anaesthesia;
+          itm["surgeryAnaeLevel" + i] = "";
+          itm["surgeryAnaeName" + i] = surgeryList[i].anaesthesiaorName;
         }
       }
-    })
+    });
 
     const title = {
-      instituionCode: 'A01',
-      instituionName: 'A02',
-      bah: 'A48',
-      admissTimes: 'A49',
-      admissDate: 'B12',
-      dismissDate: 'B15',
-      healthCardNo: 'A47',
-      payMethod: 'A46C',
-      name: 'A11',
-      sex: 'A12C',
-      birthDate: 'A13',
-      age: 'A14',
-      country: 'A15C',
-      marriage: 'A21C',
-      occupation: 'A38C',
-      nation: 'A19C',
-      certtype: 'A20N',
-      socialNo: 'A20',
-      birthPlaceName: 'A22',
-      nativePlace: 'A23C',
-      hkPlaceName: 'A24',
-      hkZipCode: 'A25C',
-      livePlace: 'A26',
-      phone: 'A27',
-      addrZipCode: 'A28C',
-      unitinfo: 'A29',
-      unitPhone: 'A30',
-      unitZipCode: 'A31C',
-      contactName: 'A32',
-      contactRelation: 'A33C',
-      contactAddrName: 'A34',
-      contactPhone: 'A35',
-      daytimeSurgery: 'B38',
-      zyAdmissWay: 'B11C',
-      admissDeptCode: 'B13C',
-      admissWard: 'B14',
-      zkWard: 'B21C',
-      dismissDeptCode: 'B16C',
-      dismissWard: 'B17',
-      admissDays: 'B20',
-      clinicDiagCode: 'C01C',
-      clinicDiagStr: 'C02N',
-      disdiagCode0: 'C03C',
-      disdiagName0: 'C04N',
-      disdiagAdms0: 'C05C',
-      disdiagDiss0: 'F05',
+      instituionCode: "A01",
+      instituionName: "A02",
+      bah: "A48",
+      admissTimes: "A49",
+      admissDate: "B12",
+      dismissDate: "B15",
+      healthCardNo: "A47",
+      payMethod: "A46C",
+      name: "A11",
+      sex: "A12C",
+      birthDate: "A13",
+      age: "A14",
+      country: "A15C",
+      marriage: "A21C",
+      occupation: "A38C",
+      nation: "A19C",
+      certtype: "A20N",
+      socialNo: "A20",
+      birthPlaceName: "A22",
+      nativePlace: "A23C",
+      hkPlaceName: "A24",
+      hkZipCode: "A25C",
+      livePlace: "A26",
+      phone: "A27",
+      addrZipCode: "A28C",
+      unitinfo: "A29",
+      unitPhone: "A30",
+      unitZipCode: "A31C",
+      contactName: "A32",
+      contactRelation: "A33C",
+      contactAddrName: "A34",
+      contactPhone: "A35",
+      daytimeSurgery: "B38",
+      zyAdmissWay: "B11C",
+      admissDeptCode: "B13C",
+      admissWard: "B14",
+      zkWard: "B21C",
+      dismissDeptCode: "B16C",
+      dismissWard: "B17",
+      admissDays: "B20",
+      clinicDiagCode: "C01C",
+      clinicDiagStr: "C02N",
+      disdiagCode0: "C03C",
+      disdiagName0: "C04N",
+      disdiagAdms0: "C05C",
+      disdiagDiss0: "F05",
       // 理想情况是在这里做其他诊断的插入
-      pathologicDiagCode: 'C09C',
-      pathologicDiagStr: 'C10N',
-      blh: 'C11',
-      hurtReasonCode: 'C12C',
-      hurtReasonName: 'C13N',
-      allergy: 'C24C',
-      allergicMedicine: 'C25',
-      hbsAg: 'F10',
-      hcvAb: 'F11',
-      hivAb: 'F12',
-      deptLeader: 'B22C',
-      deptLeaderName: 'B22',
-      leaderDoctor: 'B23C',
-      leaderDoctorName: 'B23',
-      mainDoctor: 'B24C',
-      mainDoctorName: 'B24',
-      admissDoctor: 'B25C',
-      admissDoctorName: 'B25',
-      dutyNurse: 'B26C',
-      dutyNurseName: 'B26',
-      studyDoctorName: 'B27',
-      internshipDoctorName: 'B28',
-      coderName: 'B29',
-      qualityControlLevel: 'B30C',
-      qualityControlDoctorName: 'B31',
-      qualityControlNurseName: 'B32',
-      qualityControlDate: 'B33',
-      autopsy: 'C34C',
-      bloodType: 'C26C',
-      rh: 'C27C',
-      surgeryCode0: 'C14x01C',
-      surgeryName0: 'C15x01N',
-      surgeryDate0: 'C16x01',
-      surgeryLevel0: 'C17x01',
-      surgeryLasttime0: 'F13',
-      surgeryOptor0: 'C18x01',
-      surgeryAst10: 'C19x01',
-      surgeryAst20: 'C20x01',
-      surgeryWjwCh0: 'C21x01C',
-      surgeryAnae0: 'C22x01C',
-      surgeryAnaeLevel0: 'F15',
-      surgeryAnaeName0: 'C23x01',
+      pathologicDiagCode: "C09C",
+      pathologicDiagStr: "C10N",
+      blh: "C11",
+      hurtReasonCode: "C12C",
+      hurtReasonName: "C13N",
+      allergy: "C24C",
+      allergicMedicine: "C25",
+      hbsAg: "F10",
+      hcvAb: "F11",
+      hivAb: "F12",
+      deptLeader: "B22C",
+      deptLeaderName: "B22",
+      leaderDoctor: "B23C",
+      leaderDoctorName: "B23",
+      mainDoctor: "B24C",
+      mainDoctorName: "B24",
+      admissDoctor: "B25C",
+      admissDoctorName: "B25",
+      dutyNurse: "B26C",
+      dutyNurseName: "B26",
+      studyDoctorName: "B27",
+      internshipDoctorName: "B28",
+      coderName: "B29",
+      qualityControlLevel: "B30C",
+      qualityControlDoctorName: "B31",
+      qualityControlNurseName: "B32",
+      qualityControlDate: "B33",
+      autopsy: "C34C",
+      bloodType: "C26C",
+      rh: "C27C",
+      surgeryCode0: "C14x01C",
+      surgeryName0: "C15x01N",
+      surgeryDate0: "C16x01",
+      surgeryLevel0: "C17x01",
+      surgeryLasttime0: "F13",
+      surgeryOptor0: "C18x01",
+      surgeryAst10: "C19x01",
+      surgeryAst20: "C20x01",
+      surgeryWjwCh0: "C21x01C",
+      surgeryAnae0: "C22x01C",
+      surgeryAnaeLevel0: "F15",
+      surgeryAnaeName0: "C23x01",
       // 理想情况是在这里做其他手术的插入
-      ageDays: 'A16',
-      newBornWeight: 'A18x01',
-      newBornAdmissWeight: 'A17',
-      comaDaysBeforeAdmiss: 'C28',
-      comaHoursBeforeAdmiss: 'C29',
-      comaMinutesBeforeAdmiss: 'C30',
-      comaDaysAfterAdmiss: 'C31',
-      comaHoursAfterAdmiss: 'C32',
-      comaMinutesAfterAdmiss: 'C33',
-      admissAgainInOneMonth: 'B36C',
-      admissAgainPurpose: 'B37',
-      zyDismissWay: 'B34C',
-      dismissDestination: 'B35',
-      totalCost: 'D01',
-      selfPay: 'D09',
-      surgicalFee: 'D20',
-      anesthetizeFee: 'D20x01',
-      surgeryFee: 'D20x02',
-      tcmTreatmentFee: 'D22',
-    }
+      ageDays: "A16",
+      newBornWeight: "A18x01",
+      newBornAdmissWeight: "A17",
+      comaDaysBeforeAdmiss: "C28",
+      comaHoursBeforeAdmiss: "C29",
+      comaMinutesBeforeAdmiss: "C30",
+      comaDaysAfterAdmiss: "C31",
+      comaHoursAfterAdmiss: "C32",
+      comaMinutesAfterAdmiss: "C33",
+      admissAgainInOneMonth: "B36C",
+      admissAgainPurpose: "B37",
+      zyDismissWay: "B34C",
+      dismissDestination: "B35",
+      totalCost: "D01",
+      selfPay: "D09",
+      surgicalFee: "D20",
+      anesthetizeFee: "D20x01",
+      surgeryFee: "D20x02",
+      tcmTreatmentFee: "D22",
+    };
 
     for (let i = 1; i < 41; i++) {
-      let mark = ('0' + i).slice(-2)
-      title['disdiagCode' + i] = `C06x${mark}C`
-      title['disdiagName' + i] = `C07x${mark}N`
-      title['disdiagAdms' + i] = `C08x${mark}C`
-      title['disdiagDiss' + i] = `F06x${mark}`
+      let mark = ("0" + i).slice(-2);
+      title["disdiagCode" + i] = `C06x${mark}C`;
+      title["disdiagName" + i] = `C07x${mark}N`;
+      title["disdiagAdms" + i] = `C08x${mark}C`;
+      title["disdiagDiss" + i] = `F06x${mark}`;
     }
 
     for (let i = 1; i < 41; i++) {
-      let mark = ('0' + i).slice(-2)
-      title['surgeryCode' + i] = `C35x${mark}C`
-      title['surgeryName' + i] = `C36x${mark}N`
-      title['surgeryDate' + i] = `C37x${mark}`
-      title['surgeryLevel' + i] = `C38x${mark}`
-      title['surgeryLasttime' + i] = `F14x${mark}`
-      title['surgeryOptor' + i] = `C39x${mark}`
-      title['surgeryAst1' + i] = `C40x${mark}`
-      title['surgeryAst2' + i] = `C41x${mark}`
-      title['surgeryWjwCh' + i] = `C42x${mark}C`
-      title['surgeryAnae' + i] = `C43x${mark}C`
-      title['surgeryAnaeLevel' + i] = `F16x${mark}`
-      title['surgeryAnaeName' + i] = `C44x${mark}`
+      let mark = ("0" + i).slice(-2);
+      title["surgeryCode" + i] = `C35x${mark}C`;
+      title["surgeryName" + i] = `C36x${mark}N`;
+      title["surgeryDate" + i] = `C37x${mark}`;
+      title["surgeryLevel" + i] = `C38x${mark}`;
+      title["surgeryLasttime" + i] = `F14x${mark}`;
+      title["surgeryOptor" + i] = `C39x${mark}`;
+      title["surgeryAst1" + i] = `C40x${mark}`;
+      title["surgeryAst2" + i] = `C41x${mark}`;
+      title["surgeryWjwCh" + i] = `C42x${mark}C`;
+      title["surgeryAnae" + i] = `C43x${mark}C`;
+      title["surgeryAnaeLevel" + i] = `F16x${mark}`;
+      title["surgeryAnaeName" + i] = `C44x${mark}`;
     }
 
-    const yearMonth = month.value.split('-')
-    const fileName = `430000150806_长沙泰和医院_${yearMonth[0]}_${yearMonth[1]}.csv`
-    exportCSV(sheets.value, title, fileName, ',')
+    const yearMonth = month.value.split("-");
+    const fileName = `${env.VITE_HOSPITAL_CODE}_${env.VITE_HOSPITAL_NAME}_${yearMonth[0]}_${yearMonth[1]}.csv`;
+    exportCSV(sheets.value, title, fileName, ",");
   }
-}
+};
 </script>

+ 128 - 116
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/PoisonAndAnestheticPrinting.vue

@@ -1,40 +1,39 @@
 <script setup lang="ts">
-import {onMounted, ref} from "vue";
-import {PatInfo} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
+import { onMounted, ref } from "vue";
+import { PatInfo } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import JsBarcode from "jsbarcode";
-import {getLodop, initLodop} from "@/utils/c-lodop";
-import prescription from '@/assets/prescription.png'
+import { getLodop, initLodop } from "@/utils/c-lodop";
+import prescription from "@/assets/prescription.png";
+import env from "../../../../../utils/setting";
 
-const barCodeRef = ref<HTMLImageElement>()
-const printRef = ref<HTMLDivElement>()
+const barCodeRef = ref<HTMLImageElement>();
+const printRef = ref<HTMLDivElement>();
 
 function setData(drugList: any[], patInfo: PatInfo) {
   JsBarcode(barCodeRef.value, patInfo.inpatientNo, {
-    lineColor: '#333',
+    lineColor: "#333",
     width: 2,
     height: 18,
     displayValue: false,
     margin: 0,
     fontSize: 12,
-  })
+  });
 }
 
 function print() {
-  const html = `<style>*{font-size: 9.75pt}html,body {margin: 0}</style><body>${printRef.value.innerHTML}</body>`
+  const html = `<style>*{font-size: 9.75pt}html,body {margin: 0}</style><body>${printRef.value.innerHTML}</body>`;
   const LODOP = getLodop(null, null);
-  LODOP.PRINT_INIT('处方笺');
-  LODOP.SET_PRINT_PAGESIZE(1, '148mm', '210mm', '');
-  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true)
-  LODOP.ADD_PRINT_HTM('1mm', '1mm', '100%', '100%', html)
+  LODOP.PRINT_INIT("处方笺");
+  LODOP.SET_PRINT_PAGESIZE(1, "148mm", "210mm", "");
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true);
+  LODOP.ADD_PRINT_HTM("1mm", "1mm", "100%", "100%", html);
   LODOP.PRINT_DESIGN();
 }
 
 onMounted(() => {
-  initLodop()
-  setData([], {inpatientNo: '123'})
-})
-
-
+  initLodop();
+  setData([], { inpatientNo: "123" });
+});
 </script>
 
 <template>
@@ -43,124 +42,139 @@ onMounted(() => {
     <el-button v-print="'#print1'">打印1</el-button>
   </div>
   <div ref="printRef">
-    <div style="width: 148mm; height: 200mm;max-height: 200mm;background-color: white" id="print1">
-      <div style="text-align: center; font-weight:bolder ; position: relative; height: 35pt">
+    <div
+      style="
+        width: 148mm;
+        height: 200mm;
+        max-height: 200mm;
+        background-color: white;
+      "
+      id="print1"
+    >
+      <div
+        style="
+          text-align: center;
+          font-weight: bolder;
+          position: relative;
+          height: 35pt;
+        "
+      >
         <div style="position: absolute; top: 0; left: 0">
-          <img ref="barCodeRef" alt="" src=""/>
+          <img ref="barCodeRef" alt="" src="" />
         </div>
         <div style="font-size: 12pt">
-          长沙泰和医院
+          {{ env.VITE_HOSPITAL_NAME }}
         </div>
-        <div style="font-size: 10pt">
-          处方笺
-        </div>
-        <div style="position: absolute; top: 0; right: 0; border: 0.75pt solid #000;  width: max-content; padding: 3pt">
+        <div style="font-size: 10pt">处方笺</div>
+        <div
+          style="
+            position: absolute;
+            top: 0;
+            right: 0;
+            border: 0.75pt solid #000;
+            width: max-content;
+            padding: 3pt;
+          "
+        >
           <!--        精二-->
-          麻、精<br/>一
+          麻、精<br />一
         </div>
       </div>
 
       <div style="border-bottom: 0.75pt solid #000">
-        <table style="width: 100%;border-collapse:separate; border-spacing:0 2pt;"
-               border="0"
-               cellpadding="0"
-               cellspacing="0">
+        <table
+          style="width: 100%; border-collapse: separate; border-spacing: 0 2pt"
+          border="0"
+          cellpadding="0"
+          cellspacing="0"
+        >
           <colgroup>
-            <col style="width: 17.2415%;">
-            <col style="width: 18.3908%;">
-            <col style="width: 11.6858%;">
-            <col style="width: 27.3946%;">
-            <col style="width: 15.9004%;">
-            <col style="width: 9.38697%;">
+            <col style="width: 17.2415%" />
+            <col style="width: 18.3908%" />
+            <col style="width: 11.6858%" />
+            <col style="width: 27.3946%" />
+            <col style="width: 15.9004%" />
+            <col style="width: 9.38697%" />
           </colgroup>
           <tbody>
-          <tr>
-            <td style="text-align: right">姓名:</td>
-            <td>asdasd</td>
-            <td style="text-align: right">性别:</td>
-            <td></td>
-            <td style="text-align: right">年龄:</td>
-            <td></td>
-          </tr>
-          <tr>
-            <td style="text-align: right">
-              住院号:
-            </td>
-            <td>
-            </td>
-            <td style="text-align: right">
-              科室:
-            </td>
-            <td rowspan="3">
-            </td>
-          </tr>
-          <tr>
-            <td style="text-align: right">
-              处方类型:
-            </td>
-            <td>
-            </td>
-            <td style="text-align: right">
-              处方时间:
-            </td>
-            <td rowspan="3">
-            </td>
-          </tr>
-          <tr>
-            <td style="text-align: right">身份证号码:</td>
-            <td rowspan="4"></td>
-          </tr>
-          <tr>
-            <td style="text-align: right">诊断:</td>
-            <td rowspan="4"></td>
-          </tr>
+            <tr>
+              <td style="text-align: right">姓名:</td>
+              <td>asdasd</td>
+              <td style="text-align: right">性别:</td>
+              <td></td>
+              <td style="text-align: right">年龄:</td>
+              <td></td>
+            </tr>
+            <tr>
+              <td style="text-align: right">住院号:</td>
+              <td></td>
+              <td style="text-align: right">科室:</td>
+              <td rowspan="3"></td>
+            </tr>
+            <tr>
+              <td style="text-align: right">处方类型:</td>
+              <td></td>
+              <td style="text-align: right">处方时间:</td>
+              <td rowspan="3"></td>
+            </tr>
+            <tr>
+              <td style="text-align: right">身份证号码:</td>
+              <td rowspan="4"></td>
+            </tr>
+            <tr>
+              <td style="text-align: right">诊断:</td>
+              <td rowspan="4"></td>
+            </tr>
           </tbody>
         </table>
       </div>
-      <div style="height: 6pt"/>
+      <div style="height: 6pt" />
       <div>
-        <img :src="prescription" alt="">
+        <img :src="prescription" alt="" />
       </div>
 
-      <div style=" height: 400pt;border-bottom: 0.75pt solid #000">
-        <table style="width: 100%;max-height: 380pt;min-height: 10pt" border="0" cellpadding="0" cellspacing="0">
-
-        </table>
-        <div>
-          -----(以下留白)-----
-        </div>
+      <div style="height: 400pt; border-bottom: 0.75pt solid #000">
+        <table
+          style="width: 100%; max-height: 380pt; min-height: 10pt"
+          border="0"
+          cellpadding="0"
+          cellspacing="0"
+        ></table>
+        <div>-----(以下留白)-----</div>
       </div>
       <div style="height: 1pt"></div>
-      <div style="width: 100%; padding: 0 2pt;box-sizing: border-box;">
-        <table style="width: 100%;border-collapse:separate; border-spacing:0 2pt;" border="0" cellpadding="0"
-               cellspacing="0">
+      <div style="width: 100%; padding: 0 2pt; box-sizing: border-box">
+        <table
+          style="width: 100%; border-collapse: separate; border-spacing: 0 2pt"
+          border="0"
+          cellpadding="0"
+          cellspacing="0"
+        >
           <colgroup>
-            <col width="12%"/>
-            <col width="38%"/>
-            <col width="22%"/>
-            <col width="28%"/>
+            <col width="12%" />
+            <col width="38%" />
+            <col width="22%" />
+            <col width="28%" />
           </colgroup>
           <tbody>
-          <tr>
-            <td>处方金额:</td>
-            <td style="border-bottom: 0.75pt solid #000">
-              asdasd
-            </td>
-            <td style="text-align: right">医师:</td>
-            <td style="border-bottom: 0.75pt solid #000"></td>
-          </tr>
-          <tr>
-            <td>审核药师:</td>
-            <td style="border-bottom: 0.75pt solid #000"></td>
-            <td style="text-align: right">核对药师:</td>
-            <td style="border-bottom: 0.75pt solid #000"></td>
-          </tr>
-          <tr>
-            <td>调配药师:</td>
-            <td style="border-bottom: 0.75pt solid #000"></td>
-            <td style="text-align: right">发药药师:</td>
-            <td style="border-bottom: 0.75pt solid #000"></td>
-          </tr>
+            <tr>
+              <td>处方金额:</td>
+              <td style="border-bottom: 0.75pt solid #000">asdasd</td>
+              <td style="text-align: right">医师:</td>
+              <td style="border-bottom: 0.75pt solid #000"></td>
+            </tr>
+            <tr>
+              <td>审核药师:</td>
+              <td style="border-bottom: 0.75pt solid #000"></td>
+              <td style="text-align: right">核对药师:</td>
+              <td style="border-bottom: 0.75pt solid #000"></td>
+            </tr>
+            <tr>
+              <td>调配药师:</td>
+              <td style="border-bottom: 0.75pt solid #000"></td>
+              <td style="text-align: right">发药药师:</td>
+              <td style="border-bottom: 0.75pt solid #000"></td>
+            </tr>
           </tbody>
         </table>
       </div>
@@ -168,6 +182,4 @@ onMounted(() => {
   </div>
 </template>
 
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 294 - 217
src/views/medical-advice/advice-management/CqYzPrint.vue

@@ -1,154 +1,218 @@
 <template>
+  <el-container>
+    <el-aside width="210px">
+      <PatientBaseList
+        :yzType="yzType"
+        @selectPatientInfo="selectPatientInfo"
+      ></PatientBaseList>
+    </el-aside>
     <el-container>
-        <el-aside width="210px">
-          <PatientBaseList :yzType="yzType" @selectPatientInfo="selectPatientInfo" ></PatientBaseList>
-        </el-aside>
-        <el-container>
-            <el-header style="height: 150px">
-                <PatientInfo :patientInfo="patientInfo"></PatientInfo>
-            </el-header>
-            <div>
-                <el-row>
-                    <el-col :span="8">
-                        <el-button icon="Search" type="primary"  @click="queryInfo">查询</el-button>
-                        <el-button icon="Printer" type="success" @click="daYingClick">打印预览</el-button>
-                        <el-button icon="Printer" type="success" @click="printClick">打印</el-button>
-                    </el-col>
-                    <el-col :span="8">
-                        <el-radio-group @change="initPageNumList" v-model="yzOrderParam.printType">
-                            <el-radio :label="1">打印新增</el-radio>
-                            <el-radio :label="2">打印单页</el-radio>
-                            <el-radio :label="3">打印某页后</el-radio>
-                        </el-radio-group>
-                    </el-col>
-                    <el-col :span="4">
-                        医嘱页号:
-                        <el-select  v-model="yzOrderParam.pageNum" placeholder="请选择" style="width: 60px">
-                            <el-option v-for="item in pageNumList" :key="item.code" :label="item.name" :value="item.code"></el-option>
-                        </el-select>
-                    </el-col>
-                    <el-col :span="4">
-                        <el-button  type="primary" @click="clearPrintPageClick">清空打印页号</el-button>
-                    </el-col>
-                </el-row>
-            </div>
-            <el-main>
-                <el-scrollbar height="400px">
-                    <div id="cqYz">
-                        <table id="pageTable">
-                            <thead>
-                                <tr>
-                                    <td colspan="9" style="width: 100%; text-align: center; padding: 16px 0; border: none;font-size:23px;font-weight:bold">长沙泰和医院<br/>长期医嘱单</td>
-                                </tr>
-                                <tr>
-                                    <td colspan="9" style="border: none">
-                                        <div style="display: flex;">
-                                                <div style="width: 15%">姓名:{{patientInfo.name}}</div>
-                                                <div style="width: 15%">性别:{{patientInfo.sexName}}</div>
-                                                <div style="width: 15%">年龄:{{companyFunc(patientInfo.age,'岁')}}</div>
-                                                <div style="width: 15%">科别:{{patientInfo.admissWardName}}</div>
-                                                <div style="width: 18%">床号:{{patientInfo.bedNo}}</div>
-                                                <div>住院号:{{patientInfo.inpatientNo}}</div>
-                                        </div>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <th style="height: 30px" colspan="5">起&nbsp;&nbsp;&nbsp;始</th>
-                                    <th colspan="4">停&nbsp;&nbsp;&nbsp;止</th>
-                                </tr>
-                                <tr>
-                                    <th style="width: 40px;height: 40px">日期</th>
-                                    <th style="width: 40px">时间</th>
-                                    <th>长期医嘱</th>
-                                    <th style="width: 58px">医师签名</th>
-                                    <th style="width: 85px">核对护士签名</th>
-                                    <th style="width: 40px">日期</th>
-                                    <th style="width: 40px">时间</th>
-                                    <th style="width: 58px">医师签名</th>
-                                    <th style="width: 85px">核对护士签名</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                            <tr   v-for="(item,index) in yzPrintVOList">
-                                <td v-if="item.pageFlag=='1'" style="border: none" colspan="9">第{{item.printPage}}页</td>
-                                <td v-if="item.pageFlag !='1'"  style="height: 40px">{{item.date}}</td>
-                                <td v-if="item.pageFlag !='1'">{{item.time}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.orderGroupNo}} {{item.newOrderName}} {{item.newOrderNameCode}} {{item.frequCode}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.doctorName}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.nurseName}}</td>
-                                <td v-if="item.pageFlag !='1'">{{item.stopDate}}</td>
-                                <td v-if="item.pageFlag !='1'">{{item.stopTime}}</td>
-                                <td v-if="item.pageFlag !='1'"  style="text-align: left">{{item.modifierName}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.execId2Name}}</td>
-                            </tr>
-                            </tbody>
-                        </table>
+      <el-header style="height: 150px">
+        <PatientInfo :patientInfo="patientInfo"></PatientInfo>
+      </el-header>
+      <div>
+        <el-row>
+          <el-col :span="8">
+            <el-button icon="Search" type="primary" @click="queryInfo"
+              >查询</el-button
+            >
+            <el-button icon="Printer" type="success" @click="daYingClick"
+              >打印预览</el-button
+            >
+            <el-button icon="Printer" type="success" @click="printClick"
+              >打印</el-button
+            >
+          </el-col>
+          <el-col :span="8">
+            <el-radio-group
+              @change="initPageNumList"
+              v-model="yzOrderParam.printType"
+            >
+              <el-radio :label="1">打印新增</el-radio>
+              <el-radio :label="2">打印单页</el-radio>
+              <el-radio :label="3">打印某页后</el-radio>
+            </el-radio-group>
+          </el-col>
+          <el-col :span="4">
+            医嘱页号:
+            <el-select
+              v-model="yzOrderParam.pageNum"
+              placeholder="请选择"
+              style="width: 60px"
+            >
+              <el-option
+                v-for="item in pageNumList"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              ></el-option>
+            </el-select>
+          </el-col>
+          <el-col :span="4">
+            <el-button type="primary" @click="clearPrintPageClick"
+              >清空打印页号</el-button
+            >
+          </el-col>
+        </el-row>
+      </div>
+      <el-main>
+        <el-scrollbar height="400px">
+          <div id="cqYz">
+            <table id="pageTable">
+              <thead>
+                <tr>
+                  <td
+                    colspan="9"
+                    style="
+                      width: 100%;
+                      text-align: center;
+                      padding: 16px 0;
+                      border: none;
+                      font-size: 23px;
+                      font-weight: bold;
+                    "
+                  >
+                    {{ env.VITE_HOSPITAL_NAME }}<br />长期医嘱单
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="9" style="border: none">
+                    <div style="display: flex">
+                      <div style="width: 15%">姓名:{{ patientInfo.name }}</div>
+                      <div style="width: 15%">
+                        性别:{{ patientInfo.sexName }}
+                      </div>
+                      <div style="width: 15%">
+                        年龄:{{ companyFunc(patientInfo.age, "岁") }}
+                      </div>
+                      <div style="width: 15%">
+                        科别:{{ patientInfo.admissWardName }}
+                      </div>
+                      <div style="width: 18%">
+                        床号:{{ patientInfo.bedNo }}
+                      </div>
+                      <div>住院号:{{ patientInfo.inpatientNo }}</div>
                     </div>
-                </el-scrollbar>
-            </el-main>
-        </el-container>
+                  </td>
+                </tr>
+                <tr>
+                  <th style="height: 30px" colspan="5">
+                    起&nbsp;&nbsp;&nbsp;始
+                  </th>
+                  <th colspan="4">停&nbsp;&nbsp;&nbsp;止</th>
+                </tr>
+                <tr>
+                  <th style="width: 40px; height: 40px">日期</th>
+                  <th style="width: 40px">时间</th>
+                  <th>长期医嘱</th>
+                  <th style="width: 58px">医师签名</th>
+                  <th style="width: 85px">核对护士签名</th>
+                  <th style="width: 40px">日期</th>
+                  <th style="width: 40px">时间</th>
+                  <th style="width: 58px">医师签名</th>
+                  <th style="width: 85px">核对护士签名</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr v-for="(item, index) in yzPrintVOList">
+                  <td
+                    v-if="item.pageFlag == '1'"
+                    style="border: none"
+                    colspan="9"
+                  >
+                    第{{ item.printPage }}页
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="height: 40px">
+                    {{ item.date }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'">{{ item.time }}</td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.orderGroupNo }} {{ item.newOrderName }}
+                    {{ item.newOrderNameCode }} {{ item.frequCode }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.doctorName }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.nurseName }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'">{{ item.stopDate }}</td>
+                  <td v-if="item.pageFlag != '1'">{{ item.stopTime }}</td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.modifierName }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.execId2Name }}
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </el-scrollbar>
+      </el-main>
     </el-container>
+  </el-container>
 </template>
 
-<script setup name='cqYzPrint'>
-import PatientInfo from "@/components/medical-advice/PatientInfo.vue"
-import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue"
-import {cqYzPrint,getTotalPageNUm,recPrint,clearPrintPageNo} from "@/api/medical-advice/medical-advice-management";
-import {getLodop, initLodop} from '@/utils/c-lodop'
-import {onMounted} from "vue";
-import {stringNotBlank} from "@/utils/blank-utils";
-import { ElMessage, ElMessageBox } from 'element-plus'
+<script setup name="cqYzPrint">
+import PatientInfo from "@/components/medical-advice/PatientInfo.vue";
+import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue";
+import {
+  cqYzPrint,
+  getTotalPageNUm,
+  recPrint,
+  clearPrintPageNo,
+} from "@/api/medical-advice/medical-advice-management";
+import { getLodop, initLodop } from "@/utils/c-lodop";
+import { onMounted } from "vue";
+import { stringNotBlank } from "@/utils/blank-utils";
+import { ElMessage, ElMessageBox } from "element-plus";
+import env from "../../../utils/setting.js";
 // 基本信息
-const patientInfo = ref({})
-const yzType = ref('cq')
-const yzPrintVOList = ref([])
+const patientInfo = ref({});
+const yzType = ref("cq");
+const yzPrintVOList = ref([]);
 const companyFunc = (val, company) => {
-    if (stringNotBlank(val)) {
-        return val + company
-    } else {
-        return ''
-    }
-}
-
-const yzOrderParam=ref({
-    patNo:'',
-    times:null,
-    inOutStatusFlag:'',
-    type:1,
-    printType:1,
-    pageNum:'',
-})
-
+  if (stringNotBlank(val)) {
+    return val + company;
+  } else {
+    return "";
+  }
+};
 
+const yzOrderParam = ref({
+  patNo: "",
+  times: null,
+  inOutStatusFlag: "",
+  type: 1,
+  printType: 1,
+  pageNum: "",
+});
 
-const pageNumList= ref([])
+const pageNumList = ref([]);
 
 //
-const initPageNumList = ()=>{
-    yzOrderParam.value.pageNum = ''
-    yzPrintVOList.value = []
-    if(yzOrderParam.value.printType ===1){
-        pageNumList.value = []
-        return
+const initPageNumList = () => {
+  yzOrderParam.value.pageNum = "";
+  yzPrintVOList.value = [];
+  if (yzOrderParam.value.printType === 1) {
+    pageNumList.value = [];
+    return;
+  }
+  getTotalPageNUm(yzOrderParam.value).then(res => {
+    if (res.total) {
+      pageNumList.value = [];
+      for (let i = 0; i < res.total; i++) {
+        let param = { code: i + 1 + "", name: i + 1 + "" };
+        pageNumList.value.push(param);
+      }
+    } else {
+      pageNumList.value = [];
     }
-    getTotalPageNUm(yzOrderParam.value).then((res)=>{
-        if(res.total){
-            pageNumList.value = []
-            for (let i = 0; i <res.total ; i++) {
-                let param = {code: (i+1)+'',name: (i + 1) +''}
-                pageNumList.value.push(param)
-            }
-        }else {
-            pageNumList.value = []
-        }
-
-    })
-}
-
+  });
+};
 
-
-
-const yzPrintCss=`
+const yzPrintCss = `
 #pageTable tr td, #pageTable tr th {
     border: 1px solid black;
     text-align: center;
@@ -164,106 +228,119 @@ const yzPrintCss=`
     border-collapse: collapse;
 }
 
-`
+`;
 //清空
-const clearPrintPageClick = ()=>{
-    clearPrintPageNo(yzOrderParam.value).then((res)=>{
-        yzPrintVOList.value = []
-        pageNumList.value = []
-    })
-}
-
-
-
-const selectPatientInfo=(val)=>{
-    if(!stringNotBlank(val.patientInfo.inpatientNo)){
-        return ElMessage.error('请选中一个病人')
-    }
-    yzOrderParam.value.patNo=val.patientInfo.inpatientNo
-    yzOrderParam.value.times=val.patientInfo.admissTimes
-    yzOrderParam.value.inOutStatusFlag=val.inOutStatusFlag
-    clearInfo()
-}
-
-const clearInfo=()=>{
-    yzPrintVOList.value = []
-    yzOrderParam.value.pageNum = ''
-    yzOrderParam.value.printType = 1
-    pageNumList.value =[]
-}
+const clearPrintPageClick = () => {
+  clearPrintPageNo(yzOrderParam.value).then(res => {
+    yzPrintVOList.value = [];
+    pageNumList.value = [];
+  });
+};
 
+const selectPatientInfo = val => {
+  if (!stringNotBlank(val.patientInfo.inpatientNo)) {
+    return ElMessage.error("请选中一个病人");
+  }
+  yzOrderParam.value.patNo = val.patientInfo.inpatientNo;
+  yzOrderParam.value.times = val.patientInfo.admissTimes;
+  yzOrderParam.value.inOutStatusFlag = val.inOutStatusFlag;
+  clearInfo();
+};
 
-const queryInfo = ()=>{
-    cqYzPrint(yzOrderParam.value).then((res)=>{
-        patientInfo.value =  res.patientInfo
-        yzPrintVOList.value = res.yzPrintVOList
-    })
-}
+const clearInfo = () => {
+  yzPrintVOList.value = [];
+  yzOrderParam.value.pageNum = "";
+  yzOrderParam.value.printType = 1;
+  pageNumList.value = [];
+};
 
+const queryInfo = () => {
+  cqYzPrint(yzOrderParam.value).then(res => {
+    patientInfo.value = res.patientInfo;
+    yzPrintVOList.value = res.yzPrintVOList;
+  });
+};
 
 onMounted(() => {
-    initLodop()
-})
+  initLodop();
+});
 const daYingClick = () => {
-    let LODOP = getLodop()
-    LODOP.PRINT_INIT('长期医嘱单') // 初始化打印机 名字
-    LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
-    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-    LODOP.ADD_PRINT_TABLE('2mm', '5mm', '205mm', '220mm', '<style>' + yzPrintCss + '</style>' + '<body>' + document.getElementById('cqYz').innerHTML + '</body>') //要打印的内容
-    LODOP.PREVIEW() // 关闭
-}
-
-const printClick=()=>{
-    if(yzPrintVOList.value.length <=0){
-        return ElMessage.error('没有打印数据')
-    }
-    if(yzOrderParam.value.printType ===1){
-        recPrint(yzOrderParam.value).then((res)=>{
-        })
-    }
-    let LODOP = getLodop()
-    LODOP.PRINT_INIT('长期医嘱单') // 初始化打印机 名字
-    LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
-    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-    LODOP.ADD_PRINT_TABLE('2mm', '5mm', '205mm', '220mm', '<style>' + yzPrintCss + '</style>' + '<body>' + document.getElementById('cqYz').innerHTML + '</body>') //要打印的内容
-    LODOP.PRINT() // 关闭
-    queryInfo()
-
-}
-
+  let LODOP = getLodop();
+  LODOP.PRINT_INIT("长期医嘱单"); // 初始化打印机 名字
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小  A4
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_TABLE(
+    "2mm",
+    "5mm",
+    "205mm",
+    "220mm",
+    "<style>" +
+      yzPrintCss +
+      "</style>" +
+      "<body>" +
+      document.getElementById("cqYz").innerHTML +
+      "</body>"
+  ); //要打印的内容
+  LODOP.PREVIEW(); // 关闭
+};
 
+const printClick = () => {
+  if (yzPrintVOList.value.length <= 0) {
+    return ElMessage.error("没有打印数据");
+  }
+  if (yzOrderParam.value.printType === 1) {
+    recPrint(yzOrderParam.value).then(res => {});
+  }
+  let LODOP = getLodop();
+  LODOP.PRINT_INIT("长期医嘱单"); // 初始化打印机 名字
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小  A4
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_TABLE(
+    "2mm",
+    "5mm",
+    "205mm",
+    "220mm",
+    "<style>" +
+      yzPrintCss +
+      "</style>" +
+      "<body>" +
+      document.getElementById("cqYz").innerHTML +
+      "</body>"
+  ); //要打印的内容
+  LODOP.PRINT(); // 关闭
+  queryInfo();
+};
 </script>
 
 <style scoped>
-.nav{
-    margin: 0 auto;
-    width: 100%;
+.nav {
+  margin: 0 auto;
+  width: 100%;
 }
-ul{
-    list-style: none;
-    width: 100%;
+ul {
+  list-style: none;
+  width: 100%;
 }
-.nav li{
-    float: left;
-    margin-left: 10px;
-
+.nav li {
+  float: left;
+  margin-left: 10px;
 }
 #cqYz {
-    width: 753px;
-    padding: 0 0px;
+  width: 753px;
+  padding: 0 0px;
 }
 
-#pageTable tr td, #pageTable tr th {
-    border: 1px solid black;
-    text-align: center;
-    font-size: 12px;
+#pageTable tr td,
+#pageTable tr th {
+  border: 1px solid black;
+  text-align: center;
+  font-size: 12px;
 }
 #pageTable {
-    border-collapse: collapse;
+  border-collapse: collapse;
 }
 
-
-#pageTable tr  td {
-    height: 27px;
+#pageTable tr td {
+  height: 27px;
 }
 </style>

+ 291 - 216
src/views/medical-advice/advice-management/LsYzPrint.vue

@@ -1,146 +1,206 @@
 <template>
+  <el-container>
+    <el-aside width="210px">
+      <PatientBaseList
+        :yzType="yzType"
+        @selectPatientInfo="selectPatientInfo"
+      ></PatientBaseList>
+    </el-aside>
     <el-container>
-        <el-aside width="210px">
-            <PatientBaseList :yzType="yzType" @selectPatientInfo="selectPatientInfo" ></PatientBaseList>
-        </el-aside>
-        <el-container>
-            <el-header style="height: 150px">
-                <PatientInfo :patientInfo="patientInfo"></PatientInfo>
-            </el-header>
-            <div>
-                <el-row>
-                    <el-col :span="8">
-                        <el-button icon="Search" type="primary"  @click="queryInfo">查询</el-button>
-                        <el-button icon="Printer" type="success" @click="daYingClick">打印预览</el-button>
-                        <el-button icon="Printer" type="success" @click="printClick">打印</el-button>
-                    </el-col>
-                    <el-col :span="8">
-                        <el-radio-group @change="initPageNumList" v-model="yzOrderParam.printType">
-                            <el-radio :label="1">打印新增</el-radio>
-                            <el-radio :label="2">打印单页</el-radio>
-                            <el-radio :label="3">打印某页后</el-radio>
-                        </el-radio-group>
-                    </el-col>
-                    <el-col :span="4">
-                        医嘱页号:
-                        <el-select  v-model="yzOrderParam.pageNum" placeholder="请选择" style="width: 60px">
-                            <el-option v-for="item in pageNumList" :key="item.code" :label="item.name" :value="item.code"></el-option>
-                        </el-select>
-                    </el-col>
-                    <el-col :span="4">
-                        <el-button  type="primary" @click="clearPrintPageClick">清空打印页号</el-button>
-                    </el-col>
-                </el-row>
-            </div>
-            <el-main>
-                <el-scrollbar height="400px">
-                    <div id="cqYz">
-                        <table id="pageTable">
-                            <thead>
-                            <tr>
-                                <td colspan="7" style="width: 100%; text-align: center; padding: 16px 0; border: none;font-size:23px;font-weight:bold">长沙泰和医院<br/>临时医嘱单</td>
-                            </tr>
-                            <tr>
-                                <td colspan="7" style="border: none">
-                                    <div style="display: flex;">
-                                        <div style="width: 15%">姓名:{{patientInfo.name}}</div>
-                                        <div style="width: 15%">性别:{{patientInfo.sexName}}</div>
-                                        <div style="width: 15%">年龄:{{companyFunc(patientInfo.age,'岁')}}</div>
-                                        <div style="width: 15%">科别:{{patientInfo.admissWardName}}</div>
-                                        <div style="width: 18%">床号:{{patientInfo.bedNo}}</div>
-                                        <div>住院号:{{patientInfo.inpatientNo}}</div>
-                                    </div>
-                                </td>
-                            </tr>
-                            <tr>
-                                <th style="width: 40px;height: 40px">日期</th>
-                                <th style="width: 38px">时间</th>
-                                <th >临时医嘱</th>
-                                <th style="width: 58px">医师签名</th>
-                                <th style="width: 85px">核对护士签名</th>
-                                <th style="width: 80px">执行时间</th>
-                                <th style="width: 85px">执行护士签名</th>
-                            </tr>
-                            </thead>
-                            <tbody>
-                            <tr   v-for="(item,index) in yzPrintVOList">
-                                <td v-if="item.pageFlag=='1'" style="border: none" colspan="7">第{{item.printPageOnce}}页</td>
-                                <td v-if="item.pageFlag !='1'"  style="height: 40px">{{item.date}}</td>
-                                <td v-if="item.pageFlag !='1'">{{item.time}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.orderGroupNo}} {{item.newOrderName}} {{item.newOrderNameCode}} {{item.frequCode}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.doctorName}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.nurseName}}</td>
-                                <td v-if="item.pageFlag !='1'" >{{item.execTimeStr}}</td>
-                                <td v-if="item.pageFlag !='1'" style="text-align: left">{{item.execIdName}}</td>
-                            </tr>
-                            </tbody>
-                        </table>
+      <el-header style="height: 150px">
+        <PatientInfo :patientInfo="patientInfo"></PatientInfo>
+      </el-header>
+      <div>
+        <el-row>
+          <el-col :span="8">
+            <el-button icon="Search" type="primary" @click="queryInfo"
+              >查询</el-button
+            >
+            <el-button icon="Printer" type="success" @click="daYingClick"
+              >打印预览</el-button
+            >
+            <el-button icon="Printer" type="success" @click="printClick"
+              >打印</el-button
+            >
+          </el-col>
+          <el-col :span="8">
+            <el-radio-group
+              @change="initPageNumList"
+              v-model="yzOrderParam.printType"
+            >
+              <el-radio :label="1">打印新增</el-radio>
+              <el-radio :label="2">打印单页</el-radio>
+              <el-radio :label="3">打印某页后</el-radio>
+            </el-radio-group>
+          </el-col>
+          <el-col :span="4">
+            医嘱页号:
+            <el-select
+              v-model="yzOrderParam.pageNum"
+              placeholder="请选择"
+              style="width: 60px"
+            >
+              <el-option
+                v-for="item in pageNumList"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              ></el-option>
+            </el-select>
+          </el-col>
+          <el-col :span="4">
+            <el-button type="primary" @click="clearPrintPageClick"
+              >清空打印页号</el-button
+            >
+          </el-col>
+        </el-row>
+      </div>
+      <el-main>
+        <el-scrollbar height="400px">
+          <div id="cqYz">
+            <table id="pageTable">
+              <thead>
+                <tr>
+                  <td
+                    colspan="7"
+                    style="
+                      width: 100%;
+                      text-align: center;
+                      padding: 16px 0;
+                      border: none;
+                      font-size: 23px;
+                      font-weight: bold;
+                    "
+                  >
+                    {{ env.VITE_HOSPITAL_NAME }}<br />临时医嘱单
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="7" style="border: none">
+                    <div style="display: flex">
+                      <div style="width: 15%">姓名:{{ patientInfo.name }}</div>
+                      <div style="width: 15%">
+                        性别:{{ patientInfo.sexName }}
+                      </div>
+                      <div style="width: 15%">
+                        年龄:{{ companyFunc(patientInfo.age, "岁") }}
+                      </div>
+                      <div style="width: 15%">
+                        科别:{{ patientInfo.admissWardName }}
+                      </div>
+                      <div style="width: 18%">
+                        床号:{{ patientInfo.bedNo }}
+                      </div>
+                      <div>住院号:{{ patientInfo.inpatientNo }}</div>
                     </div>
-                </el-scrollbar>
-            </el-main>
-        </el-container>
+                  </td>
+                </tr>
+                <tr>
+                  <th style="width: 40px; height: 40px">日期</th>
+                  <th style="width: 38px">时间</th>
+                  <th>临时医嘱</th>
+                  <th style="width: 58px">医师签名</th>
+                  <th style="width: 85px">核对护士签名</th>
+                  <th style="width: 80px">执行时间</th>
+                  <th style="width: 85px">执行护士签名</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr v-for="(item, index) in yzPrintVOList">
+                  <td
+                    v-if="item.pageFlag == '1'"
+                    style="border: none"
+                    colspan="7"
+                  >
+                    第{{ item.printPageOnce }}页
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="height: 40px">
+                    {{ item.date }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'">{{ item.time }}</td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.orderGroupNo }} {{ item.newOrderName }}
+                    {{ item.newOrderNameCode }} {{ item.frequCode }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.doctorName }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.nurseName }}
+                  </td>
+                  <td v-if="item.pageFlag != '1'">{{ item.execTimeStr }}</td>
+                  <td v-if="item.pageFlag != '1'" style="text-align: left">
+                    {{ item.execIdName }}
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </el-scrollbar>
+      </el-main>
     </el-container>
+  </el-container>
 </template>
 
-<script setup name='lsYzPrint'>
-import PatientInfo from "@/components/medical-advice/PatientInfo.vue"
-import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue"
-import {lsYzPrint,getTotalPageNUm,recPrint,clearPrintPageNo} from "@/api/medical-advice/medical-advice-management";
-import {getLodop, initLodop} from '@/utils/c-lodop'
-import {onMounted} from "vue";
-import {stringNotBlank} from "@/utils/blank-utils";
-import { ElMessage, ElMessageBox } from 'element-plus'
+<script setup name="lsYzPrint">
+import PatientInfo from "@/components/medical-advice/PatientInfo.vue";
+import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue";
+import {
+  lsYzPrint,
+  getTotalPageNUm,
+  recPrint,
+  clearPrintPageNo,
+} from "@/api/medical-advice/medical-advice-management";
+import { getLodop, initLodop } from "@/utils/c-lodop";
+import { onMounted } from "vue";
+import { stringNotBlank } from "@/utils/blank-utils";
+import { ElMessage, ElMessageBox } from "element-plus";
+import env from "../../../utils/setting.js";
 // 基本信息
-const patientInfo = ref({})
-const yzType = ref('cq')
-const yzPrintVOList = ref([])
+const patientInfo = ref({});
+const yzType = ref("cq");
+const yzPrintVOList = ref([]);
 const companyFunc = (val, company) => {
-    if (stringNotBlank(val)) {
-        return val + company
-    } else {
-        return ''
-    }
-}
+  if (stringNotBlank(val)) {
+    return val + company;
+  } else {
+    return "";
+  }
+};
 
-const yzOrderParam=ref({
-    patNo:'',
-    times:null,
-    inOutStatusFlag:'',
-    type:2,
-    printType:1,
-    pageNum:'',
-})
+const yzOrderParam = ref({
+  patNo: "",
+  times: null,
+  inOutStatusFlag: "",
+  type: 2,
+  printType: 1,
+  pageNum: "",
+});
 
-
-
-const pageNumList= ref([])
+const pageNumList = ref([]);
 
 //
-const initPageNumList = ()=>{
-    yzOrderParam.value.pageNum = ''
-    yzPrintVOList.value = []
-    if(yzOrderParam.value.printType ===1){
-        pageNumList.value = []
-        return
+const initPageNumList = () => {
+  yzOrderParam.value.pageNum = "";
+  yzPrintVOList.value = [];
+  if (yzOrderParam.value.printType === 1) {
+    pageNumList.value = [];
+    return;
+  }
+  getTotalPageNUm(yzOrderParam.value).then(res => {
+    if (res.total) {
+      pageNumList.value = [];
+      for (let i = 0; i < res.total; i++) {
+        let param = { code: i + 1 + "", name: i + 1 + "" };
+        pageNumList.value.push(param);
+      }
+    } else {
+      pageNumList.value = [];
     }
-    getTotalPageNUm(yzOrderParam.value).then((res)=>{
-        if(res.total){
-            pageNumList.value = []
-            for (let i = 0; i <res.total ; i++) {
-                let param = {code: (i+1)+'',name: (i + 1) +''}
-                pageNumList.value.push(param)
-            }
-        }else {
-            pageNumList.value = []
-        }
-
-    })
-}
-
-
-
+  });
+};
 
-const yzPrintCss=`
+const yzPrintCss = `
 #pageTable tr td, #pageTable tr th {
 border: 1px solid black;
 text-align: center;
@@ -156,104 +216,119 @@ height: 27px;
 border-collapse: collapse;
 }
 
-`
+`;
 //清空
-const clearPrintPageClick = ()=>{
-    clearPrintPageNo(yzOrderParam.value).then((res)=>{
-        yzPrintVOList.value = []
-        pageNumList.value = []
-    })
-}
-
-
+const clearPrintPageClick = () => {
+  clearPrintPageNo(yzOrderParam.value).then(res => {
+    yzPrintVOList.value = [];
+    pageNumList.value = [];
+  });
+};
 
-const selectPatientInfo=(val)=>{
-    if(!stringNotBlank(val.patientInfo.inpatientNo)){
-        return ElMessage.error('请选中一个病人')
-    }
-    yzOrderParam.value.patNo=val.patientInfo.inpatientNo
-    yzOrderParam.value.times=val.patientInfo.admissTimes
-    yzOrderParam.value.inOutStatusFlag=val.inOutStatusFlag
-    clearInfo()
-}
+const selectPatientInfo = val => {
+  if (!stringNotBlank(val.patientInfo.inpatientNo)) {
+    return ElMessage.error("请选中一个病人");
+  }
+  yzOrderParam.value.patNo = val.patientInfo.inpatientNo;
+  yzOrderParam.value.times = val.patientInfo.admissTimes;
+  yzOrderParam.value.inOutStatusFlag = val.inOutStatusFlag;
+  clearInfo();
+};
 
-const queryInfo = ()=>{
-    lsYzPrint(yzOrderParam.value).then((res)=>{
-        patientInfo.value =  res.patientInfo
-        yzPrintVOList.value = res.yzPrintVOList
-    })
-}
+const queryInfo = () => {
+  lsYzPrint(yzOrderParam.value).then(res => {
+    patientInfo.value = res.patientInfo;
+    yzPrintVOList.value = res.yzPrintVOList;
+  });
+};
 
-const clearInfo=()=>{
-    yzPrintVOList.value = []
-    yzOrderParam.value.pageNum = ''
-    yzOrderParam.value.printType = 1
-    pageNumList.value =[]
-}
+const clearInfo = () => {
+  yzPrintVOList.value = [];
+  yzOrderParam.value.pageNum = "";
+  yzOrderParam.value.printType = 1;
+  pageNumList.value = [];
+};
 
 onMounted(() => {
-    initLodop()
-})
+  initLodop();
+});
 const daYingClick = () => {
-    let LODOP = getLodop()
-    LODOP.PRINT_INIT('长期医嘱单') // 初始化打印机 名字
-    LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
-    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-    LODOP.ADD_PRINT_TABLE('2mm', '5mm', '205mm', '220mm', '<style>' + yzPrintCss + '</style>' + '<body>' + document.getElementById('cqYz').innerHTML + '</body>') //要打印的内容
-    LODOP.PREVIEW() // 关闭
-}
-
-const printClick=()=>{
-    if(yzPrintVOList.value.length <=0){
-        return ElMessage.error('没有打印数据')
-    }
-    if(yzOrderParam.value.printType ===1){
-        recPrint(yzOrderParam.value).then((res)=>{
-        })
-    }
-    let LODOP = getLodop()
-    LODOP.PRINT_INIT('长期医嘱单') // 初始化打印机 名字
-    LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小  A4
-    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-    LODOP.ADD_PRINT_TABLE('2mm', '5mm', '205mm', '220mm', '<style>' + yzPrintCss + '</style>' + '<body>' + document.getElementById('cqYz').innerHTML + '</body>') //要打印的内容
-    LODOP.PRINT() // 关闭
-    queryInfo()
-
-}
-
+  let LODOP = getLodop();
+  LODOP.PRINT_INIT("长期医嘱单"); // 初始化打印机 名字
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小  A4
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_TABLE(
+    "2mm",
+    "5mm",
+    "205mm",
+    "220mm",
+    "<style>" +
+      yzPrintCss +
+      "</style>" +
+      "<body>" +
+      document.getElementById("cqYz").innerHTML +
+      "</body>"
+  ); //要打印的内容
+  LODOP.PREVIEW(); // 关闭
+};
 
+const printClick = () => {
+  if (yzPrintVOList.value.length <= 0) {
+    return ElMessage.error("没有打印数据");
+  }
+  if (yzOrderParam.value.printType === 1) {
+    recPrint(yzOrderParam.value).then(res => {});
+  }
+  let LODOP = getLodop();
+  LODOP.PRINT_INIT("长期医嘱单"); // 初始化打印机 名字
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小  A4
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_TABLE(
+    "2mm",
+    "5mm",
+    "205mm",
+    "220mm",
+    "<style>" +
+      yzPrintCss +
+      "</style>" +
+      "<body>" +
+      document.getElementById("cqYz").innerHTML +
+      "</body>"
+  ); //要打印的内容
+  LODOP.PRINT(); // 关闭
+  queryInfo();
+};
 </script>
 
 <style scoped>
-    .nav{
-        margin: 0 auto;
-        width: 100%;
-    }
-    ul{
-        list-style: none;
-        width: 100%;
-    }
-    .nav li{
-        float: left;
-        margin-left: 10px;
-
-    }
-    #cqYz {
-        width: 753px;
-        padding: 0 0px;
-    }
-
-    #pageTable tr td, #pageTable tr th {
-        border: 1px solid black;
-        text-align: center;
-        font-size: 12px;
-    }
-    #pageTable {
-        border-collapse: collapse;
-    }
+.nav {
+  margin: 0 auto;
+  width: 100%;
+}
+ul {
+  list-style: none;
+  width: 100%;
+}
+.nav li {
+  float: left;
+  margin-left: 10px;
+}
+#cqYz {
+  width: 753px;
+  padding: 0 0px;
+}
 
+#pageTable tr td,
+#pageTable tr th {
+  border: 1px solid black;
+  text-align: center;
+  font-size: 12px;
+}
+#pageTable {
+  border-collapse: collapse;
+}
 
-    #pageTable tr  td {
-        height: 27px;
-    }
+#pageTable tr td {
+  height: 27px;
+}
 </style>

File diff suppressed because it is too large
+ 1634 - 1131
src/views/medical-advice/nursing-manage/NursingRecord.vue


+ 172 - 101
src/views/medical-insurance/allpatient/SiSettleDetailList.vue

@@ -1,23 +1,55 @@
 <template>
   <div style="display: flex; width: 100%">
     <div id="listPage" :style="pageStyle">
-      <div style="width: 100%; text-align: center; font-size: 22px; font-weight: bold; margin-bottom: 8px">{{ listTitle }}</div>
-      <div style="width: 100%; display: flex; margin-bottom: 4px; font-size: 12px">
-        <div style="width: 25%; text-align: left">医疗机构名称:长沙泰和医院</div>
-        <div style="width: 25%">医疗机构编码:H43010500370</div>
+      <div
+        style="
+          width: 100%;
+          text-align: center;
+          font-size: 22px;
+          font-weight: bold;
+          margin-bottom: 8px;
+        "
+      >
+        {{ listTitle }}
+      </div>
+      <div
+        style="width: 100%; display: flex; margin-bottom: 4px; font-size: 12px"
+      >
+        <div style="width: 25%; text-align: left">
+          医疗机构名称:{{ env.VITE_HOSPITAL_NAME }}
+        </div>
+        <div style="width: 25%">医疗机构编码:{{ env.VITE_HOSPITAL_CODE }}</div>
         <div style="width: 25%">医院等级:三级综合</div>
         <div style="width: 25%; text-align: right">金额单位:元</div>
       </div>
-      <div style="width: 100%; display: flex; margin-bottom: 8px; font-size: 12px">
-        <div style="width: 25%; text-align: left">统筹区划:{{ setlinfo.insuplcAdmdvsName }}</div>
+      <div
+        style="width: 100%; display: flex; margin-bottom: 8px; font-size: 12px"
+      >
+        <div style="width: 25%; text-align: left">
+          统筹区划:{{ setlinfo.insuplcAdmdvsName }}
+        </div>
         <div style="width: 25%">{{ patNoType }}:{{ setlinfo.patNo }}</div>
         <div style="width: 25%">就诊号:{{ setlinfo.mdtrtId }}</div>
         <div style="width: 25%; text-align: right">打印日期:{{ nowdate }}</div>
       </div>
-      <InpatientSetlList v-if="outParam.type === 21" :setlinfo="setlinfo"/>
-      <OtherOutpatientSetlList v-if="outParam.type === 11 && !isEmployeeOutpatient" :setlinfo="setlinfo"/>
-      <EmployeeOutpatientSetlList v-if="outParam.type === 11 && isEmployeeOutpatient" :setlinfo="setlinfo"/>
-      <div v-if="outParam.type !== 0" style="display: flex;margin-top: 16px;text-align: left;font-size: 13px">
+      <InpatientSetlList v-if="outParam.type === 21" :setlinfo="setlinfo" />
+      <OtherOutpatientSetlList
+        v-if="outParam.type === 11 && !isEmployeeOutpatient"
+        :setlinfo="setlinfo"
+      />
+      <EmployeeOutpatientSetlList
+        v-if="outParam.type === 11 && isEmployeeOutpatient"
+        :setlinfo="setlinfo"
+      />
+      <div
+        v-if="outParam.type !== 0"
+        style="
+          display: flex;
+          margin-top: 16px;
+          text-align: left;
+          font-size: 13px;
+        "
+      >
         <div style="width: 30%">患者/家属签字:</div>
         <div style="width: 30%">联系电话:</div>
         <div style="width: 20%">经办人:{{ setlinfo.staffName }}</div>
@@ -27,19 +59,40 @@
     <div v-if="showOperatePane" style="margin-left: 30px; padding: 20px 0">
       <div>
         <div style="display: inline-block; width: 70px">患者类别:</div>
-        <el-radio v-model="outParam.type" :label="21" @change="setlTypeChange">住院</el-radio>
-        <el-radio v-model="outParam.type" :label="11" @change="setlTypeChange">门诊</el-radio>
+        <el-radio v-model="outParam.type" :label="21" @change="setlTypeChange"
+          >住院</el-radio
+        >
+        <el-radio v-model="outParam.type" :label="11" @change="setlTypeChange"
+          >门诊</el-radio
+        >
       </div>
       <div style="margin-top: 8px">
-        <el-input v-model="outParam.patNo" clearable :placeholder="patNoType"></el-input>
+        <el-input
+          v-model="outParam.patNo"
+          clearable
+          :placeholder="patNoType"
+        ></el-input>
       </div>
       <div style="margin-top: 8px">
-        <el-select v-model="outParam.label" @focus="getTimesList" placeholder="结算条目" style="width: 230px">
-          <el-option v-for="item in timesList" :key="item.setlId" :value="item.label">
-            <span style="color: #8492a6; font-size: 12px">{{ item.times }}</span>
+        <el-select
+          v-model="outParam.label"
+          @focus="getTimesList"
+          placeholder="结算条目"
+          style="width: 230px"
+        >
+          <el-option
+            v-for="item in timesList"
+            :key="item.setlId"
+            :value="item.label"
+          >
+            <span style="color: #8492a6; font-size: 12px">{{
+              item.times
+            }}</span>
             <el-divider direction="vertical"></el-divider>
             <span v-show="outParam.type === 21">
-              <span style="color: #8492a6; font-size: 12px">{{ item.ledgerSn }}</span>
+              <span style="color: #8492a6; font-size: 12px">{{
+                item.ledgerSn
+              }}</span>
               <el-divider direction="vertical"></el-divider>
             </span>
             <span>{{ item.endtime }}</span>
@@ -48,9 +101,18 @@
       </div>
       <div style="width: 100%; text-align: right; margin-top: 8px">
         <el-button icon="Printer" @click="siPrint">打印</el-button>
-        <el-button type="primary" icon="Search" @click="executeQrySetlinfo"> 查找</el-button>
+        <el-button type="primary" icon="Search" @click="executeQrySetlinfo">
+          查找</el-button
+        >
       </div>
-      <div style="width: 100%; text-align: right; margin-top: 32px; text-decoration: underline">
+      <div
+        style="
+          width: 100%;
+          text-align: right;
+          margin-top: 32px;
+          text-decoration: underline;
+        "
+      >
         <a href="http://webhis.thyy.cn:8888/LODOP/Lodop.zip">下载打印控件</a>
       </div>
     </div>
@@ -61,139 +123,148 @@
 </template>
 
 <script setup>
-import {initLodop, getLodop} from '@/utils/c-lodop'
-import {computed, onMounted, reactive, ref} from 'vue'
-import {ElMessage} from 'element-plus'
-import router from '@/router'
-import {querySiSetlList, fetchSiTimesList} from '@/api/medical-insurance/si-query'
-import {getDate} from '@/utils/date'
+import { initLodop, getLodop } from "@/utils/c-lodop";
+import { computed, onMounted, reactive, ref } from "vue";
+import { ElMessage } from "element-plus";
+import router from "@/router";
+import {
+  querySiSetlList,
+  fetchSiTimesList,
+} from "@/api/medical-insurance/si-query";
+import { getDate } from "@/utils/date";
 import InpatientSetlList from "@/components/medical-insurance/settle-detail-list/InpatientSetlList.vue";
 import OtherOutpatientSetlList from "@/components/medical-insurance/settle-detail-list/OtherOutpatientSetlList.vue";
-import EmployeeOutpatientSetlList
-  from "@/components/medical-insurance/settle-detail-list/EmployeeOutpatientSetlList.vue";
+import EmployeeOutpatientSetlList from "@/components/medical-insurance/settle-detail-list/EmployeeOutpatientSetlList.vue";
+import env from "../../../utils/setting.js";
 
-const path = router.currentRoute.value.fullPath
-const showOperatePane = path === '/medins/qryManage/siSettleDetailList'
+const path = router.currentRoute.value.fullPath;
+const showOperatePane = path === "/medins/qryManage/siSettleDetailList";
 const pageStyle = {
-  height: window.innerHeight + 'px',
-  overflowY: 'scroll',
-  width: '856px',
-  textAlign: 'center',
-  padding: '20px',
-  background: 'white',
-}
+  height: window.innerHeight + "px",
+  overflowY: "scroll",
+  width: "856px",
+  textAlign: "center",
+  padding: "20px",
+  background: "white",
+};
 const outParam = reactive({
   type: 21,
   patNo: null,
   label: null,
   hisOrdNum: null,
-})
+});
 const patNoType = computed(() => {
-  return outParam.type === 21 ? '住院号' : '门诊ID'
-})
-const oldPatNo = ref(null)
-const timesList = ref([])
+  return outParam.type === 21 ? "住院号" : "门诊ID";
+});
+const oldPatNo = ref(null);
+const timesList = ref([]);
 const getTimesList = () => {
   if (!outParam.patNo) {
-    return
+    return;
   }
   if (oldPatNo.value === outParam.patNo) {
-    return
+    return;
   }
-  oldPatNo.value = outParam.patNo
+  oldPatNo.value = outParam.patNo;
   fetchSiTimesList(outParam.patNo, outParam.type)
-      .then((res) => {
-        timesList.value = res
-      })
-      .catch(() => {
-        timesList.value = []
-        outParam.label = null
-      })
-}
+    .then(res => {
+      timesList.value = res;
+    })
+    .catch(() => {
+      timesList.value = [];
+      outParam.label = null;
+    });
+};
 
 const setlTypeChange = () => {
-  timesList.value = []
-  outParam.patNo = null
-  outParam.label = null
-  oldPatNo.value = null
+  timesList.value = [];
+  outParam.patNo = null;
+  outParam.label = null;
+  oldPatNo.value = null;
   setlinfo.value = {
-    mdtrtId: '',
+    mdtrtId: "",
     cuminfo: {},
     chrgItemLvInfo: {},
     polItemInfo: {},
-  }
-}
+  };
+};
 
 const listTitle = computed(() => {
   if (outParam.type === 0) {
-    return '湖南省长沙市城乡居民医疗费用“一站式”结算单'
+    return "湖南省长沙市城乡居民医疗费用“一站式”结算单";
   } else if (outParam.type === 21) {
-    return '湖南省长沙市住院费用结算单'
+    return "湖南省长沙市住院费用结算单";
   }
   if (!isEmployeeOutpatient.value) {
-    return '湖南省长沙市(普通、特殊)门诊费用结算单'
+    return "湖南省长沙市(普通、特殊)门诊费用结算单";
   }
-  return isProvincial.value ? '湖南省省本级门诊统筹费用结算单' : '湖南省长沙市门诊统筹费用结算单';
-})
-const nowdate = getDate()
+  return isProvincial.value
+    ? "湖南省省本级门诊统筹费用结算单"
+    : "湖南省长沙市门诊统筹费用结算单";
+});
+const nowdate = getDate();
 const setlinfo = ref({
-  mdtrtId: '',
+  mdtrtId: "",
   cuminfo: {},
   chrgItemLvInfo: {},
-  polItemInfo: {}
-})
-const isEmployeeOutpatient = ref(false)
-const isProvincial = ref(false)
+  polItemInfo: {},
+});
+const isEmployeeOutpatient = ref(false);
+const isProvincial = ref(false);
 const executeQrySetlinfo = () => {
   setlinfo.value = {
-    mdtrtId: '',
+    mdtrtId: "",
     cuminfo: {},
     chrgItemLvInfo: {},
     polItemInfo: {},
-  }
-  querySiSetlList(outParam).then((res) => {
-    setlinfo.value = res
-    isEmployeeOutpatient.value = res.insutype === '310'
-    isProvincial.value = res.insuplcAdmdvs === '439900'
-  })
-}
+  };
+  querySiSetlList(outParam).then(res => {
+    setlinfo.value = res;
+    isEmployeeOutpatient.value = res.insutype === "310";
+    isProvincial.value = res.insuplcAdmdvs === "439900";
+  });
+};
 
 const siPrint = () => {
   if (!setlinfo.value.mdtrtId) {
     ElMessage({
-      message: '无法打印空白的结算清单!',
-      type: 'warning',
+      message: "无法打印空白的结算清单!",
+      type: "warning",
       duration: 2000,
       showClose: true,
-    })
-    return
+    });
+    return;
   }
   const prntStyle =
-      '<style>table {width: 100%;border-collapse: collapse; font-size: 13px;} td {border: 1px solid black;height: 20px;text-align:center; font-size: 13px;}</style>'
-  const strFormHtml = prntStyle + '<body>' + document.getElementById('listPage').innerHTML + '</body>'
-  let LODOP = getLodop()
-  LODOP.PRINT_INIT('siSettleDetailList')
-  LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
-  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-  LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strFormHtml)
-  LODOP.SET_PRINT_STYLE('ItemType', 3)
+    "<style>table {width: 100%;border-collapse: collapse; font-size: 13px;} td {border: 1px solid black;height: 20px;text-align:center; font-size: 13px;}</style>";
+  const strFormHtml =
+    prntStyle +
+    "<body>" +
+    document.getElementById("listPage").innerHTML +
+    "</body>";
+  let LODOP = getLodop();
+  LODOP.PRINT_INIT("siSettleDetailList");
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", "");
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_HTM("2mm", "5mm", "100%", "100%", strFormHtml);
+  LODOP.SET_PRINT_STYLE("ItemType", 3);
   if (outParam.type === 0) {
-    LODOP.ADD_PRINT_TEXT('280mm', '190mm', '20mm', '2mm', '第#页/共&页')
+    LODOP.ADD_PRINT_TEXT("280mm", "190mm", "20mm", "2mm", "第#页/共&页");
   }
-  LODOP.PREVIEW()
-}
+  LODOP.PREVIEW();
+};
 
 onMounted(() => {
-  initLodop()
+  initLodop();
   if (!showOperatePane) {
-    const params = router.currentRoute.value.params
-    outParam.type = 11
-    outParam.patNo = params.patientId
-    outParam.times = params.times
-    outParam.label = null
-    executeQrySetlinfo()
+    const params = router.currentRoute.value.params;
+    outParam.type = 11;
+    outParam.patNo = params.patientId;
+    outParam.times = params.times;
+    outParam.label = null;
+    executeQrySetlinfo();
   }
-})
+});
 </script>
 
 <style scoped>

+ 171 - 137
src/views/medical-insurance/outpatient/DigitalRx.vue

@@ -5,28 +5,45 @@
         <CyDateRange style="width: 220px" />
         <el-select v-model="indexInquiry.state" style="width: 100px">
           <el-option
-              v-for="item in allState"
-              :value="item.code"
-              :key="item.code"
-              :label="item.label"
+            v-for="item in allState"
+            :value="item.code"
+            :key="item.code"
+            :label="item.label"
           ></el-option>
         </el-select>
         <el-divider direction="vertical"></el-divider>
         <el-button
-            plain
-            circle
-            type="primary"
-            icon="Search"
-            title="检索"
-            @click="refreshRxList"
+          plain
+          circle
+          type="primary"
+          icon="Search"
+          title="检索"
+          @click="refreshRxList"
         ></el-button>
       </div>
-      <el-table :data="rxList" stripe highlight-current-row @row-click="handleClickRow">
-        <el-table-column prop="patnName" label="患者姓名" width="90"></el-table-column>
-        <el-table-column prop="prscDrName" label="开具医师" width="90"></el-table-column>
-        <el-table-column prop="prscTime" label="开具时间" width="140"></el-table-column>
+      <el-table
+        :data="rxList"
+        stripe
+        highlight-current-row
+        @row-click="handleClickRow"
+      >
+        <el-table-column
+          prop="patnName"
+          label="患者姓名"
+          width="90"
+        ></el-table-column>
+        <el-table-column
+          prop="prscDrName"
+          label="开具医师"
+          width="90"
+        ></el-table-column>
+        <el-table-column
+          prop="prscTime"
+          label="开具时间"
+          width="140"
+        ></el-table-column>
         <el-table-column label="处方状态" width="100">
-          <template #default="{row}">
+          <template #default="{ row }">
             {{ filterRxState(row.state) }}
           </template>
         </el-table-column>
@@ -35,45 +52,55 @@
     <div class="layout_main layout_container">
       <header class="round-header">
         <el-button
-            type="primary"
-            @click="doPreCheck"
-            :disabled="currentRow.state !== 'NEW_RECEIPT' && currentRow.state !== 'REVOKED'"
-        >处方预核验</el-button>
+          type="primary"
+          @click="doPreCheck"
+          :disabled="
+            currentRow.state !== 'NEW_RECEIPT' && currentRow.state !== 'REVOKED'
+          "
+          >处方预核验</el-button
+        >
         <el-button
-            type="primary"
-            @click="doRxSign"
-            :disabled="currentRow.state !== 'PRE_CHECKED'"
-        >处方签名</el-button>
+          type="primary"
+          @click="doRxSign"
+          :disabled="currentRow.state !== 'PRE_CHECKED'"
+          >处方签名</el-button
+        >
         <el-button
-            type="primary"
-            @click="doRxUpload"
-            :disabled="currentRow.state !== 'SIGNED'"
-        >处方上传</el-button>
+          type="primary"
+          @click="doRxUpload"
+          :disabled="currentRow.state !== 'SIGNED'"
+          >处方上传</el-button
+        >
         <el-button
-            type="primary"
-            @click="doRxInfoQuery"
-            :disabled="currentRow.state !== 'UPLOADED'"
-        >处方查询</el-button>
+          type="primary"
+          @click="doRxInfoQuery"
+          :disabled="currentRow.state !== 'UPLOADED'"
+          >处方查询</el-button
+        >
         <el-button
-            type="primary"
-            @click="doRxAuditingQuery"
-            :disabled="currentRow.state !== 'UPLOADED'"
-        >审核查询</el-button>
+          type="primary"
+          @click="doRxAuditingQuery"
+          :disabled="currentRow.state !== 'UPLOADED'"
+          >审核查询</el-button
+        >
         <el-button
-            type="primary"
-            @click="doRxSettleQuery"
-            :disabled="currentRow.state !== 'UPLOADED'"
-        >结算查询</el-button>
+          type="primary"
+          @click="doRxSettleQuery"
+          :disabled="currentRow.state !== 'UPLOADED'"
+          >结算查询</el-button
+        >
         <el-button
-            type="danger"
-            @click="doRxRevoke"
-            :disabled="currentRow.state !== 'UPLOADED'"
-        >撤销上传</el-button>
+          type="danger"
+          @click="doRxRevoke"
+          :disabled="currentRow.state !== 'UPLOADED'"
+          >撤销上传</el-button
+        >
         <el-button
-            type="danger"
-            @click="doRegRevoke"
-            :disabled="currentRow.state !== 'NEW_RECEIPT'"
-        >撤销门诊登记)</el-button>
+          type="danger"
+          @click="doRegRevoke"
+          :disabled="currentRow.state !== 'NEW_RECEIPT'"
+          >撤销门诊登记)</el-button
+        >
       </header>
       <div class="layout_main">
         <iframe class="layout_full_iframe" :src="pdfSrc" />
@@ -82,21 +109,19 @@
     <el-dialog v-model="showRemoteRx" fullscreen>
       <div class="rx-from-query-box">
         <div class="title-box">
-          <h2>长沙泰和医院医保电子处方笺</h2>
+          <h2>{{ env.VITE_HOSPITAL_NAME }}医保电子处方笺</h2>
           <div class="under-title">
-            <span>
-              医保处方编号:{{ rxFromQuery.hiRxno }}
-            </span>
-            <span>
-              处方状态:{{ rxFromQuery.rxStasName }}
-            </span>
+            <span> 医保处方编号:{{ rxFromQuery.hiRxno }} </span>
+            <span> 处方状态:{{ rxFromQuery.rxStasName }} </span>
           </div>
         </div>
 
         <div class="mdtrt-box">
           <div class="flex-line">
             <div>姓名:{{ rxFromQuery.rxOtpinfo.patnName }}</div>
-            <div>性别:{{ rxFromQuery.rxOtpinfo.gend === '1' ? '男' : '女' }}</div>
+            <div>
+              性别:{{ rxFromQuery.rxOtpinfo.gend === "1" ? "男" : "女" }}
+            </div>
             <div>年龄:{{ rxFromQuery.rxOtpinfo.patnAge }}岁</div>
           </div>
           <div class="flex-line">
@@ -117,15 +142,20 @@
             <div v-for="(rx, index) in rxFromQuery.rxDetlList" :key="index">
               <div class="flex-line">
                 <div class="bold-text">
-                  {{ index + 1 }}).&nbsp;{{ rx.drugGenname }}({{ rx.drugSpec }})
+                  {{ index + 1 }}).&nbsp;{{ rx.drugGenname }}({{
+                    rx.drugSpec
+                  }})
                 </div>
                 <div>
-                  x&nbsp;&nbsp;&nbsp;&nbsp;{{ rx.drugTotlcnt }}{{ rx.drugTotlcntEmp }}
+                  x&nbsp;&nbsp;&nbsp;&nbsp;{{ rx.drugTotlcnt
+                  }}{{ rx.drugTotlcntEmp }}
                 </div>
               </div>
               <div class="rx-used-way">
                 用法:{{ rx.medcWayDscr }}
-                <span class="ml15">{{ rx.sinDoscnt }}{{ rx.sinDosunt }}/次</span>
+                <span class="ml15"
+                  >{{ rx.sinDoscnt }}{{ rx.sinDosunt }}/次</span
+                >
                 <span class="ml15">{{ rx.usedFrquName }}</span>
               </div>
             </div>
@@ -144,7 +174,6 @@
 </template>
 
 <script setup>
-
 import {
   getRxIndex,
   getRxDetail,
@@ -152,172 +181,179 @@ import {
   rxInfoQuery,
   rxRevoke,
   rxSign,
-  rxUpload, rxPreCheck, rxSetlQuery, regRevoke
+  rxUpload,
+  rxPreCheck,
+  rxSetlQuery,
+  regRevoke,
 } from "@/api/medical-insurance/si-outpatient";
-import {xcMessage} from "@/utils/xiaochan-element-plus";
-import {ElMessageBox} from "element-plus";
+import { xcMessage } from "@/utils/xiaochan-element-plus";
+import { ElMessageBox } from "element-plus";
 import useDateRange from "@/utils/cy-use/useDateRange";
+import env from "../../../utils/setting.js";
 
-const rxList = ref([])
+const rxList = ref([]);
 
-const pdfSrc = ref('')
-const currentRow = ref({})
-const showRemoteRx = ref(false)
+const pdfSrc = ref("");
+const currentRow = ref({});
+const showRemoteRx = ref(false);
 const rxFromQuery = ref({
   rxOtpinfo: {},
-  rxDetlList: []
-})
+  rxDetlList: [],
+});
 
 const allState = [
-  { code: 'ALL', label: '全部'},
-  { code: 'NEW_RECEIPT', label: '待预核验'},
-  { code: 'PRE_CHECKED', label: '待签名'},
-  { code: 'SIGNED', label: '待上传'},
-  { code: 'UPLOADED', label: '已上传'},
-  { code: 'REVOKED', label: '已撤销'},
-  { code: 'SETTLED', label: '已取药'},
-]
+  { code: "ALL", label: "全部" },
+  { code: "NEW_RECEIPT", label: "待预核验" },
+  { code: "PRE_CHECKED", label: "待签名" },
+  { code: "SIGNED", label: "待上传" },
+  { code: "UPLOADED", label: "已上传" },
+  { code: "REVOKED", label: "已撤销" },
+  { code: "SETTLED", label: "已取药" },
+];
 
 function filterRxState(state) {
   switch (state) {
-    case 'NEW_RECEIPT':
-      return '待预核验'
-    case 'PRE_CHECKED':
-      return '待签名';
-    case 'SIGNED':
-      return '待上传';
-    case 'UPLOADED':
-      return '已上传';
-    case 'REVOKED':
-      return '已撤销';
-    case 'SETTLED':
-      return '已取药';
+    case "NEW_RECEIPT":
+      return "待预核验";
+    case "PRE_CHECKED":
+      return "待签名";
+    case "SIGNED":
+      return "待上传";
+    case "UPLOADED":
+      return "已上传";
+    case "REVOKED":
+      return "已撤销";
+    case "SETTLED":
+      return "已取药";
   }
 }
 
 function handleClickRow(row) {
-  currentRow.value = row
+  currentRow.value = row;
   getRxDetail(row.hospRxno).then(res => {
-    showPDF('data:application/pdf;base64,' + res)
-  })
+    showPDF("data:application/pdf;base64," + res);
+  });
 }
 
 function showPDF(base64) {
   const blob = base64ToBlob(base64);
-  pdfSrc.value = URL.createObjectURL(blob)
+  pdfSrc.value = URL.createObjectURL(blob);
 }
 
 function base64ToBlob(base64) {
-  const parts = base64.split(';base64,');
-  const contentType = parts[0].split(':')[1];
+  const parts = base64.split(";base64,");
+  const contentType = parts[0].split(":")[1];
   const raw = window.atob(parts[1]);
   const rawLength = raw.length;
   const uInt8Array = new Uint8Array(rawLength);
   for (let i = 0; i < rawLength; ++i) {
     uInt8Array[i] = raw.charCodeAt(i);
   }
-  return new Blob([uInt8Array], {type: contentType});
+  return new Blob([uInt8Array], { type: contentType });
 }
 
 function doPreCheck() {
   rxPreCheck({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    currentRow.value.state = 'PRE_CHECKED'
-    xcMessage.success('预核验成功。')
-    currentRow.value.state = 'PRE_CHECKED'
-  })
+    currentRow.value.state = "PRE_CHECKED";
+    xcMessage.success("预核验成功。");
+    currentRow.value.state = "PRE_CHECKED";
+  });
 }
 
 function doRxSign() {
   rxSign({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    xcMessage.success('签名成功。')
-    currentRow.value.state = 'SIGNED'
-  })
+    xcMessage.success("签名成功。");
+    currentRow.value.state = "SIGNED";
+  });
 }
 
 function doRxUpload() {
   rxUpload({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    xcMessage.success('上传成功。')
-    currentRow.value.state = 'UPLOADED'
-  })
+    xcMessage.success("上传成功。");
+    currentRow.value.state = "UPLOADED";
+  });
 }
 
 function doRxInfoQuery() {
   rxInfoQuery({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    rxFromQuery.value = res
-    showRemoteRx.value = true
-  })
+    rxFromQuery.value = res;
+    showRemoteRx.value = true;
+  });
 }
 
 function doRxAuditingQuery() {
   rxAuditingQuery({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    const message = `处方状态:${res.rxStasName};<br/>处方审核状态:${res.rxChkStasName}。`
-    ElMessageBox.alert(message, '查询成功', {
-      type: 'success',
+    const message = `处方状态:${res.rxStasName};<br/>处方审核状态:${res.rxChkStasName}。`;
+    ElMessageBox.alert(message, "查询成功", {
+      type: "success",
       dangerouslyUseHTMLString: true,
-    })
-  })
+    });
+  });
 }
 
 function doRxSettleQuery() {
   rxSetlQuery({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    const message = `处方状态:${res.rxStasName};<br/>处方使用状态:${res.rxUsedStasName}。`
-    ElMessageBox.alert(message, '查询成功', {
-      type: 'success',
+    const message = `处方状态:${res.rxStasName};<br/>处方使用状态:${res.rxUsedStasName}。`;
+    ElMessageBox.alert(message, "查询成功", {
+      type: "success",
       dangerouslyUseHTMLString: true,
-    })
-  })
+    });
+  });
 }
 
 function doRxRevoke() {
-  ElMessageBox.confirm('确定要撤销处方上传吗?', '提示', {
-    type: 'warning',
+  ElMessageBox.confirm("确定要撤销处方上传吗?", "提示", {
+    type: "warning",
   }).then(() => {
     rxRevoke({
       hospRxno: currentRow.value.hospRxno,
     }).then(res => {
-      xcMessage.success("处方撤销成功。")
-      currentRow.value.state = 'REVOKED'
-    })
-  })
+      xcMessage.success("处方撤销成功。");
+      currentRow.value.state = "REVOKED";
+    });
+  });
 }
 
 function doRegRevoke() {
   regRevoke({
     hospRxno: currentRow.value.hospRxno,
   }).then(res => {
-    xcMessage.success(res)
-  })
+    xcMessage.success(res);
+  });
 }
 
-const {CyDateRange, dateRange} = useDateRange({shortcutsIndex: 4, clearable: false})
+const { CyDateRange, dateRange } = useDateRange({
+  shortcutsIndex: 4,
+  clearable: false,
+});
 const indexInquiry = reactive({
   begintime: null,
   endtime: null,
-  state: 'ALL'
-})
+  state: "ALL",
+});
 function refreshRxList() {
   indexInquiry.begintime = dateRange.value.start;
-  indexInquiry.endtime = dateRange.value.end
+  indexInquiry.endtime = dateRange.value.end;
   getRxIndex(indexInquiry).then(res => {
-    rxList.value = res
-  })
+    rxList.value = res;
+  });
 }
 
 onActivated(() => {
-  refreshRxList()
-})
+  refreshRxList();
+});
 </script>
 
 <style lang="scss">
@@ -405,7 +441,5 @@ onActivated(() => {
       right: 24px;
     }
   }
-
-
 }
-</style>
+</style>

+ 58 - 54
src/views/operate-monitoring/DataBigScreen.vue

@@ -1,78 +1,82 @@
 <template>
-    <el-button icon="Search" type="primary" @click="selectFullScreen1">数据大屏示例</el-button>
-    <el-button icon="Search" type="primary" @click="selectFullScreen2">门诊-住院医技</el-button>
-    <el-button icon="Search" type="primary" @click="selectFullScreen3">门诊-住院财务</el-button>
-    <el-dialog v-model="fullDrawer1" fullscreen destroy-on-close>
-        <FullScreenFirstPage :fullScreenFirst="fullScreenFirst" />
-    </el-dialog>
-    <el-dialog v-model="fullDrawer2" fullscreen destroy-on-close>
-        <FullScreenSecondPage :fullScreenFirst="fullScreenSecond" />
-    </el-dialog>
-    <el-dialog v-model="fullDrawer3" fullscreen destroy-on-close>
-        <FullScreenThirdPage :fullScreenFirst="fullScreenFirst" />
-    </el-dialog>
+  <el-button icon="Search" type="primary" @click="selectFullScreen1"
+    >数据大屏示例</el-button
+  >
+  <el-button icon="Search" type="primary" @click="selectFullScreen2"
+    >门诊-住院医技</el-button
+  >
+  <el-button icon="Search" type="primary" @click="selectFullScreen3"
+    >门诊-住院财务</el-button
+  >
+  <el-dialog v-model="fullDrawer1" fullscreen destroy-on-close>
+    <FullScreenFirstPage :fullScreenFirst="fullScreenFirst" />
+  </el-dialog>
+  <el-dialog v-model="fullDrawer2" fullscreen destroy-on-close>
+    <FullScreenSecondPage :fullScreenFirst="fullScreenSecond" />
+  </el-dialog>
+  <el-dialog v-model="fullDrawer3" fullscreen destroy-on-close>
+    <FullScreenThirdPage :fullScreenFirst="fullScreenFirst" />
+  </el-dialog>
 </template>
 
-<script setup name='Test' lang="ts">
-import { ref, reactive } from 'vue'
-import FullScreenFirstPage from '../../components/fullScreen/fullPage/FullScreenFirstPage.vue'
-import FullScreenSecondPage from '../../components/fullScreen/fullPage/FullScreenSecondPage.vue'
-import FullScreenThirdPage from '../../components/fullScreen/fullPage/FullScreenThirdPage.vue'
-import { getDate } from '../../utils/date.js'
+<script setup name="Test" lang="ts">
+import { ref, reactive } from "vue";
+import FullScreenFirstPage from "../../components/fullScreen/fullPage/FullScreenFirstPage.vue";
+import FullScreenSecondPage from "../../components/fullScreen/fullPage/FullScreenSecondPage.vue";
+import FullScreenThirdPage from "../../components/fullScreen/fullPage/FullScreenThirdPage.vue";
+import { getDate } from "../../utils/date.js";
+import env from "@/utils/setting";
 
-let dateS = getDate()
+let dateS = getDate();
 const params = reactive({
-    dept: '信息中心',
-    title: '长沙泰和医院门诊-住院诊间数据一览表',
-    type: 'cw',
-    reportType: 'cw',
-    startTime: dateS + ' 00:00:00',
-    endTime: dateS + ' 23:59:59',
-})
+  dept: "信息中心",
+  title: `${env.VITE_HOSPITAL_NAME}医院门诊-住院诊间数据一览表`,
+  type: "cw",
+  reportType: "cw",
+  startTime: dateS + " 00:00:00",
+  endTime: dateS + " 23:59:59",
+});
 
 const params2 = reactive({
-    dept: '信息中心',
-    title: '长沙泰和医院医技诊间数据一览表',
-    type: 'yj',
-    reportType: 'yj',
-    startTime: dateS + ' 00:00:00',
-    endTime: dateS + ' 23:59:59',
-})
+  dept: "信息中心",
+  title: `${env.VITE_HOSPITAL_NAME}医技诊间数据一览表`,
+  type: "yj",
+  reportType: "yj",
+  startTime: dateS + " 00:00:00",
+  endTime: dateS + " 23:59:59",
+});
 
-const fullDrawer1 = ref(false)
-const fullScreenFirst = ref({})
+const fullDrawer1 = ref(false);
+const fullScreenFirst = ref({});
 const selectFullScreen1 = () => {
-    fullScreenFirst.value = params
-    fullDrawer1.value = true
-}
+  fullScreenFirst.value = params;
+  fullDrawer1.value = true;
+};
 
-const fullDrawer2 = ref(false)
-const fullScreenSecond = ref({})
+const fullDrawer2 = ref(false);
+const fullScreenSecond = ref({});
 const selectFullScreen2 = () => {
-    fullScreenSecond.value = params2
-    fullDrawer2.value = true
-
-}
+  fullScreenSecond.value = params2;
+  fullDrawer2.value = true;
+};
 
-const fullDrawer3 = ref(false)
+const fullDrawer3 = ref(false);
 const selectFullScreen3 = () => {
-    fullScreenFirst.value = params
-    fullDrawer3.value = true
-
-}
-
+  fullScreenFirst.value = params;
+  fullDrawer3.value = true;
+};
 </script>
 
 <style lang="scss" scoped>
 html,
 body,
 #app {
-    height: 100%;
-    margin: 0;
-    padding: 0;
+  height: 100%;
+  margin: 0;
+  padding: 0;
 }
 
 html.dark {
-    background: #121212;
+  background: #121212;
 }
 </style>

Some files were not shown because too many files changed in this diff