neo-cmp-cli 1.13.12 → 1.13.15
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 +1 -1
- package/dist/neo/neoEnvManager.js +1 -1
- package/dist/neo/neoLogin.js +1 -1
- package/dist/neo/neoRequire.js +1 -1
- package/dist/neo/neoService.js +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/asset-manage-template/package.json +1 -1
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +1 -1
- package/template/map-custom-cmp-template/package.json +1 -1
- package/template/neo-bi-cmps/docs/gartner-pipeline-apis.md +45 -73
- package/template/neo-bi-cmps/package.json +1 -1
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/README.md +52 -0
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/index.tsx +183 -0
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/model.ts +90 -0
- package/template/neo-bi-cmps/src/components/aiCommitDrawer__c/style.scss +218 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/README.md +35 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +200 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +72 -0
- package/template/neo-bi-cmps/src/components/filterBar__c/style.scss +212 -0
- package/template/neo-bi-cmps/src/components/forecastChart__c/README.md +31 -0
- package/template/neo-bi-cmps/src/components/forecastChart__c/index.tsx +158 -0
- package/template/neo-bi-cmps/src/components/forecastChart__c/model.ts +40 -0
- package/template/neo-bi-cmps/src/components/forecastChart__c/style.scss +154 -0
- package/template/neo-bi-cmps/src/components/forecastGrid__c/README.md +36 -0
- package/template/neo-bi-cmps/src/components/forecastGrid__c/index.tsx +86 -0
- package/template/neo-bi-cmps/src/components/forecastGrid__c/model.ts +62 -0
- package/template/neo-bi-cmps/src/components/forecastGrid__c/style.scss +48 -0
- package/template/neo-bi-cmps/src/components/gapCloser__c/README.md +24 -0
- package/template/neo-bi-cmps/src/components/gapCloser__c/index.tsx +100 -0
- package/template/neo-bi-cmps/src/components/gapCloser__c/model.ts +46 -0
- package/template/neo-bi-cmps/src/components/gapCloser__c/style.scss +60 -0
- package/template/neo-bi-cmps/src/components/kpiCards__c/README.md +35 -0
- package/template/neo-bi-cmps/src/components/kpiCards__c/index.tsx +70 -0
- package/template/neo-bi-cmps/src/components/kpiCards__c/model.ts +50 -0
- package/template/neo-bi-cmps/src/components/kpiCards__c/style.scss +33 -0
- package/template/neo-bi-cmps/src/components/oppList__c/README.md +52 -0
- package/template/neo-bi-cmps/src/components/oppList__c/index.tsx +285 -0
- package/template/neo-bi-cmps/src/components/oppList__c/model.ts +86 -0
- package/template/neo-bi-cmps/src/components/oppList__c/style.scss +133 -0
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/README.md +39 -0
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/index.tsx +130 -0
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/model.ts +66 -0
- package/template/neo-bi-cmps/src/components/pipelineFunnel__c/style.scss +133 -0
- package/template/neo-bi-cmps/src/components/stageSwitch__c/README.md +36 -0
- package/template/neo-bi-cmps/src/components/stageSwitch__c/index.tsx +118 -0
- package/template/neo-bi-cmps/src/components/stageSwitch__c/model.ts +92 -0
- package/template/neo-bi-cmps/src/components/stageSwitch__c/style.scss +89 -0
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/README.md +37 -0
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/index.tsx +126 -0
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/model.ts +57 -0
- package/template/neo-bi-cmps/src/components/stageTimeChart__c/style.scss +140 -0
- package/template/neo-bi-cmps/src/components/tabSwitch__c/README.md +37 -0
- package/template/neo-bi-cmps/src/components/tabSwitch__c/index.tsx +80 -0
- package/template/neo-bi-cmps/src/components/tabSwitch__c/model.ts +45 -0
- package/template/neo-bi-cmps/src/components/tabSwitch__c/style.scss +37 -0
- package/template/neo-custom-cmp-template/package.json +1 -1
- package/template/neo-h5-cmps/package.json +1 -1
- package/template/neo-order-cmps/package.json +1 -1
- package/template/neo-web-entity-grid/package.json +1 -1
- package/template/neo-web-form/package.json +1 -1
- package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +17 -17
- 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
|
@@ -0,0 +1,183 @@
|
|
|
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);
|
|
@@ -0,0 +1,90 @@
|
|
|
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;
|
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# FilterBar 组件
|
|
2
|
+
|
|
3
|
+
筛选栏组件,支持日期范围、负责人、业务类型等多维度筛选。
|
|
4
|
+
|
|
5
|
+
## 使用方式
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import FilterBar from './components/filterBar__c';
|
|
9
|
+
|
|
10
|
+
<FilterBar
|
|
11
|
+
filters={[
|
|
12
|
+
{ name: 'closeDate', label: 'Close Date', type: 'select', options: [...] },
|
|
13
|
+
{ name: 'owner', label: 'Opportunity Owner', type: 'owner' },
|
|
14
|
+
]}
|
|
15
|
+
onChange={(key, value) => console.log(key, value)}
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
22
|
+
|------|------|------|--------|
|
|
23
|
+
| filters | 筛选配置数组 | FilterItem[] | [] |
|
|
24
|
+
| values | 筛选值 | Record<string, string> | {} |
|
|
25
|
+
| onChange | 筛选变化回调 | (key: string, value: string) => void | - |
|
|
26
|
+
| onSearch | 搜索按钮回调 | () => void | - |
|
|
27
|
+
|
|
28
|
+
## FilterItem
|
|
29
|
+
|
|
30
|
+
| 属性 | 说明 | 类型 |
|
|
31
|
+
|------|------|------|
|
|
32
|
+
| name | 字段标识 | string |
|
|
33
|
+
| label | 显示标签 | string |
|
|
34
|
+
| type | 类型 | 'select' \| 'date' \| 'owner' \| 'custom' |
|
|
35
|
+
| options | 下拉选项 | FilterOption[] |
|