From 09d00cd810cebc2b78c3928a8673f569cbffe165 Mon Sep 17 00:00:00 2001
From: yubo <autumnal_wind@yeah.net>
Date: 星期三, 11 三月 2026 19:27:17 +0800
Subject: [PATCH] feat(dashboard): 添加四险提醒统计功能和导出功能
---
src/views/dashboard/index.vue | 80 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 76 insertions(+), 4 deletions(-)
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 086187d..7c78203 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -164,9 +164,9 @@
</el-row>
<el-row :gutter="20" class="dashboard-card">
<el-col>
- <el-card shadow="always" class="card-info" @click.native="showlz('劳资案件','1')">
+ <el-card shadow="always" class="card-info" @click.native="showlz('仲裁案件','1')">
<p class="card-number">{{ total.lzaj }}</p>
- <p>劳资案件</p>
+ <p>仲裁案件</p>
</el-card>
</el-col>
<el-col>
@@ -213,6 +213,18 @@
<p>不良记录</p>
</el-card>
</el-col>
+ <el-col>
+ <el-card shadow="always" class="card-info" @click.native="showInsurance('四险提醒','3')">
+ <p class="card-number">{{ total.insurance }}</p>
+ <p>四险提醒</p>
+ </el-card>
+ </el-col>
+ <el-col>
+ <el-card shadow="always" class="card-info" @click.native="showProbation('转正提醒')">
+ <p class="card-number">{{ total.probation }}</p>
+ <p>转正提醒</p>
+ </el-card>
+ </el-col>
</el-row>
<on-the-job-user
ref="jobUser"
@@ -244,6 +256,9 @@
<yg-user ref="ygUser" :dialog-visible="dialog.dialogShowyg" :title="title" @cancleChooseUser="cancleygUser" />
<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>
@@ -262,8 +277,11 @@
import YgUser from './ygUser'
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 },
+ components: { SfzUser, YgUser, QjUser, LzUser, GsUser, YwUser, SbUser, YjUser, TjUser, TgUser, BlUser, CqUser, HtUser, OnTheJobUser, CtUser, ZzUser, InsuranceUser },
data() {
return {
dialog: {
@@ -282,6 +300,8 @@
dialogShowqj: false,
dialogShowCq: false,
dialogShowSfz: false,
+ dialogShowProbation: false,
+ dialogShowInsurance: false,
title: '',
type: ''
},
@@ -314,7 +334,11 @@
ygtj: 0,
sfz: 0,
ygtg: 0,
- bljl: 0
+ bljl: 0,
+ zzyg: 0,
+ sxyg: 0,
+ probation: 0,
+ insurance: 0
},
pickerOptions: {
shortcuts: [
@@ -353,6 +377,7 @@
},
mounted() {
this.selectTab(0)
+ this.fetchProbationCount()
},
methods: {
showSfz(title, number) {
@@ -486,6 +511,51 @@
this.$refs.ctUser.setjobUser(btime, etime, index, number)
this.dialog.dialogShowct = true
},
+ showProbation(title) {
+ this.dialog.dialogShowProbation = true
+ this.title = title
+ const values = this.value2
+ const btime = values[0]
+ const etime = values[1]
+ 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,
+ timeRange: this.selectIndex
+ }).then((r) => {
+ const data = r.data.data
+ this.total.probation = data.total || 0
+ })
+ },
cancleChooseUser() {
this.dialog.isVisible = false
},
@@ -592,6 +662,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