eoss-ui 0.7.64 → 0.7.66

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 (255) hide show
  1. package/lib/button-group.js +119 -97
  2. package/lib/button.js +113 -97
  3. package/lib/calendar.js +2 -2
  4. package/lib/calogin.js +352 -330
  5. package/lib/card.js +2 -2
  6. package/lib/cascader.js +2 -2
  7. package/lib/checkbox-group.js +119 -97
  8. package/lib/clients.js +43 -41
  9. package/lib/config/api.js +12 -1
  10. package/lib/data-table-form.js +119 -97
  11. package/lib/data-table.js +119 -97
  12. package/lib/date-picker.js +120 -104
  13. package/lib/dialog.js +119 -97
  14. package/lib/enable-drag.js +2 -2
  15. package/lib/enterprise.js +2 -2
  16. package/lib/eoss-ui.common.js +8677 -720
  17. package/lib/error-page.js +2 -2
  18. package/lib/flow-group.js +120 -104
  19. package/lib/flow-list.js +287 -289
  20. package/lib/flow.js +175 -153
  21. package/lib/form.js +119 -97
  22. package/lib/handle-user.js +121 -105
  23. package/lib/handler.js +114 -98
  24. package/lib/icon.js +114 -98
  25. package/lib/icons.js +5 -5
  26. package/lib/index.js +1 -1
  27. package/lib/input-number.js +120 -104
  28. package/lib/input.js +120 -104
  29. package/lib/label.js +2 -2
  30. package/lib/layout.js +2 -2
  31. package/lib/login.js +129 -107
  32. package/lib/main.js +8505 -545
  33. package/lib/menu.js +2 -2
  34. package/lib/nav.js +113 -97
  35. package/lib/notify.js +116 -100
  36. package/lib/page.js +120 -104
  37. package/lib/pagination.js +120 -104
  38. package/lib/player.js +130 -114
  39. package/lib/qr-code.js +141 -125
  40. package/lib/radio-group.js +120 -104
  41. package/lib/retrial-auth.js +116 -100
  42. package/lib/select-ganged.js +113 -97
  43. package/lib/select.js +120 -104
  44. package/lib/selector-panel.js +140 -118
  45. package/lib/selector.js +117 -101
  46. package/lib/sizer.js +115 -99
  47. package/lib/steps.js +113 -97
  48. package/lib/switch.js +113 -97
  49. package/lib/table-form.js +120 -104
  50. package/lib/tabs-panel.js +2 -2
  51. package/lib/tabs.js +120 -104
  52. package/lib/theme-chalk/base.css +1 -1
  53. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  54. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  55. package/lib/theme-chalk/icon.css +1 -1
  56. package/lib/theme-chalk/index.css +1 -1
  57. package/lib/theme-chalk/login.css +1 -1
  58. package/lib/theme-chalk/main.css +1 -1
  59. package/lib/theme-chalk/menu.css +1 -1
  60. package/lib/theme-chalk/simplicity-top.css +1 -0
  61. package/lib/theme-chalk/simplicity.css +1 -1
  62. package/lib/theme-chalk/sizer.css +1 -1
  63. package/lib/theme-chalk/upload.css +1 -1
  64. package/lib/tips.js +121 -105
  65. package/lib/toolbar.js +2 -2
  66. package/lib/tree-group.js +120 -104
  67. package/lib/tree.js +121 -105
  68. package/lib/upload.js +129 -107
  69. package/lib/wujie.js +113 -97
  70. package/lib/wxlogin.js +113 -97
  71. package/package.json +1 -1
  72. package/packages/button/index.js +5 -5
  73. package/packages/button/src/main.vue +418 -418
  74. package/packages/button-group/index.js +5 -5
  75. package/packages/calendar/index.js +5 -5
  76. package/packages/calogin/index.js +5 -5
  77. package/packages/calogin/src/plugin.js +915 -915
  78. package/packages/card/index.js +5 -5
  79. package/packages/card/src/main.vue +156 -156
  80. package/packages/cascader/index.js +5 -5
  81. package/packages/cascader/src/main.vue +168 -168
  82. package/packages/checkbox-group/index.js +5 -5
  83. package/packages/checkbox-group/src/main.vue +333 -333
  84. package/packages/clients/index.js +5 -5
  85. package/packages/clients/src/main.vue +1 -1
  86. package/packages/data-table/index.js +5 -5
  87. package/packages/data-table/src/children.vue +39 -39
  88. package/packages/data-table/src/sizer.vue +195 -195
  89. package/packages/data-table-form/index.js +5 -5
  90. package/packages/data-table-form/src/checkbox.vue +101 -101
  91. package/packages/data-table-form/src/colgroup.vue +17 -17
  92. package/packages/data-table-form/src/main.vue +181 -181
  93. package/packages/data-table-form/src/radio.vue +65 -65
  94. package/packages/data-table-form/src/table.vue +233 -233
  95. package/packages/data-table-form/src/tbody.vue +336 -336
  96. package/packages/data-table-form/src/thead.vue +68 -68
  97. package/packages/date-picker/index.js +5 -5
  98. package/packages/date-picker/src/main.vue +236 -236
  99. package/packages/dialog/index.js +5 -5
  100. package/packages/enable-drag/index.js +5 -5
  101. package/packages/enterprise/index.js +5 -5
  102. package/packages/enterprise/src/main.vue +66 -66
  103. package/packages/error-page/index.js +5 -5
  104. package/packages/error-page/src/main.vue +44 -44
  105. package/packages/flow/index.js +5 -5
  106. package/packages/flow/src/component/TimeLimit.vue +190 -190
  107. package/packages/flow/src/table.vue +58 -58
  108. package/packages/flow-group/index.js +5 -5
  109. package/packages/flow-list/index.js +5 -5
  110. package/packages/form/index.js +5 -5
  111. package/packages/handle-user/index.js +5 -5
  112. package/packages/handler/index.js +5 -5
  113. package/packages/icon/index.js +5 -5
  114. package/packages/icons/index.js +5 -5
  115. package/packages/icons/src/icon.json +1 -1
  116. package/packages/icons/src/main.vue +81 -81
  117. package/packages/input/index.js +5 -5
  118. package/packages/input/src/main.vue +356 -356
  119. package/packages/input-number/index.js +5 -5
  120. package/packages/input-number/src/main.vue +106 -106
  121. package/packages/label/index.js +5 -5
  122. package/packages/label/src/main.vue +457 -457
  123. package/packages/layout/index.js +5 -5
  124. package/packages/layout/src/item.vue +152 -152
  125. package/packages/layout/src/main.vue +31 -31
  126. package/packages/login/index.js +5 -5
  127. package/packages/login/src/main.vue +2 -2
  128. package/packages/main/index.js +5 -5
  129. package/packages/main/src/default/message.vue +249 -249
  130. package/packages/main/src/default/notice.vue +157 -157
  131. package/packages/main/src/main.vue +18 -0
  132. package/packages/main/src/public/settings.vue +121 -75
  133. package/packages/main/src/simplicity/index.vue +5 -5
  134. package/packages/main/src/simplicity/lists.vue +84 -84
  135. package/packages/main/src/simplicity/router-page.vue +45 -45
  136. package/packages/main/src/simplicityTop/apps.vue +388 -0
  137. package/packages/main/src/simplicityTop/avatar.vue +82 -0
  138. package/packages/main/src/simplicityTop/handler.vue +207 -0
  139. package/packages/main/src/simplicityTop/index.vue +2909 -0
  140. package/packages/main/src/simplicityTop/lists.vue +84 -0
  141. package/packages/main/src/simplicityTop/menu-list.vue +135 -0
  142. package/packages/main/src/simplicityTop/message.vue +293 -0
  143. package/packages/main/src/simplicityTop/notice.vue +222 -0
  144. package/packages/main/src/simplicityTop/router-page.vue +45 -0
  145. package/packages/main/src/simplicityTop/sub-menu.vue +274 -0
  146. package/packages/main/src/simplicityTop/user.vue +259 -0
  147. package/packages/main/src/simplicityTop/userinfo.vue +401 -0
  148. package/packages/menu/index.js +5 -5
  149. package/packages/nav/index.js +5 -5
  150. package/packages/notify/index.js +5 -5
  151. package/packages/notify/src/main.vue +538 -538
  152. package/packages/page/index.js +5 -5
  153. package/packages/page/src/main.vue +167 -167
  154. package/packages/pagination/index.js +5 -5
  155. package/packages/pagination/src/main.vue +96 -96
  156. package/packages/player/index.js +5 -5
  157. package/packages/player/src/main.vue +194 -194
  158. package/packages/qr-code/index.js +5 -5
  159. package/packages/qr-code/src/main.vue +170 -170
  160. package/packages/radio-group/index.js +6 -6
  161. package/packages/radio-group/src/main.vue +319 -319
  162. package/packages/retrial-auth/index.js +5 -5
  163. package/packages/retrial-auth/src/main.vue +280 -280
  164. package/packages/select/index.js +5 -5
  165. package/packages/select-ganged/index.js +5 -5
  166. package/packages/select-ganged/src/main.vue +724 -724
  167. package/packages/selector/index.js +5 -5
  168. package/packages/selector-panel/index.js +5 -5
  169. package/packages/selector-panel/src/tree.vue +129 -129
  170. package/packages/sizer/index.js +5 -5
  171. package/packages/sizer/src/main.vue +254 -254
  172. package/packages/steps/index.js +5 -5
  173. package/packages/steps/src/main.vue +181 -181
  174. package/packages/switch/index.js +5 -5
  175. package/packages/table-form/index.js +5 -5
  176. package/packages/tabs/index.js +5 -5
  177. package/packages/tabs/src/main.vue +788 -788
  178. package/packages/tabs-panel/index.js +5 -5
  179. package/packages/tabs-panel/src/main.vue +29 -29
  180. package/packages/theme-chalk/lib/base.css +1 -1
  181. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  182. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  183. package/packages/theme-chalk/lib/icon.css +1 -1
  184. package/packages/theme-chalk/lib/index.css +1 -1
  185. package/packages/theme-chalk/lib/login.css +1 -1
  186. package/packages/theme-chalk/lib/main.css +1 -1
  187. package/packages/theme-chalk/lib/menu.css +1 -1
  188. package/packages/theme-chalk/lib/simplicity-top.css +1 -0
  189. package/packages/theme-chalk/lib/simplicity.css +1 -1
  190. package/packages/theme-chalk/lib/sizer.css +1 -1
  191. package/packages/theme-chalk/lib/upload.css +1 -1
  192. package/packages/theme-chalk/src/base.scss +261 -261
  193. package/packages/theme-chalk/src/button-group.scss +176 -176
  194. package/packages/theme-chalk/src/button.scss +24 -24
  195. package/packages/theme-chalk/src/calendar.scss +113 -113
  196. package/packages/theme-chalk/src/card.scss +99 -99
  197. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  198. package/packages/theme-chalk/src/clients.scss +87 -87
  199. package/packages/theme-chalk/src/common/var.scss +3 -0
  200. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  201. package/packages/theme-chalk/src/date-picker.scss +7 -7
  202. package/packages/theme-chalk/src/dialog.scss +77 -77
  203. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  204. package/packages/theme-chalk/src/enterprise.scss +5 -5
  205. package/packages/theme-chalk/src/error-page.scss +18 -18
  206. package/packages/theme-chalk/src/flow-group.scss +110 -110
  207. package/packages/theme-chalk/src/flow-list.scss +39 -39
  208. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  209. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  210. package/packages/theme-chalk/src/handle-user.scss +40 -40
  211. package/packages/theme-chalk/src/icon.scss +4 -0
  212. package/packages/theme-chalk/src/icons.scss +99 -99
  213. package/packages/theme-chalk/src/input.scss +9 -9
  214. package/packages/theme-chalk/src/label.scss +24 -24
  215. package/packages/theme-chalk/src/layout.scss +46 -46
  216. package/packages/theme-chalk/src/main.scss +1 -0
  217. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  218. package/packages/theme-chalk/src/nav.scss +111 -111
  219. package/packages/theme-chalk/src/page.scss +3 -3
  220. package/packages/theme-chalk/src/pagination.scss +29 -29
  221. package/packages/theme-chalk/src/player.scss +9 -9
  222. package/packages/theme-chalk/src/qr-code.scss +17 -17
  223. package/packages/theme-chalk/src/radio-group.scss +9 -9
  224. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  225. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  226. package/packages/theme-chalk/src/select.scss +8 -8
  227. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  228. package/packages/theme-chalk/src/simplicity-top.scss +1974 -0
  229. package/packages/theme-chalk/src/sizer.scss +36 -36
  230. package/packages/theme-chalk/src/steps.scss +88 -88
  231. package/packages/theme-chalk/src/switch.scss +3 -3
  232. package/packages/theme-chalk/src/table-form.scss +1 -1
  233. package/packages/theme-chalk/src/tabs.scss +87 -87
  234. package/packages/theme-chalk/src/tips.scss +7 -7
  235. package/packages/theme-chalk/src/toolbar.scss +179 -179
  236. package/packages/theme-chalk/src/tree-group.scss +72 -72
  237. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  238. package/packages/tips/index.js +5 -5
  239. package/packages/toolbar/index.js +5 -5
  240. package/packages/tree/index.js +5 -5
  241. package/packages/tree-group/index.js +5 -5
  242. package/packages/upload/index.js +5 -5
  243. package/packages/upload/src/picture.js +15 -15
  244. package/packages/wujie/index.js +5 -5
  245. package/packages/wujie/src/main.vue +145 -145
  246. package/packages/wxlogin/index.js +5 -5
  247. package/packages/wxlogin/src/main.vue +128 -128
  248. package/src/config/api.js +15 -2
  249. package/src/config/image.js +2 -2
  250. package/src/index.js +1 -1
  251. package/src/utils/bus.js +3 -3
  252. package/src/utils/date-util.js +312 -312
  253. package/src/utils/http.js +50 -50
  254. package/src/utils/store.js +21 -21
  255. package/src/utils/webSocket.js +107 -107
@@ -1,84 +1,84 @@
1
- <template>
2
- <div v-for="(item, index) in data" :key="item.id" @click="handleClick(item)">
3
- <div
4
- class="es-simplicity-menus-item"
5
- :class="{
6
- 'is-active': active === item.id,
7
- 'is-open': openId === item.id
8
- }"
9
- >
10
- <es-icon
11
- class="es-simplicity_apps-icon"
12
- :style="setStyle(index)"
13
- :contents="item.icons || item.icon || menuIcon"
14
- ></es-icon>
15
- <div class="es-simplicity-menus-tips" v-if="item.tips">
16
- {{ item.tips > 99 ? '99+' : item.tips }}
17
- </div>
18
- <div class="es-simplicity_apps-text">
19
- {{ item.text || item.name }}
20
- </div>
21
- </div>
22
- <lists
23
- v-if="
24
- (item.children && item.children.length) ||
25
- (item.fourthTabs && item.fourthTabs.length)
26
- "
27
- :menuIcon="menuIcon"
28
- :color="color"
29
- :backgroundColor="backgroundColor"
30
- :data="[...(item.children || []), ...(item.fourthTabs || [])]"
31
- ></lists>
32
- </div>
33
- </template>
34
-
35
- <script>
36
- export default {
37
- name: 'Lists',
38
- components: {},
39
- props: {
40
- menuIcon: String,
41
- color: [String, Array],
42
- backgroundColor: [String, Array],
43
- data: Array
44
- },
45
- data() {
46
- return {
47
- active: '',
48
- openId: ''
49
- };
50
- },
51
- computed: {},
52
- watch: {},
53
- created() {},
54
- mounted() {},
55
- methods: {
56
- setStyle(num) {
57
- let obj = {};
58
- if (this.color) {
59
- obj.color = this.color;
60
- if (Array.isArray(this.color)) {
61
- obj.color = this.color[num % this.color.length];
62
- } else {
63
- obj.color = this.color;
64
- }
65
- }
66
- if (this.backgroundColor) {
67
- if (Array.isArray(this.backgroundColor)) {
68
- obj.backgroundColor =
69
- this.backgroundColor[num % this.backgroundColor.length];
70
- } else {
71
- obj.backgroundColor = this.backgroundColor;
72
- }
73
- }
74
- return obj;
75
- },
76
- handleClick(res) {
77
- this.active = res.id;
78
- this.$emit('command', res);
79
- }
80
- }
81
- };
82
- </script>
83
-
84
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <div v-for="(item, index) in data" :key="item.id" @click="handleClick(item)">
3
+ <div
4
+ class="es-simplicity-menus-item"
5
+ :class="{
6
+ 'is-active': active === item.id,
7
+ 'is-open': openId === item.id
8
+ }"
9
+ >
10
+ <es-icon
11
+ class="es-simplicity_apps-icon"
12
+ :style="setStyle(index)"
13
+ :contents="item.icons || item.icon || menuIcon"
14
+ ></es-icon>
15
+ <div class="es-simplicity-menus-tips" v-if="item.tips">
16
+ {{ item.tips > 99 ? '99+' : item.tips }}
17
+ </div>
18
+ <div class="es-simplicity_apps-text">
19
+ {{ item.text || item.name }}
20
+ </div>
21
+ </div>
22
+ <lists
23
+ v-if="
24
+ (item.children && item.children.length) ||
25
+ (item.fourthTabs && item.fourthTabs.length)
26
+ "
27
+ :menuIcon="menuIcon"
28
+ :color="color"
29
+ :backgroundColor="backgroundColor"
30
+ :data="[...(item.children || []), ...(item.fourthTabs || [])]"
31
+ ></lists>
32
+ </div>
33
+ </template>
34
+
35
+ <script>
36
+ export default {
37
+ name: 'Lists',
38
+ components: {},
39
+ props: {
40
+ menuIcon: String,
41
+ color: [String, Array],
42
+ backgroundColor: [String, Array],
43
+ data: Array
44
+ },
45
+ data() {
46
+ return {
47
+ active: '',
48
+ openId: ''
49
+ };
50
+ },
51
+ computed: {},
52
+ watch: {},
53
+ created() {},
54
+ mounted() {},
55
+ methods: {
56
+ setStyle(num) {
57
+ let obj = {};
58
+ if (this.color) {
59
+ obj.color = this.color;
60
+ if (Array.isArray(this.color)) {
61
+ obj.color = this.color[num % this.color.length];
62
+ } else {
63
+ obj.color = this.color;
64
+ }
65
+ }
66
+ if (this.backgroundColor) {
67
+ if (Array.isArray(this.backgroundColor)) {
68
+ obj.backgroundColor =
69
+ this.backgroundColor[num % this.backgroundColor.length];
70
+ } else {
71
+ obj.backgroundColor = this.backgroundColor;
72
+ }
73
+ }
74
+ return obj;
75
+ },
76
+ handleClick(res) {
77
+ this.active = res.id;
78
+ this.$emit('command', res);
79
+ }
80
+ }
81
+ };
82
+ </script>
83
+
84
+ <style lang="scss" scoped></style>
@@ -1,45 +1,45 @@
1
- <template>
2
- <div style="height: 100%">
3
- <router-view :key="keys || appCode" :name="appCode" />
4
- </div>
5
- </template>
6
-
7
- <script>
8
- import util from 'eoss-ui/src/utils/util';
9
- export default {
10
- name: 'RouterPage',
11
- components: {},
12
- props: {
13
- appCode: String,
14
- path: String,
15
- url: String,
16
- query: {
17
- type: Object,
18
- default() {
19
- return {};
20
- }
21
- },
22
- keys: String
23
- },
24
- data() {
25
- return {};
26
- },
27
- computed: {},
28
- watch: {},
29
- created() {},
30
- mounted() {
31
- this.jump();
32
- },
33
- methods: {
34
- jump() {
35
- let params = util.getParams({ url: this.url });
36
- this.$router.push({
37
- path: this.path,
38
- query: { ...this.query, ...params }
39
- });
40
- }
41
- }
42
- };
43
- </script>
44
-
45
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <div style="height: 100%">
3
+ <router-view :key="keys || appCode" :name="appCode" />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import util from 'eoss-ui/src/utils/util';
9
+ export default {
10
+ name: 'RouterPage',
11
+ components: {},
12
+ props: {
13
+ appCode: String,
14
+ path: String,
15
+ url: String,
16
+ query: {
17
+ type: Object,
18
+ default() {
19
+ return {};
20
+ }
21
+ },
22
+ keys: String
23
+ },
24
+ data() {
25
+ return {};
26
+ },
27
+ computed: {},
28
+ watch: {},
29
+ created() {},
30
+ mounted() {
31
+ this.jump();
32
+ },
33
+ methods: {
34
+ jump() {
35
+ let params = util.getParams({ url: this.url });
36
+ this.$router.push({
37
+ path: this.path,
38
+ query: { ...this.query, ...params }
39
+ });
40
+ }
41
+ }
42
+ };
43
+ </script>
44
+
45
+ <style lang="scss" scoped></style>
@@ -0,0 +1,388 @@
1
+ <template>
2
+ <el-drawer
3
+ class="es-simplicity-apps"
4
+ direction="ltr"
5
+ modal-class="es-simplicity-apps-modal"
6
+ size="90%"
7
+ :modal-append-to-body="false"
8
+ :with-header="false"
9
+ :visible.sync="show"
10
+ >
11
+ <div class="es-simplicity_apps">
12
+ <div class="es-simplicity_apps-all">
13
+ <div class="es-simplicity_apps-title">
14
+ 所有业务系统
15
+ <el-input
16
+ class="es-simplicity_apps-search"
17
+ size="medium"
18
+ placeholder="请输入关键字"
19
+ prefix-icon="el-icon-search"
20
+ v-model="value"
21
+ >
22
+ </el-input>
23
+ </div>
24
+ <div class="es-simplicity_apps-box" @mousewheel="handleWheel">
25
+ <ul class="es-simplicity_apps-list">
26
+ <li
27
+ v-for="item in _applications"
28
+ class="es-simplicity_apps-list-item"
29
+ :key="item.id"
30
+ >
31
+ <div
32
+ class="es-simplicity_apps-list-content"
33
+ :class="{ 'es-simplicity_apps-disabled': !item.permission }"
34
+ @click="handleClick(item)"
35
+ >
36
+ <el-badge v-bind="getBadge(item)">
37
+ <es-icon
38
+ class="es-simplicity_apps-icon"
39
+ :contents="item.icons || item.icon || menuIcon"
40
+ ></es-icon>
41
+ </el-badge>
42
+ <div class="es-simplicity_apps-text">
43
+ {{ item.text || item.name }}
44
+ </div>
45
+ <div class="es-simplicity_apps-hover">
46
+ <es-icon
47
+ class="es-simplicity_apps-icon"
48
+ :contents="
49
+ item.permission ? 'es-icon-solid-you' : 'es-icon-mima'
50
+ "
51
+ ></es-icon>
52
+ <div class="es-simplicity_apps-text">
53
+ {{ item.permission ? '进入系统' : '暂无权限' }}
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </li>
58
+ </ul>
59
+ </div>
60
+ <el-pagination
61
+ class="es-simplicity_apps-pagination"
62
+ background
63
+ layout="total,prev, pager, next"
64
+ total-text="共 {total} 个业务系统"
65
+ :page-size="appSize"
66
+ :total="apps.length"
67
+ :current-page.sync="appNum"
68
+ @current-change="
69
+ (res) => {
70
+ this.handleChange(res, 0);
71
+ }
72
+ "
73
+ >
74
+ </el-pagination>
75
+ </div>
76
+ <div class="es-simplicity_apps-other">
77
+ <div class="es-simplicity_apps-business">
78
+ <div class="es-simplicity_apps-title">专项业务系统</div>
79
+ <ul class="es-simplicity_apps-list">
80
+ <li
81
+ v-for="(item, index) in _business"
82
+ class="es-simplicity_apps-list-item"
83
+ :key="item.id"
84
+ >
85
+ <div
86
+ class="es-simplicity_apps-list-content"
87
+ :class="{ 'es-simplicity_apps-disabled': !item.permission }"
88
+ @click="handleClick(item)"
89
+ >
90
+ <es-icon
91
+ class="es-simplicity_app-icon"
92
+ :style="setStyle(index)"
93
+ :contents="item.icons || item.icon || menuIcon"
94
+ ></es-icon>
95
+ <el-badge
96
+ v-bind="getBadge(item)"
97
+ class="es-simplicity_apps-texts"
98
+ >
99
+ <div class="es-simplicity_apps-text">
100
+ {{ item.text || item.name }}
101
+ </div>
102
+ </el-badge>
103
+ <div class="es-simplicity_apps-hover">
104
+ <es-icon
105
+ class="es-simplicity_apps-icon"
106
+ :contents="
107
+ item.permission ? 'es-icon-solid-you' : 'es-icon-mima'
108
+ "
109
+ ></es-icon>
110
+ <div class="es-simplicity_apps-text">
111
+ {{ item.permission ? '进入系统' : '暂无权限' }}
112
+ </div>
113
+ </div>
114
+ </div>
115
+ </li>
116
+ </ul>
117
+ <el-pagination
118
+ class="es-simplicity_apps-pagination"
119
+ background
120
+ layout="total,prev, pager, next"
121
+ total-text="共 {total} 专项业务系统"
122
+ :page-size="bsSize"
123
+ :total="business.length"
124
+ @current-change="
125
+ (res) => {
126
+ this.handleChange(res, 1);
127
+ }
128
+ "
129
+ >
130
+ </el-pagination>
131
+ </div>
132
+ <div class="es-simplicity_apps-systems">
133
+ <div class="es-simplicity_apps-title">系统设置</div>
134
+ <ul class="es-simplicity_apps-list">
135
+ <li
136
+ v-for="(item, index) in _systems"
137
+ class="es-simplicity_apps-list-item"
138
+ :key="item.id"
139
+ >
140
+ <div
141
+ class="es-simplicity_apps-list-content"
142
+ :class="{ 'es-simplicity_apps-disabled': !item.permission }"
143
+ @click="handleClick(item)"
144
+ >
145
+ <es-icon
146
+ class="es-simplicity_app-icon"
147
+ :style="setStyle(index)"
148
+ :contents="item.icons || item.icon || menuIcon"
149
+ ></es-icon>
150
+ <el-badge
151
+ v-bind="getBadge(item)"
152
+ class="es-simplicity_apps-texts"
153
+ >
154
+ <div class="es-simplicity_apps-text">
155
+ {{ item.text || item.name }}
156
+ </div>
157
+ </el-badge>
158
+ <div class="es-simplicity_apps-hover">
159
+ <es-icon
160
+ class="es-simplicity_apps-icon"
161
+ :contents="
162
+ item.permission ? 'es-icon-solid-you' : 'es-icon-mima'
163
+ "
164
+ ></es-icon>
165
+ <div class="es-simplicity_apps-text">
166
+ {{ item.permission ? '进入系统' : '暂无权限' }}
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </li>
171
+ </ul>
172
+ <el-pagination
173
+ class="es-simplicity_apps-pagination"
174
+ background
175
+ layout="total,prev, pager, next"
176
+ total-text="共 {total} 系统设置"
177
+ hide-on-single-page
178
+ :page-size="sysSize"
179
+ :total="systems.length"
180
+ @current-change="
181
+ (res) => {
182
+ this.handleChange(res, 2);
183
+ }
184
+ "
185
+ >
186
+ </el-pagination>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ </el-drawer>
191
+ </template>
192
+
193
+ <script>
194
+ import util from 'eoss-ui/src/utils/util';
195
+ import { debounce } from 'throttle-debounce';
196
+ import { recordUserApp } from 'eoss-ui/src/config/api.js';
197
+ export default {
198
+ name: 'Apps',
199
+ components: {},
200
+ props: {
201
+ user: Object,
202
+ visible: Boolean,
203
+ //菜单、应用默认图标
204
+ menuIcon: String,
205
+ color: {
206
+ type: [String, Array],
207
+ default: '#fff'
208
+ },
209
+ backgroundColor: {
210
+ type: [String, Array],
211
+ default() {
212
+ return [
213
+ '#0B3978',
214
+ '#2591F7',
215
+ '#69C0FF',
216
+ '#E34D59',
217
+ '#2591F7',
218
+ '#FF9C52',
219
+ '#17C27B'
220
+ ];
221
+ }
222
+ },
223
+ applications: {
224
+ type: Array,
225
+ default() {
226
+ return [];
227
+ }
228
+ },
229
+ //业务系统
230
+ business: {
231
+ type: Array,
232
+ default() {
233
+ return [];
234
+ }
235
+ },
236
+ //系统管理
237
+ systems: {
238
+ type: Array,
239
+ default() {
240
+ return [];
241
+ }
242
+ }
243
+ },
244
+ data() {
245
+ return {
246
+ value: '',
247
+ apps: [],
248
+ appSize: 20,
249
+ appNum: 1,
250
+ bsSize: 8,
251
+ bsNum: 1,
252
+ sysSize: 2,
253
+ sysNum: 1
254
+ };
255
+ },
256
+ computed: {
257
+ show: {
258
+ get() {
259
+ return this.visible;
260
+ },
261
+ set(val) {
262
+ this.$emit('update:visible', val);
263
+ return val;
264
+ }
265
+ },
266
+ _applications() {
267
+ return this.apps.filter((item, index) => {
268
+ return (
269
+ index > (this.appNum - 1) * this.appSize - 1 &&
270
+ index < this.appNum * this.appSize
271
+ );
272
+ });
273
+ },
274
+ _business() {
275
+ return this.business.filter((item, index) => {
276
+ return (
277
+ index > (this.bsNum - 1) * this.bsSize - 1 &&
278
+ index < this.bsNum * this.bsSize
279
+ );
280
+ });
281
+ },
282
+ _systems() {
283
+ return this.systems.filter((item, index) => {
284
+ return (
285
+ index > (this.sysNum - 1) * this.sysSize - 1 &&
286
+ index < this.sysNum * this.sysSize
287
+ );
288
+ });
289
+ }
290
+ },
291
+ watch: {
292
+ applications: {
293
+ deep: true,
294
+ handler() {
295
+ this.getApps();
296
+ }
297
+ },
298
+ value() {
299
+ this.getApps();
300
+ }
301
+ },
302
+ beforeCreate() {
303
+ this.getApps = debounce(500, () => {
304
+ this.getApp();
305
+ });
306
+ },
307
+ created() {},
308
+ mounted() {
309
+ this.getApps();
310
+ },
311
+ methods: {
312
+ getApp() {
313
+ this.apps = this.value
314
+ ? this.applications.filter((item) => {
315
+ return (item.name || item.text).indexOf(this.value) > -1;
316
+ })
317
+ : this.applications;
318
+ },
319
+ setStyle(num) {
320
+ let obj = {};
321
+ if (this.color) {
322
+ obj.color = this.color;
323
+ if (Array.isArray(this.color)) {
324
+ obj.color = this.color[num % this.color.length];
325
+ } else {
326
+ obj.color = this.color;
327
+ }
328
+ }
329
+ if (this.backgroundColor) {
330
+ if (Array.isArray(this.backgroundColor)) {
331
+ obj.backgroundColor =
332
+ this.backgroundColor[num % this.backgroundColor.length];
333
+ } else {
334
+ obj.backgroundColor = this.backgroundColor;
335
+ }
336
+ }
337
+ return obj;
338
+ },
339
+ handleChange(res, index) {
340
+ let name = ['appNum', 'bsNum', 'sysNum'];
341
+ this[name[index]] = res;
342
+ },
343
+ handleWheel(e) {
344
+ let direction = e.deltaY > 0 ? 'down' : 'up'; //deltaY为正则滚轮向下,为负滚轮向上
345
+ let total = Math.ceil(this.apps.length / this.appSize);
346
+ if (direction == 'up' && this.appNum > 1) {
347
+ this.appNum -= 1;
348
+ }
349
+ if (direction == 'down' && this.appNum < total) {
350
+ this.appNum += 1;
351
+ }
352
+ },
353
+ handleClick(res) {
354
+ util
355
+ .ajax({
356
+ url: recordUserApp,
357
+ params: {
358
+ userId: this.user.userId,
359
+ appId: res.id
360
+ }
361
+ })
362
+ .then(() => {})
363
+ .catch(() => {});
364
+ this.$emit('click', res);
365
+ },
366
+ /**
367
+ * @desc:获取气泡提醒
368
+ * @author huangbo
369
+ * @date 2024年9月7日
370
+ **/
371
+ getBadge(res) {
372
+ let num = res.tips || 0;
373
+ return num === true
374
+ ? {
375
+ isDot: true
376
+ //hidden: item.tips
377
+ }
378
+ : {
379
+ value: num,
380
+ max: 99,
381
+ hidden: !num
382
+ };
383
+ }
384
+ }
385
+ };
386
+ </script>
387
+
388
+ <style lang="scss" scoped></style>