Commit 8d26b437 authored by yaobeibei's avatar yaobeibei

add reset

parent 72bce8bf
......@@ -15,9 +15,13 @@ RUN npm i --only=production --registry https://registry.npm.taobao.org
ENV SERVICE_PORT=8082
ENV PROJECT_LEVEL=production
# ENV MONGO='mongodb://mongo-adpro-ssp-v2-rs-2.localhost:1301/remarketing?replicaSet=adpro_ssp_v2_rs'
ENV MONGO='mongodb://mongo-adpro-ssp-v2-rs-1.localhost:1301,mongo-adpro-ssp-v2-rs-2.localhost:1301,mongo-adpro-ssp-v2-rs-3.localhost:1301/remarketingAgent?replicaSet=adpro_ssp_v2_rs&adpro_ssp_v2_rs=SECONDARY'
ENV MONGO_OEM='mongodb://bjwjh-admin:c9yJ2gBFkp7U6@mongo-bjwjh-rs-1.localhost:1302,mongo-bjwjh-rs-2.localhost:1302,mongo-bjwjh-rs-3.localhost:1302/oem_maitian_remarketingAgent?replicaSet=bjwjh-rs&authSource=admin'
ENV MONGO='mongodb://mongo-adpro-ssp-v2-rs-2.localhost:1301/remarketing?replicaSet=adpro_ssp_v2_rs'
# ENV MONGO='mongodb://10.11.3.123:1301,10.11.3.127:1301,10.12.1.9:1301/remarketing?replicaSet=adpro_ssp_v2_rs&adpro_ssp_v2_rs=SECONDARY'
# ENV MONGO_OEM='mongodb://bjwjh-admin:c9yJ2gBFkp7U6@mongo-bjwjh-rs-1.localhost:1302,mongo-bjwjh-rs-2.localhost:1302,mongo-bjwjh-rs-3.localhost:1302/oem_maitian_remarketingAgent?replicaSet=bjwjh-rs&authSource=admin'
ENV MONGO_OEM='mongodb://bjwjh-admin:c9yJ2gBFkp7U6@mongo-bjwjh-rs-1.localhost:1302,mongo-bjwjh-rs-2.localhost:1302,mongo-bjwjh-rs-3.localhost:1302/oem_mtty_remarketing?replicaSet=bjwjh-rs&authSource=admin'
ENV NODE_ENV='production'
EXPOSE 8082
CMD node server.js
......@@ -2,11 +2,10 @@ const mongodb = require('mongodb')
const mongoClient = mongodb.MongoClient
const app = require('express').Router()
const _ = require('lodash')
const request = require('request')
const moment = require('moment')
const xlsx = require('node-xlsx')
var reg = /@test.com$|@123.com$|@goyoo.com$|@xiaoyun.com$|^@|^test|@dis.com$|time-stone.cn$|^tangyong|^875652541|@1.com$|@xioayun.com$/i
var dbpath = null
......@@ -19,8 +18,8 @@ if (process.env.MONGO) {
var dbpath_oem = null
if (process.env.MONGO) {
dbpath_oem = 'mongodb://bjwjh-admin:c9yJ2gBFkp7U6@mongo-bjwjh-rs-1.localhost:1302,mongo-bjwjh-rs-2.localhost:1302,mongo-bjwjh-rs-3.localhost:1302/oem_maitian_remarketingAgent?replicaSet=bjwjh-rs&authSource=admin'
if (process.env.MONGO_OEM) {
dbpath_oem = process.env.MONGO_OEM || 'mongodb://bjwjh-admin:c9yJ2gBFkp7U6@mongo-bjwjh-rs-1.localhost:1302,mongo-bjwjh-rs-2.localhost:1302,mongo-bjwjh-rs-3.localhost:1302/oem_maitian_remarketingAgent?replicaSet=bjwjh-rs&authSource=admin'
} else {
dbpath_oem = 'mongodb://localhost:27017/remarketing2'
}
......@@ -33,19 +32,23 @@ var db_oem_xibao = {}
var db_agent = {}
mongoClient.connect(dbpath, {useNewUrlParser: true}, function (err, res) {
mongoClient.connect(dbpath,{ useNewUrlParser: true }, function (err, res) {
console.log(process.env.MONGO)
if (err) return console.log(err)
db = res.db('remarketing')
db_agent = res.db('remarketingAgent')
})
mongoClient.connect(dbpath_oem, {useNewUrlParser: true}, function (err, res) {
if (err) return console.log(err)
mongoClient.connect(dbpath_oem, { useNewUrlParser: true }, function (err, res) {
console.log('---------------')
console.log(dbpath_oem)
if (err) return console.log(err)
if (process.env.MONGO) {
db_oem_mtty = res.db('oem_mtty_remarketing')
db_oem_xibao = res.db('oem_xibao_remarketing')
console.log('线上')
} else {
db_oem_mtty = res.db('remarketing2')
db_oem_xibao = res.db('remarketing3')
......@@ -104,6 +107,7 @@ app.post('/dataList', async function (req, res) {
console.log(body)
console.log(startTime, endTime)
console.log(db)
let dateQs = getTimeRange({ start: startTime, end: endTime, key: 'date' })
let results = await db.collection('dailyStats').aggregate([
......@@ -210,10 +214,10 @@ app.post('/dataList', async function (req, res) {
// if (item.pv || item.touchCount || item.getCount || item.msgCount || item.callCount) {
// dataArr.push(item)
// }
if (!reg.test(item.email)) {
dataArr.push(item)
}
// dataArr.push(item)
// if (!reg.test(item.email)) {
// dataArr.push(item)
// }
dataArr.push(item)
})
let arrTotal = dataArr.length
......@@ -335,10 +339,10 @@ app.post('/distributor', async function (req, res) {
// if (item.pv || item.touchCount || item.getCount || item.msgCount || item.callCount) {
// dataArr.push(item)
// }
if (!reg.test(item.email)) {
dataArr.push(item)
}
// dataArr.push(item)
// if (!reg.test(item.email)) {
// dataArr.push(item)
// }
dataArr.push(item)
})
let arrTotal = dataArr.length
......@@ -409,10 +413,10 @@ app.post('/consume', async function (req, res) {
// if (item.number || item.preNumber) {
// dataArr.push(item)
// }
if (!reg.test(item.email)) {
dataArr.push(item)
}
// dataArr.push(item)
// if (!reg.test(item.email)) {
// dataArr.push(item)
// }
dataArr.push(item)
})
let dataTotal = dataArr.length
......@@ -478,10 +482,10 @@ app.post('/finance', async function (req, res) {
// dataArr.push(item)
// }
if (!reg.test(item.email)) {
// if (!reg.test(item.email)) {
// dataArr.push(item)
// }
dataArr.push(item)
}
})
let dataTolal = dataArr.length
......@@ -563,10 +567,10 @@ app.post('/surplus', async function (req, res) {
}
})
item.surplus = item.addNum - item.consumeNum
if (!reg.test(item.email)) {
dataArr.push(item)
}
// dataArr.push(item)
// if (!reg.test(item.email)) {
// dataArr.push(item)
// }
dataArr.push(item)
})
let surPlusTotal = 0
dataArr.forEach(x => {
......@@ -659,7 +663,7 @@ app.post('/checkCall', async function (req, res) {
// 获取remarketing数据库数据
let comapnyName = await db.collection('account').find({}).sort({ 'date': -1 }).toArray()
let companyName = await db.collection('account').find({}).sort({ 'date': -1 }).toArray()
let callName = await db.collection('bills').find({ 'type': 'dspbuynumber', 'groupID': { $exists: 1 }, 'createdAt': { $gt: startTime, $lte: endTime } }).toArray()
......@@ -679,7 +683,7 @@ app.post('/checkCall', async function (req, res) {
}
item.time = moment(x.createdAt).format('YYYY-MM-DD HH:mm')
comapnyName.forEach(y => {
companyName.forEach(y => {
if (x.accountID + '' === y._id + '' || x.accountID === y._id) {
item.companyName = y.company
if (y.fromID) {
......@@ -767,7 +771,7 @@ app.post('/checkCall', async function (req, res) {
// 获取麦田
let oem_mtty_comapnyName = await db_oem_mtty.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_mtty_companyName = await db_oem_mtty.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_mtty_callName = await db_oem_mtty.collection('bills').find({ 'type': 'dspbuynumber', 'groupID': { $exists: 1 }, 'createdAt': { $gt: startTime, $lte: endTime }, 'oemCheckStatus': 1}).toArray()
......@@ -786,7 +790,7 @@ app.post('/checkCall', async function (req, res) {
}
item.time = moment(x.createdAt).format('YYYY-MM-DD HH:mm')
oem_mtty_comapnyName.forEach(y => {
oem_mtty_companyName.forEach(y => {
if (x.accountID + '' === y._id + '' || x.accountID === y._id) {
item.companyName = y.company
}
......@@ -862,7 +866,7 @@ app.post('/checkCall', async function (req, res) {
// 获取喜宝
let oem_xibao_comapnyName = await db_oem_xibao.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_xibao_companyName = await db_oem_xibao.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_xibao_callName = await db_oem_xibao.collection('bills').find({ 'type': 'dspbuynumber', 'groupID': { $exists: 1 }, 'createdAt': { $gt: startTime, $lte: endTime }, 'oemCheckStatus': 1}).toArray()
......@@ -881,7 +885,7 @@ app.post('/checkCall', async function (req, res) {
}
item.time = moment(x.createdAt).format('YYYY-MM-DD HH:mm')
oem_xibao_comapnyName.forEach(y => {
oem_xibao_companyName.forEach(y => {
if (x.accountID + '' === y._id + '' || x.accountID === y._id) {
item.companyName = y.company
}
......@@ -1074,7 +1078,7 @@ app.post('/getCheckNote', async function (req, res) {
console.log(startTime)
console.log(endTime)
let comapnyName = await db.collection('account').find({}).sort({ 'date': -1 }).toArray()
let companyName = await db.collection('account').find({}).sort({ 'date': -1 }).toArray()
let msgTagName = await db.collection('msgTemps').find().sort({ 'date': -1 }).toArray()
......@@ -1099,7 +1103,7 @@ app.post('/getCheckNote', async function (req, res) {
item.sendNum = x.sendNum
}
item.createdAt = moment(x.createdAt).format('YYYY-MM-DD HH:mm:ss')
comapnyName.forEach(y => {
companyName.forEach(y => {
if (x.accountID + '' === y._id + '') {
item.companyName = y.company
if (y.fromID) {
......@@ -1183,7 +1187,7 @@ app.post('/getCheckNote', async function (req, res) {
// 获取麦田
let oem_mtty_comapnyName = await db_oem_mtty.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_mtty_companyName = await db_oem_mtty.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_mtty_msgTagName = await db_oem_mtty.collection('msgTemps').find().sort({ 'date': -1 }).toArray()
......@@ -1205,7 +1209,7 @@ app.post('/getCheckNote', async function (req, res) {
item.sendNum = x.sendNum
}
item.createdAt = moment(x.createdAt).format('YYYY-MM-DD HH:mm:ss')
oem_mtty_comapnyName.forEach(y => {
oem_mtty_companyName.forEach(y => {
if (x.accountID + '' === y._id + '') {
item.companyName = y.company
}
......@@ -1284,7 +1288,7 @@ app.post('/getCheckNote', async function (req, res) {
})
// 获取喜宝
let oem_xibao_comapnyName = await db_oem_xibao.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_xibao_companyName = await db_oem_xibao.collection('account').find({}).sort({ 'date': -1 }).toArray()
let oem_xibao_msgTagName = await db_oem_xibao.collection('msgTemps').find().sort({ 'date': -1 }).toArray()
......@@ -1307,7 +1311,7 @@ app.post('/getCheckNote', async function (req, res) {
item.sendNum = x.sendNum
}
item.createdAt = moment(x.createdAt).format('YYYY-MM-DD HH:mm:ss')
oem_xibao_comapnyName.forEach(y => {
oem_xibao_companyName.forEach(y => {
if (x.accountID + '' === y._id + '') {
item.companyName = y.company
}
......@@ -1968,8 +1972,165 @@ app.post('/getExportTask', async function (req, res) {
// 审核Url
app.post('/getUrlData', async function (req, res) {
console.log(req.body)
let {startTime, endTime, currentPage, pageSize, status} = req.body
startTime = moment(startTime).startOf('day').toDate()
endTime = moment(endTime).endOf('day').toDate()
console.log(startTime)
console.log(endTime)
let url = await db.collection('urlTemps').find({createdAt: {$gt: startTime, $lte: endTime}}).toArray()
let companyName = await db.collection('account').find({}).toArray()
let dataArr = []
url.forEach(x => {
let item = {}
item.slotId = x._id
item.slot = x.durl
item.slotName = x.slotName
item.time = moment(x.createdAt).format('YYYY-MM-DD HH:mm:SS')
switch(x.status) {
case 0: item.status = '未审核'; break;
case 1: item.status = '已拒绝'; break;
case 2: item.status = '已通过'; break;
default: item.status = '未审核';
}
companyName.forEach(y => {
if (x.accountID === y._id || x.accountID + '' === y._id + '') {
item.company = y.company
item.email = y.email
}
})
if (status === item.status) {
dataArr.push(item)
}
if (status === '全部状态') {
dataArr.push(item)
}
})
console.log(dataArr)
let totalNum = dataArr.length
dataArr = dataArr.slice((currentPage - 1) * pageSize, pageSize * currentPage)
if (totalNum > 1000) {
dataArr = dataArr.slice(0, 1000)
}
res.send({status: 200, total: totalNum, datas: dataArr})
})
app.post('/checkUrl', async function (req, res) {
console.log(req.body)
res.send({status: 200, datas: 'ok'})
let {slotId, status} = req.body
if (status === 1) {
await db.collection('urlTemps').update({_id: mongodb.ObjectId(slotId), status: 0}, {$set: {status: 1}}, {upsert: true}, (err, rep) => {
if (err) {
console.log(err)
res.send({status: 700, message: err})
return
} else {
res.send({status: 200, message: 'Url拒绝成功'})
}
})
}
if (status === 2) {
await db.collection('urlTemps').update({_id: mongodb.ObjectId(slotId), status: 0}, {$set: {status: 2}}, {upsert: true}, (err, rep) => {
if (err) {
console.log(err)
res.send({status: 700, message: err})
return
} else {
res.send({status: 200, message: 'Url审核通过'})
}
})
}
if (status === 8) {
await db.collection('urlTemps').update({_id: mongodb.ObjectId(slotId)}, {$set: {status: 0}}, {upsert: true}, (err, rep) => {
if (err) {
console.log(err)
res.send({status: 700, message: err})
return
} else {
res.send({status: 200, message: '重置完成'})
}
})
}
})
app.post('/entry', function(req, res) {
 console.log(req.body)
let {billID} = req.body
let url = 'http://remarketing-job-yh.yoo.yunpro.cn/fileStatusDSP?billID=' + billID
request(url, (err, response) => {
if (err) {
return console.log(err)
}
console.log(response.statusCode, response.message)
if (response.statusCode === 200) {
res.send({status: 200, datas: response.message})
}
if (response.statusCode === 204) {
res.send({status: 204, message: '订单数据未找到(运营商未返回任务记录)'})
// res.send({status: 200, datas: {
// billCheck: {
// result : "通过", // 结果(下同)
// at : 1531979761733.0 // 执行时间戳(下同)
// },
// fileCheck: {
// result : "通过",
// at : 1531979761733.0
// },
// countCheck: {
// result : "通过",
// at : 1531979761733.0,
// now: 500, // 当前数量
// expect: 500 // 期待数量
// },
// tagCheck: {
// result : "通过",
// at : 1531979761733.0,
// lose: 0, // 缺失量
// total: 500 // 期待数量
// },
// randomCall: {
// result : "通过",
// at : 1531979761733.0
// }
// }})
}
})
})
app.post('/entryIn', function(req, res) {
 console.log(req.body)
let {billID} = req.body
let url = 'http://remarketing-job-yh.yoo.yunpro.cn/fileReaderDSP?billID=' + billID
request(url, (err, response) => {
if (err) {
return console.log(err)
}
console.log(response.statusCode, response.message)
if (response.statusCode === 200) {
res.send({status: 200, datas: response.message})
}
if (response.statusCode === 204) {
res.send({status: 204, message: '订单数据未找到'})
}
})
})
module.exports = app
......@@ -10,7 +10,9 @@ module.exports = {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
proxyTable: {
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
......@@ -51,7 +53,7 @@ module.exports = {
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
......
......@@ -291,7 +291,6 @@
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
"dev": true,
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.1.0",
......@@ -491,8 +490,7 @@
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
"integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
"dev": true
"integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
},
"asn1.js": {
"version": "4.10.1",
......@@ -517,8 +515,7 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"assertion-error": {
"version": "1.0.0",
......@@ -575,8 +572,7 @@
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"atob": {
"version": "2.1.0",
......@@ -601,14 +597,12 @@
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
"dev": true
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==",
"dev": true
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w=="
},
"axios": {
"version": "0.18.0",
......@@ -1644,10 +1638,9 @@
"integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY="
},
"bcrypt-pbkdf": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
"dev": true,
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
......@@ -1753,15 +1746,6 @@
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true
},
"boom": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
"dev": true,
"requires": {
"hoek": "4.2.1"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
......@@ -1926,9 +1910,9 @@
}
},
"bson": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.6.tgz",
"integrity": "sha512-D8zmlb46xfuK2gGvKmUjIklQEouN2nQ0LEHHeZ/NoHM2LDiMk2EYzZ5Ntw/Urk+bgMDosOZxaRzXxvhI5TcAVQ=="
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz",
"integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg=="
},
"buffer": {
"version": "4.9.1",
......@@ -2111,8 +2095,7 @@
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"center-align": {
"version": "0.1.3",
......@@ -2232,7 +2215,7 @@
"extract-zip": "1.6.6",
"kew": "0.7.0",
"mkdirp": "0.5.1",
"request": "2.85.0"
"request": "2.87.0"
}
},
"ci-info": {
......@@ -2378,8 +2361,7 @@
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
},
"coa": {
"version": "1.0.4",
......@@ -2484,7 +2466,6 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"dev": true,
"requires": {
"delayed-stream": "1.0.0"
}
......@@ -2780,8 +2761,7 @@
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cosmiconfig": {
"version": "2.2.2",
......@@ -2868,26 +2848,6 @@
"which": "1.3.0"
}
},
"cryptiles": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
"integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
"dev": true,
"requires": {
"boom": "5.2.0"
},
"dependencies": {
"boom": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
"dev": true,
"requires": {
"hoek": "4.2.1"
}
}
}
},
"crypto-browserify": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
......@@ -3276,7 +3236,6 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"dev": true,
"requires": {
"assert-plus": "1.0.0"
}
......@@ -3470,8 +3429,7 @@
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"depd": {
"version": "1.1.1",
......@@ -3722,7 +3680,6 @@
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
"dev": true,
"optional": true,
"requires": {
"jsbn": "0.1.1"
......@@ -4892,20 +4849,17 @@
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
"dev": true
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
"dev": true
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-levenshtein": {
"version": "2.0.6",
......@@ -5218,14 +5172,12 @@
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
"dev": true,
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.6",
......@@ -5955,7 +5907,6 @@
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"dev": true,
"requires": {
"assert-plus": "1.0.0"
}
......@@ -6160,14 +6111,12 @@
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"dev": true
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"dev": true,
"requires": {
"ajv": "5.5.2",
"har-schema": "2.0.0"
......@@ -6274,18 +6223,6 @@
"minimalistic-assert": "1.0.1"
}
},
"hawk": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
"integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
"dev": true,
"requires": {
"boom": "4.3.1",
"cryptiles": "3.1.2",
"hoek": "4.2.1",
"sntp": "2.1.0"
}
},
"hbs": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/hbs/-/hbs-4.0.1.tgz",
......@@ -6405,12 +6342,6 @@
"minimalistic-crypto-utils": "1.0.1"
}
},
"hoek": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
"integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
"dev": true
},
"home-or-tmp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
......@@ -6742,11 +6673,10 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"requires": {
"assert-plus": "1.0.0",
"jsprim": "1.4.1",
"sshpk": "1.14.1"
"sshpk": "1.14.2"
}
},
"https-browserify": {
......@@ -7275,8 +7205,7 @@
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-utf8": {
"version": "0.2.1",
......@@ -7323,8 +7252,7 @@
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"istanbul-api": {
"version": "1.3.1",
......@@ -8287,7 +8215,6 @@
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true,
"optional": true
},
"jsdom": {
......@@ -8310,7 +8237,7 @@
"nwmatcher": "1.4.4",
"parse5": "4.0.0",
"pn": "1.1.0",
"request": "2.85.0",
"request": "2.87.0",
"request-promise-native": "1.0.5",
"sax": "1.2.4",
"symbol-tree": "3.2.2",
......@@ -8339,14 +8266,12 @@
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"dev": true
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
},
"json-stable-stringify": {
"version": "1.0.1",
......@@ -8366,8 +8291,7 @@
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"json3": {
"version": "3.3.2",
......@@ -8391,7 +8315,6 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"dev": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
......@@ -9215,24 +9138,25 @@
"resolved": "https://registry.npmjs.org/mongo/-/mongo-0.1.0.tgz",
"integrity": "sha1-yK8PjfmNSJS3crNzQph8O+zzcYw=",
"requires": {
"mongodb": "3.0.7"
"mongodb": "3.1.0"
}
},
"mongodb": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.0.7.tgz",
"integrity": "sha512-n/14kMJEoARXz1qhpNPhUocqy+z5130jhqgEIX1Tsl8UVpHrndQ8et+VmgC4yPK/I8Tcgc93JEMQCHTekBUnNA==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.0.tgz",
"integrity": "sha512-fSDZRq9FomRqeDSM7MpMTLa8sz+STs3nZ7Ib0+xvmaKZ6nquNDN4zGDsVhjto6UozFvHMDYJMAfJwhqUygXs9g==",
"requires": {
"mongodb-core": "3.0.7"
"mongodb-core": "3.1.0"
}
},
"mongodb-core": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.0.7.tgz",
"integrity": "sha512-z6YufO7s40wLiv2ssFshqoLS4+Kf+huhHq6KZ7gDArsKNzXYjAwTMnhEIJ9GQ8fIfBGs5tBLNPfbIDoCKGPmOw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.0.tgz",
"integrity": "sha512-qRjG62Fu//CZhkgn0jA/k8jh5MhACIq8cOJUryH6sck87pgt+C222MSD02tsCq5zNo/B6ZFHtNodZ2qpf8E86g==",
"requires": {
"bson": "1.0.6",
"require_optional": "1.0.1"
"bson": "1.0.9",
"require_optional": "1.0.1",
"saslprep": "1.0.1"
}
},
"move-concurrently": {
......@@ -9572,8 +9496,7 @@
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
"dev": true
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
},
"object-assign": {
"version": "4.1.1",
......@@ -10092,8 +10015,7 @@
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pify": {
"version": "2.3.0",
......@@ -12506,8 +12428,7 @@
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
"q": {
"version": "1.5.1",
......@@ -12918,10 +12839,9 @@
}
},
"request": {
"version": "2.85.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz",
"integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==",
"dev": true,
"version": "2.87.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz",
"integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
"requires": {
"aws-sign2": "0.7.0",
"aws4": "1.7.0",
......@@ -12931,7 +12851,6 @@
"forever-agent": "0.6.1",
"form-data": "2.3.2",
"har-validator": "5.0.3",
"hawk": "6.0.2",
"http-signature": "1.2.0",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
......@@ -12941,7 +12860,6 @@
"performance-now": "2.1.0",
"qs": "6.5.1",
"safe-buffer": "5.1.2",
"stringstream": "0.0.5",
"tough-cookie": "2.3.4",
"tunnel-agent": "0.6.0",
"uuid": "3.2.1"
......@@ -13166,8 +13084,7 @@
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sane": {
"version": "2.5.0",
......@@ -13193,6 +13110,12 @@
}
}
},
"saslprep": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.1.tgz",
"integrity": "sha512-ntN6SbE3hRqd45PKKadRPgA+xHPWg5lPSj2JWJdJvjTwXDDfkPVtXWvP8jJojvnm+rAsZ2b299C5NwZqq818EA==",
"optional": true
},
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
......@@ -13589,15 +13512,6 @@
}
}
},
"sntp": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
"integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
"dev": true,
"requires": {
"hoek": "4.2.1"
}
},
"socket.io": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.0.tgz",
......@@ -13888,18 +13802,18 @@
}
},
"sshpk": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz",
"integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=",
"dev": true,
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
"integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.1",
"bcrypt-pbkdf": "1.0.2",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jsbn": "0.1.1",
"safer-buffer": "2.1.2",
"tweetnacl": "0.14.5"
}
},
......@@ -14064,12 +13978,6 @@
"safe-buffer": "5.1.2"
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
"dev": true
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
......@@ -14342,7 +14250,6 @@
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
"dev": true,
"requires": {
"punycode": "1.4.1"
}
......@@ -14417,7 +14324,6 @@
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
......@@ -14426,7 +14332,6 @@
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true,
"optional": true
},
"type-check": {
......@@ -14812,8 +14717,7 @@
"uuid": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
"dev": true
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
},
"validate-npm-package-license": {
"version": "3.0.3",
......@@ -14840,7 +14744,6 @@
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"dev": true,
"requires": {
"assert-plus": "1.0.0",
"core-util-is": "1.0.2",
......
......@@ -26,9 +26,11 @@
"http": "0.0.0",
"moment": "^2.22.1",
"mongo": "^0.1.0",
"mongodb": "^3.1.0",
"node-xlsx": "^0.12.1",
"path": "^0.12.7",
"qs": "^6.5.1",
"request": "^2.87.0",
"server": "^1.0.18",
"vue": "^2.5.16",
"vue-router": "^3.0.1",
......
<template>
<el-date-picker
class="Date"
v-model="valueRange"
type="daterange"
unlink-panelss
@change="callback"
@change="timeChange"
range-separator="至"
:start-placeholder="startTime"
:end-placeholder="endTime"
......@@ -11,7 +12,7 @@
format='yyyy-MM-dd'
:picker-options="pickerOptions"
>
</el-date-picker>
</el-date-picker>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
......@@ -68,13 +69,17 @@ export default {
},
computed() {},
methods: {
callback() {
console.log('to')
timeChange() {
console.log(1)
console.log(this.valueRange)
this.$emit('timeChange', this.valueRange);
}
}
};
</script>
<style scpoed>
<style>
.Date {
display: inline-block;
vertical-align: top;
}
</style>
......@@ -37,7 +37,7 @@
:data="datas"
border
style="width: 100%">
<el-table-column label='序号' type='index' width=50></el-table-column>
<el-table-column label='序号' type='index' width=50 style="text-align:center"></el-table-column>
<el-table-column label='任务名称' prop='name'></el-table-column>
<el-table-column label='公司名称' prop='companyName'></el-table-column>
<el-table-column label='代理商' prop='agent'></el-table-column>
......@@ -92,6 +92,11 @@
<el-button type='text' @click='reset(scope.row)' icon='el-icon-refresh'></el-button>
</template>
</el-table-column>
<el-table-column label='确认录入' width=180>
<template slot-scope="scope">
<el-button type='text' size='mini' @click='updateStatus(scope.row)'>确认录入</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
......@@ -176,6 +181,48 @@
<el-button type="primary" @click="suerSend(1)">确 定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync='statusDialog' center title="订单录入状态" style="width: 80%">
<el-card shadow="always" class="card">
<p>账单检查</p>
<p>执行结果: {{entryData.billCheck}}</p>
<p>执行时间: {{entryData.billCheckTime}}</p>
</el-card>
<el-card shadow="always" class="card">
<p>文件检查</p>
<p>执行结果: {{entryData.fileCheck}}</p>
<p>执行时间: {{entryData.fileCheckTime}}</p>
</el-card>
<el-card shadow="always" class="card">
<p>数量检查</p>
<p>执行结果: {{entryData.countCheck}}</p>
<p>执行时间: {{entryData.countCheckTime}}</p>
<p>当前数量: {{entryData.countCheckNow}}</p>
<p>期待数量: {{entryData.countCheckExpect}}</p>
</el-card>
<el-card shadow="always" class="card">
<p>标签检查</p>
<p>执行结果: {{entryData.tagCheck}}</p>
<p>执行时间: {{entryData.tagCheckTime}}</p>
<p>缺失数量: {{entryData.tagCheckLose}}</p>
<p>全部数量: {{entryData.tagCheckTotal}}</p>
</el-card>
<el-card shadow="always" class="card">
<p>随机拨打</p>
<p>执行结果: {{entryData.randomCall}}</p>
<p>执行时间: {{entryData.randomTime}}</p>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button @click="closeEntry">取 消</el-button>
<el-button type="primary" @click="fileReaderDsp" :disabled="entryBtn">确 定</el-button>
</span>
</el-dialog>
</el-main>
</el-container>
</template>
......@@ -183,6 +230,7 @@
<script>
import { mapGetters } from 'vuex'
import moment from 'moment'
import axios from 'axios'
export default {
name: 'checkCall',
data () {
......@@ -249,7 +297,27 @@
}
}]
},
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":"云服务 "}
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":"云服务 "},
statusDialog: false,
statusFile: {},
entryBillID: null,
entryBtn: false,
entryData: {
billCheck: null,
billCheckTime: null,
fileCheck: null,
fileCheckTime: null,
countCheck: null,
countCheckTime: null,
countCheckNow: null,
countCheckExpect: null,
tagCheck: null,
tagCheckTime: null,
tagCheckLose: null,
tagCheckTotal: null,
randomCall: null,
randomTime: null
}
}
},
mounted () {
......@@ -355,24 +423,6 @@
}
this.change('POST', this.valueRange[0], this.valueRange[1], this.total, this.pageSize, this.currentPage, self.chooseId)
},
// down () {
// let self = this
// let list = []
// let tHeader = ['序号', '任务名称', '公司名称', '时间', '基础标签', '筛选标签', '预计筛选用户', '实际筛选用户', '状态']
// list.push(tHeader)
// self.datas.forEach(x => {
// let n = 1
// console.log(self.datas)
// let item = '标签:'
// x.popover.hobbylist.forEach(y => {
// item += self.mapHobby[y] + '(' + y + ')'
// })
// item = item + ' | 关键词:' + x.popover.interestlist + ' | 搜索引擎:' + x.popover.hostlist
// list.push([n, x.name, x.companyName, x.time, '年龄:' + x.popover.agelist + ' | 性别:' + x.popover.sexlist + ' | 地域:' + x.popover.citylist + ' | 业务类型:' + x.popover.businesstypelist + ' | 操作系统:' + x.popover.opsystemlist + ' | 月出帐:' + x.popover.consumelist + ' | 平均流量:' + x.popover.flowlist + ' | 终端品牌:' + x.popover.phonelist, item, x.preNum, x.sendNum, x.status])
// n += 1
// })
// json2xlsx.default(list, {sheetName: '数据详情', filename: '数据下载.xlsx'})
// },
getTime () {
this.endTime = moment().format('YYYY-MM-DD')
this.startTime = moment().subtract(7, 'days').format('YYYY-MM-DD')
......@@ -459,6 +509,106 @@
}).catch(err => {
console.log(err)
})
},
updateStatus (row) {
let billID = row.name
fetch('/api/entry', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({billID: billID})
}).then(res => {
return res.json()
}).then(data => {
console.dir(data)
this.entryBillID = billID
if (data.status === 200) {
this.formatEntry(data.datas)
} else {
this.$alert(data.message, '无法录入', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'error',
message: '无法录入'
});
}
});
}
}).catch(err => {
console.log(err)
})
},
formatEntry (datas) {
let self = this
if (datas) {
self.entryData.billCheck = datas.billCheck.result
self.entryData.billCheckTime = moment(datas.billCheck.at).format('YYYY-MM-DD HH:mm:SS')
self.entryData.fileCheck = datas.fileCheck.result
self.entryData.fileCheckTime = moment(datas.fileCheck.at).format('YYYY-MM-DD HH:mm:SS')
self.entryData.countCheck = datas.countCheck.result
self.entryData.countCheckTime = moment(datas.countCheck.at).format('YYYY-MM-DD HH:mm:SS')
self.entryData.countCheckNow = datas.countCheck.now
self.entryData.countCheckExpect = datas.countCheck.expect
self.entryData.tagCheck = datas.tagCheck.result
self.entryData.tagCheckTime = moment(datas.tagCheck.at).format('YYYY-MM-DD HH:mm:SS')
self.entryData.tagCheckLose = datas.tagCheck.lose
self.entryData.tagCheckTotal = datas.tagCheck.total
self.entryData.randomCall = datas.randomCall.result
self.entryData.randomTime = moment(datas.randomCall.at).format('YYYY-MM-DD HH:mm:SS')
self.statusDialog = true
} else {
self.statusDialog = true
self.entryBtn = true
}
},
closeEntry () {
this.entryBillID = null
this.statusDialog = false
},
fileReaderDsp () {
let self = this
let billID = this.entryBillID
fetch('/api/entryIn', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({billID: billID})
}).then(res => {
return res.json()
}).then(data => {
if (data.status === 200) {
if (data.datas.ok === 1) {
this.message({
type: 'success',
message: '录入成功'
})
self.billID = null
self.statusDialog = false
} else {
this.$alert(data.datas.err, '录入失败', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'error',
message: '录入失败'
});
}
});
}
}
if (data.status === 204) {
this.$alert(data.message, '录入失败', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'error',
message: '录入失败'
});
}
});
}
})
}
}
}
......@@ -480,4 +630,12 @@
margin-left: 10px;
vertical-align: bottom;
}
.card {
margin-bottom: 8px
}
.card p:first-child {
font-size: 14px;
font-weight: 800;
text-align: center
}
</style>
<template>
<el-main>
<h4>url审核</h4>
<el-row>
<DatePicker :startTime='startTime' :endTime='endTime' :change='timeChange'></DatePicker>
<Drop :dropChange='dropChange' :chooseArray='chooseArray'></Drop>
</el-row>
<el-table :data="datas" border style="width:100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column v-for="(value, key) in tables" :label="value" :prop="key"></el-table-column>
<el-table-column>
<template slot-scope="scope">
<el-button type="text" :disabled="disabled">通过</el-button>
<el-button type="text">拒绝</el-button>
</template>
</el-table-column>
</el-table>
<Pagination :currentPage='currentPage' :pageSize='pageSize' :total='total' :sizeChange='sizeChange' :currentChange='currentChange'></Pagination>
</el-main>
<el-container>
<el-header>
<h4>url审核</h4>
</el-header>
<el-main>
<el-row type="flex" justify="space-between" style="margin-bottom: 10px">
<el-col :span="8">
<DatePicker :startTime='startTime' :endTime='endTime' @timeChange='timeChange'></DatePicker>
</el-col>
<el-col :span="4"><Drop @dropChange='dropChange' :chooseArray='chooseArray'></Drop></el-col>
</el-row>
<el-table :data="datas" border style="width:100%">
<el-table-column label="序号" type="index" style='width: 60px'></el-table-column>
<el-table-column v-for="(value, key) in tables" :label="value" :prop="key"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size='mini' type="text" :disabled="scope.row.status !== '未审核'" @click="check(scope, 2)">通过</el-button>
<el-button size='mini' type="text" :disabled="scope.row.status !== '未审核'" @click="check(scope, 1)">拒绝</el-button>
<el-button type='text' @click='check(scope, 8)' icon='el-icon-refresh'></el-button>
</template>
</el-table-column>
</el-table>
<Pagination :currentPage='currentPage' :pageSize='pageSize' :total='total' @sizeChange='sizeChange' @currentChange='currentChange'></Pagination>
</el-main>
</el-container>
</template>
<script>
import DatePicker from './DatePicker'
import Pagination from './Pagination'
import Drop from './dropDown'
import moment from 'moment'
import { mapActions, mapGetters } from 'vuex'
export default {
name: 'checkUrl',
......@@ -32,7 +40,7 @@ export default {
},
data () {
return {
url: '/api/checkUrl',
url: '/api/getUrlData',
tables: {
slotId: 'ID',
email: '账户名称',
......@@ -43,10 +51,10 @@ export default {
status: 'Url状态'
},
chooseArray: {
all: '全部状态',
zero: '未审核',
one: '已拒绝',
two: '已通过'
'全部状态': '全部状态',
'未审核': '未审核',
'已拒绝': '已拒绝',
'已通过': '已通过'
},
datas: null,
currentPage: 1,
......@@ -54,17 +62,57 @@ export default {
total: 1000,
startTime: null,
endTime: null,
status: null
status: '未审核'
}
},
mounted () {
this.getTime()
this.getData({
url: this.url,
choose: {
startTime: this.startTime,
endTime: this.endTime,
pageSize: this.pageSize,
currentPage: this.currentPage,
status: this.status
},
callback: this.formatData
})
},
methods: {
...mapActions({
getData: 'GET_DATA',
send: 'SEND'
}),
check (scope, status){
this.send({
url: '/api/checkUrl',
choose: {
slotId: scope.row.slotId,
status: status
},
callback: (err, data) => {
if (data.status === 700) {
this.$message({
message: data.message,
type: 'error'
})
}
if (data.status === 200) {
switch(status) {
case 1: scope.row.status = '已拒绝'; break;
case 2: scope.row.status = '已通过'; break;
case 8: scope.row.status = '未审核'; break;
default: scope.row.status = '未审核';
}
this.$message({
message: data.message,
type: 'success'
})
}
}
})
},
getTime () {
this.endTime = moment().format('YYYY-MM-DD')
this.startTime = moment().subtract(7, 'days').format('YYYY-MM-DD')
......@@ -72,16 +120,50 @@ export default {
sizechange (value) {
console.log(value)
this.pageSize = value
this.getData({
url: this.url,
choose: {
startTime: this.startTime,
endTime: this.endTime,
pageSize: this.pageSize,
currentPage: this.currentPage,
status: this.status
},
callback: this.formatData
})
},
currentPage (value) {
console.log(value)
this.currentPage = value
this.getData({
url: this.url,
choose: {
startTime: this.startTime,
endTime: this.endTime,
pageSize: this.pageSize,
currentPage: this.currentPage,
status: this.status
},
callback: this.formatData
})
},
dropChange (value) {
console.log(value)
this.status = value
this.getData({
url: this.url,
choose: {
startTime: this.startTime,
endTime: this.endTime,
pageSize: this.pageSize,
currentPage: this.currentPage,
status: this.status
},
callback: this.formatData
})
},
timeChange (value) {
console.log(2)
console.log(value)
this.startTime = value[0]
this.endTime = value[1]
......@@ -92,7 +174,6 @@ export default {
endTime: this.endTime,
pageSize: this.pageSize,
currentPage: this.currentPage,
total: this.total,
status: this.status
},
callback: this.formatData
......@@ -102,8 +183,11 @@ export default {
if (err) {
return console.log(err)
}
console.log(data)
this.datas = data.datas
this.totat = data.total
if (data.total <= 1000) {
this.total = data.total
}
}
}
}
......
<template>
<el-main>
<el-dropdown style='float: right' @command='handleCommand'>
<el-button class="el-dropdown-link">
{{choose}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(value, key) in chooseArray" :command='key'>{{value}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-main>
<el-dropdown style='float: right' @command='handleCommand'>
<el-button class="el-dropdown-link">
{{choose}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(value, key) in chooseArray" :command='key'>{{value}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<script>
......
......@@ -80,6 +80,9 @@
<el-menu-item index='/checkNote' @click="routeTo">
短信审核
</el-menu-item>
<el-menu-item index='/checkUrl' @click="routeTo">
Url审核
</el-menu-item>
</el-submenu>
<el-submenu index=5>
......
......@@ -55,26 +55,9 @@ const actions = {
return res.json()
}).then(data => {
console.log(data)
if (data.status === 0) {
this.$message({
message: data.message,
type: 'error'
})
}
if (data.status === 1) {
this.$message({
message: data.message,
type: 'success'
})
}
callback(null, data)
}).catch(err => {
this.message({
message: err,
type: 'error'
})
console.log(err)
callback(err, null)
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment