From 6e7f546cc37ed57e7e2eda4fdfc32fa2b3e0160c Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 20 十月 2026 17:41:10 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/patient/behospitalized.vue |   99 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 94 insertions(+), 5 deletions(-)

diff --git a/src/views/patient/patient/behospitalized.vue b/src/views/patient/patient/behospitalized.vue
index f17a2ee..f1f22c6 100644
--- a/src/views/patient/patient/behospitalized.vue
+++ b/src/views/patient/patient/behospitalized.vue
@@ -49,6 +49,8 @@
               v-model="queryParams.scopetype"
               placeholder="榛樿鍏ㄩ儴绉戝"
               :options="sourcetype"
+              filterable
+              clearable
               :props="{ expandTrigger: 'hover' }"
               @change="handleChange"
             ></el-cascader>
@@ -63,6 +65,17 @@
               start-placeholder="寮�濮嬫棩鏈�"
               end-placeholder="缁撴潫鏃ユ湡"
             ></el-date-picker>
+          </el-form-item>
+          <el-form-item label="搴婂彿鎺掑簭" prop="bedSort">
+            <el-select
+              v-model="queryParams.bedSort"
+              placeholder="涓嶆寜搴婂彿鎺掑簭"
+              style="width: 160px"
+            >
+              <el-option label="涓嶆寜搴婂彿鎺掑簭" :value="null"></el-option>
+              <el-option label="鎸夊簥鍙锋搴�" :value="1"></el-option>
+              <el-option label="鎸夊簥鍙峰�掑簭" :value="2"></el-option>
+            </el-select>
           </el-form-item>
 
           <el-row>
@@ -109,6 +122,18 @@
               娣诲姞寤剁画鎶ょ悊浠诲姟
             </el-button>
           </el-col>
+          <!-- <el-col :span="1.5">
+            <el-button
+              type="success"
+              plain
+              icon="el-icon-folder-add"
+              size="medium"
+              :disabled="multiple"
+              @click="handleCreateArchive"
+            >
+              鎮h�呭缓妗�</el-button
+            >
+          </el-col> -->
           <el-col :span="1.5">
             <el-button
               type="danger"
@@ -174,7 +199,7 @@
                     scope.row.idcardno,
                     scope.row.drcode,
                     scope.row.drname,
