Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Guten-PigxUI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄卓然
Guten-PigxUI
Commits
5f92671a
Commit
5f92671a
authored
Sep 29, 2018
by
smallwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色页面转化crud
parent
fe96effb
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
274 additions
and
293 deletions
+274
-293
env.js
src/config/env.js
+3
-2
role.js
src/const/crud/role.js
+109
-0
user.js
src/const/crud/user.js
+44
-0
index.vue
src/views/admin/role/index.vue
+112
-284
index.vue
src/views/admin/user/index.vue
+6
-7
No files found.
src/config/env.js
View file @
5f92671a
...
...
@@ -2,7 +2,8 @@
const
env
=
process
.
env
let
baseUrl
=
''
;
let
iconfontVersion
=
[
'667895_5lt01cjobo7'
]
// 图表库为avue和pig2套地址
let
iconfontVersion
=
[
'667895_5lt01cjobo7'
,
'567566_qo5lxgtishg'
]
let
iconfontUrl
=
`//at.alicdn.com/t/font_$key.css`
;
let
codeUrl
=
`/code`
let
actUrl
=
`
${
window
.
origin
}
/act/modeler.html?modelId=`
;
...
...
@@ -20,4 +21,4 @@ export {
iconfontVersion
,
codeUrl
,
env
}
}
\ No newline at end of file
src/const/crud/role.js
0 → 100644
View file @
5f92671a
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
export
const
tableOption
=
{
border
:
true
,
index
:
true
,
indexLabel
:
'序号'
,
stripe
:
true
,
menuAlign
:
'center'
,
editBtn
:
false
,
delBtn
:
false
,
align
:
'center'
,
addBtn
:
false
,
column
:
[{
fixed
:
true
,
label
:
'id'
,
prop
:
'roleId'
,
span
:
24
,
editDisabled
:
true
,
addVisdiplay
:
false
,
},
{
fixed
:
true
,
label
:
'角色名称'
,
prop
:
'roleName'
,
search
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
'角色名称不能为空'
,
trigger
:
'blur'
},
{
min
:
3
,
max
:
20
,
message
:
'长度在 3 到 20 个字符'
,
trigger
:
'blur'
}
]
},
{
label
:
'角色标识'
,
prop
:
'roleCode'
,
search
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
'角色标识不能为空'
,
trigger
:
'blur'
},
{
min
:
3
,
max
:
20
,
message
:
'长度在 3 到 20 个字符'
,
trigger
:
'blur'
}
]
},
{
label
:
'所属部门'
,
prop
:
'roleDeptId'
,
formsolt
:
true
,
search
:
true
,
solt
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
'所属部门不能为空'
,
trigger
:
'blur'
},
{
min
:
3
,
max
:
20
,
message
:
'长度在 3 到 20 个字符'
,
trigger
:
'blur'
}
]
},
{
width
:
180
,
label
:
'角色描述'
,
prop
:
'roleDesc'
,
overHidden
:
true
,
type
:
'textarea'
,
minRows
:
6
,
span
:
24
,
},
{
width
:
180
,
label
:
'创建时间'
,
prop
:
'createTime'
,
search
:
true
,
more
:
true
,
type
:
'datetime'
,
format
:
'yyyy-MM-dd HH:mm'
,
valueFormat
:
'yyyy-MM-dd HH:mm:ss'
,
editDisabled
:
true
,
addVisdiplay
:
false
,
span
:
24
,
}]
}
\ No newline at end of file
src/const/crud/user.js
View file @
5f92671a
...
...
@@ -38,30 +38,72 @@ export const tableOption = {
solt
:
true
,
search
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
"请输入账户"
,
trigger
:
"blur"
},
{
min
:
3
,
max
:
20
,
message
:
"长度在 3 到 20 个字符"
,
trigger
:
"blur"
}
]
},
{
label
:
'密码'
,
prop
:
'password'
,
type
:
'password'
,
hide
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
"请输入密码"
,
trigger
:
"blur"
},
{
min
:
6
,
max
:
20
,
message
:
"长度在 6 到 20 个字符"
,
trigger
:
"blur"
}
]
},
{
label
:
'所属部门'
,
prop
:
'deptId'
,
search
:
true
,
formsolt
:
true
,
solt
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
"请选择部门"
,
trigger
:
"blur"
}]
},
{
label
:
'角色'
,
prop
:
'role'
,
formsolt
:
true
,
solt
:
true
,
search
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
"请选择角色"
,
trigger
:
"blur"
}],
},
{
label
:
'状态'
,
prop
:
'delFlag'
,
type
:
"select"
,
solt
:
true
,
search
:
true
,
span
:
24
,
rules
:
[{
required
:
true
,
message
:
"请选择状态"
,
trigger
:
"blur"
}],
dicData
:
[{
label
:
'有效'
,
value
:
'0'
...
...
@@ -79,6 +121,8 @@ export const tableOption = {
type
:
'datetime'
,
format
:
'yyyy-MM-dd HH:mm'
,
valueFormat
:
'yyyy-MM-dd HH:mm:ss'
,
search
:
true
,
more
:
true
,
editDisabled
:
true
,
addVisdiplay
:
false
,
span
:
24
,
...
...
src/views/admin/role/index.vue
View file @
5f92671a
This diff is collapsed.
Click to expand it.
src/views/admin/user/index.vue
View file @
5f92671a
...
...
@@ -67,18 +67,19 @@
<el-button
v-if=
"sys_user_edit"
size=
"small"
type=
"success"
@
click=
"handleUpdate(scope.row,scope.i
d
)"
>
编辑
@
click=
"handleUpdate(scope.row,scope.i
ndex
)"
>
编辑
</el-button>
<el-button
v-if=
"sys_user_del"
size=
"small"
type=
"danger"
@
click=
"deletes(scope.row,scope.i
d
)"
>
删除
@
click=
"deletes(scope.row,scope.i
ndex
)"
>
删除
</el-button>
</
template
>
<
template
slot=
"deptIdForm"
slot-scope=
"scope"
>
<avue-crud-input
v-model=
"form.deptId"
type=
"tree"
placeholder=
"请选择所属部门"
:node-click=
"getNodeData"
:dic=
"treeDeptData"
:props=
"defaultProps"
></avue-crud-input>
...
...
@@ -87,6 +88,7 @@
slot-scope=
"scope"
>
<avue-crud-select
v-model=
"role"
multiple
placeholder=
"请选择角色,要先选择部门"
:dic=
"rolesOptions"
:props=
"roleProps"
></avue-crud-select>
</
template
>
...
...
@@ -180,7 +182,7 @@ export default {
});
},
handleFilter
(
param
)
{
this
.
listQuery
.
username
=
param
.
username
;
this
.
listQuery
=
Object
.
assign
(
this
.
listQuery
,
param
)
this
.
listQuery
.
page
=
1
;
this
.
getList
();
},
...
...
@@ -228,10 +230,7 @@ export default {
});
}).
catch
(()
=>
{
loading
();
});;
},
cancel
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
});
},
update
(
row
,
index
,
done
,
loading
)
{
putObj
(
this
.
form
).
then
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment