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
cb105912
Commit
cb105912
authored
Jul 27, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c834050b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
156 deletions
+30
-156
myClass.vue
src/pages/teacher/myClass.vue
+30
-156
No files found.
src/pages/teacher/myClass.vue
View file @
cb105912
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
border
:
1px
solid
#2961FE
;
border
:
1px
solid
#2961FE
;
border-radius
:
50%
;
border-radius
:
50%
;
cursor
:
pointer
;
cursor
:
pointer
;
color
:
#2961FE
;
color
:
#2961FE
;
}
}
.OCourseTable
{
.OCourseTable
{
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<div
style=
"display: flex;align-items: center;"
>
<div
style=
"display: flex;align-items: center;"
>
<q-avatar
size=
"md"
style=
"background:#d4dfff;color:#2961FE;font-weight:bold;"
v-if=
"props.row.ClassName"
>
<q-avatar
size=
"md"
style=
"background:#d4dfff;color:#2961FE;font-weight:bold;"
v-if=
"props.row.ClassName"
>
{{
GetFirst
(
props
.
row
.
ClassName
)
}}
</q-avatar>
{{
GetFirst
(
props
.
row
.
ClassName
)
}}
</q-avatar>
<div
>
<div
>
<span
style=
"color:#2961FE;margin-left:10px;cursor:pointer;"
@
click=
"getClassInfo(props.row)"
<span
style=
"color:#2961FE;margin-left:10px;cursor:pointer;"
@
click=
"getClassInfo(props.row)"
title=
"点击查看详情"
>
{{
props
.
row
.
ClassName
}}
</span>
title=
"点击查看详情"
>
{{
props
.
row
.
ClassName
}}
</span>
<div
style=
"margin-left: 10px;"
>
{{
props
.
row
.
ClassNo
}}
</div>
<div
style=
"margin-left: 10px;"
>
{{
props
.
row
.
ClassNo
}}
</div>
...
@@ -87,7 +87,8 @@
...
@@ -87,7 +87,8 @@
<th>
课程名称
</th>
<th>
课程名称
</th>
<th>
课时数
</th>
<th>
课时数
</th>
</tr>
</tr>
<tr
v-for=
"(sItem,sIndex) in props.row.OtherCourseList"
style=
"border-bottom:1px dashed #d1d1d1;"
>
<tr
v-for=
"(sItem,sIndex) in props.row.OtherCourseList"
style=
"border-bottom:1px dashed #d1d1d1;"
>
<td>
{{
sItem
.
CourseName
}}
</td>
<td>
{{
sItem
.
CourseName
}}
</td>
<td>
{{
sItem
.
ClassHours
}}
</td>
<td>
{{
sItem
.
ClassHours
}}
</td>
</tr>
</tr>
...
@@ -121,23 +122,6 @@
...
@@ -121,23 +122,6 @@
<
template
v-slot:body-cell-ClassStatusStr=
"props"
>
<
template
v-slot:body-cell-ClassStatusStr=
"props"
>
<q-td>
<q-td>
<span>
{{
props
.
row
.
ClassStatusStr
}}
</span>
<span>
{{
props
.
row
.
ClassStatusStr
}}
</span>
<i
class=
"iconfont icon-edit"
@
click
.
stop=
"getClassItem(props.row)"
title=
"点击修改班级状态"
>
<q-popup-proxy>
<q-banner
v-if=
"isShowEdit"
>
<div
class=
"calenderDialog"
>
<div
style=
"margin:10px 0 15px 0;"
>
设置班级状态
</div>
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"statusMsg.ClassStatus"
:options=
"classStatusList"
emit-value
map-options
label=
"班级状态"
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
@
click=
"isShowEdit=false"
style=
"font-weight:400 !important"
/>
<q-btn
label=
"确认"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"setClassStatus()"
/>
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</i>
</q-td>
</q-td>
</
template
>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
...
@@ -158,11 +142,7 @@
...
@@ -158,11 +142,7 @@
<q-item-label>
收支明细
</q-item-label>
<q-item-label>
收支明细
</q-item-label>
</q-item-section>
</q-item-section>
</q-item>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"showOtherCourse(props.row)"
style=
"display:none;"
>
<q-item-section>
<q-item-label>
关联其他课程
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"gomonthLessonCost(props.row)"
>
<q-item
clickable
v-close-popup
@
click=
"gomonthLessonCost(props.row)"
>
<q-item-section>
<q-item-section>
<q-item-label>
月度课耗
</q-item-label>
<q-item-label>
月度课耗
</q-item-label>
...
@@ -173,43 +153,32 @@
...
@@ -173,43 +153,32 @@
</q-td>
</q-td>
</
template
>
</
template
>
</q-table>
</q-table>
<class-form
v-if=
"isShowClassForm"
:save-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</class-form>
<classinfo-form
v-if=
"isShowClassInfo"
:seting-obj=
"classObjOption"
:isShowEditBtn=
"1"
@
close=
"closeClassSaveForm"
<classinfo-form
v-if=
"isShowClassInfo"
:seting-obj=
"classObjOption"
:isShowEditBtn=
"1"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
@
success=
"refreshPage"
>
</classinfo-form>
</classinfo-form>
<othercourseForm
v-if=
"IsShowOtherCourse"
:seting-obj=
"classObjOption"
@
close=
"closeClassSaveForm"
@
success=
"refreshPage"
>
</othercourseForm>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
import
{
queryClassStatusList
,
queryClassStatusList
,
saveClassStatus
,
//修改班级状态
}
from
'../../api/course/class'
;
}
from
'../../api/course/class'
;
import
{
import
{
GetClassPageList
GetClassPageList
}
from
'../../api/teacher/index'
;
}
from
'../../api/teacher/index'
;
//获取校区列表
//获取校区列表
import
{
import
{
getSchoolDropdown
,
getSchoolDropdown
,
deleteClass
}
from
'../../api/school/index'
;
}
from
'../../api/school/index'
;
import
classForm
from
'../../components/course/class-form'
;
import
classinfoForm
from
'../../components/course/classinfo-form'
;
import
classinfoForm
from
'../../components/course/classinfo-form'
;
import
othercourseForm
from
'../../components/course/othercourse-form'
;
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"班级管理"
title
:
"班级管理"
},
},
components
:
{
components
:
{
classForm
,
classinfoForm
,
classinfoForm
,
othercourseForm
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -288,7 +257,7 @@
...
@@ -288,7 +257,7 @@
ClassName
:
''
,
//班级名称
ClassName
:
''
,
//班级名称
ClassStatus
:
0
,
//班级状态
ClassStatus
:
0
,
//班级状态
TeacherName
:
''
,
//带班老师
TeacherName
:
''
,
//带班老师
Teacher_Id
:
0
,
Teacher_Id
:
0
,
CourseName
:
''
,
//学习课程
CourseName
:
''
,
//学习课程
School_Id
:
-
1
,
//关联校区
School_Id
:
-
1
,
//关联校区
},
},
...
@@ -303,9 +272,7 @@
...
@@ -303,9 +272,7 @@
ClassId
:
0
,
ClassId
:
0
,
ClassStatus
:
0
ClassStatus
:
0
},
},
isShowClassForm
:
false
,
//是否显示新增修改弹窗
isShowClassInfo
:
false
,
//是否显示课程信息
isShowClassInfo
:
false
,
//是否显示课程信息
IsShowOtherCourse
:
false
,
//是否显示其他课程
}
}
},
},
created
()
{
created
()
{
...
@@ -321,48 +288,6 @@
...
@@ -321,48 +288,6 @@
this
.
getClassList
();
this
.
getClassList
();
},
},
methods
:
{
methods
:
{
//删除班级
removeClass
(
item
,
status
)
{
let
delMsg
=
{
ClassId
:
item
.
ClassId
,
Status
:
status
};
var
message
=
"是否要删除该班级?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该班级?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteClass
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getClassList
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
//当前点击的班级
//当前点击的班级
getClassItem
(
item
)
{
getClassItem
(
item
)
{
this
.
isShowEdit
=
true
;
this
.
isShowEdit
=
true
;
...
@@ -370,48 +295,21 @@
...
@@ -370,48 +295,21 @@
this
.
statusMsg
.
ClassStatus
=
Obj
.
ClassStatus
;
this
.
statusMsg
.
ClassStatus
=
Obj
.
ClassStatus
;
this
.
statusMsg
.
ClassId
=
Obj
.
ClassId
;
this
.
statusMsg
.
ClassId
=
Obj
.
ClassId
;
},
},
//更新班级状态
setClassStatus
()
{
saveClassStatus
(
this
.
statusMsg
).
then
(
res
=>
{
this
.
isShowEdit
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'设置成功!'
,
position
:
'top'
})
this
.
getClassList
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
});
},
gotoOrder
(
item
)
{
gotoOrder
(
item
)
{
var
tempStr
=
'/course/classorder?ClassId='
+
item
.
ClassId
+
'&isFromMyclass=1'
;
this
.
OpenNewUrl
(
'/course/classorder'
,
{
this
.
$router
.
push
({
ClassId
:
item
.
ClassId
,
path
:
tempStr
isFromMyclass
:
1
,
});
});
},
},
//跳转到收支明细
//跳转到收支明细
goPayment
(
item
)
{
goPayment
(
item
)
{
this
.
$router
.
push
({
this
.
OpenNewUrl
(
'/course/paymentDetail'
,
{
path
:
'/course/paymentDetail'
,
query
:
{
ClassId
:
item
.
ClassId
,
ClassId
:
item
.
ClassId
,
School_Id
:
item
.
School_Id
,
School_Id
:
item
.
School_Id
,
ClassName
:
encodeURI
(
item
.
ClassName
)
,
ClassName
:
encodeURI
(
item
.
ClassName
),
isFromMyClass
:
1
,
isFromMyClass
:
1
,
blank
:
'y'
});
}
})
},
},
//获取校区列表
//获取校区列表
getSchool
()
{
getSchool
()
{
...
@@ -455,44 +353,20 @@
...
@@ -455,44 +353,20 @@
},
},
//刷新页面
//刷新页面
refreshPage
()
{
refreshPage
()
{
this
.
isShowClassForm
=
false
;
this
.
isShowClassInfo
=
false
;
this
.
getClassList
();
this
.
getClassList
();
},
},
//新增修改菜单
EditCourse
(
obj
)
{
if
(
obj
)
{
this
.
classObjOption
=
obj
}
else
{
this
.
classObjOption
=
null
}
this
.
isShowClassForm
=
true
},
//关闭弹窗
//关闭弹窗
closeClassSaveForm
()
{
closeClassSaveForm
()
{
//关闭新增修改弹窗
this
.
isShowClassForm
=
false
;
//关闭班级信息弹窗
this
.
isShowClassInfo
=
false
;
this
.
isShowClassInfo
=
false
;
//关闭关联其他课程弹窗
this
.
IsShowOtherCourse
=
false
;
},
},
GetFirst
(
val
)
{
GetFirst
(
val
)
{
if
(
val
)
{
if
(
val
)
{
return
val
.
substr
(
0
,
1
);
return
val
.
substr
(
0
,
1
);
}
}
},
},
//获取进度条
getProgress
(
num
,
total
)
{
if
(
num
==
0
||
total
==
0
)
{
return
0
;
}
return
(
Math
.
round
(
num
/
total
*
100
)
/
100.00
);
},
//显示关联课程
showOtherCourse
(
item
)
{
this
.
IsShowOtherCourse
=
true
;
this
.
classObjOption
=
item
;
},
//点击班级名称
//点击班级名称
getClassInfo
(
obj
)
{
getClassInfo
(
obj
)
{
this
.
classObjOption
=
null
;
this
.
classObjOption
=
null
;
...
@@ -500,16 +374,16 @@
...
@@ -500,16 +374,16 @@
this
.
classObjOption
=
obj
;
this
.
classObjOption
=
obj
;
this
.
isShowClassInfo
=
true
;
this
.
isShowClassInfo
=
true
;
},
},
gomonthLessonCost
(
row
){
gomonthLessonCost
(
row
)
{
let
ClassName
=
encodeURI
(
row
.
ClassName
)
let
ClassName
=
encodeURI
(
row
.
ClassName
)
this
.
OpenNewUrl
(
'teachMonthLessonCost'
,
{
this
.
OpenNewUrl
(
'teachMonthLessonCost'
,
{
ClassId
:
row
.
ClassId
,
ClassId
:
row
.
ClassId
,
ClassName
:
ClassName
,
ClassName
:
ClassName
,
});
});
},
},
//跳转到课程大纲
//跳转到课程大纲
goChapter
(
CouseId
){
goChapter
(
CouseId
)
{
this
.
OpenNewUrl
(
'/course/chapter'
,
{
this
.
OpenNewUrl
(
'/course/chapter'
,
{
CourseId
:
CouseId
CourseId
:
CouseId
});
});
}
}
...
...
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