|
@@ -137,7 +137,7 @@ |
|
|
</u-select> |
|
|
</u-select> |
|
|
<u-select v-model="staffShow1" :list="staffList1" @confirm="staffSelectCallback" :default-value='selindex'> |
|
|
<u-select v-model="staffShow1" :list="staffList1" @confirm="staffSelectCallback" :default-value='selindex'> |
|
|
</u-select> |
|
|
</u-select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 加载组件 --> |
|
|
<!-- 加载组件 --> |
|
|
<loading v-model="LOADING"></loading> |
|
|
<loading v-model="LOADING"></loading> |
|
|
</view> |
|
|
</view> |
|
@@ -187,7 +187,7 @@ |
|
|
fontSize: 10, |
|
|
fontSize: 10, |
|
|
extra: { |
|
|
extra: { |
|
|
radar: { |
|
|
radar: { |
|
|
max: '' |
|
|
|
|
|
|
|
|
max: 100 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@@ -306,7 +306,9 @@ |
|
|
this.activeTotal = 3; |
|
|
this.activeTotal = 3; |
|
|
this.lastEndDate = option.endDate |
|
|
this.lastEndDate = option.endDate |
|
|
this.lastStartDate = option.startDate |
|
|
this.lastStartDate = option.startDate |
|
|
let obj = this.staffList1.find(item => {return item.value == option.id }) |
|
|
|
|
|
|
|
|
let obj = this.staffList1.find(item => { |
|
|
|
|
|
return item.value == option.id |
|
|
|
|
|
}) |
|
|
console.log(obj, 'obj') |
|
|
console.log(obj, 'obj') |
|
|
this.staff1.label = obj.label |
|
|
this.staff1.label = obj.label |
|
|
this.staff1.value = option.id |
|
|
this.staff1.value = option.id |
|
@@ -489,7 +491,17 @@ |
|
|
// console.log(res) |
|
|
// console.log(res) |
|
|
let first = res.first |
|
|
let first = res.first |
|
|
let second = res.second |
|
|
let second = res.second |
|
|
let max = first[0].avgExecutionRate |
|
|
|
|
|
|
|
|
let xAxis = [] // 制作雷达图的x轴 |
|
|
|
|
|
first.forEach(item => { |
|
|
|
|
|
if (xAxis.findIndex(res => res.marketingId == item.marketingId) == -1) { |
|
|
|
|
|
xAxis.push(item) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
second.forEach(item => { |
|
|
|
|
|
if (xAxis.findIndex(res => res.marketingId == item.marketingId) == -1) { |
|
|
|
|
|
xAxis.push(item) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
this.chartData.categories = [] |
|
|
this.chartData.categories = [] |
|
|
if (!this.timepickpickisshow) { |
|
|
if (!this.timepickpickisshow) { |
|
|
this.chartData.series = [{ |
|
|
this.chartData.series = [{ |
|
@@ -497,9 +509,14 @@ |
|
|
data: [] |
|
|
data: [] |
|
|
}] |
|
|
}] |
|
|
first.map(item => { |
|
|
first.map(item => { |
|
|
if (max < item.avgExecutionRate) max = item.avgExecutionRate; |
|
|
|
|
|
this.chartData.categories.push(item.name) |
|
|
this.chartData.categories.push(item.name) |
|
|
this.chartData.series[0].data.push(item.avgExecutionRate) |
|
|
|
|
|
|
|
|
if (item.avgExecutionRate < 0) { |
|
|
|
|
|
this.chartData.series[0].data.push(0) |
|
|
|
|
|
} else if (item.avgExecutionRate > 100) { |
|
|
|
|
|
this.chartData.series[0].data.push(100) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.chartData.series[0].data.push(item.avgExecutionRate) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.chartData.series = [{ |
|
|
this.chartData.series = [{ |
|
@@ -507,29 +524,45 @@ |
|
|
data: [] |
|
|
data: [] |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"name": second[0].accountName, |
|
|
|
|
|
"data": [] |
|
|
|
|
|
|
|
|
name: second[0].accountName, |
|
|
|
|
|
data: [] |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
first.map(item => { |
|
|
|
|
|
|
|
|
console.log(xAxis, 'sdaklijdklsajdklasjkdlsjal') |
|
|
|
|
|
xAxis.map(item => { |
|
|
this.chartData.categories.push(item.name) |
|
|
this.chartData.categories.push(item.name) |
|
|
this.chartData.series[0].data.push(item.avgExecutionRate) |
|
|
|
|
|
}) |
|
|
|
|
|
second.map(item => { |
|
|
|
|
|
this.chartData.series[1].data.push(item.avgExecutionRate) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
let all = [...first, ...second] |
|
|
|
|
|
all.map(item => { |
|
|
|
|
|
if (max < item.avgExecutionRate) max = item.avgExecutionRate; |
|
|
|
|
|
|
|
|
let obj1 = first.find(res => res.marketingId == item.marketingId) |
|
|
|
|
|
let obj2 = second.find(res => res.marketingId == item.marketingId) |
|
|
|
|
|
if (obj1 && Object.keys(obj1).length > 0) { |
|
|
|
|
|
this.chartData.series[0].data.push(this.checkRange(obj1.avgExecutionRate)) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.chartData.series[0].data.push(0) |
|
|
|
|
|
} |
|
|
|
|
|
if (obj2 && Object.keys(obj2).length > 0) { |
|
|
|
|
|
this.chartData.series[1].data.push(this.checkRange(obj2.avgExecutionRate)) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.chartData.series[1].data.push(0) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.$forceUpdate() |
|
|
} |
|
|
} |
|
|
this.opts.extra.radar.max = max + 25 |
|
|
|
|
|
|
|
|
|
|
|
}).catch(e => { |
|
|
}).catch(e => { |
|
|
this.LOADING = false |
|
|
this.LOADING = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 检测范围 |
|
|
|
|
|
checkRange(num) { |
|
|
|
|
|
if (num < 0) { |
|
|
|
|
|
return 0 |
|
|
|
|
|
} else if (num > 100) { |
|
|
|
|
|
return 100 |
|
|
|
|
|
} else { |
|
|
|
|
|
return num |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
tabtimetap(index) { |
|
|
tabtimetap(index) { |
|
|
if (index == 3) { |
|
|
if (index == 3) { |
|
|
this.totalTimeShow = true; |
|
|
this.totalTimeShow = true; |
|
|