|
@@ -166,6 +166,7 @@ import CountTo from 'vue-count-to'
|
|
import * as API_interaction from '@/api/ncs_interaction'
|
|
import * as API_interaction from '@/api/ncs_interaction'
|
|
import Storage from '@/utils/storage'
|
|
import Storage from '@/utils/storage'
|
|
import myInfo from '@/views/ncs-chars/info'
|
|
import myInfo from '@/views/ncs-chars/info'
|
|
|
|
+import {TCP_TYPE} from "@/utils/enum/TcpTypeEnum";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'Index',
|
|
name: 'Index',
|
|
@@ -224,6 +225,8 @@ export default {
|
|
} else {
|
|
} else {
|
|
_this.partTotal.count = res.count
|
|
_this.partTotal.count = res.count
|
|
_this.partTotal.noCount = res.noCount
|
|
_this.partTotal.noCount = res.noCount
|
|
|
|
+ _this.btListNameToStr(res.btList)
|
|
|
|
+ _this.btListNameToStr(res.noBtList)
|
|
_this.buildTable(res.btList, res.noBtList)
|
|
_this.buildTable(res.btList, res.noBtList)
|
|
_this.buildBtChart(res.btList, res.noBtList) // 饼图
|
|
_this.buildBtChart(res.btList, res.noBtList) // 饼图
|
|
_this.buildChart(res.dataList, res.tilStr, res.xAxis, 'chart', this.$t('interaction.dataCensus'))
|
|
_this.buildChart(res.dataList, res.tilStr, res.xAxis, 'chart', this.$t('interaction.dataCensus'))
|
|
@@ -236,10 +239,12 @@ export default {
|
|
this.dataList.forEach(item => {
|
|
this.dataList.forEach(item => {
|
|
let count = 0
|
|
let count = 0
|
|
let noCount = 0
|
|
let noCount = 0
|
|
|
|
+ // const data = btList.find(p => TCP_TYPE.getDescFromValue(p.name) === item)
|
|
const data = btList.find(p => p.name === item)
|
|
const data = btList.find(p => p.name === item)
|
|
if (data) {
|
|
if (data) {
|
|
count = data.value
|
|
count = data.value
|
|
}
|
|
}
|
|
|
|
+ // const noData = noBtList.find(p => TCP_TYPE.getDescFromValue(p.name) === item)
|
|
const noData = noBtList.find(p => p.name === item)
|
|
const noData = noBtList.find(p => p.name === item)
|
|
if (noData) {
|
|
if (noData) {
|
|
noCount = noData.value
|
|
noCount = noData.value
|
|
@@ -258,7 +263,7 @@ export default {
|
|
if (dataList.length > 0) {
|
|
if (dataList.length > 0) {
|
|
dataList.forEach((item, index) => {
|
|
dataList.forEach((item, index) => {
|
|
const d = {
|
|
const d = {
|
|
- name: tilStr[index],
|
|
|
|
|
|
+ name: TCP_TYPE.getDescFromValue(tilStr[index]),
|
|
type: 'line',
|
|
type: 'line',
|
|
stack: this.$t('interaction.total') + index,
|
|
stack: this.$t('interaction.total') + index,
|
|
data: item,
|
|
data: item,
|
|
@@ -284,7 +289,7 @@ export default {
|
|
// top: 'bottom'
|
|
// top: 'bottom'
|
|
// },
|
|
// },
|
|
legend: {
|
|
legend: {
|
|
- data: tilStr
|
|
|
|
|
|
+ data: TCP_TYPE.getDescFromValue(tilStr)
|
|
},
|
|
},
|
|
grid: {
|
|
grid: {
|
|
left: '3%',
|
|
left: '3%',
|
|
@@ -491,6 +496,8 @@ export default {
|
|
return this.$t('tcpType.ENTRACEGUARD')
|
|
return this.$t('tcpType.ENTRACEGUARD')
|
|
case 'SOS':
|
|
case 'SOS':
|
|
return this.$t('tcpType.SOS')
|
|
return this.$t('tcpType.SOS')
|
|
|
|
+ case 'PHONE':
|
|
|
|
+ return this.$t('tcpType.PHONE')
|
|
default:
|
|
default:
|
|
return this.$t('tcpType.UNKNOWN')
|
|
return this.$t('tcpType.UNKNOWN')
|
|
}
|
|
}
|
|
@@ -589,6 +596,12 @@ export default {
|
|
return v[j]
|
|
return v[j]
|
|
}
|
|
}
|
|
}))
|
|
}))
|
|
|
|
+ },
|
|
|
|
+ btListNameToStr(btList) {
|
|
|
|
+ console.log(btList)
|
|
|
|
+ btList = btList.forEach(p => p.name = TCP_TYPE.getDescFromValue(p.name))
|
|
|
|
+ // console.log(btList)
|
|
|
|
+ // return btList
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|