5 Commits

Author SHA1 Message Date
c6ea898505 保存进度! 2025-09-03 15:32:36 +08:00
711697e6a1 升级ts代码。 2025-09-03 15:29:46 +08:00
89866c8513 更新一些设置。 2025-03-16 23:04:40 +08:00
f90114e204 保存进度! 2024-02-29 01:18:04 +08:00
0458da2fae 保存进度! 2024-02-29 01:16:27 +08:00
20 changed files with 568 additions and 687 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -9,20 +9,22 @@
"preview": "vite preview"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"axios": "^1.6.7",
"echarts": "^5.5.0",
"element-plus": "^2.5.6",
"@element-plus/icons-vue": "^2.3.2",
"axios": "^1.11.0",
"echarts": "^6.0.0",
"element-plus": "^2.11.1",
"mitt": "^3.0.1",
"moment": "^2.30.1",
"vue": "^3.4.20",
"vue-router": "^4.3.0",
"task_schedule": "file:",
"vue": "^3.5.21",
"vue-router": "^4.5.1",
"vuex": "^4.1.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue": "^6.0.1",
"eslint-config-recommended": "^4.1.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-vue": "^9.22.0"
"eslint-plugin-vue": "^10.4.0",
"ts-node": "^10.9.2"
}
}

View File

