Commit 777abd7d by 匡雅琴

新增营销素材页面

1 parent 0c6a3c0e
......@@ -48,7 +48,7 @@
</template> -->
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="'请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
......
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="!dialogVisible">
<el-form ref="materialGroupAddForm" :model="materialGroupAddForm" label-width="120px" :rules="materialGroupAddRules">
<el-form-item label="分组名称:" prop="groupName">
<el-input v-model="materialGroupAddForm.groupName" maxlength="8" show-word-limit></el-input>
</el-form-item>
<el-form-item label="业务类型:" prop="businessType">
<el-checkbox-group v-model="materialGroupAddForm.businessType" @change="handleCheckChange">
<el-checkbox v-for="value in businessTypes" :key="value" :label="value">{{ value }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<span>添加业务类型,该素材组里面的所有素材均会添加此业务类型</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm">确定创建</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'addMaterialGroupDia',
data() {
return {
title: '新增素材组',
dialogVisible: false,
materialGroupAddForm: {
groupName: '',
businessType: []
},
businessTypes: ['整车/新车','保养','维修','车险','二手车','改装','汽车金融','零配件/精品','通用(节假日等关怀素材)'],
materialGroupAddRules: {
groupName: [
{ required: true, message: '请输入分组名称', trigger: 'blur' },
{ max: 16, message: '分组名称最长为8个字', trigger: 'blur' }
]
}
}
},
methods: {
init(value) {
// console.log(value, '~~~~');
if (value == 1) {
this.materialGroupAddForm = {
groupName: '',
businessType: []
}
}
this.dialogVisible = true
},
// 创建
submitForm() {
this.$refs.materialGroupAddForm.validate((valid) => {
if (valid) {
this.$emit('addMaterialGroup', this.materialGroupAddForm)
this.dialogVisible = false
} else {
alert('请输入分组名称')
return false;
}
});
},
handleCheckChange(val) {
console.log(val);
this.materialGroupAddForm.businessType = val
// console.log(this.materialGroupAddForm);
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<glsx-combi-form ref="readPerDetailFormRef" :formObj="searchForm" :formData="readPerDetailFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="default" :size="size" @click="handleSearch(scope)">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span>
</glsx-combi-form>
<GLTable ref="readPerDetailRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="readPerDetailTableData" :pageConf="pageConf" :tableTotal="tableTotal">
</GLTable>
</div>
</template>
<script>
import url from "@/assets/empty.png"
export default {
name: 'readPerDetail',
data() {
return {
url,
searchForm: {
staffName: ''
},
readPerDetailFormData: [
{
label: '客户名称:',
name: 'cunstormName',
maxlength: 10,
type: 'input'
},
{
label: '发送人:',
name: 'staffName',
maxlength: 10,
type: 'input'
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'cunstormName'
},
{
label: '发送人',
prop: 'staffName'
},
{
label: '所属企微成员',
prop: 'resdTimes'
},
{
label: '阅读次数',
prop: 'readTimes'
},
{
label: '首次阅读时间',
prop: 'firstReadTime'
},
{
label: '最后阅读时间',
prop: 'lastReadTime'
}
]
}
}
}
}
</script>
<style lang="" scoped>
</style>
<template>
<div>
<glsx-combi-form ref="staffSendFormRef" :formObj="searchForm" :formData="staffSendFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="default" :size="size" @click="handleSearch(scope)">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span>
</glsx-combi-form>
<GLTable ref="materialRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="staffSendTableData" :pageConf="pageConf" :tableTotal="tableTotal">
</GLTable>
</div>
</template>
<script>
import url from "@/assets/empty.png"
export default {
name: 'staffSendDetail',
data() {
return {
url,
searchForm: {
staffName: ''
},
staffSendFormData: [
{
label: '姓名:',
name: 'staffName',
type: 'input'
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '发送次数',
prop: 'sendTimes',
sortable: true
},
{
label: '阅读次数',
prop: 'resdTimes',
sortable: true
},
{
label: '阅读人数',
prop: 'readPer'
},
{
label: '打开率',
prop: 'openRate'
}
]
}
}
}
}
</script>
<style lang="" scoped>
</style>
<template>
<div>
<div id="div-demo"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'textBox',
data() {
return {
content: '',
editorOption: {},
}
},
mounted() {
this.getEdit()
},
methods: {
getEdit() {
var editor = new E('#div-demo')
editor.config.uploadImgShowBase64 = true
editor.config.showMenuTooltips = true
editor.config.menuTooltipPosition = 'down'
editor.config.height = 400
editor.config.uploadVideoServer = '/api/upload-video'
editor.config.excludeMenus = [
'code'
]
editor.create()
}
}
}
</script>
<style lang="scss" scoped>
#div-demo {
margin-top: 40px;
}
.el-form .editor{
margin-top: 20px;
}
.myQuillEditor {
background-color: #fff;
height: 200px;
}
</style>
\ No newline at end of file
<template>
<div>
<div class="materialDetail">
<span class="materialDetail-title top-title">素材详情</span>
<el-divider></el-divider>
<div class="matrial-detail">
<div class="matrial-detail-left">
<span class="materialDetail-title">我是素材名称我是素材名称</span>
<span class="matrial-detail-left-pre">预览</span>
</div>
<div @click="detailShowVisible" class="matrial-detail-unfold">
<span v-if="!detailVisible">
展开
<i class="el-icon-arrow-down"></i>
</span>
<span v-else>
收起
<i class="el-icon-arrow-up"></i>
</span>
</div>
</div>
<div v-show="detailVisible" class="materialDetail-desc">
<el-descriptions>
<el-descriptions-item label="素材地址:">kooriookwehrhdfvssdgdfhtykyuirami</el-descriptions-item>
<el-descriptions-item label="创建时间:">18100000000</el-descriptions-item>
<el-descriptions-item label="素材组:">苏州市</el-descriptions-item>
<el-descriptions-item label="素材类型:">苏州市</el-descriptions-item>
<el-descriptions-item label="业务类型:">苏州市</el-descriptions-item>
<el-descriptions-item label="动态通知:">苏州市</el-descriptions-item>
<el-descriptions-item label="行为标签:">苏州市</el-descriptions-item>
<el-descriptions-item label="素材内容:">
<div>这里显示素材内容</div>
</el-descriptions-item>
<el-descriptions-item label="分享设置:">
<div>这里显示分享内容</div>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div class="summarization">
<div class="countTime">
<span class="materialDetail-title top-title">数据概览</span>
</div>
<el-divider></el-divider>
<div>
<span>统计时间:</span>
<el-date-picker v-model="value1" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :size="size"></el-date-picker>
<el-button type="primary" :size="size">确定</el-button>
</div>
<div class="dataList">
<div>
<h5>总发送人数</h5>
<p>44</p>
<h5>今日:**</h5>
</div>
<div>
<h5>总发送次数</h5>
<p>44</p>
<h5>今日:**</h5>
</div>
<div>
<h5>总阅读人数</h5>
<p>44</p>
<h5>今日:**</h5>
</div>
<div>
<h5>总阅读次数</h5>
<p>44</p>
<h5>今日:**</h5>
</div>
<div>
<h5>打开率</h5>
<p>44</p>
<h5>今日:**</h5>
</div>
</div>
<div class="detailTable">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="员工发送明细" name="staffSendDetail"></el-tab-pane>
<el-tab-pane label="阅读人员明细" name="readPerDetail"></el-tab-pane>
</el-tabs>
<staffSendDetail v-if="activeName == 'staffSendDetail'"></staffSendDetail>
<readPerDetail v-if="activeName == 'readPerDetail'"></readPerDetail>
</div>
</div>
</div>
</template>
<script>
import staffSendDetail from './components/staffSendDetail.vue'
import readPerDetail from './components/readPerDetail.vue'
export default {
name: 'materialDetail',
components: {
staffSendDetail,
readPerDetail
},
data() {
return {
activeName: 'staffSendDetail',
detailVisible: true
}
},
methods: {
detailShowVisible() {
this.detailVisible = !this.detailVisible
}
}
}
</script>
<style lang="scss" scoped>
.materialDetail,
.summarization {
background-color: #fff;
}
.matrial-detail {
display: flex;
justify-content: space-between;
margin: 33px 0 0 42px;
.matrial-detail-left {
padding-bottom: 16px;
&-pre {
margin-left: 10px;
font-size: 14px;
color: #5850FF;
font-weight: 600;
}
}
&-unfold {
margin-right: 23px;
font-size: 12px;
color: #5850FF;
}
}
.summarization {
margin-top: 20px;
.dataList {
margin: 16px 20px 20px 20px;
display: flex;
justify-content: space-around;
div {
width: 212px;
height: 128px;
background-color: #ccc;
margin-right: 10px;
}
:last-child {
margin-right: 0;
}
}
}
.materialDetail-title {
font-size: 16px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
.top-title {
display: inline-block;
margin: 17px 0 0 20px;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!