From 1fc3fe586a17f5ddf6717f58d1fb1e5a0a9c48f7 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期五, 08 三月 2024 14:19:44 +0800
Subject: [PATCH] qxtj

---
 src/views/doctor/checkAll/index.vue |  107 ++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 85 insertions(+), 22 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 2bdee2b..9b8f4d9 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -141,13 +141,16 @@
           </el-col>
           <el-col :span="6">
             <div style="margin-right: 10px;display: flex ">
-              <div style="margin: 10px 10px">
+              <div style="margin: 10px 2px">
+                <el-button type="primary" size="mini" @click="Graphicreport()">鍥炬枃鎶ュ憡</el-button>
+              </div>
+              <div style="margin: 10px 5px">
                 <el-button type="primary" size="mini" @click="historicalreport()">鍘嗗彶鎶ュ憡</el-button>
               </div>
-              <div style="margin: 10px 10px" v-if="tableAll.tjCategory == '02'">
+              <div style="margin: 10px 5px" v-if="tableAll.tjCategory == '02'">
                 <el-button type="primary" size="mini" @click="medicalhistory()">鑱屼笟鐥呭彶</el-button>
               </div>
-              <div style="margin: 10px 10px">
+              <div style="margin: 10px 5px">
                 <el-button type="primary" size="mini" @click="jianqian()">妫�鍓嶉棶璇�</el-button>
               </div>
             </div>
@@ -550,12 +553,15 @@
         <el-button @click="jianqians = false">鍙� 娑�</el-button>
       </span>
     </el-dialog>
+    <Packages ref="bbb" :baogao="baogao" />
+
   </div>
 </template>
   
 
 <script>
 import jianqianwenzhen from "@/components/jianqianwenzhen";
+import Packages from "@/components/Packages";
 import {
   getcheckList,
   getTjdetailList,
@@ -566,7 +572,7 @@
   getState,
   getforceIn,
   gettoPdf,
-  getModified,
+  getModified, isPdfOrJimu
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
@@ -575,12 +581,16 @@
 import { getPdf, revoke } from "@/api/hosp/order";
 import ViewPdf from "@/components/ViewPdf";
 import Historicalreport from "@/components/Historicalreport";
-
+import { getDicts } from "@/api/system/dict/data";
+import {
+  getTjYxjcList
+} from "@/api/system/package";
 export default {
   components: {
     ViewPdf,
     Historicalreport,
     jianqianwenzhen,
+    Packages
   },
   dicts: [
     "dict_tjtype",
@@ -596,6 +606,7 @@
   name: "checkAll",
   data() {
     return {
+      baogao: [],
       flags: false,
       jianqianwenzhendata: [],
       jianqians: false,
@@ -799,25 +810,77 @@
 
     viewReport(row) {
       const tjNumber = row.tjNumber;
-      const flag = true;
-      getPdf(tjNumber, flag).then((response) => {
-        if (response.size === 0) {
-          const loading = this.$loading({
-            lock: true,
-            text: "Loading",
-            spinner: "el-icon-loading",
-            background: "rgba(0, 0, 0, 0.7)",
-          });
-          setTimeout(() => {
-            loading.close();
-          }, 3000);
-          this.$message.msgSuccess("鎶ュ憡姝e湪鐢熸垚锛岃涓ゅ垎閽熷悗棰勮锛�");
-        } else {
-          this.dialogVisible = true;
+      isPdfOrJimu(tjNumber).then((response) => {
+        if (response.data.flag == "0") {
+          const flag = true;
+          getPdf(tjNumber, flag).then((response) => {
+            if (response.size === 0) {
+              const loading = this.$loading({
+                lock: true,
+                text: "Loading",
+                spinner: "el-icon-loading",
+                background: "rgba(0, 0, 0, 0.7)",
+              });
+              setTimeout(() => {
+                loading.close();
+              }, 3000);
+              this.$message.msgSuccess("鎶ュ憡姝e湪鐢熸垚锛岃涓ゅ垎閽熷悗棰勮锛�");
+            } else {
+              this.dialogVisible = true;
 
-          this.url = window.webkitURL.createObjectURL(response); //灏嗗悗绔繑鍥炵殑blob鏂囦欢璇诲彇鍑簎rl
+              this.url = window.webkitURL.createObjectURL(response); //灏嗗悗绔繑鍥炵殑blob鏂囦欢璇诲彇鍑簎rl
+            }
+          });
+        } else {
+          let url = response.data.url
+          const params = { url };
+          this.$tab.openPage("鍋ュ悍璇佹鏌ヨ〃", "/report/zongjianjiankangzheng", params);
         }
-      });
+      })
+
+    },
+
+    Graphicreport() {
+      let dictType = "dict_ageunit"
+      getDicts(dictType).then(res => {
+        if (res.code == 200) {
+          res.data.forEach(item => {
+            if (this.tableAll.age_unit == item.dictValue) {
+              this.tableAll.age_unit = item.dictLabel
+            }
+          })
+          let dictTypes = "sys_user_sex"
+          getDicts(dictTypes).then(res => {
+            if (res.code == 200) {
+              res.data.forEach(item => {
+                if (this.tableAll.cusSex == item.dictValue) {
+                  this.tableAll.cusSex = item.dictLabel
+                }
+              })
+              let data = {
+                patname: this.tableAll.cusName,
+                sex: this.tableAll.cusSex,
+                patage: this.tableAll.age,
+                patagename: this.tableAll.age_unit,
+                patbirth: this.tableAll.cusBrithday
+              }
+              // let data = {
+              //   patname: "鑴辫兘濞�",
+              //   sex: "濂�",
+              //   patage: "60",
+              //   patagename: "宀�",
+              //   patbirth: "1963-01-01"
+              // }
+              getTjYxjcList(data).then(res => {
+                this.baogao = res.data
+              })
+              this.$refs.bbb.open = true;
+              // this.$refs.bbb.getAllList();
+              this.$refs.bbb.title = "鎶ュ憡瀛楀吀";
+            }
+          })
+        }
+      })
     },
 
     historicalreport() {

--
Gitblit v1.8.0