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
852d902e
Commit
852d902e
authored
Aug 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f6ef0ecc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
49 deletions
+50
-49
class-form.vue
src/components/course/class-form.vue
+50
-49
No files found.
src/components/course/class-form.vue
View file @
852d902e
...
@@ -640,8 +640,8 @@
...
@@ -640,8 +640,8 @@
})
})
return
return
}
}
for
(
let
j
=
0
;
j
<
this
.
DefaultPlanTimeList
[
i
].
TimeList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
this
.
DefaultPlanTimeList
[
i
].
TimeList
.
length
;
j
++
)
{
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
StartTime
==
''
)
{
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
StartTime
==
''
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
...
@@ -649,7 +649,7 @@
...
@@ -649,7 +649,7 @@
})
})
return
return
}
}
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
EndTime
==
''
)
{
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
EndTime
==
''
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
...
@@ -657,7 +657,7 @@
...
@@ -657,7 +657,7 @@
})
})
return
return
}
}
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
TimeHour
==
''
)
{
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
TimeHour
==
''
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
...
@@ -688,15 +688,30 @@
...
@@ -688,15 +688,30 @@
this
.
saveCourseLoading
=
true
;
this
.
saveCourseLoading
=
true
;
saveClass
(
this
.
objOption
).
then
(
res
=>
{
saveClass
(
this
.
objOption
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
var
newClassId
=
res
.
Data
.
ClassId
var
PlanList
=
res
.
Data
.
ClassPlanList
;
//有上课计划
//有上课计划
if
(
res
.
Data
&&
res
.
Data
.
ClassPlanList
&&
res
.
Data
.
ClassPlanList
.
length
>
0
)
{
if
(
res
.
Data
&&
res
.
Data
.
ClassPlanList
&&
res
.
Data
.
ClassPlanList
.
length
>
0
&&
this
.
objOption
if
(
this
.
objOption
.
ClassDateList
.
length
<
2
)
{
.
ClassDateList
.
length
<
2
)
{
this
.
checkPlan
(
newClassId
,
PlanList
)
}
else
{
this
.
refreshForm
();
}
}
}).
catch
(()
=>
{
this
.
BtnStr
=
"立即提交"
this
.
saveCourseLoading
=
false
})
}
},
//检查上课计划是否冲突
checkPlan
(
ClassId
,
ClassPlanList
)
{
this
.
BtnStr
=
"正在检查排班是否存在冲突"
;
this
.
BtnStr
=
"正在检查排班是否存在冲突"
;
var
newMsg
=
{
var
newMsg
=
{
ClassId
:
res
.
Data
.
ClassId
,
ClassId
:
ClassId
,
PlanList
:
res
.
Data
.
ClassPlanList
,
PlanList
:
ClassPlanList
,
}
}
var
NewClassId
=
res
.
Data
.
ClassId
;
var
NewClassId
=
ClassId
;
batchSaveClassPlan
(
newMsg
).
then
(
res
=>
{
batchSaveClassPlan
(
newMsg
).
then
(
res
=>
{
this
.
saveCourseLoading
=
false
this
.
saveCourseLoading
=
false
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
...
@@ -710,20 +725,13 @@
...
@@ -710,20 +725,13 @@
})
})
this
.
$emit
(
'getClassFlict'
,
NewClassId
);
this
.
$emit
(
'getClassFlict'
,
NewClassId
);
}
else
{
}
else
{
this
.
$q
.
notify
({
this
.
refreshForm
()
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
}
}
this
.
$emit
(
"success"
)
this
.
closeCourseForm
()
}
})
}
}
}
else
{
});
},
//刷新表单
refreshForm
()
{
this
.
saveCourseLoading
=
false
this
.
saveCourseLoading
=
false
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
...
@@ -732,15 +740,8 @@
...
@@ -732,15 +740,8 @@
message
:
'数据保存成功!'
,
message
:
'数据保存成功!'
,
position
:
'top'
position
:
'top'
})
})
this
.
$emit
(
"success"
)
this
.
$emit
(
"success"
);
this
.
closeCourseForm
()
this
.
closeCourseForm
();
}
}
}).
catch
(()
=>
{
this
.
BtnStr
=
"立即提交"
this
.
saveCourseLoading
=
false
})
}
},
},
//获取课程
//获取课程
getCourseList
()
{
getCourseList
()
{
...
...
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