2023-03-03 16:08:27 +08:00
|
|
|
|
<!--
|
|
|
|
|
* @Author: Kane
|
|
|
|
|
* @Date: 2023-03-03 14:38:07
|
|
|
|
|
* @LastEditors: Kane
|
|
|
|
|
* @FilePath: /task_schedule/src/views/DesktopArchievement.vue
|
|
|
|
|
* @Description: 显示在桌面上,展示任务量与业绩的view
|
2023-03-17 14:40:04 +08:00
|
|
|
|
*
|
|
|
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
2023-03-03 16:08:27 +08:00
|
|
|
|
-->
|
|
|
|
|
<template>
|
2023-03-03 17:28:49 +08:00
|
|
|
|
<div class="view-wrapper">
|
2023-03-04 00:09:25 +08:00
|
|
|
|
<div class="center-wrapper">
|
|
|
|
|
<span class="slogan">对标先进 比学赶超</span>
|
2023-03-04 16:38:56 +08:00
|
|
|
|
<div class="total-archievement-wrapper">
|
2023-03-08 13:24:12 +08:00
|
|
|
|
<span>总业绩</span>
|
2023-03-08 16:35:40 +08:00
|
|
|
|
<span>{{ getTotalArchievement }}</span>
|
2023-03-08 13:24:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="archievement-wrapper">
|
2023-03-08 00:56:38 +08:00
|
|
|
|
<div class="total-archievement-rate-wrapper">
|
2023-03-17 14:40:04 +08:00
|
|
|
|
<ArchievementCompleteRateComponent
|
|
|
|
|
indicator="续保完成率"
|
|
|
|
|
percentage="95"
|
|
|
|
|
/>
|
|
|
|
|
<ArchievementCompleteRateComponent
|
|
|
|
|
indicator="车非渗透率"
|
|
|
|
|
percentage="95"
|
|
|
|
|
/>
|
2023-03-08 00:56:38 +08:00
|
|
|
|
</div>
|
2023-03-04 18:05:47 +08:00
|
|
|
|
<div class="total-archievement-charts-wrapper">
|
2023-03-17 14:40:04 +08:00
|
|
|
|
<ArchievementChart
|
|
|
|
|
total_archievement="435220"
|
|
|
|
|
:chart_data="ui.chartData"
|
|
|
|
|
/>
|
2023-03-04 18:05:47 +08:00
|
|
|
|
</div>
|
2023-03-04 16:38:56 +08:00
|
|
|
|
</div>
|
2023-03-08 16:35:40 +08:00
|
|
|
|
<div class="reward-wrapper">
|
2023-03-17 14:40:04 +08:00
|
|
|
|
<HonorListComponent
|
|
|
|
|
month="二"
|
|
|
|
|
leading-reward="王炜"
|
|
|
|
|
advance-reward="王炜"
|
|
|
|
|
/>
|
|
|
|
|
<DishonorListComponent
|
|
|
|
|
month="二"
|
|
|
|
|
:dishonor-persons="ui.dishonorPersons"
|
|
|
|
|
/>
|
2023-03-08 16:35:40 +08:00
|
|
|
|
</div>
|
2023-03-04 00:09:25 +08:00
|
|
|
|
</div>
|
2023-03-17 14:40:04 +08:00
|
|
|
|
<div class="right-wrapper" />
|
2023-03-03 17:28:49 +08:00
|
|
|
|
</div>
|
2023-03-03 16:08:27 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-03-08 13:24:12 +08:00
|
|
|
|
import { computed, reactive } from "vue";
|
2023-03-03 17:28:49 +08:00
|
|
|
|
import { useRouter } from "vue-router";
|
2023-03-07 23:04:03 +08:00
|
|
|
|
import { loadStaffInfo } from "@/utils/api/localStorage.js";
|
2023-03-03 17:28:49 +08:00
|
|
|
|
import { ElMessage } from "element-plus";
|
2023-03-08 10:29:35 +08:00
|
|
|
|
import ArchievementChart from "@/components/ArchievementChartComponent.vue";
|
2023-03-08 00:56:38 +08:00
|
|
|
|
import ArchievementCompleteRateComponent from "@/components/ArchievementCompleteRateComponent.vue";
|
2023-03-08 16:35:40 +08:00
|
|
|
|
import HonorListComponent from "@/components/HonorListComponent.vue";
|
2023-03-08 20:14:41 +08:00
|
|
|
|
import DishonorListComponent from "@/components/DishonorListComponent.vue";
|
2023-03-04 18:05:47 +08:00
|
|
|
|
|
2023-03-03 16:08:27 +08:00
|
|
|
|
export default {
|
|
|
|
|
name: "DesktopArchievement",
|
2023-03-08 13:24:12 +08:00
|
|
|
|
components: {
|
|
|
|
|
ArchievementChart,
|
|
|
|
|
ArchievementCompleteRateComponent,
|
2023-03-08 16:35:40 +08:00
|
|
|
|
HonorListComponent,
|
2023-03-08 20:14:41 +08:00
|
|
|
|
DishonorListComponent,
|
2023-03-08 13:24:12 +08:00
|
|
|
|
},
|
2023-03-03 16:08:27 +08:00
|
|
|
|
setup()
|
|
|
|
|
{
|
2023-03-03 17:28:49 +08:00
|
|
|
|
const router = useRouter();
|
2023-03-04 16:38:56 +08:00
|
|
|
|
const staffInfo = loadStaffInfo();
|
2023-03-08 13:24:12 +08:00
|
|
|
|
const ui = reactive({
|
|
|
|
|
chartData: [200, 230, 224, 218, 135, 147, 260, 800,],
|
2023-03-08 20:14:41 +08:00
|
|
|
|
totalArchievement: 120000000,
|
|
|
|
|
dishonorPersons: ["张三", "李四",],
|
2023-03-08 13:24:12 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const getTotalArchievement = computed(() =>
|
|
|
|
|
{
|
2023-03-08 16:35:40 +08:00
|
|
|
|
const cnyFormat = new Intl.NumberFormat("zh-cn",
|
|
|
|
|
{
|
|
|
|
|
style: "currency",
|
|
|
|
|
currency: "CNY",
|
|
|
|
|
minimumFractionDigits: 0,
|
|
|
|
|
});
|
|
|
|
|
const archievement = cnyFormat.format(ui.totalArchievement);
|
2023-03-08 13:24:12 +08:00
|
|
|
|
|
|
|
|
|
return archievement;
|
|
|
|
|
});
|
2023-03-03 16:08:27 +08:00
|
|
|
|
|
2023-03-17 14:40:04 +08:00
|
|
|
|
// 检查存储的登录信息,不存在则返回登录页面
|
|
|
|
|
if (staffInfo.P13UID === "")
|
2023-03-03 16:08:27 +08:00
|
|
|
|
{
|
2023-03-03 17:28:49 +08:00
|
|
|
|
ElMessage({
|
|
|
|
|
message: "登录信息失效,请重新登录!",
|
|
|
|
|
type: "success",
|
|
|
|
|
center: true,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.push("/login");
|
|
|
|
|
}
|
2023-03-08 13:24:12 +08:00
|
|
|
|
|
|
|
|
|
return { ui, getTotalArchievement, };
|
2023-03-03 16:08:27 +08:00
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2023-03-03 17:28:49 +08:00
|
|
|
|
.view-wrapper {
|
2023-03-03 16:08:27 +08:00
|
|
|
|
box-sizing: border-box;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
min-height: 800px;
|
|
|
|
|
height: calc(100vh - 10mm);
|
2023-03-04 00:09:25 +08:00
|
|
|
|
min-width: 1280px;
|
2023-03-03 17:28:49 +08:00
|
|
|
|
width: 100vw;
|
2023-03-04 00:09:25 +08:00
|
|
|
|
padding: 5mm;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: end;
|
|
|
|
|
align-items: stretch;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 18:05:47 +08:00
|
|
|
|
.left-wrapper {
|
|
|
|
|
width: 10%;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 16:38:56 +08:00
|
|
|
|
.center-wrapper {
|
|
|
|
|
//中间部分
|
|
|
|
|
width: 50%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
justify-content: start;
|
|
|
|
|
|
2023-03-04 00:09:25 +08:00
|
|
|
|
.slogan {
|
2023-03-04 16:38:56 +08:00
|
|
|
|
//标语
|
2023-03-04 00:09:25 +08:00
|
|
|
|
margin: 0px;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
padding: 15px 0px;
|
2023-03-04 00:09:25 +08:00
|
|
|
|
display: block;
|
|
|
|
|
text-align: center;
|
2023-03-08 13:24:12 +08:00
|
|
|
|
flex-grow: 0;
|
2023-03-03 17:28:49 +08:00
|
|
|
|
|
2023-03-04 00:09:25 +08:00
|
|
|
|
font: {
|
|
|
|
|
family: "FZ-ZHUOHEI";
|
|
|
|
|
weight: 100;
|
2023-03-04 18:05:47 +08:00
|
|
|
|
size: 90px;
|
2023-03-04 00:09:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 18:05:47 +08:00
|
|
|
|
color: $color-bg-04;
|
2023-03-04 00:09:25 +08:00
|
|
|
|
text-shadow: #feebb1 0px 0px,
|
|
|
|
|
#feebb1 5px 0px,
|
|
|
|
|
#feebb1 -5px -0px,
|
|
|
|
|
#feebb1 -0px -5px,
|
|
|
|
|
#feebb1 -4px -4px,
|
|
|
|
|
#feebb1 4px 4px,
|
|
|
|
|
#feebb1 4px -4px,
|
|
|
|
|
#feebb1 -4px 4px;
|
2023-03-03 17:28:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 16:38:56 +08:00
|
|
|
|
.total-archievement-wrapper {
|
2023-03-08 13:24:12 +08:00
|
|
|
|
height: 80px;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
color: #25e6e6;
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
|
|
font: {
|
|
|
|
|
size: 35px;
|
|
|
|
|
family: "FZ-ZHUOHEI";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flex-grow: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.archievement-wrapper {
|
2023-03-04 16:38:56 +08:00
|
|
|
|
//业绩部分
|
2023-03-08 13:24:12 +08:00
|
|
|
|
height: 280px;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
|
2023-03-08 16:35:40 +08:00
|
|
|
|
>*+* {
|
|
|
|
|
margin-left: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 16:38:56 +08:00
|
|
|
|
.total-archievement-rate-wrapper {
|
|
|
|
|
//业绩比例
|
2023-03-08 16:35:40 +08:00
|
|
|
|
// width: 20%;
|
|
|
|
|
width: 140px;
|
|
|
|
|
min-width: 140px;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
display: flex;
|
2023-03-08 10:29:35 +08:00
|
|
|
|
flex-direction: column;
|
2023-03-08 13:24:12 +08:00
|
|
|
|
justify-content: center;
|
2023-03-08 10:29:35 +08:00
|
|
|
|
align-items: center;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.total-archievement-charts-wrapper {
|
|
|
|
|
//业绩图表
|
2023-03-08 16:35:40 +08:00
|
|
|
|
width: 70%;
|
2023-03-04 16:38:56 +08:00
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2023-03-04 00:09:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 16:38:56 +08:00
|
|
|
|
.reward-wrapper {
|
|
|
|
|
//奖励部分
|
2023-03-08 16:35:40 +08:00
|
|
|
|
// height: 280px;
|
|
|
|
|
padding: 15px;
|
2023-03-08 20:14:41 +08:00
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
>*+* {
|
|
|
|
|
margin-left: 15px;
|
|
|
|
|
}
|
2023-03-04 16:38:56 +08:00
|
|
|
|
}
|
2023-03-04 00:09:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right-wrapper {
|
|
|
|
|
min-width: 400px;
|
|
|
|
|
width: 25%;
|
2023-03-03 17:28:49 +08:00
|
|
|
|
}
|
2023-03-03 16:08:27 +08:00
|
|
|
|
</style>
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
body {
|
2023-03-03 17:28:49 +08:00
|
|
|
|
background-image: radial-gradient(farthest-corner at 100% 0%,
|
|
|
|
|
$color-bg-01,
|
|
|
|
|
$color-bg-02,
|
|
|
|
|
$color-bg-03,
|
|
|
|
|
$color-bg-04,
|
|
|
|
|
$color-bg-05,
|
|
|
|
|
$color-bg-05);
|
2023-03-03 16:08:27 +08:00
|
|
|
|
}
|
2023-03-08 20:14:41 +08:00
|
|
|
|
|
|
|
|
|
div {
|
|
|
|
|
// border: 1px solid red;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
2023-03-17 14:40:04 +08:00
|
|
|
|
</style>
|