From b7092c2bf77696eb13fd680cb006211c17b48f5c Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 15 五月 2025 18:00:15 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/patient/hospital.vue |  162 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 92 insertions(+), 70 deletions(-)

diff --git a/src/views/patient/patient/hospital.vue b/src/views/patient/patient/hospital.vue
index 43b7c87..e402ca4 100644
--- a/src/views/patient/patient/hospital.vue
+++ b/src/views/patient/patient/hospital.vue
@@ -46,26 +46,25 @@
             />
           </el-form-item>
 
-
           <el-form-item label="鎮h�呰寖鍥�" prop="status">
-          <el-cascader
-            v-model="queryParams.scopetype"
-            placeholder="榛樿鍏ㄩ儴"
-            :options="sourcetype"
-            :props="{ expandTrigger: 'hover' }"
-            @change="handleChange"
-          ></el-cascader>
-        </el-form-item>
+            <el-cascader
+              v-model="queryParams.scopetype"
+              placeholder="榛樿鍏ㄩ儴绉戝"
+              :options="sourcetype"
+              :props="{ expandTrigger: 'hover' }"
+              @change="handleChange"
+            ></el-cascader>
+          </el-form-item>
           <el-form-item label=" 鍑洪櫌鏃ユ湡 " prop="createTime">
             <el-date-picker
-            v-model="dateRange"
-            style="width: 240px"
-            value-format="yyyy-MM-dd"
-            type="daterange"
-            range-separator="-"
-            start-placeholder="寮�濮嬫棩鏈�"
-            end-placeholder="缁撴潫鏃ユ湡"
-          ></el-date-picker>
+              v-model="dateRange"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="寮�濮嬫棩鏈�"
+              end-placeholder="缁撴潫鏃ユ湡"
+            ></el-date-picker>
           </el-form-item>
 
           <el-row>
@@ -129,7 +128,7 @@
         <el-table
           v-loading="loading"
           :data="userList"
-           height="808"
+          height="808"
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="50" align="center" />
@@ -157,7 +156,7 @@
             align="center"
             key="inhospno"
             prop="inhospno"
-          width="120"
+            width="120"
           />
           <!-- <el-table-column
             label="濮撳悕"
@@ -167,26 +166,37 @@
             prop="patname"
           /> -->
           <el-table-column
-              fixed
-                label="濮撳悕"
-          width="100"
-                align="center"
-                key="patname"
-                prop="patname"
+            fixed
+            label="濮撳悕"
+            width="100"
+            align="center"
+            key="patname"
+            prop="patname"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="medium"
+                type="text"
+                @click="
+                  gettoken360(
+                    scope.row.idcardno,
+                    scope.row.drcode,
+                    scope.row.drname
+                  )
+                "
+                ><span class="button-textsc">{{
+                  scope.row.patname
+                }}</span></el-button
               >
-                <template slot-scope="scope">
-                  <el-button
-                    size="medium"
-                    type="text"
-                    @click="gettoken360(scope.row.idcardno,scope.row.drcode,scope.row.drname)"
-                    ><span class="button-textsc"
-                      >{{scope.row.patname}}</span
-                    ></el-button
-                  >
-
-                </template>
-              </el-table-column>
-          <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex">
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="鎬у埆"
+            width="100"
+            align="center"
+            key="sex"
+            prop="sex"
+          >
             <template slot-scope="scope">
               <span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span>
             </template>
@@ -280,7 +290,6 @@
                     query: { id: scope.row.patid },
                   })
                 "
-
                 ><span class="button-textsc"
                   ><i class="el-icon-zoom-in"></i>鏌ョ湅</span
                 ></el-button
@@ -348,9 +357,10 @@
       <div class="uploading" v-else-if="dractive == 2">
         <el-table :data="uploadingData" style="width: 100%">
           <el-table-column prop="serial" label="搴忓彿"> </el-table-column>
-          <el-table-column prop="name" label="濮撳悕"
-          width="100"> </el-table-column>
-          <el-table-column prop="sex" label="鎬у埆"width="100"> </el-table-column>
+          <el-table-column prop="name" label="濮撳悕" width="100">
+          </el-table-column>
+          <el-table-column prop="sex" label="鎬у埆" width="100">
+          </el-table-column>
           <el-table-column prop="certificate" label="璇佷欢绫诲瀷">
           </el-table-column>
           <el-table-column prop="certificatenum" label="璇佷欢鍙风爜">
