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,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<span>{{ sopInfo.sopName }}</span> <span>{{ sopInfo.sopName }}</span>
</div> </div>
<div v-loading="loading">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<!-- <span slot="footer"> <!-- <span slot="footer">
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -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,7 +163,9 @@ export default { ...@@ -158,7 +163,9 @@ export default {
2: '短信', 2: '短信',
3: '微信朋友圈' 3: '微信朋友圈'
} }
this.$apis.sop.getEventListApi(params).then(res => { this.$apis.sop
.getEventListApi(params)
.then(res => {
this.baseData.sopEventList = res.list this.baseData.sopEventList = res.list
console.log(res) console.log(res)
if (this.baseData.sopEventList.length) { if (this.baseData.sopEventList.length) {
...@@ -172,6 +179,9 @@ export default { ...@@ -172,6 +179,9 @@ export default {
this.getBaseInfo() this.getBaseInfo()
this.$refs.touchListRef.refreshTable() 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!