Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
train-admin-h5
Overview
Overview
Details
Activity
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
tangjiale
train-admin-h5
Commits
9af6b704
Commit
9af6b704
authored
Jun 14, 2022
by
tangjiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改需求改动
parent
3e30b0a7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
22 deletions
+37
-22
add-course.vue
pages/components/add-course.vue
+17
-13
add-student.vue
pages/components/add-student.vue
+8
-4
courseManage.vue
pages/courseManage.vue
+9
-3
studentManage.vue
pages/studentManage.vue
+3
-2
No files found.
pages/components/add-course.vue
View file @
9af6b704
...
...
@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 09:28:37
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-1
1 13:54:16
* @LastEditTime: 2022-06-1
4 19:18:12
-->
<
template
>
<div
class=
"add-course-bg"
>
...
...
@@ -41,7 +41,10 @@
<t-select
v-model=
"param.courseStep"
placeholder=
"请选择"
:ds=
"[{name:'小学组',value:1},{name:'初中组',value:2},{name:'高中组',value:3}]"
></t-select>
</el-form-item>
<el-form-item
label=
"课程类型:"
prop=
"type"
>
<t-select
v-model=
"param.type"
placeholder=
"请选择"
:ds=
"[{name:'体验课',value:1},{name:'正式班课',value:2}]"
></t-select>
<t-select
v-model=
"param.type"
placeholder=
"请选择"
:ds=
"[{name:'正式班课',value:1},{name:'体验课',value:2}]"
></t-select>
</el-form-item>
<el-form-item
label=
"课程层次:"
prop=
"leveId"
>
<t-select
v-model=
"param.leveId"
placeholder=
"请选择"
:ds=
"[{name:'基础班',value:1},{name:'提高班',value:2},{name:'精英班',value:3},{name:'赛事班',value:4}]"
></t-select>
</el-form-item>
<el-form-item
label=
"课时:"
prop=
"classHour"
>
<el-input
v-model=
"param.classHour"
placeholder=
"请输入数字"
onkeyup=
"this.value=this.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g,'$1')"
...
...
@@ -62,7 +65,7 @@
<
template
>
<img
class=
"image-ctn"
v-if=
"param.poster"
:src=
"param.poster"
>
<div
class=
"upload-ctn"
v-else
>
<div
class=
"tip"
>
课程图片大小不能超过3MB
。
</div>
<div
class=
"tip"
>
课程图片大小不能超过3MB
,图片宽高比例最好为16/10
</div>
<div
class=
"upload-bg"
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
添加上传图片
...
...
@@ -153,8 +156,9 @@ export default {
const
suffix
=
img
===
'jpg'
const
suffix2
=
img
===
'png'
const
suffix3
=
img
===
'jpeg'
const
suffix4
=
img
===
'JPG'
const
isLt1M
=
file
.
size
/
1024
/
1024
<=
3
;
if
(
!
suffix
&&
!
suffix2
&&
!
suffix3
)
{
if
(
!
suffix
&&
!
suffix2
&&
!
suffix3
&&
!
suffix4
)
{
this
.
$message
.
error
(
"只能上传图片!"
);
return
false
}
...
...
@@ -217,7 +221,7 @@ export default {
}
let
param
=
{
...
that
.
param
,
status
:
form
,
//0未发布 1已发布
status
:
that
.
param
.
status
==
1
?
1
:
form
,
//0未发布 1已发布
schIds
:
that
.
checkList
.
join
(
','
),
}
//单位:分
...
...
@@ -236,9 +240,9 @@ export default {
let
that
=
this
this
.
$service
.
course
.
queryCourseDetail
(
id
).
then
(
res
=>
{
let
{
name
=
''
,
courseTime
=
''
,
courseStep
=
''
,
schIds
=
''
,
status
=
''
,
type
=
''
,
pxEmployeeList
=
[],
poster
=
''
,
detail
=
''
,
classHour
=
''
,
id
=
''
,
cost
=
''
}
=
res
pxEmployeeList
=
[],
poster
=
''
,
leveId
=
''
,
detail
=
''
,
classHour
=
''
,
id
=
''
,
cost
=
''
}
=
res
this
.
param
=
{
id
,
name
,
courseTime
,
courseStep
,
status
,
type
,
poster
,
detail
,
classHour
,
cost
:
cost
/
100
id
,
name
,
courseTime
,
courseStep
,
status
,
type
,
leveId
,
poster
,
detail
,
classHour
,
cost
:
cost
/
100
}
let
arr
=
schIds
.
split
(
','
)
if
(
arr
.
length
){
...
...
@@ -293,25 +297,25 @@ export default {
margin-right
:
15px
;
}
/
deep
/
.el-input
.el-input__inner
{
width
:
2
4
8px
;
width
:
2
2
8px
;
}
}
/
deep
/
.el-form-item__content
{
height
:
auto
!important
;
}
.image-ctn
{
height
:
1
50
px
;
width
:
2
00px
;
height
:
1
86
px
;
width
:
3
00px
;
object-fit
:
cover
;
object-position
:
center
;
}
.upload-bg
{
cursor
:
pointer
;
height
:
1
50
px
;
width
:
2
00px
;
height
:
1
86
px
;
width
:
3
00px
;
border
:
1px
solid
#000000
;
.el-icon-plus{
margin-top
:
4
0px
;
margin-top
:
6
0px
;
display
:
block
!important
;
}
}
...
...
pages/components/add-student.vue
View file @
9af6b704
...
...
@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-02 15:02:39
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-
09 17:23:26
* @LastEditTime: 2022-06-
14 19:02:32
-->
<
template
>
<div>
...
...
@@ -36,6 +36,9 @@
<el-form-item
label=
"所在校区"
prop=
"schIds"
>
<t-select
v-model=
"param.schIds"
:ds=
"
{service:'base', func: 'getUserAllSchList'}">
</t-select>
</el-form-item>
<el-form-item
label=
"就读学校"
prop=
"readSchName"
>
<el-input
v-model=
"param.readSchName"
placeholder=
"请输入就读学校名称"
style=
"width:222px"
></el-input>
</el-form-item>
<div
class=
"btns"
>
...
...
@@ -58,7 +61,8 @@ export default {
fatherPhone
:
''
,
motherPhone
:
''
,
otherPhone
:
''
,
schIds
:
''
schIds
:
''
,
readSchName
:
''
},
rules
:{
...
...
@@ -78,8 +82,8 @@ export default {
},
queryDetail
(
id
){
this
.
$service
.
student
.
queryStudentDetail
(
id
).
then
(
res
=>
{
let
{
id
,
name
,
birthday
,
gender
,
fatherPhone
,
motherPhone
,
otherPhone
,
schIds
}
=
res
this
.
param
=
{
id
,
name
,
birthday
,
gender
,
fatherPhone
,
motherPhone
,
otherPhone
,
schIds
}
let
{
id
,
name
,
birthday
,
gender
,
fatherPhone
,
motherPhone
,
otherPhone
,
schIds
,
readSchName
}
=
res
this
.
param
=
{
id
,
name
,
birthday
,
gender
,
fatherPhone
,
motherPhone
,
otherPhone
,
schIds
,
readSchName
}
})
},
onSubmit
(){
...
...
pages/courseManage.vue
View file @
9af6b704
...
...
@@ -3,12 +3,11 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-02 14:08:46
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-1
1 13:49:44
* @LastEditTime: 2022-06-1
4 19:05:42
-->
<
template
>
<div
class=
"page-bg"
>
<!-- autoLoad -->
<t-table
autoLoad
ref=
"table"
:options=
"options"
:params=
"params"
@
row-btn-click=
"onRowButtonClick"
>
<!-- 操作栏 -->
...
...
@@ -28,6 +27,7 @@
<
script
>
import
addCourse
from
'./components/add-course.vue'
const
courseStep
=
[
''
,
'小学组'
,
'初中组'
,
'高中组'
]
const
courseLevel
=
[
''
,
'基础班'
,
'提高班'
,
'精英版'
,
'赛事班'
]
export
default
{
services
:[
'base'
,
'course'
],
components
:{
addCourse
},
...
...
@@ -48,6 +48,9 @@ export default {
label
:
'课程属性:'
,
field
:
'courseStep'
,
type
:
'select'
,
autoSelect
:
true
,
required
:
true
,
ds
:
[{
name
:
'全部'
,
value
:
''
},
{
name
:
'小学组'
,
value
:
1
},
{
name
:
'初中组'
,
value
:
2
},{
name
:
'高中组'
,
value
:
3
}]
},{
label
:
'课程层次:'
,
field
:
'leveId'
,
type
:
'select'
,
autoSelect
:
true
,
required
:
true
,
ds
:
[{
name
:
'全部'
,
value
:
''
},
{
name
:
'基础班'
,
value
:
1
},{
name
:
'提高班'
,
value
:
2
},{
name
:
'精英班'
,
value
:
3
},{
name
:
'赛事班'
,
value
:
4
}]
},{
label
:
'课程类型:'
,
field
:
'valid'
,
type
:
'select'
,
autoSelect
:
true
,
required
:
true
,
ds
:
[{
name
:
'全部'
,
value
:
''
},
{
name
:
'体验课'
,
value
:
1
},
{
name
:
'正式班课'
,
value
:
0
}]
},{
...
...
@@ -68,6 +71,9 @@ export default {
title
:
"课程属性"
,
type
:
'customField'
,
width
:
'140px'
,
fieldFunction
:
row
=>
courseStep
[
row
.
courseStep
],
},{
title
:
"课程层次"
,
type
:
'customField'
,
width
:
'140px'
,
fieldFunction
:
row
=>
courseLevel
[
row
.
leveId
],
},{
title
:
"课时"
,
width
:
'140px'
,
type
:
'customField'
,
fieldFunction
:
row
=>
row
.
classHour
+
'课时'
,
...
...
@@ -76,7 +82,7 @@ export default {
fieldFunction
:
row
=>
(
row
.
cost
/
100
),
},{
title
:
"课程类型"
,
type
:
'customField'
,
width
:
'140px'
,
fieldFunction
:
row
=>
row
.
type
==
0
?
'体验课'
:
'正式课'
,
fieldFunction
:
row
=>
(
row
.
type
==
1
?
'正式课'
:
'体验课'
)
,
},
{
title
:
"操作"
,
...
...
pages/studentManage.vue
View file @
9af6b704
...
...
@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-02 14:08:46
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-1
0 14:04:54
* @LastEditTime: 2022-06-1
4 19:10:38
-->
<
template
>
<div
class=
"page-bg"
>
...
...
@@ -62,7 +62,7 @@ export default {
},
{
title
:
"出生日期"
,
type
:
'customField'
,
fieldFunction
:
row
=>
row
.
birthday
.
slice
(
0
,
10
)
fieldFunction
:
row
=>
row
.
birthday
},
{
title
:
"爸爸手机号"
,
field
:
"fatherPhone"
},
{
title
:
"妈妈手机号"
,
field
:
"motherPhone"
},
...
...
@@ -71,6 +71,7 @@ export default {
title
:
"所在校区"
,
type
:
'customField'
,
fieldFunction
:
row
=>
(
row
.
schoolList
.
map
(
e
=>
e
.
name
)).
join
(
','
),
},
{
title
:
"就读学校"
,
field
:
"readSchName"
},
{
title
:
"操作"
,
width
:
"160px"
,
fixed
:
'right'
,
...
...
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