Commit 0b691bed by ext.wangyuman1

拉新红包

1 parent 8254cbdc
import request from '@/utils/request'
const service = window.lwConfig.services.system + window.lwConfig.services.wecom + '/lxqr'
// 列表
export function getList(params) {
return request({
url: service + '/list',
params,
})
}
// 卡券列表
export function getCardList(params) {
return request({
url: window.lwConfig.services.system + window.lwConfig.services.wecom + '/coupon/getCouponList',
params,
})
}
// 红包列表
export function getRedList(params) {
return request({
url: window.lwConfig.services.system + window.lwConfig.services.wecom + '/RedEnvelopes/list',
params,
})
}
// 新增
export function add(params) {
return request({
url: service + '/add',
data: params,
method: 'post',
})
}
// 编辑
export function update(data) {
return request({
url: service + '/update/' + data.id,
data,
method: 'put',
})
}
// 详情
export function getDetail(id) {
return request({
url: service + '/get/' + id,
})
}
//删除
export function remove(ids) {
return request({
url: service + '/del/' + ids,
method: 'delete',
})
}
export function addOrUpdate(params) {
return request({
url: service + '/addOrUpdateKnowCustomer',
data: params,
method: 'post',
})
}
// 导出excel
export function downloadBatch() {
return request({
url: service + '/exportKnowCustomers',
params: {},
responseType: 'blob',
})
}
// 单个下载
export function download(id) {
return request({
url: service + '/downloadKnowCustomerUrl/' + id,
responseType: 'blob',
})
}
// 详情头部Card
export function getIdentityCodeTab(params) {
return request({
url: service + '/findWKCountDetailTab',
params,
})
}
// 详情数据趋势
export function getLineData(params) {
return request({
url: service + '/line/statistics',
params,
})
}
// 详情数据报表
export function getTableData(params) {
return request({
url: service + '/list/statistics',
params,
})
}
// 活码统计数据报表导出
export function getTableExport(params) {
return request({
url: service + '/list/statistics/export',
params,
responseType: 'blob',
})
}
// 领取红包金额统计(折线图)
export function getMoneyLineData(params) {
return request({
url: service + '/receive/line/amount',
params,
})
}
// 领取红包个数统计(折线图)
export function getNumLineData(params) {
return request({
url: service + '/receive/line/num',
params,
})
}
// 领取红包列表统计(表格)
export function getRedTableData(params) {
return request({
url: service + '/receive/list/statistics',
params,
})
}
// 领取红包列表统计(表格导出)
export function getRedTableExport(params) {
return request({
url: service + '/receive/list/statistics/export',
params,
responseType: 'blob',
})
}
// 领取总数统计(表格)
export function getTotalData(params) {
return request({
url: service + '/receive/statistics',
params,
})
}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="mix-blend-mode:passthrough"><g style="mix-blend-mode:passthrough"><g><path d="M1.5999757003785,3.2000244140625C1.5999755859375,2.7581964140625,1.9581475859375,2.4000244140625,2.3999755859375,2.4000244140625L21.5999755859375,2.4000244140625C22.0417755859375,2.4000244140625,22.3999755859375,2.7581964140625,22.3999755859375,3.2000244140625L22.3999755859375,20.8000244140625C22.3999755859375,21.2418244140625,22.0417755859375,21.6000244140625,21.5999755859375,21.6000244140625L2.3999755859375,21.6000244140625C1.9581485859375,21.6000244140625,1.5999757003785,21.2418244140625,1.5999758148195,20.8000244140625L1.5999757003785,3.2000244140625Z" fill="#FFAA44" fill-opacity="1"/></g><g><path d="M3.20001243591325,6.3999755859375C3.20001243591325,5.9581475859375,3.55818420703125,5.5999755859375,4.00001220703125,5.5999755859375L20.00001220703125,5.5999755859375C20.44181220703125,5.5999755859375,20.80001220703125,5.9581475859375,20.80001220703125,6.3999755859375L20.80001220703125,20.7999755859375C20.80001220703125,21.2417755859375,20.44181220703125,21.5999755859375,20.00001220703125,21.5999755859375L4.00001220703125,21.5999755859375C3.55818420703125,21.5999755859375,3.20001243591325,21.2417755859375,3.20001220703125,20.7999755859375L3.20001243591325,6.3999755859375Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M11.9999755859375,11.99998779296875C13.4803755859375,11.99925779296875,14.7671755859375,10.98367779296875,15.1119755859375,9.54398779296875C15.1999755859375,9.13198779296875,15.5279755859375,8.79998779296875,15.9503755859375,8.79998779296875L21.5999755859375,8.79998779296875C22.0417755859375,8.79998687744175,22.3999755859375,9.15815979296875,22.3999755859375,9.59998779296875L22.3999755859375,20.79998779296875C22.3999755859375,21.24178779296875,22.0417755859375,21.59998779296875,21.5999755859375,21.59998779296875L2.3999755859375,21.59998779296875C1.9581485859375,21.59998779296875,1.5999757003785,21.24178779296875,1.5999758148195,20.79998779296875L1.5999758148195,9.59998779296875C1.5999757003785,9.15815979296875,1.9581475859375,8.79998687744175,2.3999755859375,8.79998779296875L8.0495755859375,8.79998779296875C8.4719755859375,8.79998779296875,8.800775585937501,9.13198779296875,8.8879755859375,9.54398779296875C9.232735585937501,10.98367779296875,10.5195855859375,11.99925779296875,11.9999755859375,11.99998779296875Z" fill="#07C160" fill-opacity="1"/></g></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><filter id="master_svg0_1_340" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="0" y="0" width="3.100000001490116" height="4.04559288173914"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="0.10000000149011612" dx="0.10000000149011612"/><feGaussianBlur stdDeviation="0"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3019607961177826 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter></defs><g style="mix-blend-mode:passthrough"><g style="mix-blend-mode:passthrough"><g><path d="M14.70700771484375,20.95546396484375L6.91639771484375,22.47656396484375C5.74217771484375,22.70626396484375,4.60545771484375,21.93986396484375,4.37576771484375,20.76556396484375L1.89608111484375,8.05545396484375C1.66639371484375,6.88123396484375,2.43279971484375,5.74452396484375,3.60701771484375,5.51483396484375L11.39764771484375,3.99373766484375C12.57190771484375,3.76404996484375,13.70860771484375,4.53045596484375,13.93830771484375,5.7046739648437494L16.42030771484375,18.41486396484375C16.64530771484375,19.58906396484375,15.88120771484375,20.72576396484375,14.70700771484375,20.95546396484375Z" fill="#FFAA44" fill-opacity="1"/></g><g><path d="M18.67504150390625,22.200010546875L6.77813150390625,21.210910546875C5.58751150390625,21.112510546875,4.70157380390625,20.064810546875,4.80001129390625,18.874210546875L6.07735150390625,3.503900546875C6.17579150390625,2.313280546875,7.22345150390625,1.427343046875,8.41407150390625,1.525780566875L20.31094150390625,2.514842546875C21.50154150390625,2.613280546875,22.38754150390625,3.660940546875,22.28904150390625,4.851560546875L21.01174150390625,20.221910546875C20.91094150390625,21.412510546875,19.86564150390625,22.298410546875,18.67504150390625,22.200010546875Z" fill="#07C160" fill-opacity="1"/></g><g><path d="M19.659425634765626,3.04217321484375L8.967195634765625,2.15389190484375C8.167985634765625,2.08826691484375,7.420324634765625,2.36951721484375,6.871886904765625,2.87107921484375C6.785168134765625,6.75702021484375,9.738295634765624,10.08749021484375,13.664075634765625,10.41561021484375C17.589825634765624,10.74374021484375,21.053925634765626,7.94295021484375,21.607025634765627,4.09686021484375C21.147625634765625,3.51092021484375,20.458625634765625,3.1077982148437497,19.659425634765626,3.04217321484375Z" fill="#FF920F" fill-opacity="1"/></g><g><path d="M19.706228417968752,2.4632542090013025L9.01639841796875,1.5749734090013028C8.21718841796875,1.5093484090013027,7.00000001796875,1.5000217090013028,6.92109048796875,2.2921612090013026C6.83202801796875,6.178100209001303,9.785148417968749,9.508570209001302,13.71093841796875,9.836690209001302C17.636728417968747,10.164820209001302,21.10072841796875,7.364040209001303,21.65392841796875,3.5156002090013025C21.19682841796875,2.932000209001303,20.50542841796875,2.528879209001303,19.706228417968752,2.4632542090013025Z" fill="#FFAA44" fill-opacity="1"/></g><g><path d="M10.155407905578613,9.803470737609864C10.155406990051613,11.728270737609863,11.715767905578613,13.288620737609863,13.640567905578614,13.288620737609863C15.565357905578614,13.288620737609863,17.12571790557861,11.728270737609863,17.12571790557861,9.803470737609864C17.12571790557861,7.8786707376098635,15.565357905578614,6.318310737609863,13.640567905578614,6.318310737609863C11.715767905578613,6.318310737609863,10.155406990051613,7.8786707376098635,10.155407905578613,9.803470737609864Z" fill="#F7554D" fill-opacity="1"/></g><g><path d="M10,9.48686C9.999059753,11.412320000000001,11.55969,12.97372,13.48516,12.97372C15.41062,12.97371,16.97125,11.412320000000001,16.970309999999998,9.48686C16.97125,7.56139,15.41062,6,13.48516,6C11.55969,6,9.999058838,7.5614,10,9.48686Z" fill="#FF7E71" fill-opacity="1"/></g><g style="mix-blend-mode:passthrough" transform="matrix(0.971602737903595,0.23661819100379944,-0.23661819100379944,0.971602737903595,2.1296022087335587,-2.7447479218244553)" filter="url(#master_svg0_1_340)"><path d="M15.29539,9.47278L14.45897,9.51468L14.47494,9.83349L15.31136,9.79158L15.33783,10.319939999999999L14.50142,10.36185L14.55382,11.40781L13.79979,11.44559L13.74739,10.39962L12.910968,10.44153L12.884497,9.913170000000001L13.72091,9.87126L13.70494,9.55246L12.868525,9.59436L12.842054,9.06601L13.53519,9.03128L12.5,7.650301L13.304179,7.610011L14.03602,8.67042L14.07363,8.66854L14.719100000000001,7.5391232L15.5,7.5L14.58116,8.97888L15.26892,8.944420000000001L15.29539,9.47278Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></svg>
\ No newline at end of file \ No newline at end of file
...@@ -9,30 +9,45 @@ ...@@ -9,30 +9,45 @@
width="80%" width="80%"
append-to-body append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
@close="dialogClose"> @close="dialogClose"
>
<el-tabs v-model="activeName" @tab-click="tabClick"> <el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane <el-tab-pane
v-for="(item, index) in paneList" v-for="(item, index) in paneList"
:key="index" :key="index"
:label="item.label + '(' + item.list.length + ')'" :label="item.label + '(' + item.list.length + ')'"
:name="item.name"> :name="item.name"
>
<MaPage ref="page" :type="item.type" v-slot="{ list }"> <MaPage ref="page" :type="item.type" v-slot="{ list }">
<div v-if="item.type === '0'"> <div v-if="item.type === '0'">
<div v-if="list && list.length"> <div v-if="list && list.length">
<el-checkbox-group v-model="paneList[picindex].list" class="imgStyle"> <el-checkbox-group v-model="paneList[picindex].list" class="imgStyle">
<div class="imgItem" v-for="(item, index) in list" :key="index"> <div
class="imgItem"
v-for="(item, index) in list"
:key="index"
@click="changeBox($event, item)"
>
<div class="checkboxStyle"> <div class="checkboxStyle">
<el-checkbox :label="item" @change="changeBox" style="width: 20px"></el-checkbox> <el-checkbox
:label="item"
style="width: 20px"
:checked="item.isCheck"
></el-checkbox>
<el-tooltip <el-tooltip
:content="item.materialName" :content="item.materialName"
placement="top" placement="top"
:disabled="item.materialName ? item.materialName.length < 6 : true"> :disabled="item.materialName ? item.materialName.length < 6 : true"
>
<div class="title ml10"> <div class="title ml10">
{{ coverContent(item.materialName, 6) }} {{ coverContent(item.materialName, 6) }}
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="img" :style="{ 'background-image': 'url(' + item.materialUrl + ')' }"></div> <div
class="img"
:style="{ 'background-image': 'url(' + item.materialUrl + ')' }"
></div>
</div> </div>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
...@@ -40,7 +55,14 @@ ...@@ -40,7 +55,14 @@
<span>暂无数据</span> <span>暂无数据</span>
</div> </div>
</div> </div>
<el-table :data="list" @selection-change="handleSelectionChange" ref="multipleTable" v-else> <el-table
:data="list"
@selection-change="handleSelectionChange"
ref="multipleTable"
@select="handleSelect"
@select-all="selectAll"
v-else
>
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="素材" align="left"> <el-table-column label="素材" align="left">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
...@@ -123,6 +145,7 @@ export default { ...@@ -123,6 +145,7 @@ export default {
opened: ['text'], opened: ['text'],
ids: [], // 选中数组 ids: [], // 选中数组
itemArry: [], // 选中数组 itemArry: [], // 选中数组
inx: 0,
} }
}, },
methods: { methods: {
...@@ -164,7 +187,8 @@ export default { ...@@ -164,7 +187,8 @@ export default {
item.list = [] item.list = []
}) })
}, },
changeBox() { changeBox(event, obj) {
event.preventDefault()
this.ids = [] this.ids = []
this.paneList.forEach((item) => { this.paneList.forEach((item) => {
if (item.list && item.list.length) { if (item.list && item.list.length) {
...@@ -173,9 +197,32 @@ export default { ...@@ -173,9 +197,32 @@ export default {
}) })
} }
}) })
if (this.ids.length + this.talkListLength > this.maxlength) { if (
this.$message.error('最多新建或选择' + this.maxlength + '个素材') (this.ids.length + this.talkListLength > this.maxlength ||
this.ids.length + this.talkListLength === this.maxlength) &&
!obj.isCheck
) {
this.$message.error(
'最多新建或选择' + this.maxlength + '个素材,已新建' + this.talkListLength + '个素材'
)
return
}
obj.isCheck = !obj.isCheck
if (obj.isCheck) {
this.paneList[this.picindex].list.push(obj)
} else {
this.paneList[this.picindex].list = this.paneList[this.picindex].list.filter((list) => {
return list.id !== obj.id
})
}
this.ids = []
this.paneList.forEach((item) => {
if (item.list && item.list.length) {
item.list.forEach((item1) => {
this.ids.push(item1)
})
} }
})
}, },
centerCancel() { centerCancel() {
this.dialogVisibel = false this.dialogVisibel = false
...@@ -210,13 +257,29 @@ export default { ...@@ -210,13 +257,29 @@ export default {
this.clearPaneList() this.clearPaneList()
} }
}, },
handleSelect(select, row) {
if (1 + this.ids.length + this.talkListLength > this.maxlength) {
this.$nextTick(() => {
if (this.index) this.$refs.multipleTable[this.inx].toggleRowSelection(row, false)
})
this.$message.error(
'最多新建或选择' + this.maxlength + '个素材,已新建' + this.talkListLength + '个素材'
)
}
},
selectAll(select) {
if (select.length + this.ids.length + this.talkListLength > this.maxlength) {
select.forEach((item) => {
this.$refs.multipleTable[this.inx].toggleAllSelection(item, false)
})
this.$message.error(
'最多新建或选择' + this.maxlength + '个素材,已新建' + this.talkListLength + '个素材'
)
}
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
// this.ids = selection.map((item) => item.id) let list = JSON.parse(JSON.stringify(this.paneList[this.index].list))
// this.paneList[this.index].ids = selection.map((item) => item.id)
if (selection.length + this.talkListLength > this.maxlength) {
this.$message.error('最多新建或选择' + this.maxlength + '个素材')
}
this.paneList[this.index].list = selection this.paneList[this.index].list = selection
this.ids = [] this.ids = []
this.paneList.forEach((item) => { this.paneList.forEach((item) => {
...@@ -226,6 +289,17 @@ export default { ...@@ -226,6 +289,17 @@ export default {
}) })
} }
}) })
if (this.ids.length + this.talkListLength > this.maxlength) {
this.paneList[this.index].list = list
this.ids = []
this.paneList.forEach((item) => {
if (item.list && item.list.length) {
item.list.forEach((item1) => {
this.ids.push(item1)
})
}
})
}
}, },
// 处理文件类型 // 处理文件类型
filType(file) { filType(file) {
...@@ -244,6 +318,18 @@ export default { ...@@ -244,6 +318,18 @@ export default {
}, },
tabClick(v) { tabClick(v) {
this.index = v.index this.index = v.index
if (this.index !== 0) {
this.inx = this.index - 1
} else {
this.inx = this.index
}
// if (this.picindex === 0) {
// // 不包含文本
// this.inx = this.index - 1
// } else if (this.picindex === 1) {
// // 包含文本
// }
}, },
}, },
} }
......
...@@ -104,7 +104,8 @@ ...@@ -104,7 +104,8 @@
<svg-icon <svg-icon
class="icon-style" class="icon-style"
:iconClass="data.materialUrl ? filType(data.materialUrl) : ''" :iconClass="data.materialUrl ? filType(data.materialUrl) : ''"
v-if="data.materialUrl"></svg-icon> v-if="data.materialUrl"
></svg-icon>
</div> </div>
</div> </div>
</div> </div>
...@@ -127,6 +128,32 @@ ...@@ -127,6 +128,32 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 拉新 -->
<div class="item" v-if="pullnewsInfo">
<div class="avatar222"><img src="../../assets/drainageCode/header.png" /></div>
<!-- 红包 -->
<div class="redBox" v-if="pullnewsInfo.qrType === 1">
<div class="red-box">
<div class="red-text">
{{ pullnewsInfo.materialName }}
</div>
</div>
</div>
<!-- 卡券 -->
<div class="msg" v-else-if="pullnewsInfo.qrType === 2">
<div class="function">
<div class="function-item">
<svg-icon class="card-style" iconClass="card"></svg-icon>
<div>
<div class="card-name">{{ pullnewsInfo.materialName }}</div>
<div class="item-text">
{{ pullnewsInfo.digest }}
</div>
</div>
</div>
</div>
</div>
</div>
<div v-if="article"> <div v-if="article">
<p v-html="article"></p> <p v-html="article"></p>
</div> </div>
...@@ -161,6 +188,11 @@ export default { ...@@ -161,6 +188,11 @@ export default {
type: String, type: String,
default: null, default: null,
}, },
// 新客拉新
pullnewsInfo: {
type: Object,
default: null,
},
}, },
watch: { watch: {
list: { list: {
...@@ -196,6 +228,65 @@ export default { ...@@ -196,6 +228,65 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.redBox {
min-height: 26px;
display: inline-block;
box-sizing: border-box;
word-break: break-all;
margin-left: 5px;
.red-box {
width: 165px;
height: 68px;
background-image: url('../../assets/image/newred.png');
background-size: 100%;
background-repeat: no-repeat;
padding-top: 20px;
border-radius: 4px;
.red-text {
font-size: 14px;
color: #fff;
margin-left: 56px;
width: 98px;
white-space: nowrap; // 强制一行
text-overflow: ellipsis; // 文字溢出显示省略号
overflow: hidden; // 溢出隐藏
}
}
}
.function {
width: 160px;
.function-item {
width: 160px;
min-height: 76px;
border-width: 1px;
border-style: solid;
border-color: rgba(242, 242, 242, 1);
border-radius: 5px;
display: flex;
padding: 10px;
padding-top: 6px;
cursor: pointer;
.card-style {
margin-right: 10px;
margin-top: 8px;
font-size: 32px;
}
.card-name {
font-size: 14px;
line-height: 26px;
width: 98px;
white-space: nowrap; // 强制一行
text-overflow: ellipsis; // 文字溢出显示省略号
overflow: hidden; // 溢出隐藏
}
.item-text {
font-size: 12px;
color: #aaaaaa;
line-height: 14px;
width: 98px;
}
}
}
.icon-style { .icon-style {
width: 40px; width: 40px;
height: 40px; height: 40px;
...@@ -216,7 +307,6 @@ export default { ...@@ -216,7 +307,6 @@ export default {
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
width: 60%; width: 60%;
color: #333333; color: #333333;
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<el-button type="text" @click="edit(scope.row)" v-if="scope.row.moduleType != 1" <el-button type="text" @click="edit(scope.row)" v-if="scope.row.moduleType != 1"
>编辑</el-button >编辑</el-button
> >
<el-button type="text" @click="remove(scope.row.id)">移除</el-button> <el-button type="text" @click="remove(scope.row.delId)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -184,6 +184,9 @@ export default { ...@@ -184,6 +184,9 @@ export default {
tableData2: { tableData2: {
handler(val) { handler(val) {
this.tableData = JSON.parse(JSON.stringify(val)) this.tableData = JSON.parse(JSON.stringify(val))
this.tableData.forEach((item, index) => {
item.delId = index
})
}, },
immediate: true, immediate: true,
}, },
...@@ -235,9 +238,9 @@ export default { ...@@ -235,9 +238,9 @@ export default {
edit(row) { edit(row) {
this.$emit('getEdit', row) this.$emit('getEdit', row)
}, },
remove(id) { remove(delId) {
this.tableData = this.tableData.filter((item) => { this.tableData = this.tableData.filter((item) => {
return item.id != id return item.delId != delId
}) })
this.$emit('setData', this.tableData) this.$emit('setData', this.tableData)
}, },
......
...@@ -922,6 +922,20 @@ export default { ...@@ -922,6 +922,20 @@ export default {
i++ i++
} }
form.moduleType = this.moduleType form.moduleType = this.moduleType
if (this.activeLiveCodeType) {
let customType = {
text: 1,
image: 2,
qrcode: 3,
ygcode: 4,
kqcode: 5,
mdcoed: 6,
skcode: 7,
lxcode: 8,
}[this.activeLiveCodeType]
form.posterQrType = customType
}
;(form.id ? updatePoster : addPoster)( ;(form.id ? updatePoster : addPoster)(
Object.assign( Object.assign(
{ {
......
<template> <template>
<div> <div>
<el-form-item :label="lableOne" required style="margin-right: 200px !important" :error="templateInfo"> <el-form-item
:label="lableOne"
required
style="margin-right: 200px !important"
:error="templateInfo"
>
<div v-if="showModle" style="margin-bottom: 10px"> <div v-if="showModle" style="margin-bottom: 10px">
<el-button type="primary" @click="welcomVisible = true">从模板库中选择</el-button> <el-button type="primary" @click="welcomVisible = true">从模板库中选择</el-button>
</div> </div>
...@@ -13,12 +18,17 @@ ...@@ -13,12 +18,17 @@
:autosize="{ minRows: 5, maxRows: 20 }" :autosize="{ minRows: 5, maxRows: 20 }"
clearable clearable
:autofocus="true" :autofocus="true"
@input="changeInfo" /> @input="changeInfo"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div slot="label" class="title" v-if="otherType !== 3"> <div slot="label" class="title" v-if="otherType !== 3">
{{ titleTwo }} {{ titleTwo }}
<el-popover trigger="hover" :content="'最多添加' + maxlength + '个素材'" placement="top-start"> <el-popover
trigger="hover"
:content="'最多添加' + maxlength + '个素材'"
placement="top-start"
>
<i slot="reference" class="el-icon-question"></i> <i slot="reference" class="el-icon-question"></i>
</el-popover> </el-popover>
</div> </div>
...@@ -27,13 +37,23 @@ ...@@ -27,13 +37,23 @@
<div style="text-align: left" class="flex"> <div style="text-align: left" class="flex">
<el-popover <el-popover
trigger="hover" trigger="hover"
:content="'最多添加' + maxlength + '个' + fontType + ',如需修改请删除已有' + fontType + '后重新尝试'" :content="
'最多添加' +
maxlength +
'个' +
fontType +
',如需修改请删除已有' +
fontType +
'后重新尝试'
"
placement="top-start" placement="top-start"
:disabled="talkList.length < maxlength"> :disabled="talkList.length < maxlength"
>
<el-dropdown <el-dropdown
slot="reference" slot="reference"
@command="moveGroup" @command="moveGroup"
:disabled="talkList.length > maxlength || talkList.length === maxlength"> :disabled="talkList.length > maxlength || talkList.length === maxlength"
>
<el-button type="primary">+ {{ '新建' + fontType }}</el-button> <el-button type="primary">+ {{ '新建' + fontType }}</el-button>
<el-dropdown-menu slot="dropdown" trigger="click"> <el-dropdown-menu slot="dropdown" trigger="click">
<!-- <el-dropdown-item :command="'4'" v-if="!this.templateType && this.moduleType !== 4"> <!-- <el-dropdown-item :command="'4'" v-if="!this.templateType && this.moduleType !== 4">
...@@ -65,13 +85,23 @@ ...@@ -65,13 +85,23 @@
</el-popover> </el-popover>
<el-popover <el-popover
trigger="hover" trigger="hover"
:content="'最多添加' + maxlength + '个' + fontType + ',如需修改请删除已有' + fontType + '后重新尝试'" :content="
'最多添加' +
maxlength +
'个' +
fontType +
',如需修改请删除已有' +
fontType +
'后重新尝试'
"
placement="top-start" placement="top-start"
:disabled="talkList.length < maxlength"> :disabled="talkList.length < maxlength"
>
<div slot="reference" class="ml20"> <div slot="reference" class="ml20">
<el-button <el-button
@click="choseCenter" @click="choseCenter"
:disabled="talkList.length > maxlength || talkList.length === maxlength"> :disabled="talkList.length > maxlength || talkList.length === maxlength"
>
从素材中心选择 从素材中心选择
</el-button> </el-button>
</div> </div>
...@@ -81,8 +111,13 @@ ...@@ -81,8 +111,13 @@
</div> </div>
</el-form-item> </el-form-item>
<div style="margin-top: 10px" v-show="talkList.length"> <div style="margin-top: 10px; margin-left: 150px" v-show="talkList.length">
<DragTable :tableData2="talkList" @setData="setData" @getEdit="getEdit" :dargAble="[2].includes(moduleType)" /> <DragTable
:tableData2="talkList"
@setData="setData"
@getEdit="getEdit"
:dargAble="[2].includes(moduleType)"
/>
</div> </div>
<!-- <el-col :span="8" class="g-card" style="margin-top: 20px; padding: 20px;" v-if="showPhone"> <!-- <el-col :span="8" class="g-card" style="margin-top: 20px; padding: 20px;" v-if="showPhone">
<PreviewInPhone :list="talkList" :templateInfo="talkForm.templateInfo" :liveUrl="liveUrl" /> <PreviewInPhone :list="talkList" :templateInfo="talkForm.templateInfo" :liveUrl="liveUrl" />
...@@ -96,7 +131,8 @@ ...@@ -96,7 +131,8 @@
@dialogClose="dialogClose" @dialogClose="dialogClose"
:materialTalkList="talkList" :materialTalkList="talkList"
:moduleType="moduleType" :moduleType="moduleType"
:maxlength="maxlength" /> :maxlength="maxlength"
/>
<!-- 模板库 --> <!-- 模板库 -->
<el-dialog <el-dialog
:title="otherType === 2 ? '选择群发模板' : '选择欢迎语模板'" :title="otherType === 2 ? '选择群发模板' : '选择欢迎语模板'"
...@@ -104,7 +140,8 @@ ...@@ -104,7 +140,8 @@
width="60%" width="60%"
append-to-body append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
v-if="welcomVisible"> v-if="welcomVisible"
>
<TemplateLibrary @changeObj="changeObj" :isGroup="otherType === 2" /> <TemplateLibrary @changeObj="changeObj" :isGroup="otherType === 2" />
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectModle" :loading="libraryLoading">确 定</el-button> <el-button type="primary" @click="selectModle" :loading="libraryLoading">确 定</el-button>
...@@ -119,12 +156,14 @@ ...@@ -119,12 +156,14 @@
:tplType="tplType" :tplType="tplType"
:moduleType="moduleType" :moduleType="moduleType"
:maxlength="maxlength" :maxlength="maxlength"
:noApplets="otherType === 3" /> :noApplets="otherType === 3"
/>
<SelectUser <SelectUser
:defaultValues="selectedUserList" :defaultValues="selectedUserList"
:visible.sync="dialogVisibleSelectUser" :visible.sync="dialogVisibleSelectUser"
title="选择使用员工" title="选择使用员工"
@success="selectedUser"></SelectUser> @success="selectedUser"
></SelectUser>
</div> </div>
</template> </template>
...@@ -210,6 +249,11 @@ export default { ...@@ -210,6 +249,11 @@ export default {
} }
}, },
}, },
// 最多上传的素材数
maxlengthTwo: {
type: Number,
default: 9,
},
// 查询会话详情的id // 查询会话详情的id
talkId: { talkId: {
type: string, type: string,
...@@ -272,6 +316,12 @@ export default { ...@@ -272,6 +316,12 @@ export default {
}, },
}, },
watch: { watch: {
maxlengthTwo: {
handler(val) {
this.maxlength = val
},
immediate: true,
},
baseData(val) { baseData(val) {
if (val.templateInfo) { if (val.templateInfo) {
this.form.templateInfo = val.templateInfo this.form.templateInfo = val.templateInfo
...@@ -432,7 +482,6 @@ export default { ...@@ -432,7 +482,6 @@ export default {
selectModle() { selectModle() {
this.libraryLoading = true this.libraryLoading = true
if (this.selectObj) { if (this.selectObj) {
console.log(this.selectObj)
this.talkForm = this.selectObj this.talkForm = this.selectObj
this.welcomVisible = false this.welcomVisible = false
this.talkList = [...this.selectObj.weMaterialList] this.talkList = [...this.selectObj.weMaterialList]
...@@ -594,7 +643,6 @@ export default { ...@@ -594,7 +643,6 @@ export default {
} }
if (!this.templateType) { if (!this.templateType) {
this.talkForm.talkMaterialList = [] this.talkForm.talkMaterialList = []
// console.log(this.talkList)
this.talkList.forEach((item, index) => { this.talkList.forEach((item, index) => {
this.talkForm.talkMaterialList.push({ materialId: item.id, sort: index }) this.talkForm.talkMaterialList.push({ materialId: item.id, sort: index })
}) })
...@@ -795,7 +843,7 @@ export default { ...@@ -795,7 +843,7 @@ export default {
if (this.otherType === 3 || this.tplType == 3) { if (this.otherType === 3 || this.tplType == 3) {
this.maxlength = 1 this.maxlength = 1
} else { } else {
this.maxlength = 9 this.maxlength = this.maxlengthTwo
} }
if ([3, 4].includes(this.moduleType)) { if ([3, 4].includes(this.moduleType)) {
this.fontType = '附件' this.fontType = '附件'
...@@ -817,6 +865,16 @@ export default { ...@@ -817,6 +865,16 @@ export default {
} }
} }
} }
::v-deep .el-button.is-disabled {
color: #fff;
background-color: #cccccc;
border-color: #cccccc;
}
::v-deep.el-dropdown [disabled] {
color: #fff;
background-color: #cccccc;
border-color: #cccccc;
}
.footer { .footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
<template>
<div class="select_content">
<div>
<el-checkbox
v-model="form.executeUserCondit.change"
@change="clearUserData"
label="选择成员"
></el-checkbox>
<div class="select_unit" v-if="form.executeUserCondit.change">
<div v-if="selectedUserList.length > 0">
<el-tag size="medium" v-for="(item, index) in selectedUserList" :key="index">{{
item.name
}}</el-tag>
</div>
<el-button
icon="el-icon-plus"
type="primary"
plain
size="mini"
@click="dialogVisibleSelectUser = true"
>
{{ selectedUserList.length ? '修改' : '选择' }}员工
</el-button>
</div>
</div>
<div>
<el-checkbox
v-model="form.executeDeptCondit.change"
@change="clearDeptsData"
label="选择部门范围与岗位"
>
</el-checkbox
><el-popover style="display: inline-block; margin-left: 5px" placement="top" trigger="hover">
<div slot="reference">
<i class="el-icon-question"></i>
</div>
<div>可根据地域行政管理规划/组织架构部门,与岗位的组合条件来筛选执行成员。</div>
</el-popover>
<div class="select_unit" v-if="form.executeDeptCondit.change">
<div v-if="selectedDeptList.length > 0">
<el-tag size="medium" v-for="(item, index) in selectedDeptList" :key="index">{{
item.deptName
}}</el-tag>
</div>
<el-button
icon="el-icon-plus"
type="primary"
plain
size="mini"
@click="dialogVisibleSelectDept = true"
>
{{ selectedDeptList.length ? '修改' : '选择' }}部门
</el-button>
</div>
<div class="select_unit" v-if="form.executeDeptCondit.change">
<div v-if="selectedPostList.length > 0">
<el-tag size="medium" v-for="(item, index) in selectedPostList" :key="index">{{
item
}}</el-tag>
</div>
<el-button
icon="el-icon-plus"
type="primary"
plain
size="mini"
@click="dialogVisibleSelectPost = true"
>
{{ selectedPostList.length ? '修改' : '选择' }}岗位
</el-button>
</div>
</div>
<SelectDept
:defaultValues="selectedDeptList"
:visible.sync="dialogVisibleSelectDept"
title="选择部门"
@success="selectedDept"
></SelectDept>
<SelectPost
:defaultValues="selectedPostList"
:visible.sync="dialogVisibleSelectPost"
title="选择岗位"
@success="selectedPost"
></SelectPost>
<SelectWeUser
:defaultValues="selectedUserList"
:visible.sync="dialogVisibleSelectUser"
title="选择使用员工"
:isOnlyLeaf="true"
@success="selectedUser"
></SelectWeUser>
</div>
</template>
<script>
import { getDeptTree, getDeptUserAll } from '@/api/organization'
import SelectDept from '@/components/SelectDept'
import SelectPost from '@/components/SelectPost'
export default {
name: 'select-member',
components: {
SelectDept,
SelectPost,
},
props: {
initData: {
type: Object,
default: {
executeUserCondit: {
change: false,
weUserIds: [],
},
executeDeptCondit: {
change: false,
deptIds: [],
posts: [],
},
},
},
},
data() {
return {
selectMember: false,
selectDept: false,
selectedUserList: [],
dialogVisibleSelectUser: false,
selectedDeptList: [],
dialogVisibleSelectDept: false,
dialogVisibleSelectPost: false,
selectedPostList: [],
form: {
executeUserCondit: {
change: false,
weUserIds: [],
},
executeDeptCondit: {
change: false,
deptIds: [],
posts: [],
},
},
}
},
methods: {
validateFn() {
if (!this.form.executeUserCondit.change && !this.form.executeDeptCondit.change) {
this.msgError('请选择执行成员!')
return false
}
if (this.form.executeUserCondit.change) {
if (
!this.form.executeUserCondit.weUserIds ||
!this.form.executeUserCondit.weUserIds.length
) {
this.msgError('请选择成员!')
return false
}
}
if (this.form.executeDeptCondit.change) {
if (
!this.form.executeDeptCondit.posts.length &&
!this.form.executeDeptCondit.deptIds.length
) {
this.msgError('请选择部门范围与岗位!')
return false
}
}
return true
},
selectedPost(data) {
this.selectedPostList = data
this.form.executeDeptCondit.posts = data
this.changeFn()
},
selectedUser(data) {
this.selectedUserList = data
this.form.executeUserCondit.weUserIds = data.map((dd) => {
return dd.userId
})
this.changeFn()
},
selectedDept(data) {
this.selectedDeptList = data
this.form.executeDeptCondit.deptIds = data.map((dd) => {
return dd.deptId
})
this.changeFn()
},
clearUserData(data) {
if (!data) {
this.selectedUserList = []
this.form.executeUserCondit.weUserIds = []
this.changeFn()
}
},
clearDeptsData(data) {
if (!data) {
this.selectedDeptList = []
this.form.executeDeptCondit.deptIds = []
this.selectedPostList = []
this.form.executeDeptCondit.posts = []
this.changeFn()
}
},
changeFn() {
this.$emit('update', this.form)
},
setEditUser() {
if (this.form.executeUserCondit.weUserIds) {
this.selectedUserList = []
getDeptUserAll().then(({ data }) => {
this.form.executeUserCondit.weUserIds.forEach((dd) => {
let index = data.findIndex((item) => item.weUserId === dd)
if (index != -1) {
data[index].userId = dd
data[index].name = data[index].userName
this.selectedUserList.push(data[index])
}
})
})
}
},
setEditDept() {
if (this.form.executeDeptCondit.deptIds.length) {
this.selectedDeptList = []
getDeptTree().then(({ data }) => {
this.form.executeDeptCondit.deptIds.forEach((dd) => {
let index = data.findIndex((item) => item.deptId === dd)
this.selectedDeptList.push(data[index])
})
})
}
if (this.form.executeDeptCondit.posts.length) {
this.selectedPostList = this.form.executeDeptCondit.posts
}
},
},
created() {
if (this.initData) {
this.form = JSON.parse(JSON.stringify(this.initData))
if (this.form && this.form.executeUserCondit.change) {
this.setEditUser()
}
if (this.form && this.form.executeDeptCondit.change) {
this.setEditDept()
}
}
},
}
</script>
<style lang="scss" scoped>
.select_content {
background-color: #ecf5ff;
padding: 20px;
border-radius: 5px;
.select_unit {
padding: 10px 25px;
}
}
</style>
<template>
<div>
<div class="g-card">
<el-steps :active="active" align-center>
<el-step title="活码设置"></el-step>
<el-step title="拉新设置"></el-step>
<el-step title="生成活码"></el-step>
</el-steps>
</div>
<div class="g-card">
<div>
<div v-if="active === 0">
<BaseInfo ref="baseInfo" :query="query" @nextBaseInfo="nextBaseInfo"></BaseInfo>
</div>
<div v-if="active === 1">
<PullNews ref="pullNews" :query="pullNewsObj" @createLiveCode="createLiveCode"></PullNews>
</div>
<div v-if="active === 2">
<GroupCode
ref="groupCode"
:query="baseInfo"
:groupCode="groupCodeQuery"
@getGroupCode="getGroupCode"
></GroupCode>
</div>
</div>
<div class="ar" style="margin-top: 30px">
<template v-if="active === 0">
<el-button @click="$router.back()">取消</el-button>
<el-button type="primary" v-loading="loading" :disabled="loading" @click="infoNext"
>下一步</el-button
>
</template>
<template v-else-if="active === 1">
<el-button @click="prev('one')">上一步</el-button>
<el-button type="primary" v-loading="loading" :disabled="loading" @click="handleGroupCode"
>生成活码</el-button
>
</template>
<template v-else>
<el-button @click="prev('two')"> 上一步 </el-button>
<el-button type="primary" @click="finished">确定</el-button>
</template>
</div>
</div>
</div>
</template>
<script>
import BaseInfo from './baseInfo'
import PullNews from './pullNews'
import GroupCode from './groupCode'
import { add, update, getDetail } from '@/api/drainageCode/pullNews'
export default {
components: {
BaseInfo,
PullNews,
GroupCode,
},
data() {
return {
loading: false,
// 当前群活码ID
groupCodeId: null,
// 当前激活的步骤
active: 0,
baseInfo: {},
functionType: 0, // 拉新方式 0红包拉新 1卡券拉新
query: {},
pullNewsObj: {},
groupCodeQuery: {},
}
},
created() {
if (this.$route.query.groupCodeId) {
this.groupCodeId = this.$route.query.groupCodeId
this.getDetail(this.$route.query.groupCodeId)
}
},
methods: {
// 活码设置里点击下一步
nextBaseInfo(form) {
this.query = Object.assign(this.query, form)
},
// 生成活码
createLiveCode(val) {
console.log(87,val);
this.query = Object.assign(this.query, val)
console.log(88,this.query);
},
getGroupCode(val) {
console.log(90, val)
// this.groupCodeQuery = Object.assign(this.groupCodeQuery, val)
},
// 下一步
// next(groupCodeId, info) {
// this.loading = false
// if (groupCodeId || info) {
// if (groupCodeId) this.groupCodeId = groupCodeId
// this.baseInfo = info
// this.active += 1
// if (this.active > 3) this.active = 1
// }
// },
// 上一步
prev(type) {
this.active -= 1
if (this.active < 0) this.active = 0
if (type === 'one') {
this.$refs.pullNews.transInfo()
console.log(this.query)
} else {
this.$refs.groupCode.transInfo()
console.log(this.groupCodeQuery)
}
if (this.query.qrName) {
// 新增
this.query.name = this.query.qrName
}
console.log(100, this.query)
},
// 完成
finished() {
// this.next()
this.$router.back()
},
infoNext() {
if (!this.$refs.baseInfo.handleValidateFn()) return
this.pullNewsObj = this.query
this.active += 1
},
// 新增或更新群活码
handleGroupCode() {
if (!this.$refs.pullNews.handleValidateFn()) return
this.loading = true
this.submit()
},
// 提交
submit() {
delete this.query.tags
if (this.groupCodeId) {
this.query.id = this.groupCodeId
}
if (this.groupCodeQuery.attachments) {
this.query = Object.assign(this.query, this.groupCodeQuery)
} else {
this.groupCodeQuery = Object.assign(this.groupCodeQuery, this.query)
}
console.log(this.query)
console.log(143, this.groupCodeQuery)
;(this.groupCodeId ? update : add)(this.query)
.then((res) => {
if (res.code === 200) {
if (!this.groupCodeId) {
// 新建
res.data.qrName = this.query.qrName
this.baseInfo = res.data
} else {
// 编辑
let form = { imageUrl: '', linkPath: '', qrName: '' }
form.imageUrl = this.query.imageUrl
form.linkPath = this.query.linkPath
form.qrName = this.query.qrName
form.qrId = this.groupCodeId
this.baseInfo = form
}
this.active = 2
this.loading = false
}
})
.catch(() => {
this.loading = false
})
},
getDetail(id) {
getDetail(id).then((res) => {
console.log(147, res)
let obj = { qrTags: [], tags: [] }
res.data.qrTags.forEach((el) => {
obj.qrTags.push(el.tagId)
obj.tags.push(el.tagName)
})
let list = [
{ scopeType: 1, userIds: [] },
{ scopeType: 2, partys: [] },
{ scopeType: 3, positions: [] },
]
if (res.data.qrUserInfos) {
res.data.qrUserInfos.forEach((item) => {
switch (item.scopeType) {
case 1:
item.userId ? list[0].userIds.push(item.userId) : ''
break
case 2:
item.party ? list[1].partys.push(item.party) : ''
break
case 3:
item.position ? list[2].positions.push(item.position) : ''
break
}
})
}
this.query = Object.assign(res.data, obj)
this.$set(this.query, 'qrUserInfos', list)
console.log(180, this.query)
})
},
// 管理实际群活码
// handleRealCode() {
// this.next()
// },
},
}
</script>
<style scoped lang="scss">
.page-content {
padding-top: 50px;
padding-bottom: 20px;
}
</style>
<template>
<div>
<!-- 领取统计 -->
<CardGroupIndex :data="form.type === 1 ? cardDataRed : cardDataCard"></CardGroupIndex>
<div class="g-card">
<div class="g-card-title">数据趋势</div>
<search-title :showMore="true" @search="getLineData"></search-title>
<div style="display: flex; justify-content: space-between">
<chart-line
style="height: 300px; width: 48%"
:legend="legendRedOne"
:xData="xdataOne"
:series="seriesOne"
></chart-line>
<chart-line
style="height: 300px; width: 48%"
:legend="legendRedTwo"
:xData="xdata"
:series="series"
></chart-line>
</div>
</div>
<div class="g-card">
<div class="g-card-title">数据报表</div>
<div style="display: flex; justify-content: space-between">
<search-title :showMore="true" @search="getTableFn"></search-title>
<el-button type="primary" size="mini" @click="exportFn" v-loading="exportLoading"
>导出Excel</el-button
>
</div>
<el-table v-loading="loading" :data="tableList" style="width: 100%">
<el-table-column
label="日期"
align="center"
min-width="100"
prop="dateTime"
show-overflow-tooltip
/>
<el-table-column
:label="true ? '红包领取总数' : '卡券领取总数'"
align="center"
prop="totalNum"
min-width="100"
show-overflow-tooltip
></el-table-column>
<el-table-column
:label="true ? '红包领取总金额(元)' : '卡券领取总金额(元)'"
align="center"
prop="totalAmount"
min-width="100"
show-overflow-tooltip
></el-table-column>
<el-table-column
:label="true ? '今日红包领取数' : '今日卡券领取数'"
align="center"
prop="todayNum"
min-width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
:label="true ? '今日红包领取金额(元)' : '今日卡券领取金额(元)'"
align="center"
prop="todayAmount"
min-width="120"
show-overflow-tooltip
></el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getTableChangeSize()"
/>
</div>
</div>
</template>
<script>
import { dateFormat } from '@/utils/index'
import ChartBar from '@/components/ChartBar.vue'
import ChartLine from '@/components/ChartLine.vue'
import SearchTitle from '../components/SearchTitle.vue'
import {
getTotalData,
getRedTableData,
getMoneyLineData,
getNumLineData,
getRedTableExport,
} from '@/api/drainageCode/pullNews'
export default {
name: 'identity-code-statistics',
components: {
SearchTitle,
ChartLine,
ChartBar,
},
data() {
return {
exportLoading: false,
legend: ['新客扫码人数', '添加新客人数', '老客扫码人数', '流失客户人数'],
legendRedOne: ['红包领取个数'],
legendRedTwo: ['红包领取金额(元)'],
legendCardOne: ['卡券领取个数'],
legendCardTwo: ['卡券领取面额(元)'],
xdata: [],
series: [],
xdataOne: [],
seriesOne: [],
cardData: [],
cardDataRed: [
{
title: '红包领取总数',
tips: '当前活码新客累计领取红包的总个数',
value: 0,
},
{
title: '红包领取总金额(元)',
tips: '当前活码新客累计领取红包的总金额',
value: 0,
},
{
title: '今日红包领取数',
tips: '当前活码今日新客领取红包的总个数',
value: 0,
title1: '较昨日',
value1: 0,
},
{
title: '今日红包领取金额(元)',
tips: '当前活码今日新客领取红包的总金额',
value: 0,
title1: '较昨日',
value1: 0,
},
],
cardDataCard: [
{
title: '卡券领取总数',
tips: '当前活码新客累计领取卡券的总个数',
value: 0,
},
{
title: '卡券领取总面额(元)',
tips: '当前活码新客累计领取卡券的总面额',
value: 0,
},
{
title: '今日卡券领取数',
tips: '当前活码今日新客领取卡券的总个数',
value: 0,
title1: '较昨日',
value1: 0,
},
{
title: '今日红包领取面额(元)',
tips: '当前活码今日新客领取卡券的总面额',
value: 0,
title1: '较昨日',
value1: 0,
},
],
total: 0,
query: {
pageSize: 10,
pageNum: 1,
},
tableList: [],
loading: false,
searchData: {},
bar: [],
value: [],
tableSearch: {},
addWeUserState: null,
id: '',
}
},
props: {
form: {
type: Object,
default: {},
},
},
methods: {
exportFn() {
this.$confirm('确认导出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.exportLoading = true
return getRedTableExport(Object.assign({}, this.query, this.tableSearch))
})
.then((res) => {
if (res) {
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '数据明细-' + dateFormat(new Date()) + '.xlsx' // 重命名文件
link.click()
URL.revokeObjectURL(url)
}
})
.catch((error) => {
console.error(error)
})
.finally(() => {
this.exportLoading = false
})
},
getTabTotalFn() {
getTotalData({ qrId: this.id }).then((res) => {
this.cardDataRed[0].value = res.data.totalNum
this.cardDataRed[1].value = res.data.totalAmount
this.cardDataRed[2].value = res.data.todayNum
res.data.todayNumDiff ? (this.cardDataRed[2].value1 = res.data.todayNumDiff) : ''
this.cardDataRed[3].value = res.data.todayAmount
res.data.todayAmountDiff ? (this.cardDataRed[3].value1 = res.data.todayAmountDiff) : ''
})
},
getLineData(data) {
this.$forceUpdate()
data.qrId = this.id
getMoneyLineData(data).then((res) => {
this.xdata = []
this.series = []
if (res.data) {
this.xdata = res.data.xaxis
this.series = [res.data.yaxis]
this.$forceUpdate()
}
})
getNumLineData(data).then((res) => {
this.xdataOne = []
this.seriesOne = []
if (res.data) {
this.xdataOne = res.data.xaxis
this.seriesOne = [res.data.yaxis]
this.$forceUpdate()
}
})
},
getTableChangeSize() {
this.loading = true
// this.query.id = this.id
getRedTableData(Object.assign({}, this.query)).then((res) => {
this.tableList = res.rows
this.total = Number(res.total)
this.loading = false
})
},
getTableFn(data) {
this.loading = true
this.query.qrId = this.id
this.query.beginTime = data.beginTime
this.query.endTime = data.endTime
this.getTableChangeSize()
},
},
created() {
this.addWeUserState = this.$route.query.addWeUserState
this.id = this.$route.query.groupId
this.getTabTotalFn()
},
}
</script>
<style lang="scss" scoped></style>
<template>
<div>
<!-- 详情页面 -->
<el-tabs v-model="activeName">
<el-tab-pane label="活码信息" name="first"
><LiveCodeInfo :form="form" v-if="activeName === 'first'"
/></el-tab-pane>
<el-tab-pane label="活码统计" name="second"
><LiveCodeStatic :form="form" v-if="activeName === 'second'"
/></el-tab-pane>
<el-tab-pane label="领取统计" name="third"
><CollectionStatistics :form="form" v-if="activeName === 'third'"
/></el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import LiveCodeInfo from './liveCodeInfo'
import LiveCodeStatic from './liveCodeStatic'
import CollectionStatistics from './collectionStatistics'
import { getDetail } from '@/api/drainageCode/pullNews'
export default {
components: {
LiveCodeInfo,
LiveCodeStatic,
CollectionStatistics,
},
data() {
return {
activeName: 'first',
groupId: null,
form: {},
}
},
mounted() {
this.groupId = this.$route.query.groupId
if (this.groupId) {
this.getDetail(this.groupId)
}
},
methods: {
getDetail(id) {
getDetail(id).then((res) => {
this.form = res.data
})
},
},
}
</script>
<style></style>
<script>
export default {
props: {
// 实际群活码
groupCodeId: {
type: String,
default: '',
},
query: {
type: Object,
default: {
imgUrl: '',
},
},
groupCode: {
type: Object,
default: {},
},
},
data() {
return {
// groupCode: null,
clipboard: null,
}
},
watch: {
query: {
handler(val) {},
immediate: true,
},
},
computed: {
// codeUrl() {
// return this.groupCode ? this.groupCode.codeUrl : ''
// },
},
mounted() {
this.clipboard = new this.ClipboardJS('#copyUrl')
},
created() {
// this.getGroupDetail()
},
destroyed() {
this.clipboard.destroy()
},
methods: {
// 获取群活码信息
// getGroupDetail() {
// if (!this.groupCodeId) return
// this.groupCode = this.data
// },
transInfo() {
this.$emit('getGroupCode', this.groupCode)
},
// 下载
handleDownload(url, name) {
let image = new Image()
image.setAttribute('crossOrigin', 'anonymous')
image.src = url
image.onload = () => {
let canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
let ctx = canvas.getContext('2d')
ctx.drawImage(image, 0, 0, image.width, image.height)
canvas.toBlob((blob) => {
let url = URL.createObjectURL(blob)
let Link = document.createElement('a')
Link.download = name
Link.href = url
Link.click()
Link.remove()
// 用完释放URL对象
URL.revokeObjectURL(url)
})
}
},
},
}
</script>
<template>
<div class="page">
<div class="code-wrapper">
<div class="code-success">
<el-button type="success" icon="el-icon-check" circle></el-button>
</div>
<div class="code-text">拉新活码创建成功,支持复制二维码链接或直接下载</div>
<el-image
:src="query.imageUrl"
class="code-image"
style="width: 160px; height: 200px"
></el-image>
<div class="code-actions">
<el-button id="copyUrl" type="text" :data-clipboard-text="query.linkPath"
>复制链接</el-button
>
<el-button type="text" @click="handleDownload(query.imageUrl, query.qrName)"
>下载二维码</el-button
>
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.code-wrapper {
text-align: center;
.code-success,
.code-text,
.code-image,
.code-actions {
padding: 20px 0;
}
}
</style>
<template>
<div>
<!-- 活码统计 -->
<CardGroupIndex :data="cardData"></CardGroupIndex>
<div class="g-card">
<div class="g-card-title">数据趋势</div>
<search-title :showMore="true" @search="getLineData"></search-title>
<chart-line
style="height: 300px"
:legend="legend"
:xData="xdata"
:series="series"
></chart-line>
</div>
<div class="g-card">
<div class="g-card-title">数据报表</div>
<div style="display: flex; justify-content: space-between">
<search-title :showMore="true" @search="getTableFn"></search-title>
<el-button type="primary" size="mini" @click="exportFn" v-loading="exportLoading"
>导出Excel</el-button
>
</div>
<el-table v-loading="loading" :data="tableList" style="width: 100%">
<el-table-column
label="日期"
align="center"
min-width="100"
prop="dateTime"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{ dealDate(scope.row.dateTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column
label="总扫码次数"
align="center"
prop="newCustomerScanNumber"
min-width="100"
show-overflow-tooltip
></el-table-column> -->
<el-table-column
label="新增新客总数"
align="center"
prop="totalNum"
min-width="100"
show-overflow-tooltip
></el-table-column>
<!-- <el-table-column
label="今日扫码次数"
align="center"
prop="oldCustomerScanNumber"
min-width="100"
show-overflow-tooltip
></el-table-column> -->
<el-table-column
label="今日新增新客数"
align="center"
prop="todayNum"
min-width="120"
show-overflow-tooltip
></el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getTableChangeSize()"
/>
</div>
</div>
</template>
<script>
import { dateFormat } from '@/utils/index'
import ChartBar from '@/components/ChartBar.vue'
import ChartLine from '@/components/ChartLine.vue'
import SearchTitle from '../components/SearchTitle.vue'
import moment from 'moment'
import {
getLineData,
getTableData,
getTableExport,
} from '@/api/drainageCode/pullNews'
export default {
name: 'identity-code-statistics',
components: {
SearchTitle,
ChartLine,
ChartBar,
},
props: {
form: {
type: Object,
default: {},
},
},
watch: {},
data() {
return {
exportLoading: false,
legend: ['新增新客数'],
xdata: [],
series: [],
cardData: [
{
title: '新增新客总数',
tips: '当前活码累计新增的新客总数',
value: 0,
},
{
title: '今日新增新客数',
tips: '今日通过当前活码新增的客户总数',
value: 0,
title1: '较昨日',
value1: 0,
},
],
total: 0,
query: {
pageSize: 10,
pageNum: 1,
},
tableList: [],
loading: false,
searchData: {},
bar: [],
value: [],
tableSearch: {},
addWeUserState: null,
id: '',
}
},
methods: {
dealDate(data) {
return moment(data).format('YYYY-MM-DD')
},
exportFn() {
this.$confirm('确认导出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.exportLoading = true
return getTableExport(Object.assign({}, this.query, this.tableSearch))
})
.then((res) => {
if (res) {
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '数据明细-' + dateFormat(new Date()) + '.xlsx' // 重命名文件
link.click()
URL.revokeObjectURL(url)
}
})
.catch((error) => {
console.error(error)
})
.finally(() => {
this.exportLoading = false
})
},
// getTabTotalFn() {
// getIdentityCodeTab({ id: this.id, addWeUserState: this.addWeUserState }).then((res) => {
// this.cardData[0].value = res.data.tdNewCustomerScanNumber
// // this.cardData[0].value1 =
// // Number(res.data.tdNewCustomerScanNumber) - Number(res.data.ydNewCustomerScanNumber)
// this.cardData[1].value = res.data.tdAddCustomerNumber
// this.cardData[1].value1 =
// Number(res.data.tdAddCustomerNumber) - Number(res.data.ydAddCustomerNumber)
// // this.cardData[2].value = res.data.tdOldCustomerScanNumber
// // this.cardData[2].value1 =
// // Number(res.data.tdOldCustomerScanNumber) - Number(res.data.ydOldCustomerScanNumber)
// // this.cardData[3].value = res.data.tdLostCustomerNumber
// // this.cardData[3].value1 =
// // Number(res.data.tdLostCustomerNumber) - Number(res.data.ydLostCustomerNumber)
// })
// },
getLineData(data) {
this.$forceUpdate()
// console.log(177, this.form)
data.qrId = this.form.id
data.qrName = this.form.name
let qrUserIds = []
if (this.form.qrUserInfos) {
this.form.qrUserInfos.forEach((item) => {
if (item.scopeType === 1) {
qrUserIds.push(item.userId)
}
})
}
data.qrUserIds = qrUserIds.toString()
data.type = this.form.type
getLineData(data).then((res) => {
this.xdata = []
this.series = []
if (res.data) {
this.cardData[0].value = res.data.total
this.cardData[1].value = res.data.today
this.cardData[1].value1 = res.data.todayDiff
this.xdata = res.data.xaxis
this.series = [res.data.yaxis]
this.$forceUpdate()
}
})
},
getTableChangeSize() {
this.loading = true
// this.query.id = this.id
getTableData(Object.assign({}, this.query)).then((res) => {
this.tableList = res.rows
this.total = Number(res.total)
this.loading = false
})
},
getTableFn(data) {
this.loading = true
this.query.qrId = this.form.id
this.query.qrName = this.form.name
let qrUserIds = []
if (this.form.qrUserInfos) {
this.form.qrUserInfos.forEach((item) => {
if (item.scopeType === 1) {
qrUserIds.push(item.userId)
}
})
}
this.query.qrUserIds = qrUserIds.toString()
this.query.type = this.form.type
this.query.beginTime = data.beginTime
this.query.endTime = data.endTime
this.getTableChangeSize()
// getTableData(Object.assign({}, this.query, data)).then((res) => {
// this.tableList = res.rows
// this.total = Number(res.total)
// this.loading = false
// })
},
},
created() {
this.addWeUserState = this.$route.query.addWeUserState
this.id = this.$route.query.groupId
// this.getTabTotalFn()
// this.getTableFn()
},
}
</script>
<style lang="scss" scoped></style>
<template> <template>
<div> <div>
<el-form inline label-position="right" :model="query" label-width="170px" ref="queryForm" class="top-search"> <el-form
inline
label-position="right"
:model="query"
label-width="170px"
ref="queryForm"
class="top-search"
>
<el-form-item label="红包状态" prop="status"> <el-form-item label="红包状态" prop="status">
<el-select clearable v-model="query.status" placeholder="请选择"> <el-select clearable v-model="query.status" placeholder="请选择">
<el-option v-for="(item, key) in dictStatusType" :key="key" :label="item" :value="key"></el-option> <el-option
v-for="(item, key) in dictStatusType"
:key="key"
:label="item"
:value="key"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发送场景" prop="sceneType"> <el-form-item label="发送场景" prop="sceneType">
<el-select clearable v-model="query.sceneType" placeholder="请选择"> <el-select clearable v-model="query.sceneType" placeholder="请选择">
<el-option v-for="(item, key) in dictSendSence" :key="key" :label="item" :value="key"></el-option> <el-option
v-for="(item, key) in dictSendSence"
:key="key"
:label="item"
:value="key"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="创建人" prop="createBy"> <!-- <el-form-item label="创建人" prop="createBy">
...@@ -39,7 +56,9 @@ ...@@ -39,7 +56,9 @@
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column fixed width="200" label="红包" align="center" prop="name"> <el-table-column fixed width="200" label="红包" align="center" prop="name">
<div class="red-packet-message" slot-scope="{ row }">{{ row.name }}</div> <div class="red-packet-message" slot-scope="{ row }">
<div class="red-packet-text">{{ row.name }}</div>
</div>
</el-table-column> </el-table-column>
<el-table-column label="红包金额(元)" align="center" prop="money" /> <el-table-column label="红包金额(元)" align="center" prop="money" />
<el-table-column label="发送次数" align="center" prop="sendTimes" /> <el-table-column label="发送次数" align="center" prop="sendTimes" />
...@@ -53,8 +72,19 @@ ...@@ -53,8 +72,19 @@
<div>{{ dictStatusType[row.status] }}</div> <div>{{ dictStatusType[row.status] }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最近更新时间" align="center" width="180" prop="createTime"></el-table-column> <el-table-column
<el-table-column fixed="right" label="操作" align="center" width="180" class-name="small-padding fixed-width"> label="最近更新时间"
align="center"
width="180"
prop="createTime"
></el-table-column>
<el-table-column
fixed="right"
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="edit(row)">编辑</el-button> <el-button type="text" @click="edit(row)">编辑</el-button>
<el-button type="text" @click="startOrStop(row)"> <el-button type="text" @click="startOrStop(row)">
...@@ -66,17 +96,34 @@ ...@@ -66,17 +96,34 @@
</el-table> </el-table>
<div class="bottom"> <div class="bottom">
<div style="align-self: flex-end"> <div style="align-self: flex-end">
<el-button type="primary" :disabled="selectedIds.length == 0" plain size="mini" @click="remove(null)"> <el-button
type="primary"
:disabled="selectedIds.length == 0"
plain
size="mini"
@click="remove(null)"
>
批量删除 批量删除
</el-button> </el-button>
</div> </div>
<pagination :total="total" :page.sync="query.pageNum" :limit.sync="query.pageSize" @pagination="getList()" /> <pagination
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
</div> </div>
</div> </div>
<!-- 新建红包 --> <!-- 新建红包 -->
<el-dialog title="新建红包" :visible.sync="addDialogVisible" :close-on-click-modal="false"> <el-dialog title="新建红包" :visible.sync="addDialogVisible" :close-on-click-modal="false">
<el-form ref="addForm" :model="addForm" :rules="addRules" label-position="right" label-width="120px"> <el-form
ref="addForm"
:model="addForm"
:rules="addRules"
label-position="right"
label-width="120px"
>
<el-form-item label="红包金额(元)" prop="money"> <el-form-item label="红包金额(元)" prop="money">
<el-input-number <el-input-number
placeholder="请输入" placeholder="请输入"
...@@ -84,7 +131,8 @@ ...@@ -84,7 +131,8 @@
:precision="2" :precision="2"
:step="0.1" :step="0.1"
:max="200" :max="200"
:min="1"></el-input-number> :min="1"
></el-input-number>
<div class="sub-des">精确到小数点后两位,可输入1~200</div> <div class="sub-des">精确到小数点后两位,可输入1~200</div>
</el-form-item> </el-form-item>
<el-form-item label="发送场景" prop="sceneType"> <el-form-item label="发送场景" prop="sceneType">
...@@ -96,10 +144,19 @@ ...@@ -96,10 +144,19 @@
<div class="sub-des">发送客户群时支持选择拼手气红包或普通金额相同红包</div> <div class="sub-des">发送客户群时支持选择拼手气红包或普通金额相同红包</div>
</el-form-item> </el-form-item>
<el-form-item label="红包名称" prop="name"> <el-form-item label="红包名称" prop="name">
<el-input type="text" placeholder="请输入红包名称" v-model="addForm.name" maxlength="16"></el-input> <el-input
type="text"
placeholder="请输入红包名称"
v-model="addForm.name"
maxlength="16"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="预览"> <el-form-item label="预览">
<div class="red-packet-message">{{ addForm.name || '红包名称' }}</div> <div class="red-packet-message">
<div class="red-packet-text">
{{ addForm.name || '红包名称' }}
</div>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -110,7 +167,13 @@ ...@@ -110,7 +167,13 @@
<!-- 限额设置 --> <!-- 限额设置 -->
<el-dialog title="限额设置" :visible.sync="limitDialogVisible" :close-on-click-modal="false"> <el-dialog title="限额设置" :visible.sync="limitDialogVisible" :close-on-click-modal="false">
<el-form ref="limitForm" :model="limitForm" :rules="limitRules" label-position="right" label-width="180px"> <el-form
ref="limitForm"
:model="limitForm"
:rules="limitRules"
label-position="right"
label-width="180px"
>
<el-form-item label="单日付款总额(元)" prop="singleDayPay"> <el-form-item label="单日付款总额(元)" prop="singleDayPay">
<el-input-number <el-input-number
v-model="limitForm.singleDayPay" v-model="limitForm.singleDayPay"
...@@ -118,12 +181,16 @@ ...@@ -118,12 +181,16 @@
:precision="2" :precision="2"
:step="0.1" :step="0.1"
:min="0" :min="0"
:max="1000000"></el-input-number> :max="1000000"
></el-input-number>
<!-- <el-input v-model="limitForm.singleDayPay" placeholder="请输入金额"></el-input> --> <!-- <el-input v-model="limitForm.singleDayPay" placeholder="请输入金额"></el-input> -->
<div class="sub-des">精确到小数点后两位,不超过100万元</div> <div class="sub-des">精确到小数点后两位,不超过100万元</div>
</el-form-item> </el-form-item>
<el-form-item label="单日每客户收红包次数" prop="singleCustomerReceiveNum"> <el-form-item label="单日每客户收红包次数" prop="singleCustomerReceiveNum">
<el-input v-model="limitForm.singleCustomerReceiveNum" placeholder="请输入次数"></el-input> <el-input
v-model="limitForm.singleCustomerReceiveNum"
placeholder="请输入次数"
></el-input>
<div class="sub-des">输入 1-10 的正整数</div> <div class="sub-des">输入 1-10 的正整数</div>
</el-form-item> </el-form-item>
<el-form-item label="单日每客户收红包总额" prop="singleCustomerReceiveMoney"> <el-form-item label="单日每客户收红包总额" prop="singleCustomerReceiveMoney">
...@@ -132,7 +199,8 @@ ...@@ -132,7 +199,8 @@
:precision="2" :precision="2"
:step="0.1" :step="0.1"
:min="0" :min="0"
:max="1000"></el-input-number> :max="1000"
></el-input-number>
<!-- <el-input v-model="limitForm.singleCustomerReceiveMoney" placeholder="请输入金额"></el-input> --> <!-- <el-input v-model="limitForm.singleCustomerReceiveMoney" placeholder="请输入金额"></el-input> -->
<div class="sub-des">精确到小数点后两位,不超过1000元</div> <div class="sub-des">精确到小数点后两位,不超过1000元</div>
</el-form-item> </el-form-item>
...@@ -146,7 +214,14 @@ ...@@ -146,7 +214,14 @@
</template> </template>
<script> <script>
import { getList, startOrStop, addOrUpdate, remove, getLimit, setLimit } from '@/api/redPacketTool/enterprisePacket' import {
getList,
startOrStop,
addOrUpdate,
remove,
getLimit,
setLimit,
} from '@/api/redPacketTool/enterprisePacket'
import col from '@/utils/calculation' import col from '@/utils/calculation'
function validateAmount(rule, value, callback) { function validateAmount(rule, value, callback) {
if (value == '') { if (value == '') {
...@@ -155,7 +230,12 @@ function validateAmount(rule, value, callback) { ...@@ -155,7 +230,12 @@ function validateAmount(rule, value, callback) {
} }
value = Number(value) value = Number(value)
if (Number.isNaN(value) || value < 0.01 || value > 1e6 || !Number.isInteger(col.accMul(value, 100))) { if (
Number.isNaN(value) ||
value < 0.01 ||
value > 1e6 ||
!Number.isInteger(col.accMul(value, 100))
) {
callback('请输入0.01-1000000的数字,精确到小数点后两位') callback('请输入0.01-1000000的数字,精确到小数点后两位')
} else { } else {
callback() callback()
...@@ -169,7 +249,12 @@ function validateAmount1(rule, value, callback) { ...@@ -169,7 +249,12 @@ function validateAmount1(rule, value, callback) {
value = Number(value) value = Number(value)
console.log(col.accMul(value, 100)) console.log(col.accMul(value, 100))
if (Number.isNaN(value) || value < 0.01 || value > 200 || !Number.isInteger(col.accMul(value, 100))) { if (
Number.isNaN(value) ||
value < 0.01 ||
value > 200 ||
!Number.isInteger(col.accMul(value, 100))
) {
callback('请输入0.01-200.00的数字,精确到小数点后两位') callback('请输入0.01-200.00的数字,精确到小数点后两位')
} else { } else {
callback() callback()
...@@ -182,7 +267,12 @@ function validateClientReceiveNum(rule, value, callback) { ...@@ -182,7 +267,12 @@ function validateClientReceiveNum(rule, value, callback) {
} }
// value = Number(value) // value = Number(value)
if (Number.isNaN(Number(value)) || Number(value) < 1 || Number(value) > 10 || value.toString().indexOf('.') > -1) { if (
Number.isNaN(Number(value)) ||
Number(value) < 1 ||
Number(value) > 10 ||
value.toString().indexOf('.') > -1
) {
callback('请输入 1-10 的正整数') callback('请输入 1-10 的正整数')
} else { } else {
callback() callback()
...@@ -244,7 +334,7 @@ export default { ...@@ -244,7 +334,7 @@ export default {
'app/setBusininessDesc', 'app/setBusininessDesc',
` `
<div>用于快捷创建企业红包模板,便于员工通过侧边栏快捷发送红包</div> <div>用于快捷创建企业红包模板,便于员工通过侧边栏快捷发送红包</div>
`, `
) )
}, },
methods: { methods: {
...@@ -354,11 +444,18 @@ export default { ...@@ -354,11 +444,18 @@ export default {
text-align: left; text-align: left;
width: 175px; width: 175px;
height: 75px; height: 75px;
padding: 12px 0 0 50px; padding: 20px 10px 0 54px;
color: #fff; color: #fff;
line-height: 1.15; line-height: 1.15;
font-size: 18px; font-size: 14px;
font-weight: 500; font-weight: 500;
background: url('../../assets/image/red-packet-1.png') 0 0/100% 100% no-repeat; background: url('../../assets/image/newred1.png') 0 0/100% 100% no-repeat;
.red-packet-text {
width: 100%;
height: 30px;
overflow: hidden;
white-space: nowrap; // 强制一行
text-overflow: ellipsis; // 文字溢出显示省略号
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!