neo-cmp-cli 1.13.17 → 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.
Files changed (71) hide show
  1. package/dist/index2.js +1 -1
  2. package/dist/neo/env.js +1 -1
  3. package/dist/neo/pushCmp.js +1 -1
  4. package/dist/package.json.js +1 -1
  5. package/package.json +3 -2
  6. package/template/asset-manage-template/docs/README.md +1 -232
  7. package/template/echarts-custom-cmp-template/package.json +1 -1
  8. package/template/neo-bi-cmps/package.json +1 -1
  9. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +1 -1
  10. package/template/neo-custom-cmp-template/docs/README.md +0 -231
  11. package/template/neo-custom-cmp-template/package.json +1 -1
  12. package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +1 -2
  13. package/template/neo-h5-cmps/src/components/entityTabs__c/index.tsx +1 -1
  14. package/template/neo-h5-cmps/src/components/globalSearchInput__c/index.tsx +1 -1
  15. package/template/neo-h5-cmps/src/components/openChatPageBtn__c/index.tsx +1 -2
  16. package/template/neo-pipeline-cmps/neo.config.js +11 -0
  17. package/template/neo-pipeline-cmps/src/assets/css/common.scss +16 -16
  18. package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +5 -5
  19. package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +9 -9
  20. package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +5 -5
  21. package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +47 -46
  22. package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +13 -11
  23. package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +1 -1
  24. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/README.md +17 -17
  25. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +23 -22
  26. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +18 -17
  27. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +33 -26
  28. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +9 -9
  29. package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +53 -54
  30. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +5 -5
  31. package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +70 -68
  32. package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +41 -41
  33. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +2 -3
  34. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/README.md +15 -15
  35. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +35 -33
  36. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +16 -15
  37. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/README.md +18 -18
  38. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +20 -20
  39. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +21 -18
  40. package/template/neo-pipeline-cmps/src/utils/common.ts +14 -14
  41. package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +21 -23
  42. package/template/neo-pipeline-cmps/src/utils/filterBar.ts +14 -14
  43. package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +5 -5
  44. package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +26 -22
  45. package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +3 -3
  46. package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +31 -26
  47. package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +1 -1
  48. package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +5 -5
  49. package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +2 -2
  50. package/template/neo-web-form/package.json +1 -1
  51. package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +161 -41
  52. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +4 -2
  53. package/template/react-custom-cmp-template/package.json +1 -1
  54. package/template/asset-manage-template/src/utils/axiosFetcher.ts +0 -37
  55. package/template/asset-manage-template/src/utils/queryObjectData.ts +0 -112
  56. package/template/asset-manage-template/src/utils/xobjects.ts +0 -162
  57. package/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +0 -37
  58. package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -112
  59. package/template/neo-custom-cmp-template/src/utils/xobjects.ts +0 -162
  60. package/template/neo-h5-cmps/src/utils/axiosFetcher.ts +0 -37
  61. package/template/neo-h5-cmps/src/utils/queryObjectData.ts +0 -112
  62. package/template/neo-h5-cmps/src/utils/xobjects.ts +0 -167
  63. package/template/neo-order-cmps/src/utils/axiosFetcher.ts +0 -37
  64. package/template/neo-order-cmps/src/utils/queryObjectData.ts +0 -112
  65. package/template/neo-order-cmps/src/utils/xobjects.ts +0 -162
  66. package/template/neo-web-entity-grid/src/utils/axiosFetcher.ts +0 -37
  67. package/template/neo-web-entity-grid/src/utils/queryObjectData.ts +0 -112
  68. package/template/neo-web-entity-grid/src/utils/xobjects.ts +0 -167
  69. package/template/neo-web-form/src/utils/axiosFetcher.ts +0 -37
  70. package/template/neo-web-form/src/utils/queryObjectData.ts +0 -112
  71. package/template/neo-web-form/src/utils/xobjects.ts +0 -167
@@ -55,7 +55,7 @@
55
55
  "@types/react": "^16.9.11",
56
56
  "@types/react-dom": "^16.9.15",
57
57
  "@types/axios": "^0.14.0",
58
- "neo-cmp-cli": "^1.13.17",
58
+ "neo-cmp-cli": "^1.13.18",
59
59
  "husky": "^4.2.5",
60
60
  "lint-staged": "^10.2.9",
61
61
  "prettier": "^2.0.5"
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
- import './style.scss'; // 组件内容样式
3
2
  // @ts-ignore
