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
6de47016
Commit
6de47016
authored
Jul 18, 2018
by
yaobeibei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge merge oem_master
parent
df4a32fe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
393 additions
and
3 deletions
+393
-3
DatePicker.vue
src/components/DatePicker.vue
+80
-0
Pagination.vue
src/components/Pagination.vue
+46
-0
checkUrl.vue
src/components/checkUrl.vue
+114
-0
dropDown.vue
src/components/dropDown.vue
+45
-0
index.js
src/router/index.js
+4
-1
data.js
src/store/data.js
+102
-0
dataList.js
src/store/dataList.js
+0
-0
index.js
src/store/index.js
+2
-2
No files found.
src/components/DatePicker.vue
0 → 100644
View file @
6de47016
<
template
>
<el-date-picker
v-model=
"valueRange"
type=
"daterange"
unlink-panelss
@
change=
"callback"
range-separator=
"至"
:start-placeholder=
"startTime"
:end-placeholder=
"endTime"
value-format=
'yyyy-MM-dd'
format=
'yyyy-MM-dd'
:picker-options=
"pickerOptions"
>
</el-date-picker>
</
template
>
<
script
>
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
export
default
{
name
:
"DatePicker"
,
props
:
[
'startTime'
,
'endTime'
],
data
()
{
return
{
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
]);
}
}
]
}
};
},
computed
()
{},
methods
:
{
callback
()
{
console
.
log
(
'to'
)
this
.
$emit
(
'timeChange'
,
this
.
valueRange
);
}
}
};
</
script
>
<
style
scpoed
>
</
style
>
src/components/Pagination.vue
0 → 100644
View file @
6de47016
<
template
>
<el-pagination
class=
"pagination"
:current-page=
"currentPage"
:page-size=
"pageSize"
:page-sizes=
"[10, 20, 50 ,100]"
:total=
"total"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
'sizeChange'
@
current-change=
'currentChange'
>
</el-pagination>
</
template
>
<
script
>
export
default
{
name
:
'Pagination'
,
props
:
[
'currentPage'
,
'pageSize'
,
'total'
],
data
()
{
return
{
}
},
methods
:
{
currentChange
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
this
.
$emit
(
'currentChange'
,
this
.
currentPage
)
},
sizeChange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
this
.
$emit
(
'sizeChange'
,
this
.
pageSize
)
}
}
}
</
script
>
<
style
>
.pagination
{
float
:
right
;
margin-top
:
20px
;
}
</
style
>
src/components/checkUrl.vue
0 → 100644
View file @
6de47016
<
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>
</template>
<
script
>
import
DatePicker
from
'./DatePicker'
import
Pagination
from
'./Pagination'
import
Drop
from
'./dropDown'
import
{
mapActions
,
mapGetters
}
from
'vuex'
export
default
{
name
:
'checkUrl'
,
components
:
{
DatePicker
,
Pagination
,
Drop
},
data
()
{
return
{
url
:
'/api/checkUrl'
,
tables
:
{
slotId
:
'ID'
,
email
:
'账户名称'
,
company
:
'公司名称'
,
slotName
:
'Url名称'
,
slot
:
'Url位置'
,
time
:
'Url创建时间'
,
status
:
'Url状态'
},
chooseArray
:
{
all
:
'全部状态'
,
zero
:
'未审核'
,
one
:
'已拒绝'
,
two
:
'已通过'
},
datas
:
null
,
currentPage
:
1
,
pageSize
:
10
,
total
:
1000
,
startTime
:
null
,
endTime
:
null
,
status
:
null
}
},
mounted
()
{
this
.
getTime
()
},
methods
:
{
...
mapActions
({
getData
:
'GET_DATA'
,
send
:
'SEND'
}),
getTime
()
{
this
.
endTime
=
moment
().
format
(
'YYYY-MM-DD'
)
this
.
startTime
=
moment
().
subtract
(
7
,
'days'
).
format
(
'YYYY-MM-DD'
)
},
sizechange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
},
currentPage
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
},
dropChange
(
value
)
{
console
.
log
(
value
)
this
.
status
=
value
},
timeChange
(
value
)
{
console
.
log
(
value
)
this
.
startTime
=
value
[
0
]
this
.
endTime
=
value
[
1
]
this
.
getData
({
url
:
this
.
url
,
choose
:
{
startTime
:
this
.
startTime
,
endTime
:
this
.
endTime
,
pageSize
:
this
.
pageSize
,
currentPage
:
this
.
currentPage
,
total
:
this
.
total
,
status
:
this
.
status
},
callback
:
this
.
formatData
})
},
formatData
(
err
,
data
)
{
if
(
err
)
{
return
console
.
log
(
err
)
}
this
.
datas
=
data
.
datas
this
.
totat
=
data
.
total
}
}
}
</
script
>
<
style
>
</
style
>
src/components/dropDown.vue
0 → 100644
View file @
6de47016
<
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>
</
template
>
<
script
>
export
default
{
name
:
'Drop'
,
props
:
[
'chooseArray'
],
data
()
{
return
{
choose
:
'状态选择'
}
},
methods
:
{
handleCommand
(
value
)
{
console
.
log
(
value
)
this
.
$emit
(
'dropChange'
,
value
)
}
}
}
</
script
>
<
style
>
.el-dropdown
{
vertical-align
:
top
;
}
.el-dropdown
+
.el-dropdown
{
margin-left
:
15px
;
}
.el-icon-arrow-down
{
font-size
:
12px
;
}
</
style
>
src/router/index.js
View file @
6de47016
...
@@ -18,6 +18,8 @@ import leadPoolTask from '@/components/leadPoolTask'
...
@@ -18,6 +18,8 @@ import leadPoolTask from '@/components/leadPoolTask'
import
exportPoolTask
from
'@/components/exportPoolTask'
import
exportPoolTask
from
'@/components/exportPoolTask'
import
agent
from
'@/components/agent'
import
agent
from
'@/components/agent'
import
welcome
from
'@/components/welcome'
import
welcome
from
'@/components/welcome'
import
checkUrl
from
'@/components/checkUrl'
Vue
.
use
(
Router
)
Vue
.
use
(
Router
)
...
@@ -44,7 +46,8 @@ export default new Router({
...
@@ -44,7 +46,8 @@ export default new Router({
{
name
:
'leadPoolTask'
,
path
:
'/leadPoolTask'
,
meta
:
{
requiresId
:
false
},
component
:
leadPoolTask
},
{
name
:
'leadPoolTask'
,
path
:
'/leadPoolTask'
,
meta
:
{
requiresId
:
false
},
component
:
leadPoolTask
},
{
name
:
'exportPoolTask'
,
path
:
'/exportPoolTask'
,
meta
:
{
requiresId
:
false
},
component
:
exportPoolTask
},
{
name
:
'exportPoolTask'
,
path
:
'/exportPoolTask'
,
meta
:
{
requiresId
:
false
},
component
:
exportPoolTask
},
{
name
:
'distributor'
,
path
:
'/distributor'
,
meta
:
{
requiresId
:
false
},
component
:
distributor
},
{
name
:
'distributor'
,
path
:
'/distributor'
,
meta
:
{
requiresId
:
false
},
component
:
distributor
},
{
name
:
'agent'
,
path
:
'/agent'
,
meta
:
{
requiresId
:
false
},
component
:
agent
}
{
name
:
'agent'
,
path
:
'/agent'
,
meta
:
{
requiresId
:
false
},
component
:
agent
},
{
name
:
'checkUrl'
,
path
:
'/checkUrl'
,
meta
:
{
requiresId
:
false
},
component
:
checkUrl
},
]
]
},
},
{
{
...
...
src/store/data.js
0 → 100644
View file @
6de47016
const
type
=
{
GET_DATA
:
'GET_DATA'
,
SEND
:
'SEND'
,
GET_EMAIL
:
'GET_EMAIL'
}
const
state
=
{
datas
:
[],
allDatas
:
[],
emails
:
[]
}
const
getters
=
{
getDatas
()
{
return
state
.
datas
},
getAccount
()
{
return
state
.
emails
}
}
const
mutations
=
{
[
type
.
GET_DATA
]
(
state
,
data
)
{
state
.
datas
=
data
},
[
type
.
GET_EMAIL
]
(
state
,
data
)
{
state
.
emails
=
data
}
}
const
actions
=
{
[
type
.
GET_DATA
]
({
commit
},
{
url
,
choose
,
callback
})
{
console
.
log
(
url
,
choose
)
fetch
(
url
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
(
choose
)
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
commit
(
type
.
GET_DATA
,
data
)
callback
(
null
,
data
)
}).
catch
(
err
=>
{
callback
(
err
,
null
)
})
},
[
type
.
SEND
]
({
commit
},
{
url
,
choose
,
callback
})
{
console
.
log
(
url
,
choose
)
fetch
(
url
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
JSON
.
stringify
(
choose
)
}).
then
(
res
=>
{
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'
})
callback
(
err
,
null
)
})
},
[
type
.
GET_EMAIL
]
({
commit
})
{
fetch
(
'/api/getEmail'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
},
body
:
null
}).
then
(
res
=>
{
return
res
.
json
()
}).
then
(
data
=>
{
console
.
log
(
data
)
commit
(
type
.
GET_EMAIL
,
data
.
emailArr
)
}).
catch
(
err
=>
{
return
console
.
log
(
err
)
})
}
}
export
default
{
state
,
getters
,
mutations
,
actions
}
src/store/dataList.js
deleted
100644 → 0
View file @
df4a32fe
src/store/index.js
View file @
6de47016
import
Vue
from
'vue'
import
Vue
from
'vue'
import
vuex
from
'vuex'
import
vuex
from
'vuex'
import
data
List
from
'./dataList
'
import
data
from
'./data
'
import
login
from
'./login'
import
login
from
'./login'
...
@@ -8,7 +8,7 @@ Vue.use(vuex)
...
@@ -8,7 +8,7 @@ Vue.use(vuex)
export
default
new
vuex
.
Store
({
export
default
new
vuex
.
Store
({
modules
:
{
modules
:
{
data
List
,
data
,
login
login
}
}
})
})
...
...
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