Commit 2d2281d6 by 杨北旺

sop编辑弹出;sop分析

1 parent f5b07875
......@@ -14,7 +14,7 @@
<div slot="customerInfoList" slot-scope="scope">
<div v-if="!scope.scope.isDisabled">
<el-button class="default-blue-btn" :size="size" @click="handleSelectCustomer">选择客户</el-button>
<el-button :size="size" @click="handleResetCustomer">重置客户</el-button>
<el-button v-show="editForm.customerInfoList.length" :size="size" @click="handleResetCustomer">重置客户</el-button>
</div>
<div v-show="editForm.customerInfoList.length != 0" class="customer-box m-t-10">
<div class="customer-title">{{ condLimitObj.hasQw ? '已加' : '没加' }}企微/{{ condLimitObj.hasPhone ? '有' : '没有' }}手机号:{{ editForm.customerInfoList.length }}人</div>
......@@ -54,7 +54,7 @@
</div>
<div class="event-content">{{ item.eventContent }}</div>
<div class="event-link" v-if="item.object">
<img class="m-r-10" :src="require(`@/assets/sop/icon-${imgIcon[item.object.additionalType]}.png`)" alt />
<img class="m-r-10" v-if="item.object.additionalType" :src="require(`@/assets/sop/icon-${imgIcon[item.object.additionalType]}.png`)" alt />
<div v-if="item.object.additionalType == 4">
<div v-if="item.object.showVideoContent.length">
<video class="model-item-img" :src="item.object.showVideoContent[0].attContent" controls="controls" />
......@@ -108,6 +108,11 @@ export default {
3: 'coupon',
4: 'nickname'
},
markCondLimitObj: {
// 1-有;0-无
hasPhone: -1,
hasQw: -1
},
condLimitObj: {
// 1-有;0-无
hasPhone: 0,
......@@ -258,6 +263,10 @@ export default {
var obj = this.editForm.customerInfoList[0]
this.condLimitObj.hasQw = obj.isJoin
this.condLimitObj.hasPhone = obj.customerPhone ? 1 : 0
this.markCondLimitObj = {
hasQw: this.condLimitObj.hasQw,
hasPhone: this.condLimitObj.hasPhone
}
},
// 选择标签
......@@ -265,6 +274,15 @@ export default {
this.tagging = obj.selectedLabelList
this.editForm.customerInfoList = obj.selectedCustomerList
this.condLimitObj = obj.condLimitObj
if (this.markCondLimitObj.hasQw != -1) {
if (this.markCondLimitObj.hasQw != obj.condLimitObj.hasQw || this.markCondLimitObj.hasPhone != obj.condLimitObj.hasPhone) {
this.editForm.eventList = []
}
}
this.markCondLimitObj = {
hasQw: this.condLimitObj.hasQw,
hasPhone: this.condLimitObj.hasPhone
}
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
......@@ -287,19 +305,66 @@ export default {
},
handleSelectCustomer() {
this.isTagVisible = !this.isTagVisible
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: this.tagging, customerInfoList: this.editForm.customerInfoList })
if (this.editForm.eventList.length) {
this.$confirm('已有事件,改变客户后,会导致事件丢失', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
console.log(action)
if (action == 'confirm') {
this.isTagVisible = !this.isTagVisible
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: this.tagging, customerInfoList: this.editForm.customerInfoList })
}
}
})
} else {
this.isTagVisible = !this.isTagVisible
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: this.tagging, customerInfoList: this.editForm.customerInfoList })
}
// console.log(this.isTagVisible)
},
handleResetCustomer() {
this.editForm.customerInfoList = []
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
if (this.editForm.eventList.length) {
this.$confirm('清空客户,事件也将清空', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
console.log(action)
if (action == 'confirm') {
this.editForm.customerInfoList = []
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
this.editForm.eventList = []
}
}
})
} else {
this.editForm.customerInfoList = []
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
}
},
handleDeleteCustomer(idx) {
this.editForm.customerInfoList.splice(idx, 1)
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
if (this.editForm.customerInfoList.length == 1 && this.editForm.eventList.length) {
this.$confirm('删完所有客户,事件也将清空', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
console.log(action)
if (action == 'confirm') {
this.editForm.customerInfoList.splice(idx, 1)
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
this.editForm.eventList = []
}
}
})
} else {
this.editForm.customerInfoList.splice(idx, 1)
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
}
},
// 处理营销时间
......
......@@ -91,7 +91,7 @@ export default {
{
label: '营销渠道',
prop: 'pushChannelType',
width: '100',
width: '140',
formatter: cellValue => {
var pushChannelTypeList = {
1: '企业微信',
......@@ -104,6 +104,7 @@ export default {
{
label: '营销事件总数',
prop: 'eventStatistics',
width: '140',
formatter: cellValue => {
return cellValue.eventStatistics ? cellValue.eventStatistics.eventCount : '-'
}
......@@ -111,6 +112,7 @@ export default {
{
label: '已完成事件数',
prop: 'eventStatistics',
width: '140',
formatter: cellValue => {
return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-'
}
......
......@@ -23,9 +23,7 @@
<p class="analysis-num">{{ sopInfo.sopStatistics.finishEventCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
总任务完成率
</div>
<div class="analysis-title-block m-b-20">总任务完成率</div>
<p class="analysis-num">{{ sopInfo.taskPercent + '%' }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
......@@ -136,6 +134,7 @@ export default {
getTaskStatus() {
this.$apis.sop.getTaskStatusApi({}).then(res => {
this.isCheckStatus = true
this.$refs.staffListRef.refreshTable()
})
},
......@@ -154,7 +153,7 @@ export default {
option.series[0].data = [
{
value: this.sopInfo.sopStatistics.finishTaskCount ,
value: this.sopInfo.sopStatistics.finishTaskCount,
name: '已完成的事件数'
},
{
......
......@@ -109,7 +109,7 @@ export default {
label: '初次查看事件',
prop: 'firstViewDate',
formatter: cellValue => {
return cellValue.firstViewDate || '未查看'
return dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') || '未查看'
}
},
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!