@@ -394,10 +404,7 @@
 <script>
 import { delUser } from "@/api/system/user";
 
-import {
-  listpatient,
-
-} from "@/api/patient/record";
+import { listpatient } from "@/api/patient/record";
 import {
   messagelistpatient,
   alterpatient,
@@ -526,7 +533,11 @@
         },
         {
           value: 3,
-          label: "鍏ㄩ儴",
+          label: "鍏ㄩ儴绉戝",
+        },
+        {
+          value: 4,
+          label: "鍏ㄩ儴鐥呭尯",
         },
       ],
       //瀵煎叆杩涘害
@@ -572,15 +583,13 @@
         pageNum: 1,
         pageSize: 10,
         cry: 1,
-        searchscope:3,
+        searchscope: 3,
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
       },
       // 琛ㄥ崟鏍¢獙
-      rules: {
-
-      },
+      rules: {},
     };
   },
   watch: {
@@ -602,6 +611,9 @@
         value: dept.districtCode,
       };
     });
+    this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
+      (obj) => obj.deptCode
+    );
     this.getList();
     this.listDept();
     this.gettabList();
@@ -609,13 +621,6 @@
   methods: {
     /** 鏌ヨ鎮h�呭垪琛� */
     getList() {
-      if (this.queryParams.searchscope == 3) {
-        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
-          (obj) => obj.deptCode
-        );
-        this.queryParams.leavehospitaldistrictcodes =
-          store.getters.belongWards.map((obj) => obj.districtCode);
-      }
       this.loading = true;
       listpatient(this.queryParams).then((response) => {
         console.log(response);
@@ -631,11 +636,11 @@
       });
     },
     //鎮h��360璺宠浆
-    gettoken360(sfzh,drcode,drname) {
+    gettoken360(sfzh, drcode, drname) {
       this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
-      if (this.postData.XiaoXiTou.ZuHuMC=='涓芥按甯備腑鍖婚櫌') {
-        this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728';
-        this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY';
+      if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
+        this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
+        this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
       }
       query360PatInfo(this.postData).then((res) => {
         if (res.data.url) {
@@ -660,8 +665,8 @@
         this.optionstag = response.rows;
       });
     },
-       // 鎮h�呰寖鍥村鐞�
-       handleChange(value) {
+    // 鎮h�呰寖鍥村鐞�
+    handleChange(value) {
       let type = value[0];
       let code = value.slice(-1)[0];
       this.queryParams.leavehospitaldistrictcodes = [];
@@ -675,8 +680,17 @@
         this.queryParams.leavehospitaldistrictcodes.push(code);
         this.queryParams.leaveldeptcodes = [];
         this.queryParams.searchscope = 2;
-      } else {
+      } else if (type == 3) {
+        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
+          (obj) => obj.deptCode
+        );
         this.queryParams.searchscope = 3;
+        this.queryParams.leavehospitaldistrictcodes = [];
+      } else if (type == 4) {
+        this.queryParams.leaveldeptcodes = [];
+        this.queryParams.leavehospitaldistrictcodes =
+          store.getters.belongWards.map((obj) => obj.districtCode);
+        this.queryParams.searchscope = 4;
       }
     },
     // 鏌ヨ瀵煎叆灞曠ず鍒楄〃
@@ -721,8 +735,13 @@
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
-      this.queryParams.startOutHospTime = this.dateRange[0];
-      this.queryParams.endOutHospTime = this.dateRange[1];
+      if (this.dateRange) {
+        this.queryParams.startOutHospTime = this.dateRange[0];
+        this.queryParams.endOutHospTime = this.dateRange[1];
+      } else {
+        this.queryParams.startOutHospTime = "";
+        this.queryParams.endOutHospTime = "";
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },
@@ -730,12 +749,15 @@
     resetQuery() {
       this.dateRange = [];
       this.resetForm("queryForm");
-      this.queryParams={
+      this.queryParams = {
         pageNum: 1,
         pageSize: 10,
         cry: 1,
-        searchscope:2,
-      },
+        searchscope: 3,
+        scopetype: [],
+        leaveldeptcodes: [],
+        leavehospitaldistrictcodes: [],
+      };
       this.handleQuery();
     },
     // 澶氶�夋閫変腑鏁版嵁

--
Gitblit v1.9.3