From 1e2cec2c74d3bb7c4b1d0ec6a5c16ac52a40534f Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期一, 24 十一月 2025 08:57:19 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/basic/gyEmployee/gyEmployee.vue |   74 ++++++++++++++++--------------------
 1 files changed, 33 insertions(+), 41 deletions(-)

diff --git a/src/views/basic/gyEmployee/gyEmployee.vue b/src/views/basic/gyEmployee/gyEmployee.vue
index c5ea92b..a3bb86a 100644
--- a/src/views/basic/gyEmployee/gyEmployee.vue
+++ b/src/views/basic/gyEmployee/gyEmployee.vue
@@ -34,7 +34,7 @@
               v-for="(item, index) in organizationList"
               :key="index"
               :label="item.Name"
-              :value="item.ID"
+              :value="item.ID.toString()"
             >
             </el-option>
           </el-select>
@@ -509,7 +509,7 @@
   data() {
     return {
       activeSeach: "",
-      HModName: "Gy_Employee",
+      HModName: "Gy_EmployeeList",
       editShow: false,
       openEdit: false,
       totalNameList: [],
@@ -517,7 +517,7 @@
       openPrintList: false,
       printListShow: false,
       HClassTag: "ForFilteringSchemes", //杩囨护鏉′欢鐨刢lass绫�
-      HBillType: "1205",
+      HBillType: "Gy_EmployeeList",
       openBtnHide: false,
       btnHideShow: false,
       rowHideShow: false,
@@ -562,7 +562,7 @@
       openData: false, //鏁版嵁寮圭獥
       dialogTitle: "",
       zuzhiId: "",
-      organizationList: [], //缁勭粐鍒楄〃
+      organizationList: JSON.parse(sessionStorage["organizationList"]), //缁勭粐鍒楄〃
       subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
       OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
@@ -586,7 +586,7 @@
       dateRange: [],
       // 鏌ヨ鍙傛暟
       queryParams: {
-        HOrgID: null,
+        HOrgID: sessionStorage["OrganizationID"],
         HName: null,
         HNumber: null,
         Comparator1: "",
@@ -649,7 +649,8 @@
     };
   },
   created() {
-    this.fetchData();
+    // this.fetchData();
+    this.handleQuery();
     this.riqiChange();
   },
   methods: {
@@ -769,33 +770,6 @@
       this.dbEmitData(this.deptform, this.dialogTypeNum);
       this.deptform = {};
     },
-    fetchData() {
-      //鐧诲綍鐢ㄦ埛淇℃伅
-      axios
-        .get(
-          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
-        )
-        .then((response) => {
-          let data = response.data.data[0];
-          this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
-          this.queryParams.HOrgID = data.HUSEORGID;
-          this.user = data.Czymc;
-          axios
-            .get(this.baseURL + "/Web/GetOrganizations", {})
-            .then((response) => {
-              if (response.data.count == 1) {
-                this.organizationList = response.data.data; //缁勭粐鍒楄〃
-              }
-              this.getList();
-            })
-            .catch((error) => {
-              this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-            });
-        })
-        .catch((error) => {
-          this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-        });
-    },
     getList() {
       this.tableShow = false;
       this.loading = true;
@@ -804,13 +778,15 @@
       }
       // this.queryParams.HOrgID = 100038
       this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";
+      let OrgName =
+        this.organizationList.find((e) => e.ID == this.queryParams.HOrgID)?.Name || "";
       //鐢熶骇璧勬枡鍒楄〃
       axios
         .get(this.baseURL + "/Gy_Employee/listPage", {
           params: {
             sWhere: this.sWhere,
-            user: this.user,
-            Organization: "娴欐睙鏅轰簯杩堟��",
+            user: sessionStorage["HUserName"],
+            Organization: OrgName,
             page: this.page,
             size: this.pageSize,
           },
@@ -900,7 +876,12 @@
               }
             }
             option.data = result;
-            this.DisPlay_HideColumn(this.HModName, this.user, option, this.dataList);
+            this.DisPlay_HideColumn(
+              this.HModName,
+              sessionStorage["HUserName"],
+              option,
+              this.dataList
+            );
           }
         })
         .catch((error) => {
@@ -1208,7 +1189,7 @@
         .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
           params: {
             HModName: this.HModName,
-            user: this.user,
+            user: sessionStorage["HUserName"],
             HOrgID: this.zuzhiId,
           },
         })
@@ -1289,7 +1270,10 @@
           if (!this.rowForm.瀹℃牳浜�) {
             axios
               .get(this.baseURL + "DeltetGy_Employee", {
-                params: { HItemID: this.rowForm.HItemID.toString(), user: this.user },
+                params: {
+                  HItemID: this.rowForm.HItemID.toString(),
+                  user: sessionStorage["HUserName"],
+                },
               })
               .then((response) => {
                 if (response.data.count == 1) {
@@ -1314,7 +1298,11 @@
       //閫昏緫瀹℃牳鏂规硶
       axios
         .get(this.baseURL + "/Gy_Employee/AuditGy_Employee", {
-          params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
+          params: {
+            HInterID: InterID,
+            IsAudit: num,
+            CurUserName: sessionStorage["HUserName"],
+          },
         })
         .then((response) => {
           let result = response.data;
@@ -1335,7 +1323,11 @@
       //閫昏緫瀹℃牳鏂规硶
       axios
         .get(this.baseURL + "/Gy_Employee/StopGy_Employee", {
-          params: { HInterID: InterID, IsStop: num, CurUserName: this.user },
+          params: {
+            HInterID: InterID,
+            IsStop: num,
+            CurUserName: sessionStorage["HUserName"],
+          },
         })
         .then((response) => {
           let result = response.data;
@@ -1401,7 +1393,7 @@
         }
       }
       var sSubStr = JSON.stringify(num);
-      var sMainSub = sSubStr + "&鍜�" + this.user;
+      var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
       axios({
         method: "post",
         url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",

--
Gitblit v1.9.1