neo-cmp-cli 1.13.16 → 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/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/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/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/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 → 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,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);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export class TabSwitchModel {
|
|
2
|
-
label: string = 'Tab切换';
|
|
3
|
-
description: string = '支持Pipeline/Forecast等Tab切换功能';
|
|
4
|
-
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/tabSwitch.svg';
|
|
5
|
-
targetPage: string[] = ['all'];
|
|
6
|
-
targetDevice: string = 'all';
|
|
7
|
-
|
|
8
|
-
defaultComProps = {
|
|
9
|
-
tabs: [
|
|
10
|
-
{ key: 'pipeline', label: 'Pipeline', icon: '' },
|
|
11
|
-
{ key: 'forecast', label: 'Forecast', icon: '' },
|
|
12
|
-
],
|
|
13
|
-
activeTab: 'pipeline',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
functions = [
|
|
17
|
-
{
|
|
18
|
-
apiKey: 'setActiveTab',
|
|
19
|
-
label: '设置当前Tab',
|
|
20
|
-
helpTextKey: '设置当前激活的Tab页',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
propsSchema = [
|
|
25
|
-
{
|
|
26
|
-
type: 'object',
|
|
27
|
-
name: 'tabs',
|
|
28
|
-
label: 'Tab配置',
|
|
29
|
-
schema: [
|
|
30
|
-
{
|
|
31
|
-
type: 'string',
|
|
32
|
-
name: 'tabLabel',
|
|
33
|
-
label: 'Tab标签',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: 'string',
|
|
39
|
-
name: 'activeTab',
|
|
40
|
-
label: '当前激活Tab',
|
|
41
|
-
},
|
|
42
|
-
];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default TabSwitchModel;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.tab-switch__c {
|
|
2
|
-
.tab-bar {
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 0;
|
|
5
|
-
margin-bottom: 20px;
|
|
6
|
-
border-bottom: 2px solid #e5e7eb;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.tab-btn {
|
|
10
|
-
padding: 10px 24px;
|
|
11
|
-
font-size: 14px;
|
|
12
|
-
font-weight: 600;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
border: none;
|
|
15
|
-
background: none;
|
|
16
|
-
color: #999;
|
|
17
|
-
border-bottom: 2px solid transparent;
|
|
18
|
-
margin-bottom: -2px;
|
|
19
|
-
transition: all 0.2s;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
gap: 6px;
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
color: #6366f1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.active {
|
|
29
|
-
color: #6366f1;
|
|
30
|
-
border-bottom-color: #6366f1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.tab-icon {
|
|
34
|
-
font-size: 14px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import axios from 'axios'; // https://www.axios-http.cn/docs/intro
|
|
2
|
-
|
|
3
|
-
// 创建基于 axios 的 fetcher 函数
|
|
4
|
-
const axiosFetcher = async (options: any) => {
|
|
5
|
-
try {
|
|
6
|
-
const config = {
|
|
7
|
-
...options,
|
|
8
|
-
method: options?.method || 'GET',
|
|
9
|
-
data: options?.data || {},
|
|
10
|
-
headers: {
|
|
11
|
-
'Content-Type': 'application/json',
|
|
12
|
-
...options?.headers,
|
|
13
|
-
},
|
|
14
|
-
timeout: options?.timeout || 30000,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
if (config?.method === 'GET') {
|
|
18
|
-
config.params = options?.data || {};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const response = await axios(config);
|
|
22
|
-
return response?.data || {};
|
|
23
|
-
} catch (error) {
|
|
24
|
-
if (error.response) {
|
|
25
|
-
// 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
|
|
26
|
-
console.error('接口请求报错 / 接口服务异常:', error.message);
|
|
27
|
-
} else if (error.request) {
|
|
28
|
-
// 请求已经成功发起,但没有收到响应
|
|
29
|
-
console.error('接口请求报错 / 接口未正常响应:', error.message);
|
|
30
|
-
} else {
|
|
31
|
-
console.error('接口请求报错:', error, ',请求参数:', options);
|
|
32
|
-
}
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default axiosFetcher;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import axiosFetcher from '$utils/axiosFetcher';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 这里存放通用查询类 Open API
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// 获取业务对象数据列表
|
|
8
|
-
export const queryXObjectData = async (options?: any) => {
|
|
9
|
-
const apiUrl = '/rest/data/v2/query';
|
|
10
|
-
const curOptions = options || {};
|
|
11
|
-
const xObjectApiKey = curOptions.xObjectApiKey || '';
|
|
12
|
-
const fields = curOptions.fields || [];
|
|
13
|
-
const page = curOptions.page || 1;
|
|
14
|
-
const pageSize = curOptions.pageSize || 10;
|
|
15
|
-
|
|
16
|
-
// 自动添加 objectId 字段
|
|
17
|
-
if (!fields.includes('id')) {
|
|
18
|
-
fields.push('id');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// 计算分页偏移量
|
|
22
|
-
const offset = (page - 1) * pageSize;
|
|
23
|
-
|
|
24
|
-
// 构建 SQL 查询
|
|
25
|
-
let querySql = `select ${fields.join(',')} from ${xObjectApiKey}`;
|
|
26
|
-
|
|
27
|
-
// 添加排序条件(如果有的话)
|
|
28
|
-
if (curOptions.orderBy) {
|
|
29
|
-
querySql += ` order by ${curOptions.orderBy}`;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (curOptions.page || curOptions.pageSize) {
|
|
33
|
-
// 添加分页限制
|
|
34
|
-
querySql += ` limit ${pageSize} offset ${offset}`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
try {
|
|
38
|
-
const config = {
|
|
39
|
-
url: apiUrl,
|
|
40
|
-
method: 'GET',
|
|
41
|
-
data: {
|
|
42
|
-
q: querySql,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const resultData = await axiosFetcher(config);
|
|
47
|
-
|
|
48
|
-
if (resultData.code === 200) {
|
|
49
|
-
const { records, totalSize } = resultData.result || {};
|
|
50
|
-
return {
|
|
51
|
-
status: true,
|
|
52
|
-
code: resultData.code,
|
|
53
|
-
msg: resultData.msg || '获取业务对象数据列表成功',
|
|
54
|
-
totalSize,
|
|
55
|
-
data: records || [],
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
status: false,
|
|
61
|
-
code: resultData.code,
|
|
62
|
-
msg: resultData.msg || '获取业务对象数据列表失败',
|
|
63
|
-
data: [],
|
|
64
|
-
};
|
|
65
|
-
} catch (error) {
|
|
66
|
-
console.error('获取业务对象数据列表失败:', error);
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
status: false,
|
|
70
|
-
msg: error.msg || error.message || '获取业务对象数据列表失败',
|
|
71
|
-
data: [],
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default queryXObjectData;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { message } from 'antd';
|
|
2
|
-
import axiosFetcher from './axiosFetcher';
|
|
3
|
-
|
|
4
|
-
// 获取业务类型列表
|
|
5
|
-
export const getEntityTypeList = async (
|
|
6
|
-
xObjectApiKey: string,
|
|
7
|
-
options?: any,
|
|
8
|
-
) => {
|
|
9
|
-
const curOptions = options || {};
|
|
10
|
-
const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/busiType`;
|
|
11
|
-
try {
|
|
12
|
-
const config = {
|
|
13
|
-
...curOptions,
|
|
14
|
-
url: apiUrl,
|
|
15
|
-
method: 'GET',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const result = await axiosFetcher(config);
|
|
19
|
-
return result;
|
|
20
|
-
} catch (error) {
|
|
21
|
-
console.error('获取业务类型失败:', error);
|
|
22
|
-
message.error('获取业务类型失败。');
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// 获取对象列表
|
|
28
|
-
export const getEntityList = async (options?: any) => {
|
|
29
|
-
const curOptions = options || {};
|
|
30
|
-
const custom = curOptions.custom || false; // 默认获取标准对象列表
|
|
31
|
-
const active = curOptions.active || true; // 仅获取有权限的对象
|
|
32
|
-
const apiUrl = `/rest/metadata/v2.0/xobjects/filter?custom=${custom}&active=${active}`;
|
|
33
|
-
try {
|
|
34
|
-
const config = {
|
|
35
|
-
...curOptions,
|
|
36
|
-
url: apiUrl,
|
|
37
|
-
method: 'GET',
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const result = await axiosFetcher(config);
|
|
41
|
-
return result;
|
|
42
|
-
} catch (error) {
|
|
43
|
-
console.error('获取对象列表失败:', error);
|
|
44
|
-
message.error('获取对象列表失败。');
|
|
45
|
-
return {};
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// 创建业务数据
|
|
50
|
-
export const createXObject = async (xObjectApiKey: string, options: any) => {
|
|
51
|
-
const curOptions = options || {};
|
|
52
|
-
const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}`;
|
|
53
|
-
const formData = curOptions.data || {};
|
|
54
|
-
try {
|
|
55
|
-
const config = {
|
|
56
|
-
...options,
|
|
57
|
-
url: apiUrl,
|
|
58
|
-
method: curOptions.method || 'GET',
|
|
59
|
-
data: {
|
|
60
|
-
data: formData,
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const result = await axiosFetcher(config);
|
|
65
|
-
return result;
|
|
66
|
-
} catch (error) {
|
|
67
|
-
console.error('创建业务数据失败:', error);
|
|
68
|
-
throw error;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// 获取业务对象描述
|
|
73
|
-
export const getXObjectDesc = async (xObjectApiKey: string, options?: any) => {
|
|
74
|
-
const curOptions = options || {};
|
|
75
|
-
const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/description`;
|
|
76
|
-
try {
|
|
77
|
-
const config = {
|
|
78
|
-
...options,
|
|
79
|
-
url: apiUrl,
|
|
80
|
-
method: curOptions.method || 'GET',
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const result = await axiosFetcher(config);
|
|
84
|
-
return result;
|
|
85
|
-
} catch (error) {
|
|
86
|
-
console.error('获取业务对象描述:', error);
|
|
87
|
-
throw error;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
// 更新业务数据
|
|
92
|
-
export const updateXObject = async (
|
|
93
|
-
xObjectApiKey: string,
|
|
94
|
-
objectId: string,
|
|
95
|
-
options: any,
|
|
96
|
-
) => {
|
|
97
|
-
const curOptions = options || {};
|
|
98
|
-
const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/${objectId}`;
|
|
99
|
-
const formData = curOptions.data || {};
|
|
100
|
-
try {
|
|
101
|
-
const config = {
|
|
102
|
-
...curOptions,
|
|
103
|
-
url: apiUrl,
|
|
104
|
-
method: curOptions.method || 'PATCH',
|
|
105
|
-
data: {
|
|
106
|
-
data: formData,
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const result = await axiosFetcher(config);
|
|
111
|
-
return result;
|
|
112
|
-
} catch (error) {
|
|
113
|
-
console.error('更新业务数据失败:', error);
|
|
114
|
-
throw error;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// 获取业务数据信息
|
|
119
|
-
export const getXObject = async (
|
|
120
|
-
xObjectApiKey: string,
|
|
121
|
-
objectId: string,
|
|
122
|
-
options?: any,
|
|
123
|
-
) => {
|
|
124
|
-
const curOptions = options || {};
|
|
125
|
-
const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/${objectId}`;
|
|
126
|
-
try {
|
|
127
|
-
const config = {
|
|
128
|
-
...curOptions,
|
|
129
|
-
url: apiUrl,
|
|
130
|
-
method: curOptions.method || 'GET',
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const result = await axiosFetcher(config);
|
|
134
|
-
return result;
|
|
135
|
-
} catch (error) {
|
|
136
|
-
console.error('获取业务数据信息失败:', error);
|
|
137
|
-
throw error;
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
// 删除业务数据
|
|
142
|
-
export const deleteXObject = async (
|
|
143
|
-
xObjectApiKey: string,
|
|
144
|
-
objectId: string,
|
|
145
|
-
options?: any,
|
|
146
|
-
) => {
|
|
147
|
-
const curOptions = options || {};
|
|
148
|
-
const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/${objectId}`;
|
|
149
|
-
try {
|
|
150
|
-
const config = {
|
|
151
|
-
...curOptions,
|
|
152
|
-
url: apiUrl,
|
|
153
|
-
method: curOptions.method || 'DELETE',
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
const result = await axiosFetcher(config);
|
|
157
|
-
return result;
|
|
158
|
-
} catch (error) {
|
|
159
|
-
console.error('删除业务数据:', error);
|
|
160
|
-
throw error;
|
|
161
|
-
}
|
|
162
|
-
};
|
/package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/pipelineFunnel__c/README.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/template/{neo-bi-cmps → neo-pipeline-cmps}/src/components/stageTimeChart__c/README.md
RENAMED
|
File without changes
|