From 7369fd5866a78cde7ecbb4721d9decdfa181fd39 Mon Sep 17 00:00:00 2001
From: 孔祥富 <kongxf@daryun.com>
Date: 星期四, 11 三月 2021 15:34:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/user/inemployees.vue |   32 ++++++++++++++++++++++----------
 1 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/src/views/user/inemployees.vue b/src/views/user/inemployees.vue
index 55ee0a1..4743015 100644
--- a/src/views/user/inemployees.vue
+++ b/src/views/user/inemployees.vue
@@ -7,7 +7,7 @@
             <h3 class="bu-tian-jia-title">在职员工</h3>
           </el-col>
           <el-col :span="9" style="margin-top: 15px;">
-            <el-input v-model="queryParams.vague" placeholder="请输入内容" style="width:300px" />
+            <el-input v-model="queryParams.baseKey" placeholder="请输入内容" style="width:300px" />
             <span class="search-btn" @click="vagueSearch">查询</span>
             <span class="sup-search-btn" @click="advancedQueryShowMethods">高级查询</span>
           </el-col>
@@ -225,6 +225,7 @@
           stripe
           border
           style="width: 100%;color: #000;"
+          @sort-change="changeSort"
         >
           <el-table-column type="selection" width="55" />
           <el-table-column label="操作" width="130">
@@ -247,18 +248,18 @@
               >编辑</span>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip="true" prop="empNumb" label="编号" width="100" />
-          <el-table-column show-overflow-tooltip="true" prop="deptName" label="部门(护卫点)" />
+          <el-table-column show-overflow-tooltip="true" prop="empNumb" label="编号" width="100" sortable="custom" :sort-orders="['ascending', 'descending']" />
+          <el-table-column show-overflow-tooltip="true" prop="allDeptName" label="部门(护卫点)" width="300" sortable="custom" :sort-orders="['ascending', 'descending']" />
           <el-table-column show-overflow-tooltip="true" prop="jobName" label="岗位" width="100" />
-          <el-table-column show-overflow-tooltip="true" prop="empName" label="姓名" width="100" />
-          <el-table-column show-overflow-tooltip="true" prop="certificateNumb" label="身份证号码" />
+          <el-table-column show-overflow-tooltip="true" prop="empName" label="姓名" width="100" sortable="custom" :sort-orders="['ascending', 'descending']" />
+          <el-table-column show-overflow-tooltip="true" prop="certificateNumb" label="身份证号码" width="180" />
           <el-table-column show-overflow-tooltip="true" prop="sex" label="性别" width="60" :formatter="sexFormat" />
           <el-table-column show-overflow-tooltip="true" prop="age" label="年龄" width="60" />
           <el-table-column show-overflow-tooltip="true" prop="education" label="学历" width="60" :formatter="educationFormat" />
           <el-table-column show-overflow-tooltip="true" prop="nativePlace" label="籍贯" width="70" :formatter="nativePlaceFormat" />
           <el-table-column show-overflow-tooltip="true" prop="empTypeName" label="员工类型" width="80" />
           <el-table-column show-overflow-tooltip="true" prop="telePhone" label="联系电话" width="140" />
-          <el-table-column show-overflow-tooltip="true" prop="entryDate" label="入职日期" width="140" />
+          <el-table-column show-overflow-tooltip="true" prop="entryDate" label="入职日期" width="140" sortable="custom" :sort-orders="['ascending', 'descending']" />
           <el-table-column show-overflow-tooltip="true" prop="empStatus" label="员工状态" width="80">
             <template slot-scope="{row}">
               {{ transEmpStatus(row.empStatus) }}
@@ -416,6 +417,7 @@
                     :clear-value-text="$t('common.clear')"
                     placeholder="请选择部门(护卫点)"
                     style="width:100%"
+                    @select="deptNameSelect"
                   />
                 </el-form-item>
                 <el-form-item label="岗位" prop="jobName">
@@ -701,7 +703,7 @@
           <tr>
             <td>部门(护卫点)</td>
             <td>
-              <el-checkbox label="deptName"><span /></el-checkbox>
+              <el-checkbox label="allDeptName"><span /></el-checkbox>
             </td>
             <td>所属岗位</td>
             <td>
@@ -932,6 +934,7 @@
         deptId: '',
         deptName: '',
         empNumb: '',
+        allDeptName: '',
         empName: '',
         sex: '1',
         JobId: '',
@@ -1113,7 +1116,7 @@
       exportUrl: '',
       checkAll: false,
       isIndeterminate: false,
-      cityOptions: ['archivesNumb', 'deptName', 'jobName', 'empName', 'certificateNumb', 'certificateValidity', 'sexName', 'nationName', 'age', 'marriageName', 'stature', 'birthdate', 'politicsName', 'empTypeName', 'educationName', 'nativePlaceName', 'censusAddress', 'currentAddress', 'guardNumb', 'returnReceipt', 'archivesStatusName', 'bankName', 'bankNumb', 'telePhone', 'entryDate', 'insuranceTypeName', 'socialNumb', 'introducer', 'seniority', 'empCardStatusName', 'certificateList', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate'],
+      cityOptions: ['archivesNumb', 'allDeptName', 'jobName', 'empName', 'certificateNumb', 'certificateValidity', 'sexName', 'nationName', 'age', 'marriageName', 'stature', 'birthdate', 'politicsName', 'empTypeName', 'educationName', 'nativePlaceName', 'censusAddress', 'currentAddress', 'guardNumb', 'returnReceipt', 'archivesStatusName', 'bankName', 'bankNumb', 'telePhone', 'entryDate', 'insuranceTypeName', 'socialNumb', 'introducer', 'seniority', 'empCardStatusName', 'certificateList', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate'],
       checkedCities: [],
       tableData: [],
       selectDimissionType: 1,
@@ -1273,7 +1276,7 @@
     },
     // 翻页方法
     search() {
-      this.queryParams.vague = ''
+      this.queryParams.baseKey = ''
       this.fetch({
         ...this.queryParams,
         ...this.sort
@@ -1295,7 +1298,7 @@
     },
     vagueSearch() {
       this.fetch({
-        baseKey: this.queryParams.vague
+        baseKey: this.queryParams.baseKey
       })
     },
     transEmpStatus(empStatus) {
@@ -1726,6 +1729,10 @@
 
       this.ygdgForm.newJobName = item.value
       this.ygdgForm.jobId = item.code
+    }, DeptNameSelect(val) {
+      this.empBaseInfoForm.deptId = val.id
+      this.empBaseInfoForm.deptName = val.label
+      this.empBaseInfoForm.allDeptName = val.allDeptName
     },
     generateUserInfo(index, val) {
       var userinfo = toCardGetUserInfo(val)
@@ -2003,6 +2010,11 @@
           this.cleanEmpBase()
         })
       }
+    },
+    changeSort(val) {
+      this.sort.field = val.prop
+      this.sort.order = val.order
+      this.search()
     }
   }
 }

--
Gitblit v1.8.0