4
3
  import { NeoEntityList } from 'neo-ui-component-h5'; // neo h5 组件库
5
-
4
+ import './style.scss'; // 组件内容样式
6
5
  interface EntityListProps {
7
6
  entityApiKey: string;
8
7
  disableSearch?: boolean;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { Tabs } from 'antd-mobile';
3
- import './style.scss'; // 组件内容样式
4
3
  // @ts-ignore
5
4
  import { NeoEntityList } from 'neo-ui-component-h5'; // neo h5 组件库
5
+ import './style.scss'; // 组件内容样式
6
6
 
7
7
  interface EntityListTabsProps {
8
8
  entityApiKey?: string;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import './style.scss'; // 组件内容样式
3
2
  // @ts-ignore
4
3
  import { GlobalSearchInput } from 'neo-ui-component-h5'; // neo h5 组件库
4
+ import './style.scss'; // 组件内容样式
5
5
 
6
6
  interface GlobalSearchInputProps {
7
7
  placeholder?: string;
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- import { BaseCmp } from 'neo-ui-common';
3
2
  // @ts-ignore
4
- import { NeoEvent } from 'neo-ui-common';
3
+ import { BaseCmp, NeoEvent } from 'neo-ui-common';
5
4
  import './style.scss'; // 组件内容样式
6
5
 
7
6
  interface openChatPageBtnProps {
@@ -51,6 +51,17 @@ module.exports = {
51
51
  // externals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
52
52
  },
53
53
  */
54
+ /*
55
+ // 示例2
56
+ neoCommonModule: {
57
+ // exports: ['xxModule'], // 数组写法,用于导出当前自定义组件中的第三方依赖模块
58
+ exports: { // 对象写法,可用于导出自定义组件中的某个内容模块(需要使用绝对路径导出)
59
+ 'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
60
+ },
61
+ remoteDeps: ['filterBar__c'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 externals 配合使用
62
+ externals: ['filterBar__c'], // 自定义组件中需要剔除的模块,仅支持数组写法
63
+ },
64
+ */
54
65
  linkDebug: {
55
66
  // 用于开启本地调试模式的相关配置信息
56
67
  /*
@@ -1,4 +1,4 @@
1
- /* 公共的自定义函数 */
1
+ /* Common custom functions */
2
2
 
3
3
  @function px2vw($px, $screen-width: 750) {
4
4
  @return ($px / $screen-width) * 100vw;
@@ -17,7 +17,7 @@
17
17
  height: 100%;
18
18
  }
19
19
 
20
- /* 头部细线 */
20
+ /* Top hairline border */
21
21
  @mixin borderTop {
22
22
  content: '';
23
23
  position: absolute;
@@ -30,7 +30,7 @@
30
30
  transform: scaleY(0.5);
31
31
  }
32
32
 
33
- /* 底部细线 */
33
+ /* Bottom hairline border */
34
34
  @mixin borderBtm {
35
35
  content: '';
36
36
  position: absolute;
@@ -43,44 +43,44 @@
43
43
  transform: scaleY(0.5);
44
44
  }
45
45
 
46
- /* 统一的内边距 */
46
+ /* Unified padding */
47
47
  @mixin unifiedPadding($value: 40) {
48
48
  padding: 0 px2rem($value) 0 px2rem($value);
49
49
  }
50
50
 
51
- /* 统一的左内边距 */
51
+ /* Unified left padding */
52
52
  @mixin unifiedLeftPadding($value: 40) {
53
53
  padding-left: px2rem($value);
54
54
  }
55
55
 
56
- /* 统一的右内边距 */
56
+ /* Unified right padding */
57
57
  @mixin unifiedRightPadding($value: 40) {
58
58
  padding-right: px2rem($value);
59
59
  }
60
60
 
61
- /* 统一的底部边框样式 */
61
+ /* Unified bottom border style */
62
62
  @mixin unifiedBottomBorder {
63
63
  border-bottom: 1px solid #ddd;
64
64
  }
65
65
 
66
- /* 统一的上边框样式 */
66
+ /* Unified top border style */
67
67
  @mixin unifiedTopBorder {
68
68
  border-top: 1px solid #ddd;
69
69
  }
70
70
 
71
- /* 统一的Item高度 */
71
+ /* Unified item height */
72
72
  @mixin unifiedItemHeight {
73
73
  line-height: px2rem(120);
74
74
  height: px2rem(120);
75
75
  }
76
76
 
77
- /* 设置行高样式 */
77
+ /* Set line-height style */
78
78
  @mixin setItemHeight($value: 120) {
79
79
  line-height: px2rem($value);
80
80
  height: px2rem($value);
81
81
  }
82
82
 
83
- /* 统一的Item样式 */
83
+ /* Unified item style */
84
84
  @mixin unifiedItemStyle {
85
85
  font-family: PingFangSC-Regular;
86
86
  font-size: px2rem(28);
@@ -88,7 +88,7 @@
88
88
  letter-spacing: 0;
89
89
  }
90
90
 
91
- /* 统一的弹性盒子样式 */
91
+ /* Unified flexbox style */
92
92
  @mixin unifiedFlexBoxStyle {
93
93
  display: flex;
94
94
  flex-wrap: nowrap;
@@ -96,14 +96,14 @@
96
96
  align-items: center;
97
97
  }
98
98
 
99
- /* 统一的Title样式 */
99
+ /* Unified title style */
100
100
  @mixin unifiedTitleStyle {
101
101
  font-family: PingFangSC-Regular;
102
102
  font-size: px2rem(40);
103
103
  color: #1e1e1e;
104
104
  }
105
105
 
106
- /* 统一的内容样式 */
106
+ /* Unified content style */
107
107
  @mixin unifiedContentStyle {
108
108
  font-family: PingFangSC-Regular;
109
109
  font-size: px2rem(28);
@@ -113,7 +113,7 @@
113
113
  line-height: px2rem(28);
114
114
  }
115
115
 
116
- /* 底部导航盒子样式 */
116
+ /* Fixed bottom navigation box style */
117
117
  @mixin fixedBottomBox {
118
118
  position: fixed;
119
119
  left: 0;
@@ -121,7 +121,7 @@
121
121
  width: 100%;
122
122
  }
123
123
 
124
- // 常用的变量
124
+ // Common variables
125
125
  $background-color: #fafafa;
126
126
  $border-color: #f7f7f7;
127
127
  $page-padding-top: px2rem(20);
@@ -1,7 +1,7 @@
1
- // 通用mixin
1
+ // Common mixins
2
2
  $borderColor: #ddd;
3
3
 
4
- // type top 或者 bottom
4
+ // type is top or bottom
5
5
  @mixin borderTopOrBtm($type) {
6
6
  &::after {
7
7
  content: '';
@@ -16,7 +16,7 @@ $borderColor: #ddd;
16
16
  }
17
17
  }
18
18
 
19
- // type right 或者 left
19
+ // type is right or left
20
20
  @mixin borderRtOrLt($type) {
21
21
  &::after {
22
22
  content: '';
@@ -31,14 +31,14 @@ $borderColor: #ddd;
31
31
  }
32
32
  }
33
33
 
34
- //超出1行显示...
34
+ //Ellipsis after 1 line
35
35
  @mixin ellipsis1 {
36
36
  overflow: hidden;
37
37
  text-overflow: ellipsis;
38
38
  white-space: nowrap;
39
39
  }
40
40
 
41
- // 超出多行显示...
41
+ // Ellipsis after multiple lines
42
42
  @mixin ellipsis($num) {
43
43
  overflow: hidden;
44
44
  display: -webkit-box;
@@ -1,8 +1,8 @@
1
- # FilterBar 组件
1
+ # FilterBar Component
2
2
 
3
- 筛选栏组件,支持日期范围、用户和部门、业务类型等多维度筛选。
3
+ Filter bar component that supports multi-dimensional filtering by date range, user and department, business type, etc.
4
4
 
5
- ## 使用方式
5
+ ## Usage
6
6
 
7
7
  ```tsx
8
8
  import FilterBar from './components/filterBar__c';
@@ -14,11 +14,11 @@ import FilterBar from './components/filterBar__c';
14
14
 
15
15
  ## Props
16
16
 
17
- | 属性 | 说明 | 类型 | 默认值 |
18
- |------|------|------|--------|
19
- | values | 筛选值 | Record<string, string> | {} |
20
- | onChange | 筛选变化回调 | (key: string, value: string) => void | - |
17
+ | Property | Description | Type | Default |
18
+ |----------|-------------|------|---------|
19
+ | values | Filter values | Record<string, string> | {} |
20
+ | onChange | Filter change callback | (key: string, value: string) => void | - |
21
21
 
22
22
 
23
- ## 说明
24
- 1、获取 相对时间的接口:/rest/neobi/v2.0/config/getOption
23
+ ## Notes
24
+ 1. API for getting relative time options: /rest/neobi/v2.0/config/getOption.
@@ -1,12 +1,12 @@
1
- // css变量
1
+ // CSS variables
2
2
  :root {
3
3
  --background-color: #f5f6fa;
4
4
  }
5
- // sass变量
5
+ // SASS variables
6
6
  $background-color: #f5f6fa;
7
- // 自定义公共样式
7
+ // Custom common styles
8
8
 
9
- // 自定义页面最外层容器背景色
9
+ // Custom page outermost container background color
10
10
  body {
11
11
  // background-color: var(--background-color);
12
12
  background-color: $background-color;
@@ -26,4 +26,4 @@ body {
26
26
 
27
27
  .single-slot-layout .content-section {
28
28
  background-color: $background-color !important;
29
- }
29
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @file 筛选栏组件
3
- * @description 支持日期范围、负责人(user 实体)、业务类型等多维度筛选
2
+ * @file Filter Bar Component
3
+ * @description Supports multi-dimensional filtering by date range, owner (user entity), business type, etc.
4
4
  */
5
5
  import * as React from 'react';
6
6
  import { DatePicker, Select, Spin } from 'antd';
@@ -33,7 +33,7 @@ const { RangePicker } = DatePicker;
33
33
 
34
34
  const BUSI_TYPE_URL = '/rest/data/v2.0/xobjects/opportunity/busiType';
35
35
 
36
- /** Opportunity Owner 人员列表:平台 user 实体 */
36
+ /** Opportunity Owner personnel list: platform user entity */
37
37
  const USER_ENTITY_API_KEY = 'user';
38
38
  const USER_QUERY_FIELDS = [
39
39
  'id',
@@ -50,18 +50,18 @@ interface FilterBarEventData {
50
50
  export interface FilterBarChangePayload {
51
51
  closeDate: number | string;
52
52
  closeDateCustomRange?: TimestampRange;
53
- /** Opportunity Owner 多选:人员 id 列表,空数组表示未选 */
53
+ /** Opportunity Owner multi-select: personnel id list, empty array means none selected */
54
54
  opportunityOwner: (number | string)[];
55
55
  businessType: string | number;
56
- /** 当前选中的业务类型展示名(与 businessType 对应) */
56
+ /** Current business type display name (corresponding to businessType) */
57
57
  businessTypeLabel?: string;
58
58
  businessTypeApiKey?: string;
59
59
  changesSince: string | number;
60
- /** Changes Since Custom 时:所选日期的当日 0 Unix 毫秒时间戳 */
60
+ /** Changes Since Custom: selected date's midnight Unix millisecond timestamp */
61
61
  changesSinceCustomTime?: number;
62
62
  }
63
63
 
64
- /** 设计器 / 页面注入的当前登录用户(与 __NeoCurrentUser 一致) */
64
+ /** Designer / page-injected current logged-in user (consistent with __NeoCurrentUser) */
65
65
  interface NeoCurrentUser {
66
66
  id: number;
67
67
  name: string;
@@ -74,17 +74,17 @@ interface NeoCurrentUser {
74
74
  }
75
75
 
76
76
  interface FilterBarProps {
77
- /** Close Date 下拉选项(由页面 / 设计器配置传入) */
77
+ /** Close Date dropdown options (passed in from page / designer configuration) */
78
78
  closeDateOptions?: FilterOption[];
79
79
  /**
80
- * 默认业务类型:与接口返回项的 apiKey 相等时,将该项的 id(或 value)作为 Business Type 初始选中值
80
+ * Default business type: when matching the apiKey of an item returned by the API, use that item's id (or value) as the initial Business Type selection
81
81
  */
82
82
  defaultBusiType?: string;
83
83
  className?: string;
84
84
  style?: React.CSSProperties;
85
- /** NeoEvent 并存:便于父组件直接监听 */
85
+ /** Coexists with NeoEvent: allows parent component to listen directly */
86
86
  onValuesChange?: (payload: FilterBarChangePayload) => void;
87
- /** 页面数据:含 __NeoCurrentUser,用于负责人列表首位插入当前用户 */
87
+ /** Page data: contains __NeoCurrentUser, used to insert current user at the top of the owner list */
88
88
  data?: { __NeoCurrentUser?: NeoCurrentUser };
89
89
  }
90
90
 
@@ -100,18 +100,18 @@ interface FilterBarState {
100
100
  opportunityOwnerOptions: FilterOption[];
101
101
  businessTypeOptions: FilterOption[];
102
102
  values: FilterValues;
103
- /** Opportunity Owner 选中的人员 id(多选) */
103
+ /** Opportunity Owner selected personnel ids (multi-select) */
104
104
  opportunityOwner: (number | string)[];
105
- /** Close Date custom 时的自定义区间时间戳 */
105
+ /** Custom date range timestamps when Close Date is 'custom' */
106
106
  closeDateCustomRange: TimestampRange | null;
107
- /** Changes Since Custom 时的单个时间点(当日 0 点,Unix 毫秒) */
107
+ /** Single time point when Changes Since is Custom (midnight, Unix ms) */
108
108
  changesSinceCustomTime: number | null;
109
109
  ownerLoading: boolean;
110
110
  businessTypeLoading: boolean;
111
111
  }
112
112
 
113
113
  class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
114
- /** 初始化筛选 state Close Date 选项 */
114
+ /** Initialize filter state and Close Date options */
115
115
  constructor(props: FilterBarProps) {
116
116
  super(props);
117
117
  const closeOpts = normalizeOptions(
@@ -120,7 +120,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
120
120
  : FilterBar.defaultCloseDateOptions(),
121
121
  );
122
122
  const csOpts = defaultChangesSinceOptions();
123
- const initialClose = closeOpts[2]?.value ?? 401; // 默认本季度
123
+ const initialClose = closeOpts[2]?.value ?? 401; // Default: this quarter
124
124
  const initialRelativeRange = relativeCloseDateRangeFromCode(initialClose);
125
125
  this.state = {
126
126
  closeDateOptions: closeOpts,
@@ -139,7 +139,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
139
139
  businessTypeLoading: false,
140
140
  };
141
141
 
142
- // 绑定方法到 this
142
+ // Bind methods to this
143
143
  this.syncDefaultBusinessTypeFromProps =
144
144
  this.syncDefaultBusinessTypeFromProps.bind(this);
145
145
  this.syncCloseDateOptionsFromProps =
@@ -167,7 +167,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
167
167
  this.renderChangesSinceBlock = this.renderChangesSinceBlock.bind(this);
168
168
  }
169
169
 
170
- /** Close Date 内置默认选项 */
170
+ /** Close Date built-in default options */
171
171
  static defaultCloseDateOptions(): FilterOption[] {
172
172
  return [
173
173
  { value: 201, label: 'This Week' },
@@ -177,14 +177,14 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
177
177
  ];
178
178
  }
179
179
 
180
- /** 同步 props 选项并拉取负责人、业务类型 */
180
+ /** Sync props options and fetch owner and business type data */
181
181
  componentDidMount() {
182
182
  this.syncCloseDateOptionsFromProps(this.props);
183
183
  this.loadOpportunityOwnerOptions();
184
184
  this.loadBusinessTypeOptions();
185
185
  }
186
186
 
187
- /** props.closeDateOptions 变化时同步本地选项 */
187
+ /** Sync local options when props.closeDateOptions changes */
188
188
  componentWillReceiveProps(nextProps: FilterBarProps) {
189
189
  if (nextProps.closeDateOptions !== this.props.closeDateOptions) {
190
190
  this.syncCloseDateOptionsFromProps(nextProps);
@@ -206,7 +206,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
206
206
  }
207
207
  }
208
208
 
209
- /** defaultBusiType 配置变更时,在已加载的下拉数据中重新匹配默认业务类型 */
209
+ /** Re-match default business type from loaded dropdown data when defaultBusiType config changes */
210
210
  syncDefaultBusinessTypeFromProps(props: FilterBarProps) {
211
211
  const { businessTypeOptions } = this.state;
212
212
  if (!businessTypeOptions.length) return;
@@ -222,7 +222,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
222
222
  );
223
223
  }
224
224
 
225
- /** props 更新 Close Date 选项并校正当前选中值 */
225
+ /** Update Close Date options from props and correct current selected value */
226
226
  syncCloseDateOptionsFromProps(props: FilterBarProps) {
227
227
  const next = normalizeOptions(
228
228
  props.closeDateOptions && props.closeDateOptions.length > 0
@@ -252,7 +252,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
252
252
  });
253
253
  }
254
254
 
255
- /** state 组装对外事件 / 回调用的 payload */
255
+ /** Build payload from state for external events / callbacks */
256
256
  buildPayload(): FilterBarChangePayload {
257
257
  const {
258
258
  values,
@@ -290,7 +290,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
290
290
  };
291
291
  }
292
292
 
293
- /** 打日志、触发 onValuesChange 与设计器事件 */
293
+ /** Log, trigger onValuesChange and designer event */
294
294
  emitChange() {
295
295
  const payload = this.buildPayload();
296
296
  console.log('[FilterBar__c] filters change', payload);
@@ -303,20 +303,20 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
303
303
  });
304
304
 
305
305
  /*
306
- console.log('触发了一个广播事件 updateFilterData:', payload);
306
+ console.log('Triggered a broadcast event updateFilterData:', payload);
307
307
  NeoEvent.broadcast('updateFilterData', payload);
308
308
  */
309
309
  }
310
310
 
311
- /** 设计器事件:筛选条件变化(含自定义区间) */
311
+ /** Designer event: filter conditions changed (including custom date range) */
312
312
  @NeoEvent.dispatch
313
313
  onFiltersChange(eventData?: FilterBarEventData) {}
314
314
 
315
- /** 请求 user 实体,填充 Opportunity Owner 下拉 */
315
+ /** Fetch user entity to populate Opportunity Owner dropdown */
316
316
  async loadOpportunityOwnerOptions() {
317
317
  this.setState({ ownerLoading: true });
318
318
  const currentUser = Object.assign({}, this.props.data?.__NeoCurrentUser);
319
- // 给当前用户增加标记
319
+ // Add marker to current user
320
320
  if (
321
321
  currentUser &&
322
322
  currentUser.name &&
@@ -348,7 +348,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
348
348
  ]);
349
349
  } else {
350
350
  console.warn(
351
- 'FilterBar xObject.query(user) 非成功:',
351
+ 'FilterBar xObject.query(user) not successful:',
352
352
  result?.msg ?? result,
353
353
  );
354
354
  opportunityOwnerOptions =
@@ -375,7 +375,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
375
375
  },
376
376
  );
377
377
  } catch (e) {
378
- console.error('FilterBar 加载负责人(user)失败:', e);
378
+ console.error('FilterBar failed to load owner (user):', e);
379
379
  const fallbackOptions =
380
380
  parseUserRecordsToOwnerOptions(currentUserRecords);
381
381
  const defaultOwnerIds = getDefaultOpportunityOwnerIds(this.props);
@@ -400,7 +400,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
400
400
  }
401
401
  }
402
402
 
403
- /** 请求商机业务类型接口,填充 Business Type 下拉 */
403
+ /** Fetch opportunity business type API to populate Business Type dropdown */
404
404
  async loadBusinessTypeOptions() {
405
405
  this.setState({ businessTypeLoading: true });
406
406
  try {
@@ -428,12 +428,12 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
428
428
  },
429
429
  );
430
430
  } catch (e) {
431
- console.error('FilterBar 加载业务类型失败:', e);
431
+ console.error('FilterBar failed to load business types:', e);
432
432
  this.setState({ businessTypeLoading: false, businessTypeOptions: [] });
433
433
  }
434
434
  }
435
435
 
436
- /** 合并 values 子集并通知变更 */
436
+ /** Merge values subset and notify change */
437
437
  patchValues(patch: Partial<FilterValues>) {
438
438
  this.setState(
439
439
  (prev) =>
@@ -444,7 +444,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
444
444
  );
445
445
  }
446
446
 
447
- /** Close Date 下拉变更;非 custom 时按编码写入相对周期的起止时间戳及起点到 changesSinceCustomTime */
447
+ /** Close Date dropdown change; for non-custom, write relative period start/end timestamps and start to changesSinceCustomTime */
448
448
  handleCloseDateChange(value: number | string) {
449
449
  if (String(value).toLowerCase() !== 'custom') {
450
450
  const relativeRange = relativeCloseDateRangeFromCode(value);
@@ -478,7 +478,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
478
478
  );
479
479
  }
480
480
 
481
- /** Changes Since 下拉变更;非 Custom Close Date 为相对周期时同步起点时间戳 */
481
+ /** Changes Since dropdown change; for non-Custom with relative Close Date period, sync start timestamp */
482
482
  handleChangesSinceChange(value: string | number) {
483
483
  if (value !== 'Custom') {
484
484
  const closeDate = this.state.values.closeDate;
@@ -505,20 +505,20 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
505
505
  );
506
506
  }
507
507
 
508
- /** Close Date 自定义 RangePicker:写入时间戳区间 */
508
+ /** Close Date custom RangePicker: write timestamp range */
509
509
  handleCloseDateRangeChange(dates: any) {
510
510
  const closeDateCustomRange = momentRangeToTimestamps(dates);
511
511
  this.setState({ closeDateCustomRange }, () => this.emitChange());
512
512
  }
513
513
 
514
- /** Changes Since 自定义 DatePicker:写入当日 0 点时间戳 */
514
+ /** Changes Since custom DatePicker: write midnight timestamp */
515
515
  handleChangesSinceTimeChange(date: Moment | null) {
516
516
  const changesSinceCustomTime =
517
517
  date != null ? moment(date).startOf('day').valueOf() : null;
518
518
  this.setState({ changesSinceCustomTime }, () => this.emitChange());
519
519
  }
520
520
 
521
- /** state.closeDateCustomRange RangePicker 受控值 */
521
+ /** state.closeDateCustomRange -> RangePicker controlled value */
522
522
  closeDateRangePickerValue(): [Moment | null, Moment | null] | null {
523
523
  const r = this.state.closeDateCustomRange;
524
524
  if (!r || (r.start == null && r.end == null)) return null;
@@ -528,20 +528,20 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
528
528
  ];
529
529
  }
530
530
 
531
- /** state.changesSinceCustomTime DatePicker 受控值 */
531
+ /** state.changesSinceCustomTime -> DatePicker controlled value */
532
532
  changesSinceDatePickerValue(): Moment | null {
533
533
  const t = this.state.changesSinceCustomTime;
534
534
  if (t == null) return null;
535
535
  return moment(t);
536
536
  }
537
537
 
538
- /** 动作流 / 外部调用:返回当前筛选快照 */
538
+ /** Action flow / external call: return current filter snapshot */
539
539
  @NeoEvent.function
540
540
  getFilters(): FilterBarChangePayload {
541
541
  return this.buildPayload();
542
542
  }
543
543
 
544
- /** 动作流:恢复默认并清空自定义区间后通知 */
544
+ /** Action flow: reset to defaults and clear custom ranges, then notify */
545
545
  @NeoEvent.function
546
546
  resetFilters() {
547
547
  const { closeDateOptions, changesSinceOptions } = this.state;
@@ -565,7 +565,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
565
565
  );
566
566
  }
567
567
 
568
- /** Close Date + 自定义日期区间 */
568
+ /** Close Date + custom date range */
569
569
  renderCloseDateBlock() {
570
570
  const { closeDateOptions, values } = this.state;
571
571
  const showCustom = String(values.closeDate).toLowerCase() === 'custom';
@@ -666,7 +666,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
666
666
  );
667
667
  }
668
668
 
669
- /** Changes Since + Custom 时单个日期 */
669
+ /** Changes Since + single date when Custom */
670
670
  renderChangesSinceBlock() {
671
671
  const { changesSinceOptions, values } = this.state;
672
672
  const showCustom = values.changesSince === 'Custom';
@@ -679,7 +679,8 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
679
679
  <span className="help-tip">
680
680
  ?
681
681
  <span className="help-tip-text">
682
- 相对报表周期的变更起始时间;Custom 时可自选日期
682
+ Changes Since custom: start time relative to the report period;
683
+ select a date when Custom
683
684
  </span>
684
685
  </span>
685
686
  </label>
@@ -707,7 +708,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
707
708
  );
708
709
  }
709
710
 
710
- /** 筛选栏根布局 */
711
+ /** Filter bar root layout */
711
712
  render() {
712
713
  const { className, style } = this.props;
713
714
  console.log('[FilterBar__c] render', this.props);
@@ -716,7 +717,7 @@ class FilterBar extends BaseCmp<FilterBarProps, FilterBarState> {
716
717
  <div
717
718
  className={`filterBar__c ${className || ''}`}
718
719
  style={style}
719
- data-time="2026.4.15 01"
720
+ data-time="2026.4.17 01"
720
721
  >
721
722
  {this.renderCloseDateBlock()}
722
723
  {this.renderOwnerBlock()}