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
96ec3842
Commit
96ec3842
authored
Sep 25, 2020
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间选择缓存
parent
26bb4d48
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
34 deletions
+56
-34
src/app/my/add-task/add-task.component.html
+2
-1
src/app/my/add-task/add-task.component.scss
+6
-3
src/app/my/add-task/add-task.component.ts
+43
-26
src/styles.scss
+5
-4
No files found.
src/app/my/add-task/add-task.component.html
View file @
96ec3842
...
...
@@ -39,7 +39,8 @@
<ng-container
*
ngFor=
"let salesActivityItem of salesActivityList"
>
<li
[
ngClass
]="{'
selected
'
:addTrack
.
mdDropOptionId=
=salesActivityItem.id}"
(
click
)="
selectTask
(
salesActivityItem
.
id
);"
*
ngIf=
"(addTrack.taskType == 1 && salesActivityItem.id != '102') || (addTrack.taskType == 2 && salesActivityItem.id != '114' && salesActivityItem.id != '113') || (addTrack.taskType == 3)"
>
{{salesActivityItem.dropOptionName}}
<span
class=
"dot"
*
ngIf=
"(addTrack.mdDropOptionId==salesActivityItem.id && addTrack.referLeadsId) || (addTrack.mdDropOptionId==salesActivityItem.id && addTrack.referPotentialId)"
style=
"width: 5px;height: 5px;background: red;border-radius: 50%;position: absolute;right: 0;top: -5px;"
></span>
{{salesActivityItem.dropOptionName}}
</li>
</ng-container>
</ul>
...
...
src/app/my/add-task/add-task.component.scss
View file @
96ec3842
...
...
@@ -4,7 +4,7 @@ ul,ol{
.todo_wrapper
{
background
:
#fff
;
//
padding-bottom: 60px;
padding-bottom
:
60px
;
.top
{
.head
{
display
:
flex
;
...
...
@@ -42,7 +42,7 @@ ul,ol{
}
.task_content_wrapper
{
.part_wrapper
{
margin-top
:
1
0
px
;
margin-top
:
1
5
px
;
position
:
relative
;
padding
:
0
4%
;
ul
{
...
...
@@ -59,6 +59,7 @@ ul,ol{
background
:
#f6f6f6
;
border-radius
:
10px
;
margin
:
5px
1%
;
position
:
relative
;
}
li
.selected
{
background
:
#1b5b99
;
...
...
@@ -91,6 +92,8 @@ ul,ol{
display
:
flex
;
justify-content
:
space-evenly
;
align-items
:
center
;
height
:
100px
;
overflow
:
hidden
;
.picker_list
{
width
:
35%
;
}
...
...
@@ -128,7 +131,7 @@ ul,ol{
background
:
#1b5b99
;
color
:
#fff
;
text-align
:
center
;
//
position: fixed;
position
:
fixed
;
bottom
:
0
;
font-size
:
20px
;
font-weight
:
bold
;
...
...
src/app/my/add-task/add-task.component.ts
View file @
96ec3842
...
...
@@ -89,6 +89,7 @@ export class AddTaskComponent implements OnInit {
this
.
addTrack
.
referLeadsId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'referLeadsId'
];
this
.
addTrack
.
referPotentialId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'referPotentialId'
];
this
.
addTrack
.
customerId
=
this
.
activateRoute
.
snapshot
.
queryParams
[
'customerId'
];
console
.
log
(
this
.
addTrack
.
referLeadsId
)
//查询
if
(
this
.
taskInfo
){
for
(
let
i
=
0
;
i
<
this
.
tabList
.
length
;
i
++
){
...
...
@@ -104,32 +105,34 @@ export class AddTaskComponent implements OnInit {
taskTimeEnd
:
[
this
.
taskInfo
.
taskTimeEnd
]
};
}
else
{
//商机页或者增员页跳转过来如果有缓存切换到缓存数据
if
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))){
this
.
tabType
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'tabType'
];
this
.
addTrack
.
taskType
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'taskType'
];
setTimeout
(()
=>
{
//商机页或者增员页跳转过来如果有缓存切换到缓存数据
if
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))){
const
pageDwellDtatus
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))
this
.
tabType
=
pageDwellDtatus
[
'tabType'
];
this
.
addTrack
.
taskType
=
pageDwellDtatus
[
'taskType'
];
setTimeout
(()
=>
{
this
.
dropOptionsQuery
(
this
.
tabType
);
this
.
addTrack
.
mdDropOptionId
=
pageDwellDtatus
[
'mdDropOptionId'
];
},
300
);
this
.
addTrack
.
taskTimeFrom
=
[
pageDwellDtatus
[
'taskTimeFrom'
][
0
][
'label'
]?
pageDwellDtatus
[
'taskTimeFrom'
][
0
][
'label'
]:
pageDwellDtatus
[
'taskTimeFrom'
][
0
]];
this
.
addTrack
.
taskTimeEnd
=
[
pageDwellDtatus
[
'taskTimeEnd'
][
0
][
'label'
]?
pageDwellDtatus
[
'taskTimeEnd'
][
0
][
'label'
]:
pageDwellDtatus
[
'taskTimeEnd'
][
0
]];
}
else
{
//新增
this
.
addTrack
.
mdDropOptionId
=
null
;
this
.
tabType
=
'bizchance_promotion_action'
;
this
.
addTrack
.
taskType
=
1
;
this
.
dropOptionsQuery
(
this
.
tabType
);
this
.
addTrack
.
mdDropOptionId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'pageDwellDtatus'
))[
'mdDropOptionId'
];
},
300
);
this
.
addTrack
.
taskTimeFrom
=
[
'08:30'
];
this
.
addTrack
.
taskTimeEnd
=
[
'08:30'
];
}
else
{
//新增
this
.
addTrack
.
mdDropOptionId
=
null
;
this
.
tabType
=
'bizchance_promotion_action'
;
this
.
addTrack
.
taskType
=
1
;
this
.
dropOptionsQuery
(
this
.
tabType
);
}
//如果有日程时间就取缓存没有就默认当天
if
(
sessionStorage
.
getItem
(
'trackTime'
)){
this
.
addTrack
.
trackTime
=
sessionStorage
.
getItem
(
'trackTime'
);
}
else
{
this
.
addTrack
.
trackTime
=
dayjs
().
format
(
'YYYY-MM-DD'
);
}
this
.
addTrack
.
taskTimeFrom
=
[
'08:30'
];
this
.
addTrack
.
taskTimeEnd
=
[
'08:30'
];
this
.
addTrack
.
taskTimeFrom
=
[
'08:30'
];
this
.
addTrack
.
taskTimeEnd
=
[
'08:30'
];
}
//如果有日程时间就取缓存没有就默认当天
if
(
sessionStorage
.
getItem
(
'trackTime'
)){
this
.
addTrack
.
trackTime
=
sessionStorage
.
getItem
(
'trackTime'
);
}
else
{
this
.
addTrack
.
trackTime
=
dayjs
().
format
(
'YYYY-MM-DD'
);
}
}
}
goBack
(){
...
...
@@ -165,7 +168,9 @@ export class AddTaskComponent implements OnInit {
pageDwellDtatus
=
{
tabType
:
this
.
tabType
,
mdDropOptionId
:
null
,
taskType
:
this
.
addTrack
.
taskType
taskType
:
this
.
addTrack
.
taskType
,
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
,
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
}
sessionStorage
.
setItem
(
'pageDwellDtatus'
,
JSON
.
stringify
(
pageDwellDtatus
));
}
...
...
@@ -186,6 +191,14 @@ export class AddTaskComponent implements OnInit {
if
(
type
===
2
){
this
.
addTrack
.
taskTimeEnd
=
result
;
}
const
pageDwellDtatus
=
{
tabType
:
this
.
tabType
,
mdDropOptionId
:
this
.
addTrack
.
mdDropOptionId
,
taskType
:
this
.
addTrack
.
taskType
,
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
,
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
}
sessionStorage
.
setItem
(
'pageDwellDtatus'
,
JSON
.
stringify
(
pageDwellDtatus
));
}
selectTask
(
id
){
...
...
@@ -193,7 +206,9 @@ export class AddTaskComponent implements OnInit {
const
pageDwellDtatus
=
{
tabType
:
this
.
tabType
,
mdDropOptionId
:
this
.
addTrack
.
mdDropOptionId
,
taskType
:
this
.
addTrack
.
taskType
taskType
:
this
.
addTrack
.
taskType
,
taskTimeFrom
:
this
.
addTrack
.
taskTimeFrom
,
taskTimeEnd
:
this
.
addTrack
.
taskTimeEnd
}
sessionStorage
.
setItem
(
'pageDwellDtatus'
,
JSON
.
stringify
(
pageDwellDtatus
));
//如果从查询页过来选了新的任务重新设置
...
...
@@ -247,6 +262,8 @@ export class AddTaskComponent implements OnInit {
clearRouterInfo
(){
this
.
linkToastFlag
=
false
,
this
.
router
.
navigate
([
'/addtask'
],
{
replaceUrl
:
true
});
this
.
addTrack
.
referLeadsId
=
undefined
;
this
.
addTrack
.
referPotentialId
=
undefined
;
}
clickCalendar
(){
...
...
src/styles.scss
View file @
96ec3842
...
...
@@ -108,11 +108,12 @@ input::placeholder {
}
.timeContent
{
.am-picker-col
{
//
height: 102px;
//
.am-picker-col-mask{
//
background-size: 100% 34px!important;
//
}
//
height: 102px;
//
.am-picker-col-mask{
//
background-size: 100% 34px!important;
//
}
.am-picker-col-indicator
{
// background: #f6f6f6;
// border-radius: 50px;
...
...
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