haiwei-module-admin 1.0.0
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 +54 -0
- package/src/api/components/account.js +58 -0
- package/src/api/components/auditInfo.js +30 -0
- package/src/api/components/auth.js +47 -0
- package/src/api/components/cache.js +16 -0
- package/src/api/components/config.js +34 -0
- package/src/api/components/file.js +41 -0
- package/src/api/components/log.js +22 -0
- package/src/api/components/menu.js +68 -0
- package/src/api/components/mime.js +10 -0
- package/src/api/components/module.js +18 -0
- package/src/api/components/permission.js +25 -0
- package/src/api/components/role.js +73 -0
- package/src/api/components/tool.js +29 -0
- package/src/api/index.js +13 -0
- package/src/components/config-admin/index.vue +47 -0
- package/src/components/enum-checkbox/index.vue +31 -0
- package/src/components/enum-radio/index.vue +31 -0
- package/src/components/enum-select/index.vue +31 -0
- package/src/components/file-download/index.vue +81 -0
- package/src/components/file-img/index.vue +55 -0
- package/src/components/file-upload/index.vue +140 -0
- package/src/components/file-upload-img/index.vue +263 -0
- package/src/components/index.js +10 -0
- package/src/components/login-mode-select/index.vue +11 -0
- package/src/components/module-select/index.vue +11 -0
- package/src/components/platform-select/index.vue +28 -0
- package/src/components/role-select/index.vue +11 -0
- package/src/components/upload-mixins.js +127 -0
- package/src/config/index.js +18 -0
- package/src/index.js +69 -0
- package/src/main.js +5 -0
- package/src/module.js +10 -0
- package/src/routes/index.js +3 -0
- package/src/store/index.js +4 -0
- package/src/views/account/components/save/index.vue +65 -0
- package/src/views/account/index/cols.js +50 -0
- package/src/views/account/index/index.vue +127 -0
- package/src/views/account/index/page.js +57 -0
- package/src/views/auditInfo/components/details/index.vue +64 -0
- package/src/views/auditInfo/index/cols.js +63 -0
- package/src/views/auditInfo/index/index.vue +118 -0
- package/src/views/auditInfo/index/page.js +34 -0
- package/src/views/button/permission-bind/index.vue +50 -0
- package/src/views/cache/index/cols.js +10 -0
- package/src/views/cache/index/index.vue +64 -0
- package/src/views/cache/index/page.js +29 -0
- package/src/views/config/index.vue +43 -0
- package/src/views/config/library/components/auth/index.vue +165 -0
- package/src/views/config/library/components/component/index.vue +149 -0
- package/src/views/config/library/components/path/index.vue +45 -0
- package/src/views/config/library/components/quartz/index.vue +66 -0
- package/src/views/config/library/components/system/index.vue +58 -0
- package/src/views/config/library/form-mixins.js +25 -0
- package/src/views/config/library/index.vue +76 -0
- package/src/views/config/module/index.vue +64 -0
- package/src/views/config/page.js +21 -0
- package/src/views/file/index/cols.js +53 -0
- package/src/views/file/index/index.vue +52 -0
- package/src/views/file/index/page.js +42 -0
- package/src/views/home/components/bottom/index.vue +217 -0
- package/src/views/home/components/top-left/index.vue +43 -0
- package/src/views/home/components/top-right/index.vue +148 -0
- package/src/views/home/index.vue +27 -0
- package/src/views/home/page.js +15 -0
- package/src/views/icon/index.vue +92 -0
- package/src/views/icon/page.js +15 -0
- package/src/views/log/login-log/cols.js +43 -0
- package/src/views/log/login-log/index.vue +86 -0
- package/src/views/log/login-log/page.js +27 -0
- package/src/views/menu/components/add/components/link/index.vue +106 -0
- package/src/views/menu/components/add/components/mixins.js +83 -0
- package/src/views/menu/components/add/components/node/index.vue +53 -0
- package/src/views/menu/components/add/components/route/index.vue +122 -0
- package/src/views/menu/components/add/index.vue +86 -0
- package/src/views/menu/components/edit/components/link/index.vue +106 -0
- package/src/views/menu/components/edit/components/mixins.js +80 -0
- package/src/views/menu/components/edit/components/node/index.vue +53 -0
- package/src/views/menu/components/edit/components/route/index.vue +122 -0
- package/src/views/menu/components/edit/index.vue +95 -0
- package/src/views/menu/components/tree/index.vue +153 -0
- package/src/views/menu/index/cols.js +46 -0
- package/src/views/menu/index/index.vue +175 -0
- package/src/views/menu/index/page.js +48 -0
- package/src/views/mime/components/save/index.vue +45 -0
- package/src/views/mime/index/cols.js +16 -0
- package/src/views/mime/index/index.vue +55 -0
- package/src/views/mime/index/page.js +42 -0
- package/src/views/module/components/page-list/index.vue +234 -0
- package/src/views/module/components/permission-list/cols.js +36 -0
- package/src/views/module/components/permission-list/index.vue +90 -0
- package/src/views/module/index/index.vue +226 -0
- package/src/views/module/index/page.js +21 -0
- package/src/views/role/components/menu-bind/index.vue +85 -0
- package/src/views/role/components/page-bind/index.vue +221 -0
- package/src/views/role/components/platform-bind/index.vue +105 -0
- package/src/views/role/components/save/index.vue +45 -0
- package/src/views/role/components/tree/index.vue +112 -0
- package/src/views/role/index/index.vue +67 -0
- package/src/views/role/index/page.js +64 -0
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "haiwei-module-admin",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "HaiWei前端Admin模块组件",
|
|
5
|
+
"author": "Eric",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"main": "src/index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"serve": "vue-cli-service serve",
|
|
10
|
+
"build": "vue-cli-service build",
|
|
11
|
+
"lint": "vue-cli-service lint",
|
|
12
|
+
"cm": "powershell -Command \"if (Test-Path node_modules) { Remove-Item -Recurse -Force node_modules }; if (Test-Path dist) { Remove-Item -Recurse -Force dist }\"",
|
|
13
|
+
"cc": "powershell -Command \"if (Test-Path node_modules/.cache) { Remove-Item -Recurse -Force node_modules/.cache }\"",
|
|
14
|
+
"i": "cd ./script && npm_install.bat",
|
|
15
|
+
"up": "cd ./script && npm_update.bat",
|
|
16
|
+
"pub": "cd ./script && npm_publish.bat"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"haiwei-skins-classics": "^1.0.2",
|
|
20
|
+
"haiwei-ui": "^1.0.2"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@vue/cli-plugin-babel": "^4.4.4",
|
|
24
|
+
"@vue/cli-plugin-eslint": "^4.4.4",
|
|
25
|
+
"@vue/cli-plugin-router": "^4.4.4",
|
|
26
|
+
"@vue/cli-plugin-vuex": "^4.4.4",
|
|
27
|
+
"@vue/cli-service": "^4.4.4",
|
|
28
|
+
"@vue/eslint-config-prettier": "^5.0.0",
|
|
29
|
+
"babel-eslint": "^10.1.0",
|
|
30
|
+
"eslint": "^5.16.0",
|
|
31
|
+
"eslint-plugin-prettier": "^3.1.4",
|
|
32
|
+
"eslint-plugin-vue": "^5.0.0",
|
|
33
|
+
"prettier": "^1.18.2",
|
|
34
|
+
"raw-loader": "^3.1.0",
|
|
35
|
+
"rimraf": "^3.0.2",
|
|
36
|
+
"sass": "^1.26.8",
|
|
37
|
+
"sass-loader": "^8.0.2",
|
|
38
|
+
"vue-template-compiler": "^2.6.11"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/iamoldli/haiwei.main.git"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"haiwei",
|
|
46
|
+
"admin",
|
|
47
|
+
"module",
|
|
48
|
+
"vue",
|
|
49
|
+
"ui-framework"
|
|
50
|
+
],
|
|
51
|
+
"files": [
|
|
52
|
+
"src"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
|
|
7
|
+
const urls = {
|
|
8
|
+
updatePassword: root + 'updatepassword',
|
|
9
|
+
bindRole: root + 'bindrole',
|
|
10
|
+
resetPassword: root + 'ResetPassword',
|
|
11
|
+
skinUpdate: root + 'SkinUpdate',
|
|
12
|
+
active: root + 'Active'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @description 修改密码
|
|
17
|
+
*/
|
|
18
|
+
const updatePassword = params => {
|
|
19
|
+
return $http.post(urls.updatePassword, params)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @description 绑定角色
|
|
24
|
+
*/
|
|
25
|
+
const bindRole = params => {
|
|
26
|
+
return $http.post(urls.bindRole, params)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @description 重置密码
|
|
31
|
+
*/
|
|
32
|
+
const resetPassword = id => {
|
|
33
|
+
return $http.post(urls.resetPassword + '?id=' + id)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @description 皮肤修改
|
|
38
|
+
* @param {Object} params
|
|
39
|
+
*/
|
|
40
|
+
const skinUpdate = params => {
|
|
41
|
+
return $http.post(urls.skinUpdate, params)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//激活
|
|
45
|
+
const active = id => {
|
|
46
|
+
return $http.post(urls.active + '?id=' + id)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 接口集合
|
|
50
|
+
return {
|
|
51
|
+
...crud,
|
|
52
|
+
updatePassword,
|
|
53
|
+
bindRole,
|
|
54
|
+
resetPassword,
|
|
55
|
+
skinUpdate,
|
|
56
|
+
active
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
const urls = {
|
|
7
|
+
details: root + 'Details',
|
|
8
|
+
queryLatestWeekPv: root + 'QueryLatestWeekPv',
|
|
9
|
+
export: root + 'Export'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const details = id => {
|
|
13
|
+
return $http.get(urls.details, { id })
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const queryLatestWeekPv = () => {
|
|
17
|
+
return $http.get(urls.queryLatestWeekPv)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const exportData = params => {
|
|
21
|
+
return $http.export(urls.export, params)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
...crud,
|
|
26
|
+
details,
|
|
27
|
+
queryLatestWeekPv,
|
|
28
|
+
exportData
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const urls = {
|
|
6
|
+
getVerifyCode: root + 'VerifyCode',
|
|
7
|
+
login: root + 'Login',
|
|
8
|
+
refreshToken: root + 'RefreshToken',
|
|
9
|
+
getAuthInfo: root + 'AuthInfo'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description 获取验证码
|
|
14
|
+
*/
|
|
15
|
+
const getVerifyCode = () => {
|
|
16
|
+
return $http.get(urls.getVerifyCode)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description 登录
|
|
21
|
+
* @param {*} params
|
|
22
|
+
*/
|
|
23
|
+
const login = async params => {
|
|
24
|
+
return $http.post(urls.login, params)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @description 刷新令牌
|
|
29
|
+
*/
|
|
30
|
+
const refreshToken = refreshToken => {
|
|
31
|
+
return $http.get(urls.refreshToken, { refreshToken })
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description 获取登录账户信息
|
|
36
|
+
*/
|
|
37
|
+
const getAuthInfo = () => {
|
|
38
|
+
return $http.get(urls.getAuthInfo)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
getVerifyCode,
|
|
43
|
+
login,
|
|
44
|
+
refreshToken,
|
|
45
|
+
getAuthInfo
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
const urls = {
|
|
7
|
+
clear: root + 'Clear'
|
|
8
|
+
}
|
|
9
|
+
const clear = prefix => {
|
|
10
|
+
return $http.delete(urls.clear, { prefix })
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
...crud,
|
|
14
|
+
clear
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const urls = {
|
|
6
|
+
ui: root + 'UI',
|
|
7
|
+
edit: root + 'Edit',
|
|
8
|
+
update: root + 'Update',
|
|
9
|
+
descriptors: root + 'Descriptors'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const getUI = () => {
|
|
13
|
+
return $http.get(urls.ui)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const edit = params => {
|
|
17
|
+
return $http.get(urls.edit, params)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const update = params => {
|
|
21
|
+
return $http.post(urls.update, params)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const getDescriptors = () => {
|
|
25
|
+
return $http.get(urls.descriptors)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
getUI,
|
|
30
|
+
edit,
|
|
31
|
+
update,
|
|
32
|
+
getDescriptors
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
const urls = {
|
|
7
|
+
upload: root + 'Upload',
|
|
8
|
+
hardDelete: root + 'HardDelete'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const getUploadUrl = () => {
|
|
12
|
+
return `${$http.axios.defaults.baseURL}${urls.upload}`
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const hardDelete = id => {
|
|
16
|
+
return $http.delete(urls.hardDelete, { id })
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const getByFullPath = fullPath => {
|
|
20
|
+
return $http.get(root + fullPath)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 图片预览
|
|
24
|
+
const preview = url => {
|
|
25
|
+
return $http.preview(url)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 文件下载
|
|
29
|
+
const download = url => {
|
|
30
|
+
return $http.download(url)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
...crud,
|
|
35
|
+
getUploadUrl,
|
|
36
|
+
hardDelete,
|
|
37
|
+
getByFullPath,
|
|
38
|
+
preview,
|
|
39
|
+
download
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const urls = {
|
|
6
|
+
queryLogin: root + 'Login',
|
|
7
|
+
exportLogin: root + 'LoginExport'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const queryLogin = params => {
|
|
11
|
+
return $http.get(urls.queryLogin, params)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const exportLogin = params => {
|
|
15
|
+
return $http.export(urls.exportLogin, params)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
queryLogin,
|
|
20
|
+
exportLogin
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
const urls = {
|
|
7
|
+
getTree: root + 'tree',
|
|
8
|
+
getTargetSelect: root + 'targetselect',
|
|
9
|
+
permissionList: root + 'PermissionList',
|
|
10
|
+
bindPermission: root + 'bindPermission',
|
|
11
|
+
buttonList: root + 'buttonlist',
|
|
12
|
+
sort: root + 'sort'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @description 菜单树
|
|
17
|
+
*/
|
|
18
|
+
const getTree = () => {
|
|
19
|
+
return $http.get(urls.getTree)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @description 获取菜单打开方式下拉列表
|
|
24
|
+
*/
|
|
25
|
+
const getTargetSelect = () => {
|
|
26
|
+
return $http.get(urls.getTargetSelect)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @description 获取权限列表
|
|
31
|
+
*/
|
|
32
|
+
const permissionList = id => {
|
|
33
|
+
return $http.get(urls.permissionList, { id })
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @description 绑定权限
|
|
38
|
+
*/
|
|
39
|
+
const bindPermission = params => {
|
|
40
|
+
return $http.post(urls.bindPermission, params)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @description 获取菜单列表
|
|
45
|
+
*/
|
|
46
|
+
const buttonList = id => {
|
|
47
|
+
return $http.get(urls.buttonList, { id })
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const querySortList = parentId => {
|
|
51
|
+
return $http.get(urls.sort, { parentId })
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const updateSortList = params => {
|
|
55
|
+
return $http.post(urls.sort, params)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
...crud,
|
|
60
|
+
getTree,
|
|
61
|
+
getTargetSelect,
|
|
62
|
+
permissionList,
|
|
63
|
+
bindPermission,
|
|
64
|
+
buttonList,
|
|
65
|
+
querySortList,
|
|
66
|
+
updateSortList
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
const urls = {
|
|
7
|
+
select: root + 'select'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @description 下拉框
|
|
12
|
+
*/
|
|
13
|
+
const select = () => {
|
|
14
|
+
return $http.get(urls.select)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return { ...crud, select }
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
|
|
7
|
+
const urls = {
|
|
8
|
+
tree: root + 'Tree',
|
|
9
|
+
queryByCodes: root + 'QueryByCodes'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const tree = () => {
|
|
13
|
+
return $http.get(urls.tree)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const queryByCodes = codes => {
|
|
17
|
+
return $http.get(urls.queryByCodes, { codes })
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
...crud,
|
|
22
|
+
tree,
|
|
23
|
+
queryByCodes
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
const crud = $http.crud(root)
|
|
6
|
+
const urls = {
|
|
7
|
+
select: root + 'select',
|
|
8
|
+
bindPages: root + 'BindPages',
|
|
9
|
+
bindMenus: root + 'BindMenus',
|
|
10
|
+
bindPlatformPermissions: root + 'BindPlatformPermissions'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @description 下拉框
|
|
15
|
+
*/
|
|
16
|
+
const select = () => {
|
|
17
|
+
return $http.get(urls.select)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @description 获取绑定的页面列表
|
|
22
|
+
* @param {*} id 角色编号
|
|
23
|
+
*/
|
|
24
|
+
const queryBindPages = id => {
|
|
25
|
+
return $http.get(urls.bindPages, { id })
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 绑定页面
|
|
30
|
+
*/
|
|
31
|
+
const bindPages = params => {
|
|
32
|
+
return $http.post(urls.bindPages, params)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @description 获取绑定的菜单列表
|
|
37
|
+
* @param {*} id 角色编号
|
|
38
|
+
*/
|
|
39
|
+
const queryBindMenus = id => {
|
|
40
|
+
return $http.get(urls.bindMenus, { id })
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @description 绑定页面
|
|
45
|
+
*/
|
|
46
|
+
const bindMenus = params => {
|
|
47
|
+
return $http.post(urls.bindMenus, params)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @description 获取绑定的平台权限列表
|
|
52
|
+
*/
|
|
53
|
+
const queryBindPlatformPermissions = params => {
|
|
54
|
+
return $http.get(urls.bindPlatformPermissions, params)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @description 绑定页面
|
|
59
|
+
*/
|
|
60
|
+
const bindPlatformPermissions = params => {
|
|
61
|
+
return $http.post(urls.bindPlatformPermissions, params)
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
...crud,
|
|
65
|
+
select,
|
|
66
|
+
queryBindPages,
|
|
67
|
+
bindPages,
|
|
68
|
+
queryBindMenus,
|
|
69
|
+
bindMenus,
|
|
70
|
+
queryBindPlatformPermissions,
|
|
71
|
+
bindPlatformPermissions
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import module from '../../module'
|
|
2
|
+
|
|
3
|
+
export default name => {
|
|
4
|
+
const root = `${module.code}/${name}/`
|
|
5
|
+
|
|
6
|
+
const urls = {
|
|
7
|
+
enumSelect: root + 'EnumSelect',
|
|
8
|
+
platformSelect: root + 'PlatformSelect',
|
|
9
|
+
loginModeSelect: root + 'LoginModeSelect'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const enumSelect = params => {
|
|
13
|
+
return $http.get(urls.enumSelect, params)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const platformSelect = () => {
|
|
17
|
+
return $http.get(urls.platformSelect)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const loginModeSelect = () => {
|
|
21
|
+
return $http.get(urls.loginModeSelect)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
enumSelect,
|
|
26
|
+
platformSelect,
|
|
27
|
+
loginModeSelect
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/api/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import module from '../module'
|
|
2
|
+
|
|
3
|
+
// 注册接口列表为window全局属性
|
|
4
|
+
window.$api = {}
|
|
5
|
+
|
|
6
|
+
let apis = {}
|
|
7
|
+
const requireComponent = require.context('./components', true, /\.*\.js$/)
|
|
8
|
+
requireComponent.keys().map(fileName => {
|
|
9
|
+
const name = fileName.replace('./', '').replace('.js', '')
|
|
10
|
+
const func = requireComponent(fileName).default
|
|
11
|
+
apis[name] = func(name)
|
|
12
|
+
})
|
|
13
|
+
$api[module.code] = apis
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-form-page v-bind="form">
|
|
3
|
+
<el-row>
|
|
4
|
+
<el-col :span="10" :offset="1">
|
|
5
|
+
<el-form-item label="登录日志:" prop="loginLog">
|
|
6
|
+
<el-switch v-model="form.model.loginLog" />
|
|
7
|
+
</el-form-item>
|
|
8
|
+
</el-col>
|
|
9
|
+
<el-col :span="10">
|
|
10
|
+
<el-form-item label="账户默认密码:" prop="defaultPassword">
|
|
11
|
+
<el-input v-model="form.model.defaultPassword" />
|
|
12
|
+
</el-form-item>
|
|
13
|
+
</el-col>
|
|
14
|
+
</el-row>
|
|
15
|
+
</nm-form-page>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import module from '../../module'
|
|
19
|
+
const { edit, update } = $api.admin.config
|
|
20
|
+
export default {
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
code: module.code,
|
|
24
|
+
type: 1,
|
|
25
|
+
form: {
|
|
26
|
+
header: false,
|
|
27
|
+
action: this.update,
|
|
28
|
+
labelWidth: '200px',
|
|
29
|
+
model: {
|
|
30
|
+
loginLog: false,
|
|
31
|
+
defaultPassword: ''
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
update() {
|
|
38
|
+
return update({ type: this.type, code: this.code, json: JSON.stringify(this.form.model) })
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
created() {
|
|
42
|
+
edit({ type: this.type, code: this.code }).then(data => {
|
|
43
|
+
this.form.model = data
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { mixins } from 'netmodular-ui'
|
|
3
|
+
export default {
|
|
4
|
+
mixins: [mixins.checkbox],
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
action: this.query
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
/**模块编码 */
|
|
12
|
+
moduleCode: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
/**枚举名称 */
|
|
17
|
+
enumName: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
/**所在库名称,如:Domain、Application等,默认Domain */
|
|
22
|
+
libName: String
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
query() {
|
|
26
|
+
const { moduleCode, enumName, libName } = this
|
|
27
|
+
return $api.admin.tool.enumSelect({ moduleCode, enumName, libName })
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { mixins } from 'netmodular-ui'
|
|
3
|
+
export default {
|
|
4
|
+
mixins: [mixins.radio],
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
action: this.query
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
/**模块编码 */
|
|
12
|
+
moduleCode: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
/**枚举名称 */
|
|
17
|
+
enumName: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
/**所在库名称,如:Domain、Application等,默认Domain */
|
|
22
|
+
libName: String
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
query() {
|
|
26
|
+
const { moduleCode, enumName, libName } = this
|
|
27
|
+
return $api.admin.tool.enumSelect({ moduleCode, enumName, libName })
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { mixins } from 'netmodular-ui'
|
|
3
|
+
export default {
|
|
4
|
+
mixins: [mixins.select],
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
action: this.query
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
/**模块编码 */
|
|
12
|
+
moduleCode: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
/**枚举名称 */
|
|
17
|
+
enumName: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
/**所在库 */
|
|
22
|
+
libName: String
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
query() {
|
|
26
|
+
const { moduleCode, enumName, libName } = this
|
|
27
|
+
return $api.admin.tool.enumSelect({ moduleCode, enumName, libName })
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|