This commit is contained in:
qsh
2024-11-06 15:53:14 +08:00
parent 3022106428
commit b475af8dd3
3 changed files with 28 additions and 12 deletions

View File

@@ -238,13 +238,21 @@ const echart3Option = ref({
const setReportData = async (data) => {
// const data = await HomeApi.getClueSignSignRate()
const channelClueArr = showChannel.value.sort((pre, cur) => {
const preArr = tableList.value.find((it) => it.sourceName == pre).clueIntentionNumVOList || []
const curArr = tableList.value.find((it) => it.sourceName == cur).clueIntentionNumVOList || []
const preCount = preArr.reduce((preVal, curVal) => preVal + curVal.intentionNum, 0)
const curCount = curArr.reduce((preVal, curVal) => preVal + curVal.intentionNum, 0)
return preCount - curCount
})
const arr1 = intentionOptions.map((intention) => {
const list = []
tableList.value.map((it) => {
if (showChannel.value.includes(it.sourceName)) {
channelClueArr.map((item) => {
const row = tableList.value.find((it) => item == it.sourceName)
if (row) {
list.push(
it.clueIntentionNumVOList.find((row) => row.intentionState == intention.value)
.intentionNum
row.clueIntentionNumVOList.find((it) => it.intentionState == intention.value).intentionNum
)
}
})
@@ -264,12 +272,20 @@ const setReportData = async (data) => {
}
})
const channelSignArr = showChannel.value.sort((pre, cur) => {
const preArr = tableList.value.find((it) => it.sourceName == pre).signLicenseTypeNumVOList || []
const curArr = tableList.value.find((it) => it.sourceName == cur).signLicenseTypeNumVOList || []
const preCount = preArr.reduce((preVal, curVal) => preVal + curVal.licenseTypeNum, 0)
const curCount = curArr.reduce((preVal, curVal) => preVal + curVal.licenseTypeNum, 0)
return preCount - curCount
})
const arr2 = props.licenseTypeOptions.map((cartype) => {
const list = []
tableList.value.map((it) => {
if (showChannel.value.includes(it.sourceName)) {
channelClueArr.map((item) => {
const row = tableList.value.find((it) => item == it.sourceName)
if (row) {
list.push(
it.signLicenseTypeNumVOList.find((row) => row.licenseType == cartype.label).licenseTypeNum
row.signLicenseTypeNumVOList.find((it) => it.licenseType == cartype.label).licenseTypeNum
)
}
})
@@ -291,7 +307,7 @@ const setReportData = async (data) => {
set(echart1Option.value, 'radiusAxis', {
type: 'category',
data: showChannel.value,
data: channelClueArr,
axisLabel: {
margin: 5,
fontSize: 10,
@@ -303,7 +319,7 @@ const setReportData = async (data) => {
set(echart2Option.value, 'radiusAxis', {
type: 'category',
data: showChannel.value,
data: channelSignArr,
axisLabel: {
margin: 5,
fontSize: 10,