Commit b18a32ea by wuwx Committed by 杨北旺

sop分析-触达率,员工完成率

1 parent 7343b481
......@@ -4,7 +4,7 @@
<div class="container">
<div class="title m-b-20">
SOP名称:
<span>这是某次营销sop</span>
<span>{{ sopInfo.sopName }}</span>
</div>
<div class="analysis-box flex-default">
......@@ -13,20 +13,20 @@
已下发任务总数
<img src="@/assets/sop/task-total.png" />
</div>
<p class="analysis-num">20</p>
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已完成任务数
<img src="@/assets/sop/task.png" />
</div>
<p class="analysis-num">12</p>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishEventCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
总任务完成率
</div>
<p class="analysis-num">60%</p>
<p class="analysis-num">{{ sopInfo.taskPercent + '%' }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
......@@ -34,7 +34,7 @@
<p class="m-b-10">员工任务明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="staffListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -46,11 +46,14 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { pieOption } from './pieOption'
export default {
name: 'completeList',
name: 'staffList',
data() {
return {
size: 'small',
url: url,
sopInfo: {
sopStatistics: {}
},
searchForm: {},
// 表格
getListApi: this.$apis.sop.getSopStaffTaskListApi,
......@@ -82,19 +85,7 @@ export default {
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
commentStatusList: [
{
confId: '0',
confName: '未发布'
},
{
confId: '1',
confName: '已发布'
}
]
}
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
......@@ -106,7 +97,7 @@ export default {
},
mounted() {
this.drawPie()
this.getBaseInfo()
},
methods: {
......@@ -141,7 +132,15 @@ export default {
setTableFinishFun() {
//接收到的数据为空
this.$refs.giftListRef.data.length ? (this.$refs.giftListRef.tableHeightValues = '') : this.$refs.giftListRef.setTableHeightFun()
this.$refs.staffListRef.data.length ? (this.$refs.staffListRef.tableHeightValues = '') : this.$refs.staffListRef.setTableHeightFun()
},
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.drawPie()
})
},
drawPie() {
......@@ -149,15 +148,14 @@ export default {
let myChart = echarts.init(chartDom)
let option = JSON.parse(JSON.stringify(pieOption))
// option.series[0].name = item.sopName
option.series[0].data = [
{
value: 60,
name: '已触发的营销事件'
value: this.sopInfo.sopStatistics.finishTaskCount ,
name: '已完成的事件数'
},
{
value: 40,
name: '未触发的营销事件'
value: this.sopInfo.sopStatistics.issuedTaskCount - this.sopInfo.sopStatistics.finishTaskCount,
name: '未完成的事件数'
}
]
......@@ -167,7 +165,7 @@ export default {
},
handleSearch() {
this.$refs.giftListRef.refreshTable()
this.$refs.staffListRef.refreshTable()
}
}
}
......
......@@ -57,10 +57,9 @@
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant'
import { pieOption } from './pieOption'
export default {
name: 'completeList',
name: 'touchList',
data() {
return {
size: 'small',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!