Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
remarketing-yunying
Project
Project
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
yaobeibei
remarketing-yunying
Commits
b9095350
Commit
b9095350
authored
Jun 14, 2018
by
yaobeibei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新加
parent
deabd65c
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1583 additions
and
32 deletions
+1583
-32
api.js
api/api.js
+578
-18
account.vue
src/components/account.vue
+26
-6
checkCall.vue
src/components/checkCall.vue
+8
-2
checkNote.vue
src/components/checkNote.vue
+355
-0
dataList.vue
src/components/dataList.vue
+1
-1
distributor.vue
src/components/distributor.vue
+44
-0
exportPoolTask.vue
src/components/exportPoolTask.vue
+68
-0
home.vue
src/components/home.vue
+24
-1
leadPoolTask.vue
src/components/leadPoolTask.vue
+50
-0
slot.vue
src/components/slot.vue
+73
-2
tableTmp.vue
src/components/tableTmp.vue
+6
-1
userPool.vue
src/components/userPool.vue
+339
-0
index.js
src/router/index.js
+11
-1
No files found.
api/api.js
View file @
b9095350
...
@@ -6,8 +6,14 @@ const moment = require('moment')
...
@@ -6,8 +6,14 @@ const moment = require('moment')
var
db
=
{}
var
db
=
{}
var
reg
=
/@test.com$|@123.com$|@goyoo.com$|@xiaoyun.com$|^@|^test|@dis.com$|time-stone.cn$|^tangyong|^875652541|@1.com$|@xioayun.com$/i
var
reg
=
/@test.com$|@123.com$|@goyoo.com$|@xiaoyun.com$|^@|^test|@dis.com$|time-stone.cn$|^tangyong|^875652541|@1.com$|@xioayun.com$/i
const
dbpath
=
process
.
env
.
MONGO
||
'mongodb://10.11.3.123:1301/remarketing'
var
dbpath
=
null
// const dbpath = 'mongodb://localhost:27017/remarketing'
if
(
process
.
env
.
MONGO
)
{
dbpath
=
process
.
env
.
MONGO
||
'mongodb://10.11.3.123:1301/remarketing'
}
else
{
dbpath
=
'mongodb://localhost:27017/remarketing'
}
mongoClient
.
connect
(
dbpath
,
function
(
err
,
res
)
{
mongoClient
.
connect
(
dbpath
,
function
(
err
,
res
)
{
if
(
err
)
return
console
.
log
(
err
)
if
(
err
)
return
console
.
log
(
err
)
...
@@ -100,14 +106,136 @@ app.post('/dataList', async function (req, res) {
...
@@ -100,14 +106,136 @@ app.post('/dataList', async function (req, res) {
}]).
sort
({
'date'
:
-
1
}).
toArray
()
}]).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(callTask)
// console.log(callTask)
let
companyName
=
await
db
.
collection
(
'account'
).
aggregate
([
let
companyName
=
await
db
.
collection
(
'account'
).
find
({
from
:
{
$exists
:
false
},
$or
:
[{
formID
:
{
$exists
:
false
}},
{
formID
:
{
$exists
:
true
,
$in
:
[
'self'
,
null
]}}]}).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(companyName)
let
auditDate
=
getTimeRange
({
start
:
startTime
,
end
:
endTime
,
key
:
'auditAt'
})
console
.
log
(
auditDate
)
let
getCount
=
await
db
.
collection
(
'recognition'
).
aggregate
([
{
{
$project
:
{
$match
:
auditDate
_id
:
'$_id'
,
},
company
:
'$company'
,
{
email
:
'$email'
$group
:
{
_id
:
'$pubID'
,
getCount
:
{
$sum
:
1
}
}
}]).
sort
({
'date'
:
-
1
}).
toArray
()
let
dataArr
=
[]
let
item
=
{}
companyName
.
forEach
(
x
=>
{
item
.
time
=
startTime
+
' 至 '
+
endTime
item
.
company
=
x
.
company
item
.
email
=
x
.
email
results
.
forEach
(
y
=>
{
if
(
y
.
_id
+
''
===
x
.
_id
+
''
)
{
item
.
pv
=
y
.
pv
item
.
uid
=
y
.
uid
}
})
touchCount
.
forEach
(
z
=>
{
if
(
z
.
_id
+
''
===
x
.
_id
+
''
)
{
item
.
touchCount
=
z
.
touchCount
}
})
getCount
.
forEach
(
m
=>
{
if
(
m
.
_id
+
''
===
x
.
_id
+
''
)
{
item
.
getCount
=
m
.
getCount
}
})
msgTask
.
forEach
(
n
=>
{
if
(
n
.
_id
+
''
===
x
.
_id
+
''
)
{
item
.
msgCount
=
n
.
msgCount
}
})
callTask
.
forEach
(
o
=>
{
if
(
o
.
_id
+
''
===
x
.
_id
+
''
)
{
item
.
callCount
=
o
.
callCount
}
})
// if (item.pv || item.touchCount || item.getCount || item.msgCount || item.callCount) {
// dataArr.push(item)
// }
if
(
!
reg
.
test
(
item
.
email
))
{
dataArr
.
push
(
item
)
}
item
=
{}
})
let
arrTotal
=
dataArr
.
length
// dataArr = dataArr.slice((currentPage - 1) * pageSize, pageSize * currentPage)
// console.log(dataArr)
res
.
send
({
status
:
200
,
total
:
arrTotal
,
data
:
dataArr
})
})
// 获取渠道数据
app
.
post
(
'/distributor'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入了统计'
)
let
body
=
req
.
body
let
{
startTime
,
endTime
,
total
,
pageSize
,
currentPage
}
=
req
.
body
console
.
log
(
body
)
console
.
log
(
startTime
,
endTime
)
let
dateQs
=
getTimeRange
({
start
:
startTime
,
end
:
endTime
,
key
:
'date'
})
// console.log(dateQs)
let
results
=
await
db
.
collection
(
'dailyStats'
).
aggregate
([
{
$match
:
dateQs
},
{
$group
:
{
_id
:
'$pubID'
,
pv
:
{
$sum
:
'$pv'
},
uid
:
{
$sum
:
'$uid'
}
}
}
]).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(results)
let
touchCount
=
await
db
.
collection
(
'recognition'
).
aggregate
([
{
$match
:
dateQs
},
{
$group
:
{
_id
:
'$pubID'
,
touchCount
:
{
$sum
:
1
}
}
}
]).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(touchCount)
let
creatQs
=
getTimeRange
({
start
:
startTime
,
end
:
endTime
,
key
:
'createdAt'
})
console
.
log
(
creatQs
)
let
msgTask
=
await
db
.
collection
(
'task'
).
aggregate
([
{
$match
:
creatQs
},
{
$group
:
{
_id
:
'$accountID'
,
msgCount
:
{
$sum
:
1
}
}
}]).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(msgTask)
let
callTask
=
await
db
.
collection
(
'callTask'
).
aggregate
([
{
$match
:
dateQs
},
{
$group
:
{
_id
:
'$pubID'
,
callCount
:
{
$sum
:
1
}
}
}
}]).
sort
({
'date'
:
-
1
}).
toArray
()
}]).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(callTask)
let
companyName
=
await
db
.
collection
(
'account'
).
find
({
fromID
:
{
$exists
:
true
,
$nin
:
[
'self'
,
null
]
}}).
sort
({
'date'
:
-
1
}).
toArray
()
// console.log(companyName)
// console.log(companyName)
let
auditDate
=
getTimeRange
({
start
:
startTime
,
end
:
endTime
,
key
:
'auditAt'
})
let
auditDate
=
getTimeRange
({
start
:
startTime
,
end
:
endTime
,
key
:
'auditAt'
})
...
@@ -130,6 +258,7 @@ app.post('/dataList', async function (req, res) {
...
@@ -130,6 +258,7 @@ app.post('/dataList', async function (req, res) {
item
.
time
=
startTime
+
' 至 '
+
endTime
item
.
time
=
startTime
+
' 至 '
+
endTime
item
.
company
=
x
.
company
item
.
company
=
x
.
company
item
.
email
=
x
.
email
item
.
email
=
x
.
email
item
.
distributor
=
x
.
from
results
.
forEach
(
y
=>
{
results
.
forEach
(
y
=>
{
if
(
y
.
_id
+
''
===
x
.
_id
+
''
)
{
if
(
y
.
_id
+
''
===
x
.
_id
+
''
)
{
item
.
pv
=
y
.
pv
item
.
pv
=
y
.
pv
...
@@ -409,11 +538,6 @@ app.post('/surplus', async function (req, res) {
...
@@ -409,11 +538,6 @@ app.post('/surplus', async function (req, res) {
// dataArr = dataArr.slice((currentPage - 1) * pageSize, pageSize * currentPage)
// dataArr = dataArr.slice((currentPage - 1) * pageSize, pageSize * currentPage)
res
.
send
({
status
:
200
,
total
:
dataTotal
,
data
:
dataArr
,
surplusTotal
:
surPlusTotal
})
res
.
send
({
status
:
200
,
total
:
dataTotal
,
data
:
dataArr
,
surplusTotal
:
surPlusTotal
})
})
})
_
.
enhance
=
function
(
list
,
source
)
{
return
_
.
map
(
list
,
function
(
element
)
{
return
_
.
extend
({},
element
,
source
)
})
}
function
getTimeRange
({
start
,
end
,
key
})
{
function
getTimeRange
({
start
,
end
,
key
})
{
if
(
key
===
'date'
)
{
if
(
key
===
'date'
)
{
...
@@ -469,7 +593,7 @@ app.post('/getInfo', async function (req, res) {
...
@@ -469,7 +593,7 @@ app.post('/getInfo', async function (req, res) {
res
.
send
({
status
:
200
,
data
:
dataArr
,
dataTotal
:
dataArrTotal
})
res
.
send
({
status
:
200
,
data
:
dataArr
,
dataTotal
:
dataArrTotal
})
})
})
//
运营
审核数据
//
云呼
审核数据
app
.
post
(
'/checkCall'
,
async
function
(
req
,
res
)
{
app
.
post
(
'/checkCall'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入了审核'
)
console
.
log
(
'进入了审核'
)
...
@@ -584,14 +708,19 @@ app.post('/checkCall', async function (req, res) {
...
@@ -584,14 +708,19 @@ app.post('/checkCall', async function (req, res) {
})
})
// 审核接口
//
云呼
审核接口
app
.
post
(
'/send'
,
async
function
(
req
,
res
)
{
app
.
post
(
'/send'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入send'
)
console
.
log
(
'进入send'
)
console
.
log
(
req
.
body
)
console
.
log
(
req
.
body
)
let
{
taskId
,
groupId
,
interestlist
,
hostlist
,
status
}
=
req
.
body
let
{
taskId
,
groupId
,
interestlist
,
hostlist
,
status
}
=
req
.
body
if
(
status
===
8
)
{
await
db
.
collection
(
'bills'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$unset
:
{
'checkStatus'
:
''
}})
res
.
send
({
status
:
200
,
message
:
'状态已重置'
})
}
if
(
status
===
0
)
{
if
(
status
===
0
)
{
await
db
.
collection
(
'bills'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'checkStatus'
:
0
}})
await
db
.
collection
(
'bills'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'checkStatus'
:
0
,
pre
:
false
,
number
:
0
}})
res
.
send
({
status
:
200
,
message
:
'审核未通过'
})
res
.
send
({
status
:
200
,
message
:
'审核未通过'
})
}
}
if
(
status
===
1
)
{
if
(
status
===
1
)
{
...
@@ -601,14 +730,202 @@ app.post('/send', async function (req, res) {
...
@@ -601,14 +730,202 @@ app.post('/send', async function (req, res) {
}
}
})
})
// 短信审核信息
app
.
post
(
'/getCheckNote'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入了getData'
)
let
{
startTime
,
endTime
,
total
,
pageSize
,
currentPage
,
chooseId
,
operatorId
}
=
req
.
body
console
.
log
(
req
.
body
)
console
.
log
(
chooseId
)
startTime
=
moment
(
startTime
).
startOf
(
'day'
).
toDate
()
endTime
=
moment
(
endTime
).
endOf
(
'day'
).
toDate
()
console
.
log
(
startTime
)
console
.
log
(
endTime
)
let
comapnyName
=
await
db
.
collection
(
'account'
).
find
({}).
sort
({
'date'
:
-
1
}).
toArray
()
let
msgTagName
=
await
db
.
collection
(
'msgTemps'
).
find
().
sort
({
'date'
:
-
1
}).
toArray
()
let
dspGroupsName
=
await
db
.
collection
(
'dspGroups'
).
find
().
sort
({
'date'
:
-
1
}).
toArray
()
let
dspTask
=
await
db
.
collection
(
'dspTask'
).
find
({
'createdAt'
:
{
$gte
:
startTime
,
$lte
:
endTime
}}).
sort
({
'date'
:
1
}).
toArray
()
let
dataArr
=
[]
let
item
=
{}
dspTask
.
forEach
(
x
=>
{
item
.
taskID
=
x
.
_id
item
.
taskName
=
x
.
taskName
item
.
accountID
=
x
.
accountID
item
.
sendTime
=
moment
(
x
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
item
.
preSendNum
=
x
.
nums
if
(
x
.
sendNum
===
null
)
{
item
.
sendNum
=
0
}
else
{
item
.
sendNum
=
x
.
sendNum
}
item
.
createdAt
=
moment
(
x
.
createdAt
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
comapnyName
.
forEach
(
y
=>
{
if
(
x
.
accountID
+
''
===
y
.
_id
+
''
)
{
item
.
companyName
=
y
.
company
}
})
msgTagName
.
forEach
(
z
=>
{
if
(
x
.
templateId
+
''
===
z
.
_id
+
''
&&
x
.
accountID
+
''
===
z
.
accountID
+
''
)
{
item
.
msgName
=
z
.
name
item
.
msgContent
=
z
.
content
}
})
dspGroupsName
.
forEach
(
m
=>
{
if
(
x
.
groupID
+
''
===
m
.
_id
+
''
&&
x
.
accountID
===
m
.
accountID
)
{
item
.
popover
=
{
sexlist
:
m
.
sexlist
,
agelist
:
m
.
agelist
,
businesstypelist
:
m
.
businesstypelist
,
phonelist
:
m
.
phonelist
,
opsystemlist
:
m
.
opsystemlist
,
consumelist
:
m
.
consumelist
,
flowlist
:
m
.
flowlist
,
citylist
:
m
.
citylist
,
hobbylist
:
m
.
hobbylist
}
if
(
m
.
operator
)
{
item
.
popover
.
operator
=
m
.
operator
}
}
})
if
(
operatorId
+
''
===
'联通'
+
''
&&
(
item
.
popover
.
operator
===
undefined
||
item
.
popover
.
operator
===
'联通'
+
''
))
{
if
(
x
.
checkStatus
===
0
)
{
item
.
status
=
'审核未通过'
item
.
disable
=
true
}
else
if
(
x
.
checkStatus
===
1
)
{
item
.
status
=
'审核通过'
item
.
disable
=
true
}
else
{
item
.
status
=
'未审核'
item
.
disable
=
false
}
dataArr
.
push
(
item
)
}
else
{
if
(
item
.
popover
.
operator
+
''
===
operatorId
+
''
)
{
if
(
x
.
status
===
0
||
x
.
status
===
undefined
)
{
item
.
status
=
'未审核'
item
.
disable
=
false
}
if
(
x
.
status
===
1
)
{
item
.
status
=
'审核未通过'
item
.
disable
=
true
}
if
(
x
.
status
===
2
)
{
item
.
status
=
'审核通过'
item
.
disable
=
true
}
dataArr
.
push
(
item
)
}
}
item
=
{}
})
dataArr
=
dataArr
.
reverse
()
let
dataStatus
=
[]
let
dataTotal
=
dataArr
.
length
if
(
chooseId
===
'zero'
)
{
console
.
log
(
'进入zero'
)
dataArr
.
forEach
(
x
=>
{
if
(
x
.
status
===
'未审核'
)
{
console
.
log
(
'zero'
)
dataStatus
.
push
(
x
)
dataStatus
=
dataStatus
.
slice
((
currentPage
-
1
)
*
pageSize
,
currentPage
*
pageSize
)
}
})
res
.
send
({
status
:
200
,
data
:
dataStatus
,
total
:
dataTotal
})
}
if
(
chooseId
===
'one'
)
{
dataArr
.
forEach
(
x
=>
{
if
(
x
.
status
===
'审核未通过'
)
{
console
.
log
(
'one'
)
dataStatus
.
push
(
x
)
dataStatus
=
dataStatus
.
slice
((
currentPage
-
1
)
*
pageSize
,
currentPage
*
pageSize
)
}
})
console
.
log
(
dataStatus
)
res
.
send
({
status
:
200
,
data
:
dataStatus
,
total
:
dataTotal
})
}
if
(
chooseId
===
'two'
)
{
dataArr
.
forEach
(
x
=>
{
if
(
x
.
status
===
'审核通过'
)
{
console
.
log
(
'two'
)
dataStatus
.
push
(
x
)
dataStatus
=
dataStatus
.
slice
((
currentPage
-
1
)
*
pageSize
,
currentPage
*
pageSize
)
}
})
res
.
send
({
status
:
200
,
data
:
dataStatus
,
total
:
dataTotal
})
}
if
(
chooseId
===
'all'
)
{
dataArr
=
dataArr
.
slice
((
currentPage
-
1
)
*
pageSize
,
currentPage
*
pageSize
)
res
.
send
({
status
:
200
,
data
:
dataArr
,
total
:
dataTotal
})
}
})
// 短信审核
app
.
post
(
'/sendCheckNote'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入send'
)
console
.
log
(
req
.
body
)
let
{
taskId
,
status
,
sendNum
,
operatorId
}
=
req
.
body
if
(
status
===
8
)
{
db
.
collection
(
'dspTask'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'status'
:
0
}})
res
.
send
({
status
:
200
,
message
:
'状态已重置'
})
}
if
(
operatorId
===
'联通'
)
{
await
db
.
collection
(
'dspTask'
).
find
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)}).
toArray
(
async
(
err
,
rep
)
=>
{
if
(
status
===
1
)
{
await
db
.
collection
(
'dspTask'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'checkStatus'
:
0
}})
await
db
.
collection
(
'dspTask'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'status'
:
1
}})
await
db
.
collection
(
'bills'
).
update
({
taskID
:
mongodb
.
ObjectId
(
taskId
),
pre
:
true
},
{
$set
:
{
pre
:
false
,
number
:
0
}
})
res
.
send
({
status
:
200
,
message
:
'审核未通过'
})
}
if
(
status
===
2
)
{
await
db
.
collection
(
'dspTask'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'checkStatus'
:
1
}})
res
.
send
({
status
:
200
,
message
:
'审核通过'
})
}
})
}
else
{
let
sureStatus
=
db
.
collection
(
'dspTask'
).
find
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)}).
toArray
(
async
(
err
,
rep
)
=>
{
console
.
log
(
rep
)
if
(
!
rep
[
0
].
status
)
{
if
(
status
===
2
)
{
let
setdata
=
await
db
.
collection
(
'dspTask'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'status'
:
2
,
'sendNum'
:
sendNum
}})
await
db
.
collection
(
'bills'
).
update
({
taskID
:
mongodb
.
ObjectId
(
taskId
),
pre
:
true
},
{
$set
:
{
pre
:
false
,
number
:
sendNum
*
0.5
}
});
res
.
send
({
status
:
200
,
message
:
'审核通过,短信发送中'
})
}
if
(
status
===
1
)
{
let
setdata
=
await
db
.
collection
(
'dspTask'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)},
{
$set
:
{
'status'
:
1
}})
await
db
.
collection
(
'bills'
).
update
({
taskID
:
mongodb
.
ObjectId
(
taskId
),
pre
:
true
},
{
$set
:
{
pre
:
false
,
number
:
0
}
});
res
.
send
({
status
:
200
,
message
:
'审核未通过,任务驳回'
})
}
}
else
{
res
.
send
({
status
:
200
,
message
:
'状态无法更改'
})
}
})
}
let
makeSure
=
db
.
collection
(
'dspTask'
).
find
({
'_id'
:
mongodb
.
ObjectId
(
taskId
)}).
toArray
((
err
,
res
)
=>
{
console
.
log
(
res
)
if
(
err
)
{
console
.
log
(
'错了'
)
}
})
})
// 账户数据
// 账户数据
app
.
post
(
'/getAccount'
,
async
function
(
req
,
res
)
{
app
.
post
(
'/getAccount'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入用户控制'
)
console
.
log
(
'进入用户控制'
)
console
.
log
(
req
.
body
)
console
.
log
(
req
.
body
)
let
{
currentPage
,
pageSize
}
=
req
.
body
let
{
currentPage
,
pageSize
,
choose
}
=
req
.
body
let
accounts
=
await
db
.
collection
(
'account'
).
find
().
toArray
()
let
accounts
=
await
db
.
collection
(
'account'
).
find
().
toArray
()
let
dataArr
=
[]
let
dataArr
=
[]
let
emailArr
=
[]
accounts
.
forEach
(
x
=>
{
accounts
.
forEach
(
x
=>
{
let
item
=
{}
let
item
=
{}
if
(
x
.
isDelete
)
{
if
(
x
.
isDelete
)
{
...
@@ -625,13 +942,19 @@ app.post('/getAccount', async function (req, res) {
...
@@ -625,13 +942,19 @@ app.post('/getAccount', async function (req, res) {
item
.
company
=
x
.
company
item
.
company
=
x
.
company
item
.
phone
=
x
.
phone
item
.
phone
=
x
.
phone
item
.
email
=
x
.
email
item
.
email
=
x
.
email
emailArr
.
push
(
x
.
email
)
if
(
choose
)
{
if
(
item
.
email
===
choose
||
item
.
email
+
''
===
choose
+
''
)
{
dataArr
.
push
(
item
)
}
}
else
{
dataArr
.
push
(
item
)
dataArr
.
push
(
item
)
}
})
})
let
dataArrTotal
=
dataArr
.
length
let
dataArrTotal
=
dataArr
.
length
dataArr
=
dataArr
.
slice
((
currentPage
-
1
)
*
pageSize
,
pageSize
*
currentPage
)
dataArr
=
dataArr
.
slice
((
currentPage
-
1
)
*
pageSize
,
pageSize
*
currentPage
)
res
.
send
({
status
:
200
,
data
:
dataArr
,
dataTotal
:
dataArrTotal
})
res
.
send
({
status
:
200
,
data
:
dataArr
,
dataTotal
:
dataArrTotal
,
emailArr
:
emailArr
})
})
})
...
@@ -665,6 +988,7 @@ app.post('/closeBtn', async function (req, res) {
...
@@ -665,6 +988,7 @@ app.post('/closeBtn', async function (req, res) {
}
}
})
})
// 代码位数据
app
.
post
(
'/getSlot'
,
async
function
(
req
,
res
)
{
app
.
post
(
'/getSlot'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入获取代码位'
)
console
.
log
(
'进入获取代码位'
)
console
.
log
(
req
.
body
)
console
.
log
(
req
.
body
)
...
@@ -686,6 +1010,12 @@ app.post('/getSlot', async function (req, res) {
...
@@ -686,6 +1010,12 @@ app.post('/getSlot', async function (req, res) {
item
.
slotId
=
x
.
_id
item
.
slotId
=
x
.
_id
item
.
slot
=
x
.
durl
item
.
slot
=
x
.
durl
item
.
slotName
=
x
.
slotName
item
.
slotName
=
x
.
slotName
item
.
autoRule
=
x
.
autoRule
if
(
x
.
relateSlot
)
{
item
.
disable
=
false
}
else
{
item
.
disable
=
true
}
item
.
time
=
moment
(
x
.
createdAt
).
format
(
'YYYY-MM-DD'
)
item
.
time
=
moment
(
x
.
createdAt
).
format
(
'YYYY-MM-DD'
)
if
(
x
.
isSlotDelete
)
{
if
(
x
.
isSlotDelete
)
{
item
.
isDelete
=
true
item
.
isDelete
=
true
...
@@ -714,6 +1044,15 @@ app.post('/getSlot', async function (req, res) {
...
@@ -714,6 +1044,15 @@ app.post('/getSlot', async function (req, res) {
res
.
send
({
status
:
200
,
data
:
dataArr
,
dataTotal
:
dataTotal
,
emailArr
:
emailArr
})
res
.
send
({
status
:
200
,
data
:
dataArr
,
dataTotal
:
dataTotal
,
emailArr
:
emailArr
})
})
})
// 代码位备案策略
app
.
post
(
'/slotAutoRule'
,
async
function
(
req
,
res
)
{
console
.
log
(
req
.
body
)
let
{
slotId
,
autoRule
}
=
req
.
body
await
db
.
collection
(
'slotTemps'
).
update
({
'_id'
:
mongodb
.
ObjectId
(
slotId
)},
{
$set
:
{
'autoRule'
:
autoRule
}})
res
.
send
({
status
:
200
,
message
:
'备案策略更改成功'
})
})
// 代码位开关
app
.
post
(
'/deleteSlot'
,
async
function
(
req
,
res
)
{
app
.
post
(
'/deleteSlot'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入代码位控制'
)
console
.
log
(
'进入代码位控制'
)
console
.
log
(
req
.
body
)
console
.
log
(
req
.
body
)
...
@@ -728,6 +1067,227 @@ app.post('/deleteSlot', async function (req, res) {
...
@@ -728,6 +1067,227 @@ app.post('/deleteSlot', async function (req, res) {
}
}
})
})
// 营销池数据
app
.
post
(
'/poolData'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入营销池数据'
)
console
.
log
(
req
.
body
)
let
recognition
=
await
db
.
collection
(
'marketingPool'
).
find
().
toArray
()
let
dataArr
=
[]
recognition
.
forEach
(
x
=>
{
let
item
=
{}
item
.
unikey
=
x
.
unikey
item
.
fromEmail
=
x
.
fromEmail
item
.
fromCompany
=
x
.
fromCompany
item
.
leadTime
=
moment
(
x
.
leadTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
item
.
tags
=
x
.
tags
item
.
exportNum
=
x
.
exportNum
item
.
exportDataArr
=
x
.
exportDataArr
dataArr
.
push
(
item
)
})
res
.
send
({
status
:
200
,
datas
:
dataArr
})
})
// 导入
app
.
post
(
'/leadPool'
,
async
function
(
req
,
res
)
{
console
.
log
(
'进入营销池导入'
)
console
.
log
(
req
.
body
)
let
{
pattern
,
startTime
,
endTime
,
accountID
}
=
req
.
body
startTime
=
moment
(
startTime
).
startOf
(
'day'
).
valueOf
()
endTime
=
moment
(
endTime
).
endOf
(
'day'
).
valueOf
()
console
.
log
(
startTime
)
console
.
log
(
endTime
)
let
user
=
await
db
.
collection
(
'recognition'
).
find
({
'updateTimestamp'
:
{
$gt
:
startTime
,
$lte
:
endTime
},
pubID
:
accountID
}).
toArray
()
console
.
log
(
user
.
length
)
let
company
=
await
db
.
collection
(
'account'
).
find
({
'_id'
:
mongodb
.
ObjectId
(
accountID
)}).
toArray
()
let
poolUser
=
await
db
.
collection
(
'marketingPool'
).
find
().
toArray
()
console
.
log
(
poolUser
.
length
)
let
leadTime
=
moment
().
toDate
()
let
leadFromName
=
null
let
leadFromEmail
=
null
let
dataArr
=
[]
user
=
_
.
uniqBy
(
user
,
'unikey'
)
user
.
forEach
(
x
=>
{
let
item
=
{}
item
.
unikey
=
x
.
unikey
company
.
forEach
(
y
=>
{
item
.
tags
=
y
.
tags
||
[
1
,
2
,
3
,
4
]
if
(
accountID
===
y
.
_id
+
''
)
{
leadFromEmail
=
y
.
email
leadFromName
=
y
.
company
}
})
dataArr
.
push
(
item
)
})
console
.
log
(
dataArr
.
length
)
let
leadArr
=
[]
let
filterArr
=
[]
if
(
poolUser
.
length
===
0
)
{
leadArr
=
dataArr
}
else
{
dataArr
.
forEach
(
x
=>
{
poolUser
.
forEach
(
y
=>
{
if
(
x
.
unikey
===
y
.
unikey
)
{
filterArr
.
push
(
x
)
}
})
})
leadArr
=
_
.
difference
(
dataArr
,
filterArr
)
}
leadArr
.
forEach
(
x
=>
{
db
.
collection
(
'marketingPool'
).
insert
({
unikey
:
x
.
unikey
,
tags
:
x
.
tags
,
fromEmail
:
leadFromEmail
,
fromCompany
:
leadFromName
,
leadTime
:
leadTime
})
})
let
leadNumber
=
leadArr
.
length
let
filterNumber
=
filterArr
.
length
await
db
.
collection
(
'leadTask'
).
insert
({
leadNumber
:
leadNumber
,
filterNumber
:
filterNumber
,
leadTime
:
leadTime
,
fromEmail
:
leadFromEmail
,
fromCompany
:
leadFromName
})
res
.
send
({
status
:
200
,
message
:
'进去了'
})
})
// 营销池导入任务
app
.
post
(
'/getLeadTask'
,
async
function
(
req
,
res
)
{
let
leadTask
=
await
db
.
collection
(
'leadTask'
).
find
().
toArray
()
let
dataArr
=
[]
leadTask
.
forEach
(
x
=>
{
let
item
=
{}
item
.
taskID
=
x
.
_id
item
.
leadNumber
=
x
.
leadNumber
item
.
filterNumber
=
x
.
filterNumber
item
.
fromEmail
=
x
.
fromEmail
item
.
fromCompany
=
x
.
fromCompany
item
.
leadTime
=
moment
(
x
.
leadTime
).
format
(
'YYYY-MM-DD HH:mm:SS'
)
dataArr
.
push
(
item
)
})
res
.
send
({
status
:
200
,
datas
:
dataArr
})
})
// 获取筛选
app
.
post
(
'/getEmail'
,
async
function
(
req
,
res
)
{
console
.
log
(
req
.
body
)
let
{
accountID
}
=
req
.
body
let
company
=
await
db
.
collection
(
'account'
).
find
().
toArray
()
let
slot
=
[]
if
(
accountID
)
{
slot
=
await
db
.
collection
(
'slotTemps'
).
find
({
accountID
:
mongodb
.
ObjectId
(
accountID
)}).
toArray
()
}
else
{
slot
=
await
db
.
collection
(
'slotTemps'
).
find
().
toArray
()
}
let
emailArr
=
[]
let
slotArr
=
[]
company
.
forEach
(
x
=>
{
let
item
=
{}
item
.
email
=
x
.
email
item
.
accountID
=
x
.
_id
emailArr
.
push
(
item
)
})
slot
.
forEach
(
x
=>
{
let
item
=
{}
item
.
slotName
=
x
.
slotName
item
.
slotID
=
x
.
_id
slotArr
.
push
(
item
)
})
res
.
send
({
status
:
200
,
emailArr
:
emailArr
,
slotArr
:
slotArr
})
})
// 导出
app
.
post
(
'/exprot'
,
async
function
(
req
,
res
)
{
console
.
log
(
req
.
body
)
let
{
selectUnikeyArr
,
exportDataArr
,
selectUnikeyNumber
}
=
req
.
body
let
exportTime
=
moment
().
valueOf
()
let
createRecogNum
=
0
let
allCount
=
0
let
errCount
=
0
selectUnikeyArr
.
forEach
(
async
x
=>
{
await
db
.
collection
(
'marketingPool'
).
update
({
unikey
:
x
},
{
$addToSet
:
{
exportDataArr
:
{
$each
:
exportDataArr
}},
$inc
:
{
exportNum
:
1
}})
// exportDataArr.forEach(async y => {
// await db.collection('recognition').find({unikey: x, pubID: y.accountID, slotID: y.slotID}).toArray(async (err, response) => {
// if (err) { count(err) }
// if (response === [] || response.length === 0) {
// await db.collection('recognition').insert({unikey: x, pubID: y.accountID, slotID: y.slotID, updateTimestamp: exportTime, auditStatus: 0, score: 3, scoreTimestamp: exportTime, fromPool: true})
// count()
// } else {
// count(true)
// }
// })
// }
function
count
(
err
)
{
allCount
++
if
(
err
)
{
errCount
++
}
else
{
createRecogNum
++
}
if
(
allCount
===
selectUnikeyArr
.
length
*
exportDataArr
.
length
)
{
console
.
log
(
'存入任务表中'
)
console
.
log
(
errCount
,
createRecogNum
)
db
.
collection
(
'exportTask'
).
insert
({
'exportUnikeyNumber'
:
selectUnikeyNumber
,
createRecogNum
:
createRecogNum
,
exportTime
:
exportTime
,
exportDataArr
:
exportDataArr
})
res
.
send
({
status
:
200
,
message
:
'导出了'
})
}
}
})
})
// 导出任务列表
app
.
post
(
'/getExportTask'
,
async
function
(
req
,
res
)
{
console
.
log
(
'导出任务列表'
)
console
.
log
(
req
.
body
)
let
exportTask
=
await
db
.
collection
(
'exportTask'
).
find
().
toArray
()
let
dataArr
=
[]
exportTask
.
forEach
(
x
=>
{
let
item
=
{}
item
.
taskID
=
x
.
_id
item
.
exportUnikeyNumber
=
x
.
exportUnikeyNumber
item
.
createRecogNum
=
x
.
createRecogNum
item
.
exportTime
=
x
.
exportTime
item
.
exportDataArr
=
x
.
exportDataArr
dataArr
.
push
(
item
)
})
res
.
send
({
status
:
200
,
datas
:
dataArr
})
})
module
.
exports
=
app
module
.
exports
=
app
src/components/account.vue
View file @
b9095350
...
@@ -4,6 +4,16 @@
...
@@ -4,6 +4,16 @@
<h4>
账户权限控制
</h4>
<h4>
账户权限控制
</h4>
</el-header>
</el-header>
<el-main>
<el-main>
<el-row>
<el-select
v-model=
"inputValue"
filterable
placeholder=
"请选择账户名称"
@
change=
'change'
clearable
@
clear=
'clear'
style=
'width: 300px;margin-bottom: 10px'
>
<el-option
v-for=
"item in emailOptions"
:key=
"item"
:label=
"item"
:value=
"item"
>
</el-option>
</el-select>
</el-row>
<el-table
:data=
'datas'
border
width=
100%
>
<el-table
:data=
'datas'
border
width=
100%
>
<el-table-column
label=
'序号'
width=
50
>
<el-table-column
label=
'序号'
width=
50
>
<template
slot-scope=
'scope'
>
<template
slot-scope=
'scope'
>
...
@@ -65,11 +75,12 @@
...
@@ -65,11 +75,12 @@
isAccountDelete
:
false
,
isAccountDelete
:
false
,
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
100
total
:
100
,
emailOptions
:
null
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
)
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
this
.
inputValue
)
},
},
methods
:
{
methods
:
{
AutoChange
(
row
)
{
AutoChange
(
row
)
{
...
@@ -90,25 +101,34 @@
...
@@ -90,25 +101,34 @@
this
.
deleteAccount
(
row
,
1
)
this
.
deleteAccount
(
row
,
1
)
}
}
},
},
getData
(
currentPage
,
pageSize
)
{
change
()
{
console
.
log
(
'进入筛选'
)
console
.
log
(
this
.
inputValue
)
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
this
.
inputValue
)
},
clear
()
{
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
null
)
},
getData
(
currentPage
,
pageSize
,
choose
)
{
let
self
=
this
let
self
=
this
fetch
(
'/api/getAccount'
,
{
fetch
(
'/api/getAccount'
,
{
method
:
'POST'
,
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
currentPage
:
currentPage
,
pageSize
:
pageSize
})
body
:
JSON
.
stringify
({
currentPage
:
currentPage
,
pageSize
:
pageSize
,
choose
:
choose
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
console
.
log
(
data
)
self
.
datas
=
data
.
data
self
.
datas
=
data
.
data
self
.
total
=
data
.
dataTotal
self
.
total
=
data
.
dataTotal
self
.
emailOptions
=
data
.
emailArr
})
})
},
},
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
this
.
pageSize
=
val
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
)
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
this
.
inputValue
)
},
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
this
.
currentPage
=
val
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
)
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
this
.
inputValue
)
},
},
deleteAccount
(
row
,
status
)
{
deleteAccount
(
row
,
status
)
{
let
accountId
=
row
.
_id
let
accountId
=
row
.
_id
...
...
src/components/checkCall.vue
View file @
b9095350
...
@@ -82,6 +82,7 @@
...
@@ -82,6 +82,7 @@
<el-button
slot=
"reference"
type=
'text'
size=
'mini'
:disabled=
'scope.row.disable'
>
拒绝
</el-button>
<el-button
slot=
"reference"
type=
'text'
size=
'mini'
:disabled=
'scope.row.disable'
>
拒绝
</el-button>
</el-popover>
</el-popover>
<el-button
type=
'text'
size=
'small'
@
click=
"openForm(scope.row, scope.$index)"
:disabled=
'scope.row.disable'
>
筛选后通过
</el-button>
<el-button
type=
'text'
size=
'small'
@
click=
"openForm(scope.row, scope.$index)"
:disabled=
'scope.row.disable'
>
筛选后通过
</el-button>
<el-button
type=
'text'
@
click=
'reset(scope.row)'
icon=
'el-icon-refresh'
></el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -174,8 +175,8 @@
...
@@ -174,8 +175,8 @@
valueRange
:
[],
valueRange
:
[],
startTime
:
''
,
startTime
:
''
,
endTime
:
''
,
endTime
:
''
,
currentdata
:
null
,
currentdata
:
null
,
currentIndex
:
null
,
currentIndex
:
null
,
pickerOptions
:
{
pickerOptions
:
{
shortcuts
:
[{
shortcuts
:
[{
text
:
'昨天'
,
text
:
'昨天'
,
...
@@ -371,6 +372,11 @@
...
@@ -371,6 +372,11 @@
console
.
log
(
err
)
console
.
log
(
err
)
})
})
},
},
reset
(
row
)
{
this
.
suerSend
(
8
,
row
)
row
.
disable
=
false
row
.
status
=
'未审核'
},
change
(
type
=
'POST'
,
startTime
,
endTime
,
total
=
total
,
pageSize
=
this
.
pageSize
,
currentPage
=
this
.
currentPage
,
choose
)
{
change
(
type
=
'POST'
,
startTime
,
endTime
,
total
=
total
,
pageSize
=
this
.
pageSize
,
currentPage
=
this
.
currentPage
,
choose
)
{
let
self
=
this
let
self
=
this
console
.
log
(
self
.
url
,
type
,
startTime
,
endTime
,
total
,
pageSize
,
currentPage
,
choose
)
console
.
log
(
self
.
url
,
type
,
startTime
,
endTime
,
total
,
pageSize
,
currentPage
,
choose
)
...
...
src/components/checkNote.vue
0 → 100644
View file @
b9095350
<
template
>
<el-container>
<el-header>
<h4>
短信审核
</h4>
</el-header>
<el-main>
<el-row>
<el-date-picker
v-model=
"valueRange"
type=
"daterange"
unlink-panelss
@
change=
"timeChange"
range-separator=
"至"
:start-placeholder=
"startTime"
:end-placeholder=
"endTime"
value-format=
'yyyy-MM-dd'
format=
'yyyy-MM-dd'
:picker-options=
"pickerOptions"
style=
'margin-bottom: 10px'
>
</el-date-picker>
<el-dropdown
style=
'float: right'
@
command=
'chooseStatus'
>
<el-button
class=
"el-dropdown-link"
style=
'width: 180px'
>
{{
choose
}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
'all'
>
全部状态
</el-dropdown-item>
<el-dropdown-item
command=
'zero'
>
未审核
</el-dropdown-item>
<el-dropdown-item
command=
'one'
>
审核未通过
</el-dropdown-item>
<el-dropdown-item
command=
'two'
>
审核通过
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown
style=
'float: right; margin-right: 40px'
@
command=
'chooseOperator'
>
<el-button
class=
"el-dropdown-link"
style=
'width: 120px'
>
{{
operatorId
}}
业务
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
'联通'
>
联通业务
</el-dropdown-item>
<el-dropdown-item
command=
'移动'
>
移动业务
</el-dropdown-item>
<el-dropdown-item
command=
'电信'
>
电信业务
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-row>
<el-table
:data=
"datas"
border
style=
"width: 100%"
>
<el-table-column
label=
'序号'
type=
'index'
width=
50
></el-table-column>
<el-table-column
label=
'任务名称'
prop=
'taskName'
></el-table-column>
<el-table-column
label=
'公司名称'
prop=
'companyName'
></el-table-column>
<el-table-column
label=
'提交时间'
prop=
'createdAt'
></el-table-column>
<el-table-column
label=
'筛选标签'
>
<template
slot-scope=
"scope"
>
<el-popover
trigger=
"hover"
placement=
"top"
>
<h4>
详情界面
</h4>
<p>
性别:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.sexlist'
>
{{
item
}}
</span></p>
<p>
年龄:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.agelist'
>
{{
item
}}
</span></p>
<p>
业务类型:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.businesstypelist'
>
{{
item
}}
</span></p>
<p>
终端品牌:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.phonelist'
>
{{
item
}}
</span></p>
<p>
操作系统:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.opsystemlist'
>
{{
item
}}
</span></p>
<p>
平均消费:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.consumelist'
>
{{
item
}}
</span></p>
<p>
平均流量:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.flowlist'
>
{{
item
}}
</span></p>
<p>
所在城市:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.citylist'
>
{{
item
}}
</span></p>
<p>
兴趣爱好:
<span
style=
'padding: 4px'
v-for=
'item in scope.row.popover.hobbylist'
>
{{
mapHobby
[
item
]
}}
(
{{
item
}}
)
</span></p>
<p>
标签持续时间:
<span
style=
'padding: 4px'
>
30天
</span></p>
<span
slot=
"reference"
>
查看详情
</span>
</el-popover>
</
template
>
</el-table-column>
<el-table-column
label=
'预计发送数量'
prop=
'preSendNum'
></el-table-column>
<el-table-column
label=
'短信内容'
prop=
'msgContent'
></el-table-column>
<el-table-column
label=
'预计发送时间'
prop=
'sendTime'
></el-table-column>
<el-table-column
label=
'实际发送数量'
prop=
'sendNum'
v-if=
"operatorId !== '联通'"
></el-table-column>
<el-table-column
label=
'审核状态'
prop=
'status'
:filters=
"[{ text: '未审核', value: '未审核' }, { text: '审核通过', value: '审核通过' }, { text: '审核不通过', value: '审核未通过'}]"
:filter-method=
'filterTag'
filter-placement=
"bottom-end"
></el-table-column>
<el-table-column
label=
'操作'
width=
150
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
'200'
v-model=
'scope.row.visible1'
>
<p>
您确定要不通过吗?
</p>
<div
style=
"text-align: right; margin: 2px"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible1 = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"suerSend(scope.row, scope.row.taskID, 1, 0)"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
type=
'text'
size=
'small'
:disabled=
'scope.row.disable'
>
不通过
</el-button>
</el-popover>
<el-popover
placement=
"top"
width=
'200'
v-model=
'scope.row.visible2'
v-if=
'operatorId !== "联通"'
>
<p>
请输入发送数量
</p>
<input
type=
"text"
v-model=
'scope.row.sendNum'
style=
'padding: 2px'
:placeholder=
'scope.row.preSendNum'
>
<div
style=
"text-align: right; margin: 2px"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible2 = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"suerSend(scope.row, scope.row.taskID, 2, scope.row.sendNum)"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
type=
'text'
size=
'small'
:disabled=
'scope.row.disable'
>
确认发送
</el-button>
</el-popover>
<el-popover
placement=
"top"
width=
'200'
v-model=
'scope.row.visible2'
v-else
>
<p>
您确定要通过吗
</p>
<div
style=
"text-align: right; margin: 2px"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible2 = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"suerSend(scope.row, scope.row.taskID, 2, scope.row.sendNum)"
>
确定
</el-button>
</div>
<el-button
slot=
"reference"
type=
'text'
size=
'small'
:disabled=
'scope.row.disable'
>
确认发送
</el-button>
</el-popover>
<el-button
type=
'text'
icon=
'el-icon-refresh'
style=
'color: #3a8ee6;margin-left: 4px'
@
click=
reset(scope.row)
></el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10, 20, 50, 100, 1000]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
style=
"float: right;margin-top: 15px"
>
</el-pagination>
</el-main>
</el-container>
</template>
<
script
>
import
moment
from
'moment'
export
default
{
name
:
'checkNote'
,
data
()
{
return
{
datas
:
[],
url
:
'/api/getCheckNote'
,
statue
:
'未审核'
,
choose
:
'任务审核状态'
,
chooseId
:
'all'
,
operatorId
:
'联通'
,
total
:
0
,
pageSize
:
100
,
currentPage
:
1
,
visible1
:
false
,
visible2
:
false
,
valueRange
:
[],
startTime
:
''
,
endTime
:
''
,
pickerOptions
:
{
shortcuts
:
[{
text
:
'昨天'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近一周'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近一个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近三个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
}]
},
mapHobby
:
{
"H001002"
:
"时政要闻"
,
"H001006"
:
"科技资讯"
,
"H001011"
:
"社会资源"
,
"H004011"
:
"旅游出行"
,
"H001008"
:
"财经资讯"
,
"H001005"
:
"军事资讯"
,
"H007012"
:
"电子邮件"
,
"H002008"
:
"专业协会"
,
"H002009"
:
"社交网络"
,
"H004020"
:
"团购打折"
,
"H001012"
:
"综合资讯"
,
"H002999"
:
"通信交流"
,
"H003006"
:
"娱乐搞笑"
,
"H001003"
:
"女性时尚"
,
"H007009"
:
"网络存储"
,
"H004015"
:
"非法网站"
,
"H007004"
:
"系统工具"
,
"H003005"
:
"手机动漫"
,
"H004018"
:
"打车软件"
,
"H004019"
:
"查询服务"
,
"H005010"
:
"营销平台"
,
"H001999"
:
"新闻资讯"
,
"H004009"
:
"医疗健康"
,
"H004003"
:
"搜索引擎"
,
"H004005"
:
"生活综合"
,
"H003008"
:
"网络电台"
,
"H004023"
:
"时尚美妆"
,
"H002001"
:
"即时通信"
,
"H004999"
:
"生活服务"
,
"H004021"
:
"福利彩票"
,
"H007008"
:
"应用商店"
,
"H005002"
:
"电子支付"
,
"H004004"
:
"导航网站"
,
"H004012"
:
"物流快递"
,
"H004006"
:
"家居服务"
,
"H007999"
:
"工具软件"
,
"H001010"
:
"企业门户"
,
"H007002"
:
"下载工具"
,
"H007006"
:
"词典翻译"
,
"H007007"
:
"主题桌面"
,
"H005009"
:
"求职招聘"
,
"H002002"
:
"婚恋交友"
,
"H004008"
:
"母婴资讯"
,
"H004022"
:
"教育学习"
,
"H003009"
:
"影院票务"
,
"H004007"
:
"汽车信息"
,
"H001004"
:
"体育资讯"
,
"H003002"
:
"手机阅读"
,
"H003003"
:
"手机音频"
,
"H004014"
:
"宠物资讯"
,
"H001009"
:
"文化教育"
,
"H004013"
:
"餐饮美食"
,
"H005013"
:
"金融理财"
,
"H004002"
:
"时间天气"
,
"H005008"
:
"商务办公"
,
"H003004"
:
"手机游戏"
,
"H001007"
:
"娱乐资讯"
,
"H004016"
:
"外卖送餐"
,
"H002006"
:
"博客空间"
,
"H003001"
:
"手机视频"
,
"H003007"
:
"摄影图片"
,
"H005001"
:
"网上购物"
,
"H002005"
:
"社区论坛"
,
"H007001"
:
"安全杀毒"
,
"H005012"
:
"手机银行"
,
"H003999"
:
"娱乐休闲"
,
"H004017"
:
"地图导航"
,
"H007011"
:
"无线管理"
,
"H007005"
:
"输入法 "
,
"H007003"
:
"浏览器 "
,
"H005011"
:
"云服务 "
}
}
},
mounted
()
{
this
.
getTime
()
this
.
change
(
'POST'
,
this
.
startTime
,
this
.
endTime
,
this
.
total
,
this
.
pageSize
,
this
.
currentPage
,
this
.
chooseId
,
this
.
operatorId
)
this
.
valueRange
[
0
]
=
this
.
startTime
this
.
valueRange
[
1
]
=
this
.
endTime
},
methods
:
{
chooseOperator
(
command
)
{
let
self
=
this
console
.
log
(
command
)
self
.
operatorId
=
command
this
.
change
(
'POST'
,
this
.
valueRange
[
0
],
this
.
valueRange
[
1
],
this
.
total
,
this
.
pageSize
,
this
.
currentPage
,
self
.
chooseId
,
self
.
operatorId
)
},
chooseStatus
(
command
)
{
console
.
log
(
command
)
let
self
=
this
if
(
command
===
'zero'
)
{
this
.
choose
=
'未审核'
self
.
chooseId
=
'zero'
self
.
datas
=
[]
}
if
(
command
===
'one'
)
{
this
.
choose
=
'审核未通过'
self
.
chooseId
=
'one'
self
.
datas
=
[]
}
if
(
command
===
'two'
)
{
this
.
choose
=
'审核已通过'
self
.
chooseId
=
'two'
self
.
datas
=
[]
}
if
(
command
===
'all'
)
{
this
.
choose
=
'全部状态'
self
.
chooseId
=
'all'
self
.
datas
=
[]
}
this
.
change
(
'POST'
,
this
.
valueRange
[
0
],
this
.
valueRange
[
1
],
this
.
total
,
this
.
pageSize
,
this
.
currentPage
,
self
.
chooseId
,
self
.
operatorId
)
},
getTime
()
{
this
.
endTime
=
moment
().
format
(
'YYYY-MM-DD'
)
this
.
startTime
=
moment
().
subtract
(
7
,
'days'
).
format
(
'YYYY-MM-DD'
)
},
filterTag
(
value
,
row
)
{
console
.
log
(
row
.
status
)
console
.
log
(
value
)
return
row
.
status
===
value
},
timeChange
()
{
console
.
log
(
'时间改变'
)
console
.
log
(
this
.
valueRange
)
this
.
change
(
'POST'
,
this
.
valueRange
[
0
],
this
.
valueRange
[
1
],
this
.
total
,
this
.
pageSize
,
this
.
currentPage
,
this
.
chooseId
,
this
.
operatorId
)
},
handleSizeChange
(
val
)
{
console
.
log
(
'页容量改变'
)
console
.
log
(
val
)
this
.
pageSize
=
val
this
.
change
(
'POST'
,
this
.
valueRange
[
0
],
this
.
valueRange
[
1
],
this
.
total
,
this
.
pageSize
,
this
.
currentPage
,
this
.
chooseId
,
this
.
operatorId
)
},
handleCurrentChange
(
val
)
{
console
.
log
(
'当前页码改变'
)
this
.
currentPage
=
val
console
.
log
(
val
)
this
.
change
(
'POST'
,
this
.
valueRange
[
0
],
this
.
valueRange
[
1
],
this
.
total
,
this
.
pageSize
,
this
.
currentPage
,
this
.
chooseId
,
this
.
operatorId
)
},
suerSend
(
row
,
taskId
,
status
,
sendNum
)
{
let
self
=
this
let
operatorId
=
self
.
operatorId
if
(
operatorId
!==
'联通'
)
{
if
(
sendNum
===
null
||
sendNum
===
undefined
)
{
sendNum
=
row
.
preSendNum
row
.
sendNum
=
sendNum
}
console
.
log
(
sendNum
)
console
.
log
(
row
.
preSendNum
)
console
.
log
(
sendNum
-
0
<=
row
.
preSendNum
-
0
)
if
(
sendNum
-
0
<=
row
.
preSendNum
-
0
)
{
if
(
status
===
2
)
{
console
.
log
(
'发送'
)
row
.
visible2
=
false
row
.
status
=
'审核已通过'
row
.
sendNum
=
sendNum
row
.
disable
=
true
}
if
(
status
===
1
)
{
console
.
log
(
'不通过'
)
row
.
visible1
=
false
row
.
sendNum
=
0
row
.
status
=
'审核未通过'
row
.
disable
=
true
}
fetch
(
'/api/sendCheckNote'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
taskId
,
status
,
sendNum
,
operatorId
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
$message
({
message
:
data
.
message
,
type
:
'success'
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
self
.
waring
()
})
}
else
{
self
.
$message
({
message
:
'请输入正确的数值'
,
type
:
'error'
,
duration
:
600
})
}
}
else
{
if
(
status
===
2
)
{
console
.
log
(
'发送'
)
row
.
visible2
=
false
row
.
status
=
'审核已通过'
row
.
disable
=
true
}
if
(
status
===
1
)
{
console
.
log
(
'不通过'
)
row
.
visible1
=
false
row
.
status
=
'审核未通过'
row
.
disable
=
true
}
fetch
(
'/api/sendCheckNote'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
taskId
,
status
,
sendNum
,
operatorId
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
$message
({
message
:
data
.
message
,
type
:
'success'
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
self
.
waring
()
})
}
},
reset
(
row
)
{
this
.
suerSend
(
row
,
row
.
taskID
,
8
)
row
.
disable
=
false
row
.
status
=
'未审核'
},
change
(
type
=
'POST'
,
startTime
,
endTime
,
total
=
total
,
pageSize
=
this
.
pageSize
,
currentPage
=
this
.
currentPage
,
chooseId
,
operatorId
=
this
.
operatorId
)
{
let
self
=
this
console
.
log
(
self
.
url
,
type
,
startTime
,
endTime
,
total
,
pageSize
,
currentPage
,
chooseId
,
operatorId
)
fetch
(
self
.
url
,
{
method
:
type
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
startTime
,
endTime
,
total
,
pageSize
,
currentPage
,
chooseId
,
operatorId
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
self
.
datas
=
[]
console
.
log
(
data
)
self
.
datas
=
data
.
data
self
.
total
=
data
.
total
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/dataList.vue
View file @
b9095350
<
template
>
<
template
>
<el-container>
<el-container>
<el-header><h2>
数据
统计
</h2></el-header>
<el-header><h2>
直客
统计
</h2></el-header>
<el-main>
<el-main>
<TableTmp
:header=
"dataHeader"
ref=
'TableTmp'
:url=
'url'
:datalist=
'datalist'
>
<TableTmp
:header=
"dataHeader"
ref=
'TableTmp'
:url=
'url'
:datalist=
'datalist'
>
</TableTmp>
</TableTmp>
...
...
src/components/distributor.vue
0 → 100644
View file @
b9095350
<
template
>
<el-container>
<el-header><h2>
渠道统计
</h2></el-header>
<el-main>
<TableTmp
:header=
"dataHeader"
ref=
'TableTmp'
:url=
'url'
:datalist=
'datalist'
:distributor=
'distributor'
>
</TableTmp>
</el-main>
</el-container>
</
template
>
<
script
>
import
TableTmp
from
'./tableTmp'
export
default
{
name
:
'distributor'
,
components
:
{
TableTmp
},
data
()
{
return
{
url
:
'/api/distributor'
,
dataHeader
:
{
time
:
'日期'
,
email
:
'邮箱'
,
company
:
'公司'
,
distributor
:
'渠道商'
,
pv
:
'来访次数'
,
uid
:
'来访用户'
,
touchCount
:
'触达用户'
,
getCount
:
'备案用户'
,
msgCount
:
'短信营销'
,
callCount
:
'云呼营销'
},
datalist
:
'ok'
}
},
mounted
()
{
this
.
$refs
.
TableTmp
.
change
()
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/exportPoolTask.vue
0 → 100644
View file @
b9095350
<
template
>
<el-container>
<el-header>
<h4>
导出任务
</h4>
</el-header>
<el-main>
<el-table
border
:data=
'datas'
>
<el-table-column
label=
'任务编码'
prop=
'taskID'
></el-table-column>
<el-table-column
label=
'导出UNIKEY数'
prop=
'exportUnikeyNumber'
></el-table-column>
<el-table-column
label=
'导出生成用户数'
prop=
'createRecogNum'
></el-table-column>
<el-table-column
label=
'导出时间'
prop=
'exportTime'
></el-table-column>
<el-table-column
label=
'导出账号&代码位'
>
<template
slot-scope=
'scope'
>
<el-button
type=
'text'
size=
'mini'
@
click=
'showExportContent(scope.row)'
>
查看详情
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
'导出账户及代码位'
center
:visible
.
sync=
"exportContentVisible"
>
<el-table
:data=
'exprotContent'
border
>
<el-table-column
label=
'账户'
prop=
'accountName'
></el-table-column>
<el-table-column
label=
'代码位'
prop=
'slotName'
></el-table-column>
</el-table>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"exportContentVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</el-main>
</el-container>
</template>
<
script
>
export
default
{
name
:
'exportPoolTask'
,
data
()
{
return
{
datas
:
null
,
exportContentVisible
:
false
}
},
mounted
()
{
this
.
getData
()
},
methods
:
{
showExportContent
(
row
)
{
console
.
log
(
row
)
this
.
exprotContent
=
row
.
exportShowArr
this
.
exportContentVisible
=
true
},
getData
()
{
let
self
=
this
fetch
(
'/api/getExportTask'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
datas
=
data
.
datas
// self.emailOptions = data.emailArr
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/components/home.vue
View file @
b9095350
...
@@ -21,7 +21,11 @@
...
@@ -21,7 +21,11 @@
<span>
数据统计
</span>
<span>
数据统计
</span>
</
template
>
</
template
>
<el-menu-item-group>
<el-menu-item-group>
<el-menu-item
index=
"/dataList"
@
click=
"routeTo"
>
数据分析
<el-menu-item
index=
"/dataList"
@
click=
"routeTo"
>
直客统计
</el-menu-item>
</el-menu-item-group>
<el-menu-item-group>
<el-menu-item
index=
"/distributor"
@
click=
"routeTo"
>
渠道统计
</el-menu-item>
</el-menu-item>
</el-menu-item-group>
</el-menu-item-group>
</el-submenu>
</el-submenu>
...
@@ -62,6 +66,9 @@
...
@@ -62,6 +66,9 @@
<el-menu-item
index=
'/checkCall'
@
click=
"routeTo"
>
<el-menu-item
index=
'/checkCall'
@
click=
"routeTo"
>
云呼审核
云呼审核
</el-menu-item>
</el-menu-item>
<el-menu-item
index=
'/checkNote'
@
click=
"routeTo"
>
短信审核
</el-menu-item>
</el-submenu>
</el-submenu>
<el-submenu
index=
5
>
<el-submenu
index=
5
>
...
@@ -77,6 +84,22 @@
...
@@ -77,6 +84,22 @@
</el-menu-item>
</el-menu-item>
</el-submenu>
</el-submenu>
<el-submenu
index=
6
>
<
template
slot=
'title'
>
<i
class=
'el-icon-setting'
></i>
<span>
营销任务
</span>
</
template
>
<el-menu-item
index=
'/userPool'
@
click=
"routeTo"
>
用户营销池
</el-menu-item>
<el-menu-item
index=
'/leadPoolTask'
@
click=
"routeTo"
>
导入任务
</el-menu-item>
<el-menu-item
index=
'/exportPoolTask'
@
click=
"routeTo"
>
导出任务
</el-menu-item>
</el-submenu>
<a
class=
"btn-toggle"
@
click=
"toggle"
><i
<a
class=
"btn-toggle"
@
click=
"toggle"
><i
:class=
"[isCollapse? 'el-icon-d-arrow-right' : 'el-icon-d-arrow-left']"
></i></a>
:class=
"[isCollapse? 'el-icon-d-arrow-right' : 'el-icon-d-arrow-left']"
></i></a>
</el-menu>
</el-menu>
...
...
src/components/leadPoolTask.vue
0 → 100644
View file @
b9095350
<
template
>
<el-container>
<el-header>
<h4>
导入任务
</h4>
</el-header>
<el-main>
<el-table
border
:data=
'datas'
>
<el-table-column
label=
'任务编码'
prop=
'taskID'
></el-table-column>
<el-table-column
label=
'导入用户数目'
prop=
'leadNumber'
></el-table-column>
<el-table-column
label=
'重复过滤'
prop=
'filterNumber'
></el-table-column>
<el-table-column
label=
'导入时间'
prop=
'leadTime'
></el-table-column>
<el-table-column
label=
'导入来源账户'
prop=
'fromEmail'
></el-table-column>
<el-table-column
label=
'导入来源公司'
prop=
'fromCompany'
></el-table-column>
</el-table>
</el-main>
</el-container>
</
template
>
<
script
>
export
default
{
name
:
'leadPoolTask'
,
data
()
{
return
{
datas
:
null
}
},
mounted
()
{
this
.
getData
()
},
methods
:
{
getData
()
{
let
self
=
this
fetch
(
'/api/getLeadTask'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
datas
=
data
.
datas
// self.emailOptions = data.emailArr
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/components/slot.vue
View file @
b9095350
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
</el-header>
</el-header>
<el-main>
<el-main>
<el-row>
<el-row>
<el-select
v-model=
"inputValue"
filterable
placeholder=
"请选择"
@
change=
'change'
clearable
@
clear=
'clear'
style=
'width: 300px;margin-bottom: 10px'
>
<el-select
v-model=
"inputValue"
filterable
placeholder=
"请选择
账户名称
"
@
change=
'change'
clearable
@
clear=
'clear'
style=
'width: 300px;margin-bottom: 10px'
>
<el-option
<el-option
v-for=
"item in emailOptions"
v-for=
"item in emailOptions"
:key=
"item"
:key=
"item"
...
@@ -25,6 +25,11 @@
...
@@ -25,6 +25,11 @@
<el-table-column
label=
'公司名称'
prop=
'company'
></el-table-column>
<el-table-column
label=
'公司名称'
prop=
'company'
></el-table-column>
<el-table-column
label=
'代码位名称'
prop=
'slotName'
></el-table-column>
<el-table-column
label=
'代码位名称'
prop=
'slotName'
></el-table-column>
<el-table-column
label=
'代码位位置'
prop=
'slot'
></el-table-column>
<el-table-column
label=
'代码位位置'
prop=
'slot'
></el-table-column>
<el-table-column
label=
'代码位备案规则'
>
<
template
slot-scope=
'scope'
>
<el-button
type=
'text'
@
click=
'openDialog(scope)'
>
备案规则
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
'代码位操作'
>
<el-table-column
label=
'代码位操作'
>
<
template
slot-scope=
'scope'
>
<
template
slot-scope=
'scope'
>
<el-switch
<el-switch
...
@@ -50,6 +55,18 @@
...
@@ -50,6 +55,18 @@
style=
"float: right;margin-top: 15px"
>
style=
"float: right;margin-top: 15px"
>
</el-pagination>
</el-pagination>
</el-main>
</el-main>
<el-dialog
title=
'备案规则'
:visible
.
sync=
'dialogVisiable'
width=
60%
>
<el-radio-group
v-model=
"autoRule.strategy"
@
change=
'getChoose2'
:disabled=
'currentdata.disable'
>
<el-radio
:label=
"'all'"
>
全量备案
</el-radio>
<el-radio
:label=
"'repeat'"
>
重复用户备案
</el-radio>
<el-radio
:label=
"'norepeat'"
>
非重复用户备案
</el-radio>
<el-radio
:label=
"'uniq'"
>
所有用户有且备案一次
</el-radio>
</el-radio-group>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"suerSend()"
:disabled=
'currentdata.disable'
>
确 定
</el-button>
</div>
</el-dialog>
</el-container>
</el-container>
</template>
</template>
...
@@ -64,13 +81,67 @@
...
@@ -64,13 +81,67 @@
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
100
,
total
:
100
,
emailOptions
:
[]
emailOptions
:
[],
dialogVisiable
:
false
,
currentdata
:
{
disable
:
false
},
radio1
:
1
,
radio2
:
1
,
autoRule
:
{
internal
:
null
,
strategy
:
'all'
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
this
.
inputValue
)
this
.
getData
(
this
.
currentPage
,
this
.
pageSize
,
this
.
inputValue
)
},
},
methods
:
{
methods
:
{
getChoose
(
value
)
{
console
.
log
(
value
)
},
getChoose2
(
value
)
{
console
.
log
(
value
)
},
openDialog
(
scope
)
{
this
.
dialogVisiable
=
true
this
.
currentdata
=
scope
.
row
this
.
autoRule
.
strategy
=
scope
.
row
.
autoRule
.
strategy
||
'all'
console
.
log
(
this
.
currentdata
)
},
closeDialog
()
{
this
.
dialogVisiable
=
false
this
.
currentdata
=
{
disable
:
false
}
},
suerSend
()
{
let
self
=
this
let
autoRule
=
this
.
autoRule
let
slotId
=
this
.
currentdata
.
slotId
console
.
log
(
slotId
)
console
.
log
(
autoRule
)
this
.
dialogVisiable
=
false
fetch
(
'/api/slotAutoRule'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
slotId
:
slotId
,
autoRule
:
autoRule
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
this
.
$message
({
message
:
data
.
message
,
type
:
'success'
})
self
.
currentdata
=
{
disable
:
false
}
self
.
autoRule
=
{
internal
:
null
,
strategy
:
'all'
}
})
},
change
()
{
change
()
{
console
.
log
(
'进入筛选'
)
console
.
log
(
'进入筛选'
)
console
.
log
(
this
.
inputValue
)
console
.
log
(
this
.
inputValue
)
...
...
src/components/tableTmp.vue
View file @
b9095350
...
@@ -56,7 +56,8 @@
...
@@ -56,7 +56,8 @@
'consume'
,
'consume'
,
'url'
,
'url'
,
'surplus'
,
'surplus'
,
'datalist'
'datalist'
,
'distributor'
],
],
data
()
{
data
()
{
return
{
return
{
...
@@ -149,6 +150,10 @@
...
@@ -149,6 +150,10 @@
}
}
list
.
push
([
'余额合计'
,
self
.
surplusTotal
])
list
.
push
([
'余额合计'
,
self
.
surplusTotal
])
console
.
log
(
list
)
console
.
log
(
list
)
}
else
if
(
self
.
url
===
'/api/distributor'
)
{
for
(
let
i
=
0
;
i
<
self
.
allDate
.
length
;
i
++
)
{
list
.
push
([
self
.
allDate
[
i
].
time
,
self
.
allDate
[
i
].
email
,
self
.
allDate
[
i
].
company
,
self
.
allDate
[
i
].
distributor
,
self
.
allDate
[
i
].
pv
,
self
.
allDate
[
i
].
uid
,
self
.
allDate
[
i
].
touchCount
,
self
.
allDate
[
i
].
getCount
,
self
.
allDate
[
i
].
msgCount
,
self
.
allDate
[
i
].
callCount
])
}
}
else
{
}
else
{
for
(
let
i
=
0
;
i
<
self
.
allDate
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
self
.
allDate
.
length
;
i
++
)
{
list
.
push
([
self
.
allDate
[
i
].
time
,
self
.
allDate
[
i
].
email
,
self
.
allDate
[
i
].
company
,
self
.
allDate
[
i
].
pv
,
self
.
allDate
[
i
].
uid
,
self
.
allDate
[
i
].
touchCount
,
self
.
allDate
[
i
].
getCount
,
self
.
allDate
[
i
].
msgCount
,
self
.
allDate
[
i
].
callCount
])
list
.
push
([
self
.
allDate
[
i
].
time
,
self
.
allDate
[
i
].
email
,
self
.
allDate
[
i
].
company
,
self
.
allDate
[
i
].
pv
,
self
.
allDate
[
i
].
uid
,
self
.
allDate
[
i
].
touchCount
,
self
.
allDate
[
i
].
getCount
,
self
.
allDate
[
i
].
msgCount
,
self
.
allDate
[
i
].
callCount
])
...
...
src/components/userPool.vue
0 → 100644
View file @
b9095350
<
template
>
<el-container>
<el-header>
<h4>
用户营销池
</h4>
</el-header>
<el-main>
<el-row
style=
'margin-bottom: 10px'
>
<el-button
type=
'primary'
style=
'float: left'
@
click=
' inDialogVisible = true'
>
导入任务
</el-button>
<el-button
type=
'primary'
style=
'float: right'
@
click=
'openExportDialog'
>
导出任务
</el-button>
</el-row>
<el-table
border
ref=
'multipleTable'
:data=
"datas"
tooltip-effect=
"dark"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
label=
'UNIKEY'
prop=
'unikey'
></el-table-column>
<el-table-column
label=
'账户来源'
prop=
'fromEmail'
></el-table-column>
<el-table-column
label=
'公司来源'
prop=
'fromCompany'
></el-table-column>
<el-table-column
label=
'导入时间'
prop=
'leadTime'
></el-table-column>
<el-table-column
label=
'标签'
prop=
'tags'
></el-table-column>
<el-table-column
label=
'导出次数'
prop=
'exportNum'
></el-table-column>
<el-table-column
label=
'导出账号&代码位'
>
<template
slot-scope=
'scope'
>
<el-button
type=
'text'
size=
'mini'
@
click=
'showExportContent(scope.row)'
>
查看详情
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-dialog
title=
'新建导入任务'
center
:visible
.
sync=
"inDialogVisible"
>
<el-row
style=
'margin-bottom: 10px'
>
<el-col
:span=
"4"
style=
'line-height: 40px'
>
任务模式
</el-col>
<el-col
:span=
"14"
>
<el-select
v-model=
"pattern"
placeholder=
"请选择任务模式"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-col>
</el-row>
<el-row
style=
'margin-bottom: 10px'
>
<el-col
:span=
'4'
style=
'line-height: 40px'
>
时间
</el-col>
<el-col
:span=
'14'
>
<el-date-picker
v-model=
"valueRange"
type=
"daterange"
unlink-panelss
range-separator=
"至"
:start-placeholder=
"startTime"
:end-placeholder=
"endTime"
value-format=
'yyyy-MM-dd'
format=
'yyyy-MM-dd'
:picker-options=
"pickerOptions"
>
</el-date-picker>
</el-col>
</el-row>
<el-row
style=
'margin-bottom: 10px'
>
<el-col
:span=
'4'
style=
'line-height: 40px'
>
账户
</el-col>
<el-col
:span=
'14'
>
<el-select
v-model=
"accountValue"
filterable
placeholder=
"请选择账户名称"
@
change=
'accountChange'
clearable
@
clear=
'clear'
style=
'width: 300px;margin-bottom: 10px'
>
<el-option
v-for=
"item in emailOptions"
:key=
"item.accountID"
:label=
"item.email"
:value=
"item.accountID"
>
</el-option>
</el-select>
</el-col>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"inDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sureChoose"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
'导出至账号'
center
:visible
.
sync=
"exportDialogVisible"
>
<el-row
style=
'margin-bottom: 10px'
>
<el-col
:span=
"4"
>
选中UNIKEY
</el-col>
<el-col
:span=
"14"
>
{{selectUnikeyNumber}}
</el-col>
</el-row>
<el-row
style=
'margin-bottom: 10px'
>
<el-col
:span=
'4'
>
账号
&
代码位
</el-col>
<el-col
:span=
'20'
>
<el-row
v-for=
'(item, index) in exportDataArr'
style=
'margin-bottom: 5px'
>
<el-col
:span=
'8'
>
账户:{{item.accountName}}
</el-col>
<el-col
:span=
'14'
>
代码位:{{item.slotName}}
</el-col>
<el-col
:span=
'2'
><el-button
type=
'text'
size=
'mini'
@
click=
'deleteShow(index)'
>
删除
</el-button></el-col>
</el-row>
<el-row>
<el-select
v-model=
"exportAccount"
placeholder=
"请选择账户"
@
visible-change=
'selectSlot'
>
<el-option
v-for=
"item in emailOptions"
:key=
"item.accountID"
:label=
"item.email"
:value=
"item.accountID"
>
</el-option>
</el-select>
<el-select
v-model=
"exportSlot"
placeholder=
"请选择代码位"
>
<el-option
v-for=
"item in slotOptions"
:key=
"item.slotID"
:label=
"item.slotName"
:value=
"item.slotID"
>
</el-option>
</el-select>
</el-row>
<el-button
type=
'primary'
size=
'small'
@
click=
'addSelect'
style=
'margin-top: 10px'
>
添加
</el-button>
</el-col>
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"exportDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sureExport"
>
确 定
</el-button>
</span>
</el-dialog>
<el-dialog
title=
'导出账户及代码位'
center
:visible
.
sync=
"exportContentVisible"
>
<el-table
:data=
'exprotContent'
border
>
<el-table-column
label=
'账户'
prop=
'accountName'
></el-table-column>
<el-table-column
label=
'代码位'
prop=
'slotName'
></el-table-column>
</el-table>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"exportContentVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</el-main>
</el-container>
</template>
<
script
>
import
ElSelectDropdown
from
"element-ui/packages/select/src/select-dropdown"
;
import
moment
from
'moment'
export
default
{
name
:
'userPool'
,
components
:
{
ElSelectDropdown
},
data
()
{
return
{
pattern
:
null
,
accountValue
:
null
,
inDialogVisible
:
false
,
exportDialogVisible
:
false
,
exportContentVisible
:
false
,
options
:
[{
label
:
'单次任务'
,
value
:
1
},
{
label
:
'多次任务'
,
value
:
2
}],
datas
:
null
,
emailOptions
:
null
,
slotOptions
:
[],
valueRange
:
[],
pickerOptions
:
{
shortcuts
:
[{
text
:
'昨天'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近一周'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近一个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
},
{
text
:
'最近三个月'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
)
picker
.
$emit
(
'pick'
,
[
start
,
end
])
}
}]
},
startTime
:
null
,
endTime
:
null
,
selectUnikeyArr
:
[],
selectUnikeyNumber
:
0
,
exportAccount
:
null
,
exportSlot
:
null
,
exportDataArr
:
[],
exportShowArr
:
[],
showEmail
:
null
,
showSlot
:
null
,
exprotContent
:
[]
}
},
mounted
()
{
this
.
getTime
()
this
.
getData
()
this
.
getEmail
()
},
methods
:
{
openExportDialog
()
{
let
self
=
this
if
(
self
.
selectUnikeyNumber
===
0
)
{
this
.
$message
.
error
(
'请选择需要导入的UNIKEY'
)
}
else
{
self
.
exportDialogVisible
=
true
}
},
showExportContent
(
row
)
{
console
.
log
(
row
)
this
.
exprotContent
=
row
.
exportDataArr
this
.
exportContentVisible
=
true
},
deleteShow
(
index
)
{
console
.
log
(
index
)
this
.
exportDataArr
.
splice
(
index
,
1
)
},
selectSlot
(
value
)
{
if
(
!
value
)
{
this
.
getEmail
()
}
},
addSelect
()
{
let
self
=
this
this
.
emailOptions
.
forEach
(
x
=>
{
if
(
x
.
accountID
===
self
.
exportAccount
)
{
self
.
showEmail
=
x
.
email
}
})
this
.
slotOptions
.
forEach
(
x
=>
{
if
(
x
.
slotID
===
self
.
exportSlot
)
{
self
.
showSlot
=
x
.
slotName
}
})
this
.
exportDataArr
.
push
({
accountID
:
this
.
exportAccount
,
slotID
:
this
.
exportSlot
,
accountName
:
this
.
showEmail
,
slotName
:
this
.
showSlot
})
this
.
exportAccount
=
null
this
.
exportSlot
=
null
},
handleSelectionChange
(
valueArr
)
{
console
.
log
(
valueArr
)
this
.
selectUnikeyNumber
=
valueArr
.
length
let
unikeyArr
=
[]
valueArr
.
forEach
(
x
=>
{
unikeyArr
.
push
(
x
.
unikey
)
})
this
.
selectUnikeyArr
=
unikeyArr
},
getTime
()
{
this
.
endTime
=
moment
().
format
(
'YYYY-MM-DD'
)
this
.
startTime
=
moment
().
subtract
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
)
if
(
this
.
surplus
)
{
this
.
startTime
=
'2018-01-01'
}
},
accountChange
(
val
)
{
console
.
log
(
val
)
},
sureChoose
()
{
let
self
=
this
console
.
log
(
this
.
pattern
,
this
.
valueRange
,
this
.
accountValue
)
fetch
(
'/api/leadPool'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
pattern
:
self
.
pattern
,
startTime
:
self
.
valueRange
[
0
],
endTime
:
self
.
valueRange
[
1
],
accountID
:
self
.
accountValue
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
inDialogVisible
=
false
})
},
sureExport
()
{
let
self
=
this
let
exportDataArr
=
this
.
exportDataArr
let
selectUnikeyArr
=
this
.
selectUnikeyArr
let
selectUnikeyNumber
=
this
.
selectUnikeyNumber
if
(
exportDataArr
.
length
===
0
)
{
this
.
$message
.
error
(
'请选择代码位'
)
}
else
{
fetch
(
'/api/exprot'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
selectUnikeyArr
:
selectUnikeyArr
,
exportDataArr
:
exportDataArr
,
selectUnikeyNumber
:
selectUnikeyNumber
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
exportDataArr
=
[]
self
.
exportDialogVisible
=
false
this
.
$refs
.
multipleTable
.
clearSelection
()
})
}
},
getData
()
{
let
self
=
this
fetch
(
'/api/poolData'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
datas
=
data
.
datas
})
},
getEmail
()
{
let
self
=
this
let
accountID
=
self
.
exportAccount
fetch
(
'/api/getEmail'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
({
accountID
:
accountID
})
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
self
.
emailOptions
=
data
.
emailArr
self
.
slotOptions
=
data
.
slotArr
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/router/index.js
View file @
b9095350
...
@@ -9,8 +9,13 @@ import releaseInfo from '@/components/releaseInfo'
...
@@ -9,8 +9,13 @@ import releaseInfo from '@/components/releaseInfo'
import
info
from
'@/components/info'
import
info
from
'@/components/info'
import
login
from
'@/components/login'
import
login
from
'@/components/login'
import
checkCall
from
'@/components/checkCall'
import
checkCall
from
'@/components/checkCall'
import
checkNote
from
'@/components/checkNote'
import
account
from
'@/components/account'
import
account
from
'@/components/account'
import
slot
from
'@/components/slot'
import
slot
from
'@/components/slot'
import
distributor
from
'@/components/distributor'
import
userPool
from
'@/components/userPool'
import
leadPoolTask
from
'@/components/leadPoolTask'
import
exportPoolTask
from
'@/components/exportPoolTask'
Vue
.
use
(
Router
)
Vue
.
use
(
Router
)
...
@@ -30,8 +35,13 @@ export default new Router({
...
@@ -30,8 +35,13 @@ export default new Router({
{
name
:
'releaseInfo'
,
path
:
'/releaseInfo'
,
meta
:
{
requiresId
:
false
},
component
:
releaseInfo
},
{
name
:
'releaseInfo'
,
path
:
'/releaseInfo'
,
meta
:
{
requiresId
:
false
},
component
:
releaseInfo
},
{
name
:
'info'
,
path
:
'/info'
,
meta
:
{
requiresId
:
false
},
component
:
info
},
{
name
:
'info'
,
path
:
'/info'
,
meta
:
{
requiresId
:
false
},
component
:
info
},
{
name
:
'checkCall'
,
path
:
'/checkCall'
,
meta
:
{
requiresId
:
false
},
component
:
checkCall
},
{
name
:
'checkCall'
,
path
:
'/checkCall'
,
meta
:
{
requiresId
:
false
},
component
:
checkCall
},
{
name
:
'checkNote'
,
path
:
'/checkNote'
,
meta
:
{
requiresId
:
false
},
component
:
checkNote
},
{
name
:
'account'
,
path
:
'/account'
,
meta
:
{
requiresId
:
false
},
component
:
account
},
{
name
:
'account'
,
path
:
'/account'
,
meta
:
{
requiresId
:
false
},
component
:
account
},
{
name
:
'slot'
,
path
:
'/slot'
,
meta
:
{
requiresId
:
false
},
component
:
slot
}
{
name
:
'slot'
,
path
:
'/slot'
,
meta
:
{
requiresId
:
false
},
component
:
slot
},
{
name
:
'userPool'
,
path
:
'/userPool'
,
meta
:
{
requiresId
:
false
},
component
:
userPool
},
{
name
:
'leadPoolTask'
,
path
:
'/leadPoolTask'
,
meta
:
{
requiresId
:
false
},
component
:
leadPoolTask
},
{
name
:
'exportPoolTask'
,
path
:
'/exportPoolTask'
,
meta
:
{
requiresId
:
false
},
component
:
exportPoolTask
},
{
name
:
'distributor'
,
path
:
'/distributor'
,
meta
:
{
requiresId
:
false
},
component
:
distributor
}
]
]
},
},
{
{
...
...
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