Compare commits
3 Commits
b2a973f7bd
...
fd59698264
Author | SHA1 | Date |
---|---|---|
Kane Wang | fd59698264 | |
Kane Wang | f5a53e2f55 | |
Kane Wang | 5b6285993f |
|
@ -8,7 +8,10 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
|||
|
||||
-- 异常
|
||||
DEPARTMENTCODE_EXCEPTION_CODE CONSTANT INTEGER := -20000;
|
||||
DEPARTMENTCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '部门代码无效';
|
||||
DEPARTMENTCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '部门代码无效。';
|
||||
|
||||
CALLERCODE_EXCEPTION_CODE CONSTANT INTEGER := -20001;
|
||||
CALLERCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '坐席工号无效。';
|
||||
|
||||
PROCEDURE department_archievement
|
||||
(
|
||||
|
@ -19,6 +22,15 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
|||
a_mensual_cur OUT cur_type
|
||||
);
|
||||
|
||||
PROCEDURE caller_archievement
|
||||
(
|
||||
a_caller_code IN VARCHAR2,
|
||||
a_attaching_rate OUT VARCHAR2,
|
||||
a_renewal_rate OUT VARCHAR2,
|
||||
a_total OUT INTEGER,
|
||||
a_mensual_cur OUT cur_type
|
||||
);
|
||||
|
||||
PROCEDURE caller_arch_ranking_list
|
||||
(
|
||||
a_department_code IN VARCHAR2,
|
||||
|
@ -30,153 +42,226 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
|||
|
||||
END telsale_archievement_pkg;
|
||||
/
|
||||
CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS
|
||||
|
||||
CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
-- 部门业绩
|
||||
PROCEDURE department_archievement
|
||||
PROCEDURE DEPARTMENT_ARCHIEVEMENT
|
||||
(
|
||||
a_department_code IN VARCHAR2,
|
||||
a_attaching_rate OUT VARCHAR2,
|
||||
a_renewal_rate OUT VARCHAR2,
|
||||
a_total OUT INTEGER,
|
||||
a_mensual_cur OUT cur_type
|
||||
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||
A_ATTACHING_RATE OUT VARCHAR2,
|
||||
A_RENEWAL_RATE OUT VARCHAR2,
|
||||
A_TOTAL OUT INTEGER,
|
||||
A_MENSUAL_CUR OUT CUR_TYPE
|
||||
) IS
|
||||
l_this_month VARCHAR2(4);
|
||||
l_this_year VARCHAR2(4);
|
||||
l_firstday DATE;
|
||||
l_department_name VARCHAR2(100);
|
||||
L_THIS_MONTH VARCHAR2(4);
|
||||
L_THIS_YEAR VARCHAR2(4);
|
||||
L_FIRSTDAY DATE;
|
||||
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||
BEGIN
|
||||
l_this_month := to_char(SYSDATE,
|
||||
L_THIS_MONTH := TO_CHAR(SYSDATE,
|
||||
'mm');
|
||||
l_this_year := to_char(SYSDATE,
|
||||
L_THIS_YEAR := TO_CHAR(SYSDATE,
|
||||
'yyyy');
|
||||
l_firstday := to_date(to_char(SYSDATE,
|
||||
L_FIRSTDAY := TO_DATE(TO_CHAR(SYSDATE,
|
||||
'yyyy') || '-01-01 00:00:00',
|
||||
'yyyy-mm-dd hh24:mi:ss');
|
||||
-- 获取部门名称
|
||||
BEGIN
|
||||
SELECT department_name
|
||||
INTO l_department_name
|
||||
FROM idst0.bm_t bm
|
||||
WHERE bm.department_code = a_department_code;
|
||||
SELECT DEPARTMENT_NAME
|
||||
INTO L_DEPARTMENT_NAME
|
||||
FROM IDST0.BM_T BM
|
||||
WHERE BM.DEPARTMENT_CODE = A_DEPARTMENT_CODE;
|
||||
EXCEPTION
|
||||
-- 如果没有找到部门名称,说明代码错误,抛出异常
|
||||
WHEN NO_DATA_FOUND THEN
|
||||
raise_application_error(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||
RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||
DEPARTMENTCODE_EXCEPTION_MSG);
|
||||
END;
|
||||
--车非渗透率
|
||||
SELECT DECODE(SUM(CF.车险个人客户保费),
|
||||
0,
|
||||
0,
|
||||
ROUND((SUM(CF.车非融合保费) / SUM(CF.车险个人客户保费) * 100),
|
||||
2))
|
||||
INTO A_ATTACHING_RATE
|
||||
FROM 坐席车非每日保费 CF
|
||||
WHERE CF.月份 = L_THIS_MONTH
|
||||
AND CF.年份 = L_THIS_YEAR
|
||||
AND 部门代码 = A_DEPARTMENT_CODE;
|
||||
--续保率
|
||||
SELECT DECODE(SUM(到期数),
|
||||
0,
|
||||
0,
|
||||
ROUND(SUM(已续保累计) / SUM(到期数) * 100,
|
||||
2))
|
||||
INTO A_RENEWAL_RATE
|
||||
FROM 坐席续保统计
|
||||
WHERE 部门 = L_DEPARTMENT_NAME;
|
||||
--总业绩
|
||||
SELECT ROUND(NVL(SUM(CF.车险个人客户保费 + CF.车非融合保费),
|
||||
0),
|
||||
0)
|
||||
INTO A_TOTAL
|
||||
FROM 坐席车非每日保费 CF
|
||||
WHERE 部门代码 = A_DEPARTMENT_CODE
|
||||
AND 签单日期 >= L_FIRSTDAY
|
||||
AND 签单日期 <= SYSDATE;
|
||||
--每月业绩
|
||||
OPEN A_MENSUAL_CUR FOR
|
||||
SELECT CF.月份 MM,
|
||||
ROUND(NVL(SUM(CF.车险个人客户保费 + CF.车非融合保费) / 10000,
|
||||
0),
|
||||
0) BF
|
||||
FROM 坐席车非每日保费 CF
|
||||
WHERE 部门代码 = A_DEPARTMENT_CODE
|
||||
AND 签单日期 >= TO_DATE(TO_CHAR(SYSDATE,
|
||||
'yyyy') || '-01-01 00:00:00',
|
||||
'yyyy-mm-dd hh24:mi:ss')
|
||||
AND 签单日期 < TO_DATE(TO_CHAR(SYSDATE,
|
||||
'yyyy-mm') || '-01 00:00:00',
|
||||
'yyyy-mm-dd hh24:mi:ss')
|
||||
GROUP BY CF.月份
|
||||
ORDER BY CF.月份;
|
||||
END;
|
||||
|
||||
/*******************************************************/
|
||||
-- 坐席业绩
|
||||
PROCEDURE caller_archievement
|
||||
(
|
||||
a_caller_code IN VARCHAR2,
|
||||
a_attaching_rate OUT VARCHAR2,
|
||||
a_renewal_rate OUT VARCHAR2,
|
||||
a_total OUT INTEGER,
|
||||
a_mensual_cur OUT cur_type
|
||||
) IS
|
||||
l_caller_name VARCHAR2(100);
|
||||
l_this_month VARCHAR2(4);
|
||||
l_this_year VARCHAR2(4);
|
||||
l_firstday DATE;
|
||||
BEGIN
|
||||
--查询坐席名称,验证代码
|
||||
BEGIN
|
||||
SELECT saler_name
|
||||
INTO l_caller_name
|
||||
FROM tele_saler
|
||||
WHERE saler_code = a_caller_code;
|
||||
EXCEPTION
|
||||
-- 如果没有查询到坐席名称,说明代码有误,抛出异常
|
||||
WHEN no_data_found THEN
|
||||
raise_application_error(CALLERCODE_EXCEPTION_CODE,
|
||||
CALLERCODE_EXCEPTION_MSG);
|
||||
END;
|
||||
|
||||
--车非渗透率
|
||||
l_this_month := to_char(SYSDATE,
|
||||
'mm');
|
||||
l_this_year := to_char(SYSDATE,
|
||||
'yyyy');
|
||||
l_firstday := to_date(l_this_year || '-01-01 00:00:00',
|
||||
'yyyy-mm-dd hh24:mi:ss');
|
||||
|
||||
--总车险保费
|
||||
SELECT round(SUM(cf.车险个人客户保费),
|
||||
2) bf
|
||||
INTO a_total
|
||||
FROM 坐席车非每日保费 cf
|
||||
WHERE cf.坐席工号 = a_caller_code
|
||||
AND cf.年份 = l_this_year;
|
||||
|
||||
--渗透率
|
||||
SELECT decode(SUM(cf.车险个人客户保费),
|
||||
0,
|
||||
0,
|
||||
round((SUM(cf.车非融合保费) / SUM(cf.车险个人客户保费) * 100),
|
||||
round(SUM(cf.车非融合保费) / SUM(cf.车险个人客户保费) * 100,
|
||||
2))
|
||||
INTO a_attaching_rate
|
||||
FROM 坐席车非每日保费 cf
|
||||
WHERE cf.月份 = l_this_month
|
||||
WHERE cf.坐席工号 = a_caller_code
|
||||
AND cf.年份 = l_this_year
|
||||
AND 部门代码 = a_department_code;
|
||||
AND cf.月份 = l_this_month;
|
||||
|
||||
--续保率
|
||||
SELECT decode(SUM(到期数),
|
||||
SELECT decode(SUM(xb.到期数),
|
||||
0,
|
||||
0,
|
||||
round(SUM(已续保累计) / SUM(到期数) * 100,
|
||||
2))
|
||||
round(SUM(xb.已续保累计) / SUM(xb.到期数) * 100,
|
||||
2)) xbl
|
||||
INTO a_renewal_rate
|
||||
FROM 坐席续保统计
|
||||
WHERE 部门 = l_department_name;
|
||||
|
||||
--总业绩
|
||||
SELECT round(nvl(SUM(cf.车险个人客户保费 + cf.车非融合保费),
|
||||
0),
|
||||
0)
|
||||
INTO a_total
|
||||
FROM 坐席车非每日保费 cf
|
||||
WHERE 部门代码 = a_department_code
|
||||
AND 签单日期 >= l_firstday
|
||||
AND 签单日期 <= SYSDATE;
|
||||
FROM 坐席续保统计 xb
|
||||
WHERE xb.坐席工号 = a_caller_code;
|
||||
|
||||
--每月业绩
|
||||
OPEN a_mensual_cur FOR
|
||||
SELECT cf.月份 mm,
|
||||
round(nvl(SUM(cf.车险个人客户保费 + cf.车非融合保费) / 10000,
|
||||
OPEN A_MENSUAL_CUR FOR
|
||||
SELECT CF.月份 MM,
|
||||
ROUND(NVL(SUM(CF.车险个人客户保费 + CF.车非融合保费) / 10000,
|
||||
0),
|
||||
0) bf
|
||||
FROM 坐席车非每日保费 cf
|
||||
WHERE 部门代码 = a_department_code
|
||||
AND 签单日期 >= to_date(to_char(SYSDATE,
|
||||
0) BF
|
||||
FROM 坐席车非每日保费 CF
|
||||
WHERE cf.坐席工号 = a_caller_code
|
||||
AND 签单日期 >= TO_DATE(TO_CHAR(SYSDATE,
|
||||
'yyyy') || '-01-01 00:00:00',
|
||||
'yyyy-mm-dd hh24:mi:ss')
|
||||
AND 签单日期 < to_date(to_char(SYSDATE,
|
||||
AND 签单日期 < TO_DATE(TO_CHAR(SYSDATE,
|
||||
'yyyy-mm') || '-01 00:00:00',
|
||||
'yyyy-mm-dd hh24:mi:ss')
|
||||
GROUP BY cf.月份
|
||||
ORDER BY cf.月份;
|
||||
GROUP BY CF.月份
|
||||
ORDER BY CF.月份;
|
||||
END;
|
||||
|
||||
/*******************************************************/
|
||||
-- 坐席排行榜
|
||||
PROCEDURE caller_arch_ranking_list
|
||||
PROCEDURE CALLER_ARCH_RANKING_LIST
|
||||
(
|
||||
a_department_code IN VARCHAR2,
|
||||
a_year IN VARCHAR2,
|
||||
a_month IN VARCHAR2,
|
||||
a_attaching_ranking_list OUT cur_type,
|
||||
a_renewal_ranking_list OUT cur_type
|
||||
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||
A_YEAR IN VARCHAR2,
|
||||
A_MONTH IN VARCHAR2,
|
||||
A_ATTACHING_RANKING_LIST OUT CUR_TYPE,
|
||||
A_RENEWAL_RANKING_LIST OUT CUR_TYPE
|
||||
) IS
|
||||
l_department_name VARCHAR2(100);
|
||||
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||
BEGIN
|
||||
-- 获取部门名称
|
||||
BEGIN
|
||||
SELECT department_name
|
||||
INTO l_department_name
|
||||
FROM idst0.bm_t bm
|
||||
WHERE bm.department_code = a_department_code;
|
||||
SELECT DEPARTMENT_NAME
|
||||
INTO L_DEPARTMENT_NAME
|
||||
FROM IDST0.BM_T BM
|
||||
WHERE BM.DEPARTMENT_CODE = A_DEPARTMENT_CODE;
|
||||
EXCEPTION
|
||||
-- 如果没有找到部门名称,说明代码错误,抛出异常
|
||||
WHEN NO_DATA_FOUND THEN
|
||||
raise_application_error(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||
RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||
DEPARTMENTCODE_EXCEPTION_MSG);
|
||||
|
||||
END;
|
||||
|
||||
-- 车非融合率排行榜
|
||||
OPEN a_attaching_ranking_list FOR
|
||||
SELECT rownum,
|
||||
坐席名称 as caller_name,
|
||||
车非渗透率 as attaching_rate
|
||||
OPEN A_ATTACHING_RANKING_LIST FOR
|
||||
SELECT ROWNUM,
|
||||
坐席名称 AS CALLER_NAME,
|
||||
车非渗透率 AS ATTACHING_RATE
|
||||
FROM (SELECT 坐席名称,
|
||||
round(decode(SUM(车险个人客户保费),
|
||||
ROUND(DECODE(SUM(车险个人客户保费),
|
||||
0,
|
||||
0,
|
||||
(SUM(车非融合保费) / SUM(车险个人客户保费)) * 100),
|
||||
2) 车非渗透率
|
||||
FROM 坐席车非每日保费
|
||||
WHERE 月份 = a_month
|
||||
AND 年份 = a_year
|
||||
AND 部门代码 = a_department_code
|
||||
WHERE 月份 = A_MONTH
|
||||
AND 年份 = A_YEAR
|
||||
AND 部门代码 = A_DEPARTMENT_CODE
|
||||
GROUP BY 坐席名称
|
||||
ORDER BY 车非渗透率 DESC);
|
||||
|
||||
-- 续保率排行榜
|
||||
OPEN a_renewal_ranking_list FOR
|
||||
SELECT rownum,
|
||||
坐席名称 as caller_name,
|
||||
续保率 as renewal_rate
|
||||
OPEN A_RENEWAL_RANKING_LIST FOR
|
||||
SELECT ROWNUM,
|
||||
坐席名称 AS CALLER_NAME,
|
||||
续保率 AS RENEWAL_RATE
|
||||
FROM (SELECT 坐席名称,
|
||||
round(nvl((SUM(已续保累计) / SUM(到期数)) * 100,
|
||||
ROUND(NVL((SUM(已续保累计) / SUM(到期数)) * 100,
|
||||
0),
|
||||
2) 续保率
|
||||
FROM 坐席续保统计 xb
|
||||
WHERE xb.部门 = l_department_name
|
||||
FROM 坐席续保统计 XB
|
||||
WHERE XB.部门 = L_DEPARTMENT_NAME
|
||||
GROUP BY 坐席名称
|
||||
ORDER BY 续保率 DESC);
|
||||
END;
|
||||
|
||||
BEGIN
|
||||
NULL;
|
||||
END telsale_archievement_pkg;
|
||||
END TELSALE_ARCHIEVEMENT_PKG;
|
||||
/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,18 +1,18 @@
|
|||
drop table 车非每日保费_T;
|
||||
create global temporary table 车非每日保费_T
|
||||
drop table 车非每日保费_T;
|
||||
create global temporary table 车非每日保费_T
|
||||
(
|
||||
签单日期 DATE not null,
|
||||
月份 VARCHAR2(10) not null,
|
||||
部门 VARCHAR2(100) not null,
|
||||
部门代码 varchar2(100) not null,
|
||||
科室n VARCHAR2(100) not null,
|
||||
经办人n VARCHAR2(100),
|
||||
坐席工号 VARCHAR2(20),
|
||||
坐席名称 VARCHAR2(30),
|
||||
坐席团队 VARCHAR2(100),
|
||||
车险个人客户保费 NUMBER(16,2),
|
||||
车非融合保费 NUMBER(16,2)
|
||||
签单日期 DATE not null,
|
||||
月份 VARCHAR2(10) not null,
|
||||
部门 VARCHAR2(100) not null,
|
||||
部门代码 varchar2(100) not null,
|
||||
科室n VARCHAR2(100) not null,
|
||||
经办人n VARCHAR2(100),
|
||||
坐席工号 VARCHAR2(20),
|
||||
坐席名称 VARCHAR2(30),
|
||||
坐席团队 VARCHAR2(100),
|
||||
车险个人客户保费 NUMBER(16,2),
|
||||
车非融合保费 NUMBER(16,2)
|
||||
)
|
||||
on commit preserve rows;
|
||||
-- Grant/Revoke object privileges
|
||||
grant select, insert, delete, alter on 车非每日保费_T to DATACENTER;
|
||||
grant select, insert, delete, alter on 车非每日保费_T to DATACENTER;
|
||||
|
|
|
@ -67,6 +67,8 @@ module.exports = {
|
|||
js: "espree",
|
||||
"<template>": "espree",
|
||||
},
|
||||
project: "./tsconfig.json",
|
||||
extraFileExtensions: [".vue",],
|
||||
},
|
||||
plugins: ["eslint-plugin-vue",],
|
||||
extends: [
|
||||
|
@ -79,13 +81,14 @@ module.exports = {
|
|||
],
|
||||
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
|
@ -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.8",
|
||||
"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.15.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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -29,11 +29,14 @@ export default {
|
|||
setup( props )
|
||||
{
|
||||
const ui = reactive({
|
||||
mensualList:[],
|
||||
});
|
||||
|
||||
|
||||
// 设置图表
|
||||
const initCharts = () =>
|
||||
{
|
||||
console.log( "每月业绩", props.chartData );
|
||||
const chartDom = document.getElementById( "chartWrapper" );
|
||||
const myChart = echarts.init( chartDom as HTMLDivElement );
|
||||
const option = {
|
||||
|
|
|
@ -54,14 +54,26 @@ function queryDepartmentArchievement( departmentInfo: Department, render: any ):
|
|||
|
||||
archievement.success = data.success ?? false;
|
||||
archievement.message = data.message ?? "";
|
||||
archievement.mensual_archievement_list = data.mensual_archievement_list ?? [];
|
||||
archievement.total_archievement = data.total_archievement;
|
||||
// archievement.mensual_archievement_list = data.mensual_archievement_list ?? [];
|
||||
archievement.mensual_archievement_list = [];
|
||||
archievement.insurance_renewal_rate = data.insurance_renewal_rate ?? "0.0";
|
||||
archievement.attaching_rate = data.attaching_rate ?? "0.0";
|
||||
archievement.leading_reward_gainers = data.leading_reward_gainers ?? [];
|
||||
archievement.advance_reward_gainers = data.advance_reward_gainers ?? [];
|
||||
archievement.backward_list = data.backward_list ?? [];
|
||||
|
||||
render( data );
|
||||
// 转换每月业绩数据,用month排序以后,保留premium。
|
||||
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 );
|
||||
});
|
||||
|
||||
console.log( "每月业绩", archievement );
|
||||
|
||||
// 渲染数据
|
||||
render( archievement );
|
||||
})
|
||||
.catch(( error ) =>
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="center-wrapper">
|
||||
<span class="slogan">对标先进 比学赶超</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 {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": false,
|
||||
"isolatedModules": true,
|
||||
"baseUrl": "./", // paths 路径解析起点
|
||||
"paths": { // 别名路径设置
|
||||
"@/*": [
|
||||
|
|
|
@ -16,18 +16,20 @@ public class MensualArchievementItem
|
|||
public MensualArchievementItem()
|
||||
{}
|
||||
|
||||
public MensualArchievementItem( String month, String premium)
|
||||
public MensualArchievementItem( int month, String premium)
|
||||
{
|
||||
this.month = month;
|
||||
this.premium = premium;
|
||||
}
|
||||
|
||||
public String getMonth()
|
||||
|
||||
|
||||
public int getMonth()
|
||||
{
|
||||
return month;
|
||||
}
|
||||
|
||||
public void setMonth( String month )
|
||||
public void setMonth( int month )
|
||||
{
|
||||
this.month = month;
|
||||
}
|
||||
|
@ -42,18 +44,14 @@ public class MensualArchievementItem
|
|||
this.premium = premium;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "MensualArchievementItem [month=" + month + ", premium=" + premium + "]";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((month == null) ? 0 : month.hashCode());
|
||||
result = prime * result + month;
|
||||
result = prime * result + ((premium == null) ? 0 : premium.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
@ -68,11 +66,7 @@ public class MensualArchievementItem
|
|||
if ( getClass() != obj.getClass() )
|
||||
return false;
|
||||
MensualArchievementItem other = (MensualArchievementItem) obj;
|
||||
if ( month == null )
|
||||
{
|
||||
if ( other.month != null )
|
||||
return false;
|
||||
} else if ( !month.equals( other.month ) )
|
||||
if ( month != other.month )
|
||||
return false;
|
||||
if ( premium == null )
|
||||
{
|
||||
|
@ -83,9 +77,17 @@ public class MensualArchievementItem
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "MensualArchievementItem [month=" + month + ", premium=" + premium + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 月份
|
||||
@JsonProperty( "month" )
|
||||
private String month;
|
||||
private int month;
|
||||
|
||||
// 月总保费
|
||||
@JsonProperty( "premium" )
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
|
||||
</select>
|
||||
<resultMap id="MensualArchievementMapper" type="MensualArchievementItem">
|
||||
<id property="month" column="mm" />
|
||||
<id property="month" column="mm" javaType="INT"/>
|
||||
<result property="premium" column="bf" />
|
||||
</resultMap>
|
||||
</mapper>
|
Binary file not shown.
Loading…
Reference in New Issue