ap-dev 1.1.16 → 1.1.17

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,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',
@@ -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>
@@ -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.17",
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>