Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
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
罗超
confucius
Commits
529686b6
Commit
529686b6
authored
Jan 28, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
23be16ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
112 deletions
+101
-112
school-form.vue
src/components/school/schoolarea/school-form.vue
+3
-11
role-form.vue
src/components/system/role-form.vue
+98
-101
No files found.
src/components/school/schoolarea/school-form.vue
View file @
529686b6
...
...
@@ -10,7 +10,7 @@
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SName"
ref=
"SName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"校区名称"
:rules=
"[val => !!val || '请填写校区名称']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.SAddress"
ref=
"SAddress"
class=
"col-6 q-pb-lg"
label=
"校区地址"
/>
class=
"col-6 q-pb-lg"
label=
"校区地址"
:rules=
"[val => !!val || '请填写校区地址']"
/>
<q-select
class=
"col-6 q-pb-lg q-pr-lg"
clearable
filled
stack-label
use-input
option-value=
"Id"
option-label=
"EmployeeName"
v-model=
"objOption.ManagerId"
ref=
"ManagerId"
:options=
"EmployeeList"
label=
"校区联系人"
:dense=
"false"
emit-value
map-options
@
filter=
"filterFn"
>
...
...
@@ -23,7 +23,7 @@
</
template
>
</q-select>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SLinkTel"
ref=
"SLinkTel"
class=
"col-6 q-pb-lg"
label=
"校区联系电话"
/>
class=
"col-6 q-pb-lg"
label=
"校区联系电话"
:rules=
"[val => !!val || '请填写校区联系电话']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.Remark"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"校区备注"
/>
<selectTree
v-if=
"DeptList&&DeptList.length>0"
:treeData=
'DeptList'
:defaultArray=
"returnString"
...
...
@@ -182,15 +182,6 @@
},
//保存校区
saveSchool
()
{
if
(
this
.
objOption
.
SName
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写校区名称`
})
return
;
}
this
.
saveLoading
=
true
;
this
.
$refs
.
SName
.
validate
()
this
.
$refs
.
SAddress
.
validate
()
this
.
$refs
.
SLinkTel
.
validate
()
...
...
@@ -202,6 +193,7 @@
if
(
this
.
tempManager
&&
this
.
tempManager
.
Id
)
{
this
.
objOption
.
ManagerId
=
this
.
tempManager
.
Id
;
}
this
.
saveLoading
=
true
;
saveSchool
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
...
...
src/components/system/role-form.vue
View file @
529686b6
...
...
@@ -34,21 +34,21 @@
}
.role-form
.role_TreeList
::-webkit-scrollbar
{
width
:
3px
;
height
:
3px
;
background-color
:
#F5F5F5
;
width
:
3px
;
height
:
3px
;
background-color
:
#F5F5F5
;
}
.role-form
.role_TreeList
::-webkit-scrollbar-track
{
-webkit-box-shadow
:
inset
0
0
6px
rgba
(
0
,
0
,
0
,
0.3
);
border-radius
:
10px
;
background-color
:
#F5F5F5
;
-webkit-box-shadow
:
inset
0
0
6px
rgba
(
0
,
0
,
0
,
0.3
);
border-radius
:
10px
;
background-color
:
#F5F5F5
;
}
.role-form
.role_TreeList
::-webkit-scrollbar-thumb
{
border-radius
:
10px
;
-webkit-box-shadow
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
color-stop
(
.5
,
rgba
(
255
,
255
,
255
,
.2
)),
color-stop
(
.5
,
transparent
),
to
(
transparent
));
background-color
:
#0ae
;
border-radius
:
10px
;
-webkit-box-shadow
:
-webkit-gradient
(
linear
,
0
0
,
0
100%
,
color-stop
(
.5
,
rgba
(
255
,
255
,
255
,
.2
)),
color-stop
(
.5
,
transparent
),
to
(
transparent
));
background-color
:
#0ae
;
}
...
...
@@ -79,9 +79,11 @@
border-radius
:
4px
;
overflow
:
auto
;
}
.role-form
.role_ItemList
:last-child
{
margin-right
:
0
;
.role-form
.role_ItemList
:last-child
{
margin-right
:
0
;
}
.role-form
.role_ItemList
::-webkit-scrollbar
{
width
:
3px
;
height
:
6px
;
...
...
@@ -475,104 +477,99 @@
},
//保存菜单
saveRole
()
{
if
(
this
.
objOption
.
RoleName
==
""
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写角色名称!`
})
return
;
}
this
.
saveLoading
=
true
;
//角色菜单权限
var
rolePermissionList
=
[];
//角色功能权限
var
roleFunctionList
=
[];
if
(
this
.
AuthMenuList
&&
this
.
AuthMenuList
.
length
>
0
)
{
this
.
AuthMenuList
.
forEach
(
item
=>
{
//一级菜单权限
if
(
item
.
IsChecked
)
{
rolePermissionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Menu_Id
:
item
.
MenuId
});
}
//二级菜单权限
if
(
item
.
SubList
&&
item
.
SubList
.
length
>
0
)
{
item
.
SubList
.
forEach
(
secondItem
=>
{
if
(
secondItem
.
IsChecked
)
{
//系统菜单
if
(
secondItem
.
MenuType
==
1
)
{
rolePermissionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Menu_Id
:
secondItem
.
MenuId
});
}
//功能菜单
else
if
(
secondItem
.
MenuType
==
2
)
{
roleFunctionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Action_Id
:
secondItem
.
MenuId
});
}
}
//三级菜单权限
if
(
secondItem
.
SubList
&&
secondItem
.
SubList
.
length
>
0
)
{
secondItem
.
SubList
.
forEach
(
thirdItem
=>
{
if
(
thirdItem
.
IsChecked
)
{
//系统菜单
if
(
thirdItem
.
MenuType
==
1
)
{
rolePermissionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Menu_Id
:
thirdItem
.
MenuId
});
}
//功能菜单
else
if
(
thirdItem
.
MenuType
==
2
)
{
roleFunctionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Action_Id
:
thirdItem
.
MenuId
});
}
this
.
$refs
.
RoleName
.
validate
()
if
(
!
this
.
$refs
.
RoleName
.
hasError
)
{
this
.
saveLoading
=
true
;
//角色菜单权限
var
rolePermissionList
=
[];
//角色功能权限
var
roleFunctionList
=
[];
if
(
this
.
AuthMenuList
&&
this
.
AuthMenuList
.
length
>
0
)
{
this
.
AuthMenuList
.
forEach
(
item
=>
{
//一级菜单权限
if
(
item
.
IsChecked
)
{
rolePermissionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Menu_Id
:
item
.
MenuId
});
}
//二级菜单权限
if
(
item
.
SubList
&&
item
.
SubList
.
length
>
0
)
{
item
.
SubList
.
forEach
(
secondItem
=>
{
if
(
secondItem
.
IsChecked
)
{
//系统菜单
if
(
secondItem
.
MenuType
==
1
)
{
rolePermissionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Menu_Id
:
secondItem
.
MenuId
});
}
//功能菜单
else
if
(
secondItem
.
MenuType
==
2
)
{
roleFunctionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Action_Id
:
secondItem
.
MenuId
});
}
//四级--功能权限
if
(
thirdItem
.
SubList
&&
thirdItem
.
SubList
.
length
>
0
)
{
thirdItem
.
SubList
.
forEach
(
fourthItem
=>
{
if
(
fourthItem
.
IsChecked
)
{
}
//三级菜单权限
if
(
secondItem
.
SubList
&&
secondItem
.
SubList
.
length
>
0
)
{
secondItem
.
SubList
.
forEach
(
thirdItem
=>
{
if
(
thirdItem
.
IsChecked
)
{
//系统菜单
if
(
thirdItem
.
MenuType
==
1
)
{
rolePermissionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Menu_Id
:
thirdItem
.
MenuId
});
}
//功能菜单
else
if
(
thirdItem
.
MenuType
==
2
)
{
roleFunctionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Action_Id
:
fourth
Item
.
MenuId
Action_Id
:
third
Item
.
MenuId
});
}
})
}
});
}
})
}
}
//四级--功能权限
if
(
thirdItem
.
SubList
&&
thirdItem
.
SubList
.
length
>
0
)
{
thirdItem
.
SubList
.
forEach
(
fourthItem
=>
{
if
(
fourthItem
.
IsChecked
)
{
roleFunctionList
.
push
({
ID
:
0
,
Role_Id
:
this
.
objOption
.
RoleId
,
Action_Id
:
fourthItem
.
MenuId
});
}
})
}
});
}
})
}
})
}
this
.
objOption
.
RolePermissionList
=
rolePermissionList
;
this
.
objOption
.
RoleFunctionList
=
roleFunctionList
;
saveRoleInfo
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
this
.
objOption
.
RolePermissionList
=
rolePermissionList
;
this
.
objOption
.
RoleFunctionList
=
roleFunctionList
;
saveRoleInfo
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
},
}
...
...
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