From 1e4a70437b5e2f7bd027ebc4081c22b315da3025 Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期五, 26 四月 2024 16:13:58 +0800
Subject: [PATCH] qxtj

---
 src/views/doctor/checkAll/index.vue |  407 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 323 insertions(+), 84 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 8711f24..f1043aa 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -24,7 +24,7 @@
           placeholder="璇疯緭鍏ヤ綋妫�鍙�"
           clearable
           @keyup.enter.native="submitForm"
-          @blur="submitForm"
+          @blur="hb"
         ></el-input>
       </el-form-item>
       <el-form-item label="浣撴鏃堕棿" prop="tjTime">
@@ -256,7 +256,13 @@
               鎬у埆锛�
             </td>
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{ tableAll.cusSex }}
+              {{
+                tableAll.cusSex == 0
+                  ? "鐢�"
+                  : tableAll.cusSex == 1
+                  ? "濂�"
+                  : "鏈煡"
+              }}
             </td>
           </tr>
           <tr style="border: 1px solid #dfe6ec; border-collapse: collapse">
@@ -275,22 +281,48 @@
           </tr>
         </table>
       </div>
-      <div style="display: flex">
-        <div style="margin: 10px 10px">
-          <el-button type="primary" size="mini" @click="historicalreport()"
-            >鍘嗗彶鎶ュ憡</el-button
-          >
-        </div>
-        <div style="margin: 10px 10px" v-if="tableAll.tjCategory == '02'">
-          <el-button type="primary" size="mini" @click="medicalhistory()"
-            >鑱屼笟鐥呭彶</el-button
-          >
-        </div>
-        <div style="margin: 10px 10px">
-          <el-button type="primary" size="mini" @click="jianqian()"
-            >妫�鍓嶉棶璇�</el-button
-          >
-        </div>
+      <div>
+        <el-row>
+          <el-col :span="18">
+            <div style="margin: 10px 10px">
+              <el-radio-group
+                v-model="tjproject"
+                @input="radiotjprojectChange"
+                style="margin-left: 20px"
+              >
+                <el-radio-button label="0">浣撴椤圭洰</el-radio-button>
+                <el-radio-button label="1">鍖栭獙椤圭洰</el-radio-button>
+              </el-radio-group>
+            </div>
+          </el-col>
+          <el-col :span="6">
+            <div style="margin-right: 10px; display: flex">
+              <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 5px" v-if="tableAll.tjCategory == '02'">
+                <el-button type="primary" size="mini" @click="medicalhistory()"
+                  >鑱屼笟鐥呭彶</el-button
+                >
+              </div>
+              <div style="margin: 10px 5px">
+                <el-button type="primary" size="mini" @click="jianqian()"
+                  >妫�鍓嶉棶璇�</el-button
+                >
+              </div>
+            </div>
+          </el-col>
+        </el-row>
       </div>
 
       <el-row>
@@ -385,7 +417,7 @@
                   "
                   v-else
                 >
-                  {{ "" }}
+                  {{ item1.proName }}
                 </td>
                 <td
                   style="
@@ -403,6 +435,7 @@
                     border-collapse: collapse;
                     width: 200px;
                   "
+                  v-if="item1.project != null"
                 >
                   {{ item1.standard.company }}
                 </td>
@@ -412,12 +445,33 @@
                     border-collapse: collapse;
                     width: 200px;
                   "
+                  v-else
+                >
+                  {{ item1.proAdvice }}
+                </td>
+                <td
+                  style="
+                    border: 1px solid #dfe6ec;
+                    border-collapse: collapse;
+                    width: 200px;
+                  "
+                  v-if="item1.project != null"
                 >
                   {{
                     item1.standard.tjStandardGtValue +
                     "-" +
                     item1.standard.tjStandardLtValue
                   }}
+                </td>
+                <td
+                  style="
+                    border: 1px solid #dfe6ec;
+                    border-collapse: collapse;
+                    width: 200px;
+                  "
+                  v-else
+                >
+                  {{ item1.stanId }}
                 </td>
               </tr>
               <tr
@@ -496,6 +550,15 @@
                 </td>
               </tr>
             </table>
+            <div style="margin: 0 0px 10px 15px">
+              <el-button type="primary" @click="propoChange"
+                >蹇嵎寤鸿</el-button
+              >
+              <el-button type="primary" @click="proposalChange"
+                >鐢熸垚寤鸿</el-button
+              >
+            </div>
+
             <el-form
               ref="numberValidateForm"
               label-width="80px"
@@ -512,7 +575,7 @@
                 </el-input>
               </el-form-item>
             </el-form>
-            <div slot="footer" class="dialog-footers">
+            <div slot="footer" class="dialog-footers" v-if="tjproject == '0'">
               <el-button
                 type="primary"
                 @click="determine"
@@ -975,12 +1038,24 @@
       width="1000px"
       :before-close="handleClose1"
     >
-       <jianqianwenzhen
-          :jianqianwenzhendata="jianqianwenzhendata"
-        ></jianqianwenzhen>
+      <jianqianwenzhen
+        :jianqianwenzhendata="jianqianwenzhendata"
+        v-if="flags"
+      ></jianqianwenzhen>
       <span slot="footer" class="dialog-footer">
         <el-button @click="jianqians = false">鍙� 娑�</el-button>
       </span>
+    </el-dialog>
+    <Packages ref="bbb" :baogao="baogao" />
+    <proposal ref="proposal" :cusobj="cusobj" @event1="eventchange($event)" />
+    <createproposal ref="createproposal" :creatobj="creatobj" />
+
+    <el-dialog
+      title="甯哥敤寤鸿缁存姢"
+      :visible.sync="propdialog"
+      width="500px"
+      append-to-body
+    >
     </el-dialog>
   </div>
 </template>
@@ -988,16 +1063,21 @@
 
 <script>
 import jianqianwenzhen from "@/components/jianqianwenzhen";
+import Packages from "@/components/Packages";
+import proposal from "@/components/proposal";
+import createproposal from "@/components/createproposal";
 import {
   getcheckList,
   getTjdetailList,
   getupdateCheckType,
+  getupdateCheckTypeHuaYan,
   getModifiedState,
   getfiedState,
   getState,
   getforceIn,
   gettoPdf,
   getModified,
+  isPdfOrJimu,
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
@@ -1006,12 +1086,18 @@
 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";
+import { getNewDateList } from "@/api/hosp/order";
+import moment from "moment";
 export default {
   components: {
     ViewPdf,
     Historicalreport,
-    jianqianwenzhen
+    jianqianwenzhen,
+    Packages,
+    proposal,
+    createproposal,
   },
   dicts: [
     "dict_tjtype",
@@ -1021,19 +1107,26 @@
     "lj_positive",
     "tj_work",
     "tj_work_status",
+    "tj_smoking_pinlv",
+    "tj_work",
   ],
   name: "checkAll",
   data() {
     return {
-      jianqianwenzhendata:[],
-      jianqians:false,
+      baogao: [],
+      flags: false,
+      jianqianwenzhendata: [],
+      jianqians: false,
       sex: true,
       activeName: "1",
       wenzhen: false,
       hosproy: true,
       remarks: "",
       remark: "",
+      creatobj:{},
+      propdialog: false,
       proIds: "",
+      cusobj: {},
       xiaojie: "",
       isdisabled: false,
       dialogVisible: false,
@@ -1080,8 +1173,10 @@
       checkList: [],
       // 缁戝畾鍗曢�夋寜閽�
       tjStatus: "0",
+      tjproject: "0",
       total: 0,
       CompanyList: [],
+      Testitems: [],
       CheckBox: {},
       startTime: [],
       textarea1: "",
@@ -1098,6 +1193,7 @@
       Deptobj: "",
       // 鐐瑰嚮鍙傛暟
       changedate: [],
+      dataText: [],
       status: {},
       // 鏌ヨ鍙傛暟
       queryParams: {
@@ -1140,8 +1236,9 @@
   },
 
   created() {
-    this.getNowTime();
-    this.getList();
+    // this.getNowTime();
+
+    this.getdate();
   },
 
   mounted() {
@@ -1150,6 +1247,15 @@
     });
   },
   methods: {
+    getdate() {
+      getNewDateList().then((res) => {
+        this.startTime = [
+          moment(res.data).format("YYYY-MM-DD 00:00:00"),
+          moment(res.data).format("YYYY-MM-DD 23:59:00"),
+        ];
+        this.getList();
+      });
+    },
     // / 澶勭悊榛樿閫変腑褰撳墠鏃ユ湡
     getNowTime() {
       var curDate = new Date().getTime();
@@ -1182,31 +1288,10 @@
       );
     },
     jianqian() {
-      let tjNumber = this.tableAll.tjNumber;
-       getInfoById(tjNumber).then((response) => {
-        this.jianqianwenzhendata = response.data;
-        if (this.form.xiyan == null) {
-          this.form.xiyan = "1";
-        }
-        if (this.form.xiyanpinlv == null) {
-          this.form.xiyanpinlv = "0";
-        }
-        if (this.form.xiyanyear == null) {
-          this.form.xiyanyear = "0";
-        }
-        if (this.form.yinjiu == null) {
-          this.form.yinjiu = "1";
-        }
-        if (this.form.yinjiupinlv == null) {
-          this.form.yinjiupinlv = "0";
-        }
-        if (this.form.yinjiuyear == null) {
-          this.form.yinjiuyear = "0";
-        }
-        this.form.tjAskHistorysList = response.data.tjAskHistorysList;
-        // this.isdisabled= true
-      });
+      this.flags = true;
       this.jianqians = true;
+      let tjNumber = this.tableAll.tjNumber;
+      this.jianqianwenzhendata.push(tjNumber);
     },
     getList() {
       this.loading = true;
@@ -1246,23 +1331,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.title = "鎶ュ憡瀛楀吀";
+            }
+          });
         }
       });
     },
@@ -1344,6 +1483,94 @@
         this.loading = false;
       });
     },
+    propoChange() {
+      this.cusobj = { sex: this.tableAll.cusSex, isZj: 0 };
+      this.$refs.proposal.open = true;
+      this.$refs.proposal.title = "寤鸿鏂规";
+      // this.$refs.proposal.getList();
+    },
+    eventchange(data) {
+      this.dataText = data
+      data.forEach((item) => {
+        this.textarea1 += item.advice;
+      });
+    },
+    proposalChange() {
+      if (this.textarea1) {
+        this.creatobj = {proParentList:this.textarea1, isZj: 0}
+        this.$refs.createproposal.open = true;
+        this.$refs.createproposal.title = "甯哥敤寤鸿缁存姢";
+      }else{
+        this.$message({
+              type: "warning ",
+              message: "璇峰厛濉啓鎬绘寤鸿",
+            });
+      }
+    },
+    radiotjprojectChange() {
+      if (this.tjproject == "0") {
+        getupdateCheckType(this.tjNumber).then((response) => {
+          this.changedate = response.data;
+          this.changedate.forEach((item) => {
+            this.textarea1 = item.checkAdvice;
+          });
+          if (this.changedate) {
+            for (let i = 0; i < this.changedate.length; i++) {
+              this.remark = this.changedate[i].remark;
+            }
+            this.changedate.forEach((item) => {
+              // this.remark = item.remark;
+              item.sons.forEach((item3) => {
+                if (item3.standard.tjStandardGtValue === null) {
+                  item3.standard.tjStandardGtValue = "";
+                }
+                if (item3.standard.tjStandardLtValue === null) {
+                  item3.standard.tjStandardLtValue = "";
+                }
+              });
+              // item.remark = "";
+            });
+          } else {
+            this.$message({
+              type: "warning ",
+              message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+            });
+          }
+        });
+      } else if (this.tjproject == "1") {
+        getupdateCheckTypeHuaYan(this.tjNumber).then((res) => {
+          if (res.data) {
+            // this.Testitems = res.data
+            this.changedate = res.data;
+            this.changedate.forEach((item) => {
+              this.textarea1 = item.checkAdvice;
+            });
+            if (this.changedate) {
+              for (let i = 0; i < this.changedate.length; i++) {
+                this.remark = this.changedate[i].remark;
+              }
+              this.changedate.forEach((item) => {
+                // this.remark = item.remark;
+                item.sons.forEach((item3) => {
+                  if (item3.standard.tjStandardGtValue === null) {
+                    item3.standard.tjStandardGtValue = "";
+                  }
+                  if (item3.standard.tjStandardLtValue === null) {
+                    item3.standard.tjStandardLtValue = "";
+                  }
+                });
+                // item.remark = "";
+              });
+            }
+          } else {
+            this.$message({
+              type: "warning ",
+              message: "璇ュ鎴锋病鏈夊寲楠岄」鐩暟鎹�",
+            });
+          }
+        });
+      }
+    },
 
     // 浣撴鍏徃鎷奸煶鎼滅储
     getRemoteData(query) {
@@ -1363,6 +1590,12 @@
     // 鏃堕棿
     dateChangebirthday1(val) {
       this.startTime = val;
+    },
+
+    hb() {
+      if (this.queryParams.tjNumber != "") {
+        this.submitForm();
+      }
     },
 
     // 鎼滅储
@@ -1397,6 +1630,7 @@
     },
     // 閲嶇疆
     resetQuery() {
+      this.startTime = [];
       this.resetForm("tableList");
       this.submitForm();
     },
