neo-cmp-cli 1.13.9 → 1.13.10

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 (44) hide show
  1. package/dist/neo/neoLogin.js +1 -1
  2. package/dist/package.json.js +1 -1
  3. package/package.json +1 -1
  4. package/template/neo-web-entity-grid/src/components/createForm__c/index.tsx +9 -4
  5. package/template/neo-web-entity-grid/src/components/createForm__c/model.ts +4 -2
  6. package/template/neo-web-entity-grid/src/components/entityGrid3__c/model.ts +2 -2
  7. package/template/neo-web-entity-grid/src/components/searchForm__c/index.tsx +6 -10
  8. package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +1 -1
  9. package/template/neo-web-entity-grid/src/components/searchForm__c/style.scss +205 -229
  10. package/template/neo-web-form/.prettierrc.js +12 -0
  11. package/template/neo-web-form/@types/neo-ui-common.d.ts +36 -0
  12. package/template/neo-web-form/README.md +99 -0
  13. package/template/neo-web-form/commitlint.config.js +59 -0
  14. package/template/neo-web-form/neo.config.js +57 -0
  15. package/template/neo-web-form/package.json +66 -0
  16. package/template/neo-web-form/public/css/base.css +283 -0
  17. package/template/neo-web-form/public/scripts/app/bluebird.js +6679 -0
  18. package/template/neo-web-form/public/template.html +13 -0
  19. package/template/neo-web-form/src/assets/css/common.scss +127 -0
  20. package/template/neo-web-form/src/assets/css/mixin.scss +47 -0
  21. package/template/neo-web-form/src/assets/img/AIBtn.gif +0 -0
  22. package/template/neo-web-form/src/assets/img/NeoCRM.jpg +0 -0
  23. package/template/neo-web-form/src/assets/img/aiLogo.png +0 -0
  24. package/template/neo-web-form/src/assets/img/card-list.svg +1 -0
  25. package/template/neo-web-form/src/assets/img/contact-form.svg +1 -0
  26. package/template/neo-web-form/src/assets/img/custom-form.svg +1 -0
  27. package/template/neo-web-form/src/assets/img/custom-widget.svg +1 -0
  28. package/template/neo-web-form/src/assets/img/data-list.svg +1 -0
  29. package/template/neo-web-form/src/assets/img/detail.svg +1 -0
  30. package/template/neo-web-form/src/assets/img/favicon.png +0 -0
  31. package/template/neo-web-form/src/assets/img/map.svg +1 -0
  32. package/template/neo-web-form/src/assets/img/search.svg +1 -0
  33. package/template/neo-web-form/src/assets/img/table.svg +1 -0
  34. package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +1052 -0
  35. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +90 -0
  36. package/template/neo-web-form/src/components/batchAddTable__c/style.scss +21 -0
  37. package/template/neo-web-form/src/components/batchAddTable__c/tableModal.scss +137 -0
  38. package/template/neo-web-form/src/components/listSummary__c/index.tsx +120 -0
  39. package/template/neo-web-form/src/components/listSummary__c/model.ts +69 -0
  40. package/template/neo-web-form/src/components/listSummary__c/style.scss +40 -0
  41. package/template/neo-web-form/src/utils/axiosFetcher.ts +37 -0
  42. package/template/neo-web-form/src/utils/queryObjectData.ts +112 -0
  43. package/template/neo-web-form/src/utils/xobjects.ts +167 -0
  44. package/template/neo-web-form/tsconfig.json +39 -0
