Commit e31572c7 by 前端

Merge branch 'v3.12.0' into 'master'

V3.12.0

See merge request !520
2 parents ff268a9e 527ce8a0
...@@ -137,4 +137,15 @@ const cancelTopMD = params=>{ ...@@ -137,4 +137,15 @@ const cancelTopMD = params=>{
returnAll: true returnAll: true
}) })
} }
export { cancelTopMD,updateToTopMD,getghSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop} // 分享
const getMealShare=params=>{
params.method = `scrm.api.equity.package.info.poster`
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export {getMealShare, cancelTopMD,updateToTopMD,getghSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop}
...@@ -23,6 +23,16 @@ const getCustomerByTagListApi = params => { ...@@ -23,6 +23,16 @@ const getCustomerByTagListApi = params => {
}) })
} }
//群标签获取客户列表
const getCustomerByGroupTagListApi = params => {
params.method = 'entmicro.api.customer.base.getCustomerBasePageByTag'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群获取客户列表 // 人群获取客户列表
const getCustomerCrowdApi = params => { const getCustomerCrowdApi = params => {
params.method = 'entmicro.api.customer.crowd.page' params.method = 'entmicro.api.customer.crowd.page'
...@@ -225,4 +235,14 @@ const getMomentListApi = params => { ...@@ -225,4 +235,14 @@ const getMomentListApi = params => {
}) })
} }
export default { getCustomerListApi, getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi } // 根据sopId获取SOP营销效果分析
const getEffectAnalysisApi = params => {
params.method = 'scrm.api.sop.sopEvent.effectAnalysis'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerListApi, getCustomerByGroupTagListApi,getCustomerByTagListApi, getCustomerCrowdApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getFailEventList, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi,getEffectAnalysisApi }
...@@ -101,6 +101,17 @@ const crowdfundingActivity = params => { ...@@ -101,6 +101,17 @@ const crowdfundingActivity = params => {
sign: true sign: true
}) })
} }
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表 //模板列表
const templatePage = params => { const templatePage = params => {
params.method = `${path}template.page.search` params.method = `${path}template.page.search`
...@@ -165,5 +176,6 @@ export default { ...@@ -165,5 +176,6 @@ export default {
templateUpdate, templateUpdate,
templateSave, templateSave,
templateDetail, templateDetail,
crowdfundingActivity crowdfundingActivity,
bulgeActivity
} }
...@@ -6,9 +6,16 @@ ...@@ -6,9 +6,16 @@
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock },{'textBox':item.type=='textBox'}]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock },{'textBox':item.type=='textBox'}]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips"> <!-- :content="item.tips" -->
<!-- <el-popover placement="top" width="200" trigger="hover" :content="item.tips >
<img slot="reference" class="tips-icon" src="./images/icon-tip.png" /> <img slot="reference" class="tips-icon" src="./images/icon-tip.png" />
</el-popover> </el-popover>
: -->
<el-tooltip lacement="top" width="200" trigger="hover" effect="light">
<img class="tips-icon" src="@/assets/icon-tip.png" alt=""/>
<div slot="content" class="tips-icon" v-html="item.tips">
</div>
</el-tooltip>
: :
</span> </span>
<span v-else-if="!item.isHide && item.label && !item.tips" slot="label"> <span v-else-if="!item.isHide && item.label && !item.tips" slot="label">
......
...@@ -11,10 +11,16 @@ ...@@ -11,10 +11,16 @@
</div> </div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading"> <div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index"> <div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click.self="item.checked = !item.checked"></span> <span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }"
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox> @click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)">{{
item.labelGroup.name
}}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)
</el-checkbox>
<div style="margin: 15px 0"></div> <div style="margin: 15px 0"></div>
<el-checkbox-group class="tag-group" v-model="item.tagChecked" @change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked"> <el-checkbox-group class="tag-group" v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox> <el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
...@@ -22,7 +28,20 @@ ...@@ -22,7 +28,20 @@
</div> </div>
</div> </div>
<div class="tag-panel-selected"> <div class="tag-panel-selected">
<div class="tag-title">已选标签</div> <div class="tag-title">已选标签
<!-- <image src="@/assets/icon-info.png"/>-->
<el-tooltip effect="light" popper-class="tool-gltip">
<img class="tag-img" src="@/assets/icon-tip.png" alt=""/>
<div slot="content">
<div class="tag-content">
<p class="tag-ex">说明:</p>
<p>标签组内已选标签取<span class="tag-ex">并集(或)</span>,即满足一个条件即可、标签组之间取<span class="tag-ex">交集(且)</span>,即同时满足标签组条件。</p>
<img src="@/assets/sop/groupTips.png" alt=""/>
</div>
</div>
</el-tooltip>
</div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div> <div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }"> <div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
...@@ -35,7 +54,8 @@ ...@@ -35,7 +54,8 @@
<p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p> <p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p>
<span v-for="(tag, idx) in item.tagChecked" :key="idx"> <span v-for="(tag, idx) in item.tagChecked" :key="idx">
<span class="tag-txt" v-show="idx != 0">或</span> <span class="tag-txt" v-show="idx != 0">或</span>
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)"> <el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag"
closable :disable-transitions="false" @close="remove(item, idx)">
{{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }} {{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }}
</el-tag> </el-tag>
</span> </span>
...@@ -46,7 +66,8 @@ ...@@ -46,7 +66,8 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> <a class="dialog-jump" @click="jumpUrl"
v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<el-button size="small" @click="handleClose"> <el-button size="small" @click="handleClose">
取 消 取 消
</el-button> </el-button>
...@@ -57,14 +78,19 @@ ...@@ -57,14 +78,19 @@
</template> </template>
<script> <script>
import { utils } from 'glsx-common' import {utils} from 'glsx-common'
import util from '@/utils/util' import util from '@/utils/util'
export default { export default {
name: 'activityModel', name: 'activityModel',
props:{ props: {
labelTypesStr:{ labelTypesStr: {
type:String, type: String,
default:'自店标签,企业标签,系统标签' default: '自店标签,企业标签,系统标签'
},
isGroupTag: {
type: Boolean,
default: false
} }
}, },
data() { data() {
...@@ -97,6 +123,7 @@ export default { ...@@ -97,6 +123,7 @@ export default {
}, },
init(item) { init(item) {
this.labelGroupName = '' this.labelGroupName = ''
this.labelTreeRetSelect = []
this.dialogVisible = true this.dialogVisible = true
this.querylabeltree(item) this.querylabeltree(item)
}, },
...@@ -112,9 +139,11 @@ export default { ...@@ -112,9 +139,11 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
shopId: this.$globalState.session.merchantId, shopId: this.$globalState.session.merchantId,
// shopId:'44209846',
labelGroupName: this.labelGroupName, labelGroupName: this.labelGroupName,
labelTypesStr: this.labelTypesStr, labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel edition: this.$globalState.session.merchantModel,
belongType: this.isGroupTag ? 2 : 1
} }
}) })
.then(res => { .then(res => {
...@@ -225,7 +254,6 @@ export default { ...@@ -225,7 +254,6 @@ export default {
let labelTreeRets = this.labelTreeRetSelect let labelTreeRets = this.labelTreeRetSelect
.map(item => { .map(item => {
if (item.tagChecked.length) { if (item.tagChecked.length) {
console.log(item)
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.tagChecked, labelList: item.tagChecked,
...@@ -234,7 +262,6 @@ export default { ...@@ -234,7 +262,6 @@ export default {
} }
}) })
.filter(item => item) .filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets) this.$emit('tagSelected', labelTreeRets)
}, },
//全选 //全选
...@@ -287,18 +314,22 @@ export default { ...@@ -287,18 +314,22 @@ export default {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.select-tag { .select-tag {
.label-box { .label-box {
margin-left: 42px; margin-left: 42px;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
} }
.tag-selected-label { .tag-selected-label {
margin: 9px 0; margin: 9px 0;
} }
.tag-line-and { .tag-line-and {
position: relative; position: relative;
} }
.tag-line { .tag-line {
position: absolute; position: absolute;
left: 17px; left: 17px;
...@@ -306,6 +337,7 @@ export default { ...@@ -306,6 +337,7 @@ export default {
border-width: 0 0 0 1px; border-width: 0 0 0 1px;
height: 100%; height: 100%;
} }
.tag-and { .tag-and {
position: absolute; position: absolute;
background: #efeeff; background: #efeeff;
...@@ -314,9 +346,11 @@ export default { ...@@ -314,9 +346,11 @@ export default {
padding: 10px; padding: 10px;
z-index: 20; z-index: 20;
} }
.tag-txt { .tag-txt {
padding: 0 8px; padding: 0 8px;
} }
.customer-tag-selected-item { .customer-tag-selected-item {
background: #f4f6fc !important; background: #f4f6fc !important;
border: 1px solid rgba(232, 232, 234, 1) !important; border: 1px solid rgba(232, 232, 234, 1) !important;
...@@ -326,10 +360,13 @@ export default { ...@@ -326,10 +360,13 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.tag-panel { .tag-panel {
display: flex; display: flex;
.tag-panel-select { .tag-panel-select {
width: 60%; width: 60%;
/deep/ { /deep/ {
.el-checkbox__label { .el-checkbox__label {
width: 100%; width: 100%;
...@@ -341,9 +378,11 @@ export default { ...@@ -341,9 +378,11 @@ export default {
} }
} }
} }
.tag-panel-selected { .tag-panel-selected {
width: 40%; width: 40%;
margin-left: 10px; margin-left: 10px;
.tag-box-header { .tag-box-header {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
...@@ -352,17 +391,26 @@ export default { ...@@ -352,17 +391,26 @@ export default {
padding-left: 20px !important; padding-left: 20px !important;
} }
} }
.tag-title { .tag-title {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 22px; line-height: 22px;
.tag-img {
display: inline-block;
width: 14px;
height: 14px;
} }
}
.tag-select-box { .tag-select-box {
margin-top: 10px; margin-top: 10px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
padding: 6px; padding: 6px;
.tag-box-header { .tag-box-header {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -372,6 +420,7 @@ export default { ...@@ -372,6 +420,7 @@ export default {
margin: -6px; margin: -6px;
margin-bottom: 10px; margin-bottom: 10px;
padding: 0px 6px; padding: 0px 6px;
/deep/ { /deep/ {
.el-input { .el-input {
width: 60%; width: 60%;
...@@ -379,6 +428,7 @@ export default { ...@@ -379,6 +428,7 @@ export default {
} }
} }
} }
.tag-selected-item { .tag-selected-item {
margin: 0px 6px 6px 0px; margin: 0px 6px 6px 0px;
height: 26px; height: 26px;
...@@ -390,14 +440,17 @@ export default { ...@@ -390,14 +440,17 @@ export default {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.el-tree-node__expand-icon { .el-tree-node__expand-icon {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.tag-group { .tag-group {
margin-left: 40px; margin-left: 40px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.el-checkbox { .el-checkbox {
width: 40%; width: 40%;
margin-bottom: 6px; margin-bottom: 6px;
...@@ -407,11 +460,43 @@ export default { ...@@ -407,11 +460,43 @@ export default {
} }
} }
} }
.checkbox-group-box { .checkbox-group-box {
overflow: auto; overflow: auto;
} }
.tag-selected-box { .tag-selected-box {
min-height: 200px; min-height: 200px;
display: flex; display: flex;
} }
/deep/ .el-tooltip__popper.is-light{
width: 1000px !important;
}
.tool-gltip {
/deep/.el-tooltip__popper.is-light{
width: 1000px !important;
}
/deep/.el-tooltip__popper{
width: 1000px !important;
}
.tag-content {
background: #fff;
overflow: hidden;
width: 500px;
paddding: 10px;
p{
margin: 3px 0;
}
.tag-ex{
color: #333333;
font-weight: 600;
}
}
}
</style>
<style>
.tool-gltip {
max-width: 520px!important;
width: 520px!important;
}
</style> </style>
...@@ -100,7 +100,11 @@ ...@@ -100,7 +100,11 @@
</div> </div>
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="cardInfo" slot-scope="scope"> <div slot="cardInfo" slot-scope="scope">
<GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list"></GLTable> <GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list">
<div slot="activeTypeDesc" slot-scope="scope">
<div>{{ scope.scope.activeTypeDesc }}<span v-if="scope.scope.exchangeCode">({{scope.scope.exchangeCode}})</span></div>
</div>
</GLTable>
</div> </div>
<span slot="accountName" slot-scope="scope"> <span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div>{{ scope.scope.accountName }}</div>
...@@ -287,6 +291,7 @@ export default { ...@@ -287,6 +291,7 @@ export default {
{ {
label: '开通方式', label: '开通方式',
prop: 'activeTypeDesc', prop: 'activeTypeDesc',
addHtml:'activeTypeDesc',
width: 200 width: 200
}, },
{ {
......
...@@ -76,13 +76,43 @@ ...@@ -76,13 +76,43 @@
</div> </div>
</div> </div>
</glsx-dialog> </glsx-dialog>
<!-- 分享 -->
<GLDialog :mode="mode" title="分享" :visible.sync="shareVisible" :hasFooter="false">
<div v-loading="loading">
<div class="preview-wrap">
<div class="share-content">
<div>
<div class="share-title">海报</div>
<el-button type="primary" @click="handleSaveImg(shareData.posterUrl)">保存图片</el-button>
</div>
<div class="poster">
<img :src="shareData.posterUrl" />
</div>
</div>
<div class="share-content">
<div>
<div class="share-title">小程序码</div>
<el-button type="primary" @click="handleSaveImg(shareData.miniProgramCodeUrl, '小程序码')">保存图片</el-button>
</div>
<div class="qr-code">
<img :src="shareData.miniProgramCodeUrl" />
</div>
</div>
</div>
<div class="share-footer">
<div class="share-title">小程序页面路径</div>
<div class="share-path">{{ shareData.linkUrl }}</div>
<el-button class="share-btn" type="primary" @click="handleSaveTxt(shareData.linkUrl)">复制链接</el-button>
</div>
</div>
</GLDialog>
</div> </div>
</template> </template>
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { getghSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop, cancelTopMD, updateToTopMD } from '@/api/modules/setmeal' import { getghSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop, cancelTopMD, updateToTopMD, getMealShare } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service' import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant' import { stateList } from '@/common/constant'
...@@ -97,6 +127,8 @@ export default { ...@@ -97,6 +127,8 @@ export default {
}, },
data() { data() {
return { return {
loading: false,
shareVisible: false, //分享
showViewer: false, showViewer: false,
showGh: false, showGh: false,
url: url, url: url,
...@@ -109,6 +141,7 @@ export default { ...@@ -109,6 +141,7 @@ export default {
merchantId: 44184606 merchantId: 44184606
// merchantName // merchantName
}, },
shareData: {},
tabList: [ tabList: [
{ {
text: '本店套餐', text: '本店套餐',
...@@ -123,6 +156,19 @@ export default { ...@@ -123,6 +156,19 @@ export default {
// 表格按钮 // 表格按钮
tableButtonList: [ tableButtonList: [
{ {
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
listeners: {
click: this.handleShare
},
condition: row => {
return this.showGh
}
},
{
type: 'GLButton', type: 'GLButton',
name: '编辑', name: '编辑',
attrs: { attrs: {
...@@ -271,7 +317,7 @@ export default { ...@@ -271,7 +317,7 @@ export default {
label: '首页置顶展示', label: '首页置顶展示',
prop: 'topFlag', prop: 'topFlag',
addHtml: 'topFlag', addHtml: 'topFlag',
width: 150, width: 150
}, },
{ {
label: '操作', label: '操作',
...@@ -428,6 +474,39 @@ export default { ...@@ -428,6 +474,39 @@ export default {
} }
}) })
}, },
//分享
handleShare(val) {
this.loading = true
this.shareData ={}
getMealShare({ id: val.id }).then(res => {
this.shareData = res.data
this.loading = false
})
this.shareVisible = true
},
//保存图片
handleSaveImg(url, downloadTxt = '海报') {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = downloadTxt
alink.click()
alink.remove()
},
//复制
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleEdit(row) { handleEdit(row) {
this.$router.push({ path: '/memberCenter/setmealAddUpdate', query: { id: row.id, $title: encodeURI('编辑套餐') } }) this.$router.push({ path: '/memberCenter/setmealAddUpdate', query: { id: row.id, $title: encodeURI('编辑套餐') } })
}, },
...@@ -604,4 +683,68 @@ export default { ...@@ -604,4 +683,68 @@ export default {
} }
} }
} }
.preview-wrap {
display: flex;
justify-content: space-between;
.share-content {
width: 335px;
height: 328px;
background: #f8f8f8;
border-radius: 2px;
display: flex;
justify-content: space-between;
padding: 20px;
box-sizing: border-box;
.share-title {
font-weight: 600;
font-size: 14px;
color: #333333;
margin-bottom: 50px;
}
.qr-code {
width: 120px;
height: 120px;
img {
width: 100%;
height: 100%;
}
}
.poster {
width: 152px;
height: 242px;
img {
width: 100%;
height: 100%;
}
}
}
}
.share-footer {
width: 680px;
height: 90px;
background: #f8f8f8;
border-radius: 2px;
margin-top: 10px;
padding: 10px 20px;
box-sizing: border-box;
position: relative;
.share-path {
font-weight: 600;
font-size: 14px;
color: #999999;
max-width: 400px;
white-space: wrap;
}
.share-title {
font-weight: 600;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.share-btn {
position: absolute;
right: 40px;
bottom: 29px;
}
}
</style> </style>
...@@ -75,6 +75,11 @@ ...@@ -75,6 +75,11 @@
</el-form-item> </el-form-item>
<span class="give-tip">可在套餐详情页顶部展示</span> <span class="give-tip">可在套餐详情页顶部展示</span>
</template> </template>
<template v-if="showGh && accountLevel == 4">
<el-form-item size="small" label="分享图片:">
<preview :picOptions="sharePosterOptions" :imageUrlArr="sharePosterImgArr" @change="changeqrCode"></preview>
</el-form-item>
</template>
</el-form> </el-form>
</div> </div>
<GLFooter> <GLFooter>
...@@ -131,7 +136,14 @@ export default { ...@@ -131,7 +136,14 @@ export default {
key: 'packageImg', key: 'packageImg',
isClose: true isClose: true
}, },
sharePosterOptions: {
width: '104px',
height: '104px',
key: 'sharePosterImg',
isClose: true
},
packageImgArr: [], packageImgArr: [],
sharePosterImgArr:[],
allItemList: [], allItemList: [],
choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'], choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'],
copyChoseItemList: [], //用于检查页面信息是否改动 copyChoseItemList: [], //用于检查页面信息是否改动
...@@ -300,7 +312,8 @@ export default { ...@@ -300,7 +312,8 @@ export default {
item.couponAmount = item.serviceQuantity item.couponAmount = item.serviceQuantity
item.id = item.serviceId item.id = item.serviceId
}) })
this.packageImgArr =[res.data.packageImg] this.packageImgArr =res.data.packageImg? [res.data.packageImg]:[]
this.sharePosterImgArr =res.data.sharePosterImg? [res.data.sharePosterImg]:[]
this.recoveryCoupon() this.recoveryCoupon()
this.copyTotalPrice = this.totalPrice this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
...@@ -352,7 +365,11 @@ export default { ...@@ -352,7 +365,11 @@ export default {
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0 param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
if (this.showGh) { if (this.showGh) {
param.giveGoldFlag = this.ruleForm.giveGoldFlag param.giveGoldFlag = this.ruleForm.giveGoldFlag
if (this.accountLevel == 4) param.packageImg = this.ruleForm.packageImg if (this.accountLevel == 4) {
param.packageImg = this.ruleForm.packageImg
param.sharePosterImg = this.ruleForm.sharePosterImg
}
} }
let lists = this.choseItemList let lists = this.choseItemList
for (var k in lists) { for (var k in lists) {
...@@ -391,7 +408,11 @@ export default { ...@@ -391,7 +408,11 @@ export default {
params.switchStatus = this.ruleForm.switchStatus ? 1 : 0 params.switchStatus = this.ruleForm.switchStatus ? 1 : 0
if (this.showGh) { if (this.showGh) {
params.giveGoldFlag = this.ruleForm.giveGoldFlag params.giveGoldFlag = this.ruleForm.giveGoldFlag
if (this.accountLevel == 4) params.packageImg = this.ruleForm.packageImg if (this.accountLevel == 4) {
params.packageImg = this.ruleForm.packageImg
params.sharePosterImg = this.ruleForm.sharePosterImg
}
} }
let list = this.choseItemList let list = this.choseItemList
for (var i in list) { for (var i in list) {
......
...@@ -772,6 +772,7 @@ export default { ...@@ -772,6 +772,7 @@ export default {
}, },
{ {
label: '', label: '',
isHide: true,
name: 'giveEquityCard', name: 'giveEquityCard',
addHtml: 'giveEquityCard' addHtml: 'giveEquityCard'
} }
...@@ -970,12 +971,14 @@ export default { ...@@ -970,12 +971,14 @@ export default {
// 从域名判断是不是广汇的 // 从域名判断是不是广汇的
diffHost() { diffHost() {
let href = window.location.host let href = window.location.host
this.showGh = href.indexOf('cgacar') !== -1 this.showGh = href.indexOf('cgacar') != -1
if (this.showGh) { if (this.showGh) {
let idx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'erpMaterialNo') let idx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'erpMaterialNo')
let serviceCodeIdx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'serviceCode') let serviceCodeIdx = this.externalFormList[0].editFormData.findIndex(item => item.name == 'serviceCode')
let equityCodeIdx = this.externalFormList[1].editFormData.findIndex(item => item.name == 'giveEquityCard')
this.externalFormList[0].editFormData[idx].isHide = !this.showGh this.externalFormList[0].editFormData[idx].isHide = !this.showGh
this.externalFormList[0].editFormData[serviceCodeIdx].isHide = !this.showGh this.externalFormList[0].editFormData[serviceCodeIdx].isHide = !this.showGh
this.externalFormList[1].editFormData[equityCodeIdx].isHide = !this.showGh
this.externalFormList[0].editRule.erpMaterialNo[0].required = this.showGh this.externalFormList[0].editRule.erpMaterialNo[0].required = this.showGh
} }
}, },
......
<template>
<div>
<el-tabs class="gl-tabs" v-model="activeName" @tab-click="clickNav(activeName)">
<el-tab-pane label="SOP概览" name='first'></el-tab-pane>
<el-tab-pane label="SOP列表" name='second'></el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
name: "SopNav",
props: {
activeName:{
type: String,
default: 'first'
}
},
data() {
return {
// activeName: 'first'
}
},
methods: {
clickNav(name) {
this.$emit('clickNav', name)
}
}
}
</script>
<style lang="scss" scoped>
.gl-tabs {
/deep/ .el-tabs__header {
margin: 0 0 10px;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
background: #f0f1f7 !important;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
background: #f0f1f7;
border-bottom: 2px solid #5850ff !important;
}
}
</style>
...@@ -57,7 +57,6 @@ export default { ...@@ -57,7 +57,6 @@ export default {
this.activeName = obj.activeName this.activeName = obj.activeName
}, },
handleInfoConfirm(info) { handleInfoConfirm(info) {
this.eventObj.addOrEdit == 'add' ? this.$refs.baseInfoRef.editForm.eventList.push(info.baseInfo) : this.$set(this.$refs.baseInfoRef.editForm.eventList, this.eventIndex, info.baseInfo) this.eventObj.addOrEdit == 'add' ? this.$refs.baseInfoRef.editForm.eventList.push(info.baseInfo) : this.$set(this.$refs.baseInfoRef.editForm.eventList, this.eventIndex, info.baseInfo)
this.$refs.baseInfoRef.parentCustomerObj.phone = info.predictCountObj.phone this.$refs.baseInfoRef.parentCustomerObj.phone = info.predictCountObj.phone
this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei this.$refs.baseInfoRef.parentCustomerObj.qiwei = info.predictCountObj.qiwei
...@@ -66,7 +65,6 @@ export default { ...@@ -66,7 +65,6 @@ export default {
}, },
jumpEvent(obj) { jumpEvent(obj) {
console.log(obj)
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit) this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info) this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj this.parentCustomerObj = obj.parentCustomerObj
......
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<template v-if="previewList.length==1">
<div
:class="{'preview-info':true,'isMargin':(previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6) || previewList && previewList[1] && previewList[0].attType == 7 && previewList[1].attType ==6 &&item.attType ==6}"
v-for="item in previewList" :key="item.id">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<template v-if="item.attType == 1">
<div class="preview-text text" v-html="textContent"></div>
</template>
<template v-if="item.attType == 6 || item.attType == 4 || item.attType == 7">
<div class="preview-text text">https//dwz.cn/Fk9vs7ri</div>
</template>
<template v-else-if="item.attType == 2">
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.attType == 3">
<div class="video-panel" :key="itm">
<video id="video" width="95">
<source :src="item.attContent" type="video/mp4"/>
</video>
<i class="el-icon-video-play"></i>
</div>
</template>
</div>
</template>
<template v-else-if="(this.hasSevenType || this.hasFourType) && this.hasSixType && previewList.length==2">
<div
class="preview-info">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="preview-text text">https//dwz.cn/Fk9vs7ri</div>
</div>
</template>
<template v-else>
<div
:class="{'preview-info':true,'isMargin':(previewList && previewList[2] && previewList[2].attType == 6 && item.attType ==6) || previewList && previewList[1] && previewList[0].attType == 7 && previewList[1].attType ==6 &&item.attType ==6}"
v-for="item in previewList" :key="item.id">
<template v-if="item.attType == 1 || item.attType == 4 || item.attType == 6 || item.attType == 7">
<template v-if="item.attType == 1 && item.attContent">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="preview-text text" v-html="textContent"></div>
</template>
</template>
<template v-else-if="item.attType == 2">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
</template>
<template v-else-if="item.attType == 3">
<img class="avatar"
src="@/assets/guestCustom/default-customer.png"
alt/>
<div class="video-panel" :key="itm">
<video id="video" width="95">
<source :src="item.attContent" type="video/mp4"/>
</video>
<i class="el-icon-video-play"></i>
</div>
</template>
</div>
</template>
</div>
</div>
</template>
<script>
import {utils} from 'glsx-common'
import emoji from '@/utils/emo'
export default {
name: 'Preview',
props: {eventBus: Object, previewVal: Array},
data() {
return {
textContent: '',
previewList: [],
currentTime: '',
hasSixType: false,
hasSevenType: false,
hasFourType: false
}
},
watch: {
previewList(val) {
if (val.length) {
let str = ''
this.hasSixType = val.some(item => item.attType == 6)
this.hasSevenType = val.some(item => item.attType == 7)
this.hasFourType = val.some(item => item.attType == 4)
val.forEach(item => {
if (item.attType == 1) {
const attContent = item.attContent
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style="width: 16px;height: 16px;vertical-align: middle;" src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
this.textContent = htm
} else if (item.attType == 4 || item.attType == 6 || item.attType == 7) {
str = '<div>https//dwz.cn/Fk9vs7ri</div>'
if (this.textContent.indexOf(str) !== -1){
this.textContent = this.textContent.slice(0,-33)
}
this.textContent = this.textContent ? this.textContent + str : str
}
})
}
},
previewVal: {
handler(val) {
this.previewList = utils.deepClone(val).filter(item => item.attContent)
},
deep: true
}
},
created() {
if (this.eventBus) {
this.eventBus.$on('update', val => {
this.previewList = val
})
}
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
},
}
</script>
<style lang="scss" scoped>
.isMargin {
margin-top: -20px;
}
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../../../assets/guestCustom/groupchat-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 169px;
color: #333;
background-color: #fff;
border-radius: 4px;
word-break: break-all;
display: flex;
// img {
// width: 16px;
// height: 16px;
// vertical-align: middle;
// }
}
.text {
display: inline-block;
font-size: 12px;
padding: 8px 11px;
line-height: 16px;
white-space: pre-wrap;
}
.preview-link {
display: flex;
justify-content: flex-end;
img {
width: 30px;
height: 30px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
.preview-activity {
width: 160px;
// height: 184px;
background-color: #fff;
border-radius: 4px;
border: 1px solid #dce1e5;
padding: 7px 7px 0;
.activity-name {
font-size: 12px;
color: #333;
margin: 7px 0 4px;
width: 160px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.applet-logo {
width: 95px;
height: 24px;
}
.activity-footer {
margin-top: 4px;
border-top: 1px solid #edeff3;
}
}
.preview-pdf {
width: 158px;
height: 62px;
background-color: #fff;
padding: 5px 13px;
box-sizing: border-box;
.pdf-title {
font-size: 12px;
color: #333;
line-height: 16px;
max-width: 90px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.video-panel {
position: relative;
.el-icon-video-play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
font-size: 20px;
color: #fff;
// cursor: pointer;
}
}
}
}
}
.link-logo {
width: 30px;
height: 30px;
margin-left: 131px;
margin-bottom: 5px;
}
</style>
...@@ -7,32 +7,9 @@ ...@@ -7,32 +7,9 @@
<div class="preview-box" v-for="item in previewListFilter" :key="item.id"> <div class="preview-box" v-for="item in previewListFilter" :key="item.id">
<div class="preview-box-desc"> <div class="preview-box-desc">
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div> <div class="preview-text text" v-html="textContent"></div>
</template> </template>
<!-- <template v-if="item.attType == 7">-->
<!-- <div class="preview-text preview-link">-->
<!-- <img src="@/assets/guestCustom/preview-link.png" alt />-->
<!-- <div>{{ item.attContent[0].marketingName }}</div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent">-->
<!-- <el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image>-->
<!-- </template>-->
<!-- <template v-else-if="item.attType == 3">-->
<!-- &lt;!&ndash; <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> &ndash;&gt;-->
<!-- <div class="video-panel">-->
<!-- <video id="video" width="100%" height="100%" preload loop muted>-->
<!-- <source :src="item.attContent" type="video/mp4" />-->
<!-- </video>-->
<!-- <i-->
<!-- class="el-icon-video-play"-->
<!-- @click="-->
<!-- videoShow = true-->
<!-- videoUrl = item.attContent-->
<!-- "-->
<!-- ></i>-->
<!-- </div>-->
<!-- </template>-->
</div> </div>
</div> </div>
</div> </div>
...@@ -48,14 +25,14 @@ export default { ...@@ -48,14 +25,14 @@ export default {
props: { previewView: Array }, props: { previewView: Array },
data() { data() {
return { return {
previewListFilter:[] previewListFilter:[],
textContent:''
} }
}, },
watch: { watch: {
previewView: { previewView: {
handler(val) { handler(val) {
const previewVal = this.$common.utils.deepClone(val).filter(item => item) const previewVal = this.$common.utils.deepClone(val).filter(item => item)
console.log(previewVal)
this.previewListFilter = [] this.previewListFilter = []
for (let i in previewVal) { for (let i in previewVal) {
if (previewVal[i].attType == 1) { if (previewVal[i].attType == 1) {
...@@ -74,18 +51,19 @@ export default { ...@@ -74,18 +51,19 @@ export default {
}) })
this.previewListFilter.push({ this.previewListFilter.push({
attType: 1, attType: 1,
attContent: htm // attContent: htm
}) })
} else if (previewVal[i].attType == 2) { this.textContent = htm
const pindex = this.previewListFilter.findIndex(item => item.attType == 2) } else if (previewVal[i].attType == 4 || previewVal[i].attType == 6 || previewVal[i].attType == 7) {
if (pindex == -1) {
this.previewListFilter.push({ this.previewListFilter.push({
attType: 2, attType: previewVal[i].attType,
attContent: [previewVal[i].attContent] // attContent: previewVal[i].attContent
}) })
} else { let str = '<div>https//dwz.cn/Fk9vs7ri</div>'
this.previewListFilter[pindex].attContent.push(previewVal[i].attContent) if (this.textContent.indexOf(str) !== -1){
this.textContent = this.textContent.slice(0,-33)
} }
this.textContent = this.textContent ? this.textContent + str : str
} else { } else {
this.previewListFilter.push({ this.previewListFilter.push({
attType: previewVal[i].attType, attType: previewVal[i].attType,
......
<template> <template>
<div class="sop-overview marketing edit-box"> <div class="sop-overview marketing edit-box">
<SopNav @clickNav="handleClick"/>
<div class="overview-describe">
<img src="@/assets/icon-info.png" alt=""/>
<p class="describe-text">
锁定目标客户群,设置触发时间、场景事件、策略内容和触点,自动触发场景营销SOP推送,完成保养提醒、事故车送修等智能线索推送、新用户培育、客户关怀、激活沉默客户、转化复购等。
</p>
</div>
<div class="container edit-container m-b-20"> <div class="container edit-container m-b-20">
<p class="edit-title">营销SOP</p> <p class="edit-title">营销SOP</p>
<div class="sop-box"> <div class="sop-box">
<p class="box-txt">锁定目标客户群,设置触发时间、场景事件、策略内容和触点,自动触发场景营销SOP推送,完成保养提醒、事故车送修等智能线索推送、新用户培育、客户关怀、激活沉默客户、转化复购等。</p> <!-- <div class="flex-center">-->
<!-- <p class="step-circle">1</p>-->
<!-- <p class="step-txt">创建SOP</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">2</p>-->
<!-- <p class="step-txt">添加推送客户</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">3</p>-->
<!-- <p class="step-txt">设置推送内容及时间</p>-->
<!-- <p class="step-line"></p>-->
<!-- <p class="step-circle">4</p>-->
<!-- <p class="step-txt">系统定时自动推送/任务下发</p>-->
<!-- </div>-->
<div class="flex-center"> <div class="flex-center">
<div>
<p class="step-circle">1</p> <p class="step-circle">1</p>
<p class="step-txt">创建SOP</p> <p class="step-txt">创建SOP</p>
</div>
<p class="step-line"></p> <p class="step-line"></p>
<div>
<p class="step-circle">2</p> <p class="step-circle">2</p>
<p class="step-txt">添加推送客户</p> <p class="step-txt">添加推送客户</p>
</div>
<p class="step-line"></p> <p class="step-line"></p>
<div>
<p class="step-circle">3</p> <p class="step-circle">3</p>
<p class="step-txt">设置推送内容及时间</p> <p class="step-txt">设置推送内容及时间</p>
</div>
<p class="step-line"></p> <p class="step-line"></p>
<div>
<p class="step-circle">4</p> <p class="step-circle">4</p>
<p class="step-txt">系统定时自动推送/任务下发</p> <p class="step-txt">系统定时自动推送/任务下发</p>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="container edit-container m-b-20"> <div class="container edit-container m-b-20">
<div class="edit-title flex p-r-20"> <div class="edit-title flex p-r-20">
<p>SOP监测</p> <p>SOP监测</p>
<div> <!-- <div>-->
<GLButton :size="size" type="default" class="default-blue-btn" fn="创建SOP" @click="handleEdit('add')">创建SOP</GLButton> <!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="创建SOP" @click="handleEdit('add')">-->
<GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton> <!-- 创建SOP-->
</div> <!-- </GLButton>-->
<!-- <GLButton :size="size" type="default" class="default-blue-btn" fn="管理SOP" @click="handleJump('sopList')">管理全部SOP</GLButton>-->
<!-- </div>-->
</div> </div>
<div class="sop-box" :style="{ 'padding-bottom': sopList.length ? '2px' : '12px', 'padding-right': sopList.length ? '0' : '20px' }"> <div class="sop-box"
:style="{ 'padding-bottom': sopList.length ? '2px' : '12px', 'padding-right': sopList.length ? '0' : '20px' }">
<div class="chart-box sop-flex" v-show="sopList.length"> <div class="chart-box sop-flex" v-show="sopList.length">
<div class="chart-item" v-for="item in sopList" :key="item.id"> <div class="chart-item" v-for="item in sopList" :key="item.id">
<span :class="item.sopType == 2 ? 'sop-type-orange':'sop-type-green'">
{{ item.sopType == 2 ? '群sop' : '客户sop' }}
</span>
<p class="sop-name">{{ item.sopName }}</p> <p class="sop-name">{{ item.sopName }}</p>
<div :id="'sopPie' + item.id" class="chart-pie"></div> <div :id="'sopPie' + item.id" class="chart-pie"></div>
<p>{{ item.dateRange }}</p> <p>{{ item.dateRange }}</p>
<div class="sop-btns"> <div class="sop-btns">
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="分析SOP" @click="handleJump('sopAnalysisList', item)">SOP分析</GLButton> <GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="分析SOP"
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="编辑SOP" @click="handleEdit('edit', item)">编辑</GLButton> @click="handleJump('sopAnalysisList', item)">SOP分析
<GLButton class="btn-item" :size="size" type="primary" display="disabled" fn="结束SOP" @click="handleEnd(item)">结束</GLButton> </GLButton>
<GLButton class="btn-item" :size="size" type="primary" plain display="disabled" fn="编辑SOP"
@click="handleEdit('edit', item)">编辑
</GLButton>
<GLButton class="btn-item" :size="size" type="default" display="disabled" fn="结束SOP"
@click="handleEnd(item)">结束
</GLButton>
</div> </div>
</div> </div>
</div> </div>
<div v-show="!sopList.length" class="txt-center" style="height: 400px;"> <div v-show="!sopList.length" class="txt-center" style="height: 400px;">
<img style="margin-top: 140px;" src="@/assets/empty.png" /> <img style="margin-top: 140px;" src="@/assets/empty.png"/>
<p class="m-t-10">暂无数据</p> <p class="m-t-10">暂无数据</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import * as moment from 'moment' import * as moment from 'moment'
import SopNav from "views/sop/SopNav";
export default { export default {
name: 'sopIndex', name: 'sopIndex',
components: {SopNav},
data() { data() {
return { return {
activeName: 'first',
size: 'small', size: 'small',
// 环形图配置 // 环形图配置
pieOption: { pieOption: {
...@@ -104,10 +149,13 @@ export default { ...@@ -104,10 +149,13 @@ export default {
}, },
methods: { methods: {
handleClick(tab) {
tab == 'second' ? this.handleJump('sopList') : ''
},
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id, fromPage: '/marketing/sop/index' } : '' query: row ? {id: row.id, fromPage: '/marketing/sop/index',sopType:row.sopType} : ''
}) })
}, },
...@@ -190,7 +238,7 @@ export default { ...@@ -190,7 +238,7 @@ export default {
// 结束 // 结束
handleEnd(row) { handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id }) this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', {sopId: row.id})
}, },
// 1-新增;2-编辑 // 1-新增;2-编辑
...@@ -210,36 +258,71 @@ export default { ...@@ -210,36 +258,71 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-overview { .sop-overview {
.overview-describe {
display: flex;
background: #E4E3FF;
color: #000000;
font-size: 14px;
padding: 10px;
margin: 16px 0;
img {
width: 14px;
height: 14px;
margin-right: 6px;
margin-top: 3px;
}
.describe-text {
line-height: 20px;
}
}
.sop-box { .sop-box {
padding: 32px 20px 12px; padding: 32px 20px 12px;
.box-txt { .box-txt {
line-height: 24px; line-height: 24px;
margin-bottom: 28px; margin-bottom: 28px;
} }
.step-circle { .step-circle {
width: 32px; width: 32px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
text-align: center; text-align: center;
color: #5058ff; //color: #5058ff;
background: rgba(80, 88, 255, 0.1); //background: rgba(80, 88, 255, 0.1);
border: 1px solid #5058ff; //border: 1px solid #5058ff;
color: #fff;
background: #5850FF;
border-radius: 32px; border-radius: 32px;
margin-right: 8px; margin-right: 8px;
margin: 0 auto;
flex: 0 0 auto; flex: 0 0 auto;
} }
.step-txt {
margin-top: 16px;
text-align: center;
width: 100%;
}
.step-line { .step-line {
width: 120px; width: 17%;
height: 1px; height: 1px;
background: #5850ff; background: #F0F1F7;
margin: 0 20px; margin: -25px 10px 0;
} }
.sop-flex { .sop-flex {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.chart-box { .chart-box {
.chart-item { .chart-item {
position: relative; position: relative;
...@@ -252,13 +335,48 @@ export default { ...@@ -252,13 +335,48 @@ export default {
border: 1px solid #eaeaea; border: 1px solid #eaeaea;
padding: 16px; padding: 16px;
margin: 0 20px 20px 0; margin: 0 20px 20px 0;
.sop-type-orange {
position: absolute;
right: 0;
top: 0;
text-align: center;
padding: 0 8px;
line-height: 20px;
//width: 49px;
height: 20px;
font-size: 12px;
background: #FDEAE0;
color: #BE8C72;
border-radius: 1px 0 0 2px;
}
.sop-type-green {
position: absolute;
//width: 45px;
padding: 0 8px;
height: 17px;
right: 0;
top: 0;
text-align: center;
line-height: 20px;
width: 49px;
height: 20px;
font-size: 12px;
background: #DEF6E4;
color: #6FA17C;
border-radius: 1px 0 0 2px;
}
.chart-pie { .chart-pie {
height: 104px; height: 104px;
margin: 8px 0; margin: 8px 0;
} }
.sop-name { .sop-name {
font-weight: 600; font-weight: 600;
} }
.sop-btns { .sop-btns {
display: none; display: none;
box-sizing: border-box; box-sizing: border-box;
...@@ -269,16 +387,19 @@ export default { ...@@ -269,16 +387,19 @@ export default {
left: 0; left: 0;
background: rgba(244, 244, 252, 0.85); background: rgba(244, 244, 252, 0.85);
padding: 28px 0; padding: 28px 0;
.btn-item { .btn-item {
display: block; display: block;
width: 89px; width: 89px;
margin: 0 auto; margin: 0 auto;
} }
.btn-item:nth-child(2) { .btn-item:nth-child(2) {
margin: 16px auto; margin: 16px auto;
} }
} }
} }
// .chart-item:nth-child(4n + 0) { // .chart-item:nth-child(4n + 0) {
// margin-right: 0px; // margin-right: 0px;
// } // }
...@@ -287,6 +408,7 @@ export default { ...@@ -287,6 +408,7 @@ export default {
} }
} }
} }
.p-r-20 { .p-r-20 {
padding-right: 20px; padding-right: 20px;
} }
......
...@@ -10,37 +10,44 @@ ...@@ -10,37 +10,44 @@
<div class="analysis-box flex-default"> <div class="analysis-box flex-default">
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
营销事件总数 <img src="@/assets/sop/complete1.png"/>
<img src="@/assets/sop/sop-event.png" /> <div class="analysis-name">
<div class="analysis-tips">完成率</div>
<p class="analysis-num">{{sopInfo.completedPercent }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-green">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已完成事件数 <img src="@/assets/sop/complete2.png"/>
<img src="@/assets/sop/completed-event.png" /> <div class="analysis-name">
<div class="analysis-tips">已完成事件数</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-orange">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
<div> <img src="@/assets/sop/complete3.png"/>
失败事件数 <div class="analysis-name">
<el-popover placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件"> <div class="analysis-tips">失败事件数
<el-popover class="tips" placement="top" width="200" trigger="hover" content="因企微、短信等限制无法正常执行的事件">
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" /> <img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover> </el-popover></div>
</div> <p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p></div>
<img src="@/assets/sop/completed-fail.png" />
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div> </div>
<div class="analysis-block back-image-blue">
<div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
完成率 <img src="@/assets/sop/complete4.png"/>
<div class="analysis-name">
<div class="analysis-tips">营销事件总数</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.completedPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div> </div>
</div> </div>
<p class="m-b-10">日营销事件明细</p> <p class="m-b-10">日营销事件明细</p>
...@@ -210,7 +217,7 @@ export default { ...@@ -210,7 +217,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-analysis { .sop-analysis {
.title { .title {
height: 32px; height: 32px;
...@@ -218,28 +225,46 @@ export default { ...@@ -218,28 +225,46 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.analysis-box { .analysis-box {
margin-bottom: 40px; margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block { .analysis-block {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
width: 216px; width: 216px;
height: 116px; height: 116px;
padding: 10px 20px 20px; padding: 30px 20px 20px;
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; //flex-basis: 0 0 auto;;
background: #ffffff; //box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f7ff 100%); background: #F9FAFC;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); display: flex;
align-items: center;
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
justify-content: space-between; //justify-content: space-between;
margin-left: 16px;
align-items: center; align-items: center;
height: 40px; height: 40px;
line-height: 40px; //line-height: 40px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
}
} }
.chart-pie { .chart-pie {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -247,17 +272,18 @@ export default { ...@@ -247,17 +272,18 @@ export default {
width: 70px; width: 70px;
height: 74px; height: 74px;
} }
.analysis-num { .analysis-num {
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
margin-top: 16px;
} }
} }
.analysis-block.back-image-green { .analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%); background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
} }
.analysis-block.back-image-orange {
background-image: linear-gradient(0deg, #f8f8fc 0%, #fff6f0 100%);
}
.analysis-block.back-image-blue { .analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%); background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
} }
......
<template>
<div class="marketing">
<div class="container">
<div class="sop-title">SOP名称:{{ list.sopName }}</div>
<div class="funnel-box">
<div class="funnel-bg">
<img class="funnel-img" src="@/assets/sop/funel.png"/>
</div>
<div class="funnel-content">
<div class="left">
<div v-for="(item,index) in numList" :key="index">
{{ item.title }}
<span class="left-num">{{ list[item.num] || 0 }}</span>
</div>
</div>
<div class="right">
<div class="sort-box" v-for="(item,index) in sortList" :key="index">
<div class="sort-title">{{ item.title }}</div>
<div class="sort">{{ rates[item.sort] ? rates[item.sort] : 0 }}%</div>
</div>
</div>
</div>
</div>
<div class="text-box">
<div class="box-left">
<p>营销客户:当前sop已营销的客户,即全部营销事件的营销客户汇总</p>
<p>触达客户:当前sop已营销且已触达的客户,即全部营销事件的触达客户汇总</p>
<p>潜在客户:在营销客户中,客户意向标签为“潜在客户”的客户汇总</p>
<p> 下单客户:在营销客户中,客户意向标签为“下单客户”的客户汇总,即客户产生业务订单</p>
</div>
<div class="box-line"></div>
<div class="box-right">
<p>触达率:(触达客户数量/营销客户数量)*100%</p>
<p>转化率:(潜在客户数量/触达客户数量)*100%</p>
<p>成单率:(下单客户数量/潜在客户数量)*100%</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "resultList",
props: {
sopId: {
type: String,
default: ''
}
},
data() {
return {
numList: [
{title: '营销客户', num: 'marketingCustomerCount'},
{title: '触达客户', num: 'reachCustomerCount'},
{title: '潜在客户', num: 'potentialCustomerCount'},
{title: '成单客户', num: 'dealCustomerCount'}
],
sortList: [
{title: '触达率', sort: 'reachRate'},
{title: '转化率', sort: 'percentConversion'},
{title: '成单率', sort: 'turnoverRatio'}
],
list: null,
rates: {
reachRate: '',
percentConversion: '',
turnoverRatio: ''
}
}
},
async mounted() {
await this.getResult()
this.handleRates()
},
methods: {
async getResult() {
await this.$apis.sop.getEffectAnalysisApi({sopId: this.sopId}).then(res => {
this.list = res
}
)
},
handleRates() {
const {marketingCustomerCount, reachCustomerCount, potentialCustomerCount, dealCustomerCount} = this.list
this.rates.reachRate = parseFloat(((reachCustomerCount / marketingCustomerCount) * 100).toFixed(2))
this.rates.percentConversion
= parseFloat(((potentialCustomerCount / reachCustomerCount)*100).toFixed(2))
this.rates.turnoverRatio = parseFloat(((dealCustomerCount / potentialCustomerCount)*100).toFixed(2))
}
}
}
</script>
<style lang="scss" scoped>
.sop-title {
display: flex;
justify-content: center;
font-weight: 600;
font-size: 20px;
color: #1B233D;
line-height: 48px;
}
.funnel-box {
padding: 40px 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40px;
left: 50%;
transform: translate(-50%);
width: 406px;
height: 288px;
.funnel-img {
width: 406px;
height: 288px;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 248px;
width: 100%;
padding-top: 40px;
//left: 50%;
//transform: translate(-50%);
.left,
.right {
display: flex;
}
.left {
//flex: 0 0 900px;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 14px;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20px;
margin-left: 200px;
div {
display: flex;
align-items: center;
margin-right: 28px;
.left-num {
font-size: 20px;
font-weight: 500;
margin-left: 4px;
}
}
}
.right {
//flex: 1;
//flex-flow: column;
//align-items: flex-start;
//margin-left: 130px;
color: #4466F0;
//padding-top: 20px;
font-size: 14px;
display: inline;
margin-left: 125px;
//position: relative;
.sort-box {
margin: 38px 0;
.sort-title{
margin-left: 12px;
}
}
.sort-box:nth-last-child(2) {
margin-left: -40px;
}
.sort-box:last-child {
//position: absolute;
margin-left: -90px;
//top: 50%;
}
.sort {
font-size: 20px;
font-weight: bold;
margin-top: 6px;
}
}
}
}
.text-box {
background: #E2E1FF;
display: flex;
font-size: 14px;
color: #0E0B4F;
padding: 20px 40px;
line-height: 25px;
margin: 0 50px;
//justify-content: space-between;
.box-line {
width: 2px;
height: 100px;
background: #0e0b4f52;
margin: 0 60px;
}
}
</style>
...@@ -10,29 +10,36 @@ ...@@ -10,29 +10,36 @@
<div class="analysis-box flex-default"> <div class="analysis-box flex-default">
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已下发任务总数 <img src="@/assets/sop/complete1.png"/>
<img src="@/assets/sop/task-total.png" /> <div class="analysis-name"> 总任务完成率
<p class="analysis-num">{{ sopInfo.taskPercent }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20"> <div class="analysis-title-block m-b-20">
已完成任务数 <img src="@/assets/sop/complete2.png"/>
<img src="@/assets/sop/task.png" /> <div class="analysis-name"> 已完成任务数
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p></div>
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishTaskCount }}</p>
</div> </div>
<div class="analysis-block"> <div class="analysis-block">
<div class="analysis-title-block m-b-20">总任务完成率</div> <div class="analysis-title-block m-b-20">
<p class="analysis-num">{{ sopInfo.taskPercent }}</p> <img src="@/assets/sop/staff03.png"/>
<div id="completePie" class="chart-pie"></div> <div class="analysis-name"> 已下发任务总数
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p></div>
</div> </div>
</div> </div>
</div>
<p class="m-b-10">员工任务明细</p> <p class="m-b-10">员工任务明细</p>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable v-loading="loading" ref="staffListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable> <GLTable v-loading="loading" ref="staffListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -41,7 +48,8 @@ ...@@ -41,7 +48,8 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { pieOption } from './pieOption' import {pieOption} from './pieOption'
export default { export default {
name: 'staffList', name: 'staffList',
data() { data() {
...@@ -81,7 +89,7 @@ export default { ...@@ -81,7 +89,7 @@ export default {
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' } pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'}
} }
}, },
...@@ -124,7 +132,7 @@ export default { ...@@ -124,7 +132,7 @@ export default {
// }, // },
getBaseInfo() { getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => { this.$apis.sop.getSopBaseInfoApi({sopId: this.sopId}).then(res => {
this.sopInfo = res this.sopInfo = res
this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) + '%' : '-' this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) + '%' : '-'
this.drawPie() this.drawPie()
...@@ -156,7 +164,7 @@ export default { ...@@ -156,7 +164,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.sop-analysis { .sop-analysis {
.title { .title {
height: 32px; height: 32px;
...@@ -164,28 +172,46 @@ export default { ...@@ -164,28 +172,46 @@ export default {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.analysis-box { .analysis-box {
margin-bottom: 40px; margin-bottom: 40px;
display: flex;
//background: #F9FAFC;
.analysis-block { .analysis-block {
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
width: 216px; width: 216px;
height: 116px; height: 116px;
padding: 10px 20px 20px; padding: 30px 20px 20px;
margin-right: 20px; margin-right: 20px;
flex-basis: 0 0 auto; //flex-basis: 0 0 auto;;
background: #ffffff; //box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
background-image: linear-gradient(0deg, #f8f8fc 0%, #f4f4ff 100%); background: #F9FAFC;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); display: flex;
align-items: center;
.analysis-title-block { .analysis-title-block {
display: flex; display: flex;
justify-content: space-between; //justify-content: space-between;
margin-left: 16px;
align-items: center; align-items: center;
height: 40px; height: 40px;
line-height: 40px; //line-height: 40px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.analysis-name{
margin-left: 16px;
color: #333333;
.analysis-tips{
display: flex;
.tips{
margin-left: 3px;
}
}
} }
}
.chart-pie { .chart-pie {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -193,10 +219,20 @@ export default { ...@@ -193,10 +219,20 @@ export default {
width: 70px; width: 70px;
height: 74px; height: 74px;
} }
.analysis-num { .analysis-num {
font-size: 26px; font-size: 26px;
font-weight: 600; font-weight: 600;
margin-top: 16px;
}
} }
.analysis-block.back-image-green {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0fffa 100%);
}
.analysis-block.back-image-blue {
background-image: linear-gradient(0deg, #f8f8fc 0%, #f0f0ff 100%);
} }
} }
} }
......
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
<complete-list v-if="activeName == 'compleList'" :sopId="routeInfo.id"></complete-list> <complete-list v-if="activeName == 'compleList'" :sopId="routeInfo.id"></complete-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="触达率分析" name="touchList"> <el-tab-pane label="触达率分析" name="touchList">
<touch-list v-if="activeName == 'touchList'" :sopId="routeInfo.id"></touch-list> <touch-list v-if="activeName == 'touchList'" :sopId="routeInfo.id" :sopType="routeInfo.sopType"></touch-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="员工完成率分析" name="staffList"> <el-tab-pane label="员工完成率分析" name="staffList" v-if=" routeInfo.sopType == 1">
<staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list> <staff-list v-if="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="效果分析" name="resultList">
<ResultList v-if="activeName == 'resultList'" :sopId="routeInfo.id"></ResultList>
</el-tab-pane>
</el-tabs> </el-tabs>
<el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button> <el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button>
</div> </div>
...@@ -20,6 +23,7 @@ ...@@ -20,6 +23,7 @@
import completeList from './sopAnalysis/completeList.vue' import completeList from './sopAnalysis/completeList.vue'
import touchList from './sopAnalysis/touchList.vue' import touchList from './sopAnalysis/touchList.vue'
import staffList from './sopAnalysis/staffList.vue' import staffList from './sopAnalysis/staffList.vue'
import ResultList from './sopAnalysis/resultList.vue'
export default { export default {
name: 'gitfBag', name: 'gitfBag',
data() { data() {
...@@ -36,11 +40,13 @@ export default { ...@@ -36,11 +40,13 @@ export default {
components: { components: {
completeList, completeList,
touchList, touchList,
staffList staffList,
ResultList
}, },
created() { created() {
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
console.log(this.routeInfo)
}, },
methods: { methods: {
......
<!-- sop管理 --> <!-- sop管理 -->
<template> <template>
<div class="marketing sop-list"> <div class="marketing sop-list">
<div class="m-b-20 p-relative"> <SopNav @clickNav="handleClick" :activeName="'second'"/>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')">新建SOP</el-button> <div class="m-b-20 m-t-20 p-relative">
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')"> 新建SOP</el-button>
<!-- <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>-->
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
...@@ -22,15 +23,18 @@ ...@@ -22,15 +23,18 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import SopNav from "views/sop/SopNav";
export default { export default {
name: 'sopList', name: 'sopList',
components:{SopNav},
data() { data() {
return { return {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
sopName: '', sopName: '',
sopStatus: '' sopStatus: '',
sopType:''
}, },
// 搜索 // 搜索
searchFormData: [ searchFormData: [
...@@ -42,6 +46,15 @@ export default { ...@@ -42,6 +46,15 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: '类型',
name: 'sopType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sopTypeList'
},
{
label: '营销状态', label: '营销状态',
name: 'sopStatus', name: 'sopStatus',
type: 'select', type: 'select',
...@@ -79,19 +92,19 @@ export default { ...@@ -79,19 +92,19 @@ export default {
click: this.handleEnd click: this.handleEnd
} }
}, },
// { {
// type: 'el-button', type: 'el-button',
// name: '查看', name: '查看',
// attrs: { attrs: {
// type: 'text' type: 'text'
// }, },
// condition: row => { condition: row => {
// return row.sopStatus == 3 return row.sopStatus == 3
// }, },
// listeners: { listeners: {
// click: row => this.handleEdit('look', row) click: row => this.handleJump('viewSop', row)
// } }
// }, },
{ {
type: 'el-button', type: 'el-button',
name: '复制', name: '复制',
...@@ -142,6 +155,15 @@ export default { ...@@ -142,6 +155,15 @@ export default {
line: 1 line: 1
}, },
{ {
label: '类型',
prop: 'sopType',
width: 240,
line: 1,
formatter: cellValue => {
return cellValue.sopType == 2 ? '群sop' :'客户sop'
}
},
{
label: '营销时间', label: '营销时间',
prop: 'startDate', prop: 'startDate',
width: '220', width: '220',
...@@ -192,6 +214,16 @@ export default { ...@@ -192,6 +214,16 @@ export default {
confId: 3, confId: 3,
confName: '已结束' confName: '已结束'
} }
],
sopTypeList: [
{
confId: 1,
confName: '客户sop'
},
{
confId: 2,
confName: '群sop'
},
] ]
} }
} }
...@@ -202,10 +234,13 @@ export default { ...@@ -202,10 +234,13 @@ export default {
}, },
methods: { methods: {
handleClick(tab) {
tab == 'first' ? this.handleJump('index') : ''
},
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : '' query: row ? { id: row.id,sopType:row.sopType, fromPage: '/marketing/sop/sopList' } : ''
}) })
}, },
...@@ -305,7 +340,28 @@ export default { ...@@ -305,7 +340,28 @@ export default {
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.gl-tabs{
/deep/ .el-tabs__header {
margin: 0 0 10px;
//background: #f0f1f7;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
background: #f0f1f7 !important;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
background: #f0f1f7;
border-bottom: 2px solid #5850ff !important;
}
}
.sop-list .sop-back-btn { .sop-list .sop-back-btn {
position: absolute; position: absolute;
right: 0; right: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!