Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
69cc9de3
Commit
69cc9de3
authored
Jul 24, 2019
by
denghr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台页面
parent
9ab92a54
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1537 additions
and
225 deletions
+1537
-225
activityManagement.js
src/api/activityManagement.js
+13
-0
modalManagement.js
src/api/appManagement/modalManagement.js
+13
-0
cunponManagements.js
src/api/cunponManagements.js
+72
-3
index.js
src/router/index.js
+27
-0
dateUtils.js
src/utils/dateUtils.js
+8
-0
activityList.vue
src/views/activityManagement/activityList.vue
+218
-0
index.vue
src/views/appManagement/modalManagement/index.vue
+438
-0
index.vue
src/views/appManagement/selectedActivities/index.vue
+411
-0
conponList.vue
src/views/cunponManagements/conponList.vue
+136
-31
cunponManagement.vue
src/views/cunponManagements/cunponManagement.vue
+201
-191
No files found.
src/api/activityManagement.js
0 → 100644
View file @
69cc9de3
import
fetch
from
'utils/fetch'
;
/**
* 获取活动列表
* @param query
*/
export
function
activityList
(
query
)
{
return
fetch
({
url
:
'/api/activity/management/activity/findAll'
,
method
:
'get'
,
params
:
query
});
}
\ No newline at end of file
src/api/appManagement/modalManagement.js
0 → 100644
View file @
69cc9de3
import
fetch
from
'utils/fetch'
;
/**
* 获取列表
* @param query
*/
export
function
getModalList
(
query
)
{
return
fetch
({
url
:
'/api/activity/activityPopupManage/manage/findAllByQuery'
,
method
:
'POST'
,
data
:
query
});
}
src/api/cunponManagements.js
View file @
69cc9de3
...
@@ -6,8 +6,77 @@ import fetch from 'utils/fetch';
...
@@ -6,8 +6,77 @@ import fetch from 'utils/fetch';
*/
*/
export
function
cunponManagementList
(
query
)
{
export
function
cunponManagementList
(
query
)
{
return
fetch
({
return
fetch
({
url
:
''
,
url
:
'
/api/activity/admin/coupon/page
'
,
method
:
'
g
et'
,
method
:
'
G
et'
,
params
:
query
params
:
query
});
});
}
}
\ No newline at end of file
/**
* 优惠券管理列表删除
* @param query
*/
export
function
delObj
(
id
)
{
return
fetch
({
url
:
'/api/activity/admin/coupon/'
+
id
,
method
:
'delete'
})
}
/**
* 获取优惠券管理列表某一条数据
* @param query
*/
export
function
getObj
(
id
)
{
return
fetch
({
url
:
'/api/activity/admin/coupon/'
+
id
,
method
:
'Get'
})
}
/**
* 获取优惠券管理列表--添加编辑
* @param query
*/
export
function
addObj
(
obj
)
{
return
fetch
({
url
:
'/api/activity/admin/coupon'
,
method
:
'post'
,
data
:
obj
});
}
/**
* 获取优惠券列表--优惠券标题列表
* @param query
*/
export
function
getTitle
()
{
return
fetch
({
url
:
'/api/activity/admin/coupon/titles'
,
method
:
'Get'
,
});
}
/**
* 获取优惠券列表--优惠券列表
* @param query
*/
export
function
getCouponList
(
query
)
{
return
fetch
({
url
:
'/api/activity/admin/user_coupon/page'
,
method
:
'Get'
,
params
:
query
});
}
/**
* 获取优惠券列表--发券
* @param query
*/
export
function
giveObj
(
obj
)
{
return
fetch
({
url
:
'/api/activity/admin/user_coupon/sendcoupon'
,
method
:
'POST'
,
data
:
obj
});
}
\ No newline at end of file
src/router/index.js
View file @
69cc9de3
...
@@ -464,6 +464,18 @@ export const asyncRouterMap = [{
...
@@ -464,6 +464,18 @@ export const asyncRouterMap = [{
component
:
_import
(
'appManagement/appVersion/index'
),
component
:
_import
(
'appManagement/appVersion/index'
),
name
:
'app版本管理'
,
name
:
'app版本管理'
,
authority
:
'appVersion'
authority
:
'appVersion'
},
{
path
:
'modalManagement'
,
component
:
_import
(
'appManagement/modalManagement/index'
),
name
:
'首页弹窗管理'
,
authority
:
'modalManagement'
},
{
path
:
'selectedActivities'
,
component
:
_import
(
'appManagement/selectedActivities/index'
),
name
:
'首页精选活动'
,
authority
:
'selectedActivities'
}
}
]
]
},
},
...
@@ -487,5 +499,20 @@ export const asyncRouterMap = [{
...
@@ -487,5 +499,20 @@ export const asyncRouterMap = [{
authority
:
'conponList'
authority
:
'conponList'
}
}
]
]
},
{
path
:
'/activityManagement'
,
component
:
Layout
,
name
:
'活动管理'
,
icon
:
'setting'
,
authority
:
'activityManagement'
,
children
:
[
{
path
:
'activityList'
,
component
:
_import
(
'activityManagement/activityList'
),
name
:
'活动列表'
,
authority
:
'activityList'
}
]
}
}
];
];
src/utils/dateUtils.js
View file @
69cc9de3
...
@@ -74,3 +74,11 @@ export function getCurrentMonth() {
...
@@ -74,3 +74,11 @@ export function getCurrentMonth() {
const
today
=
new
Date
();
const
today
=
new
Date
();
return
formatDate
(
today
,
'MM'
);
return
formatDate
(
today
,
'MM'
);
}
}
/**
* 返回yyyy-MM-dd
* */
export
function
getYMD
(
timestamp
)
{
let
date
=
new
Date
(
timestamp
);
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return
formatDate
(
date
,
'yyyy-MM-dd'
);
}
src/views/activityManagement/activityList.vue
0 → 100644
View file @
69cc9de3
<
template
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div>
<el-table
:key=
'tableKey'
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%;"
>
<el-table-column
type=
"index"
align=
"center"
label=
"活动ID"
width=
"200"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
id
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"活动名称"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"活动时间"
>
<
template
scope=
"scope"
>
<div
v-if=
"scope.row.title"
>
永久
</div>
<div
v-else
><span>
{{
scope
.
row
.
startTimeStr
}}
</span>
~
<span>
{{
scope
.
row
.
endTimeStr
}}
</span></div>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"人数限制"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
numLimit
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"已参加人数"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
hasJoinNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"状态"
>
<
template
scope=
"scope"
>
<span
v-if=
"scope.row.status==1"
>
上架
</span>
<span
v-if=
"scope.row.status==2"
>
下架
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
size=
"small"
type=
"success"
@
click=
"handleActivityData(scope.row)"
style=
"margin-left:0px"
>
活动数据
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"listQuery.page"
:page-sizes=
"[10,20,30,40,50]"
:page-size=
"listQuery.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
</div>
</div>
<el-dialog
title=
"编辑"
:visible
.
sync=
"newPeopelVisible"
>
<el-form
:model=
"formdata"
:rules=
"rules"
ref=
"form"
>
<div
style=
"font-weight: bold;"
>
基础设置
</div>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
label=
"活动状态"
label-width=
"70px"
>
<el-radio-group
v-model=
"formdata.status_name"
size=
"medium"
>
<el-radio-button
label=
"上架"
></el-radio-button>
<el-radio-button
label=
"下架"
></el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"参与人数"
label-width=
"70px"
>
<el-input
v-model=
"formdata.numLimit"
placeholder=
"请输入参与人数"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"14"
>
<el-form-item
label=
"活动开始/结束时间"
label-width=
"130px"
style=
"padding-left:8px"
>
<el-date-picker
v-model=
"formdata.starTimeStr"
type =
"datetime"
placeholder =
"开始时间"
value-format=
" yyyy-MM-dd HH:mm"
format=
"yyyy-MM-dd HH:mm"
:picker-options=
"pickerOptionsStart"
></el-date-picker>
<span>
-
</span>
<el-date-picker
v-model=
"formdata.endTimeStr"
type =
"datetime"
placeholder =
"结束时间"
value-format=
" yyyy-MM-dd HH:mm"
format=
"yyyy-MM-dd HH:mm"
:picker-options=
"pickerOptionsEnd"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"add('form')"
>
确认添加
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
formatDate
}
from
'utils/dateFormattor'
;
import
{
toEast8Date
,
deepCopyDate
,
newEast8Date
,
convertDate2Str
,
timestamp2Date
}
from
'utils/dateUtils'
;
import
rsCode
from
'../../utils/rsCode'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
getToken
}
from
'utils/auth'
;
import
{
activityList
}
from
'api/activityManagement'
;
import
Element1
from
"../admin/menu/components/element"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
export
default
{
name
:
'conponList'
,
components
:
{
ElCol
,
ElRow
,
Element1
,
},
data
()
{
return
{
rules
:{
phone
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入手机号'
,
trigger
:
'blur'
},
num
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入添加张数'
,
trigger
:
'blur'
}
},
newPeopelVisible
:
false
,
BASE_API
:
process
.
env
.
BASE_API
,
showLoadingBody
:
false
,
list
:
null
,
total
:
null
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
},
inline
:
true
,
tableKey
:
0
,
formdata
:{
phone
:
''
,
num
:
''
,
type
:
''
},
pickerOptionsStart
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
},
pickerOptionsEnd
:
{
disabledDate
:
time
=>
{
const
beginDateVal
=
new
Date
(
this
.
formdata
.
starTimeStr
).
getTime
()
if
(
beginDateVal
)
{
return
time
.
getTime
()
<
beginDateVal
-
0
}
}
},
}
},
created
()
{
this
.
getList
();
},
computed
:
{
...
mapGetters
([
'elements'
])
},
methods
:
{
/**
* 获取活动列表
* */
getList
()
{
this
.
listLoading
=
true
;
activityList
(
this
.
listQuery
).
then
(
response
=>
{
let
totalCountRs
=
undefined
;
let
listRs
=
undefined
;
// if (!this.$utils.isEmpty(response.data) && this.$utils.isInteger(response.data.totalCount)) {
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
))
{
listRs
=
response
.
data
;
listRs
.
map
(
function
(
item
){
item
.
startTimeeStr
=
timestamp2Date
(
item
.
startTime
);
item
.
endTimeStr
=
timestamp2Date
(
item
.
endTime
);
item
.
visible1
=
false
;
item
.
visible2
=
false
;
});
}
this
.
listLoading
=
false
;
this
.
list
=
listRs
;
this
.
total
=
totalCountRs
;
})
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
},
giveCunpon
(){
this
.
giveDialogVisible
=
true
;
},
handleUpdate
(
item
){
var
that
=
this
;
that
.
formdata
=
item
;
that
.
newPeopelVisible
=
true
;
}
}
}
</
script
>
src/views/appManagement/modalManagement/index.vue
0 → 100644
View file @
69cc9de3
This diff is collapsed.
Click to expand it.
src/views/appManagement/selectedActivities/index.vue
0 → 100644
View file @
69cc9de3
This diff is collapsed.
Click to expand it.
src/views/cunponManagements/conponList.vue
View file @
69cc9de3
This diff is collapsed.
Click to expand it.
src/views/cunponManagements/cunponManagement.vue
View file @
69cc9de3
This diff is collapsed.
Click to expand it.
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