Commit cc3caf67 by chenwq

sop分析,展示和用户体验

1 parent df91948f
......@@ -54,7 +54,10 @@ export default {
label: '客户名称',
prop: 'customerName',
line: 1,
width: 160
width: 160,
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '客户手机号',
......
......@@ -26,7 +26,7 @@
<div class="analysis-title-block m-b-20">
完成率
</div>
<p class="analysis-num">{{ sopInfo.completedPercent + '%' }}</p>
<p class="analysis-num">{{ sopInfo.completedPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
......@@ -51,6 +51,7 @@ export default {
size: 'small',
url: url,
sopInfo: {
completedPercent: '',
sopStatistics: {}
},
searchForm: {},
......@@ -149,7 +150,7 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0)
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) + '%'
this.drawPie()
})
},
......
......@@ -24,7 +24,7 @@
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">总任务完成率</div>
<p class="analysis-num">{{ sopInfo.taskPercent + '%' }}</p>
<p class="analysis-num">{{ sopInfo.taskPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
......@@ -49,10 +49,10 @@ export default {
size: 'small',
url: url,
sopInfo: {
taskPercent: '',
sopStatistics: {}
},
loading: false,
taskPercent: '',
searchForm: {},
// isCheckStatus: false,
// 表格
......@@ -126,7 +126,7 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) : 0
this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) + '%' : '-'
this.drawPie()
})
},
......
......@@ -7,43 +7,45 @@
<span>{{ sopInfo.sopName }}</span>
</div>
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer">
<div v-loading="loading">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> -->
</glsx-combi-form>
</div>
</glsx-combi-form>
</div>
<div class="analysis-box flex-default">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
客户总数
<img src="@/assets/sop/customer-total.png" />
<div class="analysis-box flex-default">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
客户总数
<img src="@/assets/sop/customer-total.png" />
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? sopInfo.customerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<p class="analysis-num">{{ baseData.sopEventList.length ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
触达率
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
触达率
</div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
<p class="analysis-num">{{ sopInfo.touchPercent }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
<p class="m-b-10">客户触达明细</p>
<p class="m-b-10">客户触达明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 开始 -->
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</div>
</template>
......@@ -59,6 +61,7 @@ export default {
return {
size: 'small',
url: url,
loading: false,
searchForm: {
sopId: '',
eventId: ''
......@@ -135,6 +138,7 @@ export default {
mounted() {
this.getBaseData()
this.$refs.touchListRef.tableHeightValues = '400px'
},
methods: {
......@@ -147,6 +151,7 @@ export default {
},
getBaseData() {
this.loading = true
var params = {
sopId: this.sopId,
ifFilter: 'Y',
......@@ -158,20 +163,25 @@ export default {
2: '短信',
3: '微信朋友圈'
}
this.$apis.sop.getEventListApi(params).then(res => {
this.baseData.sopEventList = res.list
console.log(res)
if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
})
this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0]
}
this.getBaseInfo()
this.$refs.touchListRef.refreshTable()
})
this.$apis.sop
.getEventListApi(params)
.then(res => {
this.baseData.sopEventList = res.list
console.log(res)
if (this.baseData.sopEventList.length) {
this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
})
this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0]
}
this.getBaseInfo()
this.$refs.touchListRef.refreshTable()
})
.finally(() => {
this.loading = false
})
},
beforeSearchFn() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!