Commit cc3caf67 by chenwq

sop分析,展示和用户体验

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