-                    scope.row.patid,
+                    scope.row.patid
                   )
                 "
                 ><span class="button-textsc">{{
@@ -542,6 +567,13 @@
         <el-button @click="submitclose">鍙� 娑�</el-button>
       </div>
     </el-dialog>
+
+    <!-- 鎮h�呭缓妗e脊绐� -->
+    <ArchiveDialog
+      :visible.sync="archiveDialogVisible"
+      :patients="archivePatients"
+      source-page="inpatient"
+    />
   </div>
 </template>
 
@@ -565,14 +597,20 @@
 import Treeselect from "@riophae/vue-treeselect";
 import { listDept } from "@/api/system/dept";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { query360PatInfo,query360PatInfonh, getTasklist, addSubtask } from "@/api/AiCentre/index";
+import {
+  query360PatInfo,
+  query360PatInfonh,
+  getTasklist,
+  addSubtask,
+} from "@/api/AiCentre/index";
 
 import store from "@/store";
+import ArchiveDialog from "@/views/patient/archives/components/ArchiveDialog.vue";
 
 export default {
   name: "behospitalized",
   dicts: ["sys_normal_disable", "sys_user_sex", "nursinggrade"],
-  components: { Treeselect },
+  components: { Treeselect, ArchiveDialog },
   data() {
     return {
       // 閬僵灞�
@@ -606,6 +644,9 @@
       taskList: [], // 浠诲姟鍒楄〃
       selectedTask: null, // 閫変腑鐨勪换鍔�
       batchLoading: false, // 鎵归噺鎻愪氦鍔犺浇鐘舵��
+      // 鎮h�呭缓妗�
+      archiveDialogVisible: false,
+      archivePatients: [],
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       paperstypes: [
@@ -628,6 +669,8 @@
           label: "鐥呭尯鎮h��",
         },
       ],
+      orgName: localStorage.getItem("orgname"),
+
       postData: {
         XiaoXiTou: {
           FaSongFCSJC: "ZJHES",
@@ -735,6 +778,7 @@
         pageNum: 1,
         pageSize: 10,
         cry: 0,
+        bedSort: null,
         searchscope: 3,
         scopetype: [],
         leaveldeptcodes: [],
@@ -775,12 +819,33 @@
     /** 鏌ヨ鎮h�呭垪琛� */
     getList() {
       this.loading = true;
-      listpatient(this.queryParams).then((response) => {
+      listpatient(this.buildListQueryParams()).then((response) => {
         console.log(response);
         this.userList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
+    },
+    /**
+     * 缁勮 listpatient 鍏ュ弬锛�
+     * cry = 0 涓旂櫥褰曟満鏋勪负銆岀渷绔嬪悓寰风繝鑻戦櫌鍖� / 鍗楀崕澶у闄勫睘绗竴鍖婚櫌銆嶆椂锛�
+     * 绉戝/鐥呭尯瀛楁 leaveldeptcodes銆乴eavehospitaldistrictcodes 闇�鎹㈡垚
+     * deptcodeList銆乭ospitaldistrictcodeList銆�
+     */
+    buildListQueryParams() {
+      const params = { ...this.queryParams };
+      const orgname = localStorage.getItem("orgname");
+      const needRename =
+        params.cry === 0 &&
+        (orgname === "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ||
+          orgname === "鍗楀崕澶у闄勫睘绗竴鍖婚櫌");
+      if (needRename) {
+        params.deptcodeList = params.leaveldeptcodes;
+        params.hospitaldistrictcodeList = params.leavehospitaldistrictcodes;
+        delete params.leaveldeptcodes;
+        delete params.leavehospitaldistrictcodes;
+      }
+      return params;
     },
     /** 琛ㄦ牸琛屾牱寮� */
     tableRowClassName({ row, rowIndex }) {
@@ -816,6 +881,10 @@
         this.queryParams.leaveldeptcodes.push(code);
         this.queryParams.leavehospitaldistrictcodes = [];
         this.queryParams.searchscope = 1;
+      } else if (type == 2) {
+        this.queryParams.leavehospitaldistrictcodes.push(code);
+        this.queryParams.leaveldeptcodes = [];
+        this.queryParams.searchscope = 2;
       } else if (type == 3) {
         this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
           (obj) => obj.deptCode
@@ -891,7 +960,12 @@
         pageSize: 100, // 璁剧疆杈冨ぇ鐨勫垎椤佃幏鍙栨洿澶氫换鍔�
         type: 2, // 寤剁画鎶ょ悊浠诲姟绫诲瀷
       };
-
+      topqueryParams.deptcodes = store.getters.belongDepts.map(
+        (obj) => obj.deptCode
+      );
+      topqueryParams.hospitaldistrictcodes = store.getters.belongWards.map(
+        (obj) => obj.districtCode
+      );
       getTasklist(topqueryParams)
         .then((response) => {
           this.taskList = response.rows;
@@ -981,6 +1055,9 @@
         }
 
         this.batchTaskVisible = false;
+        this.$router.push({
+          path: "/followvisit/Continue",
+        });
         this.getList(); // 鍒锋柊鎮h�呭垪琛�
       } catch (error) {
         this.$modal.msgError("鎵归噺娣诲姞浠诲姟杩囩▼涓嚭閿欙細" + error.message);
@@ -1078,6 +1155,7 @@
         pageNum: 1,
         pageSize: 10,
         cry: 0,
+        bedSort: null,
         searchscope: 3,
         scopetype: [],
         leaveldeptcodes: [],
@@ -1208,6 +1286,17 @@
       this.upload.open = false;
       this.dractive = 1;
     },
+    /** 鎮h�呭缓妗� */
+    handleCreateArchive() {
+      if (this.ids.length === 0) {
+        this.$modal.msgWarning("璇疯嚦灏戦�変腑1鍚嶆偅鑰�");
+        return;
+      }
+      this.archivePatients = this.userList.filter((item) =>
+        this.ids.includes(item.patid)
+      );
+      this.archiveDialogVisible = true;
+    },
   },
 };
 </script>

--
Gitblit v1.9.3