From 4c72dd4e55dbfae3dca4a7ac4342220e93f25a8b Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期三, 11 三月 2026 18:04:07 +0800
Subject: [PATCH] feat(dashboard): 添加四险提醒功能并优化员工管理界面

---
 src/views/dashboard/index.vue |   41 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 53302e3..fb370d9 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -214,8 +214,8 @@
         </el-card>
       </el-col>
       <el-col>
-        <el-card shadow="always" class="card-info" @click.native="showbl('不良记录','3')">
-          <p class="card-number">{{ total.sxyg }}</p>
+        <el-card shadow="always" class="card-info" @click.native="showInsurance('四险提醒','3')">
+          <p class="card-number">{{ total.insurance }}</p>
           <p>四险提醒</p>
         </el-card>
       </el-col>
@@ -257,6 +257,7 @@
     <sfz-user ref="sfzUser" :dialog-visible="dialog.dialogShowSfz" :title="title" @cancleChooseUser="cancleSfzUser" />
     <ct-user ref="ctUser" :dialog-visible="dialog.dialogShowct" :title="title" @cancleChooseUser="canclectUser" />
     <zz-user ref="zzUser" :dialog-visible="dialog.dialogShowProbation" :title="title" @cancleChooseUser="cancleZzUser" />
+    <insurance-user ref="insuranceUser" :dialog-visible="dialog.dialogShowInsurance" :title="title" @cancleChooseUser="cancleInsuranceUser" />
   </div>
 </template>
 <script>
@@ -276,9 +277,10 @@
 import CtUser from './ctUser'
 import SfzUser from './sfzUser'
 import ZzUser from './zzUser'
+import InsuranceUser from './insuranceUser'
 
 export default {
-  components: { SfzUser, YgUser, QjUser, LzUser, GsUser, YwUser, SbUser, YjUser, TjUser, TgUser, BlUser, CqUser, HtUser, OnTheJobUser, CtUser, ZzUser },
+  components: { SfzUser, YgUser, QjUser, LzUser, GsUser, YwUser, SbUser, YjUser, TjUser, TgUser, BlUser, CqUser, HtUser, OnTheJobUser, CtUser, ZzUser, InsuranceUser },
   data() {
     return {
       dialog: {
@@ -297,8 +299,8 @@
         dialogShowqj: false,
         dialogShowCq: false,
         dialogShowSfz: false,
-        dialgoShowProbation: false,
         dialogShowProbation: false,
+        dialogShowInsurance: false,
         title: '',
         type: ''
       },
@@ -334,7 +336,8 @@
         bljl: 0,
         zzyg: 0,
         sxyg: 0,
-        probation: 0
+        probation: 0,
+        insurance: 0
       },
       pickerOptions: {
         shortcuts: [
@@ -513,18 +516,40 @@
       const values = this.value2
       const btime = values[0]
       const etime = values[1]
-      const index = this.selectIndex
+      const index = this.selectIndex // 传入当前 dashboard 选中的时间维度
       this.$refs.zzUser.setjobUser(btime, etime, index, null)
+    },
+    showProbation(title) {
+      this.dialog.dialogShowInsurance = true
+      this.title = title
+      const values = this.value2
+      const btime = values[0]
+      const etime = values[1]
+      const index = this.selectIndex
+      this.$refs.insuranceUser.setjobUser(btime, etime, index, null)
+    },
+    showInsurance(title) {
+      this.dialog.dialogShowInsurance = true
+      this.title = title
+      const values = this.value2
+      const btime = values[0]
+      const etime = values[1]
+      const index = this.selectIndex
+      this.$refs.insuranceUser.setjobUser(btime, etime, index, null)
     },
     cancleZzUser() {
       this.dialog.dialogShowProbation = false
+    },
+    cancleInsuranceUser() {
+      this.dialog.dialogShowInsurance = false
     },
     fetchProbationCount() {
       this.$get('hr/empBaseInfo/probation/alert', {
         pageSize: 1,
         pageNum: 1,
         delFlag: 0,
-        empStatus: 0
+        empStatus: 0,
+        timeRange: this.selectIndex
       }).then((r) => {
         const data = r.data.data
         this.total.probation = data.total || 0
@@ -636,6 +661,8 @@
       this.total.clyg = data.clyg
       this.total.ygtg = data.ygtg
       this.total.bljl = data.bljl
+      this.total.probation = data.probationCount
+      this.total.insurance = data.insuranceCount
     }
   }
 }

--
Gitblit v1.8.0