Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
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
游洁
thinkApp
Commits
3c8afa97
Commit
3c8afa97
authored
Jan 09, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调出插班
parent
f24647e1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
224 additions
and
80 deletions
+224
-80
timeTable.vue
src/pages/timetable/timeTable.vue
+224
-80
No files found.
src/pages/timetable/timeTable.vue
View file @
3c8afa97
<
template
>
<view
class=
""
:style=
"
{'padding-bottom': `${statusBarHeight}px` }">
<view
style=
"height: 100rpx"
></view>
<view
style=
"height: 100rpx
;margin-top: 20rpx;
"
></view>
<view
class=
"navbar"
>
<van-nav-bar
title=
"课表"
fixed
title-class=
"navTitle"
>
<view
slot=
"left"
class=
"chooseDate flex flex_start_center"
>
...
...
@@ -64,18 +64,23 @@
<view
v-for=
"(item, index) in dataList"
:key=
"index"
v-if=
"dataList.length > 0"
>
<!--
<Item
:data=
"item"
/>
-->
<view
class=
"plan-box"
v-for=
"(x,i) in item.PlanTimeList"
:key=
"i"
>
<!-- :class="
{ 'calendar-active': activeDay === item.day ,'calendar-leave':isLeave(item),'calendar-leave2':isLeave2(item)}"> -->
<view
class=
"left-time"
>
<view>
<view
class=
"icon"
>
上课时间
</view>
<view
class=
"time-text"
>
{{
x
.
StartTime
}}
</view>
<view
class=
"guodu"
>
</view>
<!--
<view
class=
"guodu"
>
<text>
·
</text>
<text>
·
</text>
<text>
·
</text>
</view>
</view>
-->
<view>
<view
class=
"icon"
>
下课时间
</view>
...
...
@@ -83,6 +88,41 @@
{{
x
.
EndTime
}}
</view>
</view>
<!-- 调班时间 -->
<view
v-if=
"item.show&&item.IsOut==1"
>
<view
class=
"icon"
>
上课时间:
</view>
<view
class=
"time-text"
>
{{
item
.
OutInfo
.
StartTime
}}
</view>
</view>
<view
v-if=
"item.show&&item.IsOut==1"
>
<view
class=
"icon"
>
下课时间:
</view>
<view
class=
"time-text"
>
{{
item
.
OutInfo
.
EndTime
}}
</view>
</view>
<!-- 插班时间 -->
<view
v-if=
"item.show&&item.IsIn==1"
>
<view
class=
"icon"
>
上课时间:
</view>
<view
class=
"time-text"
>
{{
item
.
InInfo
.
StartTime
}}
</view>
</view>
<view
v-if=
"item.show&&item.IsIn==1"
>
<view
class=
"icon"
>
下课时间:
</view>
<view
class=
"time-text"
>
{{
item
.
InInfo
.
EndTime
}}
</view>
</view>
</view>
<view
class=
"right-info"
>
<view
class=
"class-name"
>
{{
item
.
ClassName
}}
</view>
<view
class=
"teacher-box"
>
...
...
@@ -103,10 +143,69 @@
<text
v-if=
"x.IsCheck==0 && item.Finished==1"
style=
"color:#282828"
>
出勤
</text>
<text
v-else-if=
"x.IsCheck==2 && item.Finished==1"
style=
"color:orange"
>
请假
</text>
<text
v-else-if=
"item.Finished==1"
style=
"color:red"
>
缺勤
</text>
<view
style=
"width:1px;flex:1;text-align: right;display: flex;align-items: center;justify-content: flex-end;"
>
<text
:style=
"
{background:item.Finished==1?'#ddd':'#FFD694'}" style="display: inline-block;width: 26rpx;height: 26rpx;border-radius: 50%;margin-right: 10rpx;">
</text>
<text
:style=
"
{color:item.Finished==1?'#ddd':'#282828'}">
{{
item
.
Finished
==
1
?
'已上课'
:
'未上课'
}}
</text>
<view
style=
"width:1px;flex:1;text-align: right;display: flex;align-items: center;justify-content: flex-end;"
>
<text
:style=
"
{background:item.Finished==1?'#ddd':'#FFD694'}"
style="display: inline-block;width: 26rpx;height: 26rpx;border-radius: 50%;margin-right: 10rpx;">
</text>
<text
:style=
"
{color:item.Finished==1?'#ddd':'#282828'}">
{{
item
.
Finished
==
1
?
'已上课'
:
'未上课'
}}
</text>
</view>
</view>
<!--
<view
class=
"teacher-box"
style=
'color: red;'
v-if=
'item.IsOut==1'
>
<text
style=
"margin:0 10rpx;"
></text>
<text>
调出
</text>
</view>
-->
<!-- 调出 -->
<view
v-if=
"item.show&&item.IsOut==1"
>
<view
class=
"teacher-box"
>
<van-icon
name=
"underway"
/>
<text
style=
"margin:0 10rpx;"
>
时间:
</text>
<text>
{{
item
.
OutInfo
.
ClassDate
}}
</text>
</view>
<view
class=
"teacher-box"
>
<van-icon
name=
"wap-home"
/>
<text
style=
"margin:0 10rpx;width: 120rpx;"
>
班级:
</text>
<text>
{{
item
.
OutInfo
.
ClassName
}}
</text>
</view>
<view
class=
"teacher-box"
>
<van-icon
name=
"manager"
/>
<text
style=
"margin:0 10rpx;"
>
老师:
</text>
<view
class=
"teacher-name"
>
{{
item
.
OutInfo
.
TeacherName
}}
</view>
</view>
<view
class=
"teacher-box"
>
<van-icon
name=
"wap-home"
/>
<text
style=
"margin:0 10rpx;"
>
教室:
</text>
<text>
{{
item
.
OutInfo
.
RoomName
}}
</text>
</view>
</view>
<!-- 插班 -->
<view
v-if=
"item.show&&item.IsIn==1"
>
<view
class=
"teacher-box"
>
<van-icon
name=
"underway"
/>
<text
style=
"margin:0 10rpx;"
>
时间:
</text>
<text>
{{
item
.
InInfo
.
ClassDate
}}
</text>
</view>
<view
class=
"teacher-box"
>
<van-icon
name=
"wap-home"
/>
<text
style=
"margin:0 10rpx;width: 100rpx;"
>
班级:
</text>
<text>
{{
item
.
InInfo
.
ClassName
}}
</text>
</view>
<view
class=
"teacher-box"
>
<van-icon
name=
"manager"
/>
<text
style=
"margin:0 10rpx;"
>
老师:
</text>
<view
class=
"teacher-name"
>
{{
item
.
InInfo
.
TeacherName
}}
</view>
</view>
<view
class=
"teacher-box"
>
<van-icon
name=
"wap-home"
/>
<text
style=
"margin:0 10rpx;"
>
教室:
</text>
<text>
{{
item
.
InInfo
.
RoomName
}}
</text>
</view>
</view>
<view
class=
"details"
v-if=
"!item.show&&(item.IsOut==1||item.IsIn==1)"
@
click=
"more(item)"
>
{{
item
.
IsOut
==
1
?
'调出'
:
'插班'
}}
详情
</view>
<view
class=
"details"
v-if=
"item.show&&(item.IsOut==1||item.IsIn==1)"
@
click=
"Putaway(item)"
>
收起
</view>
</view>
</view>
...
...
@@ -145,7 +244,9 @@
import
{
getStundentPlanStatistical
}
from
"../../api/erp.js"
;
import
{
VersionUpdate
}
from
'../../utils/index.js'
import
{
VersionUpdate
}
from
'../../utils/index.js'
export
default
{
name
:
""
,
props
:
{},
...
...
@@ -154,15 +255,15 @@
tabbar
},
setup
(
props
)
{
if
(
uni
.
getStorageSync
(
'userInfo'
)
&&
!
uni
.
getStorageSync
(
'erpUserInfo'
))
{
if
(
uni
.
getStorageSync
(
'userInfo'
)
&&
!
uni
.
getStorageSync
(
'erpUserInfo'
))
{
uni
.
reLaunch
({
url
:
'/pages/person/bind'
url
:
'/pages/person/bind'
})
return
;
}
const
Toast
=
inject
(
'$toast'
)
const
indexData
=
uni
.
getStorageSync
(
'indexData'
)
const
indexData
=
uni
.
getStorageSync
(
'indexData'
)
let
weekArr
=
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
//年月选择
let
currentDate
=
ref
(
0
);
...
...
@@ -252,8 +353,8 @@
ClassId
:
indexData
.
ClassId
,
StartTime
:
""
,
EndTime
:
""
,
CouseId
:
indexData
.
CourseId
,
ClassScrollType
:
indexData
.
ClassScrollType
CouseId
:
indexData
.
CourseId
,
ClassScrollType
:
indexData
.
ClassScrollType
},
statusBarHeight
:
0
,
dataList
:
[],
...
...
@@ -284,20 +385,28 @@
timer
:
null
,
//防抖
});
let
methods
=
{
// 查看详情
more
(
item
)
{
item
.
show
=
!
item
.
show
},
// 收起
Putaway
(
item
)
{
item
.
show
=
!
item
.
show
},
VersionUpdate
,
// 获取当天数据
async
getData
()
{
data
.
dataList
=
null
data
.
dataList
=
null
data
.
loading
=
true
setTimeout
(()
=>
{
data
.
dataList
=
[]
data
.
allData
.
forEach
(
x
=>
{
if
(
x
.
ClassDateStr
==
data
.
msg
.
StartTime
)
{
setTimeout
(()
=>
{
data
.
dataList
=
[]
data
.
allData
.
forEach
(
x
=>
{
if
(
x
.
ClassDateStr
==
data
.
msg
.
StartTime
)
{
data
.
dataList
.
push
(
x
)
}
});
data
.
loading
=
false
},
1000
)
},
1000
)
//if(data.msg.ClassId
<=
0
)
return
// data.loading = true
// let res = await getStundentPlanStatistical(data.msg);
...
...
@@ -308,18 +417,27 @@
},
//获取当月数据
async
getAllData
()
{
console
.
log
(
activeDay
.
value
)
if
(
data
.
msg
.
ClassId
<=
0
)
return
console
.
log
(
'lll'
,
activeDay
.
value
)
if
(
data
.
msg
.
ClassId
<=
0
)
return
loadingS
()
try
{
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
Toast
.
clear
()
if
(
data
.
timer
)
data
.
timer
=
null
if
(
res
)
{
let
list
=
res
.
Data
;
let
addList
=
function
(
arr
)
{
arr
.
forEach
(
item
=>
{
item
.
show
=
false
});
};
addList
(
list
);
//data.dataList = res.Data;
data
.
allData
=
res
.
Data
;
data
.
allData
=
list
;
data
.
msg
.
StartTime
=
currentDate
.
value
+
"-"
+
activeDay
.
value
;
methods
.
getData
()
console
.
log
(
'kkk'
,
data
.
allData
)
}
}
catch
{
Toast
.
clear
()
...
...
@@ -390,33 +508,33 @@
// });
},
initSwiper
(){
const
date
=
new
Date
()
const
y
=
date
.
getFullYear
()
const
m
=
date
.
getMonth
()
+
1
const
d
=
date
.
getDate
()
let
obj
=
{
initSwiper
()
{
const
date
=
new
Date
()
const
y
=
date
.
getFullYear
()
const
m
=
date
.
getMonth
()
+
1
const
d
=
date
.
getDate
()
let
obj
=
{
y
,
m
,
}
let
obj1
=
{
let
obj1
=
{
y
,
m
:
m
-
1
,
m
:
m
-
1
,
}
let
obj2
=
{
let
obj2
=
{
y
,
m
:
m
+
1
,
m
:
m
+
1
,
}
if
(
m
==
1
)
{
obj1
.
y
=
y
-
1
obj1
.
m
=
12
if
(
m
==
1
)
{
obj1
.
y
=
y
-
1
obj1
.
m
=
12
}
if
(
m
==
12
)
{
obj1
.
y
=
y
+
1
obj1
.
m
=
1
if
(
m
==
12
)
{
obj1
.
y
=
y
+
1
obj1
.
m
=
1
}
data
.
swiperArr
=
[
obj1
,
obj
,
obj2
]
data
.
swiperArrDemo
=
[
obj1
,
obj
,
obj2
]
data
.
swiperArr
=
[
obj1
,
obj
,
obj2
]
data
.
swiperArrDemo
=
[
obj1
,
obj
,
obj2
]
console
.
log
(
data
.
swiperArr
,
data
.
swiperArrDemo
)
},
changeSwiper
(
val
,
PreId
)
{
...
...
@@ -499,9 +617,9 @@
sliceWeek
(
today
);
wx
.
getSystemInfo
({
success
(
res
)
{
let
lift
=
res
.
screenHeight
-
res
.
safeArea
.
bottom
let
tabbarHeight
=
Number
(
lift
)
+
50
data
.
statusBarHeight
=
tabbarHeight
let
lift
=
res
.
screenHeight
-
res
.
safeArea
.
bottom
let
tabbarHeight
=
Number
(
lift
)
+
50
data
.
statusBarHeight
=
tabbarHeight
}
})
//data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight+52;
...
...
@@ -538,6 +656,12 @@
</
script
>
<
style
scoped
>
.details
{
font-size
:
14px
;
color
:
red
;
margin-top
:
20
rpx
;
}
.swiper
{
/* min-height: 400rpx; */
height
:
620
rpx
;
...
...
@@ -606,7 +730,7 @@
.calendar-active
{
width
:
50
rpx
;
height
:
50
rpx
;
background-color
:
rgba
(
220
,
50
,
65
,
0.9
)
!important
;
background-color
:
rgba
(
220
,
50
,
65
,
0.9
)
!important
;
border-radius
:
50%
;
color
:
#FFFFFF
!important
;
}
...
...
@@ -668,35 +792,47 @@
width
:
65px
;
height
:
auto
;
}
.plan-box
{
.plan-box
{
border-radius
:
20
rpx
;
background-color
:
#FFF
;
box-shadow
:
0
0
20
rpx
#D0D0D0
;
padding
:
0
;
padding
:
0
;
display
:
flex
;
align-items
:
flex-start
;
margin
:
0
32
rpx
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
stretch
;
margin
:
0
32
rpx
;
margin-bottom
:
20
rpx
;
}
.plan-box
.left-time
{
.plan-box
.left-time
{
border-top-left-radius
:
20
rpx
;
border-bottom-left-radius
:
20
rpx
;
background-color
:
#F5F5F5
;
padding
:
40
rpx
;
padding
:
0
rpx
40
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
/* justify-content: center */
justify-content
:
space-around
;
}
.plan-box
.left-time
.icon
{
font-size
:
18
rpx
;
color
:
#666
;
.plan-box
.left-time
.icon
{
font-size
:
18
rpx
;
color
:
#666
;
}
.plan-box
.left-time
.time-text
{
.plan-box
.left-time
.time-text
{
font-size
:
40
rpx
;
font-weight
:
bolder
;
color
:
#282828
;
font-weight
:
bolder
;
color
:
#282828
;
}
.plan-box
.left-time
.guodu
{
.plan-box
.left-time
.guodu
{
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
...
...
@@ -704,46 +840,54 @@
flex-direction
:
column
;
margin
:
20
rpx
0
;
}
.plan-box
.left-time
.guodu
text
{
.plan-box
.left-time
.guodu
text
{
font-size
:
60
rpx
;
color
:
#eee
;
font-weight
:
bolder
;
line-height
:
20
rpx
;
}
.plan-box
.right-info
{
width
:
1
rpx
;
flex
:
1
;
padding
:
40
rpx
;
padding
:
40
rpx
;
}
.plan-box
.right-info
{
padding
:
40
rpx
;
padding
:
40
rpx
;
}
.plan-box
.right-info
.class-name
{
.plan-box
.right-info
.class-name
{
font-size
:
32
rpx
;
color
:
#000
;
color
:
#000
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
line-clamp
:
2
;
}
.plan-box
.right-info
.teacher-box
{
margin
:
20
rpx
0
;
.plan-box
.right-info
.teacher-box
{
margin
:
20
rpx
0
;
display
:
flex
;
align-items
:
center
;
font-size
:
24
rpx
;
color
:
#888
;
color
:
#888
;
}
.plan-box
.right-info
.teacher-head
{
width
:
60
rpx
;
.plan-box
.right-info
.teacher-head
{
width
:
60
rpx
;
height
:
60
rpx
;
border-radius
:
50%
;
margin-right
:
20
rpx
;
background-color
:
#DDD
;
}
.plan-box
.right-info
.teacher-name
{
.plan-box
.right-info
.teacher-name
{
/* font-size: 24rpx;
color:#444; */
}
...
...
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