From 0f139abd46d8f8f356e5cdc841107de69d585345 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 12 三月 2025 11:22:57 +0800
Subject: [PATCH] 人员修改

---
 src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelList/index.vue        |   20 ++++++++++----------
 src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelInformation/index.vue |   25 +++++++++++++------------
 src/api/cnas/personnel/personnelInfo.js                                                     |    2 +-
 3 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/src/api/cnas/personnel/personnelInfo.js b/src/api/cnas/personnel/personnelInfo.js
index 9b0f117..c9d6eaf 100644
--- a/src/api/cnas/personnel/personnelInfo.js
+++ b/src/api/cnas/personnel/personnelInfo.js
@@ -57,7 +57,7 @@
 // 淇敼浜哄憳鏄庣粏鎵�鍦ㄧ粍缁囨灦鏋�
 export function upUserDepardLimsId(data) {
   return request({
-    url: "/user/upUserDepardLimsId",
+    url: "/system/newUser/upUserDepardLimsId",
     method: "post",
     data: data,
   });
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelInformation/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelInformation/index.vue
index 7b60dff..a6cd688 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelInformation/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelInformation/index.vue
@@ -787,17 +787,15 @@
       })
     },
     beforeAvatarUpload(file) {
-      const isJPGorPNG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif';
-      const isLt2MB = file.size / 1024 / 1024 < 2;
-      if (!isJPGorPNG) {
-        this.$message.error('涓婁紶鍥剧墖鍙兘鏄� JPG/PNG 鏍煎紡!');
-        return false;
+      let flag = true
+      if (file.size > 1024 * 1024 * 10) {
+        this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+        this.$refs.upload.clearFiles()
+        flag = false
       }
-      // if (!isLt2MB) {
-      //   this.$message.error('涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃 2MB!');
-      // }
-      // 鏍¢獙閫氳繃鎵嶈繑鍥� true锛屽厑璁告枃浠朵笂浼�
-      return isJPGorPNG && isLt2MB;
+      if (!flag) {
+        return Promise.reject(flag); //姝g‘鐨勭粓姝�
+      }
     },
     downloadFile(fileName) {
       this.$download.saveAs(fileName, fileName)
@@ -849,8 +847,11 @@
     },
     // 鍙栦汉鍛樺垎绫荤殑瀛楀吀
     getComparisonList() {
-      tthis.personnelClassification = this.dict.type.personnl_type;
-      this.checkList = this.form.personnelClassification.split('锛�')
+      // 鏂囦欢鐘舵��
+      this.getDicts("personnl_type").then((response) => {
+        this.personnelClassification = this.dictToValue(response.data);
+        this.checkList = this.form.personnelClassification ? this.form.personnelClassification.split('锛�') : []
+      });
     },
     clickPersonnelClassificationSure() {
       this.dialogVisible = false
diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelList/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelList/index.vue
index 65aaa66..04e8033 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelList/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/PersonnelList/index.vue
@@ -58,17 +58,17 @@
     </div>
     <el-dialog :visible.sync="selectUserDia" title="閫夋嫨鐢ㄦ埛" width="70%">
       <div class="search" style="margin-bottom: 9px;">
-        <div class="search_thing">
+        <div class="search_thing" style="display: flex;">
           <div class="search_label">鐢ㄦ埛鍚嶏細</div>
           <div class="search_input">
             <el-input v-model="queryParams.name" clearable placeholder="璇疯緭鍏�" size="small"
-              @keyup.enter.native="getList()" style="width: 200px;"></el-input>
+              @keyup.enter.native="getList()" style="width: 150px;"></el-input>
           </div>
         </div>
       </div>
       <div v-if="selectUserDia" class="body" style="height: 60vh;">
-        <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'"
-          :page="personPage" @pagination="pagination" :isSelection="true"
+        <lims-table :tableData="personTableData" :column="column" :tableLoading="tableLoading"
+          :height="'calc(100vh - 290px)'" :page="personPage" :isSelection="true"
           :handleSelectionChange="handleSelectionChange"></lims-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -139,7 +139,7 @@
       queryParams: {
         name: ''
       },
-      tableData: [],
+      personTableData: [],
       column: [
         { label: "濮撳悕", prop: "name" },
         { label: "璐﹀彿", prop: "account" },
@@ -210,8 +210,10 @@
     refreshTable(entity, type) {
       try {
         this.tableLoading = true;
-        this.entity.departLimsId = this.departId;
-        basicInformationOfPersonnelSelectPage({ ...this.page, ...this.entit }).then(res => {
+        this.entity.departmentId = this.departId;
+        let params = { ...this.page, ...this.entity }
+        delete params.total
+        basicInformationOfPersonnelSelectPage(params).then(res => {
           this.tableLoading = false;
           if (res.code === 201) {
             return;
@@ -297,8 +299,7 @@
         .then((res) => {
           this.tableLoading = false;
           if (res.code === 200) {
-            this.tableData = res.data.records;
-            this.personPage.total = res.data.total;
+            this.personTableData = res.data;
           }
         })
         .catch((err) => {
@@ -313,7 +314,6 @@
     handleDown() {
       this.outLoading = true;
       let entity = this.HaveJson(this.entity)
-      delete entity.orderBy;
       exportPersonBasicInfo(entity).then(res => {
         this.outLoading = false;
         if (res.code === 201) {

--
Gitblit v1.9.3