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 ...@@ -15,9 +15,13 @@ RUN npm i --only=production --registry https://registry.npm.taobao.org
ENV SERVICE_PORT=8082 ENV SERVICE_PORT=8082
ENV PROJECT_LEVEL=production 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-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='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_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' ENV NODE_ENV='production'
EXPOSE 8082 EXPOSE 8082
CMD node server.js CMD node server.js
This diff is collapsed.
...@@ -10,7 +10,9 @@ module.exports = { ...@@ -10,7 +10,9 @@ module.exports = {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: {}, proxyTable: {
},
// Various Dev Server settings // Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST host: 'localhost', // can be overwritten by process.env.HOST
...@@ -51,7 +53,7 @@ module.exports = { ...@@ -51,7 +53,7 @@ module.exports = {
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
/** /**
* Source Maps * Source Maps
*/ */
......
This diff is collapsed.
...@@ -26,9 +26,11 @@ ...@@ -26,9 +26,11 @@
"http": "0.0.0", "http": "0.0.0",
"moment": "^2.22.1", "moment": "^2.22.1",
"mongo": "^0.1.0", "mongo": "^0.1.0",
"mongodb": "^3.1.0",
"node-xlsx": "^0.12.1", "node-xlsx": "^0.12.1",
"path": "^0.12.7", "path": "^0.12.7",
"qs": "^6.5.1", "qs": "^6.5.1",
"request": "^2.87.0",
"server": "^1.0.18", "server": "^1.0.18",
"vue": "^2.5.16", "vue": "^2.5.16",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
......
<template> <template>
<el-date-picker <el-date-picker
class="Date"
v-model="valueRange" v-model="valueRange"
type="daterange" type="daterange"
unlink-panelss unlink-panelss
@change="callback" @change="timeChange"
range-separator="至" range-separator="至"
:start-placeholder="startTime" :start-placeholder="startTime"
:end-placeholder="endTime" :end-placeholder="endTime"
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
format='yyyy-MM-dd' format='yyyy-MM-dd'
:picker-options="pickerOptions" :picker-options="pickerOptions"
> >
</el-date-picker> </el-date-picker>
</template> </template>
<script> <script>
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
...@@ -68,13 +69,17 @@ export default { ...@@ -68,13 +69,17 @@ export default {
}, },
computed() {}, computed() {},
methods: { methods: {
callback() { timeChange() {
console.log('to') console.log(1)
console.log(this.valueRange)
this.$emit('timeChange', this.valueRange); this.$emit('timeChange', this.valueRange);
} }
} }
}; };
</script> </script>
<style scpoed> <style>
.Date {
display: inline-block;
vertical-align: top;
}
</style> </style>
This diff is collapsed.
<template> <template>
<el-main> <el-container>
<h4>url审核</h4> <el-header>
<el-row> <h4>url审核</h4>
<DatePicker :startTime='startTime' :endTime='endTime' :change='timeChange'></DatePicker> </el-header>
<Drop :dropChange='dropChange' :chooseArray='chooseArray'></Drop> <el-main>
</el-row> <el-row type="flex" justify="space-between" style="margin-bottom: 10px">
<el-table :data="datas" border style="width:100%"> <el-col :span="8">
<el-table-column label="序号" type="index"></el-table-column> <DatePicker :startTime='startTime' :endTime='endTime' @timeChange='timeChange'></DatePicker>
<el-table-column v-for="(value, key) in tables" :label="value" :prop="key"></el-table-column> </el-col>
<el-table-column> <el-col :span="4"><Drop @dropChange='dropChange' :chooseArray='chooseArray'></Drop></el-col>
<template slot-scope="scope"> </el-row>
<el-button type="text" :disabled="disabled">通过</el-button> <el-table :data="datas" border style="width:100%">
<el-button type="text">拒绝</el-button> <el-table-column label="序号" type="index" style='width: 60px'></el-table-column>
</template> <el-table-column v-for="(value, key) in tables" :label="value" :prop="key"></el-table-column>
</el-table-column> <el-table-column label="操作">
</el-table> <template slot-scope="scope">
<Pagination :currentPage='currentPage' :pageSize='pageSize' :total='total' :sizeChange='sizeChange' :currentChange='currentChange'></Pagination> <el-button size='mini' type="text" :disabled="scope.row.status !== '未审核'" @click="check(scope, 2)">通过</el-button>
</el-main> <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> </template>
<script> <script>
import DatePicker from './DatePicker' import DatePicker from './DatePicker'
import Pagination from './Pagination' import Pagination from './Pagination'
import Drop from './dropDown' import Drop from './dropDown'
import moment from 'moment'
import { mapActions, mapGetters } from 'vuex' import { mapActions, mapGetters } from 'vuex'
export default { export default {
name: 'checkUrl', name: 'checkUrl',
...@@ -32,7 +40,7 @@ export default { ...@@ -32,7 +40,7 @@ export default {
}, },
data () { data () {
return { return {
url: '/api/checkUrl', url: '/api/getUrlData',
tables: { tables: {
slotId: 'ID', slotId: 'ID',
email: '账户名称', email: '账户名称',
...@@ -43,10 +51,10 @@ export default { ...@@ -43,10 +51,10 @@ export default {
status: 'Url状态' status: 'Url状态'
}, },
chooseArray: { chooseArray: {
all: '全部状态', '全部状态': '全部状态',
zero: '未审核', '未审核': '未审核',
one: '已拒绝', '已拒绝': '已拒绝',
two: '已通过' '已通过': '已通过'
}, },
datas: null, datas: null,
currentPage: 1, currentPage: 1,
...@@ -54,17 +62,57 @@ export default { ...@@ -54,17 +62,57 @@ export default {
total: 1000, total: 1000,
startTime: null, startTime: null,
endTime: null, endTime: null,
status: null status: '未审核'
} }
}, },
mounted () { mounted () {
this.getTime() 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: { methods: {
...mapActions({ ...mapActions({
getData: 'GET_DATA', getData: 'GET_DATA',
send: 'SEND' 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 () { getTime () {
this.endTime = moment().format('YYYY-MM-DD') this.endTime = moment().format('YYYY-MM-DD')
this.startTime = moment().subtract(7, 'days').format('YYYY-MM-DD') this.startTime = moment().subtract(7, 'days').format('YYYY-MM-DD')
...@@ -72,16 +120,50 @@ export default { ...@@ -72,16 +120,50 @@ export default {
sizechange (value) { sizechange (value) {
console.log(value) console.log(value)
this.pageSize = 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) { currentPage (value) {
console.log(value) console.log(value)
this.currentPage = 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) { dropChange (value) {
console.log(value) console.log(value)
this.status = 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) { timeChange (value) {
console.log(2)
console.log(value) console.log(value)
this.startTime = value[0] this.startTime = value[0]
this.endTime = value[1] this.endTime = value[1]
...@@ -92,7 +174,6 @@ export default { ...@@ -92,7 +174,6 @@ export default {
endTime: this.endTime, endTime: this.endTime,
pageSize: this.pageSize, pageSize: this.pageSize,
currentPage: this.currentPage, currentPage: this.currentPage,
total: this.total,
status: this.status status: this.status
}, },
callback: this.formatData callback: this.formatData
...@@ -102,8 +183,11 @@ export default { ...@@ -102,8 +183,11 @@ export default {
if (err) { if (err) {
return console.log(err) return console.log(err)
} }
console.log(data)
this.datas = data.datas this.datas = data.datas
this.totat = data.total if (data.total <= 1000) {
this.total = data.total
}
} }
} }
} }
......
<template> <template>
<el-main> <el-dropdown style='float: right' @command='handleCommand'>
<el-dropdown style='float: right' @command='handleCommand'> <el-button class="el-dropdown-link">
<el-button class="el-dropdown-link"> {{choose}}<i class="el-icon-arrow-down el-icon--right"></i>
{{choose}}<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
</el-button> <el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown"> <el-dropdown-item v-for="(value, key) in chooseArray" :command='key'>{{value}}</el-dropdown-item>
<el-dropdown-item v-for="(value, key) in chooseArray" :command='key'>{{value}}</el-dropdown-item> </el-dropdown-menu>
</el-dropdown-menu> </el-dropdown>
</el-dropdown>
</el-main>
</template> </template>
<script> <script>
......
...@@ -80,6 +80,9 @@ ...@@ -80,6 +80,9 @@
<el-menu-item index='/checkNote' @click="routeTo"> <el-menu-item index='/checkNote' @click="routeTo">
短信审核 短信审核
</el-menu-item> </el-menu-item>
<el-menu-item index='/checkUrl' @click="routeTo">
Url审核
</el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index=5> <el-submenu index=5>
......
...@@ -55,26 +55,9 @@ const actions = { ...@@ -55,26 +55,9 @@ const actions = {
return res.json() return res.json()
}).then(data => { }).then(data => {
console.log(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) callback(null, data)
}).catch(err => { }).catch(err => {
this.message({ console.log(err)
message: err,
type: 'error'
})
callback(err, null) 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