@@ -0,0 +1,167 @@
1
+ import { Toast } from 'antd-mobile';
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
+ Toast.fail('获取业务类型失败。');
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
+ Toast.fail('获取对象列表失败。');
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
+ Toast.fail('创建业务数据失败');
69
+ throw error;
70
+ }
71
+ };
72
+
73
+ // 获取业务对象描述
74
+ export const getXObjectDesc = async (xObjectApiKey: string, options?: any) => {
75
+ const curOptions = options || {};
76
+ const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/description`;
77
+ try {
78
+ const config = {
79
+ ...options,
80
+ url: apiUrl,
81
+ method: curOptions.method || 'GET',
82
+ };
83
+
84
+ const result = await axiosFetcher(config);
85
+ return result;
86
+ } catch (error) {
87
+ console.error('获取业务对象描述:', error);
88
+ Toast.fail('获取业务对象描述失败');
89
+ throw error;
90
+ }
91
+ };
92
+
93
+ // 更新业务数据
94
+ export const updateXObject = async (
95
+ xObjectApiKey: string,
96
+ objectId: string,
97
+ options: any,
98
+ ) => {
99
+ const curOptions = options || {};
100
+ const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/${objectId}`;
101
+ const formData = curOptions.data || {};
102
+ try {
103
+ const config = {
104
+ ...curOptions,
105
+ url: apiUrl,
106
+ method: curOptions.method || 'PATCH',
107
+ data: {
108
+ data: formData,
109
+ },
110
+ };
111
+
112
+ const result = await axiosFetcher(config);
113
+ return result;
114
+ } catch (error) {
115
+ console.error('更新业务数据失败:', error);
116
+ Toast.fail('更新业务数据失败');
117
+ throw error;
118
+ }
119
+ };
120
+
121
+ // 获取业务数据信息
122
+ export const getXObject = async (
123
+ xObjectApiKey: string,
124
+ objectId: string,
125
+ options?: any,
126
+ ) => {
127
+ const curOptions = options || {};
128
+ const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/${objectId}`;
129
+ try {
130
+ const config = {
131
+ ...curOptions,
132
+ url: apiUrl,
133
+ method: curOptions.method || 'GET',
134
+ };
135
+
136
+ const result = await axiosFetcher(config);
137
+ return result;
138
+ } catch (error) {
139
+ console.error('获取业务数据信息失败:', error);
140
+ Toast.fail('获取业务数据信息失败');
141
+ throw error;
142
+ }
143
+ };
144
+
145
+ // 删除业务数据
146
+ export const deleteXObject = async (
147
+ xObjectApiKey: string,
148
+ objectId: string,
149
+ options?: any,
150
+ ) => {
151
+ const curOptions = options || {};
152
+ const apiUrl = `/rest/data/v2.0/xobjects/${xObjectApiKey}/${objectId}`;
153
+ try {
154
+ const config = {
155
+ ...curOptions,
156
+ url: apiUrl,
157
+ method: curOptions.method || 'DELETE',
158
+ };
159
+
160
+ const result = await axiosFetcher(config);
161
+ return result;
162
+ } catch (error) {
163
+ console.error('删除业务数据:', error);
164
+ Toast.fail('删除业务数据失败');
165
+ throw error;
166
+ }
167
+ };
@@ -0,0 +1,39 @@
1
+ {
2
+ "compilerOptions": {
3
+ "experimentalDecorators": true,
4
+ "target": "esnext",
5
+ "module": "esnext",
6
+ "allowJs": false,
7
+ "jsx": "react", // preserve
8
+ "declaration": false,
9
+ "noEmit": false,
10
+ "importHelpers": true,
11
+ "isolatedModules": false,
12
+ "strict": false,
13
+ "noImplicitAny": true,
14
+ "strictNullChecks": true,
15
+ "noImplicitThis": true,
16
+ "noUnusedLocals": false,
17
+ "noImplicitReturns": true,
18
+ "moduleResolution": "node",
19
+ "baseUrl": "./",
20
+ "paths": {
21
+ "@": [
22
+ "./src"
23
+ ]
24
+ },
25
+ "typeRoots": [
26
+ "./@types",
27
+ "./node_modules/@types"
28
+ ],
29
+ "allowSyntheticDefaultImports": true,
30
+ "esModuleInterop": true,
31
+ "forceConsistentCasingInFileNames": true
32
+ },
33
+ "include": [
34
+ "src"
35
+ ],
36
+ "exclude": [
37
+ "node_modules"
38
+ ]
39
+ }