neo-cmp-cli 1.13.15 → 1.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index2.js +1 -1
- package/dist/main2.js +1 -1
- package/dist/neo/neoLogin.js +1 -1
- package/dist/package.json.js +1 -1
- package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/forward.zip +0 -0
- package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243//350/207/252/345/256/232/344/271/211API:/351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/344/275/277/347/224/250/350/257/264/346/230/216.md +13 -0
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/asset-manage-template/package.json +2 -2
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +2 -2
- package/template/map-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/neo.config.js +7 -1
- package/template/neo-bi-cmps/package.json +8 -7
- package/template/neo-bi-cmps/public/403.html +77 -0
- package/template/neo-bi-cmps/src/assets/icon/barChart.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/card.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/filter.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/funnel.svg +1 -0
- package/template/neo-bi-cmps/src/assets/icon/tab.svg +1 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/README.md +3 -14
- package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +29 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +668 -146
- package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +26 -48
- package/template/neo-bi-cmps/src/components/filterBar__c/style.scss +46 -139
- package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.tsx +11 -10
- package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +9 -16
- package/template/neo-bi-cmps/src/utils/common.ts +231 -0
- package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +268 -0
- package/template/neo-bi-cmps/src/utils/filterBar.ts +140 -0
- package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +341 -0
- package/template/neo-bi-cmps/src/utils/queryByCustomSQL.ts +117 -0
- package/template/neo-bi-cmps/src/utils/requestDebounce.ts +22 -0
- package/template/neo-bi-cmps/src/utils/simpleTable.tsx +344 -0
- package/template/neo-bi-cmps/src/utils/stageSwitch.ts +15 -0
- package/template/neo-bi-cmps/src/utils/stageTimeChart.ts +90 -0
- package/template/neo-bi-cmps/src/utils/targetNumber.ts +12 -0
- package/template/neo-custom-cmp-template/package.json +2 -2
- package/template/neo-h5-cmps/package.json +2 -2
- package/template/neo-order-cmps/package.json +2 -2
- package/template/neo-pipeline-cmps/.prettierrc.js +12 -0
- package/template/neo-pipeline-cmps/@types/neo-ui-common.d.ts +36 -0
- package/template/neo-pipeline-cmps/README.md +99 -0
- package/template/neo-pipeline-cmps/commitlint.config.js +59 -0
- package/template/neo-pipeline-cmps/neo.config.js +124 -0
- package/template/neo-pipeline-cmps/package.json +66 -0
- package/template/neo-pipeline-cmps/public/403.html +77 -0
- package/template/neo-pipeline-cmps/public/css/base.css +283 -0
- package/template/neo-pipeline-cmps/public/demo.html +2453 -0
- package/template/neo-pipeline-cmps/public/scripts/app/bluebird.js +6679 -0
- package/template/neo-pipeline-cmps/public/template.html +13 -0
- package/template/neo-pipeline-cmps/src/assets/css/common.scss +127 -0
- package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +47 -0
- package/template/neo-pipeline-cmps/src/assets/icon/barChart.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/card.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/filter.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/funnel.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/icon/tab.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/AIBtn.gif +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/NeoCRM.jpg +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/aiLogo.png +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/card-list.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/contact-form.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/custom-form.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/custom-widget.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/data-list.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/detail.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/favicon.png +0 -0
- package/template/neo-pipeline-cmps/src/assets/img/map.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/search.svg +1 -0
- package/template/neo-pipeline-cmps/src/assets/img/table.svg +1 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +24 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +29 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +730 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +50 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +119 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +415 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +79 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/style.scss +83 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +463 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +45 -0
- package/template/neo-pipeline-cmps/src/components/showHealthResult__c/style.scss +137 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +90 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +195 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +665 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +124 -0
- package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +193 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +511 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +70 -0
- package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/style.scss +4 -2
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +455 -0
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +103 -0
- package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/style.scss +3 -2
- package/template/neo-pipeline-cmps/src/utils/common.ts +229 -0
- package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +268 -0
- package/template/neo-pipeline-cmps/src/utils/filterBar.ts +140 -0
- package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +343 -0
- package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +117 -0
- package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +22 -0
- package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +344 -0
- package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +15 -0
- package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +90 -0
- package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +12 -0
- package/template/neo-pipeline-cmps/tsconfig.json +40 -0
- package/template/neo-web-entity-grid/package.json +2 -2
- package/template/neo-web-form/package.json +2 -2
- package/template/react-custom-cmp-template/package.json +1 -1
- package/template/react-ts-custom-cmp-template/package.json +1 -1
- package/template/vue2-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/.npmrc copy +0 -1
- package/template/neo-bi-cmps/docs/gartner-pipeline-apis.md +0 -251
- package/template/neo-bi-cmps/docs/gartner-pipeline-prd.md +0 -389
- package/template/neo-bi-cmps/docs/neo-backend-dev/SKILL.md +0 -188
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/01-Trigger/345/274/200/345/217/221.md +0 -183
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/02-/350/207/252/345/256/232/344/271/211API/345/274/200/345/217/221.md +0 -196
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/03-SDK/345/267/245/345/205/267/347/261/273/346/216/245/345/217/243.md +0 -346
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/04-/350/256/241/345/210/222/344/275/234/344/270/232/345/274/200/345/217/221.md +0 -188
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/05-/351/241/265/351/235/242/345/274/200/345/217/221.md +0 -293
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/06-/346/265/201/347/250/213/346/211/251/345/261/225/345/274/200/345/217/221.md +0 -175
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/PaaS/345/271/263/345/217/260/345/274/200/345/217/221/346/211/213/345/206/214/350/247/243/350/257/273.md +0 -313
- package/template/neo-bi-cmps/docs/neo-backend-dev/references/auth-config.md +0 -77
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/deploy_server_script.py +0 -118
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/download_server_script.py +0 -74
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/gen_entity_desc.py +0 -69
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/gen_entitylist.py +0 -87
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/query_crm.py +0 -65
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/uninstall_server_script.py +0 -48
- package/template/neo-bi-cmps/docs/neo-backend-dev/scripts/update_model_jar.py +0 -49
- package/template/neo-bi-cmps/docs/neo-frontend-dev/SKILL.md +0 -138
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/auth-config.md +0 -77
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/component-dev.md +0 -205
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/entityTable-example.md +0 -167
- package/template/neo-bi-cmps/docs/neo-frontend-dev/references/templates.md +0 -38
- package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/gen_entity_desc.py +0 -69
- package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/gen_entitylist.py +0 -87
- package/template/neo-bi-cmps/docs/neo-frontend-dev/scripts/query_crm.py +0 -65
- package/template/neo-bi-cmps/docs//350/264/246/345/217/267/347/233/270/345/205/263/344/277/241/346/201/257.md +0 -10
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/README.md +0 -52
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/index.tsx +0 -183
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/model.ts +0 -90
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/style.scss +0 -218
- package/template/neo-bi-cmps/src/components/forecastChart__c/README.md +0 -31
- package/template/neo-bi-cmps/src/components/forecastChart__c/index.tsx +0 -158
- package/template/neo-bi-cmps/src/components/forecastChart__c/model.ts +0 -40
- package/template/neo-bi-cmps/src/components/forecastChart__c/style.scss +0 -154
- package/template/neo-bi-cmps/src/components/forecastGrid__c/README.md +0 -36
- package/template/neo-bi-cmps/src/components/forecastGrid__c/index.tsx +0 -86
- package/template/neo-bi-cmps/src/components/forecastGrid__c/model.ts +0 -62
- package/template/neo-bi-cmps/src/components/forecastGrid__c/style.scss +0 -48
- package/template/neo-bi-cmps/src/components/gapCloser__c/README.md +0 -24
- package/template/neo-bi-cmps/src/components/gapCloser__c/index.tsx +0 -100
- package/template/neo-bi-cmps/src/components/gapCloser__c/model.ts +0 -46
- package/template/neo-bi-cmps/src/components/gapCloser__c/style.scss +0 -60
- package/template/neo-bi-cmps/src/components/kpiCards__c/README.md +0 -35
- package/template/neo-bi-cmps/src/components/kpiCards__c/index.tsx +0 -70
- package/template/neo-bi-cmps/src/components/kpiCards__c/model.ts +0 -50
- package/template/neo-bi-cmps/src/components/kpiCards__c/style.scss +0 -33
- package/template/neo-bi-cmps/src/components/oppList__c/README.md +0 -52
- package/template/neo-bi-cmps/src/components/oppList__c/index.tsx +0 -285
- package/template/neo-bi-cmps/src/components/oppList__c/model.ts +0 -86
- package/template/neo-bi-cmps/src/components/oppList__c/style.scss +0 -133
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/index.tsx +0 -130
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/model.ts +0 -66
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/style.scss +0 -133
- package/template/neo-bi-cmps/src/components/stageSwitch__c/index.tsx +0 -118
- package/template/neo-bi-cmps/src/components/stageSwitch__c/model.ts +0 -92
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/index.tsx +0 -126
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/model.ts +0 -57
- package/template/neo-bi-cmps/src/components/tabSwitch__c/README.md +0 -37
- package/template/neo-bi-cmps/src/components/tabSwitch__c/index.tsx +0 -80
- package/template/neo-bi-cmps/src/components/tabSwitch__c/model.ts +0 -45
- package/template/neo-bi-cmps/src/components/tabSwitch__c/style.scss +0 -37
- package/template/neo-bi-cmps/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-bi-cmps/src/utils/queryObjectData.ts +0 -76
- package/template/neo-bi-cmps/src/utils/xobjects.ts +0 -162
- /package/template/neo-bi-cmps/{docs/prototype-pipeline-forecasting.html → public/demo.html} +0 -0
- /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/pipelineFunnel__c/README.md +0 -0
- /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageSwitch__c/README.md +0 -0
- /package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/README.md +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export class PipelineFunnelModel {
|
|
2
|
-
label: string = 'Pipeline漏斗图';
|
|
3
|
-
description: string = '展示销售管道的漏斗转化情况,直观显示各阶段金额和数量';
|
|
4
|
-
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/pipelineFunnel.svg';
|
|
5
|
-
targetPage: string[] = ['all'];
|
|
6
|
-
targetDevice: string = 'all';
|
|
7
|
-
|
|
8
|
-
defaultComProps = {
|
|
9
|
-
title: 'Pipeline Funnel',
|
|
10
|
-
totalAmount: '$11.1M',
|
|
11
|
-
stages: [
|
|
12
|
-
{
|
|
13
|
-
name: 'Prospecting',
|
|
14
|
-
amount: '$3.2M',
|
|
15
|
-
count: 15,
|
|
16
|
-
conversionRate: '—',
|
|
17
|
-
color: '#3b82f6',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: 'Needs Analysis',
|
|
21
|
-
amount: '$1.8M',
|
|
22
|
-
count: 7,
|
|
23
|
-
conversionRate: '56.3%',
|
|
24
|
-
color: '#22c55e',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Proposal/Price Quote',
|
|
28
|
-
amount: '$4.5M',
|
|
29
|
-
count: 8,
|
|
30
|
-
conversionRate: '28.1%',
|
|
31
|
-
color: '#f59e0b',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'Closed Won',
|
|
35
|
-
amount: '$1.6M',
|
|
36
|
-
count: 3,
|
|
37
|
-
conversionRate: '10.0%',
|
|
38
|
-
color: '#8b5cf6',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
showAiButton: true,
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
functions = [
|
|
45
|
-
{
|
|
46
|
-
apiKey: 'refreshData',
|
|
47
|
-
label: '刷新数据',
|
|
48
|
-
helpTextKey: '刷新漏斗图数据',
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
|
|
52
|
-
propsSchema = [
|
|
53
|
-
{
|
|
54
|
-
type: 'string',
|
|
55
|
-
name: 'title',
|
|
56
|
-
label: '标题',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: 'string',
|
|
60
|
-
name: 'totalAmount',
|
|
61
|
-
label: '总金额',
|
|
62
|
-
},
|
|
63
|
-
];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export default PipelineFunnelModel;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
.pipeline-funnel__c {
|
|
2
|
-
background: #fff;
|
|
3
|
-
border-radius: 8px;
|
|
4
|
-
padding: 20px;
|
|
5
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
6
|
-
|
|
7
|
-
.funnel-header {
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
align-items: center;
|
|
11
|
-
margin-bottom: 16px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.funnel-title {
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
font-weight: 600;
|
|
17
|
-
margin: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ai-btn {
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
transition: transform 0.2s;
|
|
24
|
-
|
|
25
|
-
&:hover {
|
|
26
|
-
transform: scale(1.1);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.funnel-total {
|
|
31
|
-
text-align: center;
|
|
32
|
-
margin-bottom: 16px;
|
|
33
|
-
|
|
34
|
-
.funnel-total-label {
|
|
35
|
-
font-size: 12px;
|
|
36
|
-
color: #888;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.funnel-total-value {
|
|
40
|
-
font-size: 22px;
|
|
41
|
-
font-weight: 700;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.funnel-body {
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: stretch;
|
|
48
|
-
gap: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.funnel-left-rates {
|
|
52
|
-
width: 100px;
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
gap: 0;
|
|
57
|
-
font-size: 11px;
|
|
58
|
-
color: #888;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.funnel-rate {
|
|
62
|
-
height: 48px;
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.funnel-main {
|
|
68
|
-
flex: 1;
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
align-items: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.funnel-segment {
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 48px;
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
color: #fff;
|
|
81
|
-
font-size: 12px;
|
|
82
|
-
font-weight: 600;
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
transition: opacity 0.2s;
|
|
85
|
-
|
|
86
|
-
&:hover {
|
|
87
|
-
opacity: 0.85;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.funnel-right-data {
|
|
92
|
-
width: 110px;
|
|
93
|
-
display: flex;
|
|
94
|
-
flex-direction: column;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
gap: 0;
|
|
97
|
-
font-size: 11px;
|
|
98
|
-
color: #555;
|
|
99
|
-
text-align: right;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.funnel-data {
|
|
103
|
-
height: 48px;
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: center;
|
|
106
|
-
justify-content: flex-end;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.funnel-legend {
|
|
110
|
-
display: flex;
|
|
111
|
-
gap: 12px;
|
|
112
|
-
justify-content: center;
|
|
113
|
-
flex-wrap: wrap;
|
|
114
|
-
margin-top: 16px;
|
|
115
|
-
font-size: 11px;
|
|
116
|
-
color: #666;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.legend-item {
|
|
120
|
-
display: flex;
|
|
121
|
-
align-items: center;
|
|
122
|
-
gap: 4px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.legend-dot {
|
|
126
|
-
display: inline-block;
|
|
127
|
-
width: 10px;
|
|
128
|
-
height: 10px;
|
|
129
|
-
border-radius: 50%;
|
|
130
|
-
margin-right: 4px;
|
|
131
|
-
vertical-align: middle;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file 阶段切换卡片组件
|
|
3
|
-
* @description 切换显示不同销售阶段的数据
|
|
4
|
-
*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import { BaseCmp, StatusHoc, NeoEvent } from 'neo-ui-common';
|
|
8
|
-
|
|
9
|
-
import './style.scss';
|
|
10
|
-
|
|
11
|
-
interface StageTab {
|
|
12
|
-
key: string;
|
|
13
|
-
name: string;
|
|
14
|
-
amount: string;
|
|
15
|
-
count: number;
|
|
16
|
-
changes?: {
|
|
17
|
-
amount: string;
|
|
18
|
-
amountDirection: 'up' | 'down';
|
|
19
|
-
count: string;
|
|
20
|
-
countDirection: 'up' | 'down';
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface StageSwitchProps {
|
|
25
|
-
stages?: StageTab[];
|
|
26
|
-
activeStage?: string;
|
|
27
|
-
onStageChange?: (stage: StageTab) => void;
|
|
28
|
-
className?: string;
|
|
29
|
-
style?: React.CSSProperties;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface StageSwitchState {
|
|
33
|
-
activeStage: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
class StageSwitch extends BaseCmp<StageSwitchProps, StageSwitchState> {
|
|
37
|
-
constructor(props: StageSwitchProps) {
|
|
38
|
-
super(props);
|
|
39
|
-
this.state = {
|
|
40
|
-
activeStage: props.activeStage || (props.stages?.[0]?.key ?? ''),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
componentDidMount() {
|
|
45
|
-
console.log('StageSwitch 组件挂载');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
componentWillReceiveProps(nextProps: StageSwitchProps) {
|
|
49
|
-
if (
|
|
50
|
-
nextProps.activeStage &&
|
|
51
|
-
nextProps.activeStage !== this.props.activeStage
|
|
52
|
-
) {
|
|
53
|
-
this.setState({ activeStage: nextProps.activeStage });
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
handleStageClick(stage: StageTab) {
|
|
58
|
-
this.setState({ activeStage: stage.key });
|
|
59
|
-
const { onStageChange } = this.props;
|
|
60
|
-
if (onStageChange) {
|
|
61
|
-
onStageChange(stage);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
render() {
|
|
66
|
-
const { stages = [], className, style } = this.props;
|
|
67
|
-
const { activeStage } = this.state;
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<div className={`stage-switch__c ${className || ''}`} style={style}>
|
|
71
|
-
<div className="stage-tabs">
|
|
72
|
-
{stages.map((stage) => (
|
|
73
|
-
<div
|
|
74
|
-
key={stage.key}
|
|
75
|
-
className={`stage-tab ${
|
|
76
|
-
activeStage === stage.key ? 'active' : ''
|
|
77
|
-
}`}
|
|
78
|
-
onClick={() => this.handleStageClick(stage)}
|
|
79
|
-
>
|
|
80
|
-
<div className="stage-name">{stage.name}</div>
|
|
81
|
-
<div className="stage-amount-row">
|
|
82
|
-
<span className="stage-amount">{stage.amount}</span>
|
|
83
|
-
<span className="stage-count">({stage.count})</span>
|
|
84
|
-
</div>
|
|
85
|
-
{stage.changes && (
|
|
86
|
-
<div className="stage-sub">
|
|
87
|
-
<span
|
|
88
|
-
className={`change-amount ${
|
|
89
|
-
stage.changes.amountDirection === 'up'
|
|
90
|
-
? 'positive'
|
|
91
|
-
: 'negative'
|
|
92
|
-
}`}
|
|
93
|
-
>
|
|
94
|
-
{stage.changes.amountDirection === 'up' ? '↑' : '↓'}{' '}
|
|
95
|
-
{stage.changes.amount}
|
|
96
|
-
</span>
|
|
97
|
-
<span> </span>
|
|
98
|
-
<span
|
|
99
|
-
className={`change-count ${
|
|
100
|
-
stage.changes.countDirection === 'up'
|
|
101
|
-
? 'positive'
|
|
102
|
-
: 'negative'
|
|
103
|
-
}`}
|
|
104
|
-
>
|
|
105
|
-
{stage.changes.countDirection === 'up' ? '↑' : '↓'}{' '}
|
|
106
|
-
{stage.changes.count}
|
|
107
|
-
</span>
|
|
108
|
-
</div>
|
|
109
|
-
)}
|
|
110
|
-
</div>
|
|
111
|
-
))}
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export default StatusHoc(StageSwitch);
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
export class StageSwitchModel {
|
|
2
|
-
label: string = '阶段切换卡片';
|
|
3
|
-
description: string = '切换显示不同销售阶段的数据,包含金额、数量和变化趋势';
|
|
4
|
-
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/stageSwitch.svg';
|
|
5
|
-
targetPage: string[] = ['all'];
|
|
6
|
-
targetDevice: string = 'all';
|
|
7
|
-
|
|
8
|
-
defaultComProps = {
|
|
9
|
-
stages: [
|
|
10
|
-
{
|
|
11
|
-
key: 'Prospecting',
|
|
12
|
-
name: 'Prospecting',
|
|
13
|
-
amount: '$3.2M',
|
|
14
|
-
count: 15,
|
|
15
|
-
changes: {
|
|
16
|
-
amount: '$280K',
|
|
17
|
-
amountDirection: 'up',
|
|
18
|
-
count: '3',
|
|
19
|
-
countDirection: 'up',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
key: 'Needs Analysis',
|
|
24
|
-
name: 'Needs Analysis',
|
|
25
|
-
amount: '$1.8M',
|
|
26
|
-
count: 7,
|
|
27
|
-
changes: {
|
|
28
|
-
amount: '$320K',
|
|
29
|
-
amountDirection: 'down',
|
|
30
|
-
count: '2',
|
|
31
|
-
countDirection: 'down',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: 'Proposal',
|
|
36
|
-
name: 'Proposal/Price Quote',
|
|
37
|
-
amount: '$4.5M',
|
|
38
|
-
count: 8,
|
|
39
|
-
changes: {
|
|
40
|
-
amount: '$500K',
|
|
41
|
-
amountDirection: 'up',
|
|
42
|
-
count: '3',
|
|
43
|
-
countDirection: 'up',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
key: 'Closed Won',
|
|
48
|
-
name: 'Closed Won',
|
|
49
|
-
amount: '$1.6M',
|
|
50
|
-
count: 3,
|
|
51
|
-
changes: {
|
|
52
|
-
amount: '$400K',
|
|
53
|
-
amountDirection: 'up',
|
|
54
|
-
count: '1',
|
|
55
|
-
countDirection: 'up',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: 'Closed Lost',
|
|
60
|
-
name: 'Closed Lost',
|
|
61
|
-
amount: '$0.9M',
|
|
62
|
-
count: 4,
|
|
63
|
-
changes: {
|
|
64
|
-
amount: '$200K',
|
|
65
|
-
amountDirection: 'down',
|
|
66
|
-
count: '2',
|
|
67
|
-
countDirection: 'up',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
activeStage: 'Prospecting',
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
functions = [
|
|
75
|
-
{
|
|
76
|
-
apiKey: 'setActiveStage',
|
|
77
|
-
label: '设置当前阶段',
|
|
78
|
-
helpTextKey: '设置当前激活的销售阶段',
|
|
79
|
-
},
|
|
80
|
-
];
|
|
81
|
-
|
|
82
|
-
propsSchema = [
|
|
83
|
-
{
|
|
84
|
-
type: 'object',
|
|
85
|
-
name: 'stages',
|
|
86
|
-
label: '阶段配置',
|
|
87
|
-
schema: [],
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export default StageSwitchModel;
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file 阶段停留时间组件
|
|
3
|
-
* @description 展示各销售阶段的平均停留时间,包含实际值、目标值和限制值
|
|
4
|
-
*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import { BaseCmp, StatusHoc, NeoEvent } from 'neo-ui-common';
|
|
8
|
-
|
|
9
|
-
import './style.scss';
|
|
10
|
-
|
|
11
|
-
interface StageTimeItem {
|
|
12
|
-
stageName: string;
|
|
13
|
-
actualTime: string;
|
|
14
|
-
actualPercent: number;
|
|
15
|
-
actualColor: string;
|
|
16
|
-
targetPercent: number;
|
|
17
|
-
limitPercent: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface StageTimeChartProps {
|
|
21
|
-
title?: string;
|
|
22
|
-
items?: StageTimeItem[];
|
|
23
|
-
showAiButton?: boolean;
|
|
24
|
-
onStageClick?: (stageName: string) => void;
|
|
25
|
-
className?: string;
|
|
26
|
-
style?: React.CSSProperties;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface StageTimeChartState {
|
|
30
|
-
loading: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
class StageTimeChart extends BaseCmp<StageTimeChartProps, StageTimeChartState> {
|
|
34
|
-
constructor(props: StageTimeChartProps) {
|
|
35
|
-
super(props);
|
|
36
|
-
this.state = {
|
|
37
|
-
loading: false,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
componentDidMount() {
|
|
42
|
-
console.log('StageTimeChart 组件挂载');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
render() {
|
|
46
|
-
const {
|
|
47
|
-
title = 'Avg. Time in Stage',
|
|
48
|
-
items = [],
|
|
49
|
-
showAiButton = true,
|
|
50
|
-
onStageClick,
|
|
51
|
-
className,
|
|
52
|
-
style,
|
|
53
|
-
} = this.props;
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<div className={`stage-time-chart__c ${className || ''}`} style={style}>
|
|
57
|
-
<div className="chart-header">
|
|
58
|
-
<h3 className="chart-title">{title}</h3>
|
|
59
|
-
{showAiButton && (
|
|
60
|
-
<span
|
|
61
|
-
className="ai-btn"
|
|
62
|
-
onClick={() => console.log('AI Analysis clicked')}
|
|
63
|
-
title="AI Analysis"
|
|
64
|
-
>
|
|
65
|
-
✨
|
|
66
|
-
</span>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<div className="chart-legend">
|
|
71
|
-
<span className="legend-item">
|
|
72
|
-
<span className="legend-actual" />
|
|
73
|
-
Actual
|
|
74
|
-
</span>
|
|
75
|
-
<span className="legend-item">
|
|
76
|
-
<span className="legend-target" />
|
|
77
|
-
Target
|
|
78
|
-
</span>
|
|
79
|
-
<span className="legend-item">
|
|
80
|
-
<span className="legend-limit" />
|
|
81
|
-
Limit
|
|
82
|
-
</span>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div className="chart-body">
|
|
86
|
-
{items.map((item, index) => (
|
|
87
|
-
<div
|
|
88
|
-
key={index}
|
|
89
|
-
className="stage-time-item"
|
|
90
|
-
onClick={() => onStageClick?.(item.stageName)}
|
|
91
|
-
>
|
|
92
|
-
<div className="stage-time-header">
|
|
93
|
-
<span className="stage-name">{item.stageName}</span>
|
|
94
|
-
<span
|
|
95
|
-
className="stage-time-value"
|
|
96
|
-
style={{ color: item.actualColor }}
|
|
97
|
-
>
|
|
98
|
-
{item.actualTime}
|
|
99
|
-
</span>
|
|
100
|
-
</div>
|
|
101
|
-
<div className="stage-time-bar">
|
|
102
|
-
<div
|
|
103
|
-
className="stage-time-actual"
|
|
104
|
-
style={{
|
|
105
|
-
width: `${item.actualPercent}%`,
|
|
106
|
-
backgroundColor: item.actualColor,
|
|
107
|
-
}}
|
|
108
|
-
/>
|
|
109
|
-
<div
|
|
110
|
-
className="stage-time-target"
|
|
111
|
-
style={{ left: `${item.targetPercent}%` }}
|
|
112
|
-
/>
|
|
113
|
-
<div
|
|
114
|
-
className="stage-time-limit"
|
|
115
|
-
style={{ left: `${item.limitPercent}%` }}
|
|
116
|
-
/>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
))}
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export default StatusHoc(StageTimeChart);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export class StageTimeChartModel {
|
|
2
|
-
label: string = '阶段停留时间';
|
|
3
|
-
description: string =
|
|
4
|
-
'展示各销售阶段的平均停留时间,包含实际值、目标值和限制值';
|
|
5
|
-
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/stageTimeChart.svg';
|
|
6
|
-
targetPage: string[] = ['all'];
|
|
7
|
-
targetDevice: string = 'all';
|
|
8
|
-
|
|
9
|
-
defaultComProps = {
|
|
10
|
-
title: 'Avg. Time in Stage',
|
|
11
|
-
items: [
|
|
12
|
-
{
|
|
13
|
-
stageName: 'Prospecting',
|
|
14
|
-
actualTime: '8天6时',
|
|
15
|
-
actualPercent: 28,
|
|
16
|
-
actualColor: '#22c55e',
|
|
17
|
-
targetPercent: 33,
|
|
18
|
-
limitPercent: 50,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
stageName: 'Needs Analysis',
|
|
22
|
-
actualTime: '15天12时',
|
|
23
|
-
actualPercent: 52,
|
|
24
|
-
actualColor: '#eab308',
|
|
25
|
-
targetPercent: 40,
|
|
26
|
-
limitPercent: 60,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
stageName: 'Proposal/Price Quote',
|
|
30
|
-
actualTime: '22天8时',
|
|
31
|
-
actualPercent: 74,
|
|
32
|
-
actualColor: '#ef4444',
|
|
33
|
-
targetPercent: 50,
|
|
34
|
-
limitPercent: 67,
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
showAiButton: true,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
functions = [
|
|
41
|
-
{
|
|
42
|
-
apiKey: 'refreshData',
|
|
43
|
-
label: '刷新数据',
|
|
44
|
-
helpTextKey: '刷新停留时间数据',
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
propsSchema = [
|
|
49
|
-
{
|
|
50
|
-
type: 'string',
|
|
51
|
-
name: 'title',
|
|
52
|
-
label: '标题',
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default StageTimeChartModel;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# TabSwitch 组件
|
|
2
|
-
|
|
3
|
-
Tab切换组件,支持多个Tab页之间的切换。
|
|
4
|
-
|
|
5
|
-
## 使用方式
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import TabSwitch from './components/tabSwitch__c';
|
|
9
|
-
|
|
10
|
-
// 使用示例
|
|
11
|
-
<TabSwitch
|
|
12
|
-
tabs={[
|
|
13
|
-
{ key: 'pipeline', label: 'Pipeline' },
|
|
14
|
-
{ key: 'forecast', label: 'Forecast' },
|
|
15
|
-
]}
|
|
16
|
-
activeTab="pipeline"
|
|
17
|
-
onTabChange={(key) => console.log('切换到:', key)}
|
|
18
|
-
/>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Props
|
|
22
|
-
|
|
23
|
-
| 属性 | 说明 | 类型 | 默认值 |
|
|
24
|
-
|------|------|------|--------|
|
|
25
|
-
| tabs | Tab配置数组 | TabItem[] | [] |
|
|
26
|
-
| activeTab | 当前激活的Tab | string | 第一个Tab |
|
|
27
|
-
| onTabChange | Tab切换回调 | (key: string) => void | - |
|
|
28
|
-
| className | 自定义类名 | string | - |
|
|
29
|
-
| style | 自定义样式 | React.CSSProperties | - |
|
|
30
|
-
|
|
31
|
-
## TabItem
|
|
32
|
-
|
|
33
|
-
| 属性 | 说明 | 类型 |
|
|
34
|
-
|------|------|------|
|
|
35
|
-
| key | 唯一标识 | string |
|
|
36
|
-
| label | 显示文本 | string |
|
|
37
|
-
| icon | 图标 | string |
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Tab切换组件
|
|
3
|
-
* @description 支持Pipeline/Forecast等Tab切换功能
|
|
4
|
-
*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import { BaseCmp, StatusHoc, NeoEvent } from 'neo-ui-common';
|
|
8
|
-
|
|
9
|
-
import './style.scss';
|
|
10
|
-
|
|
11
|
-
interface TabItem {
|
|
12
|
-
key: string;
|
|
13
|
-
label: string;
|
|
14
|
-
icon?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface TabSwitchProps {
|
|
18
|
-
tabs: TabItem[];
|
|
19
|
-
activeTab?: string;
|
|
20
|
-
onTabChange?: (key: string) => void;
|
|
21
|
-
className?: string;
|
|
22
|
-
style?: React.CSSProperties;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface TabSwitchState {
|
|
26
|
-
activeTab: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
class TabSwitch extends BaseCmp<TabSwitchProps, TabSwitchState> {
|
|
30
|
-
constructor(props: TabSwitchProps) {
|
|
31
|
-
super(props);
|
|
32
|
-
this.state = {
|
|
33
|
-
activeTab: props.activeTab || (props.tabs?.[0]?.key ?? ''),
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
this.handleTabClick = this.handleTabClick.bind(this);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
componentDidMount() {
|
|
40
|
-
console.log('TabSwitch 组件挂载');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
componentWillReceiveProps(nextProps: TabSwitchProps) {
|
|
44
|
-
if (nextProps.activeTab && nextProps.activeTab !== this.props.activeTab) {
|
|
45
|
-
this.setState({ activeTab: nextProps.activeTab });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
handleTabClick(key: string) {
|
|
50
|
-
this.setState({ activeTab: key });
|
|
51
|
-
const { onTabChange } = this.props;
|
|
52
|
-
if (onTabChange) {
|
|
53
|
-
onTabChange(key);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
render() {
|
|
58
|
-
const { tabs = [], className, style } = this.props;
|
|
59
|
-
const { activeTab } = this.state;
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<div className={`tab-switch__c ${className || ''}`} style={style}>
|
|
63
|
-
<div className="tab-bar">
|
|
64
|
-
{tabs.map((tab) => (
|
|
65
|
-
<button
|
|
66
|
-
key={tab.key}
|
|
67
|
-
className={`tab-btn ${activeTab === tab.key ? 'active' : ''}`}
|
|
68
|
-
onClick={() => this.handleTabClick(tab.key)}
|
|
69
|
-
>
|
|
70
|
-
{tab.icon && <span className="tab-icon">{tab.icon}</span>}
|
|
71
|
-
{tab.label}
|
|
72
|
-
</button>
|
|
73
|
-
))}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default StatusHoc(TabSwitch);
|