@@ -0,0 +1,89 @@
/*
* @Author: Kane
* @Date: 2023-05-25 21:55:14
* @LastEditors: Kane
* @FilePath: /task_schedule/src/test/identify.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { type AxiosResponse } from "axios";
import { service as instance } from "../utils/api/request.js";
import { API_URL } from "../utils/api/config.js";
// import { login, loginCaller, type LoginCallerInfo } from "../utils/account.js";
interface LoginInfo
{
p13account: string;
password: string;
}
interface LoginCallerInfo
{
telsaler_code: string;
}
async function loginCaller( data: LoginCallerInfo ): Promise<AxiosResponse<any, any>>
{
return await instance.request(
{
method: "post",
url: API_URL.URL_LOGIN_CALLER,
data,
});
}
function loginTestCaller(): void
{
const info: LoginCallerInfo =
{
telsaler_code: "61136",
};
loginCaller( info )
.then(( response ) =>
{
console.log( response.data );
})
.catch(( error ) =>
{
console.log( error );
});
}
async function newCitizen( data: any ): Promise<AxiosResponse<any, any>>
{
return await instance.request(
{
method: "post",
url: "http://10.39.0.41:8081/NewCitizen/identify.do",
data,
}
);
}
function testNewCitizen(): void
{
const data = {
idcard_no: "350402198106130016",
name: "王炜",
};
newCitizen( data )
.then(( response ) =>
{
console.log( response.data );
})
.catch(( error ) =>
{
console.log( error );
});
}
export {
loginTestCaller,
testNewCitizen,
type LoginInfo,
type LoginCallerInfo
};

View File

@@ -0,0 +1,50 @@
import { type AxiosResponse } from "axios";
import { service as instance } from "../utils/api/request.js";
import { API_URL } from "../utils/api/config.js";
// import { login, loginCaller, type LoginCallerInfo } from "../utils/account.js";
interface LoginInfo
{
p13account: string;
password: string;
}
interface LoginCallerInfo
{
telsaler_code: string;
}
async function loginCaller( data: LoginCallerInfo ): Promise<AxiosResponse<any, any>>
{
return await instance.request(
{
method: "post",
url: API_URL.URL_LOGIN_CALLER,
data,
});
}
function loginTestCaller(): void
{
const info: LoginCallerInfo =
{
telsaler_code: "61136",
};
loginCaller( info )
.then(( response ) =>
{
console.log( response.data );
})
.catch(( error ) =>
{
console.log( error );
});
}
export {
loginTestCaller,
type LoginInfo,
type LoginCallerInfo
};

View File

@@ -0,0 +1,35 @@
/*
* @Author: Kane
* @Date: 2023-11-06 14:50:08
* @LastEditors: Kane
* @FilePath: /task_schedule/src/test/testBI.ts
* @Description: 测试bi相关的代码
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
import {
type BIReportType,
type ImportBIReportRequest,
type ImportBIReportResponse,
type ImportBIReportResponseHandler,
type BITelsalerAttachingRateRecord,
type QueryBITelsalerAttachingRateReportResponse,
type QueryBITelsalerAttachingRateDataHandler,
type BITelsalerRenewalRateRecord,
importBIReport,
queryBITelsalerAttachingRateData
} from "../utils/BIReport.ts";
function handler( response: QueryBITelsalerAttachingRateReportResponse, error: any ): void
{
if ( response.success )
{
console.log( response );
}
else
{
console.log( error );
}
}
queryBITelsalerAttachingRateData( handler );

View File

@@ -0,0 +1,28 @@
/*
* @Author: Kane
* @Date: 2023-08-28 16:02:11
* @LastEditors: Kane
* @FilePath: /task_schedule/src/test/testCallerArchievement.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { queryCallerArchievement, type CallerArchievement } from "../utils/archievement.js";
import { type TelSaler } from "../types/cpicxim/TelSaler.js";
const callInfo: TelSaler =
{
telSalerCode: "61136",
telSalerName: "陈榕榕",
teamCode: "",
teamName: "",
departmentCode: "",
departmentName: "",
};
function render(): void
{
}
queryCallerArchievement( callInfo, render );

View File

@@ -0,0 +1,31 @@
/*
* @Author: Kane
* @Date: 2023-06-07 10:16:00
* @LastEditors: Kane
* @FilePath: /task_schedule/src/test/testRankingListRequest.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { type AxiosResponse } from "axios";
// import { service as instance } from "../utils/api/request.js";
// import { API_URL } from "../utils/api/config.js";
// import { type RankingListItem } from "../types/cpicxim/RankingListItem.js";
import {
type RankingListRequest,
type RankingListResponse,
requestRankingList
} from "../utils/ranking.js";
function testRankingListRequest(): void
{
const req: RankingListRequest = {
departmentCode: "QDI",
year: "2023",
month: "06",
};
requestRankingList( req );
}
export { testRankingListRequest };

View File

@@ -0,0 +1,30 @@
/*
* @Author: Kane
* @Date: 2023-09-11 14:16:30
* @LastEditors: Kane
* @FilePath: /task_schedule/src/test/testRewardRequest.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import {
type RewardProject,
type RewardGainer,
type RewardProjectResponse,
requestRewardPorjectsList,
requestRewardGainers
} from "../utils/reward.js";
function render( data: any, error?: any ): void
{
console.log( data );
if ( error !== null )
{
console.log( "请求失败,", error );
}
}
requestRewardPorjectsList( render );
requestRewardGainers( render );

View File

@@ -11,10 +11,12 @@
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"target": "ESNext",
"module": "ESNext",
"module": "NodeNext",
// "module": "CommonJS",
"moduleResolution": "node",
"moduleResolution": "NodeNext",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
@@ -47,6 +49,7 @@
"./node_modules",
],
"ts-node": {
"esm": true
"esm": true,
"require": ["tsconfig-paths/register"],
},
}

View File

@@ -7,8 +7,8 @@
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
import { service as instance } from "./api/request.js";
import { API_URL } from "./api/config.js";
import { service as instance } from "./api/request.ts";
import { API_URL } from "./api/config.ts";
import { type AxiosResponse } from "axios";
interface BIReportType
{

View File

@@ -27,6 +27,7 @@ function loadStaffInfo(): StaffInfo
obj = {};
}
/* eslint-disable */
const stuff = new StaffInfo(
obj._p13uid ?? "",
obj._stuffCode ?? "",
@@ -35,7 +36,7 @@ function loadStaffInfo(): StaffInfo
obj._department_name ?? "",
obj._section_office_code ?? "",
obj._section_office_name ?? "" );
/* eslint-enable */
return stuff;
}

View File

