eoss-ui 0.4.54 → 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 (65) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +137 -104
  3. package/lib/button.js +139 -106
  4. package/lib/cascader.js +2 -2
  5. package/lib/checkbox-group.js +141 -108
  6. package/lib/config/api.js +4 -0
  7. package/lib/data-table-form.js +138 -105
  8. package/lib/data-table.js +140 -107
  9. package/lib/date-picker.js +146 -113
  10. package/lib/dialog.js +141 -108
  11. package/lib/eoss-ui.common.js +790 -296
  12. package/lib/flow-group.js +137 -104
  13. package/lib/flow-list.js +144 -111
  14. package/lib/flow.js +188 -155
  15. package/lib/form.js +138 -105
  16. package/lib/handle-user.js +138 -105
  17. package/lib/handler.js +138 -105
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +139 -106
  20. package/lib/input.js +139 -106
  21. package/lib/label.js +2 -2
  22. package/lib/login.js +167 -130
  23. package/lib/main.js +153 -120
  24. package/lib/mainComp.js +153 -120
  25. package/lib/menu.js +2 -2
  26. package/lib/nav.js +137 -104
  27. package/lib/notify.js +109 -101
  28. package/lib/page.js +137 -104
  29. package/lib/player.js +137 -104
  30. package/lib/qr-code.js +137 -104
  31. package/lib/radio-group.js +138 -105
  32. package/lib/retrial-auth.js +3328 -0
  33. package/lib/select-ganged.js +139 -106
  34. package/lib/select.js +140 -107
  35. package/lib/selector-panel.js +155 -122
  36. package/lib/selector.js +140 -107
  37. package/lib/sizer.js +141 -108
  38. package/lib/steps.js +139 -106
  39. package/lib/switch.js +139 -106
  40. package/lib/table-form.js +139 -106
  41. package/lib/tabs-panel.js +2 -2
  42. package/lib/tabs.js +146 -113
  43. package/lib/theme-chalk/index.css +1 -1
  44. package/lib/theme-chalk/retrial-auth.css +1 -0
  45. package/lib/tips.js +140 -107
  46. package/lib/toolbar.js +2 -2
  47. package/lib/tree-group.js +139 -106
  48. package/lib/tree.js +140 -107
  49. package/lib/upload.js +147 -114
  50. package/lib/utils/util.js +33 -8
  51. package/lib/wujie.js +139 -106
  52. package/lib/wxlogin.js +139 -106
  53. package/package.json +2 -2
  54. package/packages/checkbox-group/src/main.vue +7 -7
  55. package/packages/dialog/src/main.vue +2 -2
  56. package/packages/login/src/main.vue +21 -15
  57. package/packages/retrial-auth/index.js +5 -0
  58. package/packages/retrial-auth/src/main.vue +271 -0
  59. package/packages/theme-chalk/lib/index.css +1 -1
  60. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  61. package/packages/theme-chalk/src/index.scss +1 -0
  62. package/packages/theme-chalk/src/retrial-auth.scss +38 -0
  63. package/src/config/api.js +4 -0
  64. package/src/index.js +4 -1
  65. package/src/utils/util.js +33 -7
@@ -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.54',
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';
@@ -94,8 +95,6 @@ const ajax = function ({
94
95
  // 请求拦截
95
96
  http.interceptors.request.use(
96
97
  config => {
97
- config.header &&
98
- (config.headers = { ...config.headers, ...config.header });
99
98
  config.headers.common = getStorage();
100
99
  // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
101
100
  let requestKey = getRequestKey(config);
@@ -223,11 +222,38 @@ const ajax = function ({
223
222
  });
224
223
  }, 1000);
225
224
  }
226
- return Promise.reject(response.data);
227
- } else {
228
- // eslint-disable-next-line no-undef
229
- 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);
230
254
  }
255
+ // eslint-disable-next-line no-undef
256
+ return Promise.resolve(response.data);
231
257
  }
232
258
  },
233
259
  error => {
@@ -309,7 +335,7 @@ const ajax = function ({
309
335
  url,
310
336
  data,
311
337
  params,
312
- header
338
+ headers: header
313
339
  });
314
340
  };
315
341