From 6448ec15bfe0b65fb822a662105bceddc23b58d8 Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期一, 06 四月 2026 21:34:44 +0800
Subject: [PATCH] feat(user): 新增员工档案管理视图组件

---
 src/views/user/outemployess.vue |  115 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 72 insertions(+), 43 deletions(-)

diff --git a/src/views/user/outemployess.vue b/src/views/user/outemployess.vue
index 1a5cf5b..9d402c6 100644
--- a/src/views/user/outemployess.vue
+++ b/src/views/user/outemployess.vue
@@ -183,13 +183,7 @@
                         <el-checkbox :label="1">合同期满</el-checkbox>
                         <el-checkbox :label="3">公司辞退</el-checkbox>
                         <el-checkbox :label="5">试用期内</el-checkbox>
-                        <!--                        <el-checkbox-->
-                        <!--                          v-for="data in dimissionTypeOptions"-->
-                        <!--                          :key="data.dicItemName"-->
-                        <!--                          :label="data.dicItemCode"-->
-                        <!--                        >-->
-                        <!--                          {{ data.dicItemName }}-->
-                        <!--                        </el-checkbox>-->
+                        <el-checkbox :label="7">到龄退休</el-checkbox>
                       </el-checkbox-group>
                     </td>
                   </tr>
@@ -269,7 +263,7 @@
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="80" sortable="custom" :sort-orders="['ascending', 'descending']" />
-          <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" width="280" sortable="custom" :sort-orders="['ascending', 'descending']" />
+          <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" sortable="custom" :sort-orders="['ascending', 'descending']" />
           <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="80" />
           <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="80" sortable="custom" :sort-orders="['ascending', 'descending']" />
           <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="160" sortable="custom" :sort-orders="['ascending', 'descending']" />
@@ -305,6 +299,7 @@
               {{ transEntryType(row.dimissionType) }}
             </template>
           </el-table-column>
+          <el-table-column show-overflow-tooltip prop="annualLeave" label="年假天数" width="110" />
         </el-table>
         <pagination
           v-show="total>0"
@@ -910,8 +905,8 @@
             </table>
             <table>
               <tr>
-                <td colspan="8" class="tdTitle">劳资案件</td>
-                <td class="link_button">新增劳资案件</td>
+                <td colspan="8" class="tdTitle">仲裁案件</td>
+                <td class="link_button">新增仲裁案件</td>
                 <td class="del_button">删除</td>
               </tr>
               <tr>
@@ -1017,6 +1012,17 @@
                 value-format="yyyy-MM-dd"
                 type="date"
                 placeholder="选择打开日期"
+              />
+            </el-form-item>
+            <el-form-item label="部门(护卫点)" required message="请选择部门(护卫点)" prop="allDeptName">
+              <treeselect
+                v-model="baseicInformationForm.deptId"
+                :multiple="false"
+                :options="depts"
+                :clear-value-text="$t('common.clear')"
+                placeholder="请选择部门(护卫点)"
+                style="width:100%"
+                @select="DeptNameSelect"
               />
             </el-form-item>
             <el-form-item label="备注说明">
@@ -1228,6 +1234,16 @@
               <el-checkbox label="empNumb"><span /></el-checkbox>
             </td>
           </tr>
+          <tr>
+            <td>年假天数</td>
+            <td>
+              <el-checkbox label="annualLeave"><span /></el-checkbox>
+            </td>
+            <td />
+            <td />
+            <td />
+            <td />
+          </tr>
         </el-checkbox-group>
       </table>
       <div slot="footer" class="dialog-footer">
@@ -1247,12 +1263,16 @@
 <script>
 import Pagination from '@/components/Pagination'
 import ArchivesChange from './archivesChange'
+import Treeselect from '@riophae/vue-treeselect'
+import dictMixin from '../../utils/dictMixin'
 
 export default {
   components: {
+    Treeselect,
     ArchivesChange,
     Pagination
   },
+  mixins: [dictMixin],
   data() {
     return {
       dialog: {
@@ -1281,6 +1301,7 @@
         size: 15,
         num: 1
       },
+      depts: [],
       headerHeight: '30px',
       advancedQueryShow: false,
       dialogTableVisible: false,
@@ -1297,45 +1318,45 @@
       baseicInformationForm: {
         openDate: new Date()
       },
-      educationOptions: [],
-      statusOptions: [],
-      ageStrOptions: [],
-      insuranceTypeOptions: [],
-      archivesStatusOptions: [],
-      sexOptions: [],
-      empTypeOptions: [],
-      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', 'certificateListName', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName', 'empNumb'],
+      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', 'certificateListName', 'urgencyPhone', 'handbookStatusName', 'family', 'empStatusName', 'dimissionDate', 'entryTypeName', 'dimissionTypeName', 'empNumb', 'annualLeave'],
       checkedCities: []
     }
   },
+  computed: {
+    // 字典选项计算属性
+    educationOptions() { return this.getDictOptions('EDUCATION') },
+    statusOptions() { return this.getDictOptions('PLITICAL') },
+    ageStrOptions() { return this.getDictOptions('ageStr') },
+    insuranceTypeOptions() { return this.getDictOptions('INSURANCETYPE') },
+    archivesStatusOptions() { return this.getDictOptions('archivesStatus') },
+    sexOptions() { return this.getDictOptions('sex') },
+    empTypeOptions() { return this.getDictOptions('EMPTYPE') },
+    certificateListOptions() { return this.getDictOptions('certificateList') }
+  },
   mounted() {
     this.fetch()
-    this.getDicts('INSURANCETYPE').then(response => {
-      this.insuranceTypeOptions = response.data
-    })
-    this.getDicts('archivesStatus').then(response => {
-      this.archivesStatusOptions = response.data
-    })
-    this.getDicts('EDUCATION').then(response => {
-      this.educationOptions = response.data
-    })
-    this.getDicts('sex').then(response => {
-      this.sexOptions = response.data
-    })
-    this.getDicts('PLITICAL').then(response => {
-      this.statusOptions = response.data
-    })
-    this.getDicts('ageStr').then(response => {
-      this.ageStrOptions = response.data
-    })
-    this.getDicts('EMPTYPE').then(response => {
-      this.empTypeOptions = response.data
-    })
-    this.getDicts('certificateList').then(response => {
-      this.certificateListOptions = response.data
-    })
+    // 字典数据已在登录时预加载,直接从 Vuex 获取
+    this.initDictTypes(['INSURANCETYPE', 'archivesStatus', 'EDUCATION', 'sex', 'PLITICAL', 'ageStr', 'EMPTYPE', 'certificateList'])
+    this.initDept()
   },
   methods: {
+    initDept() {
+      this.$get('system/dept').then((r) => {
+        this.depts = r.data.data.rows
+        this.deptTree = this.depts
+      }).catch((error) => {
+        console.error(error)
+        this.$message({
+          message: this.$t('tips.getDataFail'),
+          type: 'error'
+        })
+      })
+    },
+    DeptNameSelect(val) {
+      this.baseicInformationForm.deptId = val.deptId
+      this.baseicInformationForm.deptName = val.label
+      this.baseicInformationForm.allDeptName = val.allDeptName
+    },
     exportExcel() {
       this.queryParams.baseKey = this.queryParams.vague
       var params = this.queryParams
@@ -1449,6 +1470,8 @@
           return '试用期内'
         case '6':
           return '正常离职'
+        case '7':
+          return '到龄退休'
       }
     },
     transDimissionType(dimissionType) {
@@ -1518,6 +1541,9 @@
             var id = selection[0].empId
             var name = selection[0].empName
             var number = selection[0].certificateNumb
+            var deptName = selection[0].deptName
+            var deptId = selection[0].deptId
+            var allDeptName = selection[0].allDeptName
             const nowDate = new Date()
             const year = nowDate.getFullYear()
             const month = nowDate.getMonth() + 1
@@ -1528,7 +1554,10 @@
               certificateNumb: number,
               openType: 21,
               openDate: year + '-' + month + '-' + day,
-              remark: ''
+              remark: '',
+              deptId: deptId,
+              deptName: deptName,
+              allDeptName: allDeptName
             }
             this.dialogShowDkda = true
           } else {

--
Gitblit v1.8.0