保存进度!

This commit is contained in:
2023-08-25 20:47:36 +08:00
parent f5a53e2f55
commit fd59698264
9 changed files with 766 additions and 371 deletions

View File

@@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2023-02-15 09:25:52
* @LastEditors: Kane
* @LastEditTime: 2023-03-17 14:31:14
* @LastEditTime: 2023-08-25 10:53:30
* @FilePath: /task_schedule/src/App.vue
* @Description:
* 应用的框架
@@ -17,7 +17,7 @@
</template>
<script lang="ts">
import zhCn from "element-plus/lib/locale/lang/zh-cn"; // element-plus语言组件
import zhCn from "element-plus/es/locale/lang/zh-cn"; // element-plus语言组件
export default {
name: "App",

View File

@@ -62,10 +62,10 @@ function queryDepartmentArchievement( departmentInfo: Department, render: any ):
archievement.leading_reward_gainers = data.leading_reward_gainers ?? [];
archievement.advance_reward_gainers = data.advance_reward_gainers ?? [];
archievement.backward_list = data.backward_list ?? [];
// 转换每月业绩数据用month排序以后保留premium。
data.mensual_archievement_list.sort(( a:any, b:any )=>a.month-b.month );
data.mensual_archievement_list.forEach(( item:any )=>
data.mensual_archievement_list.sort(( a: any, b: any ) => a.month - b.month );
data.mensual_archievement_list.forEach(( item: any ) =>
{
archievement.mensual_archievement_list.push( item.premium );
});

View File

@@ -17,7 +17,7 @@
<div class="center-wrapper">
<span class="slogan">对标先进&nbsp;比学赶超</span>
<div class="total-archievement-wrapper">
<span>业绩</span>
<span>我的车险业绩</span>
<span>{{ getTotalArchievement }}</span>
</div>
<div class="archievement-wrapper">
@@ -55,9 +55,7 @@
indicator-position="none"
:interval="4000"
>
<el-carousel-item
:key="1"
>
<el-carousel-item :key="1">
<RankingListComponent :ranking-list="ui.attachingRankingList" />
</el-carousel-item>
<el-carousel-item :key="2">
@@ -88,9 +86,18 @@ import { computed, reactive, onBeforeMount, onUnmounted } from "vue";
import { useRouter } from "vue-router";
import { getCallerInfo } from "@/utils/api/localStorage.js";
import { ElMessage } from "element-plus";
import { type Archievement, queryDepartmentArchievement } from "@/utils/archievement.js";
import
{
type Archievement,
queryDepartmentArchievement
} from "@/utils/archievement.js";
import { RankingListItem } from "@/types/cpicxim/RankingListItem.js";
import { type RankingListRequest, type RankingListResponse, requestRankingList } from "@/utils/ranking.js";
import
{
type RankingListRequest,
type RankingListResponse,
requestRankingList
} from "@/utils/ranking.js";
import { type Department } from "@/types/cpicxim/Department";
import ArchievementChart from "@/components/ArchievementChartComponent.vue";
import ArchievementCompleteRateComponent from "@/components/ArchievementCompleteRateComponent.vue";
@@ -127,7 +134,20 @@ export default {
setup()
{
const monthIndex = new Date();
const numInChinese = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",];
const numInChinese = [
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九",
"十",
"十一",
"十二",
];
const router = useRouter();
const callerInfo: TelSaler = getCallerInfo();
const ui: ui = reactive({
@@ -147,12 +167,11 @@ export default {
const getTotalArchievement = computed(() =>
{
const cnyFormat = new Intl.NumberFormat( "zh-cn",
{
style: "currency",
currency: "CNY",
minimumFractionDigits: 0,
});
const cnyFormat = new Intl.NumberFormat( "zh-cn", {
style: "currency",
currency: "CNY",
minimumFractionDigits: 0,
});
const archievement = cnyFormat.format( ui.totalArchievement );
return archievement;
@@ -175,7 +194,10 @@ export default {
// 先不显示界面往队列中加入显示队列的回调让vue刷新组件。
ui.showUI = false;
setTimeout(() => { ui.showUI = true; }, 0 );
setTimeout(() =>
{
ui.showUI = true;
}, 0 );
};
const applyRankingListData = ( data: RankingListResponse ): void =>
@@ -189,7 +211,10 @@ export default {
console.log( "获取排行榜后的ui:", data );
setTimeout(() => { ui.showUI = true; }, 0 );
setTimeout(() =>
{
ui.showUI = true;
}, 0 );
};
// 退出桌面霸屏
@@ -218,14 +243,12 @@ export default {
*/
const refresh = () =>
{
const deparmentInfo: Department =
{
const deparmentInfo: Department = {
departmentCode: callerInfo.departmentCode,
departmentName: callerInfo.departmentName,
};
const rankinglistRequest: RankingListRequest =
{
const rankinglistRequest: RankingListRequest = {
departmentCode: callerInfo.departmentCode,
year: "2023",
month: "06",
@@ -255,7 +278,15 @@ export default {
clearInterval( timerHandler );
});
return { ui, callerInfo, timerHandler, getTotalArchievement, renderData: applyArchievementData, refresh, logoutDesktopArchievement, };
return {
ui,
callerInfo,
timerHandler,
getTotalArchievement,
renderData: applyArchievementData,
refresh,
logoutDesktopArchievement,
};
},
};
</script>
@@ -388,12 +419,13 @@ export default {
// >*+* {
// margin-top: 15px;
// }
> h1 {
>h1 {
font: {
family: "FZ-ZHUOHEI";
weight: 100;
size: 30px;
}
color: $color-bg-04;
text-align: center;
@@ -401,7 +433,7 @@ export default {
width: 300px;
}
> div {
>div {
display: block;
height: 260px;
width: 300px;
@@ -416,7 +448,7 @@ body {
$color-bg-03,
$color-bg-04,
$color-bg-05,
$color-bg-05);
$color-bg-05 );
}
div {