imatrix-ui 2.8.0-dw → 2.8.1-dw

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.8.0-dw",
3
+ "version": "2.8.1-dw",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -70,7 +70,8 @@ const cn = {
70
70
  pleaseInputSearchCondition: '请输入查询条件',
71
71
  fileUpload: '文件上传',
72
72
  selectYear: '选择年',
73
- search: '查询'
73
+ search: '查询',
74
+ forbiddenException: '您没有权限访问该资源'
74
75
  },
75
76
  // 列表组件
76
77
  superGrid: {
@@ -70,7 +70,8 @@ const en = {
70
70
  pleaseInputSearchCondition: 'Please enter the query criteria',
71
71
  fileUpload: 'File Upload',
72
72
  selectYear: 'Select Year',
73
- search: 'Search'
73
+ search: 'Search',
74
+ forbiddenException: 'You do not have permission to access this resource'
74
75
  },
75
76
  superGrid: {
76
77
  columnConfig: 'Column Config',
@@ -81,8 +81,6 @@
81
81
 
82
82
  .box-card {
83
83
  margin: 16px 24px;
84
-
85
- .el-card__body {}
86
84
  }
87
85
  }
88
86
 
@@ -91,9 +89,9 @@
91
89
  }
92
90
 
93
91
  .operation-area-chart {
94
- float: right;
95
92
  padding-right: 24px;
96
- padding-top: 10px;
93
+ padding-top: 24px;
94
+ text-align: right;
97
95
  }
98
96
 
99
97
 
@@ -79,8 +79,18 @@ service.interceptors.response.use(
79
79
  window.location.href = loginUrl
80
80
  })
81
81
  }
82
- } else if (error.response.status === 400 || error.response.status === 406 || error.response.status === 404 || error.response.status === 403) {
83
- // BadRequestException(400) || BusinessException(406) || ResourceNotFoundException(404) || ForbiddenException(403)
82
+ } else if (error.response.status === 403) {
83
+ // ForbiddenException(403) 403没权限
84
+ const message = getI18n().t('imatrixUIMessage.forbiddenException')
85
+ Message({
86
+ showClose: true,
87
+ message: message,
88
+ type: 'error',
89
+ duration: 5 * 1000
90
+ })
91
+ return Promise.reject(error)
92
+ } else if (error.response.status === 400 || error.response.status === 406 || error.response.status === 404) {
93
+ // BadRequestException(400) || BusinessException(406) || ResourceNotFoundException(404)
84
94
  let message = error.message
85
95
  if (message) {
86
96
  // 说明是原生的错误,不要显示,显示“请联系管理员”
@@ -29,9 +29,14 @@ export default {
29
29
  if (icon.indexOf('fa-') === 0) {
30
30
  // 表示以“fa-”开头,使用font-awesome中的图标
31
31
  icon = 'fa ' + icon
32
+ vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
33
+ } else if (icon.indexOf('svg-') === 0) {
34
+ icon = icon.substring(icon.indexOf('svg-') + 4)
35
+ vnodes.push(<div style='display: inline-block;'><svg-icon icon-class={icon}/></div>)
36
+ } else {
37
+ icon += ' svg-icon'
38
+ vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
32
39
  }
33
- icon += ' svg-icon'
34
- vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
35
40
  }
36
41
 
37
42
  if (title) {
@@ -93,9 +93,9 @@ export default {
93
93
  shouldSelectMenu = this.getFirstMenuWithCookie(menus)
94
94
  }
95
95
  // 默认不展示第一个有权限的菜单了,可以去掉下面的代码
96
- //if (!shouldSelectMenu) {
97
- // shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
98
- //}
96
+ // if (!shouldSelectMenu) {
97
+ // shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
98
+ // }
99
99
  return shouldSelectMenu
100
100
  }
101
101
  },