@@ -1404,15 +1638,16 @@
     // 鐐瑰嚮璇︽儏
     handleClick(row) {
       this.tableAll = row;
-      if (this.tableAll.cusSex === 0) {
-        this.tableAll.cusSex = "鐢�";
-      }
-      if (this.tableAll.cusSex === 1) {
-        this.tableAll.cusSex = "濂�";
-      }
-      if (this.tableAll.cusSex === 2) {
-        this.tableAll.cusSex = "鏈煡";
-      }
+      this.tjproject = "0";
+      // if (this.tableAll.cusSex === 0) {
+      //   this.tableAll.cusSex = "鐢�";
+      // }
+      // if (this.tableAll.cusSex === 1) {
+      //   this.tableAll.cusSex = "濂�";
+      // }
+      // if (this.tableAll.cusSex === 2) {
+      //   this.tableAll.cusSex = "鏈煡";
+      // }
       this.tjNumber = this.tableAll.tjNumber;
       getState(this.tjNumber).then((res) => {
         this.status = res.data;
@@ -1430,10 +1665,10 @@
                 this.drawer = true;
                 getupdateCheckType(this.tjNumber).then((response) => {
                   this.changedate = response.data;
-                  this.changedate.forEach((item) => {
-                    this.textarea1 = item.checkAdvice;
-                  });
                   if (this.changedate) {
+                    this.changedate.forEach((item) => {
+                      this.textarea1 = item.checkAdvice;
+                    });
                     for (let i = 0; i < this.changedate.length; i++) {
                       this.remark = this.changedate[i].remark;
                     }
@@ -1535,11 +1770,15 @@
       const tjNumber = row.tjNumber;
       revoke(tjNumber).then((response) => {
         this.$modal.msgSuccess("鎾ゅ洖鎴愬姛");
-        if(response.code == 200){
+        if (response.code == 200) {
           this.loading = false;
           this.getList();
         }
       });
+    },
+
+    cancel() {
+      this.propdialog = false;
     },
 
     // 鏄惁鍏抽棴寮圭獥
@@ -1570,8 +1809,8 @@
           getfiedState(data).then((res) => {});
         });
     },
-    handleClose1(){
-      this.jianqians = false
+    handleClose1() {
+      this.jianqians = false;
     },
     // 鐢熸垚鎶ュ憡
     // generate(row) {

--
Gitblit v1.8.0