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
aa46537d
Commit
aa46537d
authored
Jan 22, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0c85db10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
6 deletions
+125
-6
class.js
src/api/course/class.js
+11
-1
lessoncheck-form.vue
src/components/course/lessoncheck-form.vue
+87
-0
lessonPreparation.vue
src/pages/course/lessonPreparation.vue
+27
-5
No files found.
src/api/course/class.js
View file @
aa46537d
...
...
@@ -333,4 +333,14 @@ export function SetClassLessPlan(data) {
data
});
}
\ No newline at end of file
/**
* 获取备课模板
*/
export
function
GetClassLessPlanList
(
data
)
{
return
request
({
url
:
'/Class/GetClassLessPlanList'
,
method
:
'post'
,
data
});
}
src/components/course/lessoncheck-form.vue
0 → 100644
View file @
aa46537d
<
template
>
<q-dialog
v-model=
"persistent"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;max-height:450px;"
>
<q-card-section>
<div
class=
"text-h6"
>
选择模板
</div>
</q-card-section>
<el-table
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
highlight-current-row
height=
"300"
style=
"width: 100%;"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"操作"
width=
"55"
>
<template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.checked"
></el-checkbox>
<el-radio
v-model=
"checked"
:label=
"scope.row.ClassPlanId"
></el-radio>
</
template
>
</el-table-column>
<el-table-column
label=
"创建日期"
width=
"200"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
CreateTime
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"模板名称"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
LessonPlan
}}
</
template
>
</el-table-column>
</el-table>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeCourseForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
GetClassLessPlanList
}
from
'../../api/course/class'
export
default
{
data
()
{
return
{
persistent
:
true
,
optionTitle
:
""
,
saveCourseLoading
:
false
,
tableData
:
[],
checked
:
null
,
// 如果使用单选框,定义一个model值
currentSelectItem
:
{}
// 当前选中的值
}
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//初始化表单
initObj
()
{
GetClassLessPlanList
({}).
then
(
res
=>
{
console
.
log
(
res
,
'数据来了'
);
if
(
res
.
Code
==
1
)
{
this
.
tableData
=
res
.
Data
;
this
.
tableData
.
forEach
(
x
=>
{
x
.
checked
=
false
;
})
}
})
},
handleSelectionChange
(
row
)
{
// el-radio单选框,不需要这一步
this
.
tableData
.
forEach
(
item
=>
{
// 排他,每次选择时把其他选项都清除
if
(
item
.
ClassPlanId
!==
row
.
ClassPlanId
)
{
item
.
checked
=
false
}
})
console
.
log
(
row
)
// 如果使用单选框,这里可以把当前选中的这一项先保存起来
this
.
currentSelectItem
=
row
},
//选择保存
saveCourse
()
{
},
//关闭弹窗
closeCourseForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
}
}
</
script
>
src/pages/course/lessonPreparation.vue
View file @
aa46537d
...
...
@@ -88,6 +88,9 @@
.Less_Delete
:hover
{
opacity
:
0.6
;
}
.w60
{
width
:
60px
!important
;
}
</
style
>
<
template
>
<div
class=
"page-body lessonPreparation"
>
...
...
@@ -96,8 +99,11 @@
<div
style=
"margin:20px 0;"
>
<span
class=
"Less_LeftIcon"
></span>
教案名称:
<el-input
v-model=
"addMsg.LessonPlan"
placeholder=
"教案名称"
class=
"w260"
></el-input>
<span
style=
"margin-left:30px;"
>
第几课:
</span>
<el-input
v-model=
"addMsg.CourseNum"
placeholder=
"第几课"
@
keyup
.
native=
"checkInteger(addMsg,'CourseNum')"
class=
"w180"
></el-input>
<span
style=
"margin-left:30px;"
>
第
<el-input
v-model=
"addMsg.CourseNum"
style=
"margin:0 5px;"
placeholder=
"第几课"
@
keyup
.
native=
"checkInteger(addMsg,'CourseNum')"
class=
"w60"
></el-input>
课
</span>
<span
style=
"float:right;display:inline-block;"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"选择模板"
@
click=
"getModule()"
/>
</span>
</div>
<div
style=
"display:flex;"
>
<div>
...
...
@@ -156,12 +162,16 @@
<q-btn
label=
"提交"
size=
"md"
color=
"accent q-px-md"
@
click=
"saveInfo()"
/>
<!--
<span
class=
"beikeBtn"
@
click=
"saveInfo(0)"
>
提交
</span>
-->
</div>
<lessoncheck-form
v-if=
"IsShowLessForm"
@
close=
"closeTeachSaveForm"
@
success=
"refreshPage"
>
</lessoncheck-form>
</div>
</div>
</
template
>
<
script
>
import
UeEditor
from
'../../components/editor/UeEditor'
import
lessoncheckForm
from
'../../components/course/lessoncheck-form'
import
{
SetClassLessPlan
,
GetClassLessPlan
...
...
@@ -172,7 +182,8 @@
},
props
:
{},
components
:
{
UeEditor
UeEditor
,
lessoncheckForm
},
data
()
{
return
{
...
...
@@ -196,8 +207,7 @@
initialFrameWidth
:
null
,
initialFrameHeight
:
150
,
},
inputVisible
:
false
,
inputValue
:
''
IsShowLessForm
:
false
,
}
},
created
()
{},
...
...
@@ -277,6 +287,18 @@
//删除整个教案
delLessOne
(
index
){
this
.
addMsg
.
LessonPlanList
.
splice
(
index
,
1
);
},
//关闭弹窗
closeTeachSaveForm
()
{
this
.
IsShowLessForm
=
false
},
//选择模板
getModule
(){
this
.
IsShowLessForm
=
true
;
},
//获取选择模板数据
refreshPage
(){
},
//提交
saveInfo
(
num
)
{
...
...
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