From f7cd57455346e4fd7085eae8bcf7b01a75c94d25 Mon Sep 17 00:00:00 2001
From: 周宾 <2802492122@qq.com>
Date: 星期一, 22 十二月 2025 16:35:11 +0800
Subject: [PATCH] 海川开心-协同办公-报销管理金额显示
---
src/views/index.vue | 72 +++++++++++++++++++++++++++---------
1 files changed, 54 insertions(+), 18 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index e616dc9..e6b22c5 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -122,11 +122,11 @@
<div class="main-panel">
<div style="display: flex;justify-content: space-between;">
<div class="section-title">搴旀敹搴斾粯缁熻</div>
- <el-radio-group v-model="radio1" size="large" @change="statisticsReceivable">
- <el-radio-button label="鎸夊懆" :value="1" />
- <el-radio-button label="鎸夋湀" :value="2" />
- <el-radio-button label="鎸夊搴�" :value="3" />
- </el-radio-group>
+<!-- <el-radio-group v-model="radio1" size="large" @change="statisticsReceivable">-->
+<!-- <el-radio-button label="鎸夊懆" :value="1" />-->
+<!-- <el-radio-button label="鎸夋湀" :value="2" />-->
+<!-- <el-radio-button label="鎸夊搴�" :value="3" />-->
+<!-- </el-radio-group>-->
</div>
<Echarts ref="chart"
:color="barColors2"
@@ -169,7 +169,8 @@
</template>
<script setup>
-import { ref, onMounted } from 'vue'
+import { ref, reactive, onMounted } from 'vue'
+import { ElNotification } from 'element-plus'
import Echarts from "@/components/Echarts/echarts.vue";
import * as echarts from 'echarts';
import useUserStore from "@/store/modules/user.js";
@@ -179,9 +180,11 @@
getBusiness,
homeTodos,
qualityStatistics,
- statisticsReceivablePayable
+ statisticsReceivablePayable,
+ approveAndDeviceTodos,
+ noticesCount
} from "@/api/viewIndex.js";
-import { listPage } from "@/api/personnelManagement/scheduling.js";
+import { getCurrentUserLatestScheduling } from "@/api/personnelManagement/scheduling.js";
import dayjs from "dayjs";
const userStore = useUserStore()
@@ -370,6 +373,8 @@
qualityStatisticsInfo()
getAmountHalfYearNum()
getCurrentUserSchedule()
+ getApproveAndDeviceTodos()
+ getOngoingAnnouncementNoticeNumber()
})
// 鏁版嵁缁熻
const getBusinessData = () => {
@@ -424,17 +429,10 @@
// 鑾峰彇褰撳墠鐢ㄦ埛鎺掔彮淇℃伅
const getCurrentUserSchedule = async () => {
try {
- const today = dayjs().format('YYYY-MM-DD')
- const res = await listPage({
- staffName: userStore.name,
- startDate: today,
- endDate: today,
- current: 1,
- size: 10
- })
+ const res = await getCurrentUserLatestScheduling()
- if (res.data && res.data.records && res.data.records.length > 0) {
- const currentSchedule = res.data.records[0]
+ if (res.data) {
+ const currentSchedule = res.data
scheduleInfo.value = currentSchedule
// 鏍煎紡鍖栨帓鐝椂闂存樉绀�
@@ -532,6 +530,44 @@
}
]
}
+
+// 鍗忓悓寰呭鎵瑰拰鎶ヤ慨寰呭姙浜嬮」
+const getApproveAndDeviceTodos = async () => {
+ try {
+ const res = await approveAndDeviceTodos()
+ const { approveTodo, deviceRepairTodo } = res.data
+
+ // 鏄剧ず閫氱煡
+ ElNotification({
+ title: '寰呭姙浜嬮」鎻愰啋',
+ message: `褰撳墠鏈�${approveTodo}鏉″緟瀹℃壒浜嬮」锛�${deviceRepairTodo}鏉″緟缁翠慨浜嬮」`,
+ type: 'warning',
+ duration: 5000
+ })
+ } catch (error) {
+ console.error('鑾峰彇鍗忓悓寰呭姙浜嬮」澶辫触:', error)
+ }
+}
+// 杩涜涓叕鍛婇�氱煡
+const getOngoingAnnouncementNoticeNumber = async () => {
+ try {
+ const res = await noticesCount()
+ // const { approveTodo, deviceRepairTodo } = res.data
+ const _noticesCount = res.data
+ if(!_noticesCount){
+ return
+ }
+ // 鏄剧ず閫氱煡
+ ElNotification({
+ title: '閫氱煡鍏憡閫氱煡',
+ message: `褰撳墠鏈�${_noticesCount}鏉″叕鍛婇�氱煡锛屾敞鎰忔煡鐪媊,
+ type: 'warning',
+ duration: 5000
+ })
+ } catch (error) {
+ console.error('鑾峰彇鍗忓悓寰呭姙浜嬮」澶辫触:', error)
+ }
+}
</script>
<style scoped>
--
Gitblit v1.9.3