Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-consultation
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-consultation
提交
0dbb7996
提交
0dbb7996
编写于
11月 09, 2021
作者:
xiaoping.di
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改页面模块
上级
c219f510
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
36 行增加
和
49 行删除
+36
-49
newScheduling.vue
src/views/IM/diagnosis-admin/modal/newScheduling.vue
+36
-49
未找到文件。
src/views/IM/diagnosis-admin/modal/newScheduling.vue
浏览文件 @
0dbb7996
...
@@ -234,7 +234,6 @@
...
@@ -234,7 +234,6 @@
},
},
watch
:
{
watch
:
{
week
(
newV
,
oldV
)
{
week
(
newV
,
oldV
)
{
console
.
log
(
newV
,
oldV
,
'newV, oldV'
);
if
(
this
.
haveWeek
.
indexOf
(
newV
)
==
-
1
)
{
if
(
this
.
haveWeek
.
indexOf
(
newV
)
==
-
1
)
{
this
.
haveWeek
.
push
(
newV
);
this
.
haveWeek
.
push
(
newV
);
this
.
handleInitSearch
();
this
.
handleInitSearch
();
...
@@ -264,9 +263,7 @@
...
@@ -264,9 +263,7 @@
});
});
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
calendarOptions
.
events
,
'this.calendarOptions.events'
);
this
.
scrollerHeight
=
this
.
$refs
.
agment
.
clientHeight
+
'px'
;
this
.
scrollerHeight
=
this
.
$refs
.
agment
.
clientHeight
+
'px'
;
// console.log(this.$refs.agment.clientHeight, 'this.$refs.agment.offsetHeight;');
this
.
init
();
this
.
init
();
},
},
methods
:
{
methods
:
{
...
@@ -290,18 +287,14 @@
...
@@ -290,18 +287,14 @@
this
.
handleInitSearch
();
this
.
handleInitSearch
();
},
},
handleChange
(
item
,
index
)
{
handleChange
(
item
,
index
)
{
console
.
log
(
this
.
getEveryDay
,
'this.getEveryDay'
);
this
.
maxList
.
map
((
itemChild
,
indexChild
)
=>
{
this
.
maxList
.
map
((
itemChild
,
indexChild
)
=>
{
console
.
log
(
indexChild
,
'indexChild'
);
return
(
itemChild
.
weekDay
=
dayjs
(
return
(
itemChild
.
weekDay
=
dayjs
(
dayjs
(
this
.
getEveryDay
).
add
(
indexChild
,
'day'
)
dayjs
(
this
.
getEveryDay
).
add
(
indexChild
,
'day'
)
).
format
(
'YYYY-MM-DD HH:mm:ss'
));
).
format
(
'YYYY-MM-DD HH:mm:ss'
));
});
});
this
.
maxList
[
index
][
'preNum'
]
=
item
.
preNum
;
this
.
maxList
[
index
][
'preNum'
]
=
item
.
preNum
;
console
.
log
(
this
.
maxList
,
'this.maxList'
);
},
},
getCopyData
(
data
)
{
getCopyData
(
data
)
{
this
.
calendarOptions
.
events
=
[];
const
copyList
=
[];
const
copyList
=
[];
const
addDay
=
7
;
const
addDay
=
7
;
data
.
noAcceptList
.
map
((
item
)
=>
{
data
.
noAcceptList
.
map
((
item
)
=>
{
...
@@ -314,11 +307,11 @@
...
@@ -314,11 +307,11 @@
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
copyList
.
push
(
obj
);
copyList
.
push
(
obj
);
});
});
this
.
calendarOptions
.
events
=
[];
data
.
noAcceptList
=
copyList
;
data
.
noAcceptList
=
copyList
;
this
.
isDoIt
=
true
;
this
.
isDoIt
=
true
;
},
},
getWeekMax
(
data
)
{
getWeekMax
(
data
)
{
console
.
log
(
this
.
maxList
,
'this.maxList'
);
if
(
data
.
countList
.
length
>
0
)
{
if
(
data
.
countList
.
length
>
0
)
{
data
.
countList
.
forEach
((
item
)
=>
{
data
.
countList
.
forEach
((
item
)
=>
{
const
clistDay
=
dayjs
(
item
.
workDay
).
day
();
const
clistDay
=
dayjs
(
item
.
workDay
).
day
();
...
@@ -328,22 +321,18 @@
...
@@ -328,22 +321,18 @@
}
else
{
}
else
{
index
=
7
;
index
=
7
;
}
}
// console.log(this.maxList, this.maxList[index - 1].preNum, 'index');
this
.
maxList
[
index
-
1
].
preNum
=
item
.
preNum
;
this
.
maxList
[
index
-
1
].
preNum
=
item
.
preNum
;
// debugger;
this
.
maxList
[
index
-
1
].
weekDay
=
dayjs
(
item
.
workDay
)
this
.
maxList
[
index
-
1
].
weekDay
=
dayjs
(
item
.
workDay
)
.
add
(
7
,
'day'
)
.
add
(
7
,
'day'
)
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
console
.
log
(
this
.
maxList
,
'clistDay'
);
});
});
}
}
},
},
handleInitSearch
(
isReset
,
type
)
{
handleInitSearch
(
isReset
,
type
)
{
if
(
isReset
)
{
if
(
isReset
&&
type
!=
1
)
{
this
.
calendarOptions
.
events
=
this
.
calendarOptions
.
events
.
filter
(
this
.
calendarOptions
.
events
=
this
.
calendarOptions
.
events
.
filter
(
(
v
)
=>
v
.
week
!==
this
.
week
(
v
)
=>
v
.
week
!==
this
.
week
);
);
console
.
log
(
this
.
calendarOptions
.
events
);
}
}
let
copyWeek
=
''
;
let
copyWeek
=
''
;
if
(
type
==
1
)
{
if
(
type
==
1
)
{
...
@@ -357,42 +346,45 @@
...
@@ -357,42 +346,45 @@
copyWeek
=
4
;
copyWeek
=
4
;
}
}
}
}
console
.
log
(
this
.
week
,
'this.week'
);
const
objParms
=
{};
const
objParms
=
{};
objParms
.
doctorId
=
this
.
doctorId
;
objParms
.
doctorId
=
this
.
doctorId
;
objParms
.
week
=
type
==
1
?
copyWeek
:
this
.
week
;
objParms
.
week
=
type
==
1
?
copyWeek
:
this
.
week
;
// type == 1 表示 copy
// type == 1 表示 copy
objParms
.
workId
=
this
.
id
;
objParms
.
workId
=
this
.
id
;
console
.
log
(
objParms
.
week
,
'objParms.week'
);
dutyRosterQuery
(
objParms
).
then
((
res
)
=>
{
dutyRosterQuery
(
objParms
).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
code
==
'000000'
)
{
this
.
calendarOptions
.
events
=
[];
console
.
log
(
res
.
data
.
noAcceptList
,
'res.data.noAcceptList'
);
if
(
type
==
1
)
{
if
(
type
==
1
&&
!
res
.
data
.
noAcceptList
.
length
)
{
return
this
.
$toast
(
'没有上周的排班信息可以用'
);
}
else
{
this
.
calendarOptions
.
events
=
[];
}
if
(
type
==
1
&&
res
.
data
.
noAcceptList
.
length
)
{
this
.
getCopyData
(
res
.
data
);
this
.
getCopyData
(
res
.
data
);
this
.
getWeekMax
(
res
.
data
);
this
.
getWeekMax
(
res
.
data
);
}
}
this
.
handleInitData
(
res
.
data
);
this
.
handleInitData
(
res
.
data
);
if
(
type
!=
1
)
{
if
(
type
!=
1
)
{
if
(
res
.
data
.
countList
.
length
>
0
)
{
const
countList
=
res
.
data
.
countList
;
const
newAR
=
res
.
data
.
countList
.
map
((
item
,
index
)
=>
{
if
(
countList
.
length
>
0
)
{
if
(
item
.
weekDay
==
this
.
maxList
[
index
].
weekDay
)
{
console
.
log
(
this
.
maxList
,
'countListcountListcountListcountList'
);
return
{
countList
.
forEach
((
item
)
=>
{
preNum
:
item
.
preNum
,
let
keyC
=
dayjs
(
item
.
workDay
).
day
();
};
if
(
keyC
==
0
)
{
keyC
=
7
;
}
}
this
.
maxList
[
keyC
-
1
].
preNum
=
item
.
preNum
||
0
;
});
});
this
.
maxList
=
newAR
;
console
.
log
(
newAR
,
'newAR'
);
}
else
{
}
else
{
this
.
maxList
=
[
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
{
preNum
:
0
},
const
maxListObj
=
{};
{
preNum
:
0
},
maxListObj
.
preNum
=
0
;
{
preNum
:
0
},
maxListObj
.
weekDay
=
dayjs
(
this
.
getEveryDay
)
{
preNum
:
0
},
.
add
(
i
,
'day'
)
{
preNum
:
0
},
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
{
preNum
:
0
},
this
.
maxList
.
push
(
maxListObj
);
{
preNum
:
0
},
}
]
;
console
.
log
(
this
.
maxList
,
'this.maxListthis.maxListthis.maxList'
)
;
}
}
}
}
}
else
{
}
else
{
...
@@ -404,14 +396,12 @@
...
@@ -404,14 +396,12 @@
var
newDate
=
null
;
var
newDate
=
null
;
if
(
this
.
schedulingType
!=
3
)
{
if
(
this
.
schedulingType
!=
3
)
{
newDate
=
[].
concat
(
data
.
noAcceptList
);
newDate
=
[].
concat
(
data
.
noAcceptList
);
console
.
log
(
newDate
,
'newDate'
);
}
else
{
}
else
{
var
acceptList
=
[];
var
acceptList
=
[];
data
.
acceptList
.
forEach
((
item
)
=>
{
data
.
acceptList
.
forEach
((
item
)
=>
{
item
.
type
=
88
;
item
.
type
=
88
;
acceptList
.
push
(
item
);
acceptList
.
push
(
item
);
});
});
console
.
log
(
data
.
acceptList
,
'data.acceptList'
);
newDate
=
[].
concat
(
acceptList
,
data
.
noAcceptList
);
newDate
=
[].
concat
(
acceptList
,
data
.
noAcceptList
);
}
}
newDate
.
forEach
((
item
)
=>
{
newDate
.
forEach
((
item
)
=>
{
...
@@ -421,7 +411,6 @@
...
@@ -421,7 +411,6 @@
dataObj
[
'id'
]
=
id
;
dataObj
[
'id'
]
=
id
;
dataObj
[
'end'
]
=
item
.
endTime
;
dataObj
[
'end'
]
=
item
.
endTime
;
dataObj
[
'start'
]
=
item
.
startTime
;
dataObj
[
'start'
]
=
item
.
startTime
;
console
.
log
(
item
.
type
);
dataObj
[
'type'
]
=
item
.
type
;
dataObj
[
'type'
]
=
item
.
type
;
if
(
item
.
type
==
88
)
{
if
(
item
.
type
==
88
)
{
dataObj
[
'color'
]
=
'#FFEDE9'
;
dataObj
[
'color'
]
=
'#FFEDE9'
;
...
@@ -431,17 +420,12 @@
...
@@ -431,17 +420,12 @@
},
},
handleDatesSet
(
dataInfo
)
{
handleDatesSet
(
dataInfo
)
{
this
.
getEveryDay
=
dayjs
(
dataInfo
.
startStr
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
this
.
getEveryDay
=
dayjs
(
dataInfo
.
startStr
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
console
.
log
(
this
.
getEveryDay
,
'dataInfo.startStrdataInfo.startStrdataInfo.startStr'
);
const
currentTime
=
new
Date
().
getTime
();
const
currentTime
=
new
Date
().
getTime
();
const
getTime
=
new
Date
(
dataInfo
.
startStr
).
getTime
();
const
getTime
=
new
Date
(
dataInfo
.
startStr
).
getTime
();
const
cz
=
currentTime
-
getTime
;
const
cz
=
currentTime
-
getTime
;
const
oneHour
=
1
*
60
*
60
*
1000
*
24
;
const
oneHour
=
1
*
60
*
60
*
1000
*
24
;
const
timeDifference
=
(
cz
/
oneHour
)
|
0
;
const
timeDifference
=
(
cz
/
oneHour
)
|
0
;
const
headObj
=
this
.
calendarOptions
.
customButtons
.
myCustomButton
;
const
headObj
=
this
.
calendarOptions
.
customButtons
.
myCustomButton
;
console
.
log
(
timeDifference
,
'timeDifference'
);
// debugger;
// debugger;
if
(
timeDifference
>=
0
&&
timeDifference
<
7
)
{
if
(
timeDifference
>=
0
&&
timeDifference
<
7
)
{
// 过去
// 过去
...
@@ -494,7 +478,6 @@
...
@@ -494,7 +478,6 @@
const
index
=
this
.
getIdDeleteData
(
event
.
event
.
id
);
const
index
=
this
.
getIdDeleteData
(
event
.
event
.
id
);
this
.
isDoIt
=
true
;
this
.
isDoIt
=
true
;
this
.
calendarOptions
.
events
.
splice
(
index
,
1
);
this
.
calendarOptions
.
events
.
splice
(
index
,
1
);
console
.
log
(
this
.
calendarOptions
.
events
);
})
})
.
catch
((
_
)
=>
{
.
catch
((
_
)
=>
{
console
.
log
(
_
);
console
.
log
(
_
);
...
@@ -573,11 +556,9 @@
...
@@ -573,11 +556,9 @@
},
},
copyDoctoreScheduling
()
{
copyDoctoreScheduling
()
{
this
.
handleInitSearch
(
true
,
1
);
this
.
handleInitSearch
(
true
,
1
);
console
.
log
(
this
.
copyArr
,
'copyArr'
);
},
},
saveDoctoreScheduling
(
type
,
weekV
=
0
)
{
saveDoctoreScheduling
(
type
,
weekV
=
0
)
{
if
(
this
.
isDoIt
)
{
if
(
this
.
isDoIt
)
{
console
.
log
(
this
.
week
,
'this.week'
,
weekV
);
this
.
loading
=
true
;
this
.
loading
=
true
;
const
objParms
=
{};
const
objParms
=
{};
objParms
.
week
=
weekV
?
weekV
:
this
.
week
;
objParms
.
week
=
weekV
?
weekV
:
this
.
week
;
...
@@ -585,18 +566,24 @@
...
@@ -585,18 +566,24 @@
objParms
.
level
=
this
.
currentIndex
;
objParms
.
level
=
this
.
currentIndex
;
objParms
.
list
=
[];
objParms
.
list
=
[];
const
data
=
this
.
calendarOptions
.
events
;
const
data
=
this
.
calendarOptions
.
events
;
console
.
log
(
data
,
'data'
);
data
.
forEach
((
item
)
=>
{
data
.
forEach
((
item
)
=>
{
console
.
log
(
item
.
week
==
(
weekV
?
weekV
:
this
.
week
));
if
(
item
.
week
==
(
weekV
?
weekV
:
this
.
week
))
{
if
(
item
.
week
==
(
weekV
?
weekV
:
this
.
week
))
{
console
.
log
(
item
.
week
,
this
.
week
,
weekV
,
'this.week'
);
const
obj
=
{};
const
obj
=
{};
obj
.
startTime
=
this
.
dateFormat
(
'YYYY-mm-dd HH:MM:SS'
,
item
.
start
);
obj
.
startTime
=
this
.
dateFormat
(
'YYYY-mm-dd HH:MM:SS'
,
item
.
start
);
obj
.
endTime
=
this
.
dateFormat
(
'YYYY-mm-dd HH:MM:SS'
,
item
.
end
);
obj
.
endTime
=
this
.
dateFormat
(
'YYYY-mm-dd HH:MM:SS'
,
item
.
end
);
console
.
log
(
obj
,
'obj'
);
objParms
.
list
.
push
(
obj
);
objParms
.
list
.
push
(
obj
);
}
}
});
});
// 对上限人数处理
this
.
maxList
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
item
,
'item'
);
if
(
!
item
.
weekDay
)
{
item
.
weekDay
=
dayjs
(
this
.
getEveryDay
)
.
add
(
index
,
'day'
)
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
});
console
.
log
(
this
.
maxList
,
'122222maxListmaxListmaxListmaxList'
);
objParms
.
countReqList
=
this
.
maxList
;
objParms
.
countReqList
=
this
.
maxList
;
saveDutyRoster
(
objParms
).
then
((
res
)
=>
{
saveDutyRoster
(
objParms
).
then
((
res
)
=>
{
if
(
res
.
code
===
'000000'
)
{
if
(
res
.
code
===
'000000'
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录