保存进度!

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

@@ -67,25 +67,28 @@ module.exports = {
js: "espree",
"<template>": "espree",
},
project: "./tsconfig.json",
extraFileExtensions: [".vue",],
},
plugins: ["eslint-plugin-vue",],
extends: [
"plugin:vue/vue3-essential",
"plugin:vue/recommended",
"eslint:recommended",
// "standard-with-typescript",
// "standard-with-typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
indent: ["warn", 4,],
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-unused-vars": "warn",
semi: ["error", "always",], // 控制行尾部分号
quotes: ["error", "double",],
"semi-spacing": ["error", {"before": false, "after": true,},], // 控制行尾部分号
"quotes": ["error", "double",],
"comma-dangle": ["error", {
arrays: "always",
objects: "always",
@@ -144,11 +147,12 @@ module.exports = {
plugins: ["@typescript-eslint",],
extends: [
"eslint:recommended",
// "standard-with-typescript",
"standard-with-typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
@@ -189,6 +193,7 @@ module.exports = {
"prefer-const": "warn",
"spaced-comment": "error",
"space-before-function-paren": "off",
"semi-spacing": ["error", {"before": false, "after": true,},],
},
},
],

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,14 @@
"preview": "vite preview"
},
"dependencies": {
"@babel/eslint-parser": "^7.22.9",
"@babel/eslint-parser": "^7.22.11",
"@element-plus/icons-vue": "^2.1.0",
"@rushstack/eslint-patch": "^1.3.3",
"@vue/eslint-config-typescript": "^11.0.3",
"axios": "^1.4.0",
"babel": "^6.23.0",
"echarts": "^5.4.3",
"element-plus": "^2.3.7",
"element-plus": "^2.3.10",
"moment": "^2.29.4",
"sass-loader": "^13.3.2",
"vue": "^3.3.4",
@@ -22,16 +24,16 @@
"vuex": "^4.1.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.22.9",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@vitejs/plugin-vue": "^4.2.3",
"@babel/eslint-parser": "^7.22.11",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@vitejs/plugin-vue": "^4.3.3",
"@vue/cli-plugin-eslint": "^5.0.8",
"eslint-config-recommended": "^4.1.0",
"eslint-plugin-vue": "^9.16.1",
"eslint-config-standard-with-typescript": "^38.0.0",
"eslint-plugin-vue": "^9.17.0",
"node-sass": "^9.0.0",
"sass": "^1.64.1",
"sass": "^1.66.1",
"style-loader": "^3.3.3",
"typescript": "^5.1.6",
"vue-eslint-parser": "^9.3.1"
}
}

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 {

View File

@@ -19,6 +19,7 @@
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": false,
"isolatedModules": true,
"baseUrl": "./", // paths 路径解析起点
"paths": { // 别名路径设置
"@/*": [