Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
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
marketing-web
marketing
Commits
ede3d071
Commit
ede3d071
authored
Oct 23, 2020
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: save scan form
parent
b0750ea9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
165 additions
and
9 deletions
+165
-9
index.html
index.html
+2
-2
ecm.js
src/router/modules/ecm.js
+9
-1
item-text.vue
src/views/ecm/marketing-event/components/item-text.vue
+3
-3
scan-form.js
src/views/ecm/scan-form.js
+0
-0
scan-form.vue
src/views/ecm/scan-form.vue
+0
-0
scan-list.vue
src/views/ecm/scan-list.vue
+5
-3
scan-log-list.vue
src/views/ecm/scan-log-list.vue
+146
-0
No files found.
index.html
View file @
ede3d071
...
...
@@ -28,7 +28,7 @@
<script
src=
"//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/member-group.2.2.24.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js"
></script>
<!-- 门店选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/store-new.2.0.
46
.js"
></script>
<!-- 新版门店选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/store-new.2.0.
571
.js"
></script>
<!-- 新版门店选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/people.2.0.42.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js"
></script>
<!-- 数据导出 -->
...
...
@@ -36,6 +36,6 @@
<script
src=
"//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/selector.1.2.13.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js"
></script>
<!-- 分页器 -->
<
script
src=
"//web-1251519181.file.myqcloud.com/components/track.1.0.3.js"
></script
>
<
!-- <script src="//web-1251519181.file.myqcloud.com/components/track.1.0.3.js"></script> --
>
</body>
</html>
src/router/modules/ecm.js
View file @
ede3d071
...
...
@@ -78,13 +78,21 @@ export const scan = {
children
:
[
{
path
:
'list'
,
name
:
'
扫码营销
'
,
name
:
'
营销计划
'
,
component
:
()
=>
import
(
/* webpackChunkName: "scan" */
'../../views/ecm/scan-list.vue'
),
meta
:
{
path
:
'/scan/list'
}
},
{
path
:
'history-list'
,
name
:
'历史营销计划'
,
component
:
()
=>
import
(
/* webpackChunkName: "scan" */
'../../views/ecm/scan-history-list.vue'
),
meta
:
{
path
:
'/scan/list'
}
},
{
path
:
'edit/:id'
,
name
:
'营销计划编辑'
,
component
:
()
=>
import
(
/* webpackChunkName: "scan" */
'../../views/ecm/scan-form.vue'
),
...
...
src/views/ecm/marketing-event/components/item-text.vue
View file @
ede3d071
<
template
>
<!--
<span
class=
"dm-text__wrap ellipsis-l2 inline-block"
v-html=
"item.content"
></span>
-->
<pre>
<span
class=
"dm-text__wrap inline-block"
v-html=
"transfC
ontent"
></span>
<pre
class=
"inline-block"
>
<span
v-html=
"item.c
ontent"
></span>
</pre>
</
template
>
<
script
>
...
...
@@ -23,7 +23,7 @@ export default {
computed
:
{
transfContent
()
{
// 替换{数字}为文本
console
.
log
(
this
.
item
);
//
console.log(this.item);
let
val
=
this
.
item
.
content
;
if
(
this
.
isSupportVar
)
{
val
=
val
.
replace
(
/
\{(?:[
1-9
]
|
(
1
[
0-9
])?
|2
[
0-8
])\}
/g
,
(...
argument
)
=>
{
...
...
src/views/ecm/scan-form.js
0 → 100644
View file @
ede3d071
This diff is collapsed.
Click to expand it.
src/views/ecm/scan-form.vue
View file @
ede3d071
This diff is collapsed.
Click to expand it.
src/views/ecm/scan-list.vue
View file @
ede3d071
<
template
>
<section
class=
"dm-wrap"
v-loading=
"loading"
>
<div
class=
"pb22 clearfix"
>
<span>
创建时间
</span>
<el-date-picker
class=
"w400 ml10"
v-model=
"dateTime"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"refresh"
></el-date-picker>
<el-date-picker
class=
"w400 ml10"
v-model=
"dateTime"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"创建开始时间"
end-placeholder=
"创建结束时间"
@
change=
"refresh"
></el-date-picker>
<el-input
v-model=
"listParams.searchName"
class=
"w200"
placeholder=
"输入计划名称/创建人"
clearable
@
change=
"search"
><i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i></el-input>
<el-checkbox
class=
"vertical-middle"
v-if=
"$store.state.marketing.isShowSelf"
v-model=
"listParams.showSelfFlag"
:true-label=
"1"
:false-label=
"0"
label=
"仅看本人"
border
@
change=
"search"
/>
<el-button
class=
"fr"
type=
"primary"
@
click=
"$router.push('/scan/add')"
>
新建计划
</el-button>
<div
class=
"fr"
>
<el-button
@
click=
"$router.push('/scan/history-list')"
>
查看历史计划
</el-button>
<el-button
type=
"primary"
@
click=
"$router.push('/scan/add')"
>
新建计划
</el-button>
</div>
</div>
<el-table
tooltipEffect=
"light"
:data=
"tableList"
style=
"width: 100%"
element-loading-text=
"拼命加载中"
>
<el-table-column
label=
"优先级"
type=
"index"
width=
"80"
></el-table-column>
...
...
src/views/ecm/scan-log-list.vue
View file @
ede3d071
<
template
>
<section
class=
"dm-wrap"
v-loading=
"loading"
>
<div
class=
"pb22 clearfix"
>
<el-select
class=
"dm-select"
v-model=
"listParams.gameStatus"
placeholder=
"选择游戏状态"
@
change=
"refresh"
>
<el-option
v-for=
"(v, i) in gameStatusOptions"
:key=
"i"
:label=
"v.label"
:value=
"v.value"
></el-option>
</el-select>
<el-input
v-model=
"listParams.searchParam"
class=
"w200"
placeholder=
"输入游戏名称"
clearable
@
change=
"refresh"
><i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i></el-input>
<el-checkbox
class=
"vertical-middle ml0"
v-if=
"$store.state.marketing.isShowSelf"
v-model=
"listParams.showSelfFlag"
:true-label=
"1"
:false-label=
"0"
label=
"仅看本人"
border
@
change=
"refresh"
/>
<el-button
class=
"fr"
type=
"primary"
@
click=
"$router.push('/game/dzp/add')"
>
新建游戏
</el-button>
</div>
<el-table
tooltipEffect=
"light"
:data=
"tableList"
style=
"width:100%"
>
<el-table-column
v-for=
"(v, i) in tableHeader"
:fixed=
"v.fixed"
:show-overflow-tooltip=
"v.tooltip"
:width=
"v.width"
:min-width=
"v.minWidth"
:align=
"v.align"
:key=
"i"
:prop=
"v.prop"
:label=
"v.label"
:formatter=
"v.formatter"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"v.formatter"
v-html=
"v.formatter(scope.row)"
></span>
<span
v-else
>
{{
scope
.
row
[
v
.
prop
]
}}
</span>
</
template
>
</el-table-column>
<el-table-column
min-width=
"100"
align=
"left"
prop=
"creatorName"
label=
"创建人"
v-if=
"$store.state.marketing.openFlag"
></el-table-column>
<el-table-column
label=
"操作"
align=
"left"
width=
"220px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"setLinks(scope.row, 1)"
>
链接
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/game/dzp/record/' + scope.row.gameId)"
>
中奖记录
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/game/dzp/edit/' + scope.row.gameId)"
v-if=
"scope.row.gameStatus != '3'"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('/game/dzp/detail/' + scope.row.gameId)"
v-if=
"scope.row.gameStatus == '3'"
>
详情
</el-button>
<dm-delete
@
confirm=
"delData(scope.row)"
v-if=
"scope.row.canEdit !== false"
tips=
"是否删除该游戏?"
>
<el-button
type=
"text"
>
删除
</el-button>
</dm-delete>
</
template
>
</el-table-column>
</el-table>
<dm-pagination
v-show=
"tableList.length"
background
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
<links
:show
.
sync=
"linkShow"
:obj=
"linksObj"
:gameTypeName=
"gameTypeName"
></links>
</section>
</template>
<
script
>
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
{
loadLotteryList
}
from
'@/service/api/gameApi.js'
;
import
tableMethods
from
'@/mixins/tableMethods.js'
;
export
default
{
name
:
'scan-log-list'
,
mixins
:
[
tableMethods
],
data
()
{
return
{
gameStatusOptions
:
[{
value
:
''
,
label
:
'所有状态'
},
{
value
:
1
,
label
:
'待开始'
},
{
value
:
2
,
label
:
'进行中'
},
{
value
:
3
,
label
:
'已结束'
}],
// eslint-disable-line
listParams
:
{
gameStatus
:
''
,
gameType
:
1
,
searchParam
:
''
,
currentPage
:
1
,
pageSize
:
20
,
showSelfFlag
:
''
},
total
:
0
,
loading
:
false
,
tableHeader
:
[
{
label
:
'游戏名称'
,
prop
:
'gameName'
,
align
:
'left'
,
fixed
:
'left'
},
{
label
:
'抽奖消耗'
,
prop
:
'gameIntegral'
,
width
:
'120'
,
align
:
'left'
,
formatter
:
function
(
row
)
{
return
row
.
gameIntegral
+
'积分'
;
}
},
{
label
:
'中奖几率'
,
prop
:
'gameWinningRate'
,
width
:
'120'
,
align
:
'left'
,
formatter
:
function
(
row
)
{
return
row
.
gameWinningRate
.
toFixed
(
1
)
+
'%'
;
}
},
{
label
:
'游戏状态'
,
prop
:
'gameStatusName'
,
width
:
'120'
,
align
:
'left'
,
isRender
:
true
,
formatter
:
function
(
row
)
{
if
(
row
.
gameStatusName
===
'进行中'
)
{
return
`<div><span class="dm-status--primary--flash"></span>
${
row
.
gameStatusName
}
</div>`
;
}
else
{
return
`<div class="
${
row
.
gameStatusName
===
'未开始'
?
'dm-status--warning'
:
'dm-status--info'
}
">
${
row
.
gameStatusName
}
</div>`
;
}
}
},
{
label
:
'开始时间'
,
prop
:
'gameStartTime'
,
minWidth
:
'100'
,
tooltip
:
true
,
align
:
'left'
,
formatter
:
function
(
row
)
{
return
`<p class="cell-time">
${
formatDateTimeByType
(
row
.
gameStartTime
,
'yyyy-MM-dd-HH-mm-ss'
,
true
).
y
}
<br />
<span>
${
formatDateTimeByType
(
row
.
gameStartTime
,
'yyyy-MM-dd-HH-mm-ss'
,
true
).
h
}
</span>
</p>`
;
}
},
{
label
:
'结束时间'
,
prop
:
'gameEndTime'
,
minWidth
:
'100'
,
tooltip
:
true
,
align
:
'left'
,
formatter
:
function
(
row
)
{
return
`<p class="cell-time">
${
formatDateTimeByType
(
row
.
gameEndTime
,
'yyyy-MM-dd-HH-mm-ss'
,
true
).
y
}
<br />
<span>
${
formatDateTimeByType
(
row
.
gameEndTime
,
'yyyy-MM-dd-HH-mm-ss'
,
true
).
h
}
</span>
</p>`
;
}
},
{
label
:
'参与人数'
,
prop
:
'userCount'
,
width
:
'100'
,
align
:
'left'
},
{
label
:
'参与次数'
,
prop
:
'totalCount'
,
width
:
'100'
,
align
:
'left'
}
],
tableList
:
[]
};
},
created
()
{
this
.
getTableList
();
this
.
$store
.
commit
(
'aside_handler'
,
true
);
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'扫码营销'
,
path
:
''
},
{
name
:
'营销计划日志'
}]);
// eslint-disable-line
},
methods
:
{
// 拉取列表
getTableList
()
{
this
.
loading
=
true
;
loadLotteryList
(
this
.
listParams
)
.
then
(
res
=>
{
if
(
res
.
errorCode
===
0
)
{
this
.
tableList
=
res
.
result
.
page
.
result
||
[];
this
.
total
=
res
.
result
.
page
.
totalCount
||
0
;
this
.
loading
=
false
;
}
})
.
catch
(
err
=>
{
this
.
loading
=
false
;
});
}
}
};
</
script
>
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