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
f8b78c9f
Commit
f8b78c9f
authored
Sep 24, 2020
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日程规划bug修复
parent
98df0791
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
115 additions
and
60 deletions
+115
-60
src/app/my/add-task/add-task.component.html
+5
-3
src/app/my/add-task/add-task.component.scss
+0
-1
src/app/my/add-task/add-task.component.ts
+38
-18
src/app/my/my-business/my-business.component.ts
+11
-8
src/app/my/recruiting/recruiting.component.ts
+3
-8
src/app/my/todo-list/todo-list.component.html
+5
-3
src/app/my/todo-list/todo-list.component.scss
+4
-2
src/app/my/todo-list/todo-list.component.ts
+49
-17
No files found.
src/app/my/add-task/add-task.component.html
View file @
f8b78c9f
...
@@ -38,13 +38,15 @@
...
@@ -38,13 +38,15 @@
<ul
class=
"part1_list"
>
<ul
class=
"part1_list"
>
<ng-container
*
ngFor=
"let salesActivityItem of salesActivityList"
>
<ng-container
*
ngFor=
"let salesActivityItem of salesActivityList"
>
<li
[
ngClass
]="{'
selected
'
:addTrack
.
mdDropOptionId=
=salesActivityItem.id}"
(
click
)="
selectTask
(
salesActivityItem
.
id
);"
<li
[
ngClass
]="{'
selected
'
:addTrack
.
mdDropOptionId=
=salesActivityItem.id}"
(
click
)="
selectTask
(
salesActivityItem
.
id
);"
*
ngIf=
"(addTrack.taskType == 1 && salesActivityItem.id != '102') || (addTrack.taskType == 2 && salesActivityItem.id != '114') || (addTrack.taskType == 3)"
>
*
ngIf=
"(addTrack.taskType == 1 && salesActivityItem.id != '102') || (addTrack.taskType == 2 && salesActivityItem.id != '114'
&& salesActivityItem.id != '113'
) || (addTrack.taskType == 3)"
>
{{salesActivityItem.dropOptionName}}
{{salesActivityItem.dropOptionName}}
</li>
</li>
</ng-container>
</ng-container>
</ul>
</ul>
<div
class=
"important_mark"
>
<span
[
ngClass
]="{'
circle
'
:addTrack
.
taskImportantTag=
=true}"
(
click
)="
addTrack
.
taskImportantTag=
!addTrack.taskImportantTag"
></span>
<div>
重要标签
</div>
</div>
<div
class=
"important_mark"
[
ngStyle
]="{'
bottom
'
:addTrack
.
taskType =
=
2
?'
-35
%'
:
'
5px
'}"
>
<span
[
ngClass
]="{'
circle
'
:addTrack
.
taskImportantTag=
=true}"
(
click
)="
addTrack
.
taskImportantTag=
!addTrack.taskImportantTag"
></span>
<div>
重要标签
</div>
</div>
</div>
</div>
<div
class=
"part_wrapper part2"
>
<div
class=
"part_wrapper part2"
>
<div
style=
"font-size: 18px;"
>
选择任务需要的时间
</div>
<div
style=
"font-size: 18px;"
>
选择任务需要的时间
</div>
...
...
src/app/my/add-task/add-task.component.scss
View file @
f8b78c9f
...
@@ -69,7 +69,6 @@ ul,ol{
...
@@ -69,7 +69,6 @@ ul,ol{
.important_mark
{
.important_mark
{
position
:
absolute
;
position
:
absolute
;
right
:
3%
;
right
:
3%
;
bottom
:
5px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#a0a0a0
;
color
:
#a0a0a0
;
display
:
flex
;
display
:
flex
;
...
...
src/app/my/add-task/add-task.component.ts
View file @
f8b78c9f
...
@@ -39,24 +39,29 @@ export class AddTaskComponent implements OnInit {
...
@@ -39,24 +39,29 @@ 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
:
'08:00'
,
value
:
1
},{
label
:
'08:30'
,
value
:
2
},
{
label
:
'06:00'
,
value
:
1
},{
label
:
'06:30'
,
value
:
2
},
{
label
:
'09:00'
,
value
:
3
},{
label
:
'09:30'
,
value
:
4
},
{
label
:
'07:00'
,
value
:
3
},{
label
:
'07:30'
,
value
:
4
},
{
label
:
'10:00'
,
value
:
5
},{
label
:
'10:30'
,
value
:
6
},
{
label
:
'08:00'
,
value
:
5
},{
label
:
'08:30'
,
value
:
6
},
{
label
:
'11:00'
,
value
:
7
},{
label
:
'11:30'
,
value
:
8
},
{
label
:
'09:00'
,
value
:
7
},{
label
:
'09:30'
,
value
:
8
},
{
label
:
'12:00'
,
value
:
9
},{
label
:
'12:30'
,
value
:
10
},
{
label
:
'10:00'
,
value
:
9
},{
label
:
'10:30'
,
value
:
10
},
{
label
:
'13:00'
,
value
:
11
},{
label
:
'13:30'
,
value
:
12
},
{
label
:
'11:00'
,
value
:
11
},{
label
:
'11:30'
,
value
:
12
},
{
label
:
'14:00'
,
value
:
13
},{
label
:
'14:30'
,
value
:
14
},
{
label
:
'12:00'
,
value
:
13
},{
label
:
'12:30'
,
value
:
14
},
{
label
:
'15:00'
,
value
:
15
},{
label
:
'15:30'
,
value
:
16
},
{
label
:
'13:00'
,
value
:
15
},{
label
:
'13:30'
,
value
:
16
},
{
label
:
'16:00'
,
value
:
17
},{
label
:
'16:30'
,
value
:
18
},
{
label
:
'14:00'
,
value
:
17
},{
label
:
'14:30'
,
value
:
18
},
{
label
:
'17:00'
,
value
:
19
},{
label
:
'17:30'
,
value
:
20
},
{
label
:
'15:00'
,
value
:
19
},{
label
:
'15:30'
,
value
:
20
},
{
label
:
'18:00'
,
value
:
21
},{
label
:
'18:30'
,
value
:
22
},
{
label
:
'16:00'
,
value
:
21
},{
label
:
'16:30'
,
value
:
22
},
{
label
:
'19:00'
,
value
:
23
},{
label
:
'19:30'
,
value
:
24
},
{
label
:
'17:00'
,
value
:
23
},{
label
:
'17:30'
,
value
:
24
},
{
label
:
'20:00'
,
value
:
25
},{
label
:
'20:30'
,
value
:
26
},
{
label
:
'18:00'
,
value
:
25
},{
label
:
'18:30'
,
value
:
26
},
{
label
:
'21:00'
,
value
:
27
},{
label
:
'21:30'
,
value
:
28
},
{
label
:
'19:00'
,
value
:
27
},{
label
:
'19:30'
,
value
:
28
},
{
label
:
'22:00'
,
value
:
29
},{
label
:
'22:30'
,
value
:
30
}
{
label
:
'20:00'
,
value
:
29
},{
label
:
'20:30'
,
value
:
30
},
{
label
:
'21:00'
,
value
:
31
},{
label
:
'21:30'
,
value
:
32
},
{
label
:
'22:00'
,
value
:
33
},{
label
:
'22:30'
,
value
:
34
},
{
label
:
'23:00'
,
value
:
35
},{
label
:
'23:30'
,
value
:
36
},
{
label
:
'00:00'
,
value
:
37
}
];
];
// console.log(this.router.getCurrentNavigation().extras.state)
// console.log(this.router.getCurrentNavigation().extras.state)
this
.
taskInfo
=
this
.
router
.
getCurrentNavigation
().
extras
.
state
;
// this.taskInfo = this.router.getCurrentNavigation().extras.state;
this
.
taskInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'taskInfo'
));
}
}
initPara
()
{
initPara
()
{
...
@@ -107,6 +112,8 @@ export class AddTaskComponent implements OnInit {
...
@@ -107,6 +112,8 @@ export class AddTaskComponent implements OnInit {
this
.
dropOptionsQuery
(
this
.
tabType
);
this
.
dropOptionsQuery
(
this
.
tabType
);
this
.
addTrack
.
mdDropOptionId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'mdDropOptionId'
];
this
.
addTrack
.
mdDropOptionId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'mdDropOptionId'
];
},
300
);
},
300
);
this
.
addTrack
.
taskTimeFrom
=
[
'08:30'
];
this
.
addTrack
.
taskTimeEnd
=
[
'08:30'
];
}
else
{
}
else
{
//新增
//新增
this
.
addTrack
.
mdDropOptionId
=
null
;
this
.
addTrack
.
mdDropOptionId
=
null
;
...
@@ -127,7 +134,8 @@ export class AddTaskComponent implements OnInit {
...
@@ -127,7 +134,8 @@ export class AddTaskComponent implements OnInit {
goBack
(){
goBack
(){
// history.go(-1);
// history.go(-1);
this
.
router
.
navigate
([
'/todo'
])
this
.
router
.
navigate
([
'/todo'
]);
localStorage
.
removeItem
(
'taskInfo'
);
}
}
//判断是否选择同一个tab
//判断是否选择同一个tab
...
@@ -188,6 +196,17 @@ export class AddTaskComponent implements OnInit {
...
@@ -188,6 +196,17 @@ export class AddTaskComponent implements OnInit {
taskType
:
this
.
addTrack
.
taskType
taskType
:
this
.
addTrack
.
taskType
}
}
sessionStorage
.
setItem
(
'pageDwellDtatus'
,
JSON
.
stringify
(
pageDwellDtatus
));
sessionStorage
.
setItem
(
'pageDwellDtatus'
,
JSON
.
stringify
(
pageDwellDtatus
));
//如果从查询页过来选了新的任务重新设置
if
(
this
.
taskInfo
){
this
.
taskInfo
=
{
...
this
.
taskInfo
,
tabType
:
this
.
tabType
,
mdDropOptionId
:
this
.
addTrack
.
mdDropOptionId
,
taskType
:
this
.
addTrack
.
taskType
}
localStorage
.
setItem
(
'taskInfo'
,
JSON
.
stringify
(
this
.
taskInfo
));
}
if
(
this
.
tabType
==
'bizchance_promotion_action'
){
if
(
this
.
tabType
==
'bizchance_promotion_action'
){
ModalService
.
alert
(
'是否联系到商机'
,
''
,
[
ModalService
.
alert
(
'是否联系到商机'
,
''
,
[
{
text
:
'否'
,
onPress
:
()
=>
{
text
:
'否'
,
onPress
:
()
=>
...
@@ -312,7 +331,8 @@ export class AddTaskComponent implements OnInit {
...
@@ -312,7 +331,8 @@ export class AddTaskComponent implements OnInit {
taskImportantTag
:
this
.
addTrack
.
taskImportantTag
?
1
:
0
,
taskImportantTag
:
this
.
addTrack
.
taskImportantTag
?
1
:
0
,
isActive
:
1
,
isActive
:
1
,
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
]?
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
]:
this
.
addTrack
.
taskTimeFrom
[
0
],
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
]?
this
.
addTrack
.
taskTimeFrom
[
0
][
'label'
]:
this
.
addTrack
.
taskTimeFrom
[
0
],
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]?
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]:
this
.
addTrack
.
taskTimeEnd
[
0
]
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]?
this
.
addTrack
.
taskTimeEnd
[
0
][
'label'
]:
this
.
addTrack
.
taskTimeEnd
[
0
],
mdDropOptionName
:
undefined
}
}
if
(
trackAdded
.
taskTimeFrom
==
trackAdded
.
taskTimeEnd
){
if
(
trackAdded
.
taskTimeFrom
==
trackAdded
.
taskTimeEnd
){
const
toast
=
ToastService
.
show
(
'任务起始时间不能等于结束时间!'
,
0
);
const
toast
=
ToastService
.
show
(
'任务起始时间不能等于结束时间!'
,
0
);
...
...
src/app/my/my-business/my-business.component.ts
View file @
f8b78c9f
...
@@ -60,7 +60,9 @@ export class MyBusinessComponent implements OnInit {
...
@@ -60,7 +60,9 @@ export class MyBusinessComponent implements OnInit {
change
(
event
){
change
(
event
){
this
.
showBusinessList
=
this
.
businessList
.
filter
((
item
)
=>
{
this
.
showBusinessList
=
this
.
businessList
.
filter
((
item
)
=>
{
if
(
item
.
name
){
return
item
.
name
.
indexOf
(
event
)
!=-
1
;
return
item
.
name
.
indexOf
(
event
)
!=-
1
;
}
})
})
}
}
...
@@ -70,14 +72,15 @@ export class MyBusinessComponent implements OnInit {
...
@@ -70,14 +72,15 @@ export class MyBusinessComponent implements OnInit {
// this.router.navigate(['/addtask/'], { queryParams: { customerId:opportunityId , referLeadsId: leadsAssignedId },state:this.selectedBusiness});
// this.router.navigate(['/addtask/'], { queryParams: { customerId:opportunityId , referLeadsId: leadsAssignedId },state:this.selectedBusiness});
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
customerId
:
opportunityId
,
referLeadsId
:
leadsAssignedId
}});
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
customerId
:
opportunityId
,
referLeadsId
:
leadsAssignedId
}});
}
else
{
}
else
{
this
.
toastDialog
=
true
;
this
.
router
.
navigate
([
'/addtask/'
]);
this
.
toastInfo
=
{
// this.toastDialog = true;
status
:
1
,
// this.toastInfo = {
msg
:
'请选择您需要关联的商机!'
,
// status: 1,
timeout
:
3000
,
// msg:'请选择您需要关联的商机!',
align
:
'center'
// timeout: 3000,
};
// align: 'center'
return
;
// };
// return;
}
}
}
}
}
}
src/app/my/recruiting/recruiting.component.ts
View file @
f8b78c9f
...
@@ -62,7 +62,9 @@ export class RecruitingComponent implements OnInit {
...
@@ -62,7 +62,9 @@ export class RecruitingComponent implements OnInit {
change
(
event
){
change
(
event
){
this
.
showRecruitingList
=
this
.
recruitingList
.
filter
((
item
)
=>
{
this
.
showRecruitingList
=
this
.
recruitingList
.
filter
((
item
)
=>
{
if
(
item
.
name
){
return
item
.
name
.
indexOf
(
event
)
!=-
1
;
return
item
.
name
.
indexOf
(
event
)
!=-
1
;
}
})
})
}
}
...
@@ -85,14 +87,7 @@ export class RecruitingComponent implements OnInit {
...
@@ -85,14 +87,7 @@ export class RecruitingComponent implements OnInit {
// this.router.navigate(['/addtask/'], { queryParams: { referPotentialId: potentialId },state:this.selectedRecruiting});
// this.router.navigate(['/addtask/'], { queryParams: { referPotentialId: potentialId },state:this.selectedRecruiting});
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
referPotentialId
:
potentialId
}});
this
.
router
.
navigate
([
'/addtask/'
],
{
queryParams
:
{
referPotentialId
:
potentialId
}});
}
else
{
}
else
{
this
.
toastDialog
=
true
;
this
.
router
.
navigate
([
'/addtask/'
]);
this
.
toastInfo
=
{
status
:
1
,
msg
:
'请选择您需要关联的增员对象!'
,
timeout
:
3000
,
align
:
'center'
};
return
;
}
}
}
}
}
}
src/app/my/todo-list/todo-list.component.html
View file @
f8b78c9f
...
@@ -55,7 +55,9 @@
...
@@ -55,7 +55,9 @@
<span
*
ngIf=
"taskItem.taskImportantTag==1"
>
(重要)
</span>
<span
*
ngIf=
"taskItem.taskImportantTag==1"
>
(重要)
</span>
{{taskItem.mdDropOptionName}}
{{taskItem.mdDropOptionName}}
</div>
</div>
<div
class=
"notice"
>
{{taskItem.notice}}
</div>
<div
class=
"notice"
>
{{taskItem.notice}}
</div>
</div>
</div>
<div
class=
"red"
*
ngIf=
"taskItem.taskImportantTag==1"
></div>
<div
class=
"red"
*
ngIf=
"taskItem.taskImportantTag==1"
></div>
<div
class=
"iconfont icon-shanchu1"
(
click
)="
editeTask
(
taskItem
,'
delete
')"
></div>
<div
class=
"iconfont icon-shanchu1"
(
click
)="
editeTask
(
taskItem
,'
delete
')"
></div>
...
@@ -65,8 +67,8 @@
...
@@ -65,8 +67,8 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<div
class=
"addBtn"
[
ngStyle
]="{'
background
'
:taskList
?.
length
?
'#
ff002b
'
:
'#
eb6100
'}"
[
routerLink
]="['/
addtask
']"
>
<div
class=
"addBtn"
*
ngIf=
"editFlag"
[
ngStyle
]="{'
background
'
:taskList
?.
length
?
'#
ff002b
'
:
'#
eb6100
'}"
[
routerLink
]="['/
addtask
']"
>
<i
class=
"iconfont icon-jiahao"
></i>
<i
class=
"iconfont icon-jiahao"
(
click
)="
removeTaskInfo
()"
></i>
</div>
</div>
</div>
</div>
<!-- <Calendar [(ngModel)]="this.state.date"
<!-- <Calendar [(ngModel)]="this.state.date"
...
...
src/app/my/todo-list/todo-list.component.scss
View file @
f8b78c9f
...
@@ -110,6 +110,7 @@ ul,ol{
...
@@ -110,6 +110,7 @@ ul,ol{
}
}
.notice
{
.notice
{
color
:
#a0a0a0
;
color
:
#a0a0a0
;
word-break
:break-all
;
}
}
}
}
.red
{
.red
{
...
@@ -126,8 +127,9 @@ ul,ol{
...
@@ -126,8 +127,9 @@ ul,ol{
position
:
absolute
;
position
:
absolute
;
right
:
5px
;
right
:
5px
;
z-index
:
20
;
z-index
:
20
;
font-size
:
24px
;
font-size
:
20px
;
top
:
35%
;
top
:
32px
;
color
:
#a0a0a0
;
}
}
}
}
}
}
...
...
src/app/my/todo-list/todo-list.component.ts
View file @
f8b78c9f
...
@@ -32,25 +32,31 @@ export class TodoListComponent implements OnInit {
...
@@ -32,25 +32,31 @@ export class TodoListComponent implements OnInit {
onSelect
:
undefined
,
onSelect
:
undefined
,
}
}
practitionerId
:
number
;
practitionerId
:
number
;
//日程是否可修改
editFlag
:
boolean
=
true
;
localTime
:
any
=
new
Date
().
getTime
();
constructor
(
public
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
,
constructor
(
public
lifeCommonService
:
LifeCommonService
,
private
myService
:
MyService
,
private
_modal
:
ModalService
,
private
_toast
:
ToastService
,
private
router
:
Router
)
{
private
_modal
:
ModalService
,
private
_toast
:
ToastService
,
private
router
:
Router
)
{
this
.
taskTimeList
=
[
this
.
taskTimeList
=
[
{
id
:
1
,
time
:
'8:00'
},
{
id
:
1
,
time
:
'6:00'
},
{
id
:
2
,
time
:
'9:00'
},
{
id
:
2
,
time
:
'7:00'
},
{
id
:
3
,
time
:
'10:00'
},
{
id
:
3
,
time
:
'8:00'
},
{
id
:
4
,
time
:
'11:00'
},
{
id
:
4
,
time
:
'9:00'
},
{
id
:
5
,
time
:
'12:00'
},
{
id
:
5
,
time
:
'10:00'
},
{
id
:
6
,
time
:
'13:00'
},
{
id
:
6
,
time
:
'11:00'
},
{
id
:
7
,
time
:
'14:00'
},
{
id
:
7
,
time
:
'12:00'
},
{
id
:
8
,
time
:
'15:00'
},
{
id
:
8
,
time
:
'13:00'
},
{
id
:
9
,
time
:
'16:00'
},
{
id
:
9
,
time
:
'14:00'
},
{
id
:
10
,
time
:
'17:00'
},
{
id
:
10
,
time
:
'15:00'
},
{
id
:
11
,
time
:
'18:00'
},
{
id
:
11
,
time
:
'16:00'
},
{
id
:
12
,
time
:
'19:00'
},
{
id
:
12
,
time
:
'17:00'
},
{
id
:
13
,
time
:
'20:00'
},
{
id
:
13
,
time
:
'18:00'
},
{
id
:
14
,
time
:
'21:00'
},
{
id
:
14
,
time
:
'19:00'
},
{
id
:
15
,
time
:
'22:00'
},
{
id
:
15
,
time
:
'20:00'
},
{
id
:
16
,
time
:
'23:00'
}
{
id
:
16
,
time
:
'21:00'
},
{
id
:
17
,
time
:
'22:00'
},
{
id
:
18
,
time
:
'23:00'
},
{
id
:
19
,
time
:
'00:00'
},
]
]
}
}
...
@@ -79,6 +85,12 @@ export class TodoListComponent implements OnInit {
...
@@ -79,6 +85,12 @@ export class TodoListComponent implements OnInit {
//缓存任务时间
//缓存任务时间
sessionStorage
.
setItem
(
'trackTime'
,
this
.
trackTime
);
sessionStorage
.
setItem
(
'trackTime'
,
this
.
trackTime
);
this
.
queryScheduleTrackList
();
this
.
queryScheduleTrackList
();
//选中时间<当前时间
if
((
new
Date
(
this
.
trackTime
+
' 23:59'
).
getTime
())
<
this
.
localTime
){
this
.
editFlag
=
false
;
}
else
{
this
.
editFlag
=
true
;
}
}
}
initPara
()
{
initPara
()
{
...
@@ -124,6 +136,12 @@ export class TodoListComponent implements OnInit {
...
@@ -124,6 +136,12 @@ export class TodoListComponent implements OnInit {
sessionStorage
.
setItem
(
'trackTime'
,
this
.
trackTime
);
sessionStorage
.
setItem
(
'trackTime'
,
this
.
trackTime
);
this
.
queryScheduleTrackList
();
this
.
queryScheduleTrackList
();
this
.
weekArr
=
this
.
lifeCommonService
.
makeDate
(
startDate
);
this
.
weekArr
=
this
.
lifeCommonService
.
makeDate
(
startDate
);
//选中时间<当前时间
if
((
new
Date
(
this
.
trackTime
+
' 23:59'
).
getTime
())
<
this
.
localTime
){
this
.
editFlag
=
false
;
}
else
{
this
.
editFlag
=
true
;
}
}
}
queryScheduleTrackList
(){
queryScheduleTrackList
(){
...
@@ -157,9 +175,23 @@ export class TodoListComponent implements OnInit {
...
@@ -157,9 +175,23 @@ export class TodoListComponent implements OnInit {
editeTask
(
taskInfo
,
type
){
editeTask
(
taskInfo
,
type
){
if
(
type
==
'edit'
){
if
(
type
==
'edit'
){
this
.
router
.
navigate
([
'/addtask'
],
{
state
:
taskInfo
})
if
(
this
.
editFlag
==
true
){
this
.
router
.
navigate
([
'/addtask'
],
{
state
:
taskInfo
});
localStorage
.
setItem
(
'taskInfo'
,
JSON
.
stringify
(
taskInfo
))
}
else
{
const
toast
=
ToastService
.
show
(
'不可以修改今天之前的日程哦!'
,
0
);
setTimeout
(()
=>
{
ToastService
.
hide
();
},
3000
);
}
}
else
{
}
else
{
this
.
deleteScheduleTrackById
(
taskInfo
);
this
.
deleteScheduleTrackById
(
taskInfo
);
}
}
}
}
//新增的时候清空编辑缓存
removeTaskInfo
(){
localStorage
.
removeItem
(
'taskInfo'
);
sessionStorage
.
removeItem
(
'pageDwellDtatus'
);
}
}
}
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