Commit 9acd2cc4 authored by yaobeibei's avatar yaobeibei

merge master_oem

parents 46aae887 df4a32fe
File added
......@@ -15,8 +15,8 @@ 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-1.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_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 NODE_ENV='production'
EXPOSE 8082
......
This diff is collapsed.
File added
var xlsx = require('node-xlsx');
//读取文件内容
let onelevel = {}
let twolevel = {}
let twoOK = {}
function getXlsx () {
var obj = xlsx.parse(__dirname+'/hangye.xlsx');
var excelObj=obj[0].data;
var data = [];
for(var i in excelObj){
var arr=[];
var value=excelObj[i];
var obj = {}
for(var j in value){
if (value[j]) {
data.push(value[j]);
}
}
}
for (var x = 4; x < data.length; x++) {
if (x % 2 === 0) {
if (data[x] < 30) {
onelevel[data[x]] = data[x + 1]
} else {
twolevel[data[x]] = data[x + 1]
}
}
}
}
getXlsx()
function test (x, arr) {
let t = x
let tes = new RegExp('^' + t, 'i')
console.log(tes)
for (let i in arr) {
if (tes.test(i)) {
if (i.length === t.length + 2) {
twoOK[i] = arr[i]
}
}
}
console.log(twoOK)
}
test('21', twolevel)
#!/usr/bin/env bash
eval "npm run build"
echo -e '\033[44;39m npm build over \033[0m'
eval 'docker build -t reg.yunpro.cn/remarketing/yunying:latest .'
echo -e '\033[44;39m docker build over \033[0m'
eval 'docker push reg.yunpro.cn/remarketing/yunying:latest'
echo -e '\033[44;38m push over \033[0m'
\ No newline at end of file
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>list</title>
<title>再营销运营审核平台</title>
</head>
<body>
<div id="app"></div>
......
......@@ -9464,6 +9464,22 @@
"which": "1.3.0"
}
},
"node-xlsx": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/node-xlsx/-/node-xlsx-0.12.1.tgz",
"integrity": "sha512-PMIv0Gs05zb+7ZUQIMA5Fw8eFHxT8fVieKUKMUXI5EBuCsZ56bYKeaMaBf7pBAH3cw8Xa+dGK/xaLWZaEuyfiw==",
"requires": {
"buffer-from": "1.1.0",
"xlsx": "0.12.11"
},
"dependencies": {
"buffer-from": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",
"integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ=="
}
}
},
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
......
......@@ -21,17 +21,18 @@
"cookie-parser": "^1.4.3",
"element-ui": "^2.3.6",
"express": "^4.16.3",
"file-saver": "^1.3.8",
"fs": "0.0.1-security",
"http": "0.0.0",
"moment": "^2.22.1",
"mongo": "^0.1.0",
"node-xlsx": "^0.12.1",
"path": "^0.12.7",
"qs": "^6.5.1",
"server": "^1.0.18",
"vue": "^2.5.16",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"file-saver": "^1.3.8",
"xlsx": "^0.12.10"
},
"devDependencies": {
......
<template>
<el-container>
<el-main>
<div style='width: 50%;'>
<p style='margin: 5px 0'>邮箱:</p>
<el-input
placeholder="请输入邮箱名"
suffix-icon="el-icon-date"
v-model="OEM_email"
style='margin: 10px 0'
>
</el-input>
<p style='margin: 5px 0'>用户名:</p>
<el-input
placeholder="请输入用户名"
suffix-icon="el-icon-date"
v-model="OEM_account"
style='margin: 10px 0'
>
</el-input>
<p style='margin: 5px 0'>密码:</p>
<el-input
placeholder="请输入密码"
style='margin: 10px 0'
type='password'
prefix-icon="el-icon-search"
v-model="OEM_password">
</el-input>
<p style='margin: 5px 0'>重复密码:</p>
<el-input
placeholder="请输入再次密码"
style='margin: 10px 0'
type='password'
prefix-icon="el-icon-search"
v-model="OEM_password2">
</el-input>
<p style='margin: 5px 0'>公司名:</p>
<el-input
placeholder="请输入公司名"
style='margin: 10px 0'
prefix-icon="el-icon-search"
v-model="OEM_company">
</el-input>
</div>
<el-button type='primary' @click='creatOEM'>确定</el-button>
</el-main>
</el-container>
</template>
<script>
export default {
name: 'OEM',
data () {
return {
OEM_email: null,
OEM_account: null,
OEM_password: null,
OEM_password2: null,
OEM_company: null
}
},
methods: {
creatOEM () {
let self = this
let OEM_email = self.OEM_email
let OEM_account = self.OEM_account
let OEM_password = self.OEM_password
let OEM_company = self.OEM_company
if (self.OEM_password !== self.OEM_password2) {
this.$message.error('请确认两次密码输入相同')
} else {
fetch('/api/creatOEM', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({OEM_email, OEM_account, OEM_password, OEM_company})
}).then(res => { return res.json() }).then(data => {
console.log(data)
self.OEM_account = null
self.OEM_password = null
self.OEM_password2 = null
self.OEM_company = null
self.OEM_email = null
if (data.status === 200) {
this.$message({
message: 'OEM运营账号创建成功',
type: 'success'
})
}
})
}
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -24,6 +24,11 @@
<el-table-column label='公司名称' prop='company'></el-table-column>
<el-table-column label='账户名称' prop='email'></el-table-column>
<el-table-column label='电话' prop='phone'></el-table-column>
<el-table-column label="行业标签">
<template slot-scope='scope'>
<el-button type='text' @click='openForm(scope.row, scope.$index)' >公司标签</el-button>
</template>
</el-table-column>
<el-table-column label='自动备案'>
<template slot-scope='scope'>
<el-switch
......@@ -62,6 +67,28 @@
style="float: right;margin-top: 15px">
</el-pagination>
</el-main>
<el-dialog title='行业标签' :visible.sync='dialogVisiable' width=60%>
<el-select v-model="oneChoose" filterable clearable placeholder="请选择一级标签" @change='chooseOne'>
<el-option
v-for="(value, key) in onelevel"
:key="key"
:label="value"
:value="key">
</el-option>
</el-select>
<el-select v-model="twoChoose" filterable clearable placeholder="请选择二级标签">
<el-option
v-for="(value, key) in twoOK"
:key="key"
:label="value"
:value="key">
</el-option>
</el-select>
<div slot="footer" class="dialog-footer">
<el-button @click="closeFrom()">取 消</el-button>
<el-button type="primary" @click="makeAccountTag()">确 定</el-button>
</div>
</el-dialog>
</el-container>
</template>
......@@ -78,12 +105,21 @@
currentPage: 1,
pageSize: 10,
total: 100,
emailOptions: null
emailOptions: null,
dialogVisiable: false,
onelevel: {},
twolevel: {},
twoOK: {},
oneChoose: null,
twoChoose: null,
currentdata: null,
currentIndex: null
}
},
mounted () {
this.sessionID = sessionStorage.getItem('sessionID')
this.getData(this.currentPage, this.pageSize, this.inputValue)
this.getAccountTag()
},
computed: {
...mapGetters({
......@@ -91,6 +127,71 @@
})
},
methods: {
makeAccountTag () {
this.dialogVisiable = false
let onelevelTag = this.onelevel[this.oneChoose]
let twolevelTag = this.twolevel[this.twoChoose]
let currentdata = this.currentdata
let accountID = currentdata ? currentdata._id : row._id
console.log(onelevelTag, twolevelTag, accountID)
fetch('/api/makeAccountTag', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({accountID, onelevelTag, twolevelTag})
}).then(res => { return res.json() }).then(data => {
console.log(data)
})
},
chooseOne () {
let choose = this.oneChoose
this.fifterTag(choose, this.twolevel)
},
openForm (data, index) {
this.dialogVisiable = true
this.oneChoose = data.onelevelTag
this.twoChoose = data.twolevelTag
this.currentdata = data
this.currentIndex = index
},
closeFrom () {
this.dialogVisiable = false
this.onelvlist = []
this.twolvlist = []
},
fifterTag (x, arr) {
let self = this
let t = x
let dataArr = {}
let tes = new RegExp('^' + t, 'i')
console.log(tes)
for (let i in arr) {
if (tes.test(i)) {
if (i.length === t.length + 2) {
console.log(arr[i])
dataArr[i] = arr[i]
}
}
}
console.log(dataArr)
this.twoOK = dataArr
},
getAccountTag (choose) {
console.log('tag')
let self = this
let oneChoose = choose
this.dialogVisiable = false
fetch('/api/getTag', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify()
}).then(res => {
return res.json()
}).then(data => {
console.log(data)
self.onelevel = data.onelevel
self.twolevel = data.twolevel
})
},
AutoChange (row) {
console.log(row.isCloseAuto)
console.log(row)
......@@ -129,6 +230,9 @@
self.total = data.dataTotal
self.emailOptions = data.emailArr
})
},
getTag() {
},
handleSizeChange (val) {
this.pageSize = val
......@@ -189,5 +293,20 @@
</script>
<style scoped>
.el-tag + .el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
</style>
<template>
<el-container>
<el-main>
<h2>调试阶段,暂不可用</h2>
<el-card style='width: 40%;margin: 20px;font-size: 14px'>
<el-form :label-position="right" label-width="80px" :model="formLabelAlign">
<el-form-item label="邮箱">
<el-input v-model="formLabelAlign.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
<!-- <el-form-item label="用户名">
<el-input v-model="formLabelAlign.name" placeholder="请输入用户名"></el-input>
</el-form-item> -->
<el-form-item label="密码">
<el-input v-model="formLabelAlign.password" placeholder="请输入密码"></el-input>
</el-form-item>
<el-form-item label="确认密码">
<el-input v-model="formLabelAlign.passwword2" placeholder="请输入再次密码"></el-input>
</el-form-item>
<el-form-item label="公司名称">
<el-input v-model="formLabelAlign.company" placeholder="请输入公司名"></el-input>
</el-form-item>
<el-button type='primary' @click='creatAgent'>确定</el-button>
</el-form>
</el-card>
</el-main>
</el-container>
</template>
<script>
export default {
name: 'OEM',
data () {
return {
formLabelAlign: {
email: '',
password: '',
password2: '',
company: ''
}
}
},
methods: {
creatAgent () {
let self = this
let form = self.formLabelAlign
if (self.formLabelAlign.password !== self.formLabelAlign.password2) {
this.$message.error('请确认两次密码输入相同')
} else {
fetch('/api/creatAgent', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify(form)
}).then(res => { return res.json() }).then(data => {
console.log(data)
self.formLabelAlign.email = null
self.formLabelAlign.password = null
self.formLabelAlign.password2 = null
self.formLabelAlign.company = null
if (data.status === 200) {
this.$message({
message: '代理商运营账号创建成功',
type: 'success'
})
}
})
}
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -40,8 +40,10 @@
<el-table-column label='序号' type='index' width=50></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>
<el-table-column label='代理商账号' prop='agentEmail'></el-table-column>
<el-table-column label='时间' prop='time' ></el-table-column>
<el-table-column label='筛选标签' width=200>
<el-table-column label='筛选标签'>
<template slot-scope="scope">
<el-popover trigger="hover" placement="left">
<div>
......@@ -55,11 +57,15 @@
<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.phonelist'>{{item}}</span></p>
<p v-if="scope.row.popover.hobbylist">兴趣爱好: <span style='padding: 4px' v-for='item in scope.row.popover.hobbylist'>{{mapHobby[item]}}({{item}})</span></p>
<p v-if="scope.row.popover.interestlist">关键词: <span style='padding: 4px' v-for='item in scope.row.popover.interestlist'>{{item}}</span></p>
<p v-if="scope.row.popover.hostlist">域名: <span style='padding: 4px' v-for='item in scope.row.popover.hostlist'>{{item}}</span></p>
<p v-if="scope.row.popover.applist">APP: <span style='padding: 4px' v-for='item in scope.row.popover.applist'>{{item}}</span></p>
</div>
<div>
<!-- <div>
<h4>筛选条件:</h4>
<p><sapn>访问过以下标签:</sapn> <span style='padding: 4px' v-for='item in scope.row.popover.hobbylist'>{{mapHobby[item]}}({{item}}) |</span></p>
</div>
</div> -->
<span slot="reference">
查看详情
</span>
......@@ -67,6 +73,7 @@
</template>
</el-table-column>
<el-table-column label='预计筛选用户数' prop='preNum' width=130></el-table-column>
<el-table-column label='oem' prop='oem' width=130></el-table-column>
<el-table-column label='状态' prop='status' :filters="[{ text: '审核未通过', value: '审核未通过' }, { text: '审核通过', value: '审核通过'}]" :filter-method='filterTag' filter-placement="bottom-end"></el-table-column>
<el-table-column label='操作' width=180>
<template slot-scope="scope">
......@@ -96,7 +103,9 @@
:total="total"
style="float: right;margin-top: 15px">
</el-pagination>
<el-dialog title="请添加筛选条件" :visible.sync="dialogFormVisible">
<el-dialog :visible.sync="dialogFormVisible">
<p style="font-size: 16px;font-weight: 800">请添加筛选条件</p>
<p style='margin-left:10p'> 备注: {{meta}}</p>
<div>
<el-tag
:key="tag"
......@@ -140,6 +149,28 @@
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput2">添加新域名</el-button>
</div>
<br>
<div>
<el-tag
:key="tag"
v-for="tag in applist"
closable
:disable-transitions="false"
@close="handleClose3(tag)">
{{tag}}
</el-tag>
<el-input
class="input-new-tag"
v-if="inputVisible3"
v-model="inputValue3"
size="small"
ref="saveTagInput3"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput3">添 加 A P P</el-button>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeFrom()">取 消</el-button>
<el-button type="primary" @click="suerSend(1)">确 定</el-button>
......@@ -165,14 +196,18 @@
total: 0,
pageSize: 100,
currentPage: 1,
meta: '',
visible1: false,
visibleInput: false,
interestlist: [],
hostlist: [],
applist: [],
inputVisible: false,
inputVisible2: false,
inputVisible3: false,
inputValue: '',
inputValue2: '',
inputValue3: '',
dialogFormVisible: false,
valueRange: [],
startTime: '',
......@@ -232,16 +267,19 @@
methods: {
openForm (data, index) {
this.dialogFormVisible = true
console.log(data)
this.interestlist = data.popover.interestlist || []
this.hostlist = data.popover.hostlist || []
this.applist = data.popover.applist || []
this.meta = data.popover.meta || ''
this.currentdata = data
this.currentIndex = index
// scope.row.status = '审核通过'
// scope.row.disable = true
},
closeFrom () {
this.dialogFormVisible = false
this.interestlist = []
this.hostlist = []
this.applist = []
this.meta = ''
},
handleClose (tag) {
this.interestlist.splice(this.interestlist.indexOf(tag), 1)
......@@ -249,6 +287,9 @@
handleClose2 (tag) {
this.hostlist.splice(this.hostlist.indexOf(tag), 1)
},
handleClose3 (tag) {
this.hobbylist.splice(this.hobbylist.indexOf(tag), 1)
},
showInput () {
this.inputVisible = true
this.$nextTick(_ => {
......@@ -262,19 +303,32 @@
this.$refs.saveTagInput2.$refs.input.focus()
})
},
showInput3 () {
this.inputVisible3 = true
console.log(this.$refs)
this.$nextTick(_ => {
this.$refs.saveTagInput3.$refs.input.focus()
})
},
handleInputConfirm () {
let inputValue = this.inputValue
let inputValue2 = this.inputValue2
let inputValue3 = this.inputValue3
if (inputValue) {
this.interestlist.push(inputValue)
}
if (inputValue2) {
this.hostlist.push(inputValue2)
}
if (inputValue3) {
this.applist.push(inputValue3)
}
this.inputVisible = false
this.inputVisible2 = false
this.inputVisible3 = false
this.inputValue = ''
this.inputValue2 = ''
this.inputValue3 = ''
},
handleCommand (command) {
console.log(command)
......@@ -347,15 +401,16 @@
let self = this
let interestlist = this.interestlist
let hostlist = this.hostlist
let applist = this.applist
let currentdata = this.currentdata
let sessionID = this.sessionID
let oem = currentdata ? currentdata.oem : row.oem
let taskId = currentdata ? currentdata.name : row.name
let groupId = currentdata ? currentdata.groupID : row.groupID
this.dialogFormVisible = false
fetch('/api/send', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({taskId, groupId, interestlist, hostlist, status, sessionID})
body: JSON.stringify({taskId, groupId, interestlist, hostlist, applist, status, oem})
}).then(res => {
return res.json()
}).then(data => {
......
This diff is collapsed.
......@@ -43,7 +43,7 @@
methods: {
showExportContent (row) {
console.log(row)
this.exprotContent = row.exportShowArr
this.exprotContent = row.exportDataArr
this.exportContentVisible = true
},
getData () {
......
......@@ -114,10 +114,10 @@
<el-submenu index=7 v-if=' sessionID === "admin" '>
<template slot='title'>
<i class='el-icon-setting'></i>
<span>OEM运营账号</span>
<span>代理商运营账号</span>
</template>
<el-menu-item index='/OEM' @click="routeTo">
创建OME运营账号
<el-menu-item index='/agent' @click="routeTo">
创建代理商运营账号
</el-menu-item>
</el-submenu>
......
<template>
<el-container>
<el-main>
<div class="title">
<p>运营审核平台</p>
</div>
<div style='margin: 100px auto'>
<el-row type="flex" justify="center" style="width: 100%;height: 100%">
<el-col :span="12">
......@@ -78,5 +81,12 @@
</script>
<style scoped>
.title {
font-size: 24px;
font-weight: 800;
text-align: center;
width: 100%;
margin: 40px auto;
letter-spacing: 3px;
}
</style>
......@@ -25,6 +25,7 @@
<el-table-column label='公司名称' prop='company'></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='time'></el-table-column>
<el-table-column label='代码位备案规则'>
<template slot-scope='scope'>
<el-button type='text' @click='openDialog(scope)' >备案规则</el-button>
......
......@@ -6,6 +6,22 @@
<el-main>
<el-row style='margin-bottom: 10px'>
<el-button type='primary' style='float: left' @click=' inDialogVisible = true'>导入任务</el-button>
<el-select v-model="oneChoose" filterable clearable placeholder="请选择一级标签" @change='chooseOne' style="margin-left: 10px">
<el-option
v-for="(value, key) in onelevel"
:key="key"
:label="value"
:value="key">
</el-option>
</el-select>
<el-select v-model="twoChoose" filterable clearable placeholder="请选择二级标签" @change="chooseTwo">
<el-option
v-for="(value, key) in twoOK"
:key="key"
:label="value"
:value="key">
</el-option>
</el-select>
<el-button type='primary' style='float: right' @click='openExportDialog'>导出任务</el-button>
</el-row>
<el-table border
......@@ -29,7 +45,16 @@
</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-dialog title='新建导入任务' center :visible.sync="inDialogVisible">
<el-row style='margin-bottom: 10px'>
<el-col :span="4" style='line-height: 40px'>任务模式</el-col>
......@@ -98,7 +123,7 @@
<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-select v-model="exportAccount" placeholder="请选择账户" filterable clearable @visible-change='selectSlot'>
<el-option
v-for="item in emailOptions"
:key="item.accountID"
......@@ -106,7 +131,7 @@
:value="item.accountID">
</el-option>
</el-select>
<el-select v-model="exportSlot" placeholder="请选择代码位">
<el-select v-model="exportSlot" placeholder="请选择代码位" clearable filterable>
<el-option
v-for="item in slotOptions"
:key="item.slotID"
......@@ -206,13 +231,22 @@
exportShowArr: [],
showEmail: null,
showSlot: null,
exprotContent: []
exprotContent: [],
oneChoose: null,
twoChoose: null,
onelevel: {},
twolevel: {},
twoOK: {},
currentPage: 1,
pageSize: 10,
total: 1000
}
},
mounted () {
this.getTime()
this.getData()
this.getEmail()
this.getAccountTag()
},
methods: {
openExportDialog () {
......@@ -223,6 +257,32 @@
self.exportDialogVisible = true
}
},
chooseOne () {
let choose = this.oneChoose
this.fifterTag(choose, this.twolevel)
this.twoChoose = null
this.getData(this.pageSize, this.currentPage, this.oneChoose, this.twoChoose)
},
chooseTwo () {
this.getData(this.pageSize, this.currentPage, this.oneChoose, this.twoChoose)
},
fifterTag (x, arr) {
let self = this
let t = x
let dataArr = {}
let tes = new RegExp('^' + t, 'i')
console.log(tes)
for (let i in arr) {
if (tes.test(i)) {
if (i.length === t.length + 2) {
console.log(arr[i])
dataArr[i] = arr[i]
}
}
}
console.log(dataArr)
this.twoOK = dataArr
},
showExportContent (row) {
console.log(row)
this.exprotContent = row.exportDataArr
......@@ -251,9 +311,26 @@
}
})
this.exportDataArr.push({accountID: this.exportAccount, slotID: this.exportSlot, accountName: this.showEmail, slotName: this.showSlot})
this.exportAccount = null
this.exportSlot = null
let noRepeat = true
self.exportDataArr.forEach(x => {
// console.log(x)
if (x.accountID === self.exportAccount && x.slotID === self.exportSlot) {
this.$message({
showClose: true,
message: '请不要向同一账号下同一代码位导入相同的用户',
type: 'error'
})
noRepeat = false
}
})
if (noRepeat) {
self.exportDataArr.push({accountID: self.exportAccount, slotID: self.exportSlot, accountName: self.showEmail, slotName: self.showSlot})
self.exportAccount = null
self.exportSlot = null
}
},
handleSelectionChange (valueArr) {
console.log(valueArr)
......@@ -306,17 +383,49 @@
})
}
},
getData () {
handleSizeChange (val) {
console.log('页容量改变')
console.log(val)
this.pageSize = val
this.getData(this.pageSize, this.currentPage, this.chooseOne, this.twoChoose)
},
handleCurrentChange (val) {
console.log('当前页码改变')
this.currentPage = val
console.log(val)
this.getData(this.pageSize, this.currentPage, this.chooseOne, this.twoChoose)
},
getData (pageSize = this.pageSize, currentPage = this.currentPage, oneChoose = this.oneChoose, twoChoose = this.twoChoose) {
let self = this
let onelevelTag = this.onelevel[oneChoose]
let twolevelTag = this.twolevel[twoChoose]
fetch('/api/poolData', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify({})
body: JSON.stringify({pageSize, currentPage, onelevelTag, twolevelTag})
}).then(res => { return res.json() }).then(data => {
console.log(data)
self.datas = data.datas
self.total = data.dataTotal
})
},
getAccountTag (choose) {
console.log('tag')
let self = this
let oneChoose = choose
this.dialogVisiable = false
fetch('/api/getTag', {
method: 'POST',
headers: {'Content-Type': 'application/json;charset=UTF-8'},
body: JSON.stringify()
}).then(res => {
return res.json()
}).then(data => {
console.log(data)
self.onelevel = data.onelevel
self.twolevel = data.twolevel
})
},
getEmail () {
let self = this
let accountID = self.exportAccount
......
......@@ -16,7 +16,7 @@ import distributor from '@/components/distributor'
import userPool from '@/components/userPool'
import leadPoolTask from '@/components/leadPoolTask'
import exportPoolTask from '@/components/exportPoolTask'
import OEM from '@/components/OEM'
import agent from '@/components/agent'
import welcome from '@/components/welcome'
Vue.use(Router)
......@@ -44,7 +44,7 @@ export default new Router({
{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},
{name: 'OEM', path: '/OEM', meta: {requiresId: false}, component: OEM}
{name: 'agent', path: '/agent', meta: {requiresId: false}, component: agent}
]
},
{
......
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