Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
baa91c5d
Commit
baa91c5d
authored
Jul 20, 2023
by
xuwenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://49.232.152.146:6688/xhxy/smart_school
parents
a170ee91
29b98245
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
ruoyi-ui/src/views/smartSchool/personWork/recordingroomAppointment/IdleSituation/index.vue
+10
-5
No files found.
ruoyi-ui/src/views/smartSchool/personWork/recordingroomAppointment/IdleSituation/index.vue
View file @
baa91c5d
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<!--tr 行 -->
<!--tr 行 -->
<tr
v-for=
"(timeSlot, index) in timeSlots"
:key=
"index"
>
<tr
v-for=
"(timeSlot, index) in timeSlots"
:key=
"index"
>
<!-- td 列 -->
<!-- td 列 -->
<!-- 第一列 -->
<!-- 第一列
,节次
-->
<td>
{{
timeSlot
}}
</td>
<td>
{{
timeSlot
}}
</td>
<!--
<td
v-for=
"(day, dayIndex) in days"
:key=
"dayIndex"
:class=
"
{-->
<!--
<td
v-for=
"(day, dayIndex) in days"
:key=
"dayIndex"
:class=
"
{-->
<!-- occupied: isOccupied(day, index),-->
<!-- occupied: isOccupied(day, index),-->
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<!-- @mouseenter="handleMouseEnter(day, index)" @click="handleCellClick(day, index)">-->
<!-- @mouseenter="handleMouseEnter(day, index)" @click="handleCellClick(day, index)">-->
<!--
{{
isOccupied
(
day
,
index
)
?
"占用"
:
""
}}
-->
<!--
{{
isOccupied
(
day
,
index
)
?
"占用"
:
""
}}
-->
<!--
</td>
-->
<!--
</td>
-->
<!-- 第二列往后循环 -->
<!-- 第二列往后循环
日期,拿到day日期和节次index索引值
-->
<td
style=
"cursor: pointer"
v-for=
"(day, dayIndex) in days"
:key=
"dayIndex"
:class=
"
{
<td
style=
"cursor: pointer"
v-for=
"(day, dayIndex) in days"
:key=
"dayIndex"
:class=
"
{
occupied: isOccupied(day, index),
occupied: isOccupied(day, index),
selected: isSelected(day, index),
selected: isSelected(day, index),
...
@@ -170,6 +170,7 @@ export default {
...
@@ -170,6 +170,7 @@ export default {
if
(
this
.
isOccupied
(
day
,
index
))
{
if
(
this
.
isOccupied
(
day
,
index
))
{
return
false
return
false
}
else
{
}
else
{
console
.
log
(
'this.selectedTimeSlots'
,
this
.
selectedTimeSlots
)
// 检查时间段是否已选中
// 检查时间段是否已选中
return
this
.
selectedTimeSlots
.
some
((
selectedSlot
)
=>
{
return
this
.
selectedTimeSlots
.
some
((
selectedSlot
)
=>
{
// console.log('selectedSlot',selectedSlot)
// console.log('selectedSlot',selectedSlot)
...
@@ -179,8 +180,10 @@ export default {
...
@@ -179,8 +180,10 @@ export default {
},
},
//表格点击事件
//表格点击事件
handleCellClick
(
day
,
index
)
{
handleCellClick
(
day
,
index
)
{
console
.
log
(
'day'
,
day
)
//思路:1.判断仅点击了占用的并且没有选中可选的,直接return出去
console
.
log
(
'index'
,
index
+
1
)
// 2.如果选中的数组长度为0,就可以push第一个点击的数据
// 3.选中的数组长度不为0了,就需要判断点击的是否有重复的,二次点击是取消,没有重复的才可以push
// 4.每一次都要跟第一次的day比较,看是否跨天,如果跨天直接return出去
//占用点击不生效
//占用点击不生效
if
(
this
.
isOccupied
(
day
,
index
)
&&
this
.
selectedTimeSlots
.
length
==
0
)
{
if
(
this
.
isOccupied
(
day
,
index
)
&&
this
.
selectedTimeSlots
.
length
==
0
)
{
this
.
remark
=
false
this
.
remark
=
false
...
@@ -196,12 +199,13 @@ export default {
...
@@ -196,12 +199,13 @@ export default {
return
;
return
;
}
else
{
}
else
{
this
.
remark
=
true
this
.
remark
=
true
//筛选出符合条件的对象
//筛选出符合条件的对象
,selectObj有值说明重复点击了
const
selectObj
=
this
.
selectedTimeSlots
.
find
((
item
)
=>
{
const
selectObj
=
this
.
selectedTimeSlots
.
find
((
item
)
=>
{
console
.
log
(
'find'
,
item
.
day
==
day
&&
item
.
index
==
index
)
console
.
log
(
'find'
,
item
.
day
==
day
&&
item
.
index
==
index
)
return
item
.
day
==
day
&&
item
.
index
==
index
return
item
.
day
==
day
&&
item
.
index
==
index
})
})
console
.
log
(
'selectObj'
,
selectObj
)
console
.
log
(
'selectObj'
,
selectObj
)
//selectObj没有值的时候是undefined,selectObj有值说明重复点击了,需要把点击的过滤掉
if
(
selectObj
!=
undefined
)
{
if
(
selectObj
!=
undefined
)
{
this
.
remark
=
true
this
.
remark
=
true
this
.
selectedTimeSlots
=
this
.
selectedTimeSlots
.
filter
(
item
=>
item
.
index
!=
index
)
this
.
selectedTimeSlots
=
this
.
selectedTimeSlots
.
filter
(
item
=>
item
.
index
!=
index
)
...
@@ -383,6 +387,7 @@ export default {
...
@@ -383,6 +387,7 @@ export default {
// this.successDialogVisible = true;
// this.successDialogVisible = true;
// }
// }
},
},
//确定提交按钮
confirmBooking
()
{
confirmBooking
()
{
// 弹窗确定按钮的点击事件处理程序
// 弹窗确定按钮的点击事件处理程序
// 在这里,你可以处理预约操作,例如发送请求进行录播室预约操作
// 在这里,你可以处理预约操作,例如发送请求进行录播室预约操作
...
...
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