fanzhen0102
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
function draw (canvaswidth, canvasheight, refidentifying) {
|
function draw (canvaswidth, canvasheight, refidentifying) {
|
||||||
var showNum = []
|
var showNum = []
|
||||||
var canvas = refidentifying // 获取到canvas的对象,演员
|
var canvas = refidentifying // 获取到canvas的对象,演员
|
||||||
console.log(canvas.getContext)
|
|
||||||
var context = canvas.getContext('2d') // 获取到canvas画图的环境,演员表演的舞台
|
var context = canvas.getContext('2d') // 获取到canvas画图的环境,演员表演的舞台
|
||||||
canvas.width = canvaswidth
|
canvas.width = canvaswidth
|
||||||
canvas.height = canvasheight
|
canvas.height = canvasheight
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ class computedFunc {
|
|||||||
series: [{
|
series: [{
|
||||||
name: '访问来源',
|
name: '访问来源',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
|
avoidLabelOverlap: true,
|
||||||
radius: '55%',
|
radius: '55%',
|
||||||
center: ['50%', '50%'],
|
center: ['50%', '50%'],
|
||||||
data: [{
|
data: [{
|
||||||
@@ -120,7 +121,6 @@ class computedFunc {
|
|||||||
// 总数据处理
|
// 总数据处理
|
||||||
countData: []
|
countData: []
|
||||||
}
|
}
|
||||||
console.log(this.transBeforeData)
|
|
||||||
}
|
}
|
||||||
// 初始化所有的数据
|
// 初始化所有的数据
|
||||||
initAllData () {
|
initAllData () {
|
||||||
@@ -196,6 +196,7 @@ class computedFunc {
|
|||||||
series: [{
|
series: [{
|
||||||
name: '访问来源',
|
name: '访问来源',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
|
avoidLabelOverlap: true,
|
||||||
radius: '55%',
|
radius: '55%',
|
||||||
center: ['50%', '50%'],
|
center: ['50%', '50%'],
|
||||||
data: [{
|
data: [{
|
||||||
@@ -247,8 +248,6 @@ class computedFunc {
|
|||||||
// 重定向数组
|
// 重定向数组
|
||||||
let listArrs = JSON.parse(JSON.stringify(listArr))
|
let listArrs = JSON.parse(JSON.stringify(listArr))
|
||||||
let lineArrs = JSON.parse(JSON.stringify(lineArr))
|
let lineArrs = JSON.parse(JSON.stringify(lineArr))
|
||||||
console.log(listArrs, lineArrs)
|
|
||||||
console.log(this.restur, 'this.resturkkkkk')
|
|
||||||
listArrs.push(0) // 必选第一项
|
listArrs.push(0) // 必选第一项
|
||||||
if (this.restur.tableLine.length < listArrs.length) {
|
if (this.restur.tableLine.length < listArrs.length) {
|
||||||
listArrs = this.restur.tableLine.map((item, index) => {
|
listArrs = this.restur.tableLine.map((item, index) => {
|
||||||
@@ -269,7 +268,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// this.selectData.tableLine = this.restur.tableLine
|
// this.selectData.tableLine = this.restur.tableLine
|
||||||
console.log(JSON.parse(JSON.stringify(this.restur.countData)), '12222')
|
|
||||||
let datart = JSON.parse(JSON.stringify(this.restur.countData))
|
let datart = JSON.parse(JSON.stringify(this.restur.countData))
|
||||||
let csd1 = datart.map((itemCol, indexCol) => {
|
let csd1 = datart.map((itemCol, indexCol) => {
|
||||||
let newArr = {}
|
let newArr = {}
|
||||||
@@ -291,7 +289,6 @@ class computedFunc {
|
|||||||
return row[index]
|
return row[index]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// console.log(this.transData, '转置后')
|
|
||||||
}
|
}
|
||||||
// 处理行列图表数据
|
// 处理行列图表数据
|
||||||
comRowColAllData (arr) {
|
comRowColAllData (arr) {
|
||||||
@@ -300,7 +297,6 @@ class computedFunc {
|
|||||||
return row[index]
|
return row[index]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// console.log(this.transData, '转置后')
|
|
||||||
}
|
}
|
||||||
// 处理非地区数据转置前的数据,返回可渲染的数据格式
|
// 处理非地区数据转置前的数据,返回可渲染的数据格式
|
||||||
comTransBefore () {
|
comTransBefore () {
|
||||||
@@ -319,7 +315,6 @@ class computedFunc {
|
|||||||
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
this.transBeforeData.transBeforeTermsData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeTermsData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -348,7 +343,6 @@ class computedFunc {
|
|||||||
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
this.transData[indexName].forEach((dataList, dataKey) => {
|
this.transData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -360,7 +354,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// 处理非地区数据转置后的数据,返回可渲染的数据格式
|
// 处理非地区数据转置后的数据,返回可渲染的数据格式
|
||||||
comTransAreabefore () {
|
comTransAreabefore () {
|
||||||
console.log(this.transBeforeData, 'this.transBeforeData100025')
|
|
||||||
// 表头数据处理
|
// 表头数据处理
|
||||||
this.restur.tableLine.push({
|
this.restur.tableLine.push({
|
||||||
labelId: 'table_line0',
|
labelId: 'table_line0',
|
||||||
@@ -373,13 +366,9 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 总数据处理
|
// 总数据处理
|
||||||
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
|
||||||
this.transBeforeData.areaName.forEach((itemName, indexName) => {
|
this.transBeforeData.areaName.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
|
||||||
// console.log(indexName, '[indexName]')
|
|
||||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -391,7 +380,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// 处理地区数据转置后的数据,返回可渲染的数据格式
|
// 处理地区数据转置后的数据,返回可渲染的数据格式
|
||||||
comTransAreaAfter () {
|
comTransAreaAfter () {
|
||||||
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
|
||||||
// 表头数据处理
|
// 表头数据处理
|
||||||
this.restur.tableLine.push({
|
this.restur.tableLine.push({
|
||||||
labelId: 'table_line0',
|
labelId: 'table_line0',
|
||||||
@@ -406,10 +394,8 @@ class computedFunc {
|
|||||||
// 将数据转置
|
// 将数据转置
|
||||||
// 总数据处理
|
// 总数据处理
|
||||||
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
||||||
console.log(itemName, 'itemName')
|
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -417,7 +403,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
this.restur.countData.push(tableLine)
|
this.restur.countData.push(tableLine)
|
||||||
})
|
})
|
||||||
console.log(this.restur, 'kkk999')
|
|
||||||
return this.restur
|
return this.restur
|
||||||
}
|
}
|
||||||
// 地区数据对于维度转化的处理 时间======指标
|
// 地区数据对于维度转化的处理 时间======指标
|
||||||
@@ -434,13 +419,9 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 总数据处理
|
// 总数据处理
|
||||||
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
|
||||||
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
|
||||||
// console.log(indexName, '[indexName]')
|
|
||||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -464,17 +445,9 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 总数据处理
|
// 总数据处理
|
||||||
// console.log(this.transBeforeData, 'this.transBeforeDataname')
|
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData')
|
|
||||||
// console.log(this.transBeforeData.termsName, 'this.transBeforeData.termsName')
|
|
||||||
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
|
||||||
// console.log(indexName, '[indexName]')
|
|
||||||
// console.log(itemName, '[itemName]')
|
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData')
|
|
||||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -482,7 +455,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
this.restur.countData.push(tableLine)
|
this.restur.countData.push(tableLine)
|
||||||
})
|
})
|
||||||
console.log(this.restur, 'this.restur')
|
|
||||||
return this.restur
|
return this.restur
|
||||||
}
|
}
|
||||||
// 地区数据对于维度转化的处理 地区======指标
|
// 地区数据对于维度转化的处理 地区======指标
|
||||||
@@ -499,13 +471,9 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 总数据处理
|
// 总数据处理
|
||||||
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
|
||||||
this.transBeforeData.areaName.forEach((itemName, indexName) => {
|
this.transBeforeData.areaName.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
|
||||||
// console.log(indexName, '[indexName]')
|
|
||||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -529,13 +497,9 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 总数据处理
|
// 总数据处理
|
||||||
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
|
||||||
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
||||||
var tableLine = {}
|
var tableLine = {}
|
||||||
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
|
||||||
// console.log(indexName, '[indexName]')
|
|
||||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
// console.log(dataKey)
|
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
tableLine['table_line0'] = itemName
|
tableLine['table_line0'] = itemName
|
||||||
}
|
}
|
||||||
@@ -547,7 +511,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// SUM求和 ============对行运算
|
// SUM求和 ============对行运算
|
||||||
dataSumLine () {
|
dataSumLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'SUM求和' + this.restur.computedNum,
|
label: 'SUM求和' + this.restur.computedNum,
|
||||||
@@ -558,8 +521,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.add(...arr).toFixed(2)
|
return math.add(...arr).toFixed(2)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -568,7 +529,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// SUM求和 ============对列运算
|
// SUM求和 ============对列运算
|
||||||
dataSumList () {
|
dataSumList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -581,7 +541,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.add(...item).toFixed(2)
|
return math.add(...item).toFixed(2)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -595,7 +554,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// x平均数 ========>对行运算
|
// x平均数 ========>对行运算
|
||||||
dataAVGLine () {
|
dataAVGLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'x平均数' + this.restur.computedNum,
|
label: 'x平均数' + this.restur.computedNum,
|
||||||
@@ -606,8 +564,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return (math.add(...arr).toFixed(2)) / arr.length
|
return (math.add(...arr).toFixed(2)) / arr.length
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -616,7 +572,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// x平均数 ============对列运算
|
// x平均数 ============对列运算
|
||||||
dataAVGList () {
|
dataAVGList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -629,7 +584,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return (math.add(...item).toFixed(2)) / item.length
|
return (math.add(...item).toFixed(2)) / item.length
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -643,7 +597,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MAX最大值 ============对行运算
|
// MAX最大值 ============对行运算
|
||||||
dataMAXLine () {
|
dataMAXLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'MAX最大值' + this.restur.computedNum,
|
label: 'MAX最大值' + this.restur.computedNum,
|
||||||
@@ -654,8 +607,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.max(...arr)
|
return math.max(...arr)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -664,7 +615,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MAX最大值 ============对列运算
|
// MAX最大值 ============对列运算
|
||||||
dataMAXList () {
|
dataMAXList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -677,7 +627,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.max(...item)
|
return math.max(...item)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -691,7 +640,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MIN最小值 ============对行运算
|
// MIN最小值 ============对行运算
|
||||||
dataMINLine () {
|
dataMINLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'MIN最小值' + this.restur.computedNum,
|
label: 'MIN最小值' + this.restur.computedNum,
|
||||||
@@ -702,8 +650,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.min(...arr)
|
return math.min(...arr)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -712,7 +658,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MIN最小值 ============对列运算
|
// MIN最小值 ============对列运算
|
||||||
dataMINList () {
|
dataMINList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -725,7 +670,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.min(...item)
|
return math.min(...item)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -739,7 +683,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MD中位数 ============对行运算
|
// MD中位数 ============对行运算
|
||||||
dataMDLine () {
|
dataMDLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'MD中位数' + this.restur.computedNum,
|
label: 'MD中位数' + this.restur.computedNum,
|
||||||
@@ -750,8 +693,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.median(...arr).toFixed(2)
|
return math.median(...arr).toFixed(2)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -760,7 +701,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MD中位数 ============对列运算
|
// MD中位数 ============对列运算
|
||||||
dataMDList () {
|
dataMDList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -773,7 +713,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.median(...item).toFixed(2)
|
return math.median(...item).toFixed(2)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -787,7 +726,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MO众数 ============对行运算
|
// MO众数 ============对行运算
|
||||||
dataMOLine () {
|
dataMOLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'MO众数' + this.restur.computedNum,
|
label: 'MO众数' + this.restur.computedNum,
|
||||||
@@ -798,8 +736,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.mode(...arr)
|
return math.mode(...arr)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -808,7 +744,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// MO众数 ============对列运算
|
// MO众数 ============对列运算
|
||||||
dataMOList () {
|
dataMOList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -821,7 +756,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.mode(...item)
|
return math.mode(...item)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -835,7 +769,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// S²方差 ============对行运算
|
// S²方差 ============对行运算
|
||||||
dataSSLine () {
|
dataSSLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'S²方差' + this.restur.computedNum,
|
label: 'S²方差' + this.restur.computedNum,
|
||||||
@@ -846,8 +779,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.variance(...arr).toFixed(2)
|
return math.variance(...arr).toFixed(2)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -856,7 +787,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// S²方差 ============对列运算
|
// S²方差 ============对列运算
|
||||||
dataSSList () {
|
dataSSList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -869,7 +799,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.variance(...item).toFixed(2)
|
return math.variance(...item).toFixed(2)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -883,7 +812,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// S标准差 ============对行运算
|
// S标准差 ============对行运算
|
||||||
dataSLine () {
|
dataSLine () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
dataRs.tableLine.push({
|
dataRs.tableLine.push({
|
||||||
label: 'S标准差' + this.restur.computedNum,
|
label: 'S标准差' + this.restur.computedNum,
|
||||||
@@ -894,8 +822,6 @@ class computedFunc {
|
|||||||
arr.shift()
|
arr.shift()
|
||||||
return math.std(...arr).toFixed(2)
|
return math.std(...arr).toFixed(2)
|
||||||
})
|
})
|
||||||
// console.log(bth, '求和')
|
|
||||||
// console.log(dataRs.countData, bth.length)
|
|
||||||
dataRs.countData.forEach((item, index) => {
|
dataRs.countData.forEach((item, index) => {
|
||||||
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
item['table_line' + (dataRs.tableLine.length - 1)] = bth[index]
|
||||||
})
|
})
|
||||||
@@ -904,7 +830,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
// S标准差 ============对列运算
|
// S标准差 ============对列运算
|
||||||
dataSList () {
|
dataSList () {
|
||||||
console.log(this.restur, '对行运算')
|
|
||||||
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
let dataRs = JSON.parse(JSON.stringify(this.restur))
|
||||||
// 处理现在的数据
|
// 处理现在的数据
|
||||||
let datarts = this.restur.countData.map((item, index) => {
|
let datarts = this.restur.countData.map((item, index) => {
|
||||||
@@ -917,7 +842,6 @@ class computedFunc {
|
|||||||
let transSum = this.transData.map((item, index) => {
|
let transSum = this.transData.map((item, index) => {
|
||||||
return math.std(...item).toFixed(2)
|
return math.std(...item).toFixed(2)
|
||||||
})
|
})
|
||||||
console.log(transSum, 'transSum')
|
|
||||||
let returObj = {}
|
let returObj = {}
|
||||||
transSum.forEach((item, index) => {
|
transSum.forEach((item, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
@@ -934,7 +858,6 @@ class computedFunc {
|
|||||||
dataVerticalMapRow () {
|
dataVerticalMapRow () {
|
||||||
let termsName = []
|
let termsName = []
|
||||||
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
||||||
console.log(this.chartsDatazz, '1012')
|
|
||||||
this.chartsDatazz.series = cloneSarr.map((item, index) => {
|
this.chartsDatazz.series = cloneSarr.map((item, index) => {
|
||||||
let obju = Object.values(item)
|
let obju = Object.values(item)
|
||||||
let keys = obju.shift()
|
let keys = obju.shift()
|
||||||
@@ -962,7 +885,6 @@ class computedFunc {
|
|||||||
type: 'value',
|
type: 'value',
|
||||||
splitNumber: 6
|
splitNumber: 6
|
||||||
}]
|
}]
|
||||||
console.log(this.chartsDatazz)
|
|
||||||
return this.chartsDatazz
|
return this.chartsDatazz
|
||||||
}
|
}
|
||||||
// 竖状图数据 ============列转换
|
// 竖状图数据 ============列转换
|
||||||
@@ -981,7 +903,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
// 将数据转置
|
// 将数据转置
|
||||||
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
||||||
console.log(this.selectData.tableLine[index + 1].label, '454545')
|
|
||||||
return {
|
return {
|
||||||
name: this.selectData.tableLine[index + 1].label,
|
name: this.selectData.tableLine[index + 1].label,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@@ -1012,7 +933,6 @@ class computedFunc {
|
|||||||
dataVerticalMapRowAreaSJDQ () {
|
dataVerticalMapRowAreaSJDQ () {
|
||||||
let termsName = []
|
let termsName = []
|
||||||
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
||||||
console.log(this.chartsDatazz, '1012')
|
|
||||||
this.chartsDatazz.series = cloneSarr.map((item, index) => {
|
this.chartsDatazz.series = cloneSarr.map((item, index) => {
|
||||||
let obju = Object.values(item)
|
let obju = Object.values(item)
|
||||||
let keys = obju.shift()
|
let keys = obju.shift()
|
||||||
@@ -1040,7 +960,6 @@ class computedFunc {
|
|||||||
type: 'value',
|
type: 'value',
|
||||||
splitNumber: 6
|
splitNumber: 6
|
||||||
}]
|
}]
|
||||||
console.log(this.chartsDatazz)
|
|
||||||
return this.chartsDatazz
|
return this.chartsDatazz
|
||||||
}
|
}
|
||||||
// 竖状图数据 ============列转换 地区===时间
|
// 竖状图数据 ============列转换 地区===时间
|
||||||
@@ -1059,7 +978,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
// 将数据转置
|
// 将数据转置
|
||||||
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
||||||
console.log(this.selectData.tableLine[index + 1].label, '454545')
|
|
||||||
return {
|
return {
|
||||||
name: this.selectData.tableLine[index + 1].label,
|
name: this.selectData.tableLine[index + 1].label,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@@ -1134,7 +1052,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
// 将数据转置
|
// 将数据转置
|
||||||
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
||||||
console.log(this.selectData.tableLine[index + 1].label, '454545')
|
|
||||||
return {
|
return {
|
||||||
name: this.selectData.tableLine[index + 1].label,
|
name: this.selectData.tableLine[index + 1].label,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@@ -1209,7 +1126,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
// 将数据转置
|
// 将数据转置
|
||||||
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
||||||
console.log(this.selectData.tableLine[index + 1].label, '454545')
|
|
||||||
return {
|
return {
|
||||||
name: this.selectData.tableLine[index + 1].label,
|
name: this.selectData.tableLine[index + 1].label,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@@ -1247,7 +1163,6 @@ class computedFunc {
|
|||||||
this.chartsDatazzPie.legend.data = termsLine
|
this.chartsDatazzPie.legend.data = termsLine
|
||||||
|
|
||||||
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
||||||
console.log(this.selectData, 'this.selectData.countData')
|
|
||||||
this.chartsDatazzPie.series = cloneSarr.map((item, index) => {
|
this.chartsDatazzPie.series = cloneSarr.map((item, index) => {
|
||||||
let obju = Object.values(item)
|
let obju = Object.values(item)
|
||||||
let keys = obju.shift()
|
let keys = obju.shift()
|
||||||
@@ -1271,15 +1186,12 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.chartsDatazzPie, 'this.chartsDatazzPie')
|
|
||||||
return this.chartsDatazzPie
|
return this.chartsDatazzPie
|
||||||
}
|
}
|
||||||
// 饼图数据 ============列转换
|
// 饼图数据 ============列转换
|
||||||
dataPieMapCol () {
|
dataPieMapCol () {
|
||||||
let cloneLine = JSON.parse(JSON.stringify(this.selectData.tableLine))
|
let cloneLine = JSON.parse(JSON.stringify(this.selectData.tableLine))
|
||||||
console.log(cloneLine, '10236')
|
|
||||||
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
||||||
console.log(cloneSarr, 'this.selectData.countData')
|
|
||||||
this.chartsDatazzPie.legend.data = cloneSarr.map((item, index) => {
|
this.chartsDatazzPie.legend.data = cloneSarr.map((item, index) => {
|
||||||
return Object.values(item)[0]
|
return Object.values(item)[0]
|
||||||
})
|
})
|
||||||
@@ -1289,7 +1201,6 @@ class computedFunc {
|
|||||||
radius: '55%',
|
radius: '55%',
|
||||||
center: ['40%', '50%'],
|
center: ['40%', '50%'],
|
||||||
data: cloneSarr.map((itemObj, indexObj) => {
|
data: cloneSarr.map((itemObj, indexObj) => {
|
||||||
console.log(Object.values(itemObj))
|
|
||||||
return {
|
return {
|
||||||
name: Object.values(itemObj)[0],
|
name: Object.values(itemObj)[0],
|
||||||
value: Object.values(itemObj)[1]
|
value: Object.values(itemObj)[1]
|
||||||
@@ -1303,7 +1214,6 @@ class computedFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.chartsDatazzPie, 'this.chartsDatazzPie')
|
|
||||||
return this.chartsDatazzPie
|
return this.chartsDatazzPie
|
||||||
}
|
}
|
||||||
// 导出至EXcel tableData:表数据 tableLine:列数据 listInputVal:选中列下标 lineInputVal:选中行下标
|
// 导出至EXcel tableData:表数据 tableLine:列数据 listInputVal:选中列下标 lineInputVal:选中行下标
|
||||||
@@ -1326,7 +1236,6 @@ class computedFunc {
|
|||||||
// })
|
// })
|
||||||
// lastAllData.push(hangAllDatas)
|
// lastAllData.push(hangAllDatas)
|
||||||
shHangData = tableData.map((item, index) => {
|
shHangData = tableData.map((item, index) => {
|
||||||
// console.log(Object.values(item).filter((list, key) => { return yuan.indexOf(key) !== -1 }))
|
|
||||||
// tableData.forEach((list, key) => {
|
// tableData.forEach((list, key) => {
|
||||||
return Object.values(item).filter((list, key) => {
|
return Object.values(item).filter((list, key) => {
|
||||||
return yuan.indexOf(key) !== -1
|
return yuan.indexOf(key) !== -1
|
||||||
@@ -1344,7 +1253,6 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
objData.tableData = shHangData
|
objData.tableData = shHangData
|
||||||
// 导出的数据
|
// 导出的数据
|
||||||
// console.log(objData, '导出的数据')
|
|
||||||
return objData
|
return objData
|
||||||
}
|
}
|
||||||
// 新增指标
|
// 新增指标
|
||||||
|
|||||||
@@ -11,18 +11,3 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})()
|
})()
|
||||||
// (function () {
|
|
||||||
// var _URL = window.URL
|
|
||||||
// Object.defineProperty(window, 'URL', {
|
|
||||||
// set: function (value) {
|
|
||||||
// console.trace('set URL')
|
|
||||||
// console.log(value)
|
|
||||||
// _URL = value
|
|
||||||
// },
|
|
||||||
// get: function (value) {
|
|
||||||
// console.trace('get URL')
|
|
||||||
// console.log(value)
|
|
||||||
// return _URL
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })()
|
|
||||||
|
|||||||
@@ -701,101 +701,104 @@ export default {
|
|||||||
},
|
},
|
||||||
// 地区数据转置
|
// 地区数据转置
|
||||||
areaTrans () {
|
areaTrans () {
|
||||||
if (this.transState) { // 当时间在表头上的时候
|
console.log(this.transState, 'this.transState')
|
||||||
console.log(this.$store.state.SelecttDimension, '2020')
|
// if (true) { // 当时间在表头上的时候
|
||||||
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
console.log(this.$store.state.SelecttDimension, '2020')
|
||||||
this.objCompBefore = new ComputedData(this.transBefore)
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
var objDatasBefore = this.objCompBefore.comTransAreabefore()
|
this.objCompBefore = new ComputedData(this.transBefore)
|
||||||
this.tableLine = objDatasBefore.tableLine
|
var objDatasBefore = this.objCompBefore.comTransAreabefore()
|
||||||
this.tableData = objDatasBefore.countData
|
this.tableLine = objDatasBefore.tableLine
|
||||||
console.log(objDatasBefore, 'objDatasAfter1')
|
this.tableData = objDatasBefore.countData
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
console.log(objDatasBefore, 'objDatasAfter1')
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
var objDatasAfter = objCompAfter.comTransAreaAfter()
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
this.tableLine = objDatasAfter.tableLine
|
var objDatasAfter = objCompAfter.comTransAreaAfter()
|
||||||
this.tableData = objDatasAfter.countData
|
this.tableLine = objDatasAfter.tableLine
|
||||||
console.log(objDatasAfter, 'objDatasAfter2')
|
this.tableData = objDatasAfter.countData
|
||||||
this.objCompBefore = objCompAfter
|
console.log(objDatasAfter, 'objDatasAfter2')
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
this.objCompBefore = objCompAfter
|
||||||
console.log(this.transBefore, 'this.transBeforethis.transBeforethis.transBefore')
|
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
console.log(this.transBefore, 'this.transBeforethis.transBeforethis.transBefore')
|
||||||
var comTransAreabeforeLabelTime = objCompAfter.comTransAreabeforeLabelTime()
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
this.tableLine = comTransAreabeforeLabelTime.tableLine
|
var comTransAreabeforeLabelTime = objCompAfter.comTransAreabeforeLabelTime()
|
||||||
this.tableData = comTransAreabeforeLabelTime.countData
|
this.tableLine = comTransAreabeforeLabelTime.tableLine
|
||||||
console.log(comTransAreabeforeLabelTime, 'comTransAreabeforeLabelTime')
|
this.tableData = comTransAreabeforeLabelTime.countData
|
||||||
this.objCompBefore = objCompAfter
|
console.log(comTransAreabeforeLabelTime, 'comTransAreabeforeLabelTime')
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
this.objCompBefore = objCompAfter
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
var comTransAreabeforeTimeLabel = objCompAfter.comTransAreabeforeTimeLabel()
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
this.tableLine = comTransAreabeforeTimeLabel.tableLine
|
var comTransAreabeforeTimeLabel = objCompAfter.comTransAreabeforeTimeLabel()
|
||||||
this.tableData = comTransAreabeforeTimeLabel.countData
|
this.tableLine = comTransAreabeforeTimeLabel.tableLine
|
||||||
console.log(comTransAreabeforeTimeLabel, 'comTransAreabeforeTimeLabel')
|
this.tableData = comTransAreabeforeTimeLabel.countData
|
||||||
this.objCompBefore = objCompAfter
|
console.log(comTransAreabeforeTimeLabel, 'comTransAreabeforeTimeLabel')
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
this.objCompBefore = objCompAfter
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
var comTransAreabeforeAreaLabel = objCompAfter.comTransAreabeforeAreaLabel()
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
this.tableLine = comTransAreabeforeAreaLabel.tableLine
|
var comTransAreabeforeAreaLabel = objCompAfter.comTransAreabeforeAreaLabel()
|
||||||
this.tableData = comTransAreabeforeAreaLabel.countData
|
this.tableLine = comTransAreabeforeAreaLabel.tableLine
|
||||||
console.log(comTransAreabeforeAreaLabel, 'comTransAreabeforeAreaLabel')
|
this.tableData = comTransAreabeforeAreaLabel.countData
|
||||||
this.objCompBefore = objCompAfter
|
console.log(comTransAreabeforeAreaLabel, 'comTransAreabeforeAreaLabel')
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
this.objCompBefore = objCompAfter
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
var comTransAreabeforeLabelArea = objCompAfter.comTransAreabeforeLabelArea()
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
this.tableLine = comTransAreabeforeLabelArea.tableLine
|
var comTransAreabeforeLabelArea = objCompAfter.comTransAreabeforeLabelArea()
|
||||||
this.tableData = comTransAreabeforeLabelArea.countData
|
this.tableLine = comTransAreabeforeLabelArea.tableLine
|
||||||
console.log(comTransAreabeforeLabelArea, 'comTransAreabeforeLabelArea')
|
this.tableData = comTransAreabeforeLabelArea.countData
|
||||||
this.objCompBefore = objCompAfter
|
console.log(comTransAreabeforeLabelArea, 'comTransAreabeforeLabelArea')
|
||||||
}
|
this.objCompBefore = objCompAfter
|
||||||
} else { // 当指标名称在表头上
|
|
||||||
console.log(this.$store.state.SelecttDimension, '2020')
|
|
||||||
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
|
||||||
var objDatasAfterB = objCompAfter.comTransAreaAfter()
|
|
||||||
this.tableLine = objDatasAfterB.tableLine
|
|
||||||
this.tableData = objDatasAfterB.countData
|
|
||||||
console.log(objDatasAfterB, 'objDatasAfterB')
|
|
||||||
this.objCompBefore = objCompAfter
|
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
|
||||||
this.objCompBefore = new ComputedData(this.transBefore)
|
|
||||||
var objDatasBeforeB = this.objCompBefore.comTransAreabefore()
|
|
||||||
this.tableLine = objDatasBeforeB.tableLine
|
|
||||||
this.tableData = objDatasBeforeB.countData
|
|
||||||
console.log(objDatasBeforeB, 'objDatasBeforeB')
|
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
|
||||||
var comTransAreabeforeTimeLabelB = objCompAfter.comTransAreabeforeTimeLabel()
|
|
||||||
this.tableLine = comTransAreabeforeTimeLabelB.tableLine
|
|
||||||
this.tableData = comTransAreabeforeTimeLabelB.countData
|
|
||||||
console.log(comTransAreabeforeTimeLabelB, 'comTransAreabeforeTimeLabelB')
|
|
||||||
this.objCompBefore = objCompAfter
|
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
|
||||||
var comTransAreabeforeLabelTimeB = objCompAfter.comTransAreabeforeLabelTime()
|
|
||||||
this.tableLine = comTransAreabeforeLabelTimeB.tableLine
|
|
||||||
this.tableData = comTransAreabeforeLabelTimeB.countData
|
|
||||||
console.log(comTransAreabeforeLabelTimeB, 'comTransAreabeforeLabelTimeB')
|
|
||||||
this.objCompBefore = objCompAfter
|
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
|
||||||
var comTransAreabeforeLabelAreaB = objCompAfter.comTransAreabeforeLabelArea()
|
|
||||||
this.tableLine = comTransAreabeforeLabelAreaB.tableLine
|
|
||||||
this.tableData = comTransAreabeforeLabelAreaB.countData
|
|
||||||
console.log(comTransAreabeforeLabelAreaB, 'comTransAreabeforeLabelAreaB')
|
|
||||||
this.objCompBefore = objCompAfter
|
|
||||||
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
|
||||||
var comTransAreabeforeAreaLabelB = objCompAfter.comTransAreabeforeAreaLabel()
|
|
||||||
this.tableLine = comTransAreabeforeAreaLabelB.tableLine
|
|
||||||
this.tableData = comTransAreabeforeAreaLabelB.countData
|
|
||||||
console.log(comTransAreabeforeAreaLabelB, 'comTransAreabeforeAreaLabelB')
|
|
||||||
this.objCompBefore = objCompAfter
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
|
// else { // 当指标名称在表头上
|
||||||
|
// console.log(this.$store.state.SelecttDimension, '2020')
|
||||||
|
// if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
// let objCompAfter = new ComputedData(this.transBefore)
|
||||||
|
// var objDatasAfterB = objCompAfter.comTransAreaAfter()
|
||||||
|
// this.tableLine = objDatasAfterB.tableLine
|
||||||
|
// this.tableData = objDatasAfterB.countData
|
||||||
|
// console.log(objDatasAfterB, 'objDatasAfterB')
|
||||||
|
// this.objCompBefore = objCompAfter
|
||||||
|
// } else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
// this.objCompBefore = new ComputedData(this.transBefore)
|
||||||
|
// var objDatasBeforeB = this.objCompBefore.comTransAreabefore()
|
||||||
|
// this.tableLine = objDatasBeforeB.tableLine
|
||||||
|
// this.tableData = objDatasBeforeB.countData
|
||||||
|
// console.log(objDatasBeforeB, 'objDatasBeforeB')
|
||||||
|
// } else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
// let objCompAfter = new ComputedData(this.transBefore)
|
||||||
|
// var comTransAreabeforeTimeLabelB = objCompAfter.comTransAreabeforeTimeLabel()
|
||||||
|
// this.tableLine = comTransAreabeforeTimeLabelB.tableLine
|
||||||
|
// this.tableData = comTransAreabeforeTimeLabelB.countData
|
||||||
|
// console.log(comTransAreabeforeTimeLabelB, 'comTransAreabeforeTimeLabelB')
|
||||||
|
// this.objCompBefore = objCompAfter
|
||||||
|
// } else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
// let objCompAfter = new ComputedData(this.transBefore)
|
||||||
|
// var comTransAreabeforeLabelTimeB = objCompAfter.comTransAreabeforeLabelTime()
|
||||||
|
// this.tableLine = comTransAreabeforeLabelTimeB.tableLine
|
||||||
|
// this.tableData = comTransAreabeforeLabelTimeB.countData
|
||||||
|
// console.log(comTransAreabeforeLabelTimeB, 'comTransAreabeforeLabelTimeB')
|
||||||
|
// this.objCompBefore = objCompAfter
|
||||||
|
// } else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
// let objCompAfter = new ComputedData(this.transBefore)
|
||||||
|
// var comTransAreabeforeLabelAreaB = objCompAfter.comTransAreabeforeLabelArea()
|
||||||
|
// this.tableLine = comTransAreabeforeLabelAreaB.tableLine
|
||||||
|
// this.tableData = comTransAreabeforeLabelAreaB.countData
|
||||||
|
// console.log(comTransAreabeforeLabelAreaB, 'comTransAreabeforeLabelAreaB')
|
||||||
|
// this.objCompBefore = objCompAfter
|
||||||
|
// } else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
// let objCompAfter = new ComputedData(this.transBefore)
|
||||||
|
// var comTransAreabeforeAreaLabelB = objCompAfter.comTransAreabeforeAreaLabel()
|
||||||
|
// this.tableLine = comTransAreabeforeAreaLabelB.tableLine
|
||||||
|
// this.tableData = comTransAreabeforeAreaLabelB.countData
|
||||||
|
// console.log(comTransAreabeforeAreaLabelB, 'comTransAreabeforeAreaLabelB')
|
||||||
|
// this.objCompBefore = objCompAfter
|
||||||
|
// }
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
// 渲染列表数据
|
// 渲染列表数据
|
||||||
showTable () {
|
showTable () {
|
||||||
// 改变转置状态
|
// 改变转置状态
|
||||||
// this.transState = !this.transState
|
// this.transState = !this.transState
|
||||||
|
console.log(121212121)
|
||||||
if (this.areaDataState !== 'area') { // 非地区数据转置
|
if (this.areaDataState !== 'area') { // 非地区数据转置
|
||||||
this.wrongAreaTrans()
|
this.wrongAreaTrans()
|
||||||
} else { // 地区数据转置
|
} else { // 地区数据转置
|
||||||
@@ -939,25 +942,8 @@ export default {
|
|||||||
console.log('k11111111111')
|
console.log('k11111111111')
|
||||||
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
||||||
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapRow()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapCol())
|
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapRow()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapCol())
|
||||||
// if (this.$route.query.type !== 'area') { // 非地区数据
|
|
||||||
// } else { // 地区数据
|
|
||||||
// if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
|
||||||
// this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapColAreaDQSJ()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapRowAreaSJDQ())
|
|
||||||
// console.log('地区-时间')
|
|
||||||
// } else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
|
||||||
// this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapRowAreaSJDQ()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapColAreaDQSJ())
|
|
||||||
// console.log('时间-地区')
|
|
||||||
// } else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
|
||||||
// console.log('指标-时间')
|
|
||||||
// } else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
|
||||||
// console.log('时间-指标')
|
|
||||||
// } else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
|
||||||
// console.log('地区-指标')
|
|
||||||
// } else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
|
||||||
// console.log('指标-地区')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
this.pieStatic = false
|
this.pieStatic = false
|
||||||
|
this.lineStatic = true
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
if (this.pieStatic) {
|
if (this.pieStatic) {
|
||||||
@@ -970,12 +956,14 @@ export default {
|
|||||||
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
||||||
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataAcrossMapRow()) : (this.echartsDatarts = this.objCompBefore.dataAcrossMapCol())
|
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataAcrossMapRow()) : (this.echartsDatarts = this.objCompBefore.dataAcrossMapCol())
|
||||||
this.pieStatic = false
|
this.pieStatic = false
|
||||||
|
this.lineStatic = true
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
console.log(this.lineStatic, this.rowColIndex, '状态改变')
|
console.log(this.lineStatic, this.rowColIndex, '状态改变')
|
||||||
console.log(this.listInputVal, this.lineInputVal, '行列数据前')
|
console.log(this.listInputVal, this.lineInputVal, '行列数据前')
|
||||||
// console.log(this.lineStatic, this.rowColIndex, '状态改变')
|
// console.log(this.lineStatic, this.rowColIndex, '状态改变')
|
||||||
if (this.lineStatic && this.rowColIndex === 0) {
|
if (this.lineStatic && this.rowColIndex === 0) {
|
||||||
|
console.log(10086)
|
||||||
this.lineInputVal = [0]
|
this.lineInputVal = [0]
|
||||||
this.listInputVal = [1, 2, 3]
|
this.listInputVal = [1, 2, 3]
|
||||||
this.lineStatic = true
|
this.lineStatic = true
|
||||||
@@ -983,6 +971,7 @@ export default {
|
|||||||
this.lineInputVal = [0, 1, 2, 3]
|
this.lineInputVal = [0, 1, 2, 3]
|
||||||
this.listInputVal = [1]
|
this.listInputVal = [1]
|
||||||
this.lineStatic = true
|
this.lineStatic = true
|
||||||
|
console.log(10087)
|
||||||
}
|
}
|
||||||
console.log(this.listInputVal, this.lineInputVal, '行列数据后')
|
console.log(this.listInputVal, this.lineInputVal, '行列数据后')
|
||||||
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
||||||
@@ -1000,6 +989,7 @@ export default {
|
|||||||
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
|
||||||
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataBrokenLineMapRow()) : (this.echartsDatarts = this.objCompBefore.dataBrokenLineMapCol())
|
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataBrokenLineMapRow()) : (this.echartsDatarts = this.objCompBefore.dataBrokenLineMapCol())
|
||||||
this.pieStatic = false
|
this.pieStatic = false
|
||||||
|
this.lineStatic = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,11 +10,8 @@
|
|||||||
<img :src="item.url" alt />
|
<img :src="item.url" alt />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="chart_right">
|
||||||
class="chart_right"
|
<div class="chart_right_area" v-if="$route.query.type==='area'&&!$store.state.areaDimensionState">
|
||||||
v-if="(($store.state.SelecttDimension.row === 'sj' && $store.state.SelecttDimension.col === 'dq')||($store.state.SelecttDimension.row === 'sj' && $store.state.SelecttDimension.col === 'zb'))&&!$store.state.areaDimensionState"
|
|
||||||
>
|
|
||||||
<div class="chart_right_area" v-if="$route.query.type==='area'">
|
|
||||||
{{stateChangeSDF?'指标:':'地区:'}}
|
{{stateChangeSDF?'指标:':'地区:'}}
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="value"
|
v-model="value"
|
||||||
@@ -25,7 +22,7 @@
|
|||||||
></el-cascader>
|
></el-cascader>
|
||||||
</div>
|
</div>
|
||||||
<!-- 根据时间筛选 -->
|
<!-- 根据时间筛选 -->
|
||||||
<div class="chart_right_time" v-if="cityDataTime&&cityDefaultNameTime">
|
<div class="chart_right_time" v-if="!$store.state.areaDimensionState">
|
||||||
时间:
|
时间:
|
||||||
<div class="chart_right_cont">
|
<div class="chart_right_cont">
|
||||||
<PullDownComponents
|
<PullDownComponents
|
||||||
@@ -64,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart_right" v-else>
|
<div class="chart_right" v-if="$route.query.type==='area'&&$store.state.areaDimensionState">
|
||||||
{{leftLabel[$store.state.noSelecttDimension]}}:
|
{{leftLabel[$store.state.noSelecttDimension]}}:
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="valueDimension"
|
v-model="valueDimension"
|
||||||
@@ -498,7 +495,7 @@ export default {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'year':
|
case 'year':
|
||||||
if (this.timeUsrr.length < 5 && /^[0-9]+$/.test(this.timeUsrr.substring(0, 4))) {
|
if ((this.timeUsrr.length < 5 && /^[0-9]+$/.test(this.timeUsrr.substring(0, 4))) || (this.timeUsrr.length < 10 && (this.timeUsrr.split('-')[0] < this.timeUsrr.split('-')[1]))) {
|
||||||
this.$store.state.selectData = this.timeUsrr
|
this.$store.state.selectData = this.timeUsrr
|
||||||
this.$parent.changeBrother()
|
this.$parent.changeBrother()
|
||||||
this.timeUsrr = ''
|
this.timeUsrr = ''
|
||||||
|
|||||||
@@ -201,7 +201,13 @@ export default {
|
|||||||
}
|
}
|
||||||
// 关闭窗口
|
// 关闭窗口
|
||||||
this.$store.state.dimensionState = false
|
this.$store.state.dimensionState = false
|
||||||
this.$store.state.areaDimensionState = true
|
if (this.$route.query.type === 'area') {
|
||||||
|
this.$store.state.noAreadimensionState = false
|
||||||
|
this.$store.state.areaDimensionState = true
|
||||||
|
} else {
|
||||||
|
this.$store.state.noAreadimensionState = true
|
||||||
|
this.$store.state.areaDimensionState = false
|
||||||
|
}
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail, 2369)
|
console.log(fail, 2369)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ export default {
|
|||||||
this.myEchartsObj = echarts.init(this.$refs.myEcharts, 'macarons')
|
this.myEchartsObj = echarts.init(this.$refs.myEcharts, 'macarons')
|
||||||
// 绘制图表
|
// 绘制图表
|
||||||
this.myEchartsObj.setOption(this.option, true)
|
this.myEchartsObj.setOption(this.option, true)
|
||||||
this.myEchartsObj.resize()
|
// this.myEchartsObj.resize()
|
||||||
},
|
},
|
||||||
// 行列转换
|
// 行列转换
|
||||||
checkedSelect (ind) {
|
checkedSelect (ind) {
|
||||||
|
|||||||
Reference in New Issue
Block a user