From fc624ec7a89bf956c925f70be311b4175656b166 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期二, 10 十二月 2024 18:56:51 +0800
Subject: [PATCH] 1

---
 src/views/doctor/checkAll/index.vue |  444 ++++++++++++++++++++++++++++++++----------------------
 1 files changed, 262 insertions(+), 182 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 2168968..b99cdc6 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -237,7 +237,7 @@
 
     <!-- 鐐瑰嚮寮瑰嚭妗� -->
     <el-drawer
-      title=""
+      custom-class="tanchu"
       :visible.sync="drawer"
       :before-close="handleClose"
       :with-header="false"
@@ -309,13 +309,13 @@
         <i class="el-icon-close" @click="guanbi"></i>
       </div>
 
-      <div style="margin-right: 10px; display: flex">
-        <div class="btn1">
+      <div style="margin-right: 10px; display: flex" class="btnbox">
+        <div class="btn1" v-if="msgtuwen == 'y' || msgtuwen == 'Y'">
           <el-button @click="Graphicreport()" type="primary"
             >鍥炬枃鎶ュ憡</el-button
           >
         </div>
-        <div class="btn2">
+        <div class="btn1">
           <el-button @click="historicalreport()" type="primary"
             >鍘嗗彶鎶ュ憡</el-button
           >
@@ -325,15 +325,19 @@
             >鑱屼笟鐥呭彶</el-button
           >
         </div>
-        <div class="btn3">
+        <div class="btn1" v-if="msgjianqian == 'y' || msgjianqian == 'Y'">
           <el-button @click="jianqian()" type="primary">妫�鍓嶉棶璇�</el-button>
         </div>
-        
-        <div class="btn4">
-          <el-button @click="xiangmuqingkuang()" type="primary">椤圭洰鎯呭喌</el-button>
+
+        <div class="btn1">
+          <el-button @click="xiangmuqingkuang()" type="primary"
+            >椤圭洰鎯呭喌</el-button
+          >
         </div>
-        <div class="btn5">
-          <el-button @click="yichangjieguo()" type="primary">寮傚父缁撴灉</el-button>
+        <div class="btn1">
+          <el-button @click="yichangjieguo()" type="primary"
+            >寮傚父缁撴灉</el-button
+          >
         </div>
       </div>
       <div class="box">
@@ -449,7 +453,7 @@
                     style="border: 1px solid #dfe6ec; border-collapse: collapse"
                     colspan="3"
                   >
-                  <el-input
+                    <el-input
                       type="textarea"
                       autosize
                       placeholder="璇疯緭鍏ュ唴瀹�"
@@ -586,21 +590,15 @@
             </el-form-item>
           </el-form>
           <div slot="footer" class="dialog-footers">
+            <el-button type="primary" @click.stop="guanbi">鍙栨秷</el-button>
             <el-button
+              v-if="tjproject == '0' && (msgkcf == 'y' || msgkcf == 'Y')"
               type="primary"
-              size="mini"
-              @click.stop="guanbi"
-              >鍙栨秷</el-button
-            >
-            <el-button
-              v-if="tjproject == '0'"
-              type="primary"
-              size="mini"
               @click.stop="rowClick"
               icon="el-icon-edit-outline"
               >寮�澶勬柟</el-button
             >
-            <div v-if="tjproject == '0'" style="padding-left: 10px">
+            <div v-if="tjproject == '0'">
               <el-button
                 type="primary"
                 @click="determine"
@@ -610,98 +608,116 @@
             </div>
           </div>
         </div>
+
         <div class="rightbox">
           <div class="right">
-         <template v-if="status==0">
-          <div v-for="(item, index) in yichangList" :key="index" >
-            <div
-              style="
-                text-align: center;
-                background-color: #aad8df;
-                margin-top: 10px;
-              "
-            >
-              {{ item.proName || "" }}
-            </div>
-            <el-table
-              :row-style="red"
-              :data="item.sone"
-              border
-              style="width: 100%"
-              :header-cell-style="{ background: '#aad8df' }"
-            >
-              <el-table-column align="center" label="妫�娴嬮」鐩�" width="240">
-                <template slot-scope="scope">
-                  <div>{{ scope.row.proName }}</div>
-                </template>
-              </el-table-column>
-              <el-table-column
-                align="center"
-                prop="proResult"
-                label="妫�娴嬬粨鏋�"
-                width="160"
-              >
-              </el-table-column>
+            <template v-if="status == 0">
+              <div v-for="(item, index) in yichangList" :key="index">
+                <div
+                  style="
+                    text-align: center;
+                    background-color: #67c23a;
+                    margin-top: 10px;
+                  "
+                >
+                  {{ item.proName || "" }}
+                </div>
+                <el-table
+                  :stripe="true"
+                  :row-style="red"
+                  :data="item.sone"
+                  border
+                  style="width: 100%"
+                  :header-cell-style="{ background: '#67C23A' }"
+                >
+                  <el-table-column align="center" label="妫�娴嬮」鐩�" width="220">
+                    <template slot-scope="scope">
+                      <div>{{ scope.row.proName }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                    align="center"
+                    prop="proResult"
+                    label="妫�娴嬬粨鏋�"
+                    width="160"
+                  >
+                  </el-table-column>
 
-              <el-table-column align="center" prop="stanId" label=" 鍙傝�冭寖鍥�">
-              </el-table-column>
-              <el-table-column align="center" prop="proAdvice" label="鍗曚綅">
-              </el-table-column>
-            </el-table>
-          </div>
-          <div v-if="!yichangList.length">鏆傛棤寮傚父缁撴灉</div>
-         </template>
-       <template v-if="status==1">
-        <div v-for="(item, index) in statusList" :key="index">
-            <div
-              style="
-                text-align: center;
-                background-color: #aad8df;
-                margin-top: 10px;
-              "
-            >
-              {{ item.proName || "" }}
-            </div>
-            <el-table
-              :data="statusList"
-              border
-              style="width: 100%"
-              :header-cell-style="{ background: '#aad8df' }"
-            >
-              <el-table-column align="center" label="閮ㄩ棬" width="190" prop="deptName">
-              </el-table-column>
-              <el-table-column
-                align="center"
-                 prop="proName"
-                label="椤圭洰"
-                width="160"
-              >
-              </el-table-column>
-
-              <el-table-column
-            label="鐘舵��"
-            align="center"
-            prop="type"
-            :show-overflow-tooltip="true"
-            width="60"
-          >
-            <template slot-scope="scope">
-              <span v-if="scope.row.type == '0'">鏈</span>
-              <span v-if="scope.row.type == '1'">宸叉</span>
-              <span v-if="scope.row.type == '2'">寮冩</span>
-              <span v-if="scope.row.type == '3'">寤舵湡</span>
+                  <el-table-column
+                    align="center"
+                    prop="stanId"
+                    label=" 鍙傝�冭寖鍥�"
+                  >
+                  </el-table-column>
+                  <el-table-column align="center" prop="proAdvice" label="鍗曚綅">
+                  </el-table-column>
+                </el-table>
+              </div>
             </template>
-          </el-table-column>
-          <el-table-column
-            label="妫�鏌ユ椂闂�"
-            align="center"
-            prop="bcupdateTime"
-            width="160"
-          />
-            </el-table>
+            <template v-if="status == 1">
+              <div>
+                <div
+                  style="
+                    text-align: center;
+                    background-color: #e6a23c;
+                    margin-top: 10px;
+                  "
+                >
+                  椤圭洰妫�鏌ユ儏鍐�
+                </div>
+                <el-table
+                  :row-style="redxiangmu"
+                  :data="statusList"
+                  style="width: 100%"
+                  :header-cell-style="{ background: '#e6a23c' }"
+                  :expand-row-keys="expends"
+                  :row-key="getRowKeys"
+                  :stripe="true"
+                >
+                  <el-table-column type="expand">
+                    <template slot-scope="props">
+                      <span>{{ props.row.deptName }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                    align="center"
+                    label="閮ㄩ棬"
+                    width="160"
+                    prop="deptName"
+                  >
+                  </el-table-column>
+                  <el-table-column
+                    align="center"
+                    prop="proName"
+                    label="椤圭洰"
+                    width="160"
+                  >
+                  </el-table-column>
+
+                  <el-table-column
+                    label="鐘舵��"
+                    align="center"
+                    prop="type"
+                    :show-overflow-tooltip="true"
+                    width="60"
+                  >
+                    <template slot-scope="scope">
+                      <span v-if="scope.row.type == '0'">鏈</span>
+                      <span v-if="scope.row.type == '1'">宸叉</span>
+                      <span v-if="scope.row.type == '2'">寮冩</span>
+                      <span v-if="scope.row.type == '3'">寤舵湡</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column
+                    label="妫�鏌ユ椂闂�"
+                    align="center"
+                    prop="bcupdateTime"
+                    width="160"
+                  />
+                </el-table>
+              </div>
+            </template>
           </div>
-       </template>
-        </div>
         </div>
       </div>
 
@@ -1185,12 +1201,13 @@
 import { getCompany, queryCompany } from "@/api/team/tuanti";
 import { reportHistory, yichang } from "@/api/doctor/check";
 import { getPdf, revoke } from "@/api/hosp/order";
-import { cSWebGetPro} from "@/api/doctor/examination";
+import { cSWebGetPro } from "@/api/doctor/examination";
 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 { getconfigKey } from "@/api/login";
 import moment from "moment";
 
 export default {
@@ -1277,6 +1294,9 @@
           },
         ],
       },
+      msgtuwen: "",
+      msgjianqian: "",
+      msgkcf: "",
       // 椤甸潰鍏ㄩ儴鏁版嵁
       checkList: [],
       // 缁戝畾鍗曢�夋寜閽�
@@ -1342,40 +1362,69 @@
         tjCategory: undefined,
         payType: undefined,
       },
-      status: 0 // 0灞曠ず寮傚父1灞曠ず椤圭洰鎯呭喌
+      status: 0, // 0灞曠ず寮傚父1灞曠ず椤圭洰鎯呭喌
+      viewportHeight: 0,
+      expends: [],
     };
   },
 
   created() {
     // this.getNowTime();
-    
+    this.getConfigKey();
     this.getdate();
   },
 
   mounted() {
     this.$nextTick(() => {
       this.$refs.inputName.focus();
-      
+      this.viewportHeight =
+        window.innerHeight || document.documentElement.clientHeight;
     });
   },
   methods: {
-    // 椤圭洰鎯呭喌
-    xiangmuqingkuang () {
-      cSWebGetPro(this.tjNumber).then((res) => {
-        this.status = 1
-        this.statusList = res.data;
-      })
+    getConfigKey() {
+      getconfigKey("sfkqtwbg").then((res) => {
+        this.msgtuwen = res.msg;
+      });
+      getconfigKey("sfkqjqwz").then((res) => {
+        this.msgjianqian = res.msg;
+      });
+      getconfigKey("kcf").then((res) => {
+        this.msgkcf = res.msg;
+      });
     },
-    guanbi(){
+    //璁剧疆table涓殑鎵╁睍椤癸紝灞曞紑鐨刬d锛屾澶勬垜闇�瑕佸叏閮ㄥ睍寮�
+    getExpends() {
+      var proId = this.statusList.map((item) => item.proId);
+      this.expends = proId;
+    },
+    getRowKeys(row) {
+      return row.proId;
+    },
+    // 椤圭洰鎯呭喌
+    xiangmuqingkuang() {
+      cSWebGetPro(this.tjNumber).then((res) => {
+        this.status = 1;
+        this.statusList = res.data;
+        this.getExpends();
+        if (this.statusList.length == 0) {
+          _this.$message.msgSuccess("鏆傛棤椤圭洰鎯呭喌");
+        }
+      });
+    },
+    guanbi() {
       this.drawer = false;
     },
     yichangjieguo() {
-      this.status = 0
-      let _this = this
+      this.status = 0;
+      let _this = this;
       yichang({
         tjNum: this.tjNumber,
       }).then((res) => {
         this.yichangList = res.data;
+        if (this.yichangList.length == 0) {
+          _this.$message.msgSuccess("鏆傛棤寮傚父鎶ュ憡");
+        }
       });
     },
     getdate() {
@@ -1424,7 +1473,7 @@
       let tjNumber = this.tableAll.tjNumber;
       this.jianqianwenzhendata.push(tjNumber);
     },
-  
+
     getList() {
       this.loading = true;
       this.queryParams.compId = this.CheckBox.drugManufacturerId;
@@ -1795,6 +1844,14 @@
         color: "red",
       };
     },
+    redxiangmu({ row }) {
+      if (row.type == 0) {
+        // 鍙橀鑹茬殑鏉′欢
+        return {
+          color: "red", // 杩欎釜return鐨勫氨鏄牱寮� 鍙互鏄痗olor 涔熷彲浠ユ槸backgroundColor
+        };
+      }
+    },
     /*  changRed(row) {
       if (row.label === "鈫�") {
         return {
@@ -1823,12 +1880,12 @@
       this.tjproject = "0";
 
       this.tjNumber = this.tableAll.tjNumber;
-     
+
       getState(this.tjNumber).then((res) => {
         this.status = res.data;
-      
+
         if (this.status.status === "1") {
-          this.yichangjieguo()
+          this.yichangjieguo();
           getInfo().then((response) => {
             this.userId = response.user.userId;
             if (this.userId) {
@@ -1880,7 +1937,6 @@
             }
           });
         } else {
-
           this.$confirm(
             "" + this.status.name + "姝e湪淇敼璇ヤ俊鎭�, 鏄惁寮哄埗杩涘幓?",
             "鎻愮ず",
@@ -1891,10 +1947,10 @@
             }
           )
             .then(() => {
-              this.yichangjieguo()
+              this.yichangjieguo();
               getInfo().then((response) => {
                 this.userId = response.user.userId;
-         
+
                 if (this.userId) {
                   let data = {
                     userId: this.userId,
@@ -1950,14 +2006,10 @@
                 message: "宸插彇娑堣繘鍏�",
               });
             });
-            
-          this.drawer = false;
-  
-        }
 
-      }
-    
-    );
+          this.drawer = false;
+        }
+      });
 
       // 鑾峰彇灏忕粨
       // getDeptAdvice().then((response) => {
@@ -2197,68 +2249,78 @@
 .mainbox {
   position: relative;
 }
+.tanchu {
+  background-color: red;
+}
 .btn {
   margin: 20px 0px;
 }
 /* 鎸夐挳鐨勫垵濮嬬姸鎬� */
-.btn1,
-.btn2,
-.btn3,
-.btn4,
-.btn5 {
-  position: fixed;
-  right: 0;
-  transform: translateY(-50%);
+.btnbox {
   display: flex;
   flex-direction: column;
-  gap: 10px;
-  cursor: pointer;
-  animation: fadeInUp 0.5s ease-out forwards; /* 鍔犺浇鏃剁殑娣″叆鍔ㄧ敾 */
+  gap: 10px; /* 鎸夐挳涔嬮棿鐨勯棿璺� */
+  position: fixed; /* 浣挎暣涓寜閽尯鍩熷浐瀹氬湪椤甸潰 */
+  right: 0;  /* 鍥哄畾鍦ㄩ〉闈㈠彸渚� */
+  top: 20%;  /* 鍒濆浣嶇疆 */
   z-index: 10;
-  transition: transform 0.3s ease; /* 骞虫粦杩囨浮 */
-  writing-mode: vertical-rl; /* 浣挎枃鏈珫鐩存帓鍒� */
-  text-align: center; /* 鏂囧瓧灞呬腑 */
 }
-// ::v-deep .el-button{
-//     background-color: rgba(170, 226, 233, 0.5);
-//     color: white;
-//   }
-/* 鍔犺浇鍔ㄧ敾锛屾寜閽�愭笎鏄剧幇骞舵斁澶� */
+
+/* 姣忎釜鎸夐挳鐨勬牱寮� */
+.btn1 {
+  animation: fadeInUp 0.5s ease-out forwards;  /* 鎸夐挳鍔犺浇鏃剁殑娣″叆鍔ㄧ敾 */
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+  writing-mode: vertical-rl;  /* 鎸夐挳鏂囨湰绔栫洿鎺掑垪 */
+  text-align: center;  /* 鏂囧瓧灞呬腑 */
+}
+
+/* 璁剧疆鍔ㄧ敾鏁堟灉 */
 @keyframes fadeInUp {
   0% {
     opacity: 0;
-    transform: translateY(20px) scale(0.5); /* 鍒濆鐘舵�侊細閫忔槑涓旂缉灏� */
+    transform: translateY(20px) scale(0.5);  /* 鍒濆鐘舵�侊細閫忔槑涓旂缉灏� */
   }
   100% {
     opacity: 1;
-    transform: translateY(0) scale(1); /* 鏈�缁堢姸鎬侊細瀹屽叏鏄剧ず涓旀甯稿ぇ灏� */
+    transform: translateY(0) scale(1);  /* 鏈�缁堢姸鎬侊細瀹屽叏鏄剧ず涓旀甯稿ぇ灏� */
   }
 }
 
-/* 姣忎釜鎸夐挳鐨勫叿浣撲綅缃拰寤惰繜 */
-.btn1 {
-  top: 20%;
-  animation-delay: 0s; /* 绗竴涓寜閽棤寤惰繜 */
+/* 姣忎釜鎸夐挳鐨勪綅缃拰鍔ㄧ敾寤惰繜 */
+.btnbox > div:nth-child(1) {
+  top: 20%;  /* 绗竴涓寜閽殑浣嶇疆 */
+  animation-delay: 0s;  /* 鏃犲欢杩� */
 }
 
-.btn2 {
-  top: 30%;
-  animation-delay: 0.2s; /* 绗簩涓寜閽欢杩� 0.2 绉� */
+.btnbox > div:nth-child(2) {
+  top: 30%;  /* 绗簩涓寜閽殑浣嶇疆 */
+  animation-delay: 0.2s;
 }
 
-.btn3 {
-  top: 40%;
-  animation-delay: 0.4s; /* 绗笁涓寜閽欢杩� 0.4 绉� */
+.btnbox > div:nth-child(3) {
+  top: 40%;  /* 绗笁涓寜閽殑浣嶇疆 */
+  animation-delay: 0.4s;
 }
 
-.btn4 {
-  top: 50%;
-  animation-delay: 0.6s; /* 绗洓涓寜閽欢杩� 0.6 绉� */
+.btnbox > div:nth-child(4) {
+  top: 50%;  /* 绗洓涓寜閽殑浣嶇疆 */
+  animation-delay: 0.6s;
 }
-.btn5 {
-  top: 60%;
-  animation-delay: 0.8s; /* 绗洓涓寜閽欢杩� 0.6 绉� */
+
+.btnbox > div:nth-child(5) {
+  top: 60%;  /* 绗簲涓寜閽殑浣嶇疆 */
+  animation-delay: 0.8s;
 }
+
+.btnbox > div:nth-child(6) {
+  top: 70%;  /* 绗叚涓寜閽殑浣嶇疆 */
+  animation-delay: 1s;
+}
+
 .main {
   height: 700px;
   overflow: hidden;
@@ -2310,9 +2372,22 @@
 }
 
 .dialog-footers {
-  /* margin-top: 5px; */
+  position: fixed;
+  bottom: 0;
+  left: 50%;
+  transform: translateX(-50%);
   display: flex;
-  margin-left: calc(100% - 25%);
+  justify-content: center;
+  align-items: center;
+  padding: 0px 20px;
+  z-index: 1000; /* 纭繚鎸夐挳灞傜骇鍦ㄥ叾浠栧唴瀹逛笂鏂� */
+  width: 100%;
+  background-color: white; /* 鍙牴鎹渶瑕佽皟鏁磋儗鏅鑹� */
+}
+
+/* 纭繚鎸夐挳涔嬮棿鏈夊悎閫傜殑闂磋窛 */
+.dialog-footers .el-button {
+  margin: 0 5px;
 }
 
 textarea {
@@ -2328,17 +2403,19 @@
   overflow: auto; // 纭繚鐖跺鍣ㄥ彲浠ユ粴鍔�
 }
 
-.rightbox{
+.rightbox {
+  margin-left: 30px;
   overflow-y: scroll;
   position: sticky;
   top: 0px;
+
   .right {
-  position: sticky;
-  top: 0px;
-  background-color: #fff;
-  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
-  z-index: 10;
-}
+    position: sticky;
+    top: 0px;
+    background-color: #fff;
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    z-index: 10;
+  }
 }
 
 .top {
@@ -2348,15 +2425,18 @@
   background-color: #fff;
   box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
   display: flex;
-  .el-icon-close{
+  .el-icon-close {
     cursor: pointer;
     font-size: 30px;
     position: relative;
     top: 7px;
     right: 4px;
-    color: rgb(24,144,255);
+    color: rgb(24, 144, 255);
   }
 }
+.kong {
+  box-shadow: none;
+}
 </style>
 
   

--
Gitblit v1.8.0