vue2-client 1.18.35 → 1.18.37
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/.eslintrc.js +90 -90
- package/Components.md +60 -60
- package/docs/index.md +30 -30
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.setup.js +7 -7
- package/package.json +1 -1
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/CitySelect/CitySelect.vue +9 -1
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +22 -0
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddNativeForm/demo.vue +2 -7
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +322 -322
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XFormTable/demo.vue +125 -125
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/XTable.vue +1715 -1715
- package/src/base-client/components/common/XTable/XTableWrapper.vue +759 -756
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/components/Charts/Bar.vue +62 -62
- package/src/components/Charts/ChartCard.vue +134 -134
- package/src/components/Charts/Liquid.vue +67 -67
- package/src/components/Charts/MiniArea.vue +39 -39
- package/src/components/Charts/MiniBar.vue +39 -39
- package/src/components/Charts/MiniProgress.vue +75 -75
- package/src/components/Charts/MiniSmoothArea.vue +40 -40
- package/src/components/Charts/Radar.vue +68 -68
- package/src/components/Charts/RankList.vue +77 -77
- package/src/components/Charts/TagCloud.vue +113 -113
- package/src/components/Charts/TransferBar.vue +64 -64
- package/src/components/Charts/Trend.vue +82 -82
- package/src/components/Charts/chart.less +12 -12
- package/src/components/Charts/smooth.area.less +13 -13
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/NumberInfo/index.js +3 -3
- package/src/components/NumberInfo/index.less +54 -54
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/card/ChartCard.vue +79 -79
- package/src/components/chart/Bar.vue +60 -60
- package/src/components/chart/MiniArea.vue +67 -67
- package/src/components/chart/MiniBar.vue +59 -59
- package/src/components/chart/MiniProgress.vue +57 -57
- package/src/components/chart/Radar.vue +80 -80
- package/src/components/chart/RankingList.vue +60 -60
- package/src/components/chart/Trend.vue +79 -79
- package/src/components/chart/index.less +9 -9
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/input/IInput.vue +66 -66
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/lib.js +1 -1
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +1 -1
- package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/router/async/router.map.js +2 -2
- package/src/services/api/cas.js +79 -79
- package/src/store/modules/setting.js +119 -119
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
- package/tests/unit/a.log +0 -0
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 判断是否有路由的权限
|
|
3
|
-
* @param authority 路由权限配置
|
|
4
|
-
* @param permissions 用户权限集合
|
|
5
|
-
* @returns {boolean|*}
|
|
6
|
-
*/
|
|
7
|
-
function hasPermission (authority, permissions) {
|
|
8
|
-
let required = '*'
|
|
9
|
-
if (typeof authority === 'string') {
|
|
10
|
-
required = authority
|
|
11
|
-
} else if (Array.isArray(authority)) {
|
|
12
|
-
required = authority
|
|
13
|
-
} else if (typeof authority === 'object') {
|
|
14
|
-
required = authority.permission
|
|
15
|
-
}
|
|
16
|
-
return required === '*' || hasAnyItem(required, permissions, (r, t) => !!(r === t || r === t.id))
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 判断是否有路由需要的角色
|
|
21
|
-
* @param authority 路由权限配置
|
|
22
|
-
* @param roles 用户角色集合
|
|
23
|
-
*/
|
|
24
|
-
function hasRole (authority, roles) {
|
|
25
|
-
let required
|
|
26
|
-
if (typeof authority === 'object') {
|
|
27
|
-
required = authority.role
|
|
28
|
-
}
|
|
29
|
-
return authority === '*' || hasAnyItem(required, roles, (r, t) => !!(r === t || r === t.id))
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 判断目标数组是否有所需元素
|
|
34
|
-
* @param {String | String[]}required 所需元素,数组或单个元素
|
|
35
|
-
* @param {String[]|Object[]} source 目标数组
|
|
36
|
-
* @param {Function} filter 匹配条件
|
|
37
|
-
* (r: String, s: String|Object) => boolean
|
|
38
|
-
* @returns {boolean}
|
|
39
|
-
*/
|
|
40
|
-
function hasAnyItem (required, source, filter) {
|
|
41
|
-
if (!required) {
|
|
42
|
-
return false
|
|
43
|
-
}
|
|
44
|
-
const checkedList = Array.isArray(required) ? required : [required]
|
|
45
|
-
return !!source.find(s => checkedList.find(r => filter(r, s)))
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 路由权限校验
|
|
50
|
-
* @param route 路由
|
|
51
|
-
* @param permissions 用户权限集合
|
|
52
|
-
* @param roles 用户角色集合
|
|
53
|
-
* @returns {boolean}
|
|
54
|
-
*/
|
|
55
|
-
function hasAuthority (route, permissions, roles) {
|
|
56
|
-
const authorities = [...route.meta.pAuthorities, route.meta.authority]
|
|
57
|
-
for (const authority of authorities) {
|
|
58
|
-
if (!hasPermission(authority, permissions) && !hasRole(authority, roles)) {
|
|
59
|
-
return false
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return true
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 根据权限配置过滤菜单数据
|
|
67
|
-
* @param menuData
|
|
68
|
-
* @param permissions
|
|
69
|
-
* @param roles
|
|
70
|
-
*/
|
|
71
|
-
function filterMenu (menuData, permissions, roles) {
|
|
72
|
-
return menuData.filter(menu => {
|
|
73
|
-
if (menu.meta && menu.meta.invisible === undefined) {
|
|
74
|
-
if (!hasAuthority(menu, permissions, roles)) {
|
|
75
|
-
return false
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (menu.children && menu.children.length > 0) {
|
|
79
|
-
menu.children = filterMenu(menu.children, permissions, roles)
|
|
80
|
-
}
|
|
81
|
-
return true
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { filterMenu, hasAuthority }
|
|
1
|
+
/**
|
|
2
|
+
* 判断是否有路由的权限
|
|
3
|
+
* @param authority 路由权限配置
|
|
4
|
+
* @param permissions 用户权限集合
|
|
5
|
+
* @returns {boolean|*}
|
|
6
|
+
*/
|
|
7
|
+
function hasPermission (authority, permissions) {
|
|
8
|
+
let required = '*'
|
|
9
|
+
if (typeof authority === 'string') {
|
|
10
|
+
required = authority
|
|
11
|
+
} else if (Array.isArray(authority)) {
|
|
12
|
+
required = authority
|
|
13
|
+
} else if (typeof authority === 'object') {
|
|
14
|
+
required = authority.permission
|
|
15
|
+
}
|
|
16
|
+
return required === '*' || hasAnyItem(required, permissions, (r, t) => !!(r === t || r === t.id))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 判断是否有路由需要的角色
|
|
21
|
+
* @param authority 路由权限配置
|
|
22
|
+
* @param roles 用户角色集合
|
|
23
|
+
*/
|
|
24
|
+
function hasRole (authority, roles) {
|
|
25
|
+
let required
|
|
26
|
+
if (typeof authority === 'object') {
|
|
27
|
+
required = authority.role
|
|
28
|
+
}
|
|
29
|
+
return authority === '*' || hasAnyItem(required, roles, (r, t) => !!(r === t || r === t.id))
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 判断目标数组是否有所需元素
|
|
34
|
+
* @param {String | String[]}required 所需元素,数组或单个元素
|
|
35
|
+
* @param {String[]|Object[]} source 目标数组
|
|
36
|
+
* @param {Function} filter 匹配条件
|
|
37
|
+
* (r: String, s: String|Object) => boolean
|
|
38
|
+
* @returns {boolean}
|
|
39
|
+
*/
|
|
40
|
+
function hasAnyItem (required, source, filter) {
|
|
41
|
+
if (!required) {
|
|
42
|
+
return false
|
|
43
|
+
}
|
|
44
|
+
const checkedList = Array.isArray(required) ? required : [required]
|
|
45
|
+
return !!source.find(s => checkedList.find(r => filter(r, s)))
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 路由权限校验
|
|
50
|
+
* @param route 路由
|
|
51
|
+
* @param permissions 用户权限集合
|
|
52
|
+
* @param roles 用户角色集合
|
|
53
|
+
* @returns {boolean}
|
|
54
|
+
*/
|
|
55
|
+
function hasAuthority (route, permissions, roles) {
|
|
56
|
+
const authorities = [...route.meta.pAuthorities, route.meta.authority]
|
|
57
|
+
for (const authority of authorities) {
|
|
58
|
+
if (!hasPermission(authority, permissions) && !hasRole(authority, roles)) {
|
|
59
|
+
return false
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return true
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 根据权限配置过滤菜单数据
|
|
67
|
+
* @param menuData
|
|
68
|
+
* @param permissions
|
|
69
|
+
* @param roles
|
|
70
|
+
*/
|
|
71
|
+
function filterMenu (menuData, permissions, roles) {
|
|
72
|
+
return menuData.filter(menu => {
|
|
73
|
+
if (menu.meta && menu.meta.invisible === undefined) {
|
|
74
|
+
if (!hasAuthority(menu, permissions, roles)) {
|
|
75
|
+
return false
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (menu.children && menu.children.length > 0) {
|
|
79
|
+
menu.children = filterMenu(menu.children, permissions, roles)
|
|
80
|
+
}
|
|
81
|
+
return true
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { filterMenu, hasAuthority }
|
package/src/utils/errorCode.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
401: '认证失败,无法访问系统资源',
|
|
3
|
-
403: '当前操作没有权限',
|
|
4
|
-
404: '访问资源不存在',
|
|
5
|
-
default: '系统未知错误,请反馈给管理员'
|
|
6
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
401: '认证失败,无法访问系统资源',
|
|
3
|
+
403: '当前操作没有权限',
|
|
4
|
+
404: '访问资源不存在',
|
|
5
|
+
default: '系统未知错误,请反馈给管理员'
|
|
6
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# vue2迁移vue3
|
|
2
|
-
|
|
3
|
-
1. 完成vue-cli,webpack,babel,eslint的升级
|
|
4
|
-
- core-js 3.30.1 -> 3.33.0
|
|
5
|
-
- add regenerator-runtime
|
|
6
|
-
- @babel/core 7.21.4 -> 7.22.20
|
|
7
|
-
- babel-eslint 10.1.0 -> @babel/eslint-parser 7.22.15
|
|
8
|
-
- @vue/cli 4.5.19 -> 5.0.8
|
|
9
|
-
- babel-jest 25.5.1 -> 26.6.3
|
|
10
|
-
- eslint 6.8.0 -> 7.32.0
|
|
11
|
-
- jest 24.0.0 -> 26.6.3
|
|
12
|
-
- webpack 4.46.0 -> 5.88.2
|
|
13
|
-
2. 完成vue2的2.7升级
|
|
14
|
-
- vue 2.6.14 -> 2.7.14
|
|
15
|
-
- eslint 7.32.0 -> 8.51.0
|
|
1
|
+
# vue2迁移vue3
|
|
2
|
+
|
|
3
|
+
1. 完成vue-cli,webpack,babel,eslint的升级
|
|
4
|
+
- core-js 3.30.1 -> 3.33.0
|
|
5
|
+
- add regenerator-runtime
|
|
6
|
+
- @babel/core 7.21.4 -> 7.22.20
|
|
7
|
+
- babel-eslint 10.1.0 -> @babel/eslint-parser 7.22.15
|
|
8
|
+
- @vue/cli 4.5.19 -> 5.0.8
|
|
9
|
+
- babel-jest 25.5.1 -> 26.6.3
|
|
10
|
+
- eslint 6.8.0 -> 7.32.0
|
|
11
|
+
- jest 24.0.0 -> 26.6.3
|
|
12
|
+
- webpack 4.46.0 -> 5.88.2
|
|
13
|
+
2. 完成vue2的2.7升级
|
|
14
|
+
- vue 2.6.14 -> 2.7.14
|
|
15
|
+
- eslint 7.32.0 -> 8.51.0
|
package/tests/unit/a.log
DELETED
|
File without changes
|