From 38343c057e083d767c37e95a30a8f1a333f7173e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 09 十二月 2025 13:18:54 +0800
Subject: [PATCH] 1.海川开心-应收应付数据把筛选去掉
---
src/views/index.vue | 107 +++++++++++++++++++++++++++++++++++++----------------
1 files changed, 75 insertions(+), 32 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index 95fe72c..5c6eb91 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -13,9 +13,13 @@
<div class="company-meta">{{userStore.roleName}}</div>
</div>
<div style="display: flex;align-items: center;gap: 8px">
- <el-icon color="#5053B5" size="22"><Clock /></el-icon>
- <span>鐧婚檰鏃ユ湡锛歿{userStore.currentLoginTime}}</span>
- </div>
+ <el-icon color="#5053B5" size="22"><Clock /></el-icon>
+ <span>鐧婚檰鏃ユ湡锛歿{userStore.currentLoginTime}}</span>
+ </div>
+ <div style="display: flex;align-items: center;gap: 8px">
+ <el-icon color="#5053B5" size="22"><Calendar /></el-icon>
+ <span>鎺掔彮鏃堕棿锛歿{scheduleTime}}</span>
+ </div>
</div>
</div>
<div class="data-cards">
@@ -68,11 +72,11 @@
<li v-for="item in todoList" :key="item.id">
<div style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;gap: 20px">
<div style="display: flex;justify-content: space-between;align-items: center;">
- <div class="todo-title">娴佺▼缂栧彿锛歿{item.approveId}}</div>
- <div class="todo-division">鐢宠閮ㄩ棬锛歿{item.approveDeptName}}</div>
+ <div class="todo-title">寰呭姙缂栧彿锛歿{item.approveId}}</div>
+ <div class="todo-division">閮ㄩ棬锛歿{item.approveDeptName}}</div>
<div class="todo-time">{{item.approveTime}}</div>
</div>
- <div class="todo-division">瀹℃壒浜嬬敱锛歿{item.approveReason}}</div>
+ <div class="todo-division">寰呭姙浜嬬敱锛歿{item.approveReason}}</div>
</div>
</li>
</ul>
@@ -118,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"
@@ -138,23 +142,23 @@
<!-- 搴曢儴妯悜涓ゆ爮 -->
<div class="dashboard-row">
- <div class="main-panel">
- <div class="section-title">璐ㄩ噺缁熻</div>
- <div class="quality-cards">
- <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{qualityStatisticsObject.supplierNum}}浠�</span></div>
- <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{qualityStatisticsObject.processNum}}浠�</span></div>
- <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{qualityStatisticsObject.factoryNum}}浠�</span></div>
- </div>
- <Echarts ref="chart"
- :chartStyle="chartStyle"
- :grid="grid"
- :legend="barLegend"
- :series="barSeries1"
- :tooltip="tooltip"
- :xAxis="xAxis1"
- :yAxis="yAxis1"
- style="height: 260px"></Echarts>
- </div>
+<!-- <div class="main-panel">-->
+<!-- <div class="section-title">璐ㄩ噺缁熻</div>-->
+<!-- <div class="quality-cards">-->
+<!-- <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{qualityStatisticsObject.supplierNum}}浠�</span></div>-->
+<!-- <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{qualityStatisticsObject.processNum}}浠�</span></div>-->
+<!-- <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{qualityStatisticsObject.factoryNum}}浠�</span></div>-->
+<!-- </div>-->
+<!-- <Echarts ref="chart"-->
+<!-- :chartStyle="chartStyle"-->
+<!-- :grid="grid"-->
+<!-- :legend="barLegend"-->
+<!-- :series="barSeries1"-->
+<!-- :tooltip="tooltip"-->
+<!-- :xAxis="xAxis1"-->
+<!-- :yAxis="yAxis1"-->
+<!-- style="height: 260px"></Echarts>-->
+<!-- </div>-->
<div class="main-panel">
<div class="section-title">鍥炴涓庡紑绁ㄥ垎鏋�</div>
<Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="lineLegend" :series="lineSeries"
@@ -165,10 +169,11 @@
</template>
<script setup>
-import { ref, onMounted } from 'vue'
+import { ref, reactive, onMounted } from 'vue'
import Echarts from "@/components/Echarts/echarts.vue";
import * as echarts from 'echarts';
import useUserStore from "@/store/modules/user.js";
+import { Clock, Calendar } from '@element-plus/icons-vue'
import {
analysisCustomerContractAmounts, getAmountHalfYear,
getBusiness,
@@ -176,6 +181,8 @@
qualityStatistics,
statisticsReceivablePayable
} from "@/api/viewIndex.js";
+import { getCurrentUserLatestScheduling } from "@/api/personnelManagement/scheduling.js";
+import dayjs from "dayjs";
const userStore = useUserStore()
@@ -341,6 +348,10 @@
const todoList = ref([])
const radio1 = ref(1)
+// 鎺掔彮鏃堕棿
+const scheduleTime = ref('')
+const scheduleInfo = ref({})
+
// 鍥捐〃寮曠敤
const barChart = ref(null)
const lineChart = ref(null)
@@ -358,6 +369,7 @@
statisticsReceivable()
qualityStatisticsInfo()
getAmountHalfYearNum()
+ getCurrentUserSchedule()
})
// 鏁版嵁缁熻
const getBusinessData = () => {
@@ -386,7 +398,6 @@
}
// 搴斾粯搴旀敹缁熻
const statisticsReceivable = (type) => {
- console.log(type)
statisticsReceivablePayable({type: radio1.value}).then((res) => {
barSeries.value[0].data = [
// { value: res.data.prepayMoney, itemStyle: { color: barColors2[0] } },
@@ -410,6 +421,35 @@
qualityStatisticsObject.value.factoryNum = res.data.factoryNum
})
}
+// 鑾峰彇褰撳墠鐢ㄦ埛鎺掔彮淇℃伅
+const getCurrentUserSchedule = async () => {
+ try {
+ const res = await getCurrentUserLatestScheduling()
+
+ if (res.data) {
+ const currentSchedule = res.data
+ scheduleInfo.value = currentSchedule
+
+ // 鏍煎紡鍖栨帓鐝椂闂存樉绀�
+ if (currentSchedule.startTime && currentSchedule.endTime) {
+ scheduleTime.value = `${currentSchedule.startTime} - ${currentSchedule.endTime}`
+ } else if (currentSchedule.workStartTime && currentSchedule.workEndTime) {
+ const startTime = dayjs(currentSchedule.workStartTime).format('HH:mm')
+ const endTime = dayjs(currentSchedule.workEndTime).format('HH:mm')
+ scheduleTime.value = `${startTime} - ${endTime}`
+ } else {
+ scheduleTime.value = '浠婃棩鏃犳帓鐝�'
+ }
+ } else {
+ scheduleTime.value = '浠婃棩鏃犳帓鐝�'
+ scheduleInfo.value = {}
+ }
+ } catch (error) {
+ console.error('鑾峰彇鎺掔彮淇℃伅澶辫触:', error)
+ scheduleTime.value = '鑾峰彇鎺掔彮淇℃伅澶辫触'
+ }
+}
+
const getAmountHalfYearNum = async () => {
const res = await getAmountHalfYear()
console.log(res)
@@ -744,15 +784,18 @@
color: #666;
list-style: none;
padding: 0;
+ height: 190px;
+ overflow-y: auto;
+ width: 460px;
}
.line {
position: relative;
- width: 250px;
+ width: 230px;
}
.line::after {
content: '';
position: absolute;
- right: 12px;
+ right: 2px;
top: 0;
bottom: 0;
width: 1px;
--
Gitblit v1.9.3