cloudcc-cli 2.2.2 → 2.2.4

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 (174) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/README.md +47 -0
  3. package/bin/cc.js +11 -35
  4. package/bin/index.js +33 -0
  5. package/bin/mcp-svc.js +13 -0
  6. package/bin/mcp.js +18 -0
  7. package/java/com/cloudcc/core/TriggerInvoker.java +17 -1
  8. package/package.json +16 -7
  9. package/pom.xml +1 -0
  10. package/prompt/DevelopmentEnvironmentConstruction.ts +133 -0
  11. package/prompt/ccdk.ts +1190 -0
  12. package/prompt/ccprompt.ts +8 -0
  13. package/prompt/cloudccdev.ts +109 -0
  14. package/prompt/index.ts +52 -0
  15. package/prompt/objectInfo.ts +94 -0
  16. package/prompt/objectList.ts +25 -0
  17. package/prompt/openapi.ts +310 -0
  18. package/prompt/system.ts +14 -0
  19. package/prompt/vscodeExtension.ts +27 -0
  20. package/src/approval/approve.js +105 -0
  21. package/src/approval/get.js +245 -0
  22. package/src/approval/index.js +11 -0
  23. package/src/approval/reject.js +105 -0
  24. package/src/brief/get.js +51 -0
  25. package/src/brief/index.js +7 -0
  26. package/src/config/get.js +1 -1
  27. package/src/fields/create.js +204 -0
  28. package/src/fields/fields/A.js +23 -0
  29. package/src/fields/fields/AD.js +25 -0
  30. package/src/fields/fields/B.js +28 -0
  31. package/src/fields/fields/C.js +28 -0
  32. package/src/fields/fields/D.js +27 -0
  33. package/src/fields/fields/E.js +28 -0
  34. package/src/fields/fields/ENC.js +28 -0
  35. package/src/fields/fields/ENCD.js +28 -0
  36. package/src/fields/fields/F.js +27 -0
  37. package/src/fields/fields/FL.js +25 -0
  38. package/src/fields/fields/H.js +27 -0
  39. package/src/fields/fields/IMG.js +27 -0
  40. package/src/fields/fields/J.js +26 -0
  41. package/src/fields/fields/L.js +32 -0
  42. package/src/fields/fields/LT.js +28 -0
  43. package/src/fields/fields/M.js +29 -0
  44. package/src/fields/fields/MR.js +24 -0
  45. package/src/fields/fields/N.js +30 -0
  46. package/src/fields/fields/P.js +28 -0
  47. package/src/fields/fields/Q.js +35 -0
  48. package/src/fields/fields/S.js +30 -0
  49. package/src/fields/fields/SCORE.js +24 -0
  50. package/src/fields/fields/T.js +27 -0
  51. package/src/fields/fields/U.js +28 -0
  52. package/src/fields/fields/X.js +28 -0
  53. package/src/fields/fields/Y.js +33 -0
  54. package/src/fields/get.js +36 -0
  55. package/src/fields/index.js +9 -0
  56. package/src/mcp/MCP/345/234/272/346/231/257/346/250/241/346/213/237.md +8 -0
  57. package/src/mcp/index-sse-svc.js +126 -0
  58. package/src/mcp/index-streamable-svc.js +180 -0
  59. package/src/mcp/index.js +631 -0
  60. package/src/mcp/readme.md +137 -0
  61. package/src/mcp/tools/Approval/handler.js +349 -0
  62. package/src/mcp/tools/Class Creator/handler.js +37 -0
  63. package/src/mcp/tools/Class Detail Retriever/handler.js +33 -0
  64. package/src/mcp/tools/Class Detail Retriever/prompt.js +37 -0
  65. package/src/mcp/tools/Class Editor Guide/handler.js +72 -0
  66. package/src/mcp/tools/Class Editor Guide/prompt.js +468 -0
  67. package/src/mcp/tools/Class List Retriever/handler.js +36 -0
  68. package/src/mcp/tools/Class Publisher/handler.js +29 -0
  69. package/src/mcp/tools/Class Publisher/prompt.js +40 -0
  70. package/src/mcp/tools/Class Puller/handler.js +86 -0
  71. package/src/mcp/tools/Class Puller/prompt.js +49 -0
  72. package/src/mcp/tools/Client Script Creator/handler.js +179 -0
  73. package/src/mcp/tools/Client Script Detail Retriever/handler.js +53 -0
  74. package/src/mcp/tools/Client Script Editor Guide/handler.js +633 -0
  75. package/src/mcp/tools/Client Script List Retriever/handler.js +68 -0
  76. package/src/mcp/tools/Client Script Publisher/handler.js +54 -0
  77. package/src/mcp/tools/Client Script Puller/handler.js +73 -0
  78. package/src/mcp/tools/CloudCC Development Overview/handler.js +48 -0
  79. package/src/mcp/tools/CloudCC Development Overview/prompt.js +870 -0
  80. package/src/mcp/tools/Component Creator/handler.js +44 -0
  81. package/src/mcp/tools/Component Detail Retriever/handler.js +38 -0
  82. package/src/mcp/tools/Component Editor Guide/handler.js +76 -0
  83. package/src/mcp/tools/Component Editor Guide/prompt.js +519 -0
  84. package/src/mcp/tools/Component List Retriever/handler.js +43 -0
  85. package/src/mcp/tools/Component Publisher/handler.js +18 -0
  86. package/src/mcp/tools/Component Publisher/prompt.js +659 -0
  87. package/src/mcp/tools/Component Puller/handler.js +63 -0
  88. package/src/mcp/tools/Dev Environment Creator/fetcher.js +500 -0
  89. package/src/mcp/tools/Dev Environment Creator/handler.js +92 -0
  90. package/src/mcp/tools/Dev Environment Creator/prompt.js +273 -0
  91. package/src/mcp/tools/Dev Environment Validator/handler.js +88 -0
  92. package/src/mcp/tools/Dev Environment Validator/prompt.js +193 -0
  93. package/src/mcp/tools/Developer Key Setup Guide/fetcher.js +278 -0
  94. package/src/mcp/tools/Developer Key Setup Guide/handler.js +43 -0
  95. package/src/mcp/tools/Developer Key Setup Guide/prompt.js +71 -0
  96. package/src/mcp/tools/Object Creator/handler.js +34 -0
  97. package/src/mcp/tools/Object Fields Creator/handler.js +64 -0
  98. package/src/mcp/tools/Object Fields Retriever/handler.js +37 -0
  99. package/src/mcp/tools/Object Fields Retriever/prompt.js +10 -0
  100. package/src/mcp/tools/Object List Retriever/handler.js +43 -0
  101. package/src/mcp/tools/Object List Retriever/prompt.js +10 -0
  102. package/src/mcp/tools/Scheduled Class Creator/handler.js +37 -0
  103. package/src/mcp/tools/Scheduled Class Detail Retriever/handler.js +34 -0
  104. package/src/mcp/tools/Scheduled Class List Retriever/handler.js +52 -0
  105. package/src/mcp/tools/Scheduled Class Publisher/handler.js +30 -0
  106. package/src/mcp/tools/Scheduled Class Puller/handler.js +92 -0
  107. package/src/mcp/tools/Trigger Creator/handler.js +53 -0
  108. package/src/mcp/tools/Trigger Detail Retriever/handler.js +33 -0
  109. package/src/mcp/tools/Trigger Editor Guide/handler.js +58 -0
  110. package/src/mcp/tools/Trigger List Retriever/handler.js +49 -0
  111. package/src/mcp/tools/Trigger Publisher/handler.js +34 -0
  112. package/src/mcp/tools/Trigger Puller/handler.js +40 -0
  113. package/src/mcp/tools/ccdk/fetcher.js +18 -0
  114. package/src/mcp/tools/ccdk/handler.js +98 -0
  115. package/src/mcp/tools/ccdk/prompt.js +453 -0
  116. package/src/mcp/tools/index.js +23 -0
  117. package/src/object/create.js +105 -0
  118. package/src/object/get.js +43 -4
  119. package/src/object/index.js +2 -1
  120. package/src/plugin/create.js +1 -2
  121. package/src/plugin/create1.js +9 -9
  122. package/src/plugin/detail.js +91 -0
  123. package/src/plugin/get.js +79 -0
  124. package/src/plugin/index.js +4 -1
  125. package/src/plugin/publish.js +13 -13
  126. package/src/plugin/publish1.js +33 -24
  127. package/src/plugin/pull.js +173 -0
  128. package/src/project/create.js +9 -9
  129. package/src/project/create1.js +31 -17
  130. package/src/recordType/get.js +4 -2
  131. package/src/script/create.js +7 -7
  132. package/src/script/detail.js +95 -0
  133. package/src/script/get.js +4 -2
  134. package/src/script/index.js +1 -0
  135. package/src/script/publish.js +14 -14
  136. package/src/script/pull.js +12 -12
  137. package/src/script/pullList.js +5 -3
  138. package/src/timer/create.js +7 -7
  139. package/src/timer/detail.js +84 -0
  140. package/src/timer/get.js +6 -3
  141. package/src/timer/publish.js +7 -7
  142. package/src/timer/pull.js +8 -8
  143. package/src/timer/pullList.js +5 -3
  144. package/src/token/get.js +1 -1
  145. package/src/triggers/create.js +7 -7
  146. package/src/triggers/detail.js +90 -0
  147. package/src/triggers/get.js +4 -2
  148. package/src/triggers/index.js +1 -0
  149. package/src/triggers/publish.js +7 -7
  150. package/src/triggers/pull.js +8 -8
  151. package/src/triggers/pullList.js +5 -3
  152. package/src/version/get.js +3 -3
  153. package/target/ccopenapi-0.0.3-classes.jar +0 -0
  154. package/target/ccopenapi-0.0.3.jar +0 -0
  155. package/target/maven-archiver/pom.properties +3 -0
  156. package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +18 -0
  157. package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +19 -0
  158. package/template/Appvue +452 -12
  159. package/template/index.js +30 -19
  160. package/tool/branch/index.js +1 -1
  161. package/tool/checkLange/checkLang.js +6 -6
  162. package/tool/checkLange/clearLang.js +1 -1
  163. package/utils/accessClass.js +23 -0
  164. package/utils/checkVersion.js +22 -20
  165. package/utils/config.js +18 -3
  166. package/utils/http.js +10 -10
  167. package/utils/utils.js +128 -40
  168. package/java/com/cloudcc/core/CCTriggerDemo.java +0 -25
  169. package/src/classes/create.js +0 -65
  170. package/src/classes/get.js +0 -21
  171. package/src/classes/index.js +0 -11
  172. package/src/classes/publish.js +0 -50
  173. package/src/classes/pull.js +0 -54
  174. package/src/classes/pullList.js +0 -44
