Commit 17606c52 by 匡雅琴

第三轮bug修复

1 parent 9fb865eb
......@@ -207,17 +207,17 @@ export default {
pdfUrl: '',
textBoxContent: '',
materialAddForm: {
groupId: '',
groupId: '', // 素材组id
groupName: '',
materialName: '',
materialType: '',
materialUrl: '',
businessType: [],
isNotifySender: false,
tagJson: [],
materialTitle: '',
description: '',
titleUrl: ''
materialName: '', // 素材名称
materialType: '', // 素材类型
materialUrl: '', // 素材链接
businessType: [], // 业务类型
isNotifySender: false, // 是否通知发送人 0 是 -1 否
tagJson: [], // 行为标签
materialTitle: '', // 分享标题
description: '', // 描述
titleUrl: '' // 封面
},
groupCounter: [],
// 分享设置显示
......@@ -455,6 +455,7 @@ export default {
// }
// })
var params = this.getParams()
// status 状态 0 启用 -1 禁用 1 存草稿
params.status = 0
// params.isNotifySender = -1
// params.tagJson = JSON.stringify(tagging)
......
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="720px" :before-close="!dialogVisible">
<el-form ref="materialGroupAddForm" :model="materialGroupAddForm" label-width="110px" :rules="materialGroupAddRules">
<el-form ref="materialGroupAddForm" :model="materialGroupAddForm" @submit.native.prevent label-width="110px" :rules="materialGroupAddRules">
<el-form-item label="分组名称:" prop="materialGroupName">
<el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="请输入分组名称" style="width: 567px"></el-input>
<el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="请输入分组名称" style="width: 567px" @keyup.enter.native="submitForm"></el-input>
</el-form-item>
<!-- <el-form-item label="业务类型:" prop="businessType">
<el-checkbox-group class="checkbox-group" :max="3" v-model="materialGroupAddForm.businessType">
......@@ -92,7 +92,7 @@ export default {
var params = JSON.parse(JSON.stringify(this.materialGroupAddForm))
return params
},
// 创建
// 提交创建素材组
submitForm() {
this.$refs.materialGroupAddForm.validate(valid => {
if (valid) {
......
<template>
<div class="introduct">
<el-dialog title="功能介绍" :visible.sync="introductionDialog" width="1080px" :before-close="handleClose">
<p class="note">营销素材——将业务资料、经典案例、活动等以链接、PDF形式上传在营销素材库中,企业成员可在企业微信聊天侧边栏或者嘀加企微管家工作台中,一键发给客户,支持雷达追踪,并将客户的阅读等关键行为记录到客户动态中,并给客户打上指定标签。</p>
<p class="note">营销素材——将业务资料、经典案例、活动等以图文、PDF形式上传在营销素材中,企业成员可在企业微信聊天侧边栏或者嘀加企微管家工作台中一键发给客户。发送给客户的营销素材支持雷达追踪,将客户阅读行为记录到客户动态中,同时给客户打上指定标签并通知其对应的跟进员工。</p>
<h3>我的优势</h3>
<p class="list">1、门店可以为不同的业务部门提供不同的营销素材,规范营销内容;</p>
<p class="list">2、员工能便捷的在企业微信聊天侧边栏及嘀加企微管家工作台上直接使用营销素材,避免自己设计素材的烦恼;</p>
......
......@@ -47,11 +47,12 @@ export default {
id: '',
materialGroupName: '',
orderValue: '',
isDefault: ''
isDefault: '' // 默认素材组 0 是 -1 否(进入页面如果素材组数量为0,就会创建默认素材组,默认素材组不可删除)
}
}
},
mounted() {
// 新建素材组
this.eventBus.$on('addMaterialGroup', data => {
// data.businessType = data.businessType.toString()
this.$apis.material.addMaterialGroup(data).then(res => {
......@@ -60,6 +61,7 @@ export default {
}
})
})
// 编辑素材组
this.eventBus.$on('editMaterialGroup', data => {
// data.businessType = data.businessType.toString()
this.$apis.material.editMaterialGroup(data).then(res => {
......@@ -109,9 +111,8 @@ export default {
if (!row.orderTime) {
var date = new Date()
var stickDate = dayjs(date).format('YYYY-MM-DD HH:mm:ss')
params.orderTime = stickDate
params.orderFlag = true
console.log(params)
params.orderTime = stickDate // orderTime 排序时间
params.orderFlag = true // orderFlag置顶标识 false 取消置顶 true 置顶或修改名称
this.secondConfirm('提示', '确定置顶该素材组吗?', 'material', 'editMaterialGroup', params)
return
}
......@@ -133,6 +134,7 @@ export default {
})
if (res.code == '0') {
this.getMaterialList()
// 素材组删除后素材列表刷新
this.$emit('getListApi')
}
})
......
<template>
<div>
<glsx-combi-form ref="staffSendFormRef" :formObj="searchForm" :formData="staffSendFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro">
<span slot="footer">
<el-button type="primary" :size="size" @click="getListApi">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span>
</glsx-combi-form>
<GLTable ref="staffSendDetailRef" :hasPage="false" :tableData="sendStaffTableData" @sortChange="sortChange" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable>
<GLTable ref="staffSendDetailRef" :hasPage="false" :tableData="sendStaffTableData" @sortChange="sortChange" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable>
</div>
</template>
......@@ -30,157 +29,13 @@ export default {
name: 'employeeName',
type: 'input',
placeholder: '请输入姓名',
prefixIcon: 'el-icon-search'
prefixIcon: 'el-icon-search',
isClear: true
}
],
// getListApi: this.$apis.material.sendDetailPage,
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
sendStaffTableData: [
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 3,
readNumber: 8,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 5,
readNumber: 5,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
},
{
id: '2',
employeeName: 'kyd',
sendNumber: 9,
readNumber: 6,
readPeopleNumber: 8,
openRate: 10
}
],
sendStaffTableData: [],
tableParams: {
listName: 'data',
tableOption: false,
......@@ -227,10 +82,7 @@ export default {
}
this.getListApi()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.staffSendDetailRef.data.length ? (this.$refs.staffSendDetailRef.tableHeightValues = '') : this.$refs.staffSendDetailRef.setTableHeightFun()
},
// 排序
sortChange({ column, prop, order }) {
order === 'ascending' ? (this.searchForm.sort = 2) : (this.searchForm.sort = 1)
prop === 'sendNumber' ? (this.searchForm.sortValue = 2) : (this.searchForm.sortValue = 1)
......@@ -242,12 +94,11 @@ export default {
},
getListApi() {
var params = this.getParams()
this.$apis.material.sendDetailPage(params).then(res => {
this.sendStaffTableData = res
res.length ? (this.$refs.staffSendDetailRef.tableHeightValues = '230px') : this.$refs.staffSendDetailRef.setTableHeightFun()
// this.$refs.staffSendDetailRef.tableHeightValues = '100px'
// this.$refs.staffSendDetailRef.tableHeightValues = '230px'
// 计算表格高度,数据10条以下自适应,10条以上固定高度,表格内滚动,无数据调用方法计算高度
res.length ? (res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')) : this.$refs.staffSendDetailRef.setTableHeightFun()
// res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')
})
}
}
......
......@@ -28,7 +28,7 @@ export default {
this.editor.config.height = 400
this.editor.config.width = 500
this.editor.config.uploadVideoServer = '/api/upload-video'
this.editor.config.excludeMenus = ['code']
this.editor.config.excludeMenus = ['code', 'video']
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
......@@ -56,7 +56,6 @@ export default {
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
......
......@@ -14,9 +14,11 @@
<div class="container">
<div class="search-form">
<glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="primary" :size="size" @click="getListApi">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
<span slot="footer" slot-scope="scope">
<span class="select-pro">
<el-button type="primary" :size="size" @click="getListApi">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span>
</span>
</glsx-combi-form>
</div>
......@@ -119,20 +121,26 @@ export default {
url,
eventBus: new Vue(),
searchForm: {
groupId: '',
materialType: '',
businessType: '',
status: '',
materialName: ''
groupId: '', // 素材组id
materialType: '', // 素材类型
businessType: '', // 业务类型
status: '', // 状态
materialName: '' // 素材名称
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
layout: 'sizes, prev, pager, next, jumper, ->, total',
// 表格数据
materialTableData: [],
// 创建&编辑素材组弹框
materialGroupDialog: false,
// 功能介绍弹框
introductionDialog: false,
boxHeight: '',
// 表格高度
tableHeight: '',
// 业务类型
businessTypes: [],
// 素材组名称
materialGroupName: '',
materialFormData: [
{
......@@ -335,14 +343,16 @@ export default {
}
]
},
// 获取素材总条数
tableTotal: 0
}
},
mounted() {
// 计算素材组&素材展示表格容器高度
let clientHeight = document.documentElement.clientHeight
let offTop = document.querySelector('.tabelList').offsetTop
this.boxHeight = clientHeight - offTop - 80 + 'px'
this.tableHeight = clientHeight - offTop - 130 + 'px'
this.tableHeight = clientHeight - offTop - 132 + 'px'
this.findAllDictData('business_type')
this.firstCome()
this.getListApi()
......@@ -419,26 +429,6 @@ export default {
query: params
})
},
// 排序
// sortChange(sort) {
// // 获取字段名称和排序类型
// var fieldName = sort.prop
// var sortingType = sort.order
// //如果字段名称为“创建时间”,将“创建时间”转换为时间戳,才能进行大小比较
// if (fieldName == 'updatedTime') {
// this.materialTableData.map(item => {
// item.updatedTime = this.$moment(item.updatedTime).valueOf()
// })
// }
// //按照降序排序
// if (sortingType == 'descending') {
// this.materialTableData = this.materialTableData.sort((a, b) => b[fieldName] - a[fieldName])
// }
// //按照升序排序
// else {
// this.materialTableData = this.materialTableData.sort((a, b) => a[fieldName] - b[fieldName])
// }
// },
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
......@@ -446,10 +436,10 @@ export default {
// 获取素材列表
getTableList(params) {
this.$apis.material.materialList(params).then(res => {
console.log(res, '------------');
let data = res
let tableData = []
data.forEach(item => {
// 根据素材类型是图文还是pdf处理数据
if (item.materialType != 3) {
item.materialContentRpcResponse.materialUrl = ''
}
......@@ -471,6 +461,7 @@ export default {
// res.length ? (this.$refs.materialRef.tableHeightValues = this.tableHeight) : (this.$refs.materialRef.tableHeightValues = '230px')
})
},
// 获取所有素材
getListApi() {
var params = this.getParams()
// params.pageSize = this.$refs.materialRef.page.pageSize
......@@ -614,4 +605,8 @@ ul {
/deep/ .el-table .descending .sort-caret.descending {
border-top-color: #5850ff;
}
.select-pro {
display: inline-block;
padding-bottom: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!