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
e133b35d
Commit
e133b35d
authored
Jun 18, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
655172cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
107 deletions
+84
-107
classmate-form.vue
src/components/course/classmate-form.vue
+3
-47
classPlan.vue
src/pages/course/classPlan.vue
+30
-49
myClassmate.vue
src/pages/scheduling/myClassmate.vue
+51
-11
No files found.
src/components/course/classmate-form.vue
View file @
e133b35d
...
...
@@ -427,26 +427,11 @@
</div>
</template>
<
script
>
import
{
GetClassPlanStatistical
}
from
'../../api/system/index'
;
export
default
{
props
:
{
StartTime
:
{
type
:
String
,
default
:
null
,
},
EndTime
:
{
type
:
String
,
default
:
null
,
},
TeacherId
:
{
type
:
Number
,
default
:
null
,
},
ClassRoomId
:
{
type
:
Number
,
default
:
null
,
dataList
:
{
type
:
Object
,
default
:
null
},
},
data
()
{
...
...
@@ -457,7 +442,6 @@
TeacherId
:
0
,
ClassRoomId
:
0
},
dataList
:
[]
};
},
created
()
{
...
...
@@ -466,34 +450,6 @@
mounted
()
{
},
methods
:
{
// 获取校区教室导航列表
getPlanList
(
StartTime
,
EndTime
,
TeacherId
,
ClassRoomId
)
{
if
(
StartTime
)
{
this
.
msg
.
StartTime
=
StartTime
;
}
if
(
StartTime
==
null
)
{
this
.
msg
.
StartTime
=
''
;
}
if
(
EndTime
)
{
this
.
msg
.
EndTime
=
EndTime
;
}
if
(
EndTime
==
null
)
{
this
.
msg
.
EndTime
=
''
;
}
if
(
TeacherId
>=
0
)
{
this
.
msg
.
TeacherId
=
JSON
.
parse
(
TeacherId
);
}
if
(
ClassRoomId
>=
0
)
{
this
.
msg
.
ClassRoomId
=
JSON
.
parse
(
ClassRoomId
);
}
GetClassPlanStatistical
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
//获取进度条
getProgress
(
num
,
total
)
{
if
(
num
==
0
||
total
==
0
)
{
...
...
src/pages/course/classPlan.vue
View file @
e133b35d
...
...
@@ -2,31 +2,31 @@
<div
class=
"page-body MainPlan"
>
<div
class=
"col row wrap q-col-gutter-md"
>
<div
class=
"col-2"
>
<el-select
v-model=
"TeacherId"
style=
"width:100%;"
placeholder=
"教师团队"
size=
"small"
@
change=
"
changeClassMate
()"
>
<el-select
v-model=
"
msg.
TeacherId"
style=
"width:100%;"
placeholder=
"教师团队"
size=
"small"
@
change=
"
getPlanList
()"
>
<el-option
v-for=
"item in TeacherList"
:key=
"item.TeacherName"
:label=
"item.TeacherName"
:value=
"item.TId"
>
</el-option>
</el-select>
</div>
<div
class=
"col-2"
>
<el-select
v-model=
"ClassRoomId"
style=
"width:100%;"
placeholder=
"教室"
size=
"small"
@
change=
"
changeClassMate
()"
>
<el-select
v-model=
"
msg.
ClassRoomId"
style=
"width:100%;"
placeholder=
"教室"
size=
"small"
@
change=
"
getPlanList
()"
>
<el-option
v-for=
"item in ClassRoomList"
:key=
"item.RoomName"
:label=
"item.RoomName"
:value=
"item.RoomId"
>
</el-option>
</el-select>
</div>
<div
class=
"col-2"
>
<el-date-picker
v-model=
"StartTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"开始日期"
size=
"small"
style=
"width:100%;"
@
change=
"
changeClassMate
()"
clear-icon=
"iconfont icon-guanbi"
>
<el-date-picker
v-model=
"
msg.
StartTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"开始日期"
size=
"small"
style=
"width:100%;"
@
change=
"
getPlanList
()"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
</div>
<div
class=
"col-2"
>
<el-date-picker
v-model=
"EndTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"结束日期"
size=
"small"
style=
"width:100%;"
@
change=
"
changeClassMate
()"
clear-icon=
"iconfont icon-guanbi"
>
<el-date-picker
v-model=
"
msg.
EndTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"结束日期"
size=
"small"
style=
"width:100%;"
@
change=
"
getPlanList
()"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
</div>
</div>
<classmateForm
ref=
"classmate
"
></classmateForm>
<classmateForm
:dataList=
"dataList
"
></classmateForm>
</div>
</
template
>
...
...
@@ -35,6 +35,9 @@
getTeacherDropDownList
,
queryClassRoomList
}
from
'../../api/school/index'
import
{
GetClassPlanStatistical
}
from
'../../api/system/index'
;
import
classmateForm
from
'../../components/course/classmate-form'
;
export
default
{
meta
:
{
...
...
@@ -51,8 +54,14 @@
EndTime
:
''
,
TeacherId
:
0
,
ClassRoomId
:
0
,
dataList
:
[],
activeNames
:
[
1
]
dataList
:
{},
activeNames
:
[
1
],
msg
:{
StartTime
:
""
,
EndTime
:
''
,
TeacherId
:
0
,
ClassRoomId
:
0
}
};
},
created
()
{
...
...
@@ -60,35 +69,18 @@
this
.
getClassRoomList
();
},
mounted
()
{
let
myDate
=
new
Date
();
let
nowDate
=
myDate
.
getFullYear
()
+
"-"
+
parseInt
(
myDate
.
getMonth
()
+
1
)
+
"-"
+
myDate
.
getDate
();
if
(
this
.
$route
.
query
.
StartTime
)
{
this
.
StartTime
=
this
.
$route
.
query
.
StartTime
}
else
{
this
.
StartTime
=
nowDate
;
}
if
(
this
.
$route
.
query
.
EndTime
)
{
this
.
EndTime
=
this
.
$route
.
query
.
EndTime
}
else
{
this
.
EndTime
=
this
.
addMoth
(
nowDate
,
1
);
}
if
(
this
.
$route
.
query
.
TeacherId
)
{
this
.
TeacherId
=
JSON
.
parse
(
this
.
$route
.
query
.
TeacherId
);
}
if
(
this
.
$route
.
query
.
ClassRoomId
)
{
this
.
ClassRoomId
=
JSON
.
parse
(
this
.
$route
.
query
.
ClassRoomId
);
}
this
.
$refs
.
classmate
.
getPlanList
(
this
.
StartTime
,
this
.
EndTime
,
this
.
TeacherId
,
this
.
ClassRoomId
);
this
.
getPlanList
();
},
methods
:
{
//调用子组件方法
changeClassMate
(){
this
.
$refs
.
classmate
.
getPlanList
(
this
.
StartTime
,
this
.
EndTime
,
this
.
TeacherId
,
this
.
ClassRoomId
);
// 获取校区教室导航列表
getPlanList
()
{
GetClassPlanStatistical
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
//获取教师下拉
GetTeacherList
()
{
...
...
@@ -115,17 +107,6 @@
this
.
ClassRoomList
.
unshift
(
obj
);
}
})
},
addMoth
(
d
,
m
)
{
let
ds
=
d
.
split
(
"-"
),
_d
=
ds
[
2
]
-
0
;
let
nextM
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
+
1
,
0
);
let
max
=
nextM
.
getDate
();
d
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
,
_d
>
max
?
max
:
_d
);
return
d
.
toLocaleDateString
()
.
match
(
/
\d
+/g
)
.
join
(
"-"
);
}
}
};
...
...
src/pages/scheduling/myClassmate.vue
View file @
e133b35d
<
style
>
.myClassMate
.planTabDiv
{
height
:
calc
(
100vh
-
290px
);
max-height
:
calc
(
100vh
-
290px
);
}
.myClassMate
.planTabDiv
{
height
:
calc
(
100vh
-
290px
);
max-height
:
calc
(
100vh
-
290px
);
}
</
style
>
<
template
>
<div
class=
"page-body MainPlan myClassMate"
>
<classmateForm
ref=
"classmate
"
></classmateForm>
<classmateForm
:dataList=
"dataList
"
></classmateForm>
</div>
</
template
>
<
script
>
import
{
GetClassPlanStatistical
}
from
'../../api/system/index'
;
import
classmateForm
from
'../../components/course/classmate-form'
;
export
default
{
meta
:
{
...
...
@@ -20,20 +24,56 @@
},
data
()
{
return
{
msg
:
{
StartTime
:
""
,
EndTime
:
''
,
TeacherId
:
0
,
ClassRoomId
:
0
},
dataList
:
{}
}
},
created
()
{
},
mounted
()
{
let
userinfo
=
this
.
getLocalStorage
();
let
AccountId
=
userinfo
.
AccountId
;
this
.
$refs
.
classmate
.
getPlanList
(
null
,
null
,
AccountId
,
0
);
let
userinfo
=
this
.
getLocalStorage
();
let
AccountId
=
userinfo
.
AccountId
;
let
myDate
=
new
Date
();
let
nowDate
=
myDate
.
getFullYear
()
+
"-"
+
parseInt
(
myDate
.
getMonth
()
+
1
)
+
"-"
+
myDate
.
getDate
();
this
.
msg
.
StartTime
=
nowDate
;
this
.
msg
.
EndTime
=
this
.
addMoth
(
nowDate
,
1
);
this
.
msg
.
TeacherId
=
AccountId
;
this
.
getPlanList
();
},
methods
:
{
},
// 获取校区教室导航列表
getPlanList
()
{
GetClassPlanStatistical
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
},
addMoth
(
d
,
m
)
{
let
ds
=
d
.
split
(
"-"
),
_d
=
ds
[
2
]
-
0
;
let
nextM
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
+
1
,
0
);
let
max
=
nextM
.
getDate
();
d
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
,
_d
>
max
?
max
:
_d
);
return
d
.
toLocaleDateString
()
.
match
(
/
\d
+/g
)
.
join
(
"-"
);
}
}
}
</
script
>
...
...
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