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
a2130725
Commit
a2130725
authored
Sep 27, 2020
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面提交
parent
b327cbbe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
293 additions
and
124 deletions
+293
-124
App.vue
src/App.vue
+1
-1
index.js
src/api/school/index.js
+11
-0
table.sass
src/assets/css/table.sass
+31
-0
teacher-form.vue
src/components/school/teacher-form.vue
+75
-0
MainLayout.vue
src/layouts/MainLayout.vue
+29
-2
teacher.vue
src/pages/school/teacher.vue
+146
-121
No files found.
src/App.vue
View file @
a2130725
...
...
@@ -12,7 +12,7 @@ export default {
<
style
>
@import
url('~assets/css/font.css')
;
@import
url('//at.alicdn.com/t/font_2077629_
ns3e8uvuyb
.css')
;
@import
url('//at.alicdn.com/t/font_2077629_
wkoyran264
.css')
;
html
,
body
,
...
...
src/api/school/index.js
View file @
a2130725
...
...
@@ -22,4 +22,15 @@ export function saveSchool(data) {
method
:
'post'
,
data
})
}
/**
* 获取教师分页数据
*/
export
function
getTeacherPage
(
data
)
{
return
request
({
url
:
'/user/GetTeacherPageList'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/assets/css/table.sass
View file @
a2130725
...
...
@@ -26,5 +26,36 @@
z-index
:
1
box-shadow
:
rgba
(
0
,
0
,
0
,
0
.05
)
2px
0px
0px
td
.none-shadow
box-shadow
:
none
.sticky-tow-column-table
max-width
:
100%
thead
background
:
rgb
(
245
,
246
,
247
)
thead
tr
:first-child
height
:
40px
line-height
:
14px
thead
tr
:first-child
th
font-size
:
12px
font-weight
:
400
color
:
rgb
(
168
,
168
,
179
)
thead
tr
:first-child
th
:nth-child
(
-n
+
2
)
background-color
:
rgb
(
245
,
246
,
247
)
td
:nth-child
(
-n
+
2
)
background-color
:
#fff
th
:nth-child
(
-n
+
2
),
td
:nth-child
(
-n
+
2
)
position
:
sticky
left
:
0
z-index
:
1
box-shadow
:
rgba
(
0
,
0
,
0
,
0
.05
)
2px
0px
0px
td
.none-shadow
box-shadow
:
none
\ No newline at end of file
src/components/school/teacher-form.vue
0 → 100644
View file @
a2130725
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
SId
==
0
?
'新增校区'
:
'修改校区'
}}
</div>
</q-card-section>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
基本资料
</div>
<q-card-section
class=
"q-pt-none"
>
<div
class=
"row wrap"
>
<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=
"20"
:dense=
"false"
v-model=
"objOption.SAddress"
ref=
"SAddress"
class=
"col-6 q-pb-lg"
label=
"校区地址"
:rules=
"[val => !!val || '请填写校区地址']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SLinkMan"
ref=
"SLinkMan"
class=
"col-6 q-pr-lg q-pb-lg "
label=
"校区联系人"
:rules=
"[val => !!val || '请填写校区联系人']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.SLinkTel"
ref=
"SLinkTel"
class=
"col-6 q-pb-lg"
label=
"校区联系电话"
:rules=
"[val => !!val || '请填写校区联系电话']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Remark"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"校区备注"
/>
<div
class=
"col-6"
>
<q-toggle
size=
"md"
label=
"校区状态"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"objOption.Status"
/>
<div
class=
"text-grey-6 text-caption"
>
注意:关闭校区后,所有下属教师、学生将无法继续使用系统
</div>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
color=
"dark"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveSchool"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
objOption
:
{},
optionTitle
:
""
}
},
mounted
()
{
if
()
},
methods
:
{
initObj
()
{
if
(
this
.
saveObj
)
{
this
.
optionTitle
=
"修改教师信息"
this
.
objOption
=
this
.
saveObj
}
else
{
this
.
optionTitle
=
"新增教师"
this
.
objOption
=
{
TId
:
0
,
School_Id
:
''
,
TeacherName
:
""
,
TeacherTel
:
''
,
TeacherHead
:
''
,
TeacherIcon
:
''
,
TeacherSay
:
''
,
TeacherIntro
:
''
,
IsShow
:
'1'
,
IsRecommend
:
'0'
,
SortNum
:
1
}
}
}
},
}
</
script
>
<
style
>
</
style
>
src/layouts/MainLayout.vue
View file @
a2130725
...
...
@@ -9,7 +9,7 @@
{{
name
}}
</q-toolbar-title>
<q-tabs
v-model=
"tab"
@
input=
"changeNavs"
inline-label
style=
"margin:0 auto; font-family:perfectFont;height:60px"
class=
"text-white"
shrink
stretch
v-if=
"userInfo"
>
<q-
route-tab
v-for=
"(x, i) in userInfo.MenuList"
:key=
"i"
:to=
"x.MenuUrl
"
:name=
"`navs_$
{i}`" :label="x.MenuName" :icon="x.MenuIcon" />
<q-
tab
v-for=
"(x, i) in userInfo.MenuList"
:key=
"i"
@
click=
"setNavs(i)
"
:name=
"`navs_$
{i}`" :label="x.MenuName" :icon="x.MenuIcon" />
</q-tabs>
<div
class=
"q-pl-lg"
>
<q-btn-dropdown
flat
color=
"primary"
size=
"xs"
>
...
...
@@ -182,6 +182,7 @@ import EssentialLink from 'components/EssentialLink.vue'
import
{
mapGetters
}
from
'vuex'
import
lockr
from
'lockr'
export
default
{
name
:
'MainLayout'
,
components
:
{
...
...
@@ -216,6 +217,16 @@ export default {
this
.
currentPath
=
route
.
path
},
immediate
:
true
},
userInfo
:
{
handler
:
function
(
newVal
)
{
let
i
=
this
.
tab
.
split
(
'_'
)[
1
]
if
(
newVal
&&
newVal
.
MenuList
)
{
this
.
secondNavs
=
newVal
.
MenuList
.
length
>
0
?
newVal
.
MenuList
[
i
].
SubList
:
[]
}
console
.
log
(
this
.
secondNavs
)
},
immediate
:
true
}
},
computed
:
{
...
...
@@ -226,7 +237,14 @@ export default {
]),
},
mounted
()
{
this
.
secondNavs
=
this
.
userInfo
?
this
.
userInfo
.
MenuList
[
0
].
SubList
:
[]
let
i
=
0
if
(
lockr
.
get
(
"current_navs"
))
{
i
=
lockr
.
get
(
"current_navs"
)
}
this
.
tab
=
`navs_
${
i
}
`
if
(
this
.
userInfo
&&
this
.
userInfo
.
MenuList
)
{
this
.
secondNavs
=
this
.
userInfo
.
MenuList
.
length
>
0
?
this
.
userInfo
.
MenuList
[
i
].
SubList
:
[]
}
},
methods
:
{
logout
()
{
...
...
@@ -240,6 +258,15 @@ export default {
changeNavs
(
val
)
{
let
i
=
val
.
split
(
'_'
)[
1
]
this
.
secondNavs
=
this
.
userInfo
.
MenuList
[
i
].
SubList
},
setNavs
(
val
)
{
//防止页面数据丢失
lockr
.
set
(
"current_navs"
,
val
)
this
.
tab
=
`navs_
${
val
}
`
this
.
secondNavs
=
this
.
userInfo
.
MenuList
[
val
].
SubList
this
.
$router
.
push
({
path
:
this
.
userInfo
.
MenuList
[
val
].
MenuUrl
})
}
},
}
...
...
src/pages/school/teacher.vue
View file @
a2130725
This diff is collapsed.
Click to expand it.
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