Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
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
Sweet Zhang
ydLife
Commits
d71989c3
Commit
d71989c3
authored
Sep 18, 2020
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日程删除&新增日程bug修复
parent
5c307df8
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
50 deletions
+68
-50
src/app/my/add-task/add-task.component.html
+5
-4
src/app/my/add-task/add-task.component.scss
+2
-3
src/app/my/add-task/add-task.component.ts
+18
-32
src/app/my/my.service.ts
+7
-0
src/app/my/score-details/score-details.component.ts
+1
-1
src/app/my/todo-list/todo-list.component.html
+5
-4
src/app/my/todo-list/todo-list.component.scss
+2
-2
src/app/my/todo-list/todo-list.component.ts
+25
-1
src/styles.scss
+3
-3
No files found.
src/app/my/add-task/add-task.component.html
View file @
d71989c3
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
<div
class=
"head"
>
<div
class=
"head"
>
<h3
(
click
)="
goBack
()"
>
<
</h3>
<h3
(
click
)="
goBack
()"
>
<
</h3>
<h3>
新建日程
</h3>
<h3>
新建日程
</h3>
<div
id=
"add_calendar_wrapper"
>
<div></div>
<!-- <div id="add_calendar_wrapper">
<List className="calendar-list" style="backgroundColor: 'white'">
<List className="calendar-list" style="backgroundColor: 'white'">
<ListItem (onClick)="clickCalendar()">
<ListItem (onClick)="clickCalendar()">
{{this.state.en ? '日历' : '日历'}}
{{this.state.en ? '日历' : '日历'}}
...
@@ -24,7 +25,7 @@
...
@@ -24,7 +25,7 @@
(onCancel)="triggerCancel()"
(onCancel)="triggerCancel()"
(onConfirm)="triggerConfirm($event)"
(onConfirm)="triggerConfirm($event)"
></Calendar>
></Calendar>
</div>
</div>
-->
</div>
</div>
<ul
class=
"nav"
>
<ul
class=
"nav"
>
<li
*
ngFor=
"let tabItem of tabList;index as i;"
[
ngClass
]="{'
selected
'
:tabItem
.
code =
==
tabType
}"
(
click
)="
selectTab
(
tabItem
.
code
,
tabItem
.
taskType
)"
>
<li
*
ngFor=
"let tabItem of tabList;index as i;"
[
ngClass
]="{'
selected
'
:tabItem
.
code =
==
tabType
}"
(
click
)="
selectTab
(
tabItem
.
code
,
tabItem
.
taskType
)"
>
...
@@ -49,11 +50,11 @@
...
@@ -49,11 +50,11 @@
<div
style=
"font-size: 18px;"
>
选择任务需要的时间
</div>
<div
style=
"font-size: 18px;"
>
选择任务需要的时间
</div>
<div
class=
"timeContent"
>
<div
class=
"timeContent"
>
<div
class=
"picker_list"
>
<div
class=
"picker_list"
>
<PickerView
[
data
]="
seasons
"
[
cols
]='
3
'
[
cascade
]="
false
"
[
ngModel
]="
addTrack
.
taskTimeFrom
"
(
ngModelChange
)="
onChange
($
event
,
1
)"
></PickerView>
<PickerView
[
data
]="
seasons
"
[
cols
]='
3
'
[
cascade
]="
false
"
[
ngModel
]="
addTrack
.
taskTimeFrom
"
[
indicatorStyle
]="{'
background
'
:
'#
f6f6f6
','
border-radius
'
:
'
50px
','
z-index
'
:
'
0
'}"
(
ngModelChange
)="
onChange
($
event
,
1
)"
></PickerView>
</div>
</div>
<div
style=
"color: #d9dadc;width: 10%;text-align: center;"
>
到
</div>
<div
style=
"color: #d9dadc;width: 10%;text-align: center;"
>
到
</div>
<div
class=
"picker_list"
>
<div
class=
"picker_list"
>
<PickerView
[
data
]="
seasons
"
[
cascade
]="
false
"
[
cols
]='
3
'
[
ngModel
]="
addTrack
.
taskTimeEnd
"
(
ngModelChange
)="
onChange
($
event
,
2
)"
></PickerView>
<PickerView
[
data
]="
seasons
"
[
cascade
]="
false
"
[
cols
]='
3
'
[
ngModel
]="
addTrack
.
taskTimeEnd
"
[
indicatorStyle
]="{'
background
'
:
'#
f6f6f6
','
border-radius
'
:
'
50px
','
z-index
'
:
'
0
'}"
(
ngModelChange
)="
onChange
($
event
,
2
)"
></PickerView>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/my/add-task/add-task.component.scss
View file @
d71989c3
...
@@ -8,11 +8,10 @@ ul,ol{
...
@@ -8,11 +8,10 @@ ul,ol{
.top
{
.top
{
.head
{
.head
{
display
:
flex
;
display
:
flex
;
height
:
50
px
;
height
:
45
px
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
padding
:
0
8px
;
padding
:
0
8px
;
margin-bottom
:
8px
;
}
}
.nav
{
.nav
{
...
@@ -43,7 +42,7 @@ ul,ol{
...
@@ -43,7 +42,7 @@ ul,ol{
}
}
.task_content_wrapper
{
.task_content_wrapper
{
.part_wrapper
{
.part_wrapper
{
margin-top
:
2
0px
;
margin-top
:
1
0px
;
position
:
relative
;
position
:
relative
;
padding
:
0
4%
;
padding
:
0
4%
;
ul
{
ul
{
...
...
src/app/my/add-task/add-task.component.ts
View file @
d71989c3
...
@@ -38,35 +38,21 @@ export class AddTaskComponent implements OnInit {
...
@@ -38,35 +38,21 @@ export class AddTaskComponent implements OnInit {
constructor
(
private
myService
:
MyService
,
private
router
:
Router
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
,
constructor
(
private
myService
:
MyService
,
private
router
:
Router
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
,
public
lifeCommonService
:
LifeCommonService
,
private
activateRoute
:
ActivatedRoute
)
{
public
lifeCommonService
:
LifeCommonService
,
private
activateRoute
:
ActivatedRoute
)
{
this
.
seasons
=
[
this
.
seasons
=
[
{
label
:
'8:00'
,
id
:
1
},
{
label
:
'8:00'
,
value
:
1
},{
label
:
'8:30'
,
value
:
2
},
{
label
:
'8:30'
,
id
:
2
},
{
label
:
'9:00'
,
value
:
3
},{
label
:
'9:30'
,
value
:
4
},
{
label
:
'9:00'
,
id
:
3
},
{
label
:
'10:00'
,
value
:
5
},{
label
:
'10:30'
,
value
:
6
},
{
label
:
'9:30'
,
id
:
4
},
{
label
:
'11:00'
,
value
:
7
},{
label
:
'11:30'
,
value
:
8
},
{
label
:
'10:00'
,
id
:
5
},
{
label
:
'12:00'
,
value
:
9
},{
label
:
'12:30'
,
value
:
10
},
{
label
:
'10:30'
,
id
:
6
},
{
label
:
'13:00'
,
value
:
11
},{
label
:
'13:30'
,
value
:
12
},
{
label
:
'11:00'
,
id
:
7
},
{
label
:
'14:00'
,
value
:
13
},{
label
:
'14:30'
,
value
:
14
},
{
label
:
'11:30'
,
id
:
8
},
{
label
:
'15:00'
,
value
:
15
},{
label
:
'15:30'
,
value
:
16
},
{
label
:
'12:00'
,
id
:
9
},
{
label
:
'16:00'
,
value
:
17
},{
label
:
'16:30'
,
value
:
18
},
{
label
:
'12:30'
,
id
:
10
},
{
label
:
'17:00'
,
value
:
19
},{
label
:
'17:30'
,
value
:
20
},
{
label
:
'13:00'
,
id
:
11
},
{
label
:
'18:00'
,
value
:
21
},{
label
:
'18:30'
,
value
:
22
},
{
label
:
'13:30'
,
id
:
12
},
{
label
:
'19:00'
,
value
:
23
},{
label
:
'19:30'
,
value
:
24
},
{
label
:
'14:00'
,
id
:
13
},
{
label
:
'20:00'
,
value
:
25
},{
label
:
'20:30'
,
value
:
26
},
{
label
:
'14:30'
,
id
:
14
},
{
label
:
'21:00'
,
value
:
27
},{
label
:
'21:30'
,
value
:
28
},
{
label
:
'15:00'
,
id
:
15
},
{
label
:
'22:00'
,
value
:
29
},{
label
:
'22:30'
,
value
:
30
}
{
label
:
'15:30'
,
id
:
16
},
{
label
:
'16:00'
,
id
:
17
},
{
label
:
'16:30'
,
id
:
18
},
{
label
:
'17:00'
,
id
:
19
},
{
label
:
'17:30'
,
id
:
20
},
{
label
:
'18:00'
,
id
:
21
},
{
label
:
'18:30'
,
id
:
22
},
{
label
:
'19:00'
,
id
:
23
},
{
label
:
'19:30'
,
id
:
24
},
{
label
:
'20:00'
,
id
:
25
},
{
label
:
'20:30'
,
id
:
26
},
{
label
:
'21:00'
,
id
:
27
},
{
label
:
'21:30'
,
id
:
28
},
{
label
:
'22:00'
,
id
:
29
},
];
];
// console.log(this.router.getCurrentNavigation().extras.state)
// console.log(this.router.getCurrentNavigation().extras.state)
}
}
...
@@ -172,7 +158,7 @@ export class AddTaskComponent implements OnInit {
...
@@ -172,7 +158,7 @@ export class AddTaskComponent implements OnInit {
if
(
type
===
2
){
if
(
type
===
2
){
this
.
addTrack
.
taskTimeEnd
=
result
;
this
.
addTrack
.
taskTimeEnd
=
result
;
}
}
console
.
log
(
this
.
addTrack
.
taskTimeFrom
,
this
.
addTrack
.
taskTimeEnd
)
console
.
log
(
this
.
addTrack
.
taskTimeFrom
,
this
.
addTrack
.
taskTimeEnd
)
;
}
}
selectTask
(
id
){
selectTask
(
id
){
...
@@ -303,14 +289,14 @@ export class AddTaskComponent implements OnInit {
...
@@ -303,14 +289,14 @@ export class AddTaskComponent implements OnInit {
},
3000
);
},
3000
);
return
;
return
;
}
}
this
.
addTrack
=
{
const
trackAdded
=
{
...
this
.
addTrack
,
...
this
.
addTrack
,
taskImportantTag
:
this
.
addTrack
.
taskImportantTag
?
1
:
0
,
taskImportantTag
:
this
.
addTrack
.
taskImportantTag
?
1
:
0
,
isActive
:
1
,
isActive
:
1
,
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
],
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
],
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]
}
}
this
.
myService
.
addScheduleTrack
(
t
his
.
addTrack
).
subscribe
((
res
)
=>
{
this
.
myService
.
addScheduleTrack
(
t
rackAdded
).
subscribe
((
res
)
=>
{
const
toast
=
ToastService
.
show
(
`
${
res
[
'message'
]}
`
,
0
);
const
toast
=
ToastService
.
show
(
`
${
res
[
'message'
]}
`
,
0
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
ToastService
.
hide
();
ToastService
.
hide
();
...
...
src/app/my/my.service.ts
View file @
d71989c3
...
@@ -366,4 +366,11 @@ export class MyService {
...
@@ -366,4 +366,11 @@ export class MyService {
return
this
.
http
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
.
post
(
url
,
JSON
.
stringify
(
param
));
}
}
//删除日程
deleteScheduleTrackById
(
param
){
const
url
=
this
.
ydapi
+
'/practitioner/deleteScheduleTrackById'
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
param
));
}
}
}
src/app/my/score-details/score-details.component.ts
View file @
d71989c3
...
@@ -50,7 +50,7 @@ export class ScoreDetailsComponent implements OnInit {
...
@@ -50,7 +50,7 @@ export class ScoreDetailsComponent implements OnInit {
name
:
'PEP得分'
,
name
:
'PEP得分'
,
type
:
'pie'
,
type
:
'pie'
,
radius
:
[
'20%'
,
'40%'
],
radius
:
[
'20%'
,
'40%'
],
avoidLabelOverlap
:
fals
e
,
avoidLabelOverlap
:
tru
e
,
label
:
{
label
:
{
show
:
true
,
show
:
true
,
position
:
'outside'
,
position
:
'outside'
,
...
...
src/app/my/todo-list/todo-list.component.html
View file @
d71989c3
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<div
id=
"add_calendar_wrapper"
>
<div
id=
"add_calendar_wrapper"
>
<List
className=
"calendar-list"
style=
"backgroundColor: 'white'"
>
<List
className=
"calendar-list"
style=
"backgroundColor: 'white'"
>
<ListItem
(
onClick
)="
clickCalendar
()"
>
<ListItem
(
onClick
)="
clickCalendar
()"
>
<img
src=
"assets/images/date_icon.png"
/>
{{this.state.en ? '日历' : '日历'}}
{{this.state.en ? '日历' : '日历'}}
</ListItem>
</ListItem>
</List>
</List>
...
@@ -33,8 +34,8 @@
...
@@ -33,8 +34,8 @@
</ul>
</ul>
</div>
</div>
<div
class=
"task_wrapper"
>
<div
class=
"task_wrapper"
>
<div
class=
"noTask"
>
<div
class=
"noTask"
*
ngIf=
"!taskList?.length"
>
<img
src=
"assets/images/noListBg.png"
*
ngIf=
"!taskList?.length"
>
<img
src=
"assets/images/noListBg.png"
>
</div>
</div>
<div
class=
"taskList"
*
ngIf=
"taskList?.length>0"
>
<div
class=
"taskList"
*
ngIf=
"taskList?.length>0"
>
<div
class=
"taskTime"
>
<div
class=
"taskTime"
>
...
@@ -46,7 +47,7 @@
...
@@ -46,7 +47,7 @@
<div
class=
"taskContent"
>
<div
class=
"taskContent"
>
<div
class=
"title"
>
任务数量({{taskList?.length}})
</div>
<div
class=
"title"
>
任务数量({{taskList?.length}})
</div>
<ul>
<ul>
<li
*
ngFor=
"let taskItem of taskList"
>
<li
*
ngFor=
"let taskItem of taskList"
(
click
)="
deleteScheduleTrackById
(
taskItem
.
id
)"
>
<div
class=
"content_wrapper"
>
<div
class=
"content_wrapper"
>
<div
class=
"content_card"
>
<div
class=
"content_card"
>
<span>
{{taskItem.taskTimeFrom}} - {{taskItem.taskTimeEnd}}
</span>
<span>
{{taskItem.taskTimeFrom}} - {{taskItem.taskTimeEnd}}
</span>
...
@@ -62,7 +63,7 @@
...
@@ -62,7 +63,7 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<div
class=
"addBtn"
[
ngStyle
]="{'
background
'
:taskList
?.
length
?
'#
ff002b
'
:
'#
eb6100
'
,'
bottom
'
:taskList
?.
length
?'
4
%'
:
'
-15
%'
}"
[
routerLink
]="['/
addtask
']"
>
<div
class=
"addBtn"
[
ngStyle
]="{'
background
'
:taskList
?.
length
?
'#
ff002b
'
:
'#
eb6100
'}"
[
routerLink
]="['/
addtask
']"
>
<i
class=
"iconfont icon-jiahao"
></i>
<i
class=
"iconfont icon-jiahao"
></i>
</div>
</div>
</div>
</div>
...
...
src/app/my/todo-list/todo-list.component.scss
View file @
d71989c3
...
@@ -129,14 +129,14 @@ ul,ol{
...
@@ -129,14 +129,14 @@ ul,ol{
}
}
}
}
.addBtn
{
.addBtn
{
position
:
absolute
;
position
:
fixed
;
width
:
50px
;
width
:
50px
;
height
:
50px
;
height
:
50px
;
border-radius
:
50%
;
border-radius
:
50%
;
color
:
#fff
;
color
:
#fff
;
text-align
:
center
;
text-align
:
center
;
line-height
:
50px
;
line-height
:
50px
;
bottom
:
-15
%
;
bottom
:
4
%
;
right
:
8%
;
right
:
8%
;
z-index
:
100
;
z-index
:
100
;
.iconfont
{
.iconfont
{
...
...
src/app/my/todo-list/todo-list.component.ts
View file @
d71989c3
...
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
...
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
LifeCommonService
}
from
'../../common/life-common.service'
;
import
{
MyService
}
from
'../my.service'
;
import
{
MyService
}
from
'../my.service'
;
import
*
as
dayjs
from
'dayjs'
;
import
*
as
dayjs
from
'dayjs'
;
import
{
ModalService
,
ToastService
}
from
'ng-zorro-antd-mobile'
;
@
Component
({
@
Component
({
selector
:
'ydlife-todo-list'
,
selector
:
'ydlife-todo-list'
,
...
@@ -30,7 +31,7 @@ export class TodoListComponent implements OnInit {
...
@@ -30,7 +31,7 @@ export class TodoListComponent implements OnInit {
onSelect
:
undefined
,
onSelect
:
undefined
,
}
}
practitionerId
:
number
;
practitionerId
:
number
;
constructor
(
public
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
)
{
constructor
(
public
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
)
{
this
.
taskTimeList
=
[
this
.
taskTimeList
=
[
{
id
:
1
,
time
:
'8:00'
},
{
id
:
1
,
time
:
'8:00'
},
{
id
:
2
,
time
:
'9:00'
},
{
id
:
2
,
time
:
'9:00'
},
...
@@ -44,6 +45,10 @@ export class TodoListComponent implements OnInit {
...
@@ -44,6 +45,10 @@ export class TodoListComponent implements OnInit {
{
id
:
10
,
time
:
'17:00'
},
{
id
:
10
,
time
:
'17:00'
},
{
id
:
11
,
time
:
'18:00'
},
{
id
:
11
,
time
:
'18:00'
},
{
id
:
12
,
time
:
'19:00'
},
{
id
:
12
,
time
:
'19:00'
},
{
id
:
13
,
time
:
'20:00'
},
{
id
:
14
,
time
:
'21:00'
},
{
id
:
15
,
time
:
'22:00'
},
{
id
:
16
,
time
:
'23:00'
}
]
]
}
}
...
@@ -122,4 +127,23 @@ export class TodoListComponent implements OnInit {
...
@@ -122,4 +127,23 @@ export class TodoListComponent implements OnInit {
}
}
})
})
}
}
//删除日程
deleteScheduleTrackById
(
scheduleTrackId
){
ModalService
.
alert
(
'删除该项日程'
,
''
,
[
{
text
:
'取消'
,
onPress
:
()
=>
console
.
log
(
'取消'
)
},
{
text
:
'确定'
,
onPress
:
()
=>
this
.
myService
.
deleteScheduleTrackById
({
scheduleTrackId
:
scheduleTrackId
}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
queryScheduleTrackList
();
}
else
{
const
toast
=
ToastService
.
show
(
`
${
res
[
'message'
]}
`
,
0
);
setTimeout
(()
=>
{
ToastService
.
hide
();
},
3000
);
}
})
}
]);
}
}
}
src/styles.scss
View file @
d71989c3
...
@@ -114,9 +114,9 @@ input::placeholder {
...
@@ -114,9 +114,9 @@ input::placeholder {
// background-size: 100% 34px!important;
// background-size: 100% 34px!important;
// }
// }
.am-picker-col-indicator
{
.am-picker-col-indicator
{
background
:
#f6f6f6
;
//
background: #f6f6f6;
border-radius
:
50px
;
//
border-radius: 50px;
z-index
:
0
;
//
z-index: 0;
}
}
.
am-picker-col-indicator
:
:
before
,.
am-picker-col-indicator
::
after
{
.
am-picker-col-indicator
:
:
before
,.
am-picker-col-indicator
::
after
{
background-color
:
transparent
;
background-color
:
transparent
;
...
...
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