jmash-core-mp 0.1.13 → 0.1.14

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 (150) hide show
  1. package/.editorconfig +9 -9
  2. package/README.md +60 -60
  3. package/babel.config.json +34 -34
  4. package/eslint.config.mjs +7 -7
  5. package/lib/api/auth/index.d.ts +21 -21
  6. package/lib/api/auth/index.js +187 -187
  7. package/lib/api/auth/types.d.ts +86 -86
  8. package/lib/api/auth/types.js +9 -9
  9. package/lib/api/cms/index.d.ts +20 -20
  10. package/lib/api/cms/index.js +161 -161
  11. package/lib/api/cms/types.d.ts +200 -198
  12. package/lib/api/cms/types.js +1 -1
  13. package/lib/api/constant.d.ts +5 -5
  14. package/lib/api/constant.js +6 -6
  15. package/lib/api/dict/index.d.ts +18 -18
  16. package/lib/api/dict/index.js +34 -34
  17. package/lib/api/dict/types.d.ts +28 -28
  18. package/lib/api/dict/types.js +1 -1
  19. package/lib/api/dicts.d.ts +18 -18
  20. package/lib/api/dicts.js +67 -67
  21. package/lib/api/files/index.d.ts +25 -25
  22. package/lib/api/files/index.js +131 -131
  23. package/lib/api/files/types.d.ts +38 -38
  24. package/lib/api/files/types.js +1 -1
  25. package/lib/api/index.d.ts +4 -4
  26. package/lib/api/index.js +6 -6
  27. package/lib/api/myorgan/types.d.ts +22 -22
  28. package/lib/api/myorgan/types.js +1 -1
  29. package/lib/api/region/index.d.ts +7 -7
  30. package/lib/api/region/index.js +19 -19
  31. package/lib/api/region/types.d.ts +19 -19
  32. package/lib/api/region/types.js +1 -1
  33. package/lib/api/storage/index.d.ts +10 -10
  34. package/lib/api/storage/index.js +40 -40
  35. package/lib/api/storage/types.d.ts +28 -28
  36. package/lib/api/storage/types.js +1 -1
  37. package/lib/api/types.d.ts +41 -41
  38. package/lib/api/types.js +1 -1
  39. package/lib/app.mpx.d.ts +1 -1
  40. package/lib/components/auth-user/jmash-update-user.mpx.d.ts +1 -1
  41. package/lib/components/auth-user/jmash-user.mpx.d.ts +1 -1
  42. package/lib/components/cms/cms-acticle-list.mpx.d.ts +1 -0
  43. package/lib/components/cms/jmash-cms-acticle-list.mpx.d.ts +1 -1
  44. package/lib/components/cms/jmash-cms-article-item.mpx.d.ts +1 -0
  45. package/lib/components/cms/jmash-cms-article-view.mpx.d.ts +1 -0
  46. package/lib/components/cms/jmash-cms-article.mpx.d.ts +1 -1
  47. package/lib/components/cms/jmash-cms-like.mpx.d.ts +1 -0
  48. package/lib/components/core/jmash-login.mpx.d.ts +1 -1
  49. package/lib/index.d.ts +21 -21
  50. package/lib/index.js +14 -14
  51. package/lib/packages/pages/cms/cms-article-list.mpx.d.ts +1 -0
  52. package/lib/store/user.d.ts +31 -31
  53. package/lib/store/user.js +224 -224
  54. package/lib/types/core.d.ts +41 -41
  55. package/lib/types/core.js +1 -1
  56. package/lib/utils/common.d.ts +35 -35
  57. package/lib/utils/common.js +163 -163
  58. package/lib/utils/config.d.ts +3 -3
  59. package/lib/utils/config.js +30 -30
  60. package/lib/utils/db.d.ts +21 -21
  61. package/lib/utils/db.js +84 -84
  62. package/lib/utils/grpc.d.ts +5 -5
  63. package/lib/utils/grpc.js +20 -20
  64. package/lib/utils/net.d.ts +7 -7
  65. package/lib/utils/net.js +15 -15
  66. package/lib/utils/request.d.ts +2 -2
  67. package/lib/utils/request.js +122 -122
  68. package/mpx.config.js +27 -27
  69. package/package.json +1 -1
  70. package/postcss.config.js +11 -11
  71. package/project.config.json +24 -24
  72. package/project.private.config.json +13 -13
  73. package/public/index.html +15 -15
  74. package/src/api/auth/index.ts +215 -215
  75. package/src/api/auth/types.ts +166 -166
  76. package/src/api/cms/index.ts +218 -218
  77. package/src/api/cms/types.ts +379 -375
  78. package/src/api/constant.ts +6 -6
  79. package/src/api/dict/index.ts +44 -44
  80. package/src/api/dict/types.ts +49 -49
  81. package/src/api/dicts.ts +72 -72
  82. package/src/api/files/index.ts +159 -159
  83. package/src/api/files/types.ts +67 -67
  84. package/src/api/index.ts +11 -11
  85. package/src/api/myorgan/types.ts +42 -42
  86. package/src/api/region/index.ts +23 -23
  87. package/src/api/region/types.ts +36 -36
  88. package/src/api/storage/index.ts +59 -59
  89. package/src/api/storage/types.ts +54 -54
  90. package/src/api/types.ts +70 -70
  91. package/src/app.mpx +72 -72
  92. package/src/components/auth-user/jmash-logout.mpx +91 -91
  93. package/src/components/auth-user/jmash-update-user.mpx +381 -381
  94. package/src/components/auth-user/jmash-update-user.web.mpx +365 -365
  95. package/src/components/auth-user/jmash-user.mpx +356 -355
  96. package/src/components/cms/jmash-cms-acticle-list.mpx +182 -181
  97. package/src/components/cms/jmash-cms-article-item.mpx +241 -0
  98. package/src/components/cms/jmash-cms-article-view.mpx +132 -0
  99. package/src/components/cms/jmash-cms-article.mpx +68 -68
  100. package/src/components/cms/jmash-cms-like.mpx +151 -0
  101. package/src/components/common/jmash-avatar-edit.mpx +153 -153
  102. package/src/components/common/jmash-cascader-region.mpx +112 -112
  103. package/src/components/common/jmash-menu.mpx +129 -129
  104. package/src/components/common/jmash-none-data.mpx +77 -77
  105. package/src/components/common/jmash-pic-swiper.mpx +71 -71
  106. package/src/components/common/jmash-popup.mpx +137 -137
  107. package/src/components/common/jmash-search.mpx +126 -126
  108. package/src/components/common/jmash-single-btn.mpx +53 -53
  109. package/src/components/common/jmash-stepper.mpx +214 -214
  110. package/src/components/common/jmash-tab-bar.mpx +50 -50
  111. package/src/components/common/jmash-textarea.mpx +88 -88
  112. package/src/components/common/jmash-top-navigation.mpx +203 -203
  113. package/src/components/common/jmash-upload-picture.mpx +170 -170
  114. package/src/components/core/jmash-cms-protocol.mpx +66 -66
  115. package/src/components/core/jmash-login.ali.mpx +284 -284
  116. package/src/components/core/jmash-login.mpx +348 -348
  117. package/src/components/core/jmash-login.web.mpx +421 -421
  118. package/src/components/core/jmash-popup-login.ali.mpx +311 -311
  119. package/src/components/core/jmash-popup-login.mpx +415 -415
  120. package/src/components/core/jmash-popup-login.web.mpx +389 -389
  121. package/src/custom-tab-bar/index.mpx +10 -10
  122. package/src/global.d.ts +11 -11
  123. package/src/index.ts +71 -71
  124. package/src/packages/index.mpx +10 -9
  125. package/src/packages/pages/auth/cms-protocol.mpx +30 -30
  126. package/src/packages/pages/auth/login.mpx +58 -58
  127. package/src/packages/pages/auth/update-user.mpx +17 -17
  128. package/src/packages/pages/cms/cms-article-list.mpx +164 -0
  129. package/src/packages/pages/cms/cms-article.mpx +31 -31
  130. package/src/pages/basic-component.mpx +30 -30
  131. package/src/pages/half-home.mpx +58 -58
  132. package/src/pages/home.mpx +52 -49
  133. package/src/pages/index.mpx +43 -43
  134. package/src/pages/tabbar/home.mpx +71 -71
  135. package/src/pages/tabbar/my.mpx +80 -80
  136. package/src/store/user.ts +268 -268
  137. package/src/styles/index.scss +20 -20
  138. package/src/styles/vars.scss +27 -27
  139. package/src/utils/common.ts +176 -176
  140. package/src/utils/config.ts +31 -31
  141. package/src/utils/db.ts +100 -100
  142. package/src/utils/grpc.ts +21 -21
  143. package/src/utils/net.ts +18 -18
  144. package/src/utils/request.ts +134 -134
  145. package/static/ali/mini.project.json +4 -4
  146. package/static/dd/project.config.json +15 -15
  147. package/static/swan/project.swan.json +14 -14
  148. package/static/tt/project.config.json +11 -11
  149. package/static/wx/project.config.json +40 -40
  150. package/uno.config.js +9 -9
@@ -1,198 +1,200 @@
1
- export interface CmsSiteList {
2
- results: Array<CmsSiteModel>;
3
- }
4
- export interface CmsSiteKey {
5
- tenant?: string;
6
- organTenant?: string;
7
- siteId: string;
8
- }
9
- export interface CmsSiteModel {
10
- siteId?: string;
11
- siteName?: string;
12
- siteLogo?: string;
13
- keyword?: string;
14
- description?: string;
15
- contactPerson?: string;
16
- contactPhone?: string;
17
- dueTime?: string;
18
- status?: string;
19
- siteType?: string;
20
- isComment?: boolean;
21
- isCommentReview?: boolean;
22
- mobileProductPath?: string;
23
- pcProductPath?: string;
24
- channelList?: Array<CmsChannelModel>;
25
- address?: string;
26
- geoLongitude: number;
27
- geoLatitude: number;
28
- email: string;
29
- }
30
- export interface CmsChannelReq {
31
- tenant?: string;
32
- siteId?: string;
33
- alias?: string;
34
- status?: boolean;
35
- hasStatus?: boolean;
36
- isOpen?: boolean;
37
- hasIsOpen?: boolean;
38
- channelId?: string;
39
- }
40
- export interface CmsChannelList {
41
- results: Array<CmsChannelModel>;
42
- }
43
- export interface CmsChannelModel {
44
- channelId: string;
45
- siteId?: string;
46
- modelCode?: string;
47
- channelName: string;
48
- alias?: string;
49
- parentId?: string;
50
- seoTitle?: string;
51
- seoDescription?: string;
52
- status?: boolean;
53
- children?: Array<CmsChannelModel>;
54
- isOpen?: boolean;
55
- isSelect?: boolean;
56
- url: string;
57
- type?: string;
58
- }
59
- export interface CmsChannelKey {
60
- tenant?: string;
61
- channelId: string;
62
- }
63
- export interface CmsInfoPage {
64
- results: Array<CmsInfoModel>;
65
- curPage?: number;
66
- pageSize?: number;
67
- totalSize?: number;
68
- subTotalDto?: CmsInfoModelTotal;
69
- totalDto?: CmsInfoModelTotal;
70
- pageCount?: number;
71
- }
72
- export interface CmsInfoModelTotal {
73
- totalSize?: number;
74
- }
75
- export interface CmsInfoReq {
76
- tenant?: string;
77
- curPage?: number;
78
- pageSize?: number;
79
- siteId?: string;
80
- channelId?: string;
81
- channelAlias?: string;
82
- likeInfoTitle?: string;
83
- deleted?: boolean;
84
- hasStatus?: boolean;
85
- status?: string;
86
- hasIsImg?: boolean;
87
- isImg?: boolean;
88
- }
89
- export interface CmsInfoKey {
90
- tenant?: string;
91
- infoId?: string;
92
- }
93
- export interface CmsInfoModel {
94
- infoId?: string;
95
- modelCode?: string;
96
- infoTitle: string;
97
- imgUrl?: string;
98
- author?: string;
99
- intro?: string;
100
- top?: number;
101
- status?: string;
102
- publishDate?: string;
103
- dueTime?: string;
104
- channelId: Array<string>;
105
- sourceName?: string;
106
- siteId: string;
107
- }
108
- export interface CmsInfoContentReq {
109
- tenant?: string;
110
- infoId?: string;
111
- }
112
- export interface CmsInfoContentModel {
113
- imagePath?: Array<string>;
114
- videoPath?: Array<string>;
115
- contentId?: string;
116
- infoId?: string;
117
- infoContent?: string;
118
- infoType?: string;
119
- orderBy?: number;
120
- infoContentList?: {
121
- path: string;
122
- }[];
123
- }
124
- export interface CmsInfoContentList {
125
- results: Array<CmsInfoContentModel>;
126
- }
127
- export interface CmsContentInfoReq {
128
- tenant?: string;
129
- siteId?: string;
130
- channelAlias: string;
131
- }
132
- export interface CmsContentInfoModel {
133
- cmsInfo?: CmsInfoModel;
134
- infoContentResults?: Array<CmsInfoContentModel>;
135
- }
136
- export interface CmsInfoKey {
137
- tenant?: string;
138
- infoId?: string;
139
- }
140
- export interface CmsInfoContentReq {
141
- tenant?: string;
142
- infoId?: string;
143
- }
144
- export interface CmsInfoContentList {
145
- results: Array<CmsInfoContentModel>;
146
- }
147
- export interface CmsInfoFileReq {
148
- tenant?: string;
149
- infoId?: string;
150
- }
151
- export interface CmsInfoFileModel {
152
- fileId?: string;
153
- infoId?: string;
154
- fileName?: string;
155
- fileType?: string;
156
- filePath?: string;
157
- fileSize?: string;
158
- fileExt?: string;
159
- fileWidth?: number;
160
- fileHeight?: number;
161
- videoTime?: number;
162
- intro?: string;
163
- }
164
- export interface CmsInfoFileList {
165
- results: Array<CmsInfoFileModel>;
166
- }
167
- export interface FrontInteractKey {
168
- tenant?: string;
169
- interactId?: string;
170
- }
171
- export interface FrontInteractModel {
172
- interactId?: string;
173
- likeCount: number;
174
- browseCount: number;
175
- }
176
- export interface FrontLikeKey {
177
- tenant: string;
178
- relationId: string;
179
- }
180
- export interface FrontLikeCreateReq {
181
- tenant: string;
182
- requestId?: string;
183
- likeType?: string;
184
- relationId?: string;
185
- action?: boolean;
186
- }
187
- export interface FrontLikeModel {
188
- likeId?: string;
189
- }
190
- export interface FrontBrowseRecordCreateReq {
191
- tenant?: string;
192
- requestId?: string;
193
- type?: string;
194
- relationId?: string;
195
- }
196
- export interface FrontBrowseRecordModel {
197
- browseId?: string;
198
- }
1
+ export interface CmsSiteList {
2
+ results: Array<CmsSiteModel>;
3
+ }
4
+ export interface CmsSiteKey {
5
+ tenant?: string;
6
+ organTenant?: string;
7
+ siteId: string;
8
+ }
9
+ export interface CmsSiteModel {
10
+ siteId?: string;
11
+ siteName?: string;
12
+ siteLogo?: string;
13
+ keyword?: string;
14
+ description?: string;
15
+ contactPerson?: string;
16
+ contactPhone?: string;
17
+ dueTime?: string;
18
+ status?: string;
19
+ siteType?: string;
20
+ isComment?: boolean;
21
+ isCommentReview?: boolean;
22
+ mobileProductPath?: string;
23
+ pcProductPath?: string;
24
+ channelList?: Array<CmsChannelModel>;
25
+ address?: string;
26
+ geoLongitude: number;
27
+ geoLatitude: number;
28
+ email: string;
29
+ }
30
+ export interface CmsChannelReq {
31
+ tenant?: string;
32
+ siteId?: string;
33
+ alias?: string;
34
+ status?: boolean;
35
+ hasStatus?: boolean;
36
+ isOpen?: boolean;
37
+ hasIsOpen?: boolean;
38
+ channelId?: string;
39
+ }
40
+ export interface CmsChannelList {
41
+ results: Array<CmsChannelModel>;
42
+ }
43
+ export interface CmsChannelModel {
44
+ channelId: string;
45
+ siteId?: string;
46
+ modelCode?: string;
47
+ channelName: string;
48
+ alias?: string;
49
+ parentId?: string;
50
+ seoTitle?: string;
51
+ seoDescription?: string;
52
+ status?: boolean;
53
+ children?: Array<CmsChannelModel>;
54
+ isOpen?: boolean;
55
+ isSelect?: boolean;
56
+ url: string;
57
+ type?: string;
58
+ }
59
+ export interface CmsChannelKey {
60
+ tenant?: string;
61
+ channelId: string;
62
+ }
63
+ export interface CmsInfoPage {
64
+ results: Array<CmsInfoModel>;
65
+ curPage?: number;
66
+ pageSize?: number;
67
+ totalSize?: number;
68
+ subTotalDto?: CmsInfoModelTotal;
69
+ totalDto?: CmsInfoModelTotal;
70
+ pageCount?: number;
71
+ }
72
+ export interface CmsInfoModelTotal {
73
+ totalSize?: number;
74
+ }
75
+ export interface CmsInfoReq {
76
+ tenant?: string;
77
+ curPage?: number;
78
+ pageSize?: number;
79
+ siteId?: string;
80
+ channelId?: string;
81
+ channelAlias?: string;
82
+ likeInfoTitle?: string;
83
+ deleted?: boolean;
84
+ hasStatus?: boolean;
85
+ status?: string;
86
+ hasIsImg?: boolean;
87
+ isImg?: boolean;
88
+ }
89
+ export interface CmsInfoKey {
90
+ tenant?: string;
91
+ infoId?: string;
92
+ }
93
+ export interface CmsInfoModel {
94
+ infoId?: string;
95
+ modelCode?: string;
96
+ infoTitle: string;
97
+ subTitle?: string;
98
+ imgUrl?: string;
99
+ author?: string;
100
+ intro?: string;
101
+ top?: number;
102
+ status?: string;
103
+ publishDate?: string;
104
+ dueTime?: string;
105
+ channelId: Array<string>;
106
+ sourceName?: string;
107
+ siteId: string;
108
+ address?: string;
109
+ }
110
+ export interface CmsInfoContentReq {
111
+ tenant?: string;
112
+ infoId?: string;
113
+ }
114
+ export interface CmsInfoContentModel {
115
+ imagePath?: Array<string>;
116
+ videoPath?: Array<string>;
117
+ contentId?: string;
118
+ infoId?: string;
119
+ infoContent?: string;
120
+ infoType?: string;
121
+ orderBy?: number;
122
+ infoContentList?: {
123
+ path: string;
124
+ }[];
125
+ }
126
+ export interface CmsInfoContentList {
127
+ results: Array<CmsInfoContentModel>;
128
+ }
129
+ export interface CmsContentInfoReq {
130
+ tenant?: string;
131
+ siteId?: string;
132
+ channelAlias: string;
133
+ }
134
+ export interface CmsContentInfoModel {
135
+ cmsInfo?: CmsInfoModel;
136
+ infoContentResults?: Array<CmsInfoContentModel>;
137
+ }
138
+ export interface CmsInfoKey {
139
+ tenant?: string;
140
+ infoId?: string;
141
+ }
142
+ export interface CmsInfoContentReq {
143
+ tenant?: string;
144
+ infoId?: string;
145
+ }
146
+ export interface CmsInfoContentList {
147
+ results: Array<CmsInfoContentModel>;
148
+ }
149
+ export interface CmsInfoFileReq {
150
+ tenant?: string;
151
+ infoId?: string;
152
+ }
153
+ export interface CmsInfoFileModel {
154
+ fileId?: string;
155
+ infoId?: string;
156
+ fileName?: string;
157
+ fileType?: string;
158
+ filePath?: string;
159
+ fileSize?: string;
160
+ fileExt?: string;
161
+ fileWidth?: number;
162
+ fileHeight?: number;
163
+ videoTime?: number;
164
+ intro?: string;
165
+ }
166
+ export interface CmsInfoFileList {
167
+ results: Array<CmsInfoFileModel>;
168
+ }
169
+ export interface FrontInteractKey {
170
+ tenant?: string;
171
+ interactId?: string;
172
+ }
173
+ export interface FrontInteractModel {
174
+ interactId?: string;
175
+ likeCount: number;
176
+ browseCount: number;
177
+ }
178
+ export interface FrontLikeKey {
179
+ tenant: string;
180
+ relationId: string;
181
+ }
182
+ export interface FrontLikeCreateReq {
183
+ tenant: string;
184
+ requestId?: string;
185
+ likeType?: string;
186
+ relationId?: string;
187
+ action?: boolean;
188
+ }
189
+ export interface FrontLikeModel {
190
+ likeId?: string;
191
+ }
192
+ export interface FrontBrowseRecordCreateReq {
193
+ tenant?: string;
194
+ requestId?: string;
195
+ type?: string;
196
+ relationId?: string;
197
+ }
198
+ export interface FrontBrowseRecordModel {
199
+ browseId?: string;
200
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,5 +1,5 @@
1
- declare class Constant {
2
- static readonly MODULE_RBAC = "rbac";
3
- static readonly ENUM_GENDER = "jmash.protobuf.Gender";
4
- }
5
- export { Constant };
1
+ declare class Constant {
2
+ static readonly MODULE_RBAC = "rbac";
3
+ static readonly ENUM_GENDER = "jmash.protobuf.Gender";
4
+ }
5
+ export { Constant };
@@ -1,6 +1,6 @@
1
- class Constant {
2
- static MODULE_RBAC = "rbac"; // rbac
3
- // 性别
4
- static ENUM_GENDER = "jmash.protobuf.Gender";
5
- }
6
- export { Constant };
1
+ class Constant {
2
+ static MODULE_RBAC = "rbac"; // rbac
3
+ // 性别
4
+ static ENUM_GENDER = "jmash.protobuf.Gender";
5
+ }
6
+ export { Constant };
@@ -1,18 +1,18 @@
1
- import { ResponseData } from "../../api/types";
2
- import { EnumRes, DictEntryReq, DictEntryList } from "./types";
3
- declare class DictApiImpl {
4
- /**
5
- * 枚举
6
- * @param data 查询条件
7
- * @returns 返回Promise<Entry[]>的对象
8
- */
9
- enumApi(module: string, className: string, type?: number): Promise<ResponseData<EnumRes>>;
10
- /**
11
- * 普通字典
12
- * @param data 查询条件
13
- * @returns 返回Promise<Entry[]>的对象
14
- */
15
- dictEntryApi(data: DictEntryReq): Promise<ResponseData<DictEntryList>>;
16
- }
17
- declare const dictApi: DictApiImpl;
18
- export { dictApi };
1
+ import { ResponseData } from "../../api/types";
2
+ import { EnumRes, DictEntryReq, DictEntryList } from "./types";
3
+ declare class DictApiImpl {
4
+ /**
5
+ * 枚举
6
+ * @param data 查询条件
7
+ * @returns 返回Promise<Entry[]>的对象
8
+ */
9
+ enumApi(module: string, className: string, type?: number): Promise<ResponseData<EnumRes>>;
10
+ /**
11
+ * 普通字典
12
+ * @param data 查询条件
13
+ * @returns 返回Promise<Entry[]>的对象
14
+ */
15
+ dictEntryApi(data: DictEntryReq): Promise<ResponseData<DictEntryList>>;
16
+ }
17
+ declare const dictApi: DictApiImpl;
18
+ export { dictApi };
@@ -1,34 +1,34 @@
1
- import { config } from "../../utils/config";
2
- import mpx from "@mpxjs/core";
3
- class DictApiImpl {
4
- /**
5
- * 枚举
6
- * @param data 查询条件
7
- * @returns 返回Promise<Entry[]>的对象
8
- */
9
- enumApi(module, className, type) {
10
- const data = { className, type };
11
- return mpx.xfetch.fetch({
12
- url: "/v1/" + module + "/enum/entry",
13
- method: "GET",
14
- data,
15
- });
16
- }
17
- /**
18
- * 普通字典
19
- * @param data 查询条件
20
- * @returns 返回Promise<Entry[]>的对象
21
- */
22
- dictEntryApi(data) {
23
- if (data) {
24
- data.hasEnable = data.enable !== undefined;
25
- }
26
- return mpx.xfetch.fetch({
27
- url: "/v1/dict/dict_entry/list/" + config.tenant,
28
- method: "GET",
29
- data,
30
- });
31
- }
32
- }
33
- const dictApi = new DictApiImpl();
34
- export { dictApi };
1
+ import { config } from "../../utils/config";
2
+ import mpx from "@mpxjs/core";
3
+ class DictApiImpl {
4
+ /**
5
+ * 枚举
6
+ * @param data 查询条件
7
+ * @returns 返回Promise<Entry[]>的对象
8
+ */
9
+ enumApi(module, className, type) {
10
+ const data = { className, type };
11
+ return mpx.xfetch.fetch({
12
+ url: "/v1/" + module + "/enum/entry",
13
+ method: "GET",
14
+ data,
15
+ });
16
+ }
17
+ /**
18
+ * 普通字典
19
+ * @param data 查询条件
20
+ * @returns 返回Promise<Entry[]>的对象
21
+ */
22
+ dictEntryApi(data) {
23
+ if (data) {
24
+ data.hasEnable = data.enable !== undefined;
25
+ }
26
+ return mpx.xfetch.fetch({
27
+ url: "/v1/dict/dict_entry/list/" + config.tenant,
28
+ method: "GET",
29
+ data,
30
+ });
31
+ }
32
+ }
33
+ const dictApi = new DictApiImpl();
34
+ export { dictApi };
@@ -1,28 +1,28 @@
1
- export interface Entry {
2
- key?: string;
3
- value?: string;
4
- }
5
- export interface EnumEntryReq {
6
- className?: string;
7
- type?: number;
8
- }
9
- export interface EnumRes {
10
- values: Array<Entry>;
11
- }
12
- export interface DictEntryModel {
13
- typeCode?: string;
14
- dictCode?: string;
15
- dictName?: string;
16
- listOrder?: number;
17
- enable?: boolean;
18
- description?: string;
19
- }
20
- export interface DictEntryList {
21
- results: Array<DictEntryModel>;
22
- }
23
- export interface DictEntryReq {
24
- typeCode?: string;
25
- dictCode?: string;
26
- hasEnable?: boolean;
27
- enable?: boolean;
28
- }
1
+ export interface Entry {
2
+ key?: string;
3
+ value?: string;
4
+ }
5
+ export interface EnumEntryReq {
6
+ className?: string;
7
+ type?: number;
8
+ }
9
+ export interface EnumRes {
10
+ values: Array<Entry>;
11
+ }
12
+ export interface DictEntryModel {
13
+ typeCode?: string;
14
+ dictCode?: string;
15
+ dictName?: string;
16
+ listOrder?: number;
17
+ enable?: boolean;
18
+ description?: string;
19
+ }
20
+ export interface DictEntryList {
21
+ results: Array<DictEntryModel>;
22
+ }
23
+ export interface DictEntryReq {
24
+ typeCode?: string;
25
+ dictCode?: string;
26
+ hasEnable?: boolean;
27
+ enable?: boolean;
28
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,18 +1,18 @@
1
- import { Entry, DictEntryModel } from "./dict/types";
2
- export declare class EnumDict {
3
- module: string;
4
- enumClass: string;
5
- type: number;
6
- values: Entry[];
7
- constructor(module: string, enumClass: string, type?: number);
8
- useEnumValues(): Promise<Entry[]>;
9
- getEnumValue(key: string): string;
10
- }
11
- export declare class EntryDict {
12
- typeCode: string;
13
- enable?: boolean;
14
- values: DictEntryModel[];
15
- constructor(typeCode: string, enable?: boolean);
16
- useDictValues(): Promise<DictEntryModel[]>;
17
- getDictValue(key: string): string;
18
- }
1
+ import { Entry, DictEntryModel } from "./dict/types";
2
+ export declare class EnumDict {
3
+ module: string;
4
+ enumClass: string;
5
+ type: number;
6
+ values: Entry[];
7
+ constructor(module: string, enumClass: string, type?: number);
8
+ useEnumValues(): Promise<Entry[]>;
9
+ getEnumValue(key: string): string;
10
+ }
11
+ export declare class EntryDict {
12
+ typeCode: string;
13
+ enable?: boolean;
14
+ values: DictEntryModel[];
15
+ constructor(typeCode: string, enable?: boolean);
16
+ useDictValues(): Promise<DictEntryModel[]>;
17
+ getDictValue(key: string): string;
18
+ }