From b734890015ea3b6870969e7bc6637a2481ed4bd9 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 24 八月 2023 10:15:23 +0800
Subject: [PATCH] Merge branch 'DeBug' of http://116.62.18.175:6699/r/~yxh/smartor-web into yxh01

---
 src/views/patient/patient/index.vue |  121 +++++++++++++---------------------------
 1 files changed, 40 insertions(+), 81 deletions(-)

diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 34442e1..21b21c1 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -470,30 +470,22 @@
 </template>
 
 <script>
+import { delUser } from "@/api/system/user";
 import {
-  delUser,
-  addUser,
-  updateUser,
-  resetUserPwd,
-  changeUserStatus,
-  deptTreeSelect,
-} from "@/api/system/user";
-import {
-  listpatient,
-  messagelistpatient,
-  alterpatient,
-  addpatient,
-  deletepatient,
-  Exporterrorpatient,
-} from "@/api/patient/homepage";
-import { listtag } from "@/api/system/label";
+  listpat_archive,
+  getpat_archive,
+  addpat_archive,
+  updatepat_archive,
+  delpat_archive,
+} from "@/api/smartorpor/pat_archive";
+import { listbase_tag } from "@/api/smartorpor/base_tag";
 
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
-  name: "User",
+  name: "Userhuanze",
   dicts: ["sys_normal_disable", "sys_user_sex"],
   components: { Treeselect },
   data() {
@@ -637,16 +629,12 @@
   created() {
     this.getList();
     this.gettabList();
-    this.getDeptTree();
-    this.getConfigKey("sys.user.initPassword").then((response) => {
-      this.initPassword = response.msg;
-    });
   },
   methods: {
     /** 鏌ヨ鎮h�呭垪琛� */
     getList() {
       this.loading = true;
-      messagelistpatient(this.queryParams).then((response) => {
+      listpat_archive(this.queryParams).then((response) => {
         console.log(response);
         this.userList = response.rows;
         this.total = response.total;
@@ -656,7 +644,7 @@
     /** 鏌ヨ鏍囩鍒楄〃 */
     gettabList() {
       const queryParams = {};
-      listtag(this.addDateRange(queryParams)).then((response) => {
+      listbase_tag().then((response) => {
         console.log(response);
         this.optionstag = response.rows;
       });
@@ -670,12 +658,7 @@
         this.loading = false;
       });
     },
-    /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
-    getDeptTree() {
-      deptTreeSelect().then((response) => {
-        this.deptOptions = response.data;
-      });
-    },
+
     // 绛涢�夎妭鐐�
     filterNode(value, data) {
       if (!value) return true;
@@ -686,24 +669,10 @@
       this.queryParams.deptId = data.id;
       this.handleQuery();
     },
-    // 鐢ㄦ埛鐘舵�佷慨鏀�
-    handleStatusChange(row) {
-      let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
-      this.$modal
-        .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
-        .then(function () {
-          return changeUserStatus(row.userId, row.status);
-        })
-        .then(() => {
-          this.$modal.msgSuccess(text + "鎴愬姛");
-        })
-        .catch(function () {
-          row.status = row.status === "0" ? "1" : "0";
-        });
-    },
+
     // 鍙栨秷鎸夐挳
     cancel() {
-      this.open = false;
+      this.Labelchange = false;
       this.reset();
     },
     // 琛ㄥ崟閲嶇疆
@@ -743,54 +712,44 @@
     handleAdd() {
       this.reset();
       this.Labelchange = true;
+      this.amendtag = false;
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
+      console.log(row);
+      const userIds = row.patid || this.ids;
+      getpat_archive(userIds).then((response) => {
+        console.log(response);
+        this.form = response.data;
+      });
       this.amendtag = true;
       this.Labelchange = true;
     },
+
     //淇敼/鏂板鎮h��
-    updatevaluedate() {
+    submitForm() {
       if (this.amendtag) {
-        this.form.tagcategoryid = this.idds;
-        // toamendtagcategory(this.addDateRange(this.classifyform)).then(
-        //   (response) => {
-        //     console.log(response);
-        //     this.gitclasify();
-        //   }
-        // );
+        updatepat_archive(this.form)
+          .then((response) => {
+            console.log(response);
+          })
+          .then(() => {
+            this.getList();
+            this.$modal.msgSuccess("淇敼鎴愬姛");
+          });
       } else {
-        // addtagcategory(this.addDateRange(this.classifyform)).then(
-        //   (response) => {
-        //     console.log(response);
-        //     this.gitclasify();
-        //   }
-        // );
+        addpat_archive(this.form)
+          .then((response) => {
+            console.log(response);
+          })
+          .then(() => {
+            this.getList();
+            this.$modal.msgSuccess("娣诲姞鎴愬姛");
+          });
       }
       this.reset();
       // this.idds = "";
       this.Labelchange = false;
-    },
-    /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
-    handleResetPwd(row) {
-      this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
-        confirmButtonText: "纭畾",
-        cancelButtonText: "鍙栨秷",
-        closeOnClickModal: false,
-        inputPattern: /^.{5,20}$/,
-        inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
-      })
-        .then(({ value }) => {
-          resetUserPwd(row.userId, value).then((response) => {
-            this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
-          });
-        })
-        .catch(() => {});
-    },
-    /** 鍒嗛厤瑙掕壊鎿嶄綔 */
-    handleAuthRole: function (row) {
-      const userId = row.userId;
-      this.$router.push("/system/user-auth/role/" + userId);
     },
 
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -799,7 +758,7 @@
       this.$modal
         .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
         .then(function () {
-          return delUser(userIds);
+          return delpat_archive(userIds);
         })
         .then(() => {
           this.getList();

--
Gitblit v1.9.3