diff --git a/src/assets/js/computeddata.js b/src/assets/js/computeddata.js
index 4bb3586..ae8c704 100644
--- a/src/assets/js/computeddata.js
+++ b/src/assets/js/computeddata.js
@@ -248,7 +248,7 @@ class computedFunc {
let listArrs = JSON.parse(JSON.stringify(listArr))
let lineArrs = JSON.parse(JSON.stringify(lineArr))
console.log(listArrs, lineArrs)
- console.log(this.restur, 'this.restur')
+ console.log(this.restur, 'this.resturkkkkk')
listArrs.push(0) // 必选第一项
if (this.restur.tableLine.length < listArrs.length) {
listArrs = this.restur.tableLine.map((item, index) => {
@@ -269,6 +269,7 @@ class computedFunc {
})
})
// 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 csd1 = datart.map((itemCol, indexCol) => {
let newArr = {}
@@ -359,6 +360,7 @@ class computedFunc {
}
// 处理非地区数据转置后的数据,返回可渲染的数据格式
comTransAreabefore () {
+ console.log(this.transBeforeData, 'this.transBeforeData100025')
// 表头数据处理
this.restur.tableLine.push({
labelId: 'table_line0',
@@ -389,6 +391,7 @@ class computedFunc {
}
// 处理地区数据转置后的数据,返回可渲染的数据格式
comTransAreaAfter () {
+ console.log(this.transBeforeData, 'this.transBeforeDataname')
// 表头数据处理
this.restur.tableLine.push({
labelId: 'table_line0',
@@ -401,11 +404,11 @@ class computedFunc {
})
})
// 将数据转置
- this.comTransAllData(this.transBeforeData.transBeforeAreaData)
// 总数据处理
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
+ console.log(itemName, 'itemName')
var tableLine = {}
- this.transData[indexName].forEach((dataList, dataKey) => {
+ this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
// console.log(dataKey)
if (dataKey === 0) {
tableLine['table_line0'] = itemName
@@ -414,6 +417,7 @@ class computedFunc {
})
this.restur.countData.push(tableLine)
})
+ console.log(this.restur, 'kkk999')
return this.restur
}
// 地区数据对于维度转化的处理 时间======指标
@@ -478,6 +482,7 @@ class computedFunc {
})
this.restur.countData.push(tableLine)
})
+ console.log(this.restur, 'this.restur')
return this.restur
}
// 地区数据对于维度转化的处理 地区======指标
diff --git a/src/components/addCollect/AddCollect.vue b/src/components/addCollect/AddCollect.vue
index eac3c27..a23e319 100644
--- a/src/components/addCollect/AddCollect.vue
+++ b/src/components/addCollect/AddCollect.vue
@@ -50,14 +50,20 @@ export default {
console.log(res, '高级查询数据展示')
// 请求接口完成 请求成功
if (res.data.code === 200) {
- alert('添加成功')
+ this.$alert('添加成功', '温馨提示', {
+ confirmButtonText: '确定'
+ })
+ // alert('添加成功')
this.$store.state.addCollectState = false
}
}).catch((fail) => {
console.log(fail)
})
} else {
- alert('您添加的收藏名称不能为空!请重新填写!')
+ // alert('您添加的收藏名称不能为空!请重新填写!')
+ this.$alert('您添加的收藏名称不能为空!请重新填写!', '温馨提示', {
+ confirmButtonText: '确定'
+ })
}
}
}
diff --git a/src/components/chartsCont/ChartsCont.vue b/src/components/chartsCont/ChartsCont.vue
index 0d7d600..aade199 100644
--- a/src/components/chartsCont/ChartsCont.vue
+++ b/src/components/chartsCont/ChartsCont.vue
@@ -433,6 +433,7 @@ export default {
},
indStatic (newValue, oldValue) {
console.log(newValue, 'newValue1212')
+ console.log(this.transBefore, 'this.transBefore111000')
if (this.transBefore) {
this.chartsShow()
}
@@ -548,6 +549,8 @@ export default {
}
})
}
+ // 调接口拿到所有当前分类下的所有的指标、地区、时间
+ this.getInfor(val.id)
}
},
immediate: true,
@@ -643,6 +646,24 @@ export default {
}
},
methods: {
+ // 获取所有当前分类下的所有的指标、地区、时间
+ getInfor (classifyId) {
+ this.$axios({
+ method: 'GET',
+ url: 'data/data/classify-detail',
+ params: {
+ id: classifyId
+ }
+ }).then(res => {
+ console.log(res, '获取分类下的地区、指标、时间')
+ // 请求接口完成 请求成功
+ if (res.data.code === 200) {
+ this.$store.state.dataArealabelTime = res.data.data
+ }
+ }).catch((fail) => {
+ console.log(fail)
+ })
+ },
// 非地区数据转置
wrongAreaTrans () {
if (this.transState) { // 当时间在表头上的时候
@@ -675,6 +696,7 @@ export default {
this.tableLine = objDatasAfter.tableLine
this.tableData = objDatasAfter.countData
console.log(objDatasAfter, 'objDatasAfter2')
+ this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
console.log(this.transBefore, 'this.transBeforethis.transBeforethis.transBefore')
let objCompAfter = new ComputedData(this.transBefore)
@@ -682,24 +704,28 @@ export default {
this.tableLine = comTransAreabeforeLabelTime.tableLine
this.tableData = comTransAreabeforeLabelTime.countData
console.log(comTransAreabeforeLabelTime, 'comTransAreabeforeLabelTime')
+ this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeTimeLabel = objCompAfter.comTransAreabeforeTimeLabel()
this.tableLine = comTransAreabeforeTimeLabel.tableLine
this.tableData = comTransAreabeforeTimeLabel.countData
console.log(comTransAreabeforeTimeLabel, 'comTransAreabeforeTimeLabel')
+ this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeAreaLabel = objCompAfter.comTransAreabeforeAreaLabel()
this.tableLine = comTransAreabeforeAreaLabel.tableLine
this.tableData = comTransAreabeforeAreaLabel.countData
console.log(comTransAreabeforeAreaLabel, 'comTransAreabeforeAreaLabel')
+ this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeLabelArea = objCompAfter.comTransAreabeforeLabelArea()
this.tableLine = comTransAreabeforeLabelArea.tableLine
this.tableData = comTransAreabeforeLabelArea.countData
console.log(comTransAreabeforeLabelArea, 'comTransAreabeforeLabelArea')
+ this.objCompBefore = objCompAfter
}
} else { // 当指标名称在表头上
console.log(this.$store.state.SelecttDimension, '2020')
@@ -709,6 +735,7 @@ export default {
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()
@@ -721,24 +748,28 @@ export default {
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
}
}
},
@@ -750,6 +781,7 @@ export default {
this.wrongAreaTrans()
} else { // 地区数据转置
this.areaTrans()
+ console.log(10000)
}
},
// 指标解释
@@ -875,6 +907,8 @@ export default {
chartsShow () {
// 改变值行值
console.log(this.$route.query.type, '1010111')
+ console.log(this.indStatic, 'this.indStatic')
+ console.log(this.objCompBefore, 'this.objCompBefore')
switch (this.indStatic) {
case 1:
if (this.pieStatic) {
@@ -883,8 +917,27 @@ export default {
// 存input行选中的值
this.lineInputVal = [0, 1, 2, 3]// 初始化选中4个
}
+ console.log('k11111111111')
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
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
break
case 2:
diff --git a/src/components/chartsCut/ChartsCut.vue b/src/components/chartsCut/ChartsCut.vue
index 2d2887a..ff2e924 100644
--- a/src/components/chartsCut/ChartsCut.vue
+++ b/src/components/chartsCut/ChartsCut.vue
@@ -8,7 +8,10 @@
>
-