neo-cmp-cli 1.13.16 → 1.13.18
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/env.js +1 -1
- package/dist/neo/neoLogin.js +1 -1
- package/dist/neo/pushCmp.js +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +3 -2
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/asset-manage-template/docs/README.md +1 -232
- 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/public/demo.html +2453 -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/components/targetNumber__c/model.ts +1 -1
- 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-h5-cmps/src/utils/queryObjectData.ts → neo-bi-cmps/src/utils/queryByCustomSQL.ts} +18 -13
- 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/docs/README.md +0 -231
- package/template/neo-custom-cmp-template/package.json +2 -2
- package/template/neo-h5-cmps/package.json +2 -2
- package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +1 -2
- package/template/neo-h5-cmps/src/components/entityTabs__c/index.tsx +1 -1
- package/template/neo-h5-cmps/src/components/globalSearchInput__c/index.tsx +1 -1
- package/template/neo-h5-cmps/src/components/openChatPageBtn__c/index.tsx +1 -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 +135 -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 +731 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +52 -0
- package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +119 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/README.md +39 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +416 -0
- package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +80 -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 +470 -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 +89 -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 +667 -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 +192 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/README.md +36 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +513 -0
- package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +71 -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/README.md +37 -0
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +455 -0
- package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +106 -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 +266 -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 +121 -0
- package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +22 -0
- package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +349 -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/neo-web-form/src/components/batchAddTable__c/index.tsx +161 -41
- package/template/neo-web-form/src/components/batchAddTable__c/model.ts +4 -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/asset-manage-template/src/utils/axiosFetcher.ts +0 -37
- package/template/asset-manage-template/src/utils/queryObjectData.ts +0 -112
- package/template/asset-manage-template/src/utils/xobjects.ts +0 -162
- package/template/neo-bi-cmps/.npmrc copy +0 -1
- 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/README.md +0 -39
- 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/README.md +0 -36
- 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/README.md +0 -37
- 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-custom-cmp-template/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -112
- package/template/neo-custom-cmp-template/src/utils/xobjects.ts +0 -162
- package/template/neo-h5-cmps/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-h5-cmps/src/utils/xobjects.ts +0 -167
- package/template/neo-order-cmps/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-order-cmps/src/utils/queryObjectData.ts +0 -112
- package/template/neo-order-cmps/src/utils/xobjects.ts +0 -162
- package/template/neo-web-entity-grid/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-web-entity-grid/src/utils/queryObjectData.ts +0 -112
- package/template/neo-web-entity-grid/src/utils/xobjects.ts +0 -167
- package/template/neo-web-form/src/utils/axiosFetcher.ts +0 -37
- package/template/neo-web-form/src/utils/queryObjectData.ts +0 -112
- package/template/neo-web-form/src/utils/xobjects.ts +0 -167
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# AiCommitDrawer 组件
|
|
2
|
-
|
|
3
|
-
AI推荐Commit抽屉组件,展示AI推荐的Commit商机。
|
|
4
|
-
|
|
5
|
-
## 使用方式
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import AiCommitDrawer from './components/aiCommitDrawer__c';
|
|
9
|
-
|
|
10
|
-
<AiCommitDrawer
|
|
11
|
-
visible={true}
|
|
12
|
-
totalAmount="$6,800,000"
|
|
13
|
-
closedAmount="$3,200,000"
|
|
14
|
-
tabs={[
|
|
15
|
-
{ key: 'pipeline', label: 'From Open Pipeline', amount: '$2,500,000', count: 2 },
|
|
16
|
-
{ key: 'commit', label: 'From Commit', amount: '$1,800,000', count: 2 },
|
|
17
|
-
]}
|
|
18
|
-
pipelineDeals={[...]}
|
|
19
|
-
commitDeals={[...]}
|
|
20
|
-
onClose={() => console.log('Close')}
|
|
21
|
-
onPrioritize={(deal) => console.log('Prioritize:', deal)}
|
|
22
|
-
onDismiss={(deal) => console.log('Dismiss:', deal)}
|
|
23
|
-
/>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
| 属性 | 说明 | 类型 | 默认值 |
|
|
29
|
-
|------|------|------|--------|
|
|
30
|
-
| visible | 是否显示 | boolean | false |
|
|
31
|
-
| totalAmount | AI预测总额 | string | '$6,800,000' |
|
|
32
|
-
| closedAmount | 已关闭金额 | string | '$3,200,000' |
|
|
33
|
-
| closedCount | 已关闭数量 | number | 5 |
|
|
34
|
-
| tabs | Tab配置 | { key, label, amount, count }[] | [] |
|
|
35
|
-
| pipelineDeals | Pipeline商机 | CommitDeal[] | [] |
|
|
36
|
-
| commitDeals | Commit商机 | CommitDeal[] | [] |
|
|
37
|
-
| onClose | 关闭回调 | () => void | - |
|
|
38
|
-
| onPrioritize | 优先处理回调 | (deal: CommitDeal) => void | - |
|
|
39
|
-
| onDismiss | 忽略回调 | (deal: CommitDeal) => void | - |
|
|
40
|
-
|
|
41
|
-
## CommitDeal
|
|
42
|
-
|
|
43
|
-
| 属性 | 说明 | 类型 |
|
|
44
|
-
|------|------|------|
|
|
45
|
-
| id | 唯一标识 | string |
|
|
46
|
-
| name | 商机名称 | string |
|
|
47
|
-
| account | 账户 | string |
|
|
48
|
-
| amount | 金额 | string |
|
|
49
|
-
| stage | 阶段 | string |
|
|
50
|
-
| closeDate | 关闭日期 | string |
|
|
51
|
-
| aiScore | AI评分 | string |
|
|
52
|
-
| description | 描述 | string |
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file AI推荐Commit抽屉组件
|
|
3
|
-
* @description 展示AI推荐的Commit商机,支持From Pipeline和From Commit两个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 CommitDeal {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
account: string;
|
|
15
|
-
amount: string;
|
|
16
|
-
stage: string;
|
|
17
|
-
closeDate: string;
|
|
18
|
-
aiScore: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface AiCommitDrawerProps {
|
|
23
|
-
visible?: boolean;
|
|
24
|
-
totalAmount?: string;
|
|
25
|
-
closedAmount?: string;
|
|
26
|
-
closedCount?: number;
|
|
27
|
-
tabs?: { key: string; label: string; amount: string; count: number }[];
|
|
28
|
-
pipelineDeals?: CommitDeal[];
|
|
29
|
-
commitDeals?: CommitDeal[];
|
|
30
|
-
onClose?: () => void;
|
|
31
|
-
onPrioritize?: (deal: CommitDeal) => void;
|
|
32
|
-
onDismiss?: (deal: CommitDeal) => void;
|
|
33
|
-
className?: string;
|
|
34
|
-
style?: React.CSSProperties;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface AiCommitDrawerState {
|
|
38
|
-
activeTab: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
class AiCommitDrawer extends BaseCmp<AiCommitDrawerProps, AiCommitDrawerState> {
|
|
42
|
-
constructor(props: AiCommitDrawerProps) {
|
|
43
|
-
super(props);
|
|
44
|
-
this.state = {
|
|
45
|
-
activeTab: props.tabs?.[0]?.key ?? 'pipeline',
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
componentDidMount() {
|
|
50
|
-
console.log('AiCommitDrawer 组件挂载');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
componentWillReceiveProps(nextProps: AiCommitDrawerProps) {
|
|
54
|
-
if (nextProps.visible && !this.props.visible) {
|
|
55
|
-
this.setState({ activeTab: nextProps.tabs?.[0]?.key ?? 'pipeline' });
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
handleTabChange = (tab: string) => {
|
|
60
|
-
this.setState({ activeTab: tab });
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
handleClose = () => {
|
|
64
|
-
const { onClose } = this.props;
|
|
65
|
-
if (onClose) {
|
|
66
|
-
onClose();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
renderDealCard = (deal: CommitDeal) => {
|
|
71
|
-
const { onPrioritize, onDismiss } = this.props;
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<div key={deal.id} className="deal-card">
|
|
75
|
-
<div className="deal-card-header">
|
|
76
|
-
<div className="deal-info">
|
|
77
|
-
<div className="deal-name">{deal.name}</div>
|
|
78
|
-
<div className="deal-account">
|
|
79
|
-
{deal.account} · {deal.amount}
|
|
80
|
-
</div>
|
|
81
|
-
<div className="deal-meta">
|
|
82
|
-
<span className="deal-stage">{deal.stage}</span>
|
|
83
|
-
<span> · Close: {deal.closeDate}</span>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
<span className="deal-score">✨ {deal.aiScore}</span>
|
|
87
|
-
</div>
|
|
88
|
-
{deal.description && (
|
|
89
|
-
<div className="deal-description">{deal.description}</div>
|
|
90
|
-
)}
|
|
91
|
-
<div className="deal-actions">
|
|
92
|
-
<button
|
|
93
|
-
className="btn-prioritize"
|
|
94
|
-
onClick={() => onPrioritize?.(deal)}
|
|
95
|
-
>
|
|
96
|
-
Prioritize
|
|
97
|
-
</button>
|
|
98
|
-
<button className="btn-dismiss" onClick={() => onDismiss?.(deal)}>
|
|
99
|
-
Dismiss
|
|
100
|
-
</button>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
render() {
|
|
107
|
-
const {
|
|
108
|
-
visible = false,
|
|
109
|
-
totalAmount = '$6,800,000',
|
|
110
|
-
closedAmount = '$3,200,000',
|
|
111
|
-
closedCount = 5,
|
|
112
|
-
tabs = [],
|
|
113
|
-
pipelineDeals = [],
|
|
114
|
-
commitDeals = [],
|
|
115
|
-
className,
|
|
116
|
-
style,
|
|
117
|
-
} = this.props;
|
|
118
|
-
|
|
119
|
-
const { activeTab } = this.state;
|
|
120
|
-
|
|
121
|
-
if (!visible) {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return (
|
|
126
|
-
<div className={`ai-commit-drawer__c-overlay`} onClick={this.handleClose}>
|
|
127
|
-
<div
|
|
128
|
-
className={`ai-commit-drawer__c ${className || ''}`}
|
|
129
|
-
style={style}
|
|
130
|
-
onClick={(e) => e.stopPropagation()}
|
|
131
|
-
>
|
|
132
|
-
<div className="drawer-header">
|
|
133
|
-
<h3>✨ AI Forecast</h3>
|
|
134
|
-
<button className="close-btn" onClick={this.handleClose}>
|
|
135
|
-
✕
|
|
136
|
-
</button>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<div className="drawer-summary">
|
|
140
|
-
<span className="summary-amount">{totalAmount}</span>
|
|
141
|
-
<span className="summary-desc">
|
|
142
|
-
Based on deal health and engagement signals
|
|
143
|
-
</span>
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
{/* Closed Won 汇总 */}
|
|
147
|
-
<div className="closed-summary">
|
|
148
|
-
<div className="closed-info">
|
|
149
|
-
<div className="closed-label">Closed Won</div>
|
|
150
|
-
<div className="closed-amount">{closedAmount}</div>
|
|
151
|
-
</div>
|
|
152
|
-
<div className="closed-count">{closedCount} deals</div>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
{/* Tab切换 */}
|
|
156
|
-
<div className="drawer-tabs">
|
|
157
|
-
{tabs.map((tab) => (
|
|
158
|
-
<button
|
|
159
|
-
key={tab.key}
|
|
160
|
-
className={`ai-commit-tab ${
|
|
161
|
-
activeTab === tab.key ? 'active' : ''
|
|
162
|
-
}`}
|
|
163
|
-
onClick={() => this.handleTabChange(tab.key)}
|
|
164
|
-
>
|
|
165
|
-
{tab.label} · {tab.amount} · {tab.count} deals
|
|
166
|
-
</button>
|
|
167
|
-
))}
|
|
168
|
-
</div>
|
|
169
|
-
|
|
170
|
-
{/* Tab内容 */}
|
|
171
|
-
<div className="drawer-content">
|
|
172
|
-
{activeTab === 'pipeline' &&
|
|
173
|
-
pipelineDeals.map((deal) => this.renderDealCard(deal))}
|
|
174
|
-
{activeTab === 'commit' &&
|
|
175
|
-
commitDeals.map((deal) => this.renderDealCard(deal))}
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export default StatusHoc(AiCommitDrawer);
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
export class AiCommitDrawerModel {
|
|
2
|
-
label: string = 'AI推荐抽屉';
|
|
3
|
-
description: string =
|
|
4
|
-
'展示AI推荐的Commit商机,支持From Pipeline和From Commit两个Tab';
|
|
5
|
-
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/aiCommitDrawer.svg';
|
|
6
|
-
targetPage: string[] = ['all'];
|
|
7
|
-
targetDevice: string = 'all';
|
|
8
|
-
|
|
9
|
-
defaultComProps = {
|
|
10
|
-
visible: false,
|
|
11
|
-
totalAmount: '$6,800,000',
|
|
12
|
-
closedAmount: '$3,200,000',
|
|
13
|
-
closedCount: 5,
|
|
14
|
-
tabs: [
|
|
15
|
-
{
|
|
16
|
-
key: 'pipeline',
|
|
17
|
-
label: 'From Open Pipeline',
|
|
18
|
-
amount: '$2,500,000',
|
|
19
|
-
count: 2,
|
|
20
|
-
},
|
|
21
|
-
{ key: 'commit', label: 'From Commit', amount: '$1,800,000', count: 2 },
|
|
22
|
-
],
|
|
23
|
-
pipelineDeals: [
|
|
24
|
-
{
|
|
25
|
-
id: '1',
|
|
26
|
-
name: 'Starlight Initiative',
|
|
27
|
-
account: 'Tencent',
|
|
28
|
-
amount: '$500,000',
|
|
29
|
-
stage: 'Pipeline',
|
|
30
|
-
closeDate: '2026-05-20',
|
|
31
|
-
aiScore: '52%',
|
|
32
|
-
description:
|
|
33
|
-
'Strong engagement signals and past wins with this account',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: '2',
|
|
37
|
-
name: 'Galaxy Partnership',
|
|
38
|
-
account: 'Alibaba',
|
|
39
|
-
amount: '$2,000,000',
|
|
40
|
-
stage: 'Best Case',
|
|
41
|
-
closeDate: '2026-05-10',
|
|
42
|
-
aiScore: '45%',
|
|
43
|
-
description: 'High product usage and active engagement in last 7 days',
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
commitDeals: [
|
|
47
|
-
{
|
|
48
|
-
id: '3',
|
|
49
|
-
name: 'Aurora Solution',
|
|
50
|
-
account: 'ByteDance',
|
|
51
|
-
amount: '$800,000',
|
|
52
|
-
stage: 'Commit',
|
|
53
|
-
closeDate: '2026-04-30',
|
|
54
|
-
aiScore: '91%',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: '4',
|
|
58
|
-
name: 'Apollo Project',
|
|
59
|
-
account: 'Huawei Tech',
|
|
60
|
-
amount: '$1,000,000',
|
|
61
|
-
stage: 'Commit',
|
|
62
|
-
closeDate: '2026-04-15',
|
|
63
|
-
aiScore: '86%',
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
functions = [
|
|
69
|
-
{
|
|
70
|
-
apiKey: 'openDrawer',
|
|
71
|
-
label: '打开抽屉',
|
|
72
|
-
helpTextKey: '打开AI推荐抽屉',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
apiKey: 'closeDrawer',
|
|
76
|
-
label: '关闭抽屉',
|
|
77
|
-
helpTextKey: '关闭AI推荐抽屉',
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
propsSchema = [
|
|
82
|
-
{
|
|
83
|
-
type: 'boolean',
|
|
84
|
-
name: 'visible',
|
|
85
|
-
label: '是否显示',
|
|
86
|
-
},
|
|
87
|
-
];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default AiCommitDrawerModel;
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
.ai-commit-drawer__c-overlay {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
background: rgba(0, 0, 0, 0.3);
|
|
8
|
-
z-index: 150;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.ai-commit-drawer__c {
|
|
12
|
-
position: fixed;
|
|
13
|
-
top: 0;
|
|
14
|
-
right: 0;
|
|
15
|
-
width: 480px;
|
|
16
|
-
height: 100%;
|
|
17
|
-
background: #fff;
|
|
18
|
-
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
|
|
19
|
-
overflow-y: auto;
|
|
20
|
-
padding: 24px;
|
|
21
|
-
|
|
22
|
-
.drawer-header {
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: space-between;
|
|
25
|
-
align-items: center;
|
|
26
|
-
margin-bottom: 20px;
|
|
27
|
-
|
|
28
|
-
h3 {
|
|
29
|
-
font-size: 16px;
|
|
30
|
-
margin: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.close-btn {
|
|
34
|
-
border: none;
|
|
35
|
-
background: none;
|
|
36
|
-
font-size: 20px;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
color: #999;
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
color: #333;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.drawer-summary {
|
|
47
|
-
font-size: 12px;
|
|
48
|
-
color: #888;
|
|
49
|
-
margin-bottom: 20px;
|
|
50
|
-
|
|
51
|
-
.summary-amount {
|
|
52
|
-
font-weight: 700;
|
|
53
|
-
color: #6366f1;
|
|
54
|
-
font-size: 16px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.summary-desc {
|
|
58
|
-
margin-left: 4px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.closed-summary {
|
|
63
|
-
background: #f8f9fa;
|
|
64
|
-
border-radius: 10px;
|
|
65
|
-
padding: 16px;
|
|
66
|
-
margin-bottom: 20px;
|
|
67
|
-
|
|
68
|
-
.closed-info {
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: space-between;
|
|
71
|
-
align-items: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.closed-label {
|
|
75
|
-
font-size: 12px;
|
|
76
|
-
color: #888;
|
|
77
|
-
margin-bottom: 2px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.closed-amount {
|
|
81
|
-
font-size: 20px;
|
|
82
|
-
font-weight: 700;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.closed-count {
|
|
86
|
-
font-size: 12px;
|
|
87
|
-
color: #999;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.drawer-tabs {
|
|
92
|
-
display: flex;
|
|
93
|
-
gap: 0;
|
|
94
|
-
margin-bottom: 16px;
|
|
95
|
-
border-bottom: 2px solid #e5e7eb;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.ai-commit-tab {
|
|
99
|
-
padding: 8px 16px;
|
|
100
|
-
font-size: 13px;
|
|
101
|
-
font-weight: 600;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
border: none;
|
|
104
|
-
background: none;
|
|
105
|
-
color: #999;
|
|
106
|
-
border-bottom: 2px solid transparent;
|
|
107
|
-
margin-bottom: -2px;
|
|
108
|
-
transition: all 0.2s;
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
|
|
111
|
-
&:hover {
|
|
112
|
-
color: #6366f1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&.active {
|
|
116
|
-
color: #6366f1;
|
|
117
|
-
border-bottom-color: #6366f1;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.drawer-content {
|
|
122
|
-
.deal-card {
|
|
123
|
-
border: 1px solid #e5e7eb;
|
|
124
|
-
border-left: 3px solid #6366f1;
|
|
125
|
-
border-radius: 10px;
|
|
126
|
-
padding: 14px;
|
|
127
|
-
margin-bottom: 10px;
|
|
128
|
-
|
|
129
|
-
.deal-card-header {
|
|
130
|
-
display: flex;
|
|
131
|
-
justify-content: space-between;
|
|
132
|
-
align-items: start;
|
|
133
|
-
margin-bottom: 6px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.deal-info {
|
|
137
|
-
flex: 1;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.deal-name {
|
|
141
|
-
font-weight: 600;
|
|
142
|
-
font-size: 14px;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.deal-account {
|
|
146
|
-
font-size: 12px;
|
|
147
|
-
color: #888;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.deal-meta {
|
|
151
|
-
font-size: 11px;
|
|
152
|
-
color: #888;
|
|
153
|
-
margin-top: 2px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.deal-stage {
|
|
157
|
-
background: #f0f0f0;
|
|
158
|
-
padding: 1px 6px;
|
|
159
|
-
border-radius: 3px;
|
|
160
|
-
font-size: 10px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.deal-score {
|
|
164
|
-
color: #6366f1;
|
|
165
|
-
font-weight: 600;
|
|
166
|
-
font-size: 13px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.deal-description {
|
|
170
|
-
font-size: 12px;
|
|
171
|
-
color: #666;
|
|
172
|
-
background: #f8f9fa;
|
|
173
|
-
padding: 6px 8px;
|
|
174
|
-
border-radius: 4px;
|
|
175
|
-
margin-bottom: 10px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.deal-actions {
|
|
179
|
-
display: flex;
|
|
180
|
-
gap: 8px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.btn-prioritize {
|
|
184
|
-
flex: 1;
|
|
185
|
-
padding: 7px;
|
|
186
|
-
border: none;
|
|
187
|
-
border-radius: 6px;
|
|
188
|
-
background: #6366f1;
|
|
189
|
-
color: #fff;
|
|
190
|
-
cursor: pointer;
|
|
191
|
-
font-size: 12px;
|
|
192
|
-
font-weight: 600;
|
|
193
|
-
transition: opacity 0.2s;
|
|
194
|
-
|
|
195
|
-
&:hover {
|
|
196
|
-
opacity: 0.9;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.btn-dismiss {
|
|
201
|
-
flex: 1;
|
|
202
|
-
padding: 7px;
|
|
203
|
-
border: 1px solid #ddd;
|
|
204
|
-
border-radius: 6px;
|
|
205
|
-
background: #fff;
|
|
206
|
-
cursor: pointer;
|
|
207
|
-
font-size: 12px;
|
|
208
|
-
color: #666;
|
|
209
|
-
transition: all 0.2s;
|
|
210
|
-
|
|
211
|
-
&:hover {
|
|
212
|
-
border-color: #6366f1;
|
|
213
|
-
color: #6366f1;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# ForecastChart 组件
|
|
2
|
-
|
|
3
|
-
预测看板图表组件,展示预测数据的堆叠柱状图。
|
|
4
|
-
|
|
5
|
-
## 使用方式
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import ForecastChart from './components/forecastChart__c';
|
|
9
|
-
|
|
10
|
-
<ForecastChart
|
|
11
|
-
title="Forecast Overview"
|
|
12
|
-
quotaValue="$10M"
|
|
13
|
-
forecastValue="$7.5M"
|
|
14
|
-
aiValue="$6.8M"
|
|
15
|
-
columns={[
|
|
16
|
-
{ label: 'Closed', value: '$3.2M', color: '#3b82f6' },
|
|
17
|
-
{ label: 'Commit', value: '$2.5M', color: '#22c55e' },
|
|
18
|
-
]}
|
|
19
|
-
/>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| 属性 | 说明 | 类型 | 默认值 |
|
|
25
|
-
|------|------|------|--------|
|
|
26
|
-
| title | 标题 | string | 'Forecast Overview' |
|
|
27
|
-
| quotaValue | Quota值 | string | '$10M' |
|
|
28
|
-
| forecastValue | Forecast值 | string | '$7.5M' |
|
|
29
|
-
| aiValue | AI预测值 | string | '$6.8M' |
|
|
30
|
-
| columns | 柱状图数据 | ChartColumn[] | [] |
|
|
31
|
-
| showAiButton | 显示AI按钮 | boolean | true |
|