@@ -0,0 +1,204 @@
1
+ const { postClass } = require("../../utils/http")
2
+ const { getPackageJson } = require("../../utils/config");
3
+ const chalk = require('chalk')
4
+ const briefGet = require("../brief/get");
5
+ const { labelToSlug } = require("../../utils/utils");
6
+ const S = require("./fields/S");
7
+ const U = require("./fields/U");
8
+ const SCORE = require("./fields/SCORE");
9
+ const IMG = require("./fields/IMG");
10
+ const P = require("./fields/P");
11
+ const C = require("./fields/C");
12
+ const J = require("./fields/J");
13
+ const H = require("./fields/H");
14
+ const E = require("./fields/E");
15
+ const B = require("./fields/B");
16
+ const A = require("./fields/A");
17
+ const D = require("./fields/D");
18
+ const F = require("./fields/F");
19
+ const T = require("./fields/T");
20
+ const N = require("./fields/N");
21
+ const ENC = require("./fields/ENC");
22
+ const ENCD = require("./fields/ENCD");
23
+ const X = require("./fields/X");
24
+ const L = require("./fields/L");
25
+ const Q = require("./fields/Q");
26
+ const AD = require("./fields/AD");
27
+ const LT = require("./fields/LT");
28
+ const FL = require("./fields/FL");
29
+ const Y = require("./fields/Y");
30
+ const MR = require("./fields/MR");
31
+ const M = require("./fields/M");
32
+
33
+ /**
34
+ * 创建字段
35
+ * @param {Array} argvs - 命令行参数数组
36
+ * @returns {Promise<Object>} 保存结果
37
+ */
38
+ async function create(argvs) {
39
+ try {
40
+ let fieldData = null;
41
+ let projectPath = argvs[2];
42
+ const config = await getPackageJson(projectPath);
43
+ let fieldType = argvs[3];
44
+ let objid = argvs[4];
45
+ let nameLabel = argvs[5];
46
+ console.error(chalk.blue('\nCreating field ' + nameLabel + '...'));
47
+ if (fieldType == "S") {
48
+ const slug = labelToSlug(nameLabel);
49
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
50
+ let briefData = await briefGet(argvs);
51
+ fieldData = S(objid, nameLabel, apiname, briefData.data);
52
+ } else if (fieldType == "U") {
53
+ const slug = labelToSlug(nameLabel);
54
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
55
+ let briefData = await briefGet(argvs);
56
+ fieldData = U(objid, nameLabel, apiname, briefData.data);
57
+ } else if (fieldType == "SCORE") {
58
+ const slug = labelToSlug(nameLabel);
59
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
60
+ let briefData = await briefGet(argvs);
61
+ fieldData = SCORE(objid, nameLabel, apiname, briefData.data);
62
+ } else if (fieldType == "IMG") {
63
+ const slug = labelToSlug(nameLabel);
64
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
65
+ let briefData = await briefGet(argvs);
66
+ fieldData = IMG(objid, nameLabel, apiname, briefData.data);
67
+ } else if (fieldType == "P") {
68
+ const slug = labelToSlug(nameLabel);
69
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
70
+ let briefData = await briefGet(argvs);
71
+ fieldData = P(objid, nameLabel, apiname, briefData.data);
72
+ } else if (fieldType == "C") {
73
+ const slug = labelToSlug(nameLabel);
74
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
75
+ let briefData = await briefGet(argvs);
76
+ fieldData = C(objid, nameLabel, apiname, briefData.data);
77
+ } else if (fieldType == "J") {
78
+ const slug = labelToSlug(nameLabel);
79
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
80
+ let briefData = await briefGet(argvs);
81
+ fieldData = J(objid, nameLabel, apiname, briefData.data);
82
+ } else if (fieldType == "H") {
83
+ const slug = labelToSlug(nameLabel);
84
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
85
+ let briefData = await briefGet(argvs);
86
+ fieldData = H(objid, nameLabel, apiname, briefData.data);
87
+ } else if (fieldType == "E") {
88
+ const slug = labelToSlug(nameLabel);
89
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
90
+ let briefData = await briefGet(argvs);
91
+ fieldData = E(objid, nameLabel, apiname, briefData.data);
92
+ } else if (fieldType == "B") {
93
+ const slug = labelToSlug(nameLabel);
94
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
95
+ let briefData = await briefGet(argvs);
96
+ fieldData = B(objid, nameLabel, apiname, briefData.data);
97
+ } else if (fieldType == "A") {
98
+ const slug = labelToSlug(nameLabel);
99
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
100
+ let briefData = await briefGet(argvs);
101
+ fieldData = A(objid, nameLabel, apiname, briefData.data);
102
+ } else if (fieldType == "D") {
103
+ const slug = labelToSlug(nameLabel);
104
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
105
+ let briefData = await briefGet(argvs);
106
+ fieldData = D(objid, nameLabel, apiname, briefData.data);
107
+ } else if (fieldType == "F") {
108
+ const slug = labelToSlug(nameLabel);
109
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
110
+ let briefData = await briefGet(argvs);
111
+ fieldData = F(objid, nameLabel, apiname, briefData.data);
112
+ } else if (fieldType == "T") {
113
+ const slug = labelToSlug(nameLabel);
114
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
115
+ let briefData = await briefGet(argvs);
116
+ fieldData = T(objid, nameLabel, apiname, briefData.data);
117
+ } else if (fieldType == "N") {
118
+ const slug = labelToSlug(nameLabel);
119
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
120
+ let briefData = await briefGet(argvs);
121
+ fieldData = N(objid, nameLabel, apiname, briefData.data);
122
+ } else if (fieldType == "ENC") {
123
+ const slug = labelToSlug(nameLabel);
124
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
125
+ let briefData = await briefGet(argvs);
126
+ fieldData = ENC(objid, nameLabel, apiname, briefData.data);
127
+ } else if (fieldType == "ENCD") {
128
+ const slug = labelToSlug(nameLabel);
129
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
130
+ let briefData = await briefGet(argvs);
131
+ fieldData = ENCD(objid, nameLabel, apiname, briefData.data);
132
+ } else if (fieldType == "X") {
133
+ const slug = labelToSlug(nameLabel);
134
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
135
+ let briefData = await briefGet(argvs);
136
+ fieldData = X(objid, nameLabel, apiname, briefData.data);
137
+ } else if (fieldType == "L") {
138
+ const slug = labelToSlug(nameLabel);
139
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
140
+ let briefData = await briefGet(argvs);
141
+ let ptext = argvs[6];
142
+ fieldData = L(objid, nameLabel, apiname, ptext, briefData.data);
143
+ } else if (fieldType == "Q") {
144
+ const slug = labelToSlug(nameLabel);
145
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
146
+ let briefData = await briefGet(argvs);
147
+ let ptext = argvs[6];
148
+ fieldData = Q(objid, nameLabel, apiname, ptext, briefData.data);
149
+ } else if (fieldType == "AD") {
150
+ const slug = labelToSlug(nameLabel);
151
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
152
+ let briefData = await briefGet(argvs);
153
+ fieldData = AD(objid, nameLabel, apiname, briefData.data);
154
+ } else if (fieldType == "LT") {
155
+ const slug = labelToSlug(nameLabel);
156
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
157
+ let briefData = await briefGet(argvs);
158
+ fieldData = LT(objid, nameLabel, apiname, briefData.data);
159
+ } else if (fieldType == "FL") {
160
+ const slug = labelToSlug(nameLabel);
161
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
162
+ let briefData = await briefGet(argvs);
163
+ fieldData = FL(objid, nameLabel, apiname, briefData.data);
164
+ } else if (fieldType == "Y") {
165
+ const slug = labelToSlug(nameLabel);
166
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
167
+ let briefData = await briefGet(argvs);
168
+ let lookupObj = argvs[6];
169
+ fieldData = Y(objid, nameLabel, apiname, lookupObj, briefData.data);
170
+ } else if (fieldType == "MR") {
171
+ const slug = labelToSlug(nameLabel);
172
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
173
+ let briefData = await briefGet(argvs);
174
+ let lookupObj = argvs[6];
175
+ fieldData = MR(objid, nameLabel, apiname, lookupObj, briefData.data);
176
+ } else if (fieldType == "M") {
177
+ const slug = labelToSlug(nameLabel);
178
+ let apiname = `${slug}_custom_${fieldType}_field`.toLowerCase();
179
+ let briefData = await briefGet(argvs);
180
+ let lookupObj = argvs[6];
181
+ fieldData = M(objid, nameLabel, apiname, lookupObj, briefData.data);
182
+ }
183
+ // 发送请求到服务器
184
+ const result = await postClass(
185
+ config.setupSvc + "/api/fieldSetup/save",
186
+ fieldData,
187
+ config.accessToken
188
+ );
189
+
190
+ // 处理返回结果
191
+ if (result && result.result) {
192
+ console.error(chalk.green('✓ Field created successfully! ID: ' + result.data));
193
+ return true;
194
+ } else {
195
+ console.error(chalk.yellow('⚠ Field creation completed with warnings: ' + result.returnInfo));
196
+ return false;
197
+ }
198
+ } catch (error) {
199
+ console.error(chalk.red("Failed to create field: "), error.message || error);
200
+ return false;
201
+ }
202
+ }
203
+
204
+ module.exports = create;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 文本区(富文本)字段(A)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": ""
14
+ },
15
+ "dtype": "A:文本区(富文本)",
16
+ "fdtype": "A",
17
+ "profileFieldJson": profileList.map(profile => ({
18
+ "profileId": profile.id,
19
+ "visible": "true",
20
+ "readonly": "false"
21
+ })),
22
+ }
23
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 地址字段(AD)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": ""
13
+ },
14
+ "dtype": "AD:地址",
15
+ "fdtype": "AD",
16
+ "ischecked": "false",
17
+ "iscover": "",
18
+ "formulaText": "",
19
+ "profileFieldJson": profileList.map(profile => ({
20
+ "profileId": profile.id,
21
+ "visible": "true",
22
+ "readonly": "false"
23
+ })),
24
+ }
25
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 复选框字段(B)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "defaultValue": "0"
15
+ },
16
+ "dtype": "B:复选框",
17
+ "fdtype": "B",
18
+ "ischecked": "false",
19
+ "defaultValue": "0",
20
+ "iscover": "",
21
+ "formulaText": "",
22
+ "profileFieldJson": profileList.map(profile => ({
23
+ "profileId": profile.id,
24
+ "visible": "true",
25
+ "readonly": "false"
26
+ })),
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 币种字段(C)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "defaultValue": "",
14
+ "schemefieldLength": "10",
15
+ "decimalPlaces": "2"
16
+ },
17
+ "dtype": "c:币种",
18
+ "fdtype": "c",
19
+ "ischecked": "false",
20
+ "iscover": "",
21
+ "formulaText": "",
22
+ "profileFieldJson": profileList.map(profile => ({
23
+ "profileId": profile.id,
24
+ "visible": "true",
25
+ "readonly": "false"
26
+ })),
27
+ }
28
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 日期字段(D)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "defaultValue": ""
15
+ },
16
+ "dtype": "D:日期",
17
+ "fdtype": "D",
18
+ "ischecked": "false",
19
+ "iscover": "",
20
+ "formulaText": "",
21
+ "profileFieldJson": profileList.map(profile => ({
22
+ "profileId": profile.id,
23
+ "visible": "true",
24
+ "readonly": "false"
25
+ })),
26
+ }
27
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 电子邮件字段(E)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "defaultValue": "",
15
+ "isrepeat": "true"
16
+ },
17
+ "dtype": "E:电子邮件",
18
+ "fdtype": "E",
19
+ "ischecked": "false",
20
+ "iscover": "",
21
+ "formulaText": "",
22
+ "profileFieldJson": profileList.map(profile => ({
23
+ "profileId": profile.id,
24
+ "visible": "true",
25
+ "readonly": "false"
26
+ })),
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 加密文本(存储加密)字段(ENC)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "defaultValue": "",
14
+ "schemefieldLength": "255"
15
+ },
16
+ "dtype": "enc:加密文本(存储加密)",
17
+ "fdtype": "enc",
18
+ "masktype": "all",
19
+ "maskcharacter": "*",
20
+ "encrypttype": "{AAAA}{****}{AAAA}",
21
+ "profileFieldJson": profileList.map(profile => ({
22
+ "profileId": profile.id,
23
+ "visible": "true",
24
+ "readonly": "false",
25
+ "encryptvisible": "false"
26
+ })),
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 加密文本(显示加密)字段(ENCD)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "defaultValue": "",
14
+ "schemefieldLength": "255"
15
+ },
16
+ "dtype": "encd:加密文本(显示加密)",
17
+ "fdtype": "encd",
18
+ "masktype": "all",
19
+ "maskcharacter": "*",
20
+ "encrypttype": "{AAAA}{****}{AAAA}",
21
+ "profileFieldJson": profileList.map(profile => ({
22
+ "profileId": profile.id,
23
+ "visible": "true",
24
+ "readonly": "false",
25
+ "encryptvisible": "false"
26
+ })),
27
+ }
28
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 日期/时间字段(F)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "defaultValue": ""
15
+ },
16
+ "dtype": "F:日期/时间",
17
+ "fdtype": "F",
18
+ "ischecked": "false",
19
+ "iscover": "",
20
+ "formulaText": "",
21
+ "profileFieldJson": profileList.map(profile => ({
22
+ "profileId": profile.id,
23
+ "visible": "true",
24
+ "readonly": "false"
25
+ })),
26
+ }
27
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 文件字段(FL)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "defaultValue": "1",
14
+ "schemefieldLength": "255",
15
+ "isrepeat": "1"
16
+ },
17
+ "dtype": "FL:文件",
18
+ "fdtype": "FL",
19
+ "profileFieldJson": profileList.map(profile => ({
20
+ "profileId": profile.id,
21
+ "visible": "true",
22
+ "readonly": "false"
23
+ })),
24
+ }
25
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 电话字段(H)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "defaultValue": ""
15
+ },
16
+ "dtype": "H:电话",
17
+ "fdtype": "H",
18
+ "ischecked": "false",
19
+ "iscover": "",
20
+ "formulaText": "",
21
+ "profileFieldJson": profileList.map(profile => ({
22
+ "profileId": profile.id,
23
+ "visible": "true",
24
+ "readonly": "false"
25
+ })),
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 图片字段(IMG)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "defaultValue": "3"
14
+ },
15
+ "dtype": "IMG:图片",
16
+ "fdtype": "IMG",
17
+ "formulaText": "",
18
+ "formulaType": "input",
19
+ "watermarkstatus": "0",
20
+ "watermarkfield": "",
21
+ "profileFieldJson": profileList.map(profile => ({
22
+ "profileId": profile.id,
23
+ "visible": "true",
24
+ "readonly": "false"
25
+ })),
26
+ }
27
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 文本区(长)字段(J)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "schemefieldLength": "10000",
14
+ "defaultValue": "",
15
+ "placeholder": ""
16
+ },
17
+ "dtype": "J:文本区(长)",
18
+ "fdtype": "J",
19
+ "defaultValue": "",
20
+ "profileFieldJson": profileList.map(profile => ({
21
+ "profileId": profile.id,
22
+ "visible": "true",
23
+ "readonly": "false"
24
+ })),
25
+ }
26
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 选项列表(单选)字段(L)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, ptext, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "edittype": "select"
15
+ },
16
+ "dtype": "L:选项列表",
17
+ "fdtype": "L",
18
+ "ischecked": "false",
19
+ "iscover": "",
20
+ "formulaText": "",
21
+ "useGlobalSelect": "0",
22
+ "globalSelectId": "province",
23
+ "ptext": ptext,
24
+ "isPicklistSorted": "0",
25
+ "defPl": "0",
26
+ "profileFieldJson": profileList.map(profile => ({
27
+ "profileId": profile.id,
28
+ "visible": "true",
29
+ "readonly": "false"
30
+ })),
31
+ }
32
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 地理定位字段(LT)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "remark": "",
12
+ "helps": "",
13
+ "schemefieldLength": "10",
14
+ "decimalPlaces": "10"
15
+ },
16
+ "dtype": "LT:地理定位",
17
+ "fdtype": "LT",
18
+ "ischecked": "false",
19
+ "iscover": "",
20
+ "formulaText": "",
21
+ "displayType": "1",
22
+ "profileFieldJson": profileList.map(profile => ({
23
+ "profileId": profile.id,
24
+ "visible": "true",
25
+ "readonly": "false"
26
+ })),
27
+ }
28
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * 主详信息关系字段(M)配置模板
3
+ */
4
+ module.exports = function (objid, nameLabel, apiname, lookupObj, profileList) {
5
+ return {
6
+ "objid": objid,
7
+ "obj": {
8
+ "id": "",
9
+ "nameLabel": nameLabel,
10
+ "apiname": apiname,
11
+ "schemefieldLength": "255",
12
+ "remark": "",
13
+ "helps": "",
14
+ "lookupObj": lookupObj,
15
+ "childrelationName": nameLabel
16
+ },
17
+ "dtype": "M:主详信息关系",
18
+ "fdtype": "M",
19
+ "ischecked": "false",
20
+ "iscover": "",
21
+ "formulaText": "",
22
+ "mainlayoutIds": "",
23
+ "profileFieldJson": profileList.map(profile => ({
24
+ "profileId": profile.id,
25
+ "visible": "true",
26
+ "readonly": "false"
27
+ })),
28
+ }
29
+ }