Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5b3ccb43
authored
Nov 10, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改规则
1 parent
68cc569a
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
31 deletions
src/components/rule-form/index.vue
src/utils/constants.js
src/views/dictionaryManage/dictionaryData/index.vue
src/views/dictionaryManage/index.vue
src/views/menuManage/index.vue
src/views/orginizaManage/index.vue
src/views/role/index.vue
src/views/user/index.vue
src/components/rule-form/index.vue
View file @
5b3ccb4
...
@@ -21,11 +21,6 @@
...
@@ -21,11 +21,6 @@
v-if=
"item.clickFunc"
v-if=
"item.clickFunc"
:type=
"item.inputText || 'text'"
:type=
"item.inputText || 'text'"
:readonly=
"item.readonly || false"
:readonly=
"item.readonly || false"
:disabled=
"item.disabled || false"
:maxlength=
"item.maxlength"
:minlength=
"item.minlength"
:clearable=
"item.clearable"
show-word-limit
@
click
.
native=
"item.clickFunc"
@
click
.
native=
"item.clickFunc"
:class=
"item.clickFunc ? 'pointer' : ''"
:class=
"item.clickFunc ? 'pointer' : ''"
:ref=
"item.ref"
:ref=
"item.ref"
...
@@ -41,8 +36,9 @@
...
@@ -41,8 +36,9 @@
v-model=
"ruleForm[item.prop]"
v-model=
"ruleForm[item.prop]"
:maxlength=
"item.maxlength"
:maxlength=
"item.maxlength"
:minlength=
"item.minlength"
:minlength=
"item.minlength"
:show-password=
"item.showPassword || false"
:clearable=
"item.clearable"
:clearable=
"item.clearable"
show-word-limit
:show-word-limit=
"item.showWordLimit || false"
>
>
</el-input>
</el-input>
</
template
>
</
template
>
...
...
src/utils/constants.js
View file @
5b3ccb4
...
@@ -26,6 +26,11 @@ const Constants = {
...
@@ -26,6 +26,11 @@ const Constants = {
2
:
'菜单'
,
2
:
'菜单'
,
3
:
'按钮'
3
:
'按钮'
},
},
MENU_NAME
:
{
1
:
'目录'
,
2
:
'菜单'
,
3
:
'按钮'
},
// 菜单状态
// 菜单状态
MENU_STATUS
:
{
MENU_STATUS
:
{
1
:
'正常, green'
,
1
:
'正常, green'
,
...
...
src/views/dictionaryManage/dictionaryData/index.vue
View file @
5b3ccb4
...
@@ -109,7 +109,7 @@ export default {
...
@@ -109,7 +109,7 @@ export default {
placeholder
:
'请选择字典状态'
,
placeholder
:
'请选择字典状态'
,
options
:
[
options
:
[
{
{
label
:
'
正常
'
,
label
:
'
启用
'
,
value
:
1
value
:
1
},
{
},
{
label
:
'停用'
,
label
:
'停用'
,
...
@@ -174,11 +174,11 @@ export default {
...
@@ -174,11 +174,11 @@ export default {
},
},
dictDataData
:
[
dictDataData
:
[
{
label
:
'字典类型:'
,
prop
:
'dictType'
,
type
:
'input'
,
readonly
:
true
},
{
label
:
'字典类型:'
,
prop
:
'dictType'
,
type
:
'input'
,
readonly
:
true
},
{
label
:
'字典标签:'
,
prop
:
'dictLabel'
,
type
:
'input'
,
maxlength
:
5
0
},
{
label
:
'字典标签:'
,
prop
:
'dictLabel'
,
type
:
'input'
,
maxlength
:
2
0
},
{
label
:
'字典键值:'
,
prop
:
'dictValue'
,
type
:
'input'
,
maxlength
:
50
},
{
label
:
'字典键值:'
,
prop
:
'dictValue'
,
type
:
'input'
,
maxlength
:
50
},
{
label
:
'字典顺序:'
,
prop
:
'dictSort'
,
type
:
'input'
},
{
label
:
'字典顺序:'
,
prop
:
'dictSort'
,
type
:
'input'
},
{
label
:
'状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'备注'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
}
{
label
:
'备注'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
,
maxlength
:
200
,
showWordLimit
:
true
}
],
],
dictDataRules
:
{
dictDataRules
:
{
dictType
:
[{
required
:
true
}],
dictType
:
[{
required
:
true
}],
...
...
src/views/dictionaryManage/index.vue
View file @
5b3ccb4
...
@@ -175,16 +175,14 @@ export default {
...
@@ -175,16 +175,14 @@ export default {
enableStatus
:
true
enableStatus
:
true
},
},
dictionaryData
:
[
dictionaryData
:
[
{
label
:
'字典名称:'
,
prop
:
'dictName'
,
type
:
'input'
,
maxlength
:
5
0
},
{
label
:
'字典名称:'
,
prop
:
'dictName'
,
type
:
'input'
,
maxlength
:
2
0
},
{
label
:
'字典类型'
,
prop
:
'dictType'
,
type
:
'input'
,
maxlength
:
50
},
{
label
:
'字典类型'
,
prop
:
'dictType'
,
type
:
'input'
,
maxlength
:
50
},
{
label
:
'状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'备注'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
,
maxlength
:
200
}
{
label
:
'备注'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
,
maxlength
:
200
,
showWordLimit
:
true
}
],
],
dictionaryRules
:
{
dictionaryRules
:
{
dictName
:
[{
required
:
true
,
message
:
'请输入字典名称'
,
trigger
:
blur
},
dictName
:
[{
required
:
true
,
message
:
'请输入字典名称'
,
trigger
:
blur
}],
{
validator
:
this
.
$Common
.
checkName
,
trigger
:
'blur'
}],
dictType
:
[{
required
:
true
,
message
:
'请输入字典类型'
,
trigger
:
blur
}],
dictType
:
[{
required
:
true
,
message
:
'请输入字典类型'
,
trigger
:
blur
},
{
validator
:
this
.
$Common
.
checkName
,
trigger
:
'blur'
}],
enableStatus
:
[{
required
:
true
}]
enableStatus
:
[{
required
:
true
}]
}
}
}
}
...
...
src/views/menuManage/index.vue
View file @
5b3ccb4
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</
template
>
</
template
>
<
template
v-else-if=
"item.prop === 'type'"
>
<
template
v-else-if=
"item.prop === 'type'"
>
<span>
<span>
{{
scope
.
row
.
type
?
MENU_
TYP
E
[
scope
.
row
.
type
]
:
'--'
}}
{{
scope
.
row
.
type
?
MENU_
NAM
E
[
scope
.
row
.
type
]
:
'--'
}}
</span>
</span>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -147,7 +147,7 @@ export default {
...
@@ -147,7 +147,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
MENUSTATUS
:
this
.
$Constants
.
MENU_STATUS
,
MENUSTATUS
:
this
.
$Constants
.
MENU_STATUS
,
MENU_
TYPE
:
this
.
$Constants
.
MENU_TYP
E
,
MENU_
NAME
:
this
.
$Constants
.
MENU_NAM
E
,
searchForm
:
{},
searchForm
:
{},
menuFormList
:
[
menuFormList
:
[
{
{
...
@@ -221,7 +221,7 @@ export default {
...
@@ -221,7 +221,7 @@ export default {
menuData
:
[
menuData
:
[
{
label
:
'菜单类型'
,
prop
:
'type'
,
type
:
'radio'
,
children
:
this
.
$Constants
.
MENU_TYPE
,
disabled
:
false
},
{
label
:
'菜单类型'
,
prop
:
'type'
,
type
:
'radio'
,
children
:
this
.
$Constants
.
MENU_TYPE
,
disabled
:
false
},
{
label
:
'上级菜单'
,
prop
:
'parentName'
,
type
:
'input'
,
readonly
:
true
,
clickFunc
:
this
.
selectSuperior
,
hidden
:
true
},
{
label
:
'上级菜单'
,
prop
:
'parentName'
,
type
:
'input'
,
readonly
:
true
,
clickFunc
:
this
.
selectSuperior
,
hidden
:
true
},
{
label
:
'菜单名称'
,
prop
:
'menuName'
,
type
:
'input'
},
{
label
:
'菜单名称'
,
prop
:
'menuName'
,
type
:
'input'
,
maxlength
:
20
},
{
label
:
'权限标识'
,
prop
:
'permissionTag'
,
type
:
'input'
},
{
label
:
'权限标识'
,
prop
:
'permissionTag'
,
type
:
'input'
},
{
label
:
'前端路由'
,
prop
:
'frontRoute'
,
type
:
'input'
},
{
label
:
'前端路由'
,
prop
:
'frontRoute'
,
type
:
'input'
},
{
label
:
'显示排序'
,
prop
:
'orderNum'
,
type
:
'input'
},
{
label
:
'显示排序'
,
prop
:
'orderNum'
,
type
:
'input'
},
...
@@ -231,7 +231,8 @@ export default {
...
@@ -231,7 +231,8 @@ export default {
menuRules
:
{
menuRules
:
{
type
:
[{
required
:
true
,
message
:
'请选择菜单类型'
,
trigger
:
'blur'
}],
type
:
[{
required
:
true
,
message
:
'请选择菜单类型'
,
trigger
:
'blur'
}],
menuName
:
[{
required
:
true
,
message
:
'请输入菜单名称'
,
trigger
:
'blur'
}],
menuName
:
[{
required
:
true
,
message
:
'请输入菜单名称'
,
trigger
:
'blur'
}],
orderNum
:
[{
required
:
true
,
message
:
'请输入显示排序'
,
trigger
:
'blur'
}],
orderNum
:
[{
required
:
true
,
message
:
'请输入显示排序'
,
trigger
:
'blur'
},
{
validator
:
this
.
$Common
.
checkRegExpNumber
,
trigger
:
'blur'
}],
enableStatus
:
[{
required
:
true
}],
enableStatus
:
[{
required
:
true
}],
},
},
// 部门弹窗
// 部门弹窗
...
...
src/views/orginizaManage/index.vue
View file @
5b3ccb4
...
@@ -182,13 +182,14 @@ export default {
...
@@ -182,13 +182,14 @@ export default {
},
},
orginizaData
:
[
orginizaData
:
[
{
label
:
'上级组织'
,
prop
:
'superiorName'
,
type
:
'input'
,
hidden
:
false
,
readonly
:
true
},
{
label
:
'上级组织'
,
prop
:
'superiorName'
,
type
:
'input'
,
hidden
:
false
,
readonly
:
true
},
{
label
:
'组织名称'
,
prop
:
'departmentName'
,
type
:
'input'
},
{
label
:
'组织名称'
,
prop
:
'departmentName'
,
type
:
'input'
,
maxlength
:
20
},
{
label
:
'显示排序'
,
prop
:
'orderNum'
,
type
:
'input'
},
{
label
:
'显示排序'
,
prop
:
'orderNum'
,
type
:
'input'
},
{
label
:
'组织状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
}
{
label
:
'组织状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
}
],
],
orginizaRules
:
{
orginizaRules
:
{
departmentName
:
[{
required
:
true
,
message
:
'请输入组织名称'
,
trigger
:
'blur'
}],
departmentName
:
[{
required
:
true
,
message
:
'请输入组织名称'
,
trigger
:
'blur'
}],
orderNum
:
[{
required
:
true
,
message
:
'请输入显示排序'
,
trigger
:
'blur'
}],
orderNum
:
[{
required
:
true
,
message
:
'请输入显示排序'
,
trigger
:
'blur'
},
{
validator
:
this
.
$Common
.
checkRegExpNumber
,
trigger
:
'blur'
}],
enableStatus
:
[{
required
:
true
}]
enableStatus
:
[{
required
:
true
}]
},
},
// 部门弹窗
// 部门弹窗
...
...
src/views/role/index.vue
View file @
5b3ccb4
...
@@ -37,6 +37,16 @@
...
@@ -37,6 +37,16 @@
:hasNum=
"false"
:hasNum=
"false"
>
>
<span
<span
slot=
"status"
slot-scope=
"scope"
>
<span
class=
"dot"
:class=
"scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[1] : ''"
></span>
<span
class=
"statusText"
>
{{
scope
.
scope
.
enableStatus
?
USERSTATUS
[
scope
.
scope
.
enableStatus
].
split
(
','
)[
0
]
:
'--'
}}
</span>
</span>
<span
slot=
"table-button"
slot=
"table-button"
slot-scope=
"scope"
slot-scope=
"scope"
>
>
...
@@ -121,6 +131,7 @@ export default {
...
@@ -121,6 +131,7 @@ export default {
}
}
}
}
return
{
return
{
USERSTATUS
:
this
.
$Constants
.
USER_STATUS
,
searchForm
:
{},
searchForm
:
{},
roleFormList
:
[
roleFormList
:
[
{
{
...
@@ -131,8 +142,8 @@ export default {
...
@@ -131,8 +142,8 @@ export default {
}
}
],
],
tableParams
:
{
tableParams
:
{
mutiSelectName
:
'role'
,
//
mutiSelectName: 'role',
mutiSelectUniqueKey
:
'id'
,
//
mutiSelectUniqueKey: 'id',
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
listName
:
'list'
,
tableColumns
:
[
tableColumns
:
[
...
@@ -143,6 +154,10 @@ export default {
...
@@ -143,6 +154,10 @@ export default {
label
:
'备注'
,
label
:
'备注'
,
prop
:
'remark'
prop
:
'remark'
},
{
},
{
label
:
'状态'
,
prop
:
'enableStatus'
,
addHtml
:
'status'
},
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createdDate'
prop
:
'createdDate'
}
}
...
@@ -172,8 +187,8 @@ export default {
...
@@ -172,8 +187,8 @@ export default {
menuIdList
:
[]
menuIdList
:
[]
},
},
roleData
:
[
roleData
:
[
{
label
:
'角色名称:'
,
prop
:
'roleName'
,
type
:
'input'
},
{
label
:
'角色名称:'
,
prop
:
'roleName'
,
type
:
'input'
,
maxlength
:
50
},
{
label
:
'备注:'
,
prop
:
'remark'
,
type
:
'input'
},
{
label
:
'备注:'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
,
maxlength
:
200
,
showWordLimit
:
true
},
{
label
:
'状态:'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'状态:'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'租户可见度:'
,
prop
:
'roleVisibility'
,
type
:
'customize'
,
slotName
:
'visible-type'
},
{
label
:
'租户可见度:'
,
prop
:
'roleVisibility'
,
type
:
'customize'
,
slotName
:
'visible-type'
},
{
label
:
'数据权限:'
,
prop
:
'rolePermissionType'
,
type
:
'radio'
,
children
:
this
.
$Constants
.
ROLE_AUTH
},
{
label
:
'数据权限:'
,
prop
:
'rolePermissionType'
,
type
:
'radio'
,
children
:
this
.
$Constants
.
ROLE_AUTH
},
...
...
src/views/user/index.vue
View file @
5b3ccb4
...
@@ -221,14 +221,14 @@ export default {
...
@@ -221,14 +221,14 @@ export default {
},
},
roleList
:
[],
roleList
:
[],
userData
:
[
userData
:
[
{
label
:
'登录名称:'
,
prop
:
'account'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'登录名称:'
,
prop
:
'account'
,
type
:
'input'
,
clearable
:
true
,
maxlength
:
50
},
{
label
:
'部门名称:'
,
prop
:
'departmentName'
,
type
:
'input'
,
clearable
:
true
,
readonly
:
true
,
clickFunc
:
this
.
selectDepart
},
{
label
:
'部门名称:'
,
prop
:
'departmentName'
,
type
:
'input'
,
readonly
:
true
,
clickFunc
:
this
.
selectDepart
},
{
label
:
'直接上级:'
,
prop
:
'superiorName'
,
type
:
'input'
,
clearable
:
true
,
readonly
:
true
,
clickFunc
:
this
.
selectSuperior
,
hidden
:
true
},
{
label
:
'直接上级:'
,
prop
:
'superiorName'
,
type
:
'input'
,
readonly
:
true
,
clickFunc
:
this
.
selectSuperior
,
hidden
:
true
},
{
label
:
'用户名称:'
,
prop
:
'username'
,
type
:
'input'
},
{
label
:
'用户名称:'
,
prop
:
'username'
,
type
:
'input'
,
clearable
:
true
,
maxlength
:
50
},
{
label
:
'密码:'
,
prop
:
'password'
,
type
:
'input'
,
inputText
:
'password'
},
{
label
:
'密码:'
,
prop
:
'password'
,
type
:
'input'
,
inputText
:
'password'
,
showPassword
:
true
},
{
label
:
'角色:'
,
prop
:
'roleId'
,
type
:
'select'
,
options
:
[],
key
:
'roleName'
,
value
:
'roleId'
,
filterable
:
true
},
{
label
:
'角色:'
,
prop
:
'roleId'
,
type
:
'select'
,
options
:
[],
key
:
'roleName'
,
value
:
'roleId'
,
filterable
:
true
},
{
label
:
'邮箱:'
,
prop
:
'email'
,
type
:
'input'
},
{
label
:
'邮箱:'
,
prop
:
'email'
,
type
:
'input'
},
{
label
:
'手机:'
,
prop
:
'phoneNumber'
,
type
:
'input'
},
{
label
:
'手机:'
,
prop
:
'phoneNumber'
,
type
:
'input'
,
maxlength
:
11
},
{
label
:
'性别:'
,
prop
:
'gender'
,
type
:
'select'
,
options
:
[],
key
:
'dictLabel'
,
value
:
'dictValue'
},
{
label
:
'性别:'
,
prop
:
'gender'
,
type
:
'select'
,
options
:
[],
key
:
'dictLabel'
,
value
:
'dictValue'
},
{
label
:
'状态:'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'状态:'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'岗位:'
,
prop
:
'position'
,
type
:
'select'
,
options
:
[],
key
:
'dictLabel'
,
value
:
'dictValue'
}
{
label
:
'岗位:'
,
prop
:
'position'
,
type
:
'select'
,
options
:
[],
key
:
'dictLabel'
,
value
:
'dictValue'
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment