Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
a0581383
Commit
a0581383
authored
Apr 07, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
f427480c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
21 deletions
+27
-21
birthActiveTime.vue
src/views/ai/task/components/birthActiveTime.vue
+22
-16
task.vue
src/views/ai/task/task.vue
+5
-5
No files found.
src/views/ai/task/components/birthActiveTime.vue
View file @
a0581383
...
...
@@ -101,20 +101,25 @@ export default {
},
pickerOptionsMonth
:
{
onPick
(
time
)
{
console
.
log
(
time
);
// 起始时间:仅半年范围内 && 结束时间:跨度最多3个月,即所选起始时间往后+90天为上限;
if
(
!
time
.
maxDate
)
{
const
minTimeRange
=
90
*
24
*
60
*
60
*
1000
;
// 3个月
const
maxTimeRange
=
180
*
24
*
60
*
60
*
1000
;
// 6个月
minTimeMonth
=
time
.
minDate
.
getTime
()
-
minTimeRange
>
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
?
time
.
minDate
.
getTime
()
-
minTimeRange
:
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
maxTimeMonth
=
time
.
minDate
.
getTime
()
+
minTimeRange
<
new
Date
().
getTime
()
+
maxTimeRange
?
time
.
minDate
.
getTime
()
+
minTimeRange
:
new
Date
().
getTime
()
+
maxTimeRange
;
const
maxRange
=
new
Date
().
getMonth
()
+
5
;
const
selectRange
=
new
Date
(
time
.
minDate
).
getMonth
()
+
2
;
console
.
log
(
new
Date
(
time
.
minDate
).
getMonth
());
console
.
log
(
new
Date
().
getMonth
());
// minTimeMonth = new Date(time.minDate).getMonth() - new Date().getMonth() >= 3 ? new Date(time.minDate).getMonth() - 1 : new Date().getMonth() + 1;
minTimeMonth
=
new
Date
(
time
.
minDate
).
getMonth
()
-
new
Date
().
getMonth
()
>=
3
?
new
Date
(
time
.
minDate
).
getMonth
()
-
1
:
new
Date
().
getMonth
();
maxTimeMonth
=
maxRange
-
selectRange
>
0
?
(
maxRange
-
selectRange
>=
3
?
selectRange
:
maxRange
-
selectRange
)
:
maxRange
;
}
},
disabledDate
:
time
=>
{
const
maxTimeRange
=
180
*
24
*
60
*
60
*
1000
;
// 6个月
if
(
maxTimeMonth
)
{
return
time
.
getTime
()
<
minTimeMonth
||
time
.
getTime
()
>
maxTimeMonth
;
let
month
=
new
Date
(
time
).
getMonth
();
if
(
m
inTimeMonth
&&
m
axTimeMonth
)
{
return
month
<
minTimeMonth
||
month
>
maxTimeMonth
||
new
Date
(
time
).
getFullYear
()
!=
new
Date
().
getFullYear
()
;
}
else
{
return
time
.
getTime
()
<
new
Date
(
new
Date
().
getFullYear
(),
new
Date
().
getMonth
(),
1
).
getTime
()
||
time
.
getTime
()
>
new
Date
().
getTime
()
+
maxTimeRange
;
return
month
<
new
Date
().
getMonth
()
||
month
>
new
Date
().
getMonth
()
+
5
||
new
Date
(
time
).
getFullYear
()
!=
new
Date
().
getFullYear
()
;
}
}
},
...
...
@@ -138,13 +143,14 @@ export default {
computed
:
{
activeTime
()
{
let
str
=
''
;
if
(
this
.
form
.
birth_type
==
1
&&
this
.
form
.
birthDate1
&&
this
.
form
.
birthDate1
.
length
)
{
str
=
formatDateTimeByType
(
this
.
form
.
birthDate1
[
0
],
'yyyy-MM-dd'
)
+
' 至 '
+
formatDateTimeByType
(
this
.
form
.
birthDate1
[
1
],
'yyyy-MM-dd'
);
}
else
if
(
this
.
form
.
birth_type
==
2
&&
this
.
form
.
birthDate2
&&
this
.
form
.
birthDate2
.
length
)
{
str
=
formatDateTimeByType
(
this
.
form
.
birthDate2
[
0
],
'yyyy-MM-dd'
)
+
' 至 '
+
formatDateTimeByType
(
this
.
form
.
birthDate2
[
1
],
'yyyy-MM-dd'
);
}
else
if
(
this
.
form
.
birth_type
==
3
&&
this
.
form
.
birthDate1
&&
this
.
form
.
birthDate1
.
length
)
{
let
start
=
this
.
form
.
birthDate1
[
0
]
-
this
.
form
.
birth_days
*
24
*
60
*
60
*
1000
;
let
end
=
this
.
form
.
birthDate1
[
1
]
-
this
.
form
.
birth_days
*
24
*
60
*
60
*
1000
;
const
{
birth_type
,
birthDate1
,
birth_days
,
birthDate2
}
=
this
.
form
;
if
(
birth_type
==
1
&&
birthDate1
&&
birthDate1
.
length
)
{
str
=
formatDateTimeByType
(
birthDate1
[
0
],
'yyyy-MM-dd'
)
+
' 至 '
+
formatDateTimeByType
(
birthDate1
[
1
],
'yyyy-MM-dd'
);
}
else
if
(
birth_type
==
2
&&
birthDate2
&&
birthDate2
.
length
)
{
str
=
formatDateTimeByType
(
new
Date
(
birthDate2
[
0
]).
getMonth
()
+
1
==
new
Date
().
getMonth
()
+
1
?
this
.
currentTime
:
birthDate2
[
0
],
'yyyy-MM-dd'
)
+
' 至 '
+
formatDateTimeByType
(
birthDate2
[
1
],
'yyyy-MM-dd'
);
}
else
if
(
birth_type
==
3
&&
birthDate1
&&
birthDate1
.
length
)
{
let
start
=
birthDate1
[
0
]
-
birth_days
*
24
*
60
*
60
*
1000
;
let
end
=
birthDate1
[
1
]
-
birth_days
*
24
*
60
*
60
*
1000
;
str
=
formatDateTimeByType
(
start
,
'yyyy-MM-dd'
)
+
' 至 '
+
formatDateTimeByType
(
end
,
'yyyy-MM-dd'
);
}
return
str
;
...
...
@@ -180,7 +186,7 @@ export default {
obj
.
startDate
=
birthDate1
[
0
]
-
birth_days
*
24
*
60
*
60
*
1000
;
obj
.
endDate
=
birthDate1
[
1
]
-
birth_days
*
24
*
60
*
60
*
1000
;
}
else
if
(
birth_type
==
2
)
{
obj
.
startDate
=
this
.
currentTime
;
obj
.
startDate
=
new
Date
(
birthDate2
[
0
]).
getMonth
()
+
1
==
new
Date
().
getMonth
()
+
1
?
this
.
currentTime
:
birthDate2
[
0
]
;
obj
.
endDate
=
birthDate2
[
1
];
}
else
{
obj
.
startDate
=
birthDate1
[
0
];
...
...
src/views/ai/task/task.vue
View file @
a0581383
...
...
@@ -265,7 +265,7 @@ export default {
}
],
money
:
0
,
disableCreate
:
1
canCreate
:
0
};
},
mounted
()
{
...
...
@@ -320,7 +320,7 @@ export default {
},
methods
:
{
create
(
scene
,
id
)
{
if
(
this
.
disable
Create
)
{
if
(
!
this
.
can
Create
)
{
this
.
$confirm
(
`当前账户已无可用余额,请充值后再
${
id
?
'复制'
:
'创建'
}
外呼任务`
,
'提示'
,
{
confirmButtonText
:
'去充值'
,
cancelButtonText
:
'取消'
,
...
...
@@ -353,7 +353,7 @@ export default {
async
getAiAccountCheck
()
{
const
{
result
}
=
await
aiAccountCheck
();
console
.
log
(
result
);
this
.
disable
Create
=
result
;
this
.
can
Create
=
result
;
},
async
getTableData
()
{
this
.
loading
=
true
;
...
...
@@ -382,8 +382,8 @@ export default {
obj
[
element
.
activityId
]
=
element
;
});
this
.
tableData
.
forEach
(
item
=>
{
if
(
obj
[
item
.
activity
PlanStatus
])
{
const
{
marketingNumber
,
outboundNumber
,
totalConnectionNumber
,
telephoneConnectionRate
,
connectionIntentionRate
}
=
obj
[
item
.
activity
PlanStatus
];
if
(
obj
[
item
.
activity
Id
])
{
const
{
marketingNumber
,
outboundNumber
,
totalConnectionNumber
,
telephoneConnectionRate
,
connectionIntentionRate
}
=
obj
[
item
.
activity
Id
];
item
.
marketingNumber
=
marketingNumber
;
item
.
outboundNumber
=
outboundNumber
;
item
.
totalConnectionNumber
=
totalConnectionNumber
;
...
...
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