@@ -7,7 +7,7 @@
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
import { service as instance } from "@/utils/api/request.js";
// import { service as instance } from "@/utils/api/request.ts";
interface SystemParameter
{

View File

@@ -7,10 +7,10 @@
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { service as instance } from "./api/request.js";
import { API_URL } from "./api/config.js";
import { type Department } from "../types/cpicxim/Department.js";
import { type TelSaler } from "../types/cpicxim/TelSaler.js";
import { service as instance } from "./api/request.ts";
import { API_URL } from "./api/config.ts";
import { type Department } from "../types/cpicxim/Department.ts";
import { type TelSaler } from "../types/cpicxim/TelSaler.ts";
import { type AxiosResponse } from "axios";
interface DepartmentArchievement // 定义业绩对象的结构
@@ -93,7 +93,7 @@ function queryDepartmentArchievement( departmentInfo: Department, render: 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 );
archievement.mensual_archievement_list.push( item.premium ); // eslint-disable-line
});
console.log( "每月业绩", archievement );
@@ -169,7 +169,7 @@ function queryCallerArchievement( callerInfo: TelSaler, render: any ): void
callArchievement.attaching_rate = data.attaching_rate ?? "0.0";
// 检查业绩清单有没有缺漏缺漏的用0补上
const checkedList = checkMensualArchievement( data.mensual_archievement_list );
const checkedList = checkMensualArchievement( data.mensual_archievement_list ); // eslint-disable-line
// 排序一下
checkedList.sort(( a: MenusalArchievementItem, b: MenusalArchievementItem ): number =>

View File

@@ -7,9 +7,9 @@
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { service as instance } from "./api/request.js";
import { API_URL } from "./api/config.js";
import { type RankingListItem } from "../types/cpicxim/RankingListItem.js";
import { service as instance } from "./api/request.ts";
import { API_URL } from "./api/config.ts";
import { type RankingListItem } from "../types/cpicxim/RankingListItem.ts";
/**
* 用于请求排行榜数据请求参数
@@ -33,7 +33,7 @@ interface RankingListResponse
}
// 判断用的正则表达式
const regexMonth = "(0[1-9])|(1[0-2])";
const regexMonth = "(0[1-9])|(1[0-2])"; // eslint-disable-line
/**
* 请求坐席排行榜。

View File

@@ -8,8 +8,8 @@
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { type AxiosResponse } from "axios";
import { service as instance } from "./api/request.js";
import { API_URL } from "./api/config.js";
import { service as instance } from "./api/request.ts";
import { API_URL } from "./api/config.ts";
interface RewardProject
{
@@ -103,7 +103,7 @@ function requestRewardPorjectsList( handler: any ): void
const data = response.data ?? {};
rewardResponse.success = data.success ?? false;
rewardResponse.message = data.message ?? "";
rewardResponse.rewardList = checkRewardProjects( data.rewardList ?? []);
rewardResponse.rewardList = checkRewardProjects( data.rewardList ?? []); // eslint-disable-line
handler( rewardResponse, null );
})
@@ -144,7 +144,7 @@ function requestRewardGainers( handler: any ): void
rewardResponse.success = data.success;
rewardResponse.message = data.message;
rewardResponse.gainerList = checkRewardGainers( data.gainerList );
rewardResponse.gainerList = checkRewardGainers( data.gainerList ); // eslint-disable-line
handler( rewardResponse, null );
})

View File

@@ -7,7 +7,6 @@
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
-->
<template>
<div class="wrapper">
<el-row :gutter="10">

View File

@@ -11,6 +11,8 @@
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
@@ -13,9 +14,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<spring.version>5.3.30</spring.version>
<!-- <spring.version>5.3.30</spring.version> -->
<log4j2.version>2.20.0</log4j2.version>
<!-- <spring.version>6.0.11</spring.version> -->
<spring.version>6.2.4</spring.version>
</properties>
<dependencies>
@@ -66,7 +67,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.18.0</version>
</dependency>
<!--jackson-->
@@ -145,6 +146,7 @@
<version>3.5.13</version>
</dependency>
</dependencies>
<build>
<finalName>desktop_archievement_backend</finalName>
<resources>

View File

@@ -1,8 +1,12 @@
/*
* @Author: Kane
*
* @Date: 2023-02-28 22:52:32
*
* @LastEditors: Kane
*
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
*
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
@@ -27,7 +31,8 @@ public class CrosFilter implements Filter
@Override
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
throws ServletException, IOException
throws ServletException,
IOException
{
HttpServletRequest request = ( HttpServletRequest ) req;
HttpServletResponse response = ( HttpServletResponse ) resp;

View File

@@ -1,7 +1,11 @@
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="4.0"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Archetype Created Web Application</display-name>