eoss-ui 0.4.55 → 0.4.56

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 (63) hide show
  1. package/lib/button-group.js +136 -100
  2. package/lib/button.js +138 -102
  3. package/lib/cascader.js +2 -2
  4. package/lib/checkbox-group.js +140 -104
  5. package/lib/config/api.js +4 -0
  6. package/lib/data-table-form.js +137 -101
  7. package/lib/data-table.js +139 -103
  8. package/lib/date-picker.js +145 -109
  9. package/lib/dialog.js +136 -100
  10. package/lib/eoss-ui.common.js +785 -285
  11. package/lib/flow-group.js +136 -100
  12. package/lib/flow-list.js +143 -107
  13. package/lib/flow.js +187 -151
  14. package/lib/form.js +137 -101
  15. package/lib/handle-user.js +137 -101
  16. package/lib/handler.js +137 -101
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +138 -102
  19. package/lib/input.js +138 -102
  20. package/lib/label.js +2 -2
  21. package/lib/login.js +171 -128
  22. package/lib/main.js +152 -116
  23. package/lib/mainComp.js +152 -116
  24. package/lib/menu.js +2 -2
  25. package/lib/nav.js +136 -100
  26. package/lib/notify.js +109 -101
  27. package/lib/page.js +136 -100
  28. package/lib/player.js +136 -100
  29. package/lib/qr-code.js +136 -100
  30. package/lib/radio-group.js +137 -101
  31. package/lib/retrial-auth.js +3328 -0
  32. package/lib/select-ganged.js +138 -102
  33. package/lib/select.js +139 -103
  34. package/lib/selector-panel.js +154 -118
  35. package/lib/selector.js +139 -103
  36. package/lib/sizer.js +140 -104
  37. package/lib/steps.js +138 -102
  38. package/lib/switch.js +138 -102
  39. package/lib/table-form.js +138 -102
  40. package/lib/tabs-panel.js +2 -2
  41. package/lib/tabs.js +145 -109
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/theme-chalk/retrial-auth.css +1 -0
  44. package/lib/tips.js +139 -103
  45. package/lib/toolbar.js +2 -2
  46. package/lib/tree-group.js +138 -102
  47. package/lib/tree.js +139 -103
  48. package/lib/upload.js +146 -110
  49. package/lib/utils/util.js +32 -4
  50. package/lib/wujie.js +138 -102
  51. package/lib/wxlogin.js +138 -102
  52. package/package.json +2 -2
  53. package/packages/checkbox-group/src/main.vue +7 -7
  54. package/packages/login/src/main.vue +26 -18
  55. package/packages/retrial-auth/index.js +5 -0
  56. package/packages/retrial-auth/src/main.vue +271 -0
  57. package/packages/theme-chalk/lib/index.css +1 -1
  58. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  59. package/packages/theme-chalk/src/index.scss +1 -0
  60. package/packages/theme-chalk/src/retrial-auth.scss +38 -0
  61. package/src/config/api.js +4 -0
  62. package/src/index.js +4 -1
  63. package/src/utils/util.js +32 -4
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.es-retrial-auth-msg .el-message-box__header{background-color:#eee;font-size:14px!important;border-bottom:1px solid #d9d9d9}.es-retrial-auth-msg .el-message-box__header .el-message-box__title{font-size:14px;line-height:18px}.es-retrial-auth .es-retrial-auth-form{padding:24px 12px 12px}.es-retrial-auth .el-input__suffix{right:0}.es-retrial-auth .es-button-submit{width:100%}.es-retrial-auth .es-login-switchs{padding-top:12px;text-align:center;color:#d9d9d9}.es-retrial-auth .es-login-switchs .es-icon{font-size:24px;cursor:pointer}.es-retrial-auth .es-login-switchs .es-icon+.es-icon{margin-left:12px}.es-retrial-auth .es-login-switchs .es-icon.es-active{color:#1890ff}
@@ -33,6 +33,7 @@
33
33
  @import "./player.scss";
34
34
  @import "./qr-code.scss";
35
35
  @import "./radio-group.scss";
36
+ @import "./retrial-auth.scss";
36
37
  @import "./select.scss";
37
38
  @import "./select-ganged.scss";
38
39
  @import "./selector.scss";
@@ -0,0 +1,38 @@
1
+ @import './common/var.scss';
2
+ .es-retrial-auth-msg {
3
+ .el-message-box__header {
4
+ background-color: #eee;
5
+ font-size: 14px !important;
6
+ border-bottom: $--border-base;
7
+ .el-message-box__title {
8
+ font-size: 14px;
9
+ line-height: 18px;
10
+ }
11
+ }
12
+ }
13
+ .es-retrial-auth {
14
+ .es-retrial-auth-form {
15
+ padding: 24px 12px 12px 12px;
16
+ }
17
+ .el-input__suffix {
18
+ right: 0;
19
+ }
20
+ .es-button-submit {
21
+ width: 100%;
22
+ }
23
+ .es-login-switchs {
24
+ padding-top: 12px;
25
+ text-align: center;
26
+ color: #d9d9d9;
27
+ .es-icon {
28
+ font-size: 24px;
29
+ cursor: pointer;
30
+ & + .es-icon {
31
+ margin-left: 12px;
32
+ }
33
+ &.es-active {
34
+ color: $--color-primary-light-6;
35
+ }
36
+ }
37
+ }
38
+ }
package/src/config/api.js CHANGED
@@ -17,6 +17,10 @@ export const initModifyPassword = '/sso2/signIn/assembly/initModifyPassword'; //
17
17
  export const doWechatQrLogin = '/sso2/signIn/auth/doWechatQrLogin'; // 微信扫码登录
18
18
  export const getTwoFactorLoginCode = '/sso2/signIn/auth/getTwoFactorLoginCode'; // 双因素登录,通过消息中心发送登陆验证码给用户
19
19
  export const doTwoFactorLogin = '/sso2/signIn/auth/doTwoFactorLogin'; // 双因素登录
20
+ export const initRetrialAuth = '/sso2/retrialAuth/initRetrialAuth'; // 初始化二级身份权限验证页面
21
+ export const getRetrialAuthCode = '/sso2/retrialAuth/getRetrialAuthCode'; // 获取二级身份验证验证码
22
+ export const scanCodeRetrialAuth = '/sso2/retrialAuth/scanCodeRetrialAuth';// 二维码扫码验证(二级权限验证)
23
+ export const codeRetrialAuth = '/sso2/retrialAuth/codeRetrialAuth';// 二级身份验证-验证码验证
20
24
  // 框架
21
25
  export const mainConfig = '/main2/main/mainConfig'; // 获取主页面配置
22
26
  export const initUserSet = '/main2/main/initUserSet'; // 获取用户信息
package/src/index.js CHANGED
@@ -34,6 +34,7 @@ import Page from '../packages/page/index.js';
34
34
  import Player from '../packages/player/index.js';
35
35
  import QrCode from '../packages/qr-code/index.js';
36
36
  import RadioGroup from '../packages/radio-group/index.js';
37
+ import RetrialAuth from '../packages/retrial-auth/index.js';
37
38
  import Select from '../packages/select/index.js';
38
39
  import SelectGanged from '../packages/select-ganged/index.js';
39
40
  import Selector from '../packages/selector/index.js';
@@ -87,6 +88,7 @@ const components = [
87
88
  Player,
88
89
  QrCode,
89
90
  RadioGroup,
91
+ RetrialAuth,
90
92
  Select,
91
93
  SelectGanged,
92
94
  Selector,
@@ -117,7 +119,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
119
  }
118
120
 
119
121
  export default {
120
- version: '0.4.55',
122
+ version: '0.4.56',
121
123
  install,
122
124
  Button,
123
125
  ButtonGroup,
@@ -153,6 +155,7 @@ export default {
153
155
  Player,
154
156
  QrCode,
155
157
  RadioGroup,
158
+ RetrialAuth,
156
159
  Select,
157
160
  SelectGanged,
158
161
  Selector,
package/src/utils/util.js CHANGED
@@ -23,6 +23,7 @@ const $lightColorCount = 5;
23
23
  const $darkColorCount = 4;
24
24
  const publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
25
25
  let loginMsg;
26
+ let initAuth;
26
27
 
27
28
  const JSONbigToString = JSONbig({ storeAsString: true });
28
29
  import { MessageBox, Loading } from 'eoss-element';
@@ -221,11 +222,38 @@ const ajax = function ({
221
222
  });
222
223
  }, 1000);
223
224
  }
224
- return Promise.reject(response.data);
225
- } else {
226
- // eslint-disable-next-line no-undef
227
- return Promise.resolve(response.data);
225
+ } else if (response.data.rCode === 61) {
226
+ clearTimeout(initAuth);
227
+ initAuth = setTimeout(() => {
228
+ MessageBox({
229
+ title: '请进行二次鉴权',
230
+ closeOnClickModal: false,
231
+ closeOnPressEscape: false,
232
+ showConfirmButton: false,
233
+ dangerouslyUseHTMLString: true,
234
+ scroll: false,
235
+ customClass: 'es-retrial-auth-msg',
236
+ render: (h, msgBox) => {
237
+ return h('es-retrial-auth', {
238
+ ref: 'auth',
239
+ props: {
240
+ group: response.data.results.retrialAuthGroupIds,
241
+ type: response.data.results.retrialAuthType,
242
+ msgBox: msgBox
243
+ }
244
+ });
245
+ },
246
+ callback: (res, obj) => {
247
+ obj.$children.forEach(item => {
248
+ item.clearTimeouts && item.clearTimeouts();
249
+ return;
250
+ });
251
+ }
252
+ });
253
+ }, 1000);
228
254
  }
255
+ // eslint-disable-next-line no-undef
256
+ return Promise.resolve(response.data);
229
257
  }
230
258
  },
231
259
  error => {