ap-dev 1.1.16 → 1.1.20

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.
@@ -10,7 +10,7 @@
10
10
  :props="defaultProps"
11
11
  default-expand-all
12
12
  :filter-node-method="filterNode"
13
- @node-click="handleNodeClick"
13
+ @node-click="handleNodeClick"
14
14
  />
15
15
  </div>
16
16
  </ap-aside>
@@ -23,6 +23,7 @@
23
23
 
24
24
  <script>
25
25
  import menus from './menus'
26
+ import ApiIconList from './modules/ApiIconList'
26
27
 
27
28
  // 批量导入modules下的组件
28
29
  const allComponents = require.context('./modules', false, /\.vue$/)
@@ -32,6 +33,8 @@ allComponents.keys().forEach(fileName => {
32
33
  apiComponents[fileName.replace(/^\.\/(.*)\.\w+$/, '$1')] = comp.default
33
34
  })
34
35
 
36
+ apiComponents.ApiIconList = ApiIconList
37
+
35
38
  export default {
36
39
  name: 'ApiPanel',
37
40
  components: apiComponents,
@@ -65,4 +68,4 @@ export default {
65
68
 
66
69
  <style scoped>
67
70
 
68
- </style>
71
+ </style>
@@ -35,6 +35,9 @@ const menus = [
35
35
  }, {
36
36
  id: 'ApiForm',
37
37
  label: '2.5 表单相关组件'
38
+ }, {
39
+ id: 'ApiEcharts',
40
+ label: '2.6 图表组件'
38
41
  }]
39
42
  }, {
40
43
  id: 'ApiDefault',
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <div>
3
+ <api-tittle-1>图表组件</api-tittle-1>
4
+ <api-tittle-2>一、使用方法</api-tittle-2>
5
+ <api-content>
6
+ <api-code>{{ js1 }}</api-code>
7
+
8
+ <br>echarts官方文档:
9
+ <el-link type="primary">https://echarts.apache.org/zh/option.html#title</el-link>
10
+ </api-content>
11
+ <api-tittle-2>二、参数说明</api-tittle-2>
12
+ <api-table :data="methodData" :columns="methodCols"/>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
18
+
19
+ export default {
20
+ name: 'ApiEcharts',
21
+ components: {
22
+ ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
23
+ },
24
+ data() {
25
+ const methodCols = [
26
+ { label: '名称', prop: 'name', width: '180px' },
27
+ { label: '类型', prop: 'type', width: '100px' },
28
+ { label: '默认值', prop: 'default', width: '80px' },
29
+ { label: '描述', prop: 'memo', minWidth: '100px' },
30
+ { label: '示例代码', prop: 'code', minWidth: '100px' }]
31
+ const methodData = [
32
+ {
33
+ name: 'id',
34
+ type: '字符串',
35
+ default: '时间戳',
36
+ memo: 'echarts渲染dom对应的id',
37
+ code: `<div class="api-code">id: "myId"</div>`
38
+ }, {
39
+ name: 'color',
40
+ type: '字符串',
41
+ default: '无',
42
+ memo: '图表的内置配色库<br>可选值:light、dark',
43
+ code: `<div class="api-code">color: "light"</div>`
44
+ }, {
45
+ name: '其他',
46
+ type: '',
47
+ default: '',
48
+ memo: '同echarts官方属性',
49
+ code: `<div class="api-code">let opts = {
50
+ // 自定义id
51
+ id: "myId",
52
+ // 配色
53
+ color: "light",
54
+ // ---------- echarts 官方属性示例 start ----------
55
+ xAxis: {
56
+ type: 'category',
57
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
58
+ },
59
+ yAxis: {
60
+ type: 'value'
61
+ },
62
+ series: [
63
+ {
64
+ data: [150, 230, 224, 218, 135, 147, 260],
65
+ type: 'line'
66
+ }
67
+ ]
68
+ // ---------- echarts 官方属性示例 end ----------
69
+ };</div>`
70
+ }
71
+ ]
72
+
73
+ let js1 = `// 1、定义组件
74
+ <div style="width: 500px;height: 400px;">
75
+ <ap-chart ref="barChart" :options.sync="opts"></ap-chart>
76
+ </div>
77
+ // 2、定义参数
78
+ data() {
79
+ return {
80
+ opts: {
81
+ id: "myId",
82
+ color: "light",
83
+ ...
84
+ }
85
+ }
86
+ }`
87
+ return {
88
+ methodData,
89
+ methodCols,
90
+ js1
91
+ }
92
+ },
93
+ methods: {}
94
+ }
95
+ </script>
96
+
97
+ <style scoped>
98
+ </style>
@@ -0,0 +1,433 @@
1
+ const iconGroup = [
2
+ {
3
+ name: "报表类",
4
+ icons: [
5
+ 'search',
6
+ 'fenlei',
7
+ 'fenlei2',
8
+ 'bottom-left',
9
+
10
+ 's-marketing',
11
+ 's-data',
12
+ 'pie-chart',
13
+ 'chart-radar',
14
+ 'chart-gauge',
15
+ 'chart-pie',
16
+ 'chart-line',
17
+ 'dashboard',
18
+ 'chart-bar',
19
+
20
+ 'monitor',
21
+ 'data-line',
22
+ 'data-analysis',
23
+ 'data-board',
24
+ 'pc',
25
+ ]
26
+ }, {
27
+ name: "模块类",
28
+ icons: [
29
+ 's-grid',
30
+ 'menu',
31
+ 'mokuai2',
32
+ 'mokuai1',
33
+ 'fenlei3',
34
+ 'mokuai5',
35
+ 'mokuai4',
36
+ 'mokuai3',
37
+ 'mokuai',
38
+ 'component',
39
+ 'group2',
40
+ 'example',
41
+ 'yingyongmokuai',
42
+ 'group',
43
+ 'zhongxin1',
44
+
45
+ 'coin',
46
+ 'pic-part',
47
+ 'part',
48
+ 'share',
49
+ 'list',
50
+ ]
51
+ }, {
52
+ name: "配置类",
53
+ icons: [
54
+ 's-tools',
55
+ 'setting',
56
+ 'canshupeizhi',
57
+ 'peizhi2',
58
+ 'peizhi3',
59
+ 'kaifapeizhi',
60
+
61
+
62
+ 'set-up',
63
+ 'key',
64
+ 'key',
65
+ 'auth',
66
+
67
+ 's-operation',
68
+ 'peizhi4',
69
+ 'peizhi1',
70
+ 'close-notification',
71
+ ]
72
+ }, {
73
+ name: "人员类",
74
+ icons: [
75
+ 'bumenguanli',
76
+ 'org',
77
+ 'tree',
78
+ 'tree-table',
79
+
80
+ 'delete-location',
81
+ 'users',
82
+ 'users2',
83
+ 'peoples',
84
+ 'users3',
85
+
86
+ 'user-solid',
87
+ 'user',
88
+ 's-custom',
89
+ 'wode',
90
+ 'user-setting',
91
+ 'user2',
92
+ 'role',
93
+ 'user-auth',
94
+ 'user-key',
95
+ 'my',
96
+ 'service',
97
+ 'idcard',
98
+ ]
99
+ }, {
100
+ name: "信息类",
101
+ icons: [
102
+ 's-promotion',
103
+ 'guide',
104
+ 'position',
105
+ 's-flag',
106
+ 'collection-tag',
107
+ 'price-tag',
108
+ 'discount',
109
+
110
+ 'warning',
111
+ 'warning-outline',
112
+ 'question',
113
+ 'info',
114
+
115
+
116
+ 's-help',
117
+ 'help',
118
+ 'bangzhu',
119
+ 'loading',
120
+ 'time',
121
+ 'workTime',
122
+
123
+ 'news',
124
+ 'youjian',
125
+ 'email',
126
+ 's-comment',
127
+ 'chat-round',
128
+ 'chat-line-round',
129
+ 'chat-square',
130
+ 'chat-dot-square',
131
+ 'chat-line-square',
132
+ 'message',
133
+ 'duanxin',
134
+ 'xiaoxi',
135
+ 'xiaoxi1',
136
+ 'message',
137
+ 'tooltip',
138
+ 'chat-dot-round',
139
+ ]
140
+ }, {
141
+ name: "操作类",
142
+ icons: [
143
+ 'refresh',
144
+ 'refresh-right',
145
+ 'refresh-left',
146
+ 'transfer',
147
+ 'exchange',
148
+ 'mail-forward',
149
+ 'mail-reply',
150
+ 'history',
151
+ 'switch-button',
152
+ 'close2',
153
+ 'out',
154
+ 'upload2',
155
+ 'download',
156
+ 'upload',
157
+ 'copy-document',
158
+ 'copy',
159
+ 'copy2',
160
+ 'edit',
161
+ 'edit-outline',
162
+ 'floppy-o',
163
+ 'delete-solid',
164
+ 'delete',
165
+ 'trash-o',
166
+
167
+ // 增删改查
168
+ 'remove',
169
+ 'circle-plus',
170
+ 'success',
171
+ 'error',
172
+ 'zoom-in',
173
+ 'zoom-out',
174
+ 'remove-outline',
175
+ 'circle-plus-outline',
176
+ 'circle-check',
177
+ 'circle-close',
178
+ 'finished',
179
+ 'minus',
180
+ 'plus',
181
+ 'check',
182
+ 'close',
183
+
184
+ // 方向
185
+ 'd-caret',
186
+ 'caret-left',
187
+ 'caret-right',
188
+ 'ap-caret-right',
189
+ 'ap-caret-left',
190
+ 'caret-bottom',
191
+ 'caret-top',
192
+ 'title-flag',
193
+ 'arrow-down',
194
+ 'arrow-up',
195
+ 'd-arrow-left',
196
+ 'd-arrow-right',
197
+ 'sort',
198
+ 'sort-up',
199
+ 'sort-down',
200
+ 'bottom-right',
201
+ 'back',
202
+ 'right',
203
+ 'bottom',
204
+ 'top',
205
+ 'top-left',
206
+ 'top-right',
207
+ 'arrow-left',
208
+ 'arrow-right',
209
+
210
+ 'video-pause',
211
+ 'video-play',
212
+ 'star-on',
213
+ 'star-off',
214
+ 'more-outline',
215
+ 'more',
216
+
217
+ 's-fold',
218
+ 's-unfold',
219
+ 'aim',
220
+ 'lock',
221
+ 'unlock',
222
+ 'password',
223
+ 'rank',
224
+ 'full-screen',
225
+ 'drag',
226
+ 'crop',
227
+
228
+ 'eye-slash',
229
+ 'eye',
230
+ 'view',
231
+ 'eye-open',
232
+ 'exit-fullscreen',
233
+ 'fullscreen',
234
+
235
+
236
+ 'female',
237
+ 'male',
238
+ 'link',
239
+ 'connection',
240
+
241
+ 'model',
242
+ 'place',
243
+ 'location',
244
+ 'location-information',
245
+ 'location-outline',
246
+ 'add-location',
247
+ 'map-location',
248
+
249
+
250
+
251
+ // 富文本
252
+ 'button',
253
+ 'check-square-o',
254
+ 'open',
255
+ 'turn-off',
256
+ 'input-number',
257
+ 'nested',
258
+ 'textarea',
259
+ 'select',
260
+ 'switch',
261
+ 'fixed-left',
262
+ 'fixed-right',
263
+ 'layout-sx',
264
+ 'icon',
265
+ 'input',
266
+ 'tab',
267
+ 'container-row',
268
+ 'date',
269
+ 'language',
270
+ 'size',
271
+ 'radio',
272
+ 'date-time',
273
+ 'table',
274
+ 'code',
275
+ 'c-scale-to-original',
276
+
277
+ 'thumb',
278
+ 'zhipai',
279
+ '404',
280
+ ]
281
+ }, {
282
+ name: "文档类",
283
+ icons: [
284
+ 'folder',
285
+ 'folder-opened',
286
+ 'files',
287
+ 'receiving',
288
+ 'folder-add',
289
+ 'folder-remove',
290
+ 'folder-delete',
291
+ 'folder-checked',
292
+
293
+
294
+ 'skill',
295
+ 'wendangpeizhi',
296
+ 'form',
297
+
298
+ 's-order',
299
+ 's-release',
300
+ 's-claim',
301
+ 'tickets',
302
+ 'document-add',
303
+ 'document-remove',
304
+ 'document-delete',
305
+ 'document-checked',
306
+ 'document',
307
+ 'postcard',
308
+ 'file-o',
309
+ 'documentation',
310
+ 'file-text-o',
311
+
312
+ 'message-box',
313
+ 'document-copy',
314
+ 'clipboard',
315
+
316
+ 'dictionary',
317
+ 's-management',
318
+ 'notebook-2',
319
+ 'notebook-1',
320
+ 'collection',
321
+
322
+ 'reading',
323
+ 'education',
324
+
325
+ 'excel',
326
+ 'pdf',
327
+ 'zip',
328
+ 'printer',
329
+ ]
330
+ }, {
331
+ name: "财务类",
332
+ icons: [
333
+ 'wallet',
334
+ 'money',
335
+ 'bank-card',
336
+
337
+ ]
338
+ }, {
339
+ name: "物品类",
340
+ icons: [
341
+ 's-goods',
342
+ 'goods',
343
+ 'picture',
344
+ 'picture-outline',
345
+ 'picture-outline-round',
346
+ 'camera-solid',
347
+ 'camera',
348
+ 'video-camera-solid',
349
+ 'video-camera',
350
+ 'message-solid',
351
+ 'bell',
352
+ 's-cooperation',
353
+ 's-platform',
354
+ 's-open',
355
+ 's-finance',
356
+ 'brush',
357
+ 'scissors',
358
+ 'umbrella',
359
+ 'headset',
360
+ 'mouse',
361
+ 'coordinate',
362
+ 'suitcase',
363
+ 'suitcase-1',
364
+ 'toilet-paper',
365
+ 'table-lamp',
366
+ 'phone',
367
+ 'phone-outline',
368
+ 's-check',
369
+ 's-ticket',
370
+ 's-opportunity',
371
+ 'paperclip',
372
+ 'takeaway-box',
373
+ 'attract',
374
+ 'mobile',
375
+ 'magic-stick',
376
+ 'film',
377
+ 'no-smoking',
378
+ 'shopping',
379
+ 'shopping-cart-full',
380
+ 'shopping-cart-1',
381
+ 'shopping-cart-2',
382
+ 'shopping-bag-1',
383
+ 'shopping-bag-2',
384
+ 'sold-out',
385
+ 'sell',
386
+ 'present',
387
+ 'box',
388
+ 'cpu',
389
+ 'odometer',
390
+ 'microphone',
391
+ 'turn-off-microphone',
392
+ 'first-aid-kit',
393
+ 'stopwatch',
394
+ 'discover',
395
+ 'medal-1',
396
+ 'medal',
397
+ 'trophy',
398
+ 'trophy-1',
399
+ 'alarm-clock',
400
+ 'timer',
401
+ 'watch-1',
402
+ 'watch',
403
+ 'bug',
404
+ 'international',
405
+
406
+ 'smoking',
407
+ 'mic',
408
+ 'theme',
409
+ 'xin',
410
+ 'star',
411
+
412
+ 'home',
413
+ 's-shop',
414
+ 'office-building',
415
+ 'school',
416
+ 'house',
417
+ 's-home',
418
+
419
+ 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round',
420
+
421
+ 'vue',
422
+ 'java',
423
+ 'qq',
424
+ 'wechat',
425
+ 'dingding',
426
+ 'qiyeweixin',
427
+ 'sems',
428
+
429
+ ]
430
+ }
431
+ ]
432
+
433
+ export default iconGroup
@@ -1,21 +1,40 @@
1
1
  <template>
2
2
  <ap-container>
3
3
  <ap-header margin="1101">
4
+ <el-radio v-model="showType" :label="0">分类显示</el-radio>
4
5
  <el-radio v-model="showType" :label="1">自定义</el-radio>
5
6
  <el-radio v-model="showType" :label="2">Element默认</el-radio>
6
7
  <el-radio v-model="showType" :label="3">图片</el-radio>
7
8
  <div class="ap-split-line"/>
8
9
  </ap-header>
9
10
  <ap-main margin="0111" class="icons-container">
11
+ <template v-if="showType == 0">
12
+ <template v-for="group of iconGroup">
13
+ <el-collapse v-model="activeNames">
14
+ <el-collapse-item :title="group.name" :name="group.name">
15
+ <div v-for="item of group.icons" class="icon-ctn">
16
+ <div class="icon-item-ctn">
17
+ <span class="icon-item">
18
+ <i :class="getIconClass(item) " @click="copyIconCode(item,$event)"/>
19
+ </span>
20
+ </div>
21
+ <div class="icon-text-ctn">
22
+ <span class="icon-text" @click="copyIconClass(item,$event)">{{ getIconClass(item) }}</span>
23
+ </div>
24
+ </div>
25
+ </el-collapse-item>
26
+ </el-collapse>
27
+
28
+ </template>
29
+
30
+ </template>
31
+
10
32
  <template v-if="showType == 1">
11
33
  <div v-for="item of myIcons" :key="item.icon_id" class="icon-ctn">
12
34
  <div class="icon-item-ctn">
13
- <span class="icon-item">
14
- <i
15
- :class="getIconClass(item.font_class) "
16
- @click="copyIconCode(item.font_class,$event)"
17
- />
18
- </span>
35
+ <span class="icon-item">
36
+ <i :class="getIconClass(item.font_class) " @click="copyIconCode(item.font_class,$event)"/>
37
+ </span>
19
38
  </div>
20
39
  <div class="icon-text-ctn">
21
40
  <span class="icon-text"
@@ -56,6 +75,7 @@
56
75
  import clipboard from 'ap-util/util/ClipboardUtil'
57
76
  import icons from 'ap-frame/frame/assets/icon/iconfont.json'
58
77
  import elementIcons from './element-icons'
78
+ import iconGroup from './iconGroup'
59
79
 
60
80
  // 批量导入modules下的组件
61
81
  const allImg = require.context('ap-frame/frame/assets/images/icon', false)
@@ -67,14 +87,24 @@ allImg.keys().forEach(fileName => {
67
87
  export default {
68
88
  name: 'Icons',
69
89
  data() {
70
- const myIcons = icons.glyphs
90
+ const myIcons = icons.glyphs;
91
+ let activeNames = ["未分组"];
92
+ for (let i = 0; i < iconGroup.length; i++) {
93
+ activeNames.push(iconGroup[i].name)
94
+ }
71
95
  return {
72
96
  myIcons,
73
97
  elementIcons,
74
- showType: 1,
75
- iconImgs: iconImgs
98
+ showType: 0,
99
+ iconImgs: iconImgs,
100
+ iconGroup,
101
+ activeNames: activeNames
76
102
  }
77
103
  },
104
+ mounted() {
105
+ // 未分组处理
106
+ this.initUnGroup();
107
+ },
78
108
  methods: {
79
109
  getIconCode(value) {
80
110
  return `<i class="el-icon-${value}" />`
@@ -97,6 +127,40 @@ export default {
97
127
  copyIconImgName(value, event) {
98
128
  clipboard(value, event)
99
129
  },
130
+ initUnGroup(){
131
+ // 已分组
132
+ let addedArr = [];
133
+ for (let i = 0; i < this.iconGroup.length; i++) {
134
+ let icons = this.iconGroup[i].icons;
135
+ for (let j = 0; j < icons.length; j++) {
136
+ addedArr.push(icons[j]);
137
+ }
138
+ }
139
+
140
+ let unAddedArr = [];
141
+ // element自带
142
+ for (let i = 0; i < this.elementIcons.length; i++) {
143
+ let item = this.elementIcons[i];
144
+ if (addedArr.indexOf(item) < 0){
145
+ unAddedArr.push(item);
146
+ }
147
+ }
148
+
149
+ // 自定义
150
+ for (let i = 0; i < this.myIcons.length; i++) {
151
+ let name = this.myIcons[i].font_class;
152
+ if (addedArr.indexOf(name) < 0){
153
+ unAddedArr.push(name);
154
+ }
155
+ }
156
+ if (unAddedArr.length > 0) {
157
+ let unGroup = {
158
+ name: "未分组",
159
+ icons: unAddedArr
160
+ };
161
+ iconGroup.unshift(unGroup);
162
+ }
163
+ }
100
164
  }
101
165
  }
102
166
  </script>
@@ -154,5 +218,7 @@ export default {
154
218
  color: #1890FF;
155
219
  }
156
220
 
157
-
221
+ .icons-container .el-divider--horizontal {
222
+ float: left;
223
+ }
158
224
  </style>
@@ -10,7 +10,8 @@
10
10
 
11
11
  <script>
12
12
  import ApiArrayUtil from './../tabs/ApiArrayUtil'
13
- import ApiCacheUtil from './../tabs/ApiCacheUtil'
13
+ import ApiDictionaryUtil from './../tabs/ApiDictionaryUtil'
14
+ import ApiOrgUtil from './../tabs/ApiOrgUtil'
14
15
  import ApiDateUtil from './../tabs/ApiDateUtil'
15
16
  import ApiEMailUtil from './../tabs/ApiEMailUtil'
16
17
  import ApiExcelUtil from './../tabs/ApiExcelUtil'
@@ -27,7 +28,8 @@ export default {
27
28
  name: "ApiJavaUtils",
28
29
  components: {
29
30
  ApiArrayUtil,
30
- ApiCacheUtil,
31
+ ApiDictionaryUtil,
32
+ ApiOrgUtil,
31
33
  ApiDateUtil,
32
34
  ApiEMailUtil,
33
35
  ApiExcelUtil,
@@ -76,8 +78,11 @@ export default {
76
78
  label: 'QyWxUtil',
77
79
  component: 'ApiQyWxUtil',
78
80
  }, {
79
- label: 'CacheUtil',
80
- component: 'ApiCacheUtil',
81
+ label: 'DictionaryUtil',
82
+ component: 'ApiDictionaryUtil',
83
+ }, {
84
+ label: 'OrgUtil',
85
+ component: 'ApiOrgUtil',
81
86
  },{
82
87
  label: 'WebSocketUtil',
83
88
  component: 'ApiWebSocketUtil',
@@ -17,7 +17,10 @@ export default {
17
17
  label: "2.后端-命名规范",
18
18
  component: "ApiNameJava"
19
19
  }, {
20
- label: "3.后端-数据类型",
20
+ label: "3.后端-接口规范",
21
+ component: "ApiInterfaceJava"
22
+ }, {
23
+ label: "4.后端-数据类型",
21
24
  component: "ApiDataTypeJava"
22
25
  }
23
26
  ];
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div style="height: 100%">
3
+ <api-tittle-2>数据字典工具类(缓存) - DictionaryUtil</api-tittle-2>
4
+ <api-table :data="methodData" :columns="methodCols"/>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
10
+
11
+ export default {
12
+ name: 'ApiDictionaryUtil',
13
+ components: {
14
+ ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
15
+ },
16
+ data() {
17
+ const methodCols = [
18
+ {label: '方法名', prop: 'name', width: '220px'},
19
+ {label: '说明', prop: 'memo', width: '400px'},
20
+ {label: '示例代码', prop: 'code', minWidth: '100px'}]
21
+ const methodData = [
22
+ {
23
+ name: 'getOne',
24
+ memo: `获取数据字典:单项 (String)`,
25
+ code: `<span class="api-code">// 获取编码为"xxx"的字符串
26
+ String str = DictionaryUtil.getOne("xxx");</span>`
27
+ }, {
28
+ name: 'getOneForInteger',
29
+ memo: `获取数据字典:单项 (Integer)`,
30
+ code: `<span class="api-code">// 获取编码为"xxx"的数字
31
+ Integer str = DictionaryUtil.getOneForInteger("xxx");</span>`
32
+ }, {
33
+ name: 'getList',
34
+ memo: `获取数据字典:List (String)`,
35
+ code: `<span class="api-code">// 获取编码为"xxx"的list (String)
36
+ List&lt;String> a = DictionaryUtil.getList("xxx")</span>`
37
+ }, {
38
+ name: 'getListForInteger',
39
+ memo: `获取数据字典:List (Integer)`,
40
+ code: `<span class="api-code">// 获取编码为"xxx"的list (Integer)
41
+ List&lt;Integer> a = DictionaryUtil.getListForInteger("xxx")</span>`,
42
+ }
43
+ ]
44
+
45
+ return {
46
+ methodData,
47
+ methodCols
48
+ }
49
+ },
50
+ methods: {}
51
+ }
52
+ </script>
53
+
54
+ <style scoped>
55
+ </style>
@@ -83,6 +83,17 @@ export default {
83
83
  memo: '数据请求method。get或post',
84
84
  code: `<div class="api-code"></div>`
85
85
  }, {
86
+ name: 'searchTreeParams',
87
+ type: '对象/方法',
88
+ default: '',
89
+ memo: '数据请求参数。<br>注:1、参数动态时需要使用方法,参数固定可直接定义对象',
90
+ code: `<div class="api-code">1、固定参数:定义对象
91
+ searchTreeParams: { type: 123}
92
+ 2、动态参数:使用箭头函数
93
+ searchTreeParams: () => {
94
+ return { type: this.typeId}
95
+ }</div>`
96
+ }, {
86
97
  name: 'searchTreeSelectMultiple',
87
98
  type: '布尔',
88
99
  default: 'false',
@@ -159,4 +170,4 @@ options:{
159
170
  </script>
160
171
 
161
172
  <style scoped>
162
- </style>
173
+ </style>
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div>
3
+ <api-tittle-1>后端-接口规范:</api-tittle-1>
4
+ <api-tittle-2>接口路径命名规范</api-tittle-2>
5
+ <api-content>
6
+ 1. 给第三方的接口(token认证):<span class="api-code">/open/**</span>
7
+ <br>
8
+ <br>
9
+ 2. 给第三方的接口(不需要token认证):<span class="api-code">/api/**</span>
10
+ <br>
11
+ <br>
12
+ 3. 白名单(不需要token认证):<span class="api-code">/whitelist/**</span>
13
+ <br>
14
+ <br>
15
+ <api-code>
16
+ // 示例<br>
17
+ @RequestMapping("/api/test")
18
+ </api-code>
19
+ </api-content>
20
+
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
26
+
27
+ export default {
28
+ name: 'ApiInterfaceJava',
29
+ components: {
30
+ ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
31
+ }
32
+ }
33
+ </script>
34
+
35
+ <style scoped>
36
+
37
+ </style>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div style="height: 100%">
3
+ <api-tittle-2>组织部门/人员工具类(缓存) - OrgUtil</api-tittle-2>
4
+ <api-table :data="methodData" :columns="methodCols"/>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
10
+
11
+ export default {
12
+ name: 'ApiOrgUtil',
13
+ components: {
14
+ ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
15
+ },
16
+ data() {
17
+ const methodCols = [
18
+ {label: '方法名', prop: 'name', width: '220px'},
19
+ {label: '说明', prop: 'memo', width: '400px'},
20
+ {label: '示例代码', prop: 'code', minWidth: '100px'}]
21
+ const methodData = [
22
+ {
23
+ name: 'getOrgGroup',
24
+ memo: `获取组织分组:公司别和用户权限过滤`,
25
+ code: `<span class="api-code">// 获取编码为"xxx"的组织分组:根据登录用户的权限和公司别,自动过滤数据
26
+ List&lt;OrgGroup> a = OrgUtil.getOrgGroup("xxx")</span>`
27
+ }, {
28
+ name: 'getOrgGroupByAll',
29
+ memo: `获取组织分组:不过滤`,
30
+ code: `<span class="api-code">// 不进行任何过滤
31
+ List&lt;OrgGroup> a = OrgUtil.getOrgGroupByAll("xxx")
32
+ </span>`
33
+ }, {
34
+ name: 'getOrgGroupByCompany',
35
+ memo: `获取组织分组:公司别过滤`,
36
+ code: `<span class="api-code">// 根据登录用户的公司别,自动过滤数据
37
+ List&lt;OrgGroup> a = OrgUtil.getOrgGroupByCompany("xxx")</span>`
38
+ }, {
39
+ name: 'getOrgGroupByCompany',
40
+ memo: `获取组织分组:公司别过滤<br>
41
+ getOrgGroupByCompany(code, companyId)<br>
42
+ 参数:<br>
43
+ 【String】code - 分组编码<br>
44
+ 【String】companyId - 公司别`,
45
+ code: `<span class="api-code">// 根据指定公司别,自动过滤数据
46
+ List&lt;OrgGroup> a = OrgUtil.getOrgGroupByCompany("xxx", "Xx")</span>`
47
+ }
48
+ ]
49
+
50
+ return {
51
+ methodData,
52
+ methodCols
53
+ }
54
+ },
55
+ methods: {}
56
+ }
57
+ </script>
58
+
59
+ <style scoped>
60
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ap-dev",
3
- "version": "1.1.16",
3
+ "version": "1.1.20",
4
4
  "description": "===== ap-dev =====",
5
5
  "author": "xiexinbin",
6
6
  "email": "876818817@qq.com",
@@ -1,121 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <api-tittle-2>Redis缓存工具类 - CacheUtil</api-tittle-2>
4
- <api-table :data="methodData" :columns="methodCols"/>
5
- </div>
6
- </template>
7
-
8
- <script>
9
- import {ApiCode, ApiContent, ApiTable, ApiTittle1, ApiTittle2} from './../components'
10
-
11
- export default {
12
- name: 'ApiCacheUtil',
13
- components: {
14
- ApiTable, ApiCode, ApiTittle1, ApiContent, ApiTittle2
15
- },
16
- data() {
17
- const methodCols = [
18
- {label: '方法名', prop: 'name', width: '220px'},
19
- {label: '说明', prop: 'memo', width: '400px'},
20
- {label: '示例代码', prop: 'code', minWidth: '100px'}]
21
- const methodData = [
22
- {
23
- name: 'getDictionary',
24
- memo: `获取数据字典:单项 Value默认String<br>
25
- getDictionary(key)<br>
26
- 参数:<br>
27
- 【String】key - 字典编码`,
28
- code: `<span class="api-code">// 1、controller或service中注入CacheUtil
29
- @Resource
30
- private CacheUtil cacheUtil;
31
- // 2、调用方法
32
- String str = cacheUtil.getDictionary("xxx");</span>`
33
- }, {
34
- name: 'getDictionary',
35
- memo: `获取数据字典:单项 Value<br>
36
- getDictionary(key, isInteger)<br>
37
- 参数:<br>
38
- 【String】key - 字典编码<br>
39
- 【boolean】isInteger - value类型:true->Integer; false->String
40
- `,
41
- code: `<span class="api-code">// 1、value为Integer <br>Integer a = cacheUtil.getDictionary("xxx", true);</span>`
42
- }, {
43
- name: 'getDictionaryList',
44
- memo: `获取数据字典:List Value默认String<br>
45
- getDictionaryList(key)<br>
46
- 参数:<br>
47
- 【String】key - 字典编码`,
48
- code: `<span class="api-code">List&lt;String> a = cacheUtil.getDictionaryList("xxx")</span>`
49
- }, {
50
- name: 'getDictionaryList',
51
- memo: `获取数据字典:List<br>
52
- getDictionaryList(key, isInteger)<br>
53
- 参数:<br>
54
- 【String】key - 字典编码<br>
55
- 【boolean】isInteger - value类型:true->Integer; false->String`,
56
- code: `<span class="api-code">List&lt;Integer> a = cacheUtil.getDictionaryList("xxx", true)</span>`,
57
- }, {
58
- name: 'getAuthOrgGroup',
59
- memo: `获取组织分组:公司别和用户权限过滤
60
- getAuthOrgGroup(code)<br>
61
- 参数:<br>
62
- 【String】code - 分组编码`,
63
- code: `<span class="api-code">// 根据登录用户的权限和公司别,自动过滤数据
64
- // 1、controller或service中注入CacheUtil
65
- @Resource
66
- private CacheUtil cacheUtil;
67
- // 2、调用方法
68
- List&lt;OrgGroup> a = cacheUtil.getAuthOrgGroup("xxx")</span>`
69
- }, {
70
- name: 'getCompanyOrgGroup',
71
- memo: `获取组织分组:公司别过滤
72
- getCompanyOrgGroup(code)<br>
73
- 参数:<br>
74
- 【String】code - 分组编码`,
75
- code: `<span class="api-code">// 根据登录用户的公司别,自动过滤数据
76
- ...
77
- List&lt;OrgGroup> a = cacheUtil.getCompanyOrgGroup("xxx")</span>`
78
- }, {
79
- name: 'getCompanyOrgGroup',
80
- memo: `获取组织分组:公司别过滤
81
- getCompanyOrgGroup(code, companyId)<br>
82
- 参数:<br>
83
- 【String】code - 分组编码<br>
84
- 【String】companyId - 公司别`,
85
- code: `<span class="api-code">// 根据公司别,自动过滤数据
86
- ...
87
- List&lt;OrgGroup> a = cacheUtil.getCompanyOrgGroup("xxx", "Xx")</span>`
88
- }, {
89
- name: 'getOrgGroup',
90
- memo: `获取组织分组
91
- getOrgGroup(code, user, companyId)<br>
92
- 参数:<br>
93
- 【String】code - 分组编码<br>
94
- 【LoginUser】user - 登录用户<br>
95
- 【String】companyId - 公司别`,
96
- code: `<span class="api-code">// 登录用户:不为空过滤权限;公司别:不为空过滤公司别
97
- ...
98
- List&lt;OrgGroup> a = cacheUtil.getOrgGroup("xxx", user, "Xx")</span>`
99
- }, {
100
- name: 'getAllOrgGroup',
101
- memo: `获取组织分组
102
- getAllOrgGroup(code)<br>
103
- 参数:<br>
104
- 【String】code - 分组编码`,
105
- code:`<span class="api-code">// 不进行任何过滤
106
- List&lt;OrgGroup> a = cacheUtil.getAllOrgGroup("xxx")
107
- </span>`
108
- }
109
- ]
110
-
111
- return {
112
- methodData,
113
- methodCols
114
- }
115
- },
116
- methods: {}
117
- }
118
- </script>
119
-
120
- <style scoped>
121
- </style>