Commit 1e81ea35 by chenwq Committed by 杨北旺

sop主页

1 parent 52b99bb5
......@@ -104,7 +104,6 @@ const ATT_TYPE = {
FILE: 6,
ACTIVITY: 7
}
import * as moment from 'moment'
import ActivityModel from './components/activityModel'
export default {
name: 'editGift',
......
......@@ -32,7 +32,7 @@
<div class="chart-item" v-for="item in sopList" :key="item.id">
<p>{{ item.sopName }}</p>
<div :id="'sopPie' + item.id" class="chart-pie"></div>
<p>2021.10.28-2022.10.28</p>
<p>{{ item.dateRange }}</p>
<div class="sop-btns">
<GLButton class="btn-item" :size="size" type="primary" fn="分析sop" @click="handleJump('sopAnalysisList', item)">sop分析</GLButton>
<GLButton class="btn-item" :size="size" type="primary" fn="编辑sop" @click="handleEdit('edit', item)">编辑</GLButton>
......@@ -47,6 +47,7 @@
<script>
import * as echarts from 'echarts'
import * as moment from 'moment'
export default {
name: 'sopIndex',
data() {
......@@ -147,9 +148,18 @@ export default {
dealListData() {
this.sopList.forEach(item => {
item.completedPercent = Math.round((item.sopStatistics.finishEventCount / item.sopStatistics.eventCount) * 100).toFixed(0)
item.dateRange =
moment(item.startDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.') +
(item.endDate
? '-' +
moment(item.endDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.')
: '')
})
},
drawPie() {
console.log(this.sopList)
this.sopList.forEach(item => {
......@@ -157,7 +167,7 @@ export default {
let myChart = echarts.init(chartDom)
let option = JSON.parse(JSON.stringify(this.pieOption))
option.title.text = item.completedPercent == '100' ? '√' : item.completedPercent + '%'
// option.title.text = item.completedPercent == '100' ? '√' : item.completedPercent + '%'
option.title.text = item.completedPercent + '%'
option.series[0].name = item.sopName
option.series[0].data = [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!