fanzhen1219
This commit is contained in:
@@ -247,7 +247,19 @@ 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.restur')
|
||||||
listArrs.push(0) // 必选第一项
|
listArrs.push(0) // 必选第一项
|
||||||
|
if (this.restur.tableLine.length < listArrs.length) {
|
||||||
|
listArrs = this.restur.tableLine.map((item, index) => {
|
||||||
|
return index
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.restur.countData.length < lineArrs.length) {
|
||||||
|
lineArrs = this.restur.countData.map((item, index) => {
|
||||||
|
return index
|
||||||
|
})
|
||||||
|
}
|
||||||
// 处理数据显示
|
// 处理数据显示
|
||||||
this.selectData.tableLine = []
|
this.selectData.tableLine = []
|
||||||
listArrs.forEach((items, indexs) => {
|
listArrs.forEach((items, indexs) => {
|
||||||
@@ -359,8 +371,11 @@ 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)
|
// console.log(dataKey)
|
||||||
if (dataKey === 0) {
|
if (dataKey === 0) {
|
||||||
@@ -401,6 +416,130 @@ class computedFunc {
|
|||||||
})
|
})
|
||||||
return this.restur
|
return this.restur
|
||||||
}
|
}
|
||||||
|
// 地区数据对于维度转化的处理 时间======指标
|
||||||
|
comTransAreabeforeTimeLabel () {
|
||||||
|
// 表头数据处理
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line0',
|
||||||
|
label: '时间'
|
||||||
|
})
|
||||||
|
this.transBeforeData.termsName.forEach((itemTime, indexTime) => {
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line' + (indexTime + 1),
|
||||||
|
label: itemTime
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 总数据处理
|
||||||
|
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
||||||
|
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
|
||||||
|
var tableLine = {}
|
||||||
|
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
||||||
|
// console.log(indexName, '[indexName]')
|
||||||
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
|
// console.log(dataKey)
|
||||||
|
if (dataKey === 0) {
|
||||||
|
tableLine['table_line0'] = itemName
|
||||||
|
}
|
||||||
|
tableLine['table_line' + (dataKey + 1)] = dataList
|
||||||
|
})
|
||||||
|
this.restur.countData.push(tableLine)
|
||||||
|
})
|
||||||
|
return this.restur
|
||||||
|
}
|
||||||
|
// 地区数据对于维度转化的处理 指标======时间
|
||||||
|
comTransAreabeforeLabelTime () {
|
||||||
|
// 表头数据处理
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line0',
|
||||||
|
label: '指标'
|
||||||
|
})
|
||||||
|
this.transBeforeData.timeArr.forEach((itemTime, indexTime) => {
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line' + (indexTime + 1),
|
||||||
|
label: itemTime
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 总数据处理
|
||||||
|
// 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) => {
|
||||||
|
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) => {
|
||||||
|
// console.log(dataKey)
|
||||||
|
if (dataKey === 0) {
|
||||||
|
tableLine['table_line0'] = itemName
|
||||||
|
}
|
||||||
|
tableLine['table_line' + (dataKey + 1)] = dataList
|
||||||
|
})
|
||||||
|
this.restur.countData.push(tableLine)
|
||||||
|
})
|
||||||
|
return this.restur
|
||||||
|
}
|
||||||
|
// 地区数据对于维度转化的处理 地区======指标
|
||||||
|
comTransAreabeforeAreaLabel () {
|
||||||
|
// 表头数据处理
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line0',
|
||||||
|
label: '地区'
|
||||||
|
})
|
||||||
|
this.transBeforeData.termsName.forEach((itemTime, indexTime) => {
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line' + (indexTime + 1),
|
||||||
|
label: itemTime
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 总数据处理
|
||||||
|
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
||||||
|
this.transBeforeData.areaName.forEach((itemName, indexName) => {
|
||||||
|
var tableLine = {}
|
||||||
|
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
||||||
|
// console.log(indexName, '[indexName]')
|
||||||
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
|
// console.log(dataKey)
|
||||||
|
if (dataKey === 0) {
|
||||||
|
tableLine['table_line0'] = itemName
|
||||||
|
}
|
||||||
|
tableLine['table_line' + (dataKey + 1)] = dataList
|
||||||
|
})
|
||||||
|
this.restur.countData.push(tableLine)
|
||||||
|
})
|
||||||
|
return this.restur
|
||||||
|
}
|
||||||
|
// 地区数据对于维度转化的处理 指标======地区
|
||||||
|
comTransAreabeforeLabelArea () {
|
||||||
|
// 表头数据处理
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line0',
|
||||||
|
label: '指标'
|
||||||
|
})
|
||||||
|
this.transBeforeData.areaName.forEach((itemTime, indexTime) => {
|
||||||
|
this.restur.tableLine.push({
|
||||||
|
labelId: 'table_line' + (indexTime + 1),
|
||||||
|
label: itemTime
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 总数据处理
|
||||||
|
console.log(this.transBeforeData, 'this.transBeforeDataname')
|
||||||
|
this.transBeforeData.termsName.forEach((itemName, indexName) => {
|
||||||
|
var tableLine = {}
|
||||||
|
// console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData[indexName]')
|
||||||
|
// console.log(indexName, '[indexName]')
|
||||||
|
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||||
|
// console.log(dataKey)
|
||||||
|
if (dataKey === 0) {
|
||||||
|
tableLine['table_line0'] = itemName
|
||||||
|
}
|
||||||
|
tableLine['table_line' + (dataKey + 1)] = dataList
|
||||||
|
})
|
||||||
|
this.restur.countData.push(tableLine)
|
||||||
|
})
|
||||||
|
return this.restur
|
||||||
|
}
|
||||||
// SUM求和 ============对行运算
|
// SUM求和 ============对行运算
|
||||||
dataSumLine () {
|
dataSumLine () {
|
||||||
console.log(this.restur, '对行运算')
|
console.log(this.restur, '对行运算')
|
||||||
@@ -785,6 +924,7 @@ class computedFunc {
|
|||||||
this.restur = dataRs
|
this.restur = dataRs
|
||||||
return this.restur
|
return this.restur
|
||||||
}
|
}
|
||||||
|
// ========================================================非地区数据
|
||||||
// 竖状图数据 ============行转换
|
// 竖状图数据 ============行转换
|
||||||
dataVerticalMapRow () {
|
dataVerticalMapRow () {
|
||||||
let termsName = []
|
let termsName = []
|
||||||
@@ -862,6 +1002,84 @@ class computedFunc {
|
|||||||
}]
|
}]
|
||||||
return this.chartsDatazz
|
return this.chartsDatazz
|
||||||
}
|
}
|
||||||
|
// =========================================================地区数据
|
||||||
|
// 竖状图数据 ============行转换 时间===地区
|
||||||
|
dataVerticalMapRowAreaSJDQ () {
|
||||||
|
let termsName = []
|
||||||
|
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
||||||
|
console.log(this.chartsDatazz, '1012')
|
||||||
|
this.chartsDatazz.series = cloneSarr.map((item, index) => {
|
||||||
|
let obju = Object.values(item)
|
||||||
|
let keys = obju.shift()
|
||||||
|
termsName.push(keys)
|
||||||
|
return {
|
||||||
|
name: keys,
|
||||||
|
type: 'bar',
|
||||||
|
data: obju
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.chartsDatazz.legend = {
|
||||||
|
type: 'scroll',
|
||||||
|
bottom: 0,
|
||||||
|
data: termsName
|
||||||
|
}
|
||||||
|
let timeArr = this.selectData.tableLine.map((item, index) => {
|
||||||
|
return item.label
|
||||||
|
})
|
||||||
|
timeArr.shift()
|
||||||
|
this.chartsDatazz.xAxis = [{
|
||||||
|
type: 'category',
|
||||||
|
data: timeArr
|
||||||
|
}]
|
||||||
|
this.chartsDatazz.yAxis = [{
|
||||||
|
type: 'value',
|
||||||
|
splitNumber: 6
|
||||||
|
}]
|
||||||
|
console.log(this.chartsDatazz)
|
||||||
|
return this.chartsDatazz
|
||||||
|
}
|
||||||
|
// 竖状图数据 ============列转换 地区===时间
|
||||||
|
dataVerticalMapColAreaDQSJ () {
|
||||||
|
this.chartsDatazz.yAxis = [{
|
||||||
|
type: 'value',
|
||||||
|
splitNumber: 6
|
||||||
|
}]
|
||||||
|
let cloneSarr = JSON.parse(JSON.stringify(this.selectData.countData))
|
||||||
|
let termsName = []
|
||||||
|
let seriess = cloneSarr.map((item, index) => {
|
||||||
|
let obju = Object.values(item)
|
||||||
|
let keys = obju.shift()
|
||||||
|
termsName.push(keys)
|
||||||
|
return obju
|
||||||
|
})
|
||||||
|
// 将数据转置
|
||||||
|
this.chartsDatazz.series = this.comRowColAllData(seriess).map((item, index) => {
|
||||||
|
console.log(this.selectData.tableLine[index + 1].label, '454545')
|
||||||
|
return {
|
||||||
|
name: this.selectData.tableLine[index + 1].label,
|
||||||
|
type: 'bar',
|
||||||
|
data: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let timeArr = this.selectData.tableLine.map((item, index) => {
|
||||||
|
return item.label
|
||||||
|
})
|
||||||
|
timeArr.shift()
|
||||||
|
this.chartsDatazz.legend = {
|
||||||
|
type: 'scroll',
|
||||||
|
bottom: 0,
|
||||||
|
data: timeArr
|
||||||
|
}
|
||||||
|
this.chartsDatazz.xAxis = [{
|
||||||
|
type: 'category',
|
||||||
|
data: termsName
|
||||||
|
}]
|
||||||
|
this.chartsDatazz.yAxis = [{
|
||||||
|
type: 'value',
|
||||||
|
splitNumber: 6
|
||||||
|
}]
|
||||||
|
return this.chartsDatazz
|
||||||
|
}
|
||||||
// 横状图数据 ============行转换
|
// 横状图数据 ============行转换
|
||||||
dataAcrossMapRow () {
|
dataAcrossMapRow () {
|
||||||
let termsName = []
|
let termsName = []
|
||||||
@@ -1105,7 +1323,9 @@ class computedFunc {
|
|||||||
shHangData = tableData.map((item, index) => {
|
shHangData = tableData.map((item, index) => {
|
||||||
// console.log(Object.values(item).filter((list, key) => { return yuan.indexOf(key) !== -1 }))
|
// 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 yuan.indexOf(key) !== -1 })
|
return Object.values(item).filter((list, key) => {
|
||||||
|
return yuan.indexOf(key) !== -1
|
||||||
|
})
|
||||||
// })
|
// })
|
||||||
}).filter((item, index) => {
|
}).filter((item, index) => {
|
||||||
return lineInputVal.indexOf(index) !== -1
|
return lineInputVal.indexOf(index) !== -1
|
||||||
|
|||||||
@@ -9,35 +9,45 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-menu
|
<el-menu
|
||||||
class="el-menu-vertical-demo"
|
class="el-menu-vertical-demo"
|
||||||
|
:default-openeds="defaultOpenDataCode"
|
||||||
@open="handleOpen"
|
@open="handleOpen"
|
||||||
@close="handleClose"
|
@close="handleClose"
|
||||||
@select="selectActive"
|
@select="selectActive"
|
||||||
style="border:none"
|
style="border:none"
|
||||||
>
|
>
|
||||||
<el-submenu :index="''+index1" v-for="(item1,index1) in leftCateData" :key="index1">
|
<el-submenu
|
||||||
|
:index="''+index1"
|
||||||
|
v-for="(item1,index1) in leftCateData"
|
||||||
|
:key="index1"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item1.id?'#95CEE4':''}"
|
||||||
|
>
|
||||||
<template slot="title">{{item1.name}}</template>
|
<template slot="title">{{item1.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2"
|
:index="index1+'-'+index2"
|
||||||
v-for="(item2,index2) in item1.children"
|
v-for="(item2,index2) in item1.children"
|
||||||
:key="index2"
|
:key="index2"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item2.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item2.name}}</template>
|
<template slot="title">{{item2.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2+'-'+index3"
|
:index="index1+'-'+index2+'-'+index3"
|
||||||
v-for="(item3,index3) in item2.children"
|
v-for="(item3,index3) in item2.children"
|
||||||
:key="index3"
|
:key="index3"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item3.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item3.name}}</template>
|
<template slot="title">{{item3.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2+'-'+index3+'-'+index4"
|
:index="index1+'-'+index2+'-'+index3+'-'+index4"
|
||||||
v-for="(item4,index4) in item3.children"
|
v-for="(item4,index4) in item3.children"
|
||||||
:key="index4"
|
:key="index4"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item4.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item4.name}}</template>
|
<template slot="title">{{item4.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2+'-'+index3+'-'+index4+'-'+index5"
|
:index="index1+'-'+index2+'-'+index3+'-'+index4+'-'+index5"
|
||||||
v-for="(item5,index5) in item4.children"
|
v-for="(item5,index5) in item4.children"
|
||||||
:key="index5"
|
:key="index5"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item5.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item4.name}}</template>
|
<template slot="title">{{item4.name}}</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
@@ -120,6 +130,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
// 默认展开
|
// 默认展开
|
||||||
|
defaultOpenDataCode: null,
|
||||||
zhibiaoImg: require('../../../static/chatCont/zhibiaojieshi.png'),
|
zhibiaoImg: require('../../../static/chatCont/zhibiaojieshi.png'),
|
||||||
leftCateData: null,
|
leftCateData: null,
|
||||||
checkboxState: false,
|
checkboxState: false,
|
||||||
@@ -180,8 +191,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleOpen (key, keyPath) {
|
handleOpen (key, keyPath) {
|
||||||
console.log(key, keyPath)
|
console.log(key, keyPath, '开444')
|
||||||
this.getCateData()
|
console.log(key.split('-'))
|
||||||
|
let datart = []
|
||||||
|
key.split('-').forEach((item, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
datart = this.leftCateData[item]
|
||||||
|
} else {
|
||||||
|
datart = datart.children[item]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(datart.id, 1010111)
|
||||||
|
this.selectClassId = datart.id
|
||||||
|
this.$store.state.selectDataLeft = datart
|
||||||
|
this.searchArealy()
|
||||||
},
|
},
|
||||||
handleClose (key, keyPath) {
|
handleClose (key, keyPath) {
|
||||||
console.log(key, keyPath)
|
console.log(key, keyPath)
|
||||||
@@ -247,7 +270,8 @@ export default {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'data/data/list',
|
url: 'data/data/list',
|
||||||
params: {
|
params: {
|
||||||
type: this.$route.query.type
|
type: this.$route.query.type === 'area' ? 2 : 1,
|
||||||
|
f: this.$store.state.selectDataLeft.f
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, '左侧菜单')
|
console.log(res, '左侧菜单')
|
||||||
@@ -255,7 +279,7 @@ export default {
|
|||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
this.leftCateData = res.data.data.list
|
this.leftCateData = res.data.data.list
|
||||||
this.selectClassId = this.leftCateData[0].id
|
this.selectClassId = this.leftCateData[0].id
|
||||||
console.log(this.selectClassId,'this.selectClassId000')
|
console.log(this.selectClassId, 'this.selectClassId000')
|
||||||
this.searchArealy()
|
this.searchArealy()
|
||||||
}
|
}
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
@@ -342,6 +366,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCateData()
|
this.getCateData()
|
||||||
|
this.defaultOpenDataCode = this.$store.state.openOpenLeft
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -106,6 +106,26 @@ export default {
|
|||||||
stateTells: {
|
stateTells: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
downLaSelects: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
downLaSelectArea: {
|
||||||
|
type: String,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
showTableState: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
areaDimensionStateS: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
advancedStates: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -323,7 +343,7 @@ export default {
|
|||||||
// 调用存储的对象
|
// 调用存储的对象
|
||||||
objCompBefore: null,
|
objCompBefore: null,
|
||||||
// echarts渲染的数据======>非饼图
|
// echarts渲染的数据======>非饼图
|
||||||
echartsDatarts: { ghg: 1 },
|
echartsDatarts: {},
|
||||||
// 饼图数据
|
// 饼图数据
|
||||||
echartsDatartsPie: {},
|
echartsDatartsPie: {},
|
||||||
// 行列转换索引状态0行1列
|
// 行列转换索引状态0行1列
|
||||||
@@ -342,10 +362,26 @@ export default {
|
|||||||
downLaSelect: {
|
downLaSelect: {
|
||||||
area: '',
|
area: '',
|
||||||
label: ''
|
label: ''
|
||||||
}
|
},
|
||||||
|
// 执行状态
|
||||||
|
hangZhiState: false,
|
||||||
|
// 高级查询数据
|
||||||
|
startsyui: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
// 监听父组件高级查询
|
||||||
|
startsyui (val, oldValue) {
|
||||||
|
console.log(val, oldValue, '12333333')
|
||||||
|
if (val) {
|
||||||
|
console.log(this.$store.state.transBefore, '12')
|
||||||
|
this.transBefore = this.$store.state.transBefore
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
// // 告诉父组件渲染完毕
|
||||||
|
this.$emit('tellParentsShowClos', false)
|
||||||
|
this.startsyui = false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 监听对象
|
// 监听对象
|
||||||
// chartsStatusMegger: {
|
// chartsStatusMegger: {
|
||||||
// handler (newval, oldVal) {
|
// handler (newval, oldVal) {
|
||||||
@@ -384,10 +420,16 @@ export default {
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
transBefore (newval, oldval) {
|
transBefore: {
|
||||||
if (newval && this.transBefore) {
|
handler (newval, oldval) {
|
||||||
this.showTable()
|
console.log(newval, 1020202)
|
||||||
}
|
if (newval && this.transBefore) {
|
||||||
|
console.log(this.transBefore, 'kkkkkkkkkkkkkkkkkkkkk')
|
||||||
|
this.showTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true
|
||||||
},
|
},
|
||||||
indStatic (newValue, oldValue) {
|
indStatic (newValue, oldValue) {
|
||||||
console.log(newValue, 'newValue1212')
|
console.log(newValue, 'newValue1212')
|
||||||
@@ -423,6 +465,51 @@ export default {
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
|
downLaSelects (val) {
|
||||||
|
console.log(val, 'va;111')
|
||||||
|
if (val) {
|
||||||
|
this.$store.state.selectData = val
|
||||||
|
if (!this.$store.state.advancedSearchState) {
|
||||||
|
this.getDatas()
|
||||||
|
} else {
|
||||||
|
this.advancedSearchDataShow()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
downLaSelectArea (valStrinf) {
|
||||||
|
console.log(this.$store.state.AreaAllCountData, '555222000')
|
||||||
|
console.log(valStrinf, '555222000选中')
|
||||||
|
console.log(this.$store.state.AreaAllCountData, 'kkkkk数据')
|
||||||
|
if (this.$store.state.AreaAllCountData) {
|
||||||
|
if (this.selectState === 2) {
|
||||||
|
if (this.$store.state.AreaAllCountData.areaName.indexOf(valStrinf) !== -1) {
|
||||||
|
let jsonData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
jsonData.transBeforeAreaData = this.$store.state.AreaAllCountData.transBeforeAreaData[this.$store.state.AreaAllCountData.areaName.indexOf(valStrinf)]
|
||||||
|
this.transBefore = jsonData
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
} else {
|
||||||
|
this.selectState = 1
|
||||||
|
this.getDatas()
|
||||||
|
// 告诉父组件改变筛选值
|
||||||
|
this.$emit('tellChangeFan', true)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(this.$store.state.AreaAllCountData.termsName.indexOf(valStrinf), 'this.$store.state.AreaAllCountData.areaName.indexOf(valStrinf)')
|
||||||
|
if (this.$store.state.AreaAllCountData.termsName.indexOf(valStrinf) !== -1) {
|
||||||
|
let jsonData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
jsonData.transBeforeAreaData = this.$store.state.AreaAllCountData.transBeforeAreaData[this.$store.state.AreaAllCountData.termsName.indexOf(valStrinf)]
|
||||||
|
this.transBefore = jsonData
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
console.log(this.$store.state.AreaAllCountData.transBeforeAreaData[this.$store.state.AreaAllCountData.termsName.indexOf(valStrinf)], '1010111')
|
||||||
|
} else {
|
||||||
|
this.selectState = 2
|
||||||
|
this.getDatas()
|
||||||
|
// 告诉父组件改变筛选值
|
||||||
|
this.$emit('tellChangeFan', true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 监听行列图表转换
|
// 监听行列图表转换
|
||||||
rowColIndex (newVal, oldVal) {
|
rowColIndex (newVal, oldVal) {
|
||||||
if (this.transBefore) {
|
if (this.transBefore) {
|
||||||
@@ -445,7 +532,7 @@ export default {
|
|||||||
this.transBefore.areaName = JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.areaName
|
this.transBefore.areaName = JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.areaName
|
||||||
this.transBefore.transBeforeTermsData = JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.transBeforeTermsData
|
this.transBefore.transBeforeTermsData = JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.transBeforeTermsData
|
||||||
this.transBefore.transBeforeAreaData = JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.transBeforeAreaData
|
this.transBefore.transBeforeAreaData = JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.transBeforeAreaData
|
||||||
console.log(this.transBefore, '000')
|
console.log(this.transBefore, '000kkkkkkkkkkkkk')
|
||||||
this.$store.state.transdtr = true
|
this.$store.state.transdtr = true
|
||||||
// 全局总数据
|
// 全局总数据
|
||||||
this.$store.state.transBefore = this.transBefore
|
this.$store.state.transBefore = this.transBefore
|
||||||
@@ -456,7 +543,9 @@ export default {
|
|||||||
console.log(this.$store.state.selectData, 'this.$store.state.selectData')
|
console.log(this.$store.state.selectData, 'this.$store.state.selectData')
|
||||||
console.log(this.$store.state.selectfilter, 'this.$store.state.selectfilter')
|
console.log(this.$store.state.selectfilter, 'this.$store.state.selectfilter')
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.getDatas()
|
if (this.hangZhiState) {
|
||||||
|
this.getDatas()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -466,6 +555,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 监听下拉状态变化
|
// 监听下拉状态变化
|
||||||
stateTells (val) {
|
stateTells (val) {
|
||||||
|
console.log(val, 'jjjjjj')
|
||||||
if (val) {
|
if (val) {
|
||||||
console.log(val, 'jjjjjj')
|
console.log(val, 'jjjjjj')
|
||||||
if (JSON.parse(localStorage.getItem('classFiyData')) && JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id)) {
|
if (JSON.parse(localStorage.getItem('classFiyData')) && JSON.parse(localStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id)) {
|
||||||
@@ -483,12 +573,13 @@ export default {
|
|||||||
this.$store.state.transBefore = this.transBefore
|
this.$store.state.transBefore = this.transBefore
|
||||||
// 全局永久不变数据
|
// 全局永久不变数据
|
||||||
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
} else {
|
|
||||||
console.log(this.defaultDataRight, '获取左侧选中数据555')
|
|
||||||
console.log(this.$store.state.selectData, 'this.$store.state.selectData')
|
|
||||||
console.log(this.$store.state.selectfilter, 'this.$store.state.selectfilter')
|
|
||||||
this.getDatas()
|
|
||||||
}
|
}
|
||||||
|
// } else {
|
||||||
|
// console.log(this.defaultDataRight, '获取左侧选中数据555')
|
||||||
|
// console.log(this.$store.state.selectData, 'this.$store.state.selectData')
|
||||||
|
// console.log(this.$store.state.selectfilter, 'this.$store.state.selectfilter')
|
||||||
|
// this.getDatas()
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
statesDf (val) {
|
statesDf (val) {
|
||||||
@@ -501,12 +592,52 @@ export default {
|
|||||||
this.transBefore.areaName = this.$store.state.transBefore.areaName
|
this.transBefore.areaName = this.$store.state.transBefore.areaName
|
||||||
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
|
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
|
||||||
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
|
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
|
||||||
|
// this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
// console.log(this.transBefore, '我要改变')
|
// console.log(this.transBefore, '我要改变')
|
||||||
// 重新渲染表格
|
// 重新渲染表格
|
||||||
this.$refs.table.doLayout()
|
this.$refs.table.doLayout()
|
||||||
// 告诉父组件改完了
|
// 告诉父组件改完了
|
||||||
this.$emit('tellAreadly', 1)
|
this.$emit('tellAreadly', 1)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
showTableState (val) { // 监听清除空行空列后重新渲染表格
|
||||||
|
if (val) {
|
||||||
|
this.transBefore = {}
|
||||||
|
this.transBefore.tableExplain = this.$store.state.transBefore.tableExplain
|
||||||
|
this.transBefore.timeArr = this.$store.state.transBefore.timeArr
|
||||||
|
this.transBefore.termsName = this.$store.state.transBefore.termsName
|
||||||
|
this.transBefore.termsExplain = this.$store.state.transBefore.termsExplain
|
||||||
|
this.transBefore.areaName = this.$store.state.transBefore.areaName
|
||||||
|
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
|
||||||
|
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
this.$refs.table.doLayout()
|
||||||
|
// 告诉父组件重新渲染表格完毕
|
||||||
|
this.$emit('statertyui', false)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 监听地区数据维度转换状态
|
||||||
|
areaDimensionStateS (newVal) {
|
||||||
|
console.log(newVal, '1011111')
|
||||||
|
// if (newVal) {
|
||||||
|
if (this.$store.state.transBefore !== null) {
|
||||||
|
this.transBefore = {}
|
||||||
|
this.transBefore.tableExplain = this.$store.state.transBefore.tableExplain
|
||||||
|
this.transBefore.timeArr = this.$store.state.transBefore.timeArr
|
||||||
|
this.transBefore.termsName = this.$store.state.transBefore.termsName
|
||||||
|
this.transBefore.termsExplain = this.$store.state.transBefore.termsExplain
|
||||||
|
this.transBefore.areaName = this.$store.state.transBefore.areaName
|
||||||
|
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
|
||||||
|
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
|
||||||
|
} else {
|
||||||
|
this.transBefore = null
|
||||||
|
}
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
this.$refs.table.doLayout()
|
||||||
|
this.showTable()
|
||||||
|
// 告诉父组件重新渲染表格完毕
|
||||||
|
this.$emit('statertyui', false)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -529,17 +660,84 @@ export default {
|
|||||||
// 地区数据转置
|
// 地区数据转置
|
||||||
areaTrans () {
|
areaTrans () {
|
||||||
if (this.transState) { // 当时间在表头上的时候
|
if (this.transState) { // 当时间在表头上的时候
|
||||||
this.objCompBefore = new ComputedData(this.transBefore)
|
console.log(this.$store.state.SelecttDimension, '2020')
|
||||||
var objDatasBefore = this.objCompBefore.comTransAreabefore()
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
this.tableLine = objDatasBefore.tableLine
|
this.objCompBefore = new ComputedData(this.transBefore)
|
||||||
this.tableData = objDatasBefore.countData
|
var objDatasBefore = this.objCompBefore.comTransAreabefore()
|
||||||
console.log(objDatasBefore, 'objDatasAfter')
|
this.tableLine = objDatasBefore.tableLine
|
||||||
|
this.tableData = objDatasBefore.countData
|
||||||
|
console.log(objDatasBefore, 'objDatasAfter1')
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
|
var objDatasAfter = objCompAfter.comTransAreaAfter()
|
||||||
|
this.tableLine = objDatasAfter.tableLine
|
||||||
|
this.tableData = objDatasAfter.countData
|
||||||
|
console.log(objDatasAfter, 'objDatasAfter2')
|
||||||
|
} 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)
|
||||||
|
var comTransAreabeforeLabelTime = objCompAfter.comTransAreabeforeLabelTime()
|
||||||
|
this.tableLine = comTransAreabeforeLabelTime.tableLine
|
||||||
|
this.tableData = comTransAreabeforeLabelTime.countData
|
||||||
|
console.log(comTransAreabeforeLabelTime, 'comTransAreabeforeLabelTime')
|
||||||
|
} 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')
|
||||||
|
} 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')
|
||||||
|
} 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')
|
||||||
|
}
|
||||||
} else { // 当指标名称在表头上
|
} else { // 当指标名称在表头上
|
||||||
let objCompAfter = new ComputedData(this.transBefore)
|
console.log(this.$store.state.SelecttDimension, '2020')
|
||||||
var objDatasAfter = objCompAfter.comTransAreaAfter()
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
this.tableLine = objDatasAfter.tableLine
|
let objCompAfter = new ComputedData(this.transBefore)
|
||||||
this.tableData = objDatasAfter.countData
|
var objDatasAfterB = objCompAfter.comTransAreaAfter()
|
||||||
console.log(objDatasAfter, 'objDatasAfter')
|
this.tableLine = objDatasAfterB.tableLine
|
||||||
|
this.tableData = objDatasAfterB.countData
|
||||||
|
console.log(objDatasAfterB, 'objDatasAfterB')
|
||||||
|
} 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')
|
||||||
|
} 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')
|
||||||
|
} 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')
|
||||||
|
} 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')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 渲染列表数据
|
// 渲染列表数据
|
||||||
@@ -674,7 +872,7 @@ export default {
|
|||||||
// 图表渲染
|
// 图表渲染
|
||||||
chartsShow () {
|
chartsShow () {
|
||||||
// 改变值行值
|
// 改变值行值
|
||||||
|
console.log(this.$route.query.type, '1010111')
|
||||||
switch (this.indStatic) {
|
switch (this.indStatic) {
|
||||||
case 1:
|
case 1:
|
||||||
if (this.pieStatic) {
|
if (this.pieStatic) {
|
||||||
@@ -700,7 +898,9 @@ export default {
|
|||||||
this.pieStatic = false
|
this.pieStatic = false
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
console.log(this.lineStatic, this.rowColIndex, '555025')
|
console.log(this.lineStatic, this.rowColIndex, '状态改变')
|
||||||
|
console.log(this.listInputVal, this.lineInputVal, '行列数据前')
|
||||||
|
// console.log(this.lineStatic, this.rowColIndex, '状态改变')
|
||||||
if (this.lineStatic && this.rowColIndex === 0) {
|
if (this.lineStatic && this.rowColIndex === 0) {
|
||||||
this.lineInputVal = [0]
|
this.lineInputVal = [0]
|
||||||
this.listInputVal = [1, 2, 3]
|
this.listInputVal = [1, 2, 3]
|
||||||
@@ -710,10 +910,11 @@ export default {
|
|||||||
this.listInputVal = [1]
|
this.listInputVal = [1]
|
||||||
this.lineStatic = true
|
this.lineStatic = true
|
||||||
}
|
}
|
||||||
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)
|
||||||
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataPieMapRow()) : (this.echartsDatarts = this.objCompBefore.dataPieMapCol())
|
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataPieMapRow()) : (this.echartsDatarts = this.objCompBefore.dataPieMapCol())
|
||||||
this.pieStatic = true
|
this.pieStatic = true
|
||||||
|
this.lineStatic = false
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
if (this.pieStatic) {
|
if (this.pieStatic) {
|
||||||
@@ -732,13 +933,15 @@ export default {
|
|||||||
rowColInd (ind) {
|
rowColInd (ind) {
|
||||||
// 0行1列
|
// 0行1列
|
||||||
this.rowColIndex = ind
|
this.rowColIndex = ind
|
||||||
|
// 重置默认
|
||||||
|
this.lineStatic = true
|
||||||
},
|
},
|
||||||
// 每列input选中
|
// 每列input选中
|
||||||
listInput (ind) {
|
listInput (ind) {
|
||||||
console.log(ind, '列')
|
console.log(ind, '列')
|
||||||
if (this.indStatic === 3 && this.rowColIndex === 1) {
|
if (this.indStatic === 3 && this.rowColIndex === 1) {
|
||||||
this.listInputVal = [ind]
|
this.listInputVal = [ind]
|
||||||
this.$refs.listInputSelect[ind].checked = true
|
// this.$refs.listInputSelect[ind].checked = true
|
||||||
} else {
|
} else {
|
||||||
this.listInputVal.indexOf(ind) === -1 ? (this.listInputVal.push(ind)) : (this.listInputVal.splice(this.listInputVal.indexOf(ind), 1))
|
this.listInputVal.indexOf(ind) === -1 ? (this.listInputVal.push(ind)) : (this.listInputVal.splice(this.listInputVal.indexOf(ind), 1))
|
||||||
}
|
}
|
||||||
@@ -747,68 +950,105 @@ export default {
|
|||||||
// 每行input选中
|
// 每行input选中
|
||||||
lineInput (ind) {
|
lineInput (ind) {
|
||||||
console.log(ind, '行')
|
console.log(ind, '行')
|
||||||
|
console.log(this.rowColIndex, '行this.rowColIndex')
|
||||||
|
console.log(this.indStatic, '行this.indStatic')
|
||||||
|
console.log(this.$refs.lineInputSelect, '行this.lineInputSelect')
|
||||||
if (this.indStatic === 3 && this.rowColIndex === 0) {
|
if (this.indStatic === 3 && this.rowColIndex === 0) {
|
||||||
|
// this.$refs.lineInputSelect.forEach((item, index) => {
|
||||||
|
// if (index === ind) {
|
||||||
|
// item.checked = true
|
||||||
|
// } else {
|
||||||
|
// item.checked = false
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
console.log(this.listInputVal, this.lineInputVal, '好哥们1')
|
||||||
this.lineInputVal = [ind]
|
this.lineInputVal = [ind]
|
||||||
this.$refs.lineInputSelect[ind].checked = true
|
// this.$refs.lineInputSelect[ind].checked = true
|
||||||
|
console.log(this.listInputVal, this.lineInputVal, '好哥们2')
|
||||||
} else {
|
} else {
|
||||||
this.lineInputVal.indexOf(ind) === -1 ? (this.lineInputVal.push(ind)) : (this.lineInputVal.splice(this.lineInputVal.indexOf(ind), 1))
|
this.lineInputVal.indexOf(ind) === -1 ? (this.lineInputVal.push(ind)) : (this.lineInputVal.splice(this.lineInputVal.indexOf(ind), 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
this.chartsShow()
|
this.chartsShow()
|
||||||
},
|
},
|
||||||
// 获取后台数据表中的数据
|
// 获取后台数据表中的数据
|
||||||
getDatas () {
|
getDatas () {
|
||||||
// 初始化计算数据
|
if (!this.$store.state.advancedSearchState) {
|
||||||
if (this.transBefore) {
|
// 初始化计算数据
|
||||||
this.objCompBefore.initAllData()
|
if (this.transBefore) {
|
||||||
}
|
this.objCompBefore.initAllData()
|
||||||
console.log(this.$store.state.selectData, '执行')
|
|
||||||
this.$axios({
|
|
||||||
method: 'GET',
|
|
||||||
url: 'data/data/detail',
|
|
||||||
params: {
|
|
||||||
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
|
||||||
table_name: this.defaultDataRight.table_name, // 表名
|
|
||||||
id: this.defaultDataRight.id, // 分类id
|
|
||||||
area: this.downLaSelect.area, // 选中的地区
|
|
||||||
quota: this.downLaSelect.label, // 选中的指标
|
|
||||||
cate: this.selectState, // 1筛选指标 2筛选地区
|
|
||||||
f: this.$store.state.selectfilter, // year=>年度分类,monthly=>月度分类,quarter=>季度分类
|
|
||||||
data: this.$store.state.selectData // 时间
|
|
||||||
}
|
}
|
||||||
}).then(res => {
|
console.log(this.$store.state.selectData, '执行')
|
||||||
console.log(res, '获取数据展示数据')
|
this.$axios({
|
||||||
// 请求接口完成 请求成功
|
method: 'GET',
|
||||||
if (res.data.code === 200) {
|
url: 'data/data/detail',
|
||||||
if (res.data.data.areaName.length !== 0) {
|
params: {
|
||||||
if (this.downLaSelect.area === '' || this.downLaSelect.label === '') {
|
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
||||||
console.log(this.downLaSelect.area, 'this.downLaSelect.area')
|
table_name: this.defaultDataRight.table_name, // 表名
|
||||||
let brrtf = {}
|
id: this.defaultDataRight.id, // 分类id
|
||||||
// this.transBefore = {}
|
area: this.downLaSelect.area, // 选中的地区
|
||||||
brrtf.tableExplain = res.data.data.tableExplain
|
quota: this.downLaSelect.label, // 选中的指标
|
||||||
brrtf.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
cate: this.selectState, // 1筛选指标 2筛选地区
|
||||||
brrtf.termsName = res.data.data.termsName
|
f: this.$store.state.selectfilter, // year=>年度分类,monthly=>月度分类,quarter=>季度分类
|
||||||
brrtf.termsExplain = res.data.data.termsExplain
|
data: this.$store.state.selectData // 时间
|
||||||
brrtf.areaName = res.data.data.areaName
|
}
|
||||||
if (this.$route.query.type === 'area') {
|
}).then(res => {
|
||||||
console.log('走这里')
|
console.log(res, '获取数据展示数据')
|
||||||
brrtf.transBeforeAreaData = res.data.data.transBeforeAreaData[0]
|
// 请求接口完成 请求成功
|
||||||
brrtf.transBeforeTermsData = res.data.data.transBeforeTermsData
|
if (res.data.code === 200) {
|
||||||
|
if (res.data.data.areaName.length !== 0) {
|
||||||
|
if (this.downLaSelect.area === '' || this.downLaSelect.label === '') {
|
||||||
|
console.log(this.downLaSelect.area, 'this.downLaSelect.area')
|
||||||
|
let brrtf = {}
|
||||||
|
// this.transBefore = {}
|
||||||
|
brrtf.tableExplain = res.data.data.tableExplain
|
||||||
|
brrtf.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
||||||
|
brrtf.termsName = res.data.data.termsName
|
||||||
|
brrtf.termsExplain = res.data.data.termsExplain
|
||||||
|
brrtf.areaName = res.data.data.areaName
|
||||||
|
if (this.$route.query.type === 'area') {
|
||||||
|
console.log('走这里')
|
||||||
|
brrtf.transBeforeAreaData = res.data.data.transBeforeAreaData[0]
|
||||||
|
brrtf.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||||
|
} else {
|
||||||
|
brrtf.transBeforeAreaData = res.data.data.transBeforeAreaData
|
||||||
|
brrtf.transBeforeTermsData = res.data.data.transBeforeTermsData[0]
|
||||||
|
}
|
||||||
|
console.log(brrtf, 'brrtf')
|
||||||
|
this.transBefore = brrtf
|
||||||
|
console.log(this.transBefore, '000')
|
||||||
|
this.$store.state.transdtr = true
|
||||||
|
// 全局总数据
|
||||||
|
this.$store.state.transBefore = this.transBefore
|
||||||
|
// 全局永久不变数据
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
if (this.selectState === 1) {
|
||||||
|
this.$store.state.labelArea = this.transBefore.termsName
|
||||||
|
} else {
|
||||||
|
this.$store.state.labelArea = this.transBefore.areaName
|
||||||
|
}
|
||||||
|
this.$store.state.AreaAllCountData = res.data.data
|
||||||
|
// 告诉父组件我完成任务重置状态
|
||||||
|
this.$emit('prentsState', false)
|
||||||
|
console.log(this.$store.state.noChangeData, 'this.$store.state.noChangeDatathis.$store.state.noChangeDatathis.$store.state.noChangeData')
|
||||||
} else {
|
} else {
|
||||||
brrtf.transBeforeAreaData = res.data.data.transBeforeAreaData
|
this.transBefore = {}
|
||||||
brrtf.transBeforeTermsData = res.data.data.transBeforeTermsData[0]
|
this.transBefore.tableExplain = res.data.data.tableExplain
|
||||||
|
this.transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
||||||
|
this.transBefore.termsName = res.data.data.termsName
|
||||||
|
this.transBefore.termsExplain = res.data.data.termsExplain
|
||||||
|
this.transBefore.areaName = res.data.data.areaName
|
||||||
|
this.transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||||
|
this.transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
|
||||||
|
console.log(this.transBefore, '000')
|
||||||
|
this.$store.state.transdtr = true
|
||||||
|
// 全局总数据
|
||||||
|
this.$store.state.transBefore = this.transBefore
|
||||||
|
// 全局永久不变数据
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
|
||||||
|
// 告诉父组件我完成任务重置状态
|
||||||
|
this.$emit('prentsState', false)
|
||||||
}
|
}
|
||||||
console.log(brrtf, 'brrtf')
|
|
||||||
this.transBefore = brrtf
|
|
||||||
console.log(this.transBefore, '000')
|
|
||||||
this.$store.state.transdtr = true
|
|
||||||
// 全局总数据
|
|
||||||
this.$store.state.transBefore = this.transBefore
|
|
||||||
// 全局永久不变数据
|
|
||||||
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
|
||||||
// 告诉父组件我完成任务重置状态
|
|
||||||
this.$emit('prentsState', false)
|
|
||||||
console.log(this.$store.state.noChangeData, 'this.$store.state.noChangeDatathis.$store.state.noChangeDatathis.$store.state.noChangeData')
|
|
||||||
} else {
|
} else {
|
||||||
this.transBefore = {}
|
this.transBefore = {}
|
||||||
this.transBefore.tableExplain = res.data.data.tableExplain
|
this.transBefore.tableExplain = res.data.data.tableExplain
|
||||||
@@ -824,37 +1064,70 @@ export default {
|
|||||||
this.$store.state.transBefore = this.transBefore
|
this.$store.state.transBefore = this.transBefore
|
||||||
// 全局永久不变数据
|
// 全局永久不变数据
|
||||||
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
|
||||||
// 告诉父组件我完成任务重置状态
|
// 告诉父组件我完成任务重置状态
|
||||||
this.$emit('prentsState', false)
|
this.$emit('prentsState', false)
|
||||||
}
|
}
|
||||||
|
this.hangZhiState = true
|
||||||
} else {
|
} else {
|
||||||
this.transBefore = {}
|
this.transBefore = null
|
||||||
this.transBefore.tableExplain = res.data.data.tableExplain
|
// this.$store.state.transdtr = null
|
||||||
this.transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
|
||||||
this.transBefore.termsName = res.data.data.termsName
|
|
||||||
this.transBefore.termsExplain = res.data.data.termsExplain
|
|
||||||
this.transBefore.areaName = res.data.data.areaName
|
|
||||||
this.transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
|
||||||
this.transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
|
|
||||||
console.log(this.transBefore, '000')
|
|
||||||
this.$store.state.transdtr = true
|
|
||||||
// 全局总数据
|
// 全局总数据
|
||||||
this.$store.state.transBefore = this.transBefore
|
this.$store.state.transBefore = null
|
||||||
// 全局永久不变数据
|
this.$store.state.noChangeData = null
|
||||||
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
|
||||||
// 告诉父组件我完成任务重置状态
|
|
||||||
this.$emit('prentsState', false)
|
|
||||||
}
|
}
|
||||||
} else {
|
if (this.$route.query.type !== 'area') {
|
||||||
this.transBefore = null
|
this.$store.state.SelecttDimension.col = 'zb'
|
||||||
// this.$store.state.transdtr = null
|
this.$store.state.SelecttDimension.row = 'sj'
|
||||||
// 全局总数据
|
}
|
||||||
this.$store.state.transBefore = null
|
this.$emit('stateDataGet', false)
|
||||||
this.$store.state.noChangeData = null
|
}).catch((fail) => {
|
||||||
|
console.log(fail, 2369)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.transBefore = this.$store.state.transBefore
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 高级查询数据渲染
|
||||||
|
advancedSearchDataShow () {
|
||||||
|
this.$axios({
|
||||||
|
method: 'POST',
|
||||||
|
url: 'data/data/query',
|
||||||
|
data: {
|
||||||
|
type: this.$route.query.type === 'area' ? 2 : 1,
|
||||||
|
data: this.$store.state.advanceData,
|
||||||
|
area: this.downLaSelect.area,
|
||||||
|
quota: this.downLaSelect.label,
|
||||||
|
cate: this.selectState,
|
||||||
|
f: this.$route.query.type,
|
||||||
|
date: this.$store.state.selectData
|
||||||
}
|
}
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res, '高级查询数据展示')
|
||||||
|
// 请求接口完成 请求成功
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
let transBefore = {}
|
||||||
|
transBefore.tableExplain = res.data.data.tableExplain
|
||||||
|
transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
||||||
|
transBefore.termsName = res.data.data.termsName
|
||||||
|
transBefore.termsExplain = res.data.data.termsExplain
|
||||||
|
transBefore.areaName = res.data.data.areaName
|
||||||
|
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||||
|
transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
|
||||||
|
console.log(transBefore, '000')
|
||||||
|
this.$store.state.transdtr = true
|
||||||
|
// 全局总数据
|
||||||
|
this.$store.state.transBefore = transBefore
|
||||||
|
this.transBefore = transBefore
|
||||||
|
// 全局永久不变数据
|
||||||
|
this.$store.state.noChangeData = JSON.parse(JSON.stringify(transBefore))
|
||||||
|
} else {
|
||||||
|
this.$store.state.transBefore = null
|
||||||
|
}
|
||||||
|
// 告诉父组件我完成任务重置状态
|
||||||
|
this.$emit('prentsState', false)
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail, 2369)
|
console.log(fail)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -921,11 +1194,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
// this.getDatas()
|
// 还原高级查询状态
|
||||||
|
this.$store.state.advancedSearchState = false
|
||||||
|
console.log(this.advancedStates, 'this.advancedStates111')
|
||||||
|
this.startsyui = this.advancedStates
|
||||||
},
|
},
|
||||||
updated () {
|
updated () {
|
||||||
// 重新渲染表格
|
// 重新渲染表格
|
||||||
this.$refs.table.doLayout()
|
this.$refs.table.doLayout()
|
||||||
|
console.log(this.advancedStates, 'this.advancedStates')
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// console.log(new ComputedData())
|
// console.log(new ComputedData())
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
>
|
>
|
||||||
<img :src="item.url" alt />
|
<img :src="item.url" alt />
|
||||||
</div>
|
</div>
|
||||||
<div class="chart_right">
|
<div class="chart_right" v-if="!areaDimensionStateS">
|
||||||
<!-- 指标地区cut -->
|
<!-- 指标地区cut -->
|
||||||
<div class="chart_right_area" v-if="$route.query.type==='area'">
|
<!-- <div class="chart_right_area" v-if="$route.query.type!=='area'">
|
||||||
指标:
|
{{stateChangeSDF?'指标:':'地区:'}}
|
||||||
<cityPicker
|
<cityPicker
|
||||||
:level="jishuArea"
|
:level="jishuArea"
|
||||||
:selectpattern="selectpatternArea"
|
:selectpattern="selectpatternArea"
|
||||||
@@ -19,6 +19,16 @@
|
|||||||
:default-city="cityDefaultNameArea"
|
:default-city="cityDefaultNameArea"
|
||||||
@choice-caller="choiceCallerArea"
|
@choice-caller="choiceCallerArea"
|
||||||
></cityPicker>
|
></cityPicker>
|
||||||
|
</div>-->
|
||||||
|
<div class="chart_right_area" v-if="$route.query.type==='area'">
|
||||||
|
{{stateChangeSDF?'指标:':'地区:'}}
|
||||||
|
<el-cascader
|
||||||
|
v-model="value"
|
||||||
|
:options="options"
|
||||||
|
@change="handleChange"
|
||||||
|
style="width:12rem"
|
||||||
|
size="small"
|
||||||
|
></el-cascader>
|
||||||
</div>
|
</div>
|
||||||
<!-- 根据时间筛选 -->
|
<!-- 根据时间筛选 -->
|
||||||
<div class="chart_right_time" v-if="cityDataTime">
|
<div class="chart_right_time" v-if="cityDataTime">
|
||||||
@@ -32,14 +42,46 @@
|
|||||||
@choice-caller="choiceCallerTime"
|
@choice-caller="choiceCallerTime"
|
||||||
@visible-change="changesInputStu"
|
@visible-change="changesInputStu"
|
||||||
:isHideProp="isHideProp"
|
:isHideProp="isHideProp"
|
||||||
|
@stateInfor="stateInfor"
|
||||||
|
:stateRTY="stateRTY"
|
||||||
></cityPicker>
|
></cityPicker>
|
||||||
<div class="bottom" v-if="showInputStu" @click="showKuangCat">
|
<div class="bottom" v-if="showInputStu" @click.stop="showKuangCat">
|
||||||
<input type="text" placeholder="请输入时间" v-model="timeUsrr" />
|
<input
|
||||||
<span>确认</span>
|
type="text"
|
||||||
|
placeholder="请输入时间"
|
||||||
|
v-model="timeUsrr"
|
||||||
|
@focus="focusShow"
|
||||||
|
@blur="focusShow"
|
||||||
|
/>
|
||||||
|
<span @click="trueShuru()">确认</span>
|
||||||
|
<div class="explainTrue" v-if="kuangState">
|
||||||
|
<br />
|
||||||
|
<span style="color:#67bfdc">列:输入格式如下</span>
|
||||||
|
<br />月:201901,201902
|
||||||
|
<br />
|
||||||
|
<br />季:2019A,2019B,
|
||||||
|
<br />
|
||||||
|
<br /> 2019C,2019D
|
||||||
|
<br />
|
||||||
|
<br />年:2019,2018
|
||||||
|
<br />
|
||||||
|
<br />其他:2018-2019
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="chart_right" v-if="areaDimensionStateS&&this.$store.state.transBefore">
|
||||||
|
{{leftLabel[$store.state.noSelecttDimension]}}:
|
||||||
|
<el-cascader
|
||||||
|
v-model="valueDimension"
|
||||||
|
:options="optionsDimension"
|
||||||
|
@change="handleChangeDimension"
|
||||||
|
style="width:12rem"
|
||||||
|
size="small"
|
||||||
|
></el-cascader>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -52,6 +94,24 @@ export default {
|
|||||||
defaultDataRight: {
|
defaultDataRight: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
stateDataGetVal: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
labelAreaState: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
// 地区数据维度转换状态
|
||||||
|
areaDimensionStateS: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
// 指标地区状态
|
||||||
|
labelAreaStateks: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -59,6 +119,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
// 提示语logo
|
||||||
|
explainLogo: require('../../../static/nav/xl.png'),
|
||||||
// 控制下拉框显示隐藏
|
// 控制下拉框显示隐藏
|
||||||
isHideProp: true,
|
isHideProp: true,
|
||||||
// 栏目数据 结构不可变
|
// 栏目数据 结构不可变
|
||||||
@@ -78,12 +140,12 @@ export default {
|
|||||||
// 栏目级数
|
// 栏目级数
|
||||||
jishuArea: 1,
|
jishuArea: 1,
|
||||||
// 默认显示栏目
|
// 默认显示栏目
|
||||||
cityDefaultNameArea: '居民消费价格',
|
cityDefaultNameArea: '居民价格',
|
||||||
// 筛选数据
|
// 筛选数据
|
||||||
selectpatternArea: [
|
selectpatternArea: [
|
||||||
{
|
{
|
||||||
field: 'userProvinceId',
|
field: 'userProvinceId',
|
||||||
placeholder: '居民消费价格'
|
placeholder: '居民消费价'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 栏目数据 结构不可变
|
// 栏目数据 结构不可变
|
||||||
@@ -91,7 +153,7 @@ export default {
|
|||||||
// 栏目级数
|
// 栏目级数
|
||||||
jishuTime: 1,
|
jishuTime: 1,
|
||||||
// 默认显示栏目
|
// 默认显示栏目
|
||||||
cityDefaultNameTime: '最近13个月',
|
cityDefaultNameTime: '最近1个月',
|
||||||
// 筛选数据
|
// 筛选数据
|
||||||
selectpatternTime: [
|
selectpatternTime: [
|
||||||
{
|
{
|
||||||
@@ -124,14 +186,39 @@ export default {
|
|||||||
// 按时间查询
|
// 按时间查询
|
||||||
timeUsrr: '',
|
timeUsrr: '',
|
||||||
// 时间筛选输入框是否显示
|
// 时间筛选输入框是否显示
|
||||||
showInputStu: false
|
showInputStu: false,
|
||||||
|
// 控制下拉框的显示隐藏
|
||||||
|
stateRTY: true,
|
||||||
|
// 指标地区转换状态 true为指标 false为地区
|
||||||
|
stateChangeSDF: true,
|
||||||
|
// 提示框状态
|
||||||
|
kuangState: false,
|
||||||
|
value: [],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: 'zhinan',
|
||||||
|
label: '指南'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
leftLabel: {
|
||||||
|
'sj': '时间',
|
||||||
|
'zb': '指标',
|
||||||
|
'dq': '地区'
|
||||||
|
},
|
||||||
|
valueDimension: [],
|
||||||
|
optionsDimension: [
|
||||||
|
{
|
||||||
|
value: '',
|
||||||
|
label: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 监听左侧菜单的数据变化
|
// 监听左侧菜单的数据变化
|
||||||
defaultDataRight: {
|
defaultDataRight: {
|
||||||
handler (val) {
|
handler (val) {
|
||||||
console.log(val, '左侧数据变化chartsCut')
|
// console.log(val, '左侧数据变化chartsCut')
|
||||||
if (val) {
|
if (val) {
|
||||||
// 初始化公共数据
|
// 初始化公共数据
|
||||||
if (this.$route.query.type !== 'area') {
|
if (this.$route.query.type !== 'area') {
|
||||||
@@ -143,9 +230,72 @@ export default {
|
|||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
|
},
|
||||||
|
// 监听数据渲染变化
|
||||||
|
stateDataGetVal (newVal, oldVal) {
|
||||||
|
console.log(this.$store.state.transBefore, '啦啦啦')
|
||||||
|
if (!newVal) {
|
||||||
|
// this.showLabelArea()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labelAreaState (newVal, oldVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.showLabelArea()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labelAreaStateks (newVal, oldVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.stateChangeSDF = !this.stateChangeSDF
|
||||||
|
this.showLabelArea()
|
||||||
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
this.$store.state.SelecttDimension.col = 'zb'
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
this.$store.state.SelecttDimension.col = 'dq'
|
||||||
|
}
|
||||||
|
console.log(this.$store.state.transBefore, 'bbbbbbbbbbbbbbbbbbb')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$parent.tellChangeFan(false)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 监听地区维度转换数据变换
|
||||||
|
areaDimensionStateS (newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
if (this.$store.state.noSelecttDimension === 'sj') {
|
||||||
|
this.optionsDimension = this.$store.state.transBefore.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.valueDimension = [this.optionsDimension[0].value]
|
||||||
|
} else if (this.$store.state.noSelecttDimension === 'dq') {
|
||||||
|
this.optionsDimension = this.$store.state.transBefore.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.valueDimension = [this.optionsDimension[0].value]
|
||||||
|
} else if (this.$store.state.noSelecttDimension === 'zb') {
|
||||||
|
this.optionsDimension = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.valueDimension = [this.optionsDimension[0].value]
|
||||||
|
}
|
||||||
|
// 告诉父组件数据渲染完
|
||||||
|
this.$emit('emmitStateAd', false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 地区维度转换筛选
|
||||||
|
handleChangeDimension () {
|
||||||
|
console.log(this.valueDimension, 'this.valueDimension')
|
||||||
|
},
|
||||||
// 点击切换图表
|
// 点击切换图表
|
||||||
cutChartsTap (ind) {
|
cutChartsTap (ind) {
|
||||||
// console.log(ind)
|
// console.log(ind)
|
||||||
@@ -153,8 +303,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 被选中时触发
|
// 被选中时触发
|
||||||
choiceCallerArea (resu) {
|
choiceCallerArea (resu) {
|
||||||
console.log(resu, '5+656565')
|
console.log(resu[2], '5+656565')
|
||||||
console.log(this.cityDefaultName)
|
// this.$emit('statertfResu', resu[2])
|
||||||
},
|
},
|
||||||
// 被选中时触发
|
// 被选中时触发
|
||||||
choiceCallerTime (resu) {
|
choiceCallerTime (resu) {
|
||||||
@@ -165,9 +315,11 @@ export default {
|
|||||||
console.log(this.$store.state.selectData, '被选中的值')
|
console.log(this.$store.state.selectData, '被选中的值')
|
||||||
|
|
||||||
this.$store.state.selectData = resu[2].indexID
|
this.$store.state.selectData = resu[2].indexID
|
||||||
|
this.showInputStu = false
|
||||||
|
this.$emit('comTime', resu[2])
|
||||||
}
|
}
|
||||||
// 将值传给父组件
|
// 将值传给父组件
|
||||||
this.$emit('comTime', resu[2].name)
|
|
||||||
// this.showInputStu = !this.showInputStu
|
// this.showInputStu = !this.showInputStu
|
||||||
},
|
},
|
||||||
changesInputStu () {
|
changesInputStu () {
|
||||||
@@ -178,6 +330,7 @@ export default {
|
|||||||
showKuangCat () {
|
showKuangCat () {
|
||||||
console.log(1250)
|
console.log(1250)
|
||||||
this.isHideProp = false
|
this.isHideProp = false
|
||||||
|
this.stateRTY = false
|
||||||
},
|
},
|
||||||
// 查询下拉筛选条件
|
// 查询下拉筛选条件
|
||||||
searchSelect (type) {
|
searchSelect (type) {
|
||||||
@@ -197,16 +350,110 @@ export default {
|
|||||||
return { 'id': '110000', 'name': Object.values(res.data.data.list)[index], 'parentId': '100000', 'shortName': '北京', 'cityCode': '', indexID: item }
|
return { 'id': '110000', 'name': Object.values(res.data.data.list)[index], 'parentId': '100000', 'shortName': '北京', 'cityCode': '', indexID: item }
|
||||||
})
|
})
|
||||||
// 默认选中第一个
|
// 默认选中第一个
|
||||||
|
this.cityDefaultNameTime = this.cityDataTime[0].name
|
||||||
this.$store.state.selectData = this.cityDataTime[0].indexID
|
this.$store.state.selectData = this.cityDataTime[0].indexID
|
||||||
console.log(this.$store.state.selectData, 'this.cityDataTime[0].indexID')
|
// console.log(this.$store.state.selectData, 'this.cityDataTime[0].indexID')
|
||||||
// 告诉父组件我获取到了
|
// 告诉父组件我获取到了
|
||||||
this.$emit('stateTell', true)
|
this.$emit('stateTell', true)
|
||||||
}
|
}
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail)
|
console.log(fail)
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
stateInfor (val) {
|
||||||
|
if (val) {
|
||||||
|
this.stateRTY = val
|
||||||
|
} else {
|
||||||
|
this.showInputStu = val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 指标地区数据渲染
|
||||||
|
showLabelArea () {
|
||||||
|
console.log(this.stateChangeSDF, '走走走')
|
||||||
|
if (this.stateChangeSDF) { // 指标
|
||||||
|
console.log(this.$store.state.transBefore, 'thisthisthisthisthis')
|
||||||
|
this.cityDataArea = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return { 'id': '110000', 'name': item, 'parentId': '100000', 'shortName': '北京', 'cityCode': '', type: 1 }
|
||||||
|
})
|
||||||
|
this.cityDataArea.unshift({ 'id': '110000', 'name': '-序列-', 'parentId': '100000', 'shortName': '北京', 'cityCode': '', type: 1 })
|
||||||
|
this.cityDefaultNameArea = this.cityDataArea[1].name
|
||||||
|
this.selectpatternArea.placeholder = this.cityDataArea[1].name
|
||||||
|
|
||||||
|
this.options = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.options.unshift({
|
||||||
|
value: '序列',
|
||||||
|
label: '序列'
|
||||||
|
})
|
||||||
|
this.value = [this.options[1].value]
|
||||||
|
console.log(this.value, 'this.options')
|
||||||
|
// 告诉父组件已经完成任务
|
||||||
|
this.$emit('stateDFGHJ', true)
|
||||||
|
this.$emit('statertfResu', this.value[0])
|
||||||
|
} else { // 地区
|
||||||
|
this.options = this.$store.state.transBefore.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.options.unshift({
|
||||||
|
value: '序列',
|
||||||
|
label: '序列'
|
||||||
|
})
|
||||||
|
this.value = [this.options[1].value]
|
||||||
|
console.log(this.value, 'this.options')
|
||||||
|
// 告诉父组件已经完成任务
|
||||||
|
this.$emit('stateDFGHJ', true)
|
||||||
|
this.$emit('statertfResu', this.value[0])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 聚焦显示提示的搜索框
|
||||||
|
focusShow () {
|
||||||
|
this.kuangState = !this.kuangState
|
||||||
|
},
|
||||||
|
// 确定输入
|
||||||
|
trueShuru () {
|
||||||
|
if (this.timeUsrr !== '') {
|
||||||
|
switch (this.$route.query.type) {
|
||||||
|
case 'monthly':
|
||||||
|
if (this.timeUsrr[this.timeUsrr.length - 2] < 2 && this.timeUsrr.length < 7 && /^[0-9]+$/.test(this.timeUsrr)) {
|
||||||
|
if (this.timeUsrr[this.timeUsrr.length - 2] === 1 && this.timeUsrr[this.timeUsrr.length - 1] > 2) {
|
||||||
|
alert('您查询的时间格式有误,请重新输入!')
|
||||||
|
} else {
|
||||||
|
this.$store.state.selectData = this.timeUsrr
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
alert('您查询的时间格式有误,请重新输入!111')
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'quarter':
|
||||||
|
let arr = ['A', 'B', 'C', 'D']
|
||||||
|
if (arr.indexOf(this.timeUsrr[this.timeUsrr.length - 1]) !== -1 && this.timeUsrr.length < 6 && /^[0-9]+$/.test(this.timeUsrr.substring(0, 4))) {
|
||||||
|
this.$store.state.selectData = this.timeUsrr
|
||||||
|
} else {
|
||||||
|
alert('您查询的时间格式有误,请重新输入!111')
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'year':
|
||||||
|
break
|
||||||
|
case 'area':
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
alert('您查询的时间格式有误,请重新输入!')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 选中
|
||||||
|
handleChange (value) {
|
||||||
|
console.log(value)
|
||||||
|
console.log(this.value, 'this.value')
|
||||||
|
this.$emit('statertfResu', value[0])
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.cityDataArea = this.cityDataAreas
|
this.cityDataArea = this.cityDataAreas
|
||||||
@@ -288,6 +535,21 @@ export default {
|
|||||||
letter-spacing: 0.25rem;
|
letter-spacing: 0.25rem;
|
||||||
border-radius: 0.375rem;
|
border-radius: 0.375rem;
|
||||||
}
|
}
|
||||||
|
& > span:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
& > .explainTrue {
|
||||||
|
position: absolute;
|
||||||
|
top: 1.8rem;
|
||||||
|
width: 18.75rem;
|
||||||
|
height: 22.5rem;
|
||||||
|
background-image: url("../../../static/nav/xl.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,11 @@ export default {
|
|||||||
isHideProp: {
|
isHideProp: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
stateRTY: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
// required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -300,7 +305,12 @@ export default {
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// console.log(that.isHideProp, '12569')
|
// console.log(that.isHideProp, '12569')
|
||||||
if (e.target.className !== 'city-picker') {
|
if (e.target.className !== 'city-picker') {
|
||||||
that.modifyNature(that.inlay, 'isHide', true)
|
if (that.stateRTY) {
|
||||||
|
that.modifyNature(that.inlay, 'isHide', true)
|
||||||
|
that.$emit('stateInfor', false)
|
||||||
|
}else{
|
||||||
|
that.$emit('stateInfor', true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<span>维度转换</span>
|
<span>维度转换</span>
|
||||||
|
<!--地区-->
|
||||||
<img :src="imgUrl" alt @click="$store.state.dimensionState = false" />
|
<img :src="imgUrl" alt @click="$store.state.dimensionState = false" />
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
@@ -66,6 +67,11 @@ export default {
|
|||||||
'指标': 'zb',
|
'指标': 'zb',
|
||||||
'时间': 'sj',
|
'时间': 'sj',
|
||||||
'地区': 'dq'
|
'地区': 'dq'
|
||||||
|
},
|
||||||
|
arrValueZd: {
|
||||||
|
'zb': '指标',
|
||||||
|
'sj': '时间',
|
||||||
|
'dq': '地区'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -79,27 +85,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 维度转换默认
|
// 维度转换默认
|
||||||
change3D () {
|
change3D () {
|
||||||
if (this.$store.state.transState) {
|
this.rowVal = this.arrValueZd[this.$store.state.SelecttDimension.col]
|
||||||
if (this.$route.query.type !== 'area') {
|
this.colVal = this.arrValueZd[this.$store.state.SelecttDimension.row]
|
||||||
this.rowVal = '指标'
|
|
||||||
this.colVal = '时间'
|
|
||||||
} else {
|
|
||||||
this.rowVal = '地区'
|
|
||||||
this.colVal = '时间'
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.$route.query.type !== 'area') {
|
|
||||||
this.rowVal = '时间'
|
|
||||||
this.colVal = '指标'
|
|
||||||
} else {
|
|
||||||
this.rowVal = '时间'
|
|
||||||
this.colVal = '地区'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 确定维度转换
|
// 确定维度转换
|
||||||
trueChange () {
|
trueChange () {
|
||||||
this.trueChangeArea()
|
if (this.rowVal === this.colVal) {
|
||||||
|
alert('维度转换格式错误!行列相同')
|
||||||
|
} else {
|
||||||
|
this.trueChangeArea()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
trueChangeArea () {
|
trueChangeArea () {
|
||||||
console.log(this.arrValue[this.colVal], 'this.$store.state.noChangeDatathis.$store.state.noChangeDatathis.$store.state.noChangeData')
|
console.log(this.arrValue[this.colVal], 'this.$store.state.noChangeDatathis.$store.state.noChangeDatathis.$store.state.noChangeData')
|
||||||
@@ -107,9 +102,10 @@ export default {
|
|||||||
console.log(this.$store.state.noChangeData)
|
console.log(this.$store.state.noChangeData)
|
||||||
let paramsd = {}
|
let paramsd = {}
|
||||||
if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'zb') || (this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'sj')) {
|
if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'zb') || (this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'sj')) {
|
||||||
|
this.$store.state.noSelecttDimension = 'dq'
|
||||||
paramsd = {
|
paramsd = {
|
||||||
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
||||||
data: 3,
|
data: this.$store.state.selectDataLeft.id,
|
||||||
area: this.$store.state.noChangeData.areaName[0], // 选中的地区
|
area: this.$store.state.noChangeData.areaName[0], // 选中的地区
|
||||||
quota: '', // 选中的指标
|
quota: '', // 选中的指标
|
||||||
cate: this.selectState, // 1筛选指标 2筛选地区
|
cate: this.selectState, // 1筛选指标 2筛选地区
|
||||||
@@ -120,9 +116,10 @@ export default {
|
|||||||
col: this.arrValue[this.rowVal]
|
col: this.arrValue[this.rowVal]
|
||||||
}
|
}
|
||||||
} else if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'sj')) {
|
} else if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'sj')) {
|
||||||
|
this.$store.state.noSelecttDimension = 'zb'
|
||||||
paramsd = {
|
paramsd = {
|
||||||
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
||||||
data: 3,
|
data: this.$store.state.selectDataLeft.id,
|
||||||
area: '', // 选中的地区
|
area: '', // 选中的地区
|
||||||
quota: this.$store.state.noChangeData.termsName[0], // 选中的指标
|
quota: this.$store.state.noChangeData.termsName[0], // 选中的指标
|
||||||
cate: this.selectState, // 1筛选指标 2筛选地区
|
cate: this.selectState, // 1筛选指标 2筛选地区
|
||||||
@@ -133,9 +130,10 @@ export default {
|
|||||||
col: this.arrValue[this.rowVal]
|
col: this.arrValue[this.rowVal]
|
||||||
}
|
}
|
||||||
} else if ((this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'zb')) {
|
} else if ((this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'zb')) {
|
||||||
|
this.$store.state.noSelecttDimension = 'sj'
|
||||||
paramsd = {
|
paramsd = {
|
||||||
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
type: this.$route.query.type === 'area' ? 2 : 1, // 1非地区 2地区
|
||||||
data: 3,
|
data: this.$store.state.selectDataLeft.id,
|
||||||
area: '', // 选中的地区
|
area: '', // 选中的地区
|
||||||
quota: '', // 选中的指标
|
quota: '', // 选中的指标
|
||||||
cate: this.selectState, // 1筛选指标 2筛选地区
|
cate: this.selectState, // 1筛选指标 2筛选地区
|
||||||
@@ -146,6 +144,8 @@ export default {
|
|||||||
col: this.arrValue[this.rowVal]
|
col: this.arrValue[this.rowVal]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.$store.state.SelecttDimension.row = this.arrValue[this.colVal]
|
||||||
|
this.$store.state.SelecttDimension.col = this.arrValue[this.rowVal]
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: 'data/data/wd-trans',
|
url: 'data/data/wd-trans',
|
||||||
@@ -163,15 +163,22 @@ export default {
|
|||||||
transBefore.termsExplain = res.data.data.termsExplain
|
transBefore.termsExplain = res.data.data.termsExplain
|
||||||
transBefore.areaName = res.data.data.areaName
|
transBefore.areaName = res.data.data.areaName
|
||||||
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||||
transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
|
transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData[0]
|
||||||
console.log(this.transBefore, '000')
|
console.log(transBefore, '000')
|
||||||
this.$store.state.transdtr = true
|
this.$store.state.transdtr = true
|
||||||
// 全局总数据
|
// 全局总数据
|
||||||
this.$store.state.transBefore = this.transBefore
|
this.$store.state.AreaAllCountData = JSON.parse(JSON.stringify(res.data.data))
|
||||||
|
this.$store.state.transBefore = transBefore
|
||||||
|
// 告诉父组件维度转换发生改变
|
||||||
|
this.$emit('areaDimensionState', true)
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
this.$store.state.transBefore = null
|
this.$store.state.transBefore = null
|
||||||
|
// 告诉父组件维度转换发生改变
|
||||||
|
this.$emit('areaDimensionState', true)
|
||||||
}
|
}
|
||||||
|
// 关闭窗口
|
||||||
|
this.$store.state.dimensionState = false
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail, 2369)
|
console.log(fail, 2369)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -145,10 +145,11 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
echartsDatarts: {
|
echartsDatarts: {
|
||||||
handler (newVal, oldVal) {
|
handler (newVal, oldVal) {
|
||||||
console.log(newVal, '11111')
|
|
||||||
if (newVal !== undefined) {
|
if (newVal !== undefined) {
|
||||||
this.option = JSON.parse(JSON.stringify(newVal))
|
this.option = JSON.parse(JSON.stringify(newVal))
|
||||||
this.drawEcharts()
|
this.$nextTick(() => {
|
||||||
|
this.drawEcharts()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@@ -73,7 +73,157 @@ export default {
|
|||||||
if (newVal === 'hang') {
|
if (newVal === 'hang') {
|
||||||
// 行列新增渲染
|
// 行列新增渲染
|
||||||
if (this.$route.query.type === 'area') {
|
if (this.$route.query.type === 'area') {
|
||||||
this.datalist = this.$store.state.noChangeData.areaName
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.$store.state.selectLabelHang) {
|
if (!this.$store.state.selectLabelHang) {
|
||||||
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
@@ -173,13 +323,26 @@ export default {
|
|||||||
})
|
})
|
||||||
this.$store.state.selectLabelHang = lebalIndex
|
this.$store.state.selectLabelHang = lebalIndex
|
||||||
console.log(lebalIndex, '下标')
|
console.log(lebalIndex, '下标')
|
||||||
|
switch (this.$store.state.SelecttDimension.col) {
|
||||||
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
|
case 'dq':
|
||||||
return lebalIndex.indexOf(index) !== -1
|
this.$store.state.transBefore.areaName = this.$store.state.noChangeData.areaName.filter((item, index) => {
|
||||||
})
|
return lebalIndex.indexOf(index) !== -1
|
||||||
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
|
})
|
||||||
return lebalIndex.indexOf(index) !== -1
|
break
|
||||||
})
|
case 'zb':
|
||||||
|
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'sj':
|
||||||
|
this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
this.$store.state.transBefore.transBeforeAreaData = this.$store.state.noChangeData.transBeforeAreaData.filter((item, index) => {
|
this.$store.state.transBefore.transBeforeAreaData = this.$store.state.noChangeData.transBeforeAreaData.filter((item, index) => {
|
||||||
return lebalIndex.indexOf(index) !== -1
|
return lebalIndex.indexOf(index) !== -1
|
||||||
})
|
})
|
||||||
@@ -206,20 +369,24 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// 数据转置
|
// 数据转置
|
||||||
let gdt = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeTermsData))
|
let gdt = JSON.parse(JSON.stringify(this.$store.state.noChangeData.transBeforeTermsData))
|
||||||
|
|
||||||
let waiBrr = gdt[0].map(function (col, index) {
|
let waiBrr = gdt[0].map(function (col, index) {
|
||||||
return gdt.map((row, key) => {
|
return gdt.map((row, key) => {
|
||||||
return row[index]
|
return row[index]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
console.log(waiBrr, 'gdt125000')
|
||||||
waiBrr = waiBrr.filter((item, index) => {
|
waiBrr = waiBrr.filter((item, index) => {
|
||||||
return lebalIndex.indexOf(index) !== -1
|
return lebalIndex.indexOf(index) !== -1
|
||||||
})
|
})
|
||||||
|
console.log(waiBrr, 'waiBrr过滤后')
|
||||||
// 转置回来
|
// 转置回来
|
||||||
waiBrr = waiBrr.map(function (col, index) {
|
waiBrr = waiBrr[0].map(function (col, index) {
|
||||||
return waiBrr.map((row, key) => {
|
return waiBrr.map((row, key) => {
|
||||||
return row[index]
|
return row[index]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
console.log(waiBrr, '转置回来')
|
||||||
// 赋值
|
// 赋值
|
||||||
this.$store.state.transBefore.transBeforeTermsData = waiBrr
|
this.$store.state.transBefore.transBeforeTermsData = waiBrr
|
||||||
this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
|
this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
|
||||||
@@ -262,9 +429,26 @@ export default {
|
|||||||
})
|
})
|
||||||
// 赋值
|
// 赋值
|
||||||
this.$store.state.transBefore.transBeforeAreaData = waiBrr
|
this.$store.state.transBefore.transBeforeAreaData = waiBrr
|
||||||
this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
|
switch (this.$store.state.SelecttDimension.row) {
|
||||||
return lebalIndex.indexOf(index) !== -1
|
case 'dq':
|
||||||
})
|
this.$store.state.transBefore.areaName = this.$store.state.noChangeData.areaName.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'zb':
|
||||||
|
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'sj':
|
||||||
|
this.$store.state.transBefore.timeArr = this.$store.state.noChangeData.timeArr.filter((item, index) => {
|
||||||
|
return lebalIndex.indexOf(index) !== -1
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
this.$store.state.editWindowState = false
|
this.$store.state.editWindowState = false
|
||||||
this.$emit('emitState', true)
|
this.$emit('emitState', true)
|
||||||
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
|
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
|
||||||
@@ -277,7 +461,157 @@ export default {
|
|||||||
this.radioSelect = 'hang'
|
this.radioSelect = 'hang'
|
||||||
console.log(this.$store.state.selectLabelHang)
|
console.log(this.$store.state.selectLabelHang)
|
||||||
if (this.$route.query.type === 'area') {
|
if (this.$route.query.type === 'area') {
|
||||||
this.datalist = this.$store.state.noChangeData.areaName
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.timeArr.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.areaName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
if (!this.$store.state.selectLabelHang) {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: true,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
let state = true
|
||||||
|
if (this.$store.state.selectLabelHang.indexOf(index) === -1) {
|
||||||
|
state = false
|
||||||
|
} else {
|
||||||
|
state = true
|
||||||
|
}
|
||||||
|
console.log(state, 'state')
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: state,
|
||||||
|
id: index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.$store.state.selectLabelHang) {
|
if (!this.$store.state.selectLabelHang) {
|
||||||
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
this.datalist = this.$store.state.noChangeData.termsName.map((item, index) => {
|
||||||
|
|||||||
@@ -102,10 +102,36 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
radioValue (newValue, oldValue) {
|
radioValue (newValue, oldValue) {
|
||||||
|
console.log(newValue)
|
||||||
if (newValue === 'hang') {
|
if (newValue === 'hang') {
|
||||||
// 行列新增渲染
|
// 行列新增渲染
|
||||||
if (this.$route.query.type === 'area') {
|
if (this.$route.query.type === 'area') {
|
||||||
this.labelData = this.$store.state.transBefore.areaName
|
switch (this.$store.state.SelecttDimension.col) {
|
||||||
|
case 'dq':
|
||||||
|
this.labelData = this.$store.state.transBefore.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'sj':
|
||||||
|
this.labelData = this.$store.state.transBefore.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'zb':
|
||||||
|
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
@@ -116,12 +142,42 @@ export default {
|
|||||||
}
|
}
|
||||||
} else if (newValue === 'lie') {
|
} else if (newValue === 'lie') {
|
||||||
// 行列新增渲染
|
// 行列新增渲染
|
||||||
this.labelData = this.$store.state.transBefore.timeArr.map((item, index) => {
|
if (this.$route.query.type === 'area') {
|
||||||
return {
|
console.log(this.$store.state.SelecttDimension.row, this.$store.state.SelecttDimension.col)
|
||||||
text: item,
|
switch (this.$store.state.SelecttDimension.row) {
|
||||||
state: false
|
case 'dq':
|
||||||
|
this.labelData = this.$store.state.transBefore.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'sj':
|
||||||
|
this.labelData = this.$store.state.transBefore.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'zb':
|
||||||
|
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
}
|
}
|
||||||
})
|
} else {
|
||||||
|
this.labelData = this.$store.state.transBefore.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -219,27 +275,72 @@ export default {
|
|||||||
this.closeX()
|
this.closeX()
|
||||||
this.$emit('emitState', true)
|
this.$emit('emitState', true)
|
||||||
} else {
|
} else {
|
||||||
// 循环地区名称 回调一个计算后的数组
|
let dataStrArr = null
|
||||||
|
switch (this.$store.state.SelecttDimension.col) {
|
||||||
let dataStrArr = this.$store.state.transBefore.termsName.map((item, index) => {//外层
|
case 'dq':
|
||||||
// console.log(this.$store.state.transBefore.transBeforeTermsData[index])
|
// 循环地区名称 回调一个计算后的数组
|
||||||
// 定义拼接计算的字符串
|
dataStrArr = this.$store.state.transBefore.areaName.map((item, index) => {//外层
|
||||||
let comStr = ''
|
// console.log(this.$store.state.transBefore.transBeforeAreaData[index])
|
||||||
newArrat.forEach((list, key) => {
|
// 定义拼接计算的字符串
|
||||||
if (this.$store.state.transBefore.termsName.indexOf(list) !== -1) {
|
let comStr = ''
|
||||||
comStr += this.$store.state.transBefore.transBeforeTermsData[index][this.$store.state.transBefore.termsName.indexOf(list)]
|
newArrat.forEach((list, key) => {
|
||||||
} else {
|
if (this.$store.state.transBefore.areaName.indexOf(list) !== -1) {
|
||||||
comStr += list
|
comStr += this.$store.state.transBefore.transBeforeAreaData[index][this.$store.state.transBefore.areaName.indexOf(list)]
|
||||||
}
|
} else {
|
||||||
})
|
comStr += list
|
||||||
// console.log(comStr)
|
}
|
||||||
// console.log(eval(comStr))
|
})
|
||||||
return eval(comStr).toString()
|
// console.log(comStr)
|
||||||
})
|
// console.log(eval(comStr))
|
||||||
|
return eval(comStr).toString()
|
||||||
|
})
|
||||||
|
// 将处理完的数据放到全局变量中
|
||||||
|
this.$store.state.transBefore.areaName.push(this.insertName)
|
||||||
|
break
|
||||||
|
case 'sj':
|
||||||
|
// 循环地区名称 回调一个计算后的数组
|
||||||
|
dataStrArr = this.$store.state.transBefore.timeArr.map((item, index) => {//外层
|
||||||
|
// console.log(this.$store.state.transBefore.transBeforeAreaData[index])
|
||||||
|
// 定义拼接计算的字符串
|
||||||
|
let comStr = ''
|
||||||
|
newArrat.forEach((list, key) => {
|
||||||
|
if (this.$store.state.transBefore.timeArr.indexOf(list) !== -1) {
|
||||||
|
comStr += this.$store.state.transBefore.transBeforeAreaData[index][this.$store.state.transBefore.timeArr.indexOf(list)]
|
||||||
|
} else {
|
||||||
|
comStr += list
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(comStr)
|
||||||
|
// console.log(eval(comStr))
|
||||||
|
return eval(comStr).toString()
|
||||||
|
})
|
||||||
|
// 将处理完的数据放到全局变量中
|
||||||
|
this.$store.state.transBefore.timeArr.push(this.insertName)
|
||||||
|
break
|
||||||
|
case 'zb':
|
||||||
|
// 循环地区名称 回调一个计算后的数组
|
||||||
|
dataStrArr = this.$store.state.transBefore.termsName.map((item, index) => {//外层
|
||||||
|
// console.log(this.$store.state.transBefore.transBeforeAreaData[index])
|
||||||
|
// 定义拼接计算的字符串
|
||||||
|
let comStr = ''
|
||||||
|
newArrat.forEach((list, key) => {
|
||||||
|
if (this.$store.state.transBefore.termsName.indexOf(list) !== -1) {
|
||||||
|
comStr += this.$store.state.transBefore.transBeforeAreaData[index][this.$store.state.transBefore.termsName.indexOf(list)]
|
||||||
|
} else {
|
||||||
|
comStr += list
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(comStr)
|
||||||
|
// console.log(eval(comStr))
|
||||||
|
return eval(comStr).toString()
|
||||||
|
})
|
||||||
|
// 将处理完的数据放到全局变量中
|
||||||
|
this.$store.state.transBefore.termsName.push(this.insertName)
|
||||||
|
this.$store.state.transBefore.termsExplain.push('')
|
||||||
|
break
|
||||||
|
}
|
||||||
// 将处理完的数据放到全局变量中
|
// 将处理完的数据放到全局变量中
|
||||||
this.$store.state.transBefore.termsName.push(this.insertName)
|
this.$store.state.transBefore.transBeforeAreaData.push(dataStrArr)
|
||||||
this.$store.state.transBefore.termsExplain.push('')
|
|
||||||
this.$store.state.transBefore.transBeforeTermsData.push(dataStrArr)
|
|
||||||
this.closeX()
|
this.closeX()
|
||||||
this.$emit('emitState', true)
|
this.$emit('emitState', true)
|
||||||
}
|
}
|
||||||
@@ -285,8 +386,8 @@ export default {
|
|||||||
this.closeX()
|
this.closeX()
|
||||||
this.$emit('emitState', true)
|
this.$emit('emitState', true)
|
||||||
} else {
|
} else {
|
||||||
// console.log(this.$store.state.transBefore.transBeforeTermsData)
|
// console.log(this.$store.state.transBefore.transBeforeAreaData)
|
||||||
let bsfyu = this.$store.state.transBefore.transBeforeTermsData
|
let bsfyu = this.$store.state.transBefore.transBeforeAreaData
|
||||||
// 将数据进行转置
|
// 将数据进行转置
|
||||||
let datarts = bsfyu[0].map(function (col, index) {
|
let datarts = bsfyu[0].map(function (col, index) {
|
||||||
return bsfyu.map((row, key) => {
|
return bsfyu.map((row, key) => {
|
||||||
@@ -294,33 +395,98 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(datarts)
|
console.log(datarts)
|
||||||
// 循环年
|
let dataStrArr = null
|
||||||
let dataStrArr = this.$store.state.transBefore.timeArr.map((item, index) => {//外层
|
let newZz = null
|
||||||
// console.log(this.$store.state.transBefore.transBeforeTermsData[index])
|
switch (this.$store.state.SelecttDimension.row) {
|
||||||
// 定义拼接计算的字符串
|
case 'dq':
|
||||||
let comStr = ''
|
// 循环年
|
||||||
newArrat.forEach((list, key) => {
|
dataStrArr = this.$store.state.transBefore.areaName.map((item, index) => {//外层
|
||||||
if (this.$store.state.transBefore.timeArr.indexOf(list) !== -1) {
|
// console.log(this.$store.state.transBefore.transBeforeAreaData[index])
|
||||||
comStr += datarts[index][this.$store.state.transBefore.timeArr.indexOf(list)]
|
// 定义拼接计算的字符串
|
||||||
} else {
|
let comStr = ''
|
||||||
comStr += list
|
newArrat.forEach((list, key) => {
|
||||||
}
|
if (this.$store.state.transBefore.areaName.indexOf(list) !== -1) {
|
||||||
})
|
comStr += datarts[index][this.$store.state.transBefore.areaName.indexOf(list)]
|
||||||
// console.log(comStr)
|
} else {
|
||||||
// console.log(eval(comStr))
|
comStr += list
|
||||||
return eval(comStr).toString()
|
}
|
||||||
})
|
})
|
||||||
console.log(dataStrArr, '101025')
|
// console.log(comStr)
|
||||||
datarts.push(dataStrArr)
|
// console.log(eval(comStr))
|
||||||
// 将数据转置回来
|
return eval(comStr).toString()
|
||||||
let newZz = datarts[0].map(function (col, index) {
|
})
|
||||||
return datarts.map((row, key) => {
|
console.log(dataStrArr, '101025')
|
||||||
return row[index]
|
datarts.push(dataStrArr)
|
||||||
})
|
// 将数据转置回来
|
||||||
})
|
newZz = datarts[0].map(function (col, index) {
|
||||||
|
return datarts.map((row, key) => {
|
||||||
|
return row[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 将处理完的数据放到全局变量中
|
||||||
|
this.$store.state.transBefore.areaName.push(this.insertName)
|
||||||
|
break
|
||||||
|
case 'sj':
|
||||||
|
// 循环年
|
||||||
|
dataStrArr = this.$store.state.transBefore.timeArr.map((item, index) => {//外层
|
||||||
|
// console.log(this.$store.state.transBefore.transBeforeAreaData[index])
|
||||||
|
// 定义拼接计算的字符串
|
||||||
|
let comStr = ''
|
||||||
|
newArrat.forEach((list, key) => {
|
||||||
|
if (this.$store.state.transBefore.timeArr.indexOf(list) !== -1) {
|
||||||
|
comStr += datarts[index][this.$store.state.transBefore.timeArr.indexOf(list)]
|
||||||
|
} else {
|
||||||
|
comStr += list
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(comStr)
|
||||||
|
// console.log(eval(comStr))
|
||||||
|
return eval(comStr).toString()
|
||||||
|
})
|
||||||
|
console.log(dataStrArr, '101025')
|
||||||
|
datarts.push(dataStrArr)
|
||||||
|
// 将数据转置回来
|
||||||
|
newZz = datarts[0].map(function (col, index) {
|
||||||
|
return datarts.map((row, key) => {
|
||||||
|
return row[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 将处理完的数据放到全局变量中
|
||||||
|
this.$store.state.transBefore.timeArr.push(this.insertName)
|
||||||
|
break
|
||||||
|
case 'zb':
|
||||||
|
// 循环年
|
||||||
|
dataStrArr = this.$store.state.transBefore.termsName.map((item, index) => {//外层
|
||||||
|
// console.log(this.$store.state.transBefore.transBeforeAreaData[index])
|
||||||
|
// 定义拼接计算的字符串
|
||||||
|
let comStr = ''
|
||||||
|
newArrat.forEach((list, key) => {
|
||||||
|
if (this.$store.state.transBefore.termsName.indexOf(list) !== -1) {
|
||||||
|
comStr += datarts[index][this.$store.state.transBefore.termsName.indexOf(list)]
|
||||||
|
} else {
|
||||||
|
comStr += list
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(comStr)
|
||||||
|
// console.log(eval(comStr))
|
||||||
|
return eval(comStr).toString()
|
||||||
|
})
|
||||||
|
console.log(dataStrArr, '101025')
|
||||||
|
datarts.push(dataStrArr)
|
||||||
|
// 将数据转置回来
|
||||||
|
newZz = datarts[0].map(function (col, index) {
|
||||||
|
return datarts.map((row, key) => {
|
||||||
|
return row[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 将处理完的数据放到全局变量中
|
||||||
|
this.$store.state.transBefore.termsName.push(this.insertName)
|
||||||
|
this.$store.state.transBefore.termsExplain.push('')
|
||||||
|
break
|
||||||
|
}
|
||||||
// 将处理完的数据放到全局变量中
|
// 将处理完的数据放到全局变量中
|
||||||
this.$store.state.transBefore.timeArr.push(this.insertName)
|
// this.$store.state.transBefore.timeArr.push(this.insertName)
|
||||||
this.$store.state.transBefore.transBeforeTermsData = newZz
|
this.$store.state.transBefore.transBeforeAreaData = newZz
|
||||||
this.closeX()
|
this.closeX()
|
||||||
this.$emit('emitState', true)
|
this.$emit('emitState', true)
|
||||||
}
|
}
|
||||||
@@ -335,7 +501,49 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
// 行列新增渲染
|
// 行列新增渲染
|
||||||
if (this.$route.query.type === 'area') {
|
if (this.$route.query.type === 'area') {
|
||||||
this.labelData = this.$store.state.transBefore.areaName
|
if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
this.labelData = this.$store.state.transBefore.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
this.labelData = this.$store.state.transBefore.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||||
|
this.labelData = this.$store.state.transBefore.timeArr.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
|
||||||
|
this.labelData = this.$store.state.transBefore.areaName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||||
|
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
|
return {
|
||||||
|
text: item,
|
||||||
|
state: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
this.labelData = this.$store.state.transBefore.termsName.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,47 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mapData">
|
<div class="mapData">
|
||||||
<div class="mapDataLeft" v-if="leftDafrt">
|
<div class="mapDataLeft" v-if="leftDafrt">
|
||||||
<div>指标名称</div>
|
<div v-if="leftDafrt.length!==0">指标名称</div>
|
||||||
<!-- 指标名称 -->
|
<!-- 指标名称 -->
|
||||||
<div
|
<div
|
||||||
v-for="(item,index) in leftDafrt"
|
v-for="(item,index) in leftDafrt"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="{bgcolor:item.state}"
|
:class="{bgcolor:item.state}"
|
||||||
|
@click="trickChange(index)"
|
||||||
>{{item.name}}</div>
|
>{{item.name}}</div>
|
||||||
|
<div style="margin:0 auto;color:#8fa3ae;font-size:1.375rem;" v-if="leftDafrt.length===0">暂无指标名</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mapDataRight">
|
<div class="mapDataRight">
|
||||||
<div class="maptopSty">
|
<div class="maptopSty">
|
||||||
<!-- 年 -->
|
<!-- 年 -->
|
||||||
<div class="yearD">
|
<div class="yearD">
|
||||||
<cityPicker
|
<el-cascader v-model="value" :options="options" @change="handleChange"></el-cascader>
|
||||||
:level="jishuTime"
|
|
||||||
:selectpattern="selectpatternTime"
|
|
||||||
:city-data="cityDataTime"
|
|
||||||
:default-city="cityDefaultNameTime"
|
|
||||||
@choice-caller="choiceCallerTime"
|
|
||||||
@visible-change="changesInputStu"
|
|
||||||
></cityPicker>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 月 -->
|
<!-- 月 -->
|
||||||
<!-- 季 -->
|
<!-- 季 -->
|
||||||
<div class="monthD">
|
<!-- <div style="margin:0 auto;color:#8fa3ae;font-size:1.375rem;">该指标下暂无数据</div> -->
|
||||||
<cityPicker
|
|
||||||
:level="jishuTime"
|
|
||||||
:selectpattern="selectMonth"
|
|
||||||
:city-data="monthDatas"
|
|
||||||
:default-city="monthData"
|
|
||||||
@choice-caller="monthDataState"
|
|
||||||
@visible-change="monthDataChange"
|
|
||||||
></cityPicker>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div ref="mapRefs"></div>
|
<div ref="mapRefs"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// 引入下拉组件
|
|
||||||
import cityPicker from '@/components/cityPicker/CityPicker.vue'
|
|
||||||
// 引入数据计算js用于机选渲染的数据
|
// 引入数据计算js用于机选渲染的数据
|
||||||
// import ComputedData from '../../assets/js/computeddata'
|
// import ComputedData from '../../assets/js/computeddata'
|
||||||
import china from 'echarts/map/json/china.json'
|
import china from 'echarts/map/json/china.json'
|
||||||
@@ -51,9 +35,6 @@ echarts.registerMap('china', china)
|
|||||||
require('echarts/theme/shine')
|
require('echarts/theme/shine')
|
||||||
export default {
|
export default {
|
||||||
name: 'mapData',
|
name: 'mapData',
|
||||||
components: {
|
|
||||||
cityPicker: cityPicker
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
// 控制下拉框显示隐藏
|
// 控制下拉框显示隐藏
|
||||||
@@ -157,12 +138,12 @@ export default {
|
|||||||
// 栏目级数
|
// 栏目级数
|
||||||
jishuTime: 1,
|
jishuTime: 1,
|
||||||
// 默认显示栏目
|
// 默认显示栏目
|
||||||
cityDefaultNameTime: '2019年',
|
cityDefaultNameTime: '',
|
||||||
// 筛选数据
|
// 筛选数据
|
||||||
selectpatternTime: [
|
selectpatternTime: [
|
||||||
{
|
{
|
||||||
field: 'userProvinceId',
|
field: 'userProvinceId',
|
||||||
placeholder: '2019年'
|
placeholder: '2019'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 栏目数据 结构不可变
|
// 栏目数据 结构不可变
|
||||||
@@ -189,7 +170,16 @@ export default {
|
|||||||
{ 'id': '110000', 'name': '4月', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' }
|
{ 'id': '110000', 'name': '4月', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' }
|
||||||
],
|
],
|
||||||
// 左侧数据
|
// 左侧数据
|
||||||
leftDafrt: null
|
leftDafrt: null,
|
||||||
|
// 总的地图数据
|
||||||
|
AllMapCount: null,
|
||||||
|
value: [],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: 'zhinan',
|
||||||
|
label: '指南'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -199,7 +189,8 @@ export default {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'data/data/list',
|
url: 'data/data/list',
|
||||||
params: {
|
params: {
|
||||||
type: this.$route.query.type
|
type: this.$route.query.type === 'area' ? 2 : 1,
|
||||||
|
f: this.$store.state.selectDataLeft.f
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, '左侧菜单')
|
console.log(res, '左侧菜单')
|
||||||
@@ -279,8 +270,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 被选中时触发
|
// 被选中时触发
|
||||||
choiceCallerTime (resu) {
|
choiceCallerTime (resu) {
|
||||||
console.log(resu)
|
console.log(resu, 1011111)
|
||||||
console.log(this.cityDefaultName)
|
// this.option.series[0].data = this.AllMapCount[resu[0]]
|
||||||
|
// this.showMapData()
|
||||||
},
|
},
|
||||||
changesInputStu () {
|
changesInputStu () {
|
||||||
console.log(12569)
|
console.log(12569)
|
||||||
@@ -294,7 +286,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 地图左侧指标名称显示
|
// 地图左侧指标名称显示
|
||||||
searchDataMap () {
|
searchDataMap () {
|
||||||
console.log(this.$store.state.selectDataLeft.id)
|
console.log(this.$store.state.selectDataLeft, '10111110')
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'data/data/quota',
|
url: 'data/data/quota',
|
||||||
@@ -343,15 +335,48 @@ export default {
|
|||||||
console.log(res, '数据地图数据')
|
console.log(res, '数据地图数据')
|
||||||
// 请求接口完成 请求成功
|
// 请求接口完成 请求成功
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log()
|
console.log(res.data.data.list, 'Object.values(res.data.data.list)')
|
||||||
this.option.legend.data = [this.leftDafrt.find((item, index) => { return item.state === true }).name]
|
this.option.legend.data = [this.leftDafrt.find((item, index) => { return item.state === true }).name]
|
||||||
this.option.series[0].name = [this.leftDafrt.find((item, index) => { return item.state === true }).name]
|
this.option.series[0].name = [this.leftDafrt.find((item, index) => { return item.state === true }).name]
|
||||||
this.option.series[0].data = res.data.data.list
|
this.AllMapCount = res.data.data.list
|
||||||
|
this.cityDataTime = this.monthDatas
|
||||||
|
// 筛选的数据
|
||||||
|
this.cityDataTime = Object.keys(res.data.data.list).map((item, index) => {
|
||||||
|
return { 'id': '110000', 'name': item, 'parentId': '100000', 'shortName': '北京', 'cityCode': '' }
|
||||||
|
})
|
||||||
|
this.cityDefaultNameTime = this.cityDataTime[0].name
|
||||||
|
this.selectpatternTime[0].placeholder = this.cityDataTime[0].name
|
||||||
|
console.log(this.cityDataTime)
|
||||||
|
this.options = Object.keys(res.data.data.list).map((item, index) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
label: item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.value = [this.options[0].value]
|
||||||
|
this.option.series[0].data = this.AllMapCount[this.options[0].value]
|
||||||
this.showMapData()
|
this.showMapData()
|
||||||
|
// this.option.series[0].data = Object.values(res.data.data.list)
|
||||||
|
// this.showMapData()
|
||||||
}
|
}
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail)
|
console.log(fail)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 点击改变指标名称
|
||||||
|
trickChange (ind) {
|
||||||
|
this.leftDafrt.forEach((item, index) => {
|
||||||
|
index === ind ? item.state = true : item.state = false
|
||||||
|
})
|
||||||
|
this.getLabelDatart()
|
||||||
|
// this.showMapData()
|
||||||
|
},
|
||||||
|
// 选中
|
||||||
|
handleChange (value) {
|
||||||
|
console.log(value)
|
||||||
|
console.log(this.value, 'this.value')
|
||||||
|
this.option.series[0].data = this.AllMapCount[value[0]]
|
||||||
|
this.showMapData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -363,6 +388,7 @@ export default {
|
|||||||
// this.showMapData()
|
// this.showMapData()
|
||||||
// 查询左侧数据
|
// 查询左侧数据
|
||||||
// this.searchDataMap()
|
// this.searchDataMap()
|
||||||
|
this.cityDataTime = this.monthDatas
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -396,6 +422,9 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 1.375rem;
|
font-size: 1.375rem;
|
||||||
}
|
}
|
||||||
|
& > div:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
& > div:nth-child(1) {
|
& > div:nth-child(1) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -111,6 +111,11 @@ export default {
|
|||||||
imgIdentify: null
|
imgIdentify: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
$auth (newVal, oldVal) {
|
||||||
|
console.log(newVal, '$auth$auth$auth$auth')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
navClick (indexs, url) {
|
navClick (indexs, url) {
|
||||||
if (indexs !== 1) {
|
if (indexs !== 1) {
|
||||||
@@ -148,6 +153,7 @@ export default {
|
|||||||
},
|
},
|
||||||
loginWindow () {
|
loginWindow () {
|
||||||
this.showWinStatic = true
|
this.showWinStatic = true
|
||||||
|
this.$auth.auth = true
|
||||||
this.get_identity()
|
this.get_identity()
|
||||||
},
|
},
|
||||||
// 关闭登录窗口
|
// 关闭登录窗口
|
||||||
@@ -177,11 +183,13 @@ export default {
|
|||||||
alert(res.data.message)
|
alert(res.data.message)
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
this.showWinStatic = !this.showWinStatic
|
this.showWinStatic = !this.showWinStatic
|
||||||
|
this.$auth.auth = this.showWinStatic
|
||||||
// 用户信息存本地
|
// 用户信息存本地
|
||||||
localStorage.setItem('username', res.data.data.username)
|
localStorage.setItem('username', res.data.data.username)
|
||||||
localStorage.setItem('pic', res.data.data.pic)
|
localStorage.setItem('pic', res.data.data.pic)
|
||||||
localStorage.setItem('userPwd', this.userpwd)
|
localStorage.setItem('userPwd', this.userpwd)
|
||||||
localStorage.setItem('token', 'Bearer ' + res.data.data.token)
|
localStorage.setItem('token', 'Bearer ' + res.data.data.token)
|
||||||
|
localStorage.setItem('tokenB', res.data.data.token)
|
||||||
// 登录状态
|
// 登录状态
|
||||||
localStorage.setItem('userLogin', true)
|
localStorage.setItem('userLogin', true)
|
||||||
console.log(this.$route, '000111')
|
console.log(this.$route, '000111')
|
||||||
@@ -196,7 +204,9 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
console.log(!this.showWinStatic, 'this.showWinStatic')
|
||||||
this.showWinStatic = !this.showWinStatic
|
this.showWinStatic = !this.showWinStatic
|
||||||
|
this.$auth.auth = this.showWinStatic
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取验证码图片及内容
|
// 获取验证码图片及内容
|
||||||
@@ -212,6 +222,7 @@ export default {
|
|||||||
},
|
},
|
||||||
regirest () {
|
regirest () {
|
||||||
this.showWinStatic = !this.showWinStatic
|
this.showWinStatic = !this.showWinStatic
|
||||||
|
this.$auth.auth = this.showWinStatic
|
||||||
this.$router.push({ path: '/register' })
|
this.$router.push({ path: '/register' })
|
||||||
},
|
},
|
||||||
// 跳到数据页面
|
// 跳到数据页面
|
||||||
@@ -248,13 +259,19 @@ export default {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'member/index/logout',
|
url: 'member/index/logout',
|
||||||
params: {
|
params: {
|
||||||
'access-token': localStorage.getItem('token')
|
'access-token': localStorage.getItem('tokenB')
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
alert(res.data.message)
|
alert(res.data.message)
|
||||||
// 请求接口完成注册 请求成功
|
// 请求接口完成注册 请求成功
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
|
console.log(this.$route.path, 'this.$router.path')
|
||||||
|
if (this.$route.path !== '/') {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/'
|
||||||
|
})
|
||||||
|
}
|
||||||
localStorage.clear()
|
localStorage.clear()
|
||||||
this.$router.go(0)
|
this.$router.go(0)
|
||||||
}
|
}
|
||||||
@@ -270,10 +287,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
let that = this
|
||||||
this.userLogin = localStorage.getItem('userLogin')
|
this.userLogin = localStorage.getItem('userLogin')
|
||||||
this.userName = localStorage.getItem('username')
|
this.userName = localStorage.getItem('username')
|
||||||
this.userPic = localStorage.getItem('pic')
|
this.userPic = localStorage.getItem('pic')
|
||||||
|
// 监听对象的变化
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(this.$auth, 'auth', {
|
||||||
|
set: function (newVal) {
|
||||||
|
console.log(newVal, 'newValnewValnewVal')
|
||||||
|
that.showWinStatic = newVal
|
||||||
|
that.get_identity()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
306
src/components/noAreaDimension/NoAreaDimension.vue
Normal file
306
src/components/noAreaDimension/NoAreaDimension.vue
Normal file
@@ -0,0 +1,306 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dimension">
|
||||||
|
<div class="container">
|
||||||
|
<div class="top">
|
||||||
|
<span>维度转换</span>
|
||||||
|
<!--地区-->
|
||||||
|
<img :src="imgUrl" alt @click="$store.state.noAreadimensionState = false" />
|
||||||
|
</div>
|
||||||
|
<div class="main">
|
||||||
|
<div class="row">
|
||||||
|
<div></div>
|
||||||
|
<div class="row_main">
|
||||||
|
<div :class="{active:rowVal==='指标'}" @click="changeTabel('指标','row')">指标</div>
|
||||||
|
<div :class="{active:rowVal==='时间'}" @click="changeTabel('时间','row')">时间</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="row_main">
|
||||||
|
<div :class="{active:colVal==='指标'}" @click="changeTabel('指标','col')">指标</div>
|
||||||
|
<div :class="{active:colVal==='时间'}" @click="changeTabel('时间','col')">时间</div>
|
||||||
|
</div>
|
||||||
|
<div class="tabel">
|
||||||
|
<div>
|
||||||
|
<div>{{rowVal}}</div>
|
||||||
|
<div>{{colVal}}</div>
|
||||||
|
<div>{{colVal}}</div>
|
||||||
|
<div>{{colVal}}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>{{rowVal}}</div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>{{rowVal}}</div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>{{rowVal}}</div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bottom">
|
||||||
|
<div @click="trueChange()">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'dimension',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
imgUrl: require('../../../static/nav/deleteImg.png'),
|
||||||
|
rowVal: '指标',
|
||||||
|
colVal: '时间',
|
||||||
|
arrValue: {
|
||||||
|
'指标': 'zb',
|
||||||
|
'时间': 'sj'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeTabel (stateSD, strd) {
|
||||||
|
if (strd === 'row') {
|
||||||
|
this.rowVal = stateSD
|
||||||
|
} else if (strd === 'col') {
|
||||||
|
this.colVal = stateSD
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 维度转换默认
|
||||||
|
change3D () {
|
||||||
|
if (this.$store.state.transState) {
|
||||||
|
if (this.$route.query.type !== 'area') {
|
||||||
|
this.rowVal = '指标'
|
||||||
|
this.colVal = '时间'
|
||||||
|
} else {
|
||||||
|
this.rowVal = '地区'
|
||||||
|
this.colVal = '时间'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.$route.query.type !== 'area') {
|
||||||
|
this.rowVal = '时间'
|
||||||
|
this.colVal = '指标'
|
||||||
|
} else {
|
||||||
|
this.rowVal = '时间'
|
||||||
|
this.colVal = '地区'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 确定维度转换
|
||||||
|
trueChange () {
|
||||||
|
if (this.rowVal === this.colVal) {
|
||||||
|
alert('维度转换格式错误!行列相同')
|
||||||
|
} else if (this.$store.state.SelecttDimension.col === this.arrValue[this.rowVal]) {
|
||||||
|
this.$store.state.noAreadimensionState = false
|
||||||
|
} else {
|
||||||
|
// 告诉父组件转置
|
||||||
|
this.$emit('changeSetZZ', true)
|
||||||
|
this.$store.state.SelecttDimension.col = this.arrValue[this.rowVal]
|
||||||
|
this.$store.state.SelecttDimension.row = this.arrValue[this.colVal]
|
||||||
|
this.$store.state.noAreadimensionState = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.change3D()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.dimension {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 10;
|
||||||
|
& > .container {
|
||||||
|
width: 64.375rem;
|
||||||
|
height: 33rem;
|
||||||
|
background-color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
& > .top {
|
||||||
|
margin-top: 1rem;
|
||||||
|
width: 59.375rem;
|
||||||
|
height: 3.875rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 0.125rem solid #bdbdbd;
|
||||||
|
font-size: 1.375rem;
|
||||||
|
font-weight: normal;
|
||||||
|
font-stretch: normal;
|
||||||
|
letter-spacing: 0rem;
|
||||||
|
color: #333333;
|
||||||
|
& > img {
|
||||||
|
width: 1.3125rem;
|
||||||
|
height: 1.3125rem;
|
||||||
|
}
|
||||||
|
& > img:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .main {
|
||||||
|
margin-top: 2.6rem;
|
||||||
|
width: 59.375rem;
|
||||||
|
& > .row {
|
||||||
|
width: 59.375rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
& > div:nth-child(1) {
|
||||||
|
width: 5.25rem;
|
||||||
|
height: 3.125rem;
|
||||||
|
}
|
||||||
|
& > .row_main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
& > div {
|
||||||
|
width: 5.25rem;
|
||||||
|
height: 3.125rem;
|
||||||
|
background-color: #a8daf1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
& > div:nth-child(1) {
|
||||||
|
border-radius: 0.1875rem 0 0 0.1875rem;
|
||||||
|
}
|
||||||
|
& > div:nth-child(3) {
|
||||||
|
border-radius: 0 0.1875rem 0.1875rem 0;
|
||||||
|
}
|
||||||
|
& > .active {
|
||||||
|
background-color: #52b6e3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > div:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .col {
|
||||||
|
width: 59.375rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-start;
|
||||||
|
& > .row_main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
& > div {
|
||||||
|
width: 5.25rem;
|
||||||
|
height: 3.125rem;
|
||||||
|
background-color: #a8daf1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
& > div:nth-child(1) {
|
||||||
|
border-radius: 0.1875rem 0 0 0.1875rem;
|
||||||
|
}
|
||||||
|
& > div:nth-child(3) {
|
||||||
|
border-radius: 0 0.1875rem 0.1875rem 0;
|
||||||
|
}
|
||||||
|
& > .active {
|
||||||
|
background-color: #52b6e3;
|
||||||
|
}
|
||||||
|
& > div:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .tabel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: flex-start;
|
||||||
|
& > div {
|
||||||
|
height: 2.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
& > div {
|
||||||
|
height: 2.5rem;
|
||||||
|
width: 13.265rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .bottom {
|
||||||
|
width: 59.375rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
& > div:nth-child(1) {
|
||||||
|
width: 15.625rem;
|
||||||
|
height: 3.1875rem;
|
||||||
|
background-color: #52b6e3;
|
||||||
|
border-radius: 0.3125rem;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: normal;
|
||||||
|
font-stretch: normal;
|
||||||
|
letter-spacing: 0rem;
|
||||||
|
color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
& > div:nth-child(2) {
|
||||||
|
width: 15.625rem;
|
||||||
|
height: 3.1875rem;
|
||||||
|
border: solid 0.125rem #dbdbdb;
|
||||||
|
border-radius: 0.3125rem;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: normal;
|
||||||
|
font-stretch: normal;
|
||||||
|
letter-spacing: 0rem;
|
||||||
|
color: #666666;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
& > div {
|
||||||
|
margin: 3rem 1.2rem;
|
||||||
|
}
|
||||||
|
& > div:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="kuang">
|
<div class="kuang">
|
||||||
<input type="text" v-model="searchContext" placeholder="全站搜索" @keyup.enter="blurUpset" />
|
<input type="text" v-model="searchContext" placeholder="全站搜索" @keyup.enter="blurUpset" />
|
||||||
<img :src="imgUrl.search" alt />
|
<img :src="imgUrl.search" alt @click="blurUpset" />
|
||||||
</div>
|
</div>
|
||||||
<div class="tjHold">
|
<div class="tjHold">
|
||||||
统计热词
|
统计热词
|
||||||
@@ -29,6 +29,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
blurUpset (textCont) {
|
blurUpset (textCont) {
|
||||||
console.log(textCont, '3523')
|
console.log(textCont, '3523')
|
||||||
|
if (this.searchContext === '') {
|
||||||
|
alert('搜索词不能为空!')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (this.$route.path === '/searchList') {
|
if (this.$route.path === '/searchList') {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/'
|
path: '/'
|
||||||
|
|||||||
16
src/main.js
16
src/main.js
@@ -70,11 +70,13 @@ axios.interceptors.request.use(config => {
|
|||||||
// 返回拦截器(后)
|
// 返回拦截器(后)
|
||||||
axios.interceptors.response.use(data => {
|
axios.interceptors.response.use(data => {
|
||||||
// console.log(localStorage.getItem('token'))
|
// console.log(localStorage.getItem('token'))
|
||||||
if (localStorage.getItem('token') !== null && data.data.code === 401) {
|
if (localStorage.getItem('token') && data.data.code === 403) {
|
||||||
alert('您没有该账号的登陆权限,请重新登录后再次操作!')
|
alert('您没有查看此分类下数据的权限!')
|
||||||
localStorage.clear()
|
|
||||||
window.location.reload()
|
|
||||||
}
|
}
|
||||||
|
// let daraRes = []
|
||||||
|
// if(data.data.code===200){
|
||||||
|
// daraRes===
|
||||||
|
// }
|
||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
// IP端
|
// IP端
|
||||||
@@ -93,8 +95,10 @@ axios({
|
|||||||
localStorage.setItem('pic', res.data.data.pic)
|
localStorage.setItem('pic', res.data.data.pic)
|
||||||
localStorage.setItem('userPwd', '123456')
|
localStorage.setItem('userPwd', '123456')
|
||||||
localStorage.setItem('token', 'Bearer ' + res.data.data.token)
|
localStorage.setItem('token', 'Bearer ' + res.data.data.token)
|
||||||
|
localStorage.setItem('tokenB', res.data.data.token)
|
||||||
// 登录状态
|
// 登录状态
|
||||||
localStorage.setItem('userLogin', true)
|
localStorage.setItem('userLogin', true)
|
||||||
|
Vue.prototype.$auth = true
|
||||||
}
|
}
|
||||||
// 请求接口完成 请求成功
|
// 请求接口完成 请求成功
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
@@ -105,6 +109,10 @@ Vue.prototype.$identify = identify.default
|
|||||||
Vue.prototype.$axios = axios
|
Vue.prototype.$axios = axios
|
||||||
// 引入设置dom元素高度的插件
|
// 引入设置dom元素高度的插件
|
||||||
Vue.prototype.$detector = require('element-resize-detector')
|
Vue.prototype.$detector = require('element-resize-detector')
|
||||||
|
// vue人员权限
|
||||||
|
Vue.prototype.$auth = {
|
||||||
|
auth: false
|
||||||
|
}
|
||||||
|
|
||||||
Vue.use(VueAwesomeSwiper)
|
Vue.use(VueAwesomeSwiper)
|
||||||
Vue.use(ElementUI)
|
Vue.use(ElementUI)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import cs from '@/views/cs.vue'
|
|||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
export default new Router({
|
let RouterObj = new Router({
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
base: process.env.BASE_URL,
|
base: process.env.BASE_URL,
|
||||||
routes: [{
|
routes: [{
|
||||||
@@ -105,3 +105,23 @@ export default new Router({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
RouterObj.beforeEach((to, from, next) => {
|
||||||
|
console.log(to, 'to')
|
||||||
|
if (to.name === 'personalCenter' || to.name === 'datasweb') {
|
||||||
|
console.log(localStorage.getItem('token'), 'localStorage.getItem()')
|
||||||
|
if (!localStorage.getItem('token')) {
|
||||||
|
alert('您没有该账号的登陆权限,请重新登录后再次操作!')
|
||||||
|
// 权限通过时赋值
|
||||||
|
console.log(Vue.prototype.$auth, 'Vue.prototype.$auth')
|
||||||
|
Vue.prototype.$auth.auth = true
|
||||||
|
console.log(Vue.prototype.$auth, 'Vue.prototype.$auth')
|
||||||
|
// localStorage.clear()
|
||||||
|
// window.location.reload()
|
||||||
|
} else {
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
export default RouterObj
|
||||||
|
|||||||
22
src/store.js
22
src/store.js
@@ -53,8 +53,26 @@ export default new Vuex.Store({
|
|||||||
// 下拉筛选条件
|
// 下拉筛选条件
|
||||||
selectData: null,
|
selectData: null,
|
||||||
// 转置状态
|
// 转置状态
|
||||||
transState: true
|
transState: true,
|
||||||
|
// 非地区维度转换
|
||||||
|
noAreadimensionState: false,
|
||||||
|
// 高级查询状态
|
||||||
|
advancedSearchState: false,
|
||||||
|
// 定义一个局的指标与地区互换的数据组
|
||||||
|
labelArea: null,
|
||||||
|
// 地区数据总数据
|
||||||
|
AreaAllCountData: null,
|
||||||
|
// 地区数据维度转换状态
|
||||||
|
areaDimensionState: false,
|
||||||
|
// 当前维度转换没有被选中的维度标记
|
||||||
|
noSelecttDimension: 'zb',
|
||||||
|
// 当前维度转换选中的
|
||||||
|
SelecttDimension: {
|
||||||
|
row: 'sj',
|
||||||
|
col: 'dq'
|
||||||
|
},
|
||||||
|
// 左侧当前展开
|
||||||
|
openOpenLeft: null
|
||||||
},
|
},
|
||||||
mutations: {},
|
mutations: {},
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
@@ -71,6 +71,14 @@ export default {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
this.axios.all([
|
||||||
|
this.axios({ url: '', method: 'GET', params: {} }),
|
||||||
|
this.axios({ url: '', method: 'POST', data: {} })
|
||||||
|
]).then(
|
||||||
|
this.axios.spread((res1, res2) => {
|
||||||
|
console.log(res1, res2)
|
||||||
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,40 +117,44 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-openeds="defaultSelectLies"
|
:default-openeds="defaultSelectLies"
|
||||||
class="el-menu-vertical-demo"
|
|
||||||
@open="handleOpen"
|
@open="handleOpen"
|
||||||
@close="handleClose"
|
@close="handleClose"
|
||||||
@select="selectActive"
|
@select="selectActive"
|
||||||
style="border:none"
|
:unique-opened="true"
|
||||||
>
|
>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="''+index1"
|
:index="''+index1"
|
||||||
v-for="(item1,index1) in leftCateData"
|
v-for="(item1,index1) in leftCateData"
|
||||||
:key="index1"
|
:key="index1"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item1.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item1.name}}</template>
|
<template slot="title">{{item1.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2"
|
:index="index1+'-'+index2"
|
||||||
v-for="(item2,index2) in item1.children"
|
v-for="(item2,index2) in item1.children"
|
||||||
:key="index2"
|
:key="index2"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item2.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item2.name}}</template>
|
<template slot="title">{{item2.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2+'-'+index3"
|
:index="index1+'-'+index2+'-'+index3"
|
||||||
v-for="(item3,index3) in item2.children"
|
v-for="(item3,index3) in item2.children"
|
||||||
:key="index3"
|
:key="index3"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item3.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item3.name}}</template>
|
<template slot="title">{{item3.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2+'-'+index3+'-'+index4"
|
:index="index1+'-'+index2+'-'+index3+'-'+index4"
|
||||||
v-for="(item4,index4) in item3.children"
|
v-for="(item4,index4) in item3.children"
|
||||||
:key="index4"
|
:key="index4"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item4.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item4.name}}</template>
|
<template slot="title">{{item4.name}}</template>
|
||||||
<el-submenu
|
<el-submenu
|
||||||
:index="index1+'-'+index2+'-'+index3+'-'+index4+'-'+index5"
|
:index="index1+'-'+index2+'-'+index3+'-'+index4+'-'+index5"
|
||||||
v-for="(item5,index5) in item4.children"
|
v-for="(item5,index5) in item4.children"
|
||||||
:key="index5"
|
:key="index5"
|
||||||
|
:style="{'background-color':$store.state.selectDataLeft.id===item5.id?'#95CEE4':''}"
|
||||||
>
|
>
|
||||||
<template slot="title">{{item5.name}}</template>
|
<template slot="title">{{item5.name}}</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
@@ -182,6 +186,14 @@
|
|||||||
v-if="$store.state.transdtr"
|
v-if="$store.state.transdtr"
|
||||||
:defaultDataRight="defaultDataRight"
|
:defaultDataRight="defaultDataRight"
|
||||||
@stateTell="stateTell"
|
@stateTell="stateTell"
|
||||||
|
@comTime="comTime"
|
||||||
|
:stateDataGetVal="stateDataGetVal"
|
||||||
|
@stateDFGHJ="stateDFGHJ"
|
||||||
|
@statertfResu="statertfResu"
|
||||||
|
:labelAreaState="labelAreaState"
|
||||||
|
:areaDimensionStateS="areaDimensionStateS"
|
||||||
|
@emmitStateAd="emmitStateAd"
|
||||||
|
:labelAreaStateks="labelAreaStateks"
|
||||||
></ChartsCut>
|
></ChartsCut>
|
||||||
<!-- 列表内容 -->
|
<!-- 列表内容 -->
|
||||||
<ChartsCont
|
<ChartsCont
|
||||||
@@ -189,10 +201,18 @@
|
|||||||
:chartsStatusMegger="chartsStatusMegger"
|
:chartsStatusMegger="chartsStatusMegger"
|
||||||
:defaultDataRight="defaultDataRight"
|
:defaultDataRight="defaultDataRight"
|
||||||
:stateTells="stateTells"
|
:stateTells="stateTells"
|
||||||
@comTime="comTime"
|
|
||||||
:statesDf="statesDf"
|
:statesDf="statesDf"
|
||||||
@tellAreadly="tellAreadly"
|
@tellAreadly="tellAreadly"
|
||||||
@prentsState="prentsState"
|
@prentsState="prentsState"
|
||||||
|
:downLaSelects="downLaSelect"
|
||||||
|
@stateDataGet="stateDataGet"
|
||||||
|
:downLaSelectArea="downLaSelectArea"
|
||||||
|
:showTableState="showTableState"
|
||||||
|
@statertyui="statertyui"
|
||||||
|
:areaDimensionStateS="areaDimensionStateS"
|
||||||
|
:advancedStates="advancedStates"
|
||||||
|
@tellParentsShowClos="tellParentsShowClos"
|
||||||
|
@tellChangeFan="tellChangeFan"
|
||||||
></ChartsCont>
|
></ChartsCont>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -240,7 +260,15 @@
|
|||||||
<!-- 添加收藏 -->
|
<!-- 添加收藏 -->
|
||||||
<AddCollect v-if="$store.state.addCollectState"></AddCollect>
|
<AddCollect v-if="$store.state.addCollectState"></AddCollect>
|
||||||
<!-- 维度转换 -->
|
<!-- 维度转换 -->
|
||||||
<Dimension v-if="$store.state.dimensionState" @changeValue="changeValue"></Dimension>
|
<!--地区-->
|
||||||
|
<Dimension
|
||||||
|
v-if="$store.state.dimensionState"
|
||||||
|
@changeValue="changeValue"
|
||||||
|
@areaDimensionState="areaDimensionState"
|
||||||
|
></Dimension>
|
||||||
|
<!-- 维度转换 -->
|
||||||
|
<!--非地区-->
|
||||||
|
<NoAreaDimension v-if="$store.state.noAreadimensionState" @changeSetZZ="changeValue"></NoAreaDimension>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -271,8 +299,10 @@ import EditCom from '@/components/editCom/EditCom.vue'
|
|||||||
import AddCollect from '@/components/addCollect/AddCollect.vue'
|
import AddCollect from '@/components/addCollect/AddCollect.vue'
|
||||||
// 指标解释
|
// 指标解释
|
||||||
import LabelExplain from '@/components/labelExplain/LabelExplain.vue'
|
import LabelExplain from '@/components/labelExplain/LabelExplain.vue'
|
||||||
// 维度转换
|
// 维度转换 地区
|
||||||
import Dimension from '@/components/dimension/Dimension.vue'
|
import Dimension from '@/components/dimension/Dimension.vue'
|
||||||
|
// 维度转换 非地区
|
||||||
|
import NoAreaDimension from '@/components/noAreaDimension/NoAreaDimension.vue'
|
||||||
// 引入数据计算js用于机选渲染的数据
|
// 引入数据计算js用于机选渲染的数据
|
||||||
import ComputedData from '../../assets/js/computeddata'
|
import ComputedData from '../../assets/js/computeddata'
|
||||||
// 引入全局的createObjectUrl用于覆盖window.URL
|
// 引入全局的createObjectUrl用于覆盖window.URL
|
||||||
@@ -294,7 +324,8 @@ export default {
|
|||||||
EditCom: EditCom,
|
EditCom: EditCom,
|
||||||
AddCollect: AddCollect,
|
AddCollect: AddCollect,
|
||||||
LabelExplain: LabelExplain,
|
LabelExplain: LabelExplain,
|
||||||
Dimension: Dimension
|
Dimension: Dimension,
|
||||||
|
NoAreaDimension: NoAreaDimension
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -402,17 +433,28 @@ export default {
|
|||||||
leftCateData: null,
|
leftCateData: null,
|
||||||
// 简单查询、高级查询、数据地图切换状态(simpleness(简单)、advanced(高级) 、map(地图))
|
// 简单查询、高级查询、数据地图切换状态(simpleness(简单)、advanced(高级) 、map(地图))
|
||||||
cutStateSeach: 'simpleness',
|
cutStateSeach: 'simpleness',
|
||||||
// 下拉筛选的数据
|
// 下拉筛选的数据时间
|
||||||
downLaSelect: {
|
downLaSelect: '',
|
||||||
area: '',
|
// 下拉筛选的数据地区
|
||||||
label: ''
|
downLaSelectArea: '',
|
||||||
},
|
|
||||||
// 新增指标状态
|
// 新增指标状态
|
||||||
statesDf: 1,
|
statesDf: 1,
|
||||||
// 数据加载状态
|
// 数据加载状态
|
||||||
stateTells: false,
|
stateTells: false,
|
||||||
// 维度转换时(若不是地区数据只进行转置操作)
|
// 维度转换时(若不是地区数据只进行转置操作)
|
||||||
changeState: false
|
changeState: false,
|
||||||
|
// 数据请求成功后的状态
|
||||||
|
stateDataGetVal: false,
|
||||||
|
// 扩展数据完成后
|
||||||
|
labelAreaState: false,
|
||||||
|
// 清除空行空列
|
||||||
|
showTableState: false,
|
||||||
|
// 地区数据维度转换状态
|
||||||
|
areaDimensionStateS: false,
|
||||||
|
// 高级查询数据渲染
|
||||||
|
advancedStates: false,
|
||||||
|
// 指标与地区互换状态
|
||||||
|
labelAreaStateks: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -425,6 +467,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 地区数据维度转换状态
|
||||||
|
areaDimensionState (val) {
|
||||||
|
this.areaDimensionStateS = !this.areaDimensionStateS
|
||||||
|
},
|
||||||
// 维度转换非地区转置
|
// 维度转换非地区转置
|
||||||
changeValue (val) {
|
changeValue (val) {
|
||||||
this.changeState = val
|
this.changeState = val
|
||||||
@@ -435,7 +481,8 @@ export default {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'data/data/list',
|
url: 'data/data/list',
|
||||||
params: {
|
params: {
|
||||||
type: this.$route.query.type
|
type: this.$route.query.type === 'area' ? 2 : 1,
|
||||||
|
f: this.$route.query.type === 'area' ? '' : this.$route.query.type
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res, '左侧菜单')
|
console.log(res, '左侧菜单')
|
||||||
@@ -465,6 +512,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleOpen (key, keyPath) {
|
handleOpen (key, keyPath) {
|
||||||
console.log(key, keyPath, '开')
|
console.log(key, keyPath, '开')
|
||||||
|
this.$store.state.openOpenLeft = keyPath
|
||||||
console.log(key.split('-'))
|
console.log(key.split('-'))
|
||||||
let datart = []
|
let datart = []
|
||||||
key.split('-').forEach((item, index) => {
|
key.split('-').forEach((item, index) => {
|
||||||
@@ -476,10 +524,11 @@ export default {
|
|||||||
})
|
})
|
||||||
console.log(datart)
|
console.log(datart)
|
||||||
this.defaultDataRight = datart
|
this.defaultDataRight = datart
|
||||||
|
this.$store.state.selectDataLeft = this.defaultDataRight
|
||||||
this.$store.state.selectfilter = this.defaultDataRight.f
|
this.$store.state.selectfilter = this.defaultDataRight.f
|
||||||
},
|
},
|
||||||
handleClose (key, keyPath) {
|
handleClose (key, keyPath) {
|
||||||
// console.log(key, keyPath)
|
console.log(key, keyPath, '关闭打印')
|
||||||
},
|
},
|
||||||
selectActive (key, keyPath) {
|
selectActive (key, keyPath) {
|
||||||
// console.log(key, keyPath)
|
// console.log(key, keyPath)
|
||||||
@@ -516,15 +565,23 @@ export default {
|
|||||||
// console.log('鼠标离开')
|
// console.log('鼠标离开')
|
||||||
},
|
},
|
||||||
clickAllCate (hierarchy, ind) {
|
clickAllCate (hierarchy, ind) {
|
||||||
|
let that = this
|
||||||
switch (ind) {
|
switch (ind) {
|
||||||
case 0:
|
case 0:
|
||||||
this.cutStateSeach = 'simpleness'
|
this.cutStateSeach = 'simpleness'
|
||||||
|
this.$store.state.advancedSearchState = false
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
this.cutStateSeach = 'advanced'
|
this.cutStateSeach = 'advanced'
|
||||||
|
this.$store.state.advancedSearchState = true
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
this.cutStateSeach = 'map'
|
if (this.$route.query.type === 'area') {
|
||||||
|
this.cutStateSeach = 'map'
|
||||||
|
} else {
|
||||||
|
alert('地图功能对非地区数据无效!')
|
||||||
|
}
|
||||||
|
this.$store.state.advancedSearchState = false
|
||||||
break
|
break
|
||||||
case 3:// 添加收藏
|
case 3:// 添加收藏
|
||||||
this.$store.state.addCollectState = true
|
this.$store.state.addCollectState = true
|
||||||
@@ -568,6 +625,10 @@ export default {
|
|||||||
case 'search':// 调接进行高级查询
|
case 'search':// 调接进行高级查询
|
||||||
// 调用接口查询高级查询的数据
|
// 调用接口查询高级查询的数据
|
||||||
console.log(this.$store.state.advanceData)
|
console.log(this.$store.state.advanceData)
|
||||||
|
if (this.$store.state.advanceData.length < 4) {
|
||||||
|
alert('筛选数据数据不能少于4条!')
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'data/data/quick',
|
url: 'data/data/quick',
|
||||||
@@ -589,7 +650,7 @@ export default {
|
|||||||
area: '',
|
area: '',
|
||||||
quota: '',
|
quota: '',
|
||||||
cate: '',
|
cate: '',
|
||||||
filter: this.$route.query.type,
|
f: this.$route.query.type,
|
||||||
date: Object.keys(res.data.data.list)[0]
|
date: Object.keys(res.data.data.list)[0]
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -597,8 +658,27 @@ export default {
|
|||||||
console.log(res, '高级查询数据展示')
|
console.log(res, '高级查询数据展示')
|
||||||
// 请求接口完成 请求成功
|
// 请求接口完成 请求成功
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
|
let transBefore = {}
|
||||||
|
transBefore.tableExplain = res.data.data.tableExplain
|
||||||
|
transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
||||||
|
transBefore.termsName = res.data.data.termsName
|
||||||
|
transBefore.termsExplain = res.data.data.termsExplain
|
||||||
|
transBefore.areaName = res.data.data.areaName
|
||||||
|
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||||
|
transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
|
||||||
|
console.log(transBefore, '000')
|
||||||
|
that.$store.state.transdtr = true
|
||||||
|
// 全局总数据
|
||||||
|
that.$store.state.transBefore = transBefore
|
||||||
|
// 全局永久不变数据
|
||||||
|
that.$store.state.noChangeData = JSON.parse(JSON.stringify(transBefore))
|
||||||
|
that.cutStateSeach = 'simpleness'
|
||||||
|
that.advancedStates = true
|
||||||
|
} else {
|
||||||
|
that.$store.state.transBefore = null
|
||||||
|
that.advancedStates = true
|
||||||
}
|
}
|
||||||
|
// 告诉子组件渲染高级查询数据
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail)
|
console.log(fail)
|
||||||
})
|
})
|
||||||
@@ -606,7 +686,6 @@ export default {
|
|||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail)
|
console.log(fail)
|
||||||
})
|
})
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -640,33 +719,101 @@ export default {
|
|||||||
this.$router.go(0)
|
this.$router.go(0)
|
||||||
break
|
break
|
||||||
case '清除空行空列':// 清除空行空列
|
case '清除空行空列':// 清除空行空列
|
||||||
this.$router.go(0)
|
// this.$router.go(0)
|
||||||
if (this.$store.state.transBefore) {
|
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
|
||||||
|
if (this.$route.query.type === 'area') {
|
||||||
// 先过滤每一行
|
// 先过滤每一行
|
||||||
this.$store.state.transBefore = this.$store.state.transBefore.filter((item, index) => {
|
let firstHang = []// 过滤掉的下标=====》地区
|
||||||
return !item.some((item, index) => {
|
this.$store.state.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData.filter((item, index) => {
|
||||||
|
if (item.every((item, index) => { return item === '' })) {
|
||||||
|
firstHang.push(index)
|
||||||
|
}
|
||||||
|
return !item.every((item, index) => {
|
||||||
return item === ''
|
return item === ''
|
||||||
}) === true
|
}) === true
|
||||||
})
|
})
|
||||||
// 在过滤每一列
|
// 在过滤每一列
|
||||||
// 行列转置
|
// 行列转置
|
||||||
this.$store.state.transBefore = this.$store.state.transBefore[0].map(function (col, index) {
|
let brrCe = this.$store.state.transBefore.transBeforeAreaData
|
||||||
return this.$store.state.transBefore.map((row, key) => {
|
this.$store.state.transBefore.transBeforeAreaData = brrCe[0].map(function (col, index) {
|
||||||
|
return brrCe.map((row, key) => {
|
||||||
return row[index]
|
return row[index]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 在过滤每一行
|
// 在过滤每一行
|
||||||
this.$store.state.transBefore = this.$store.state.transBefore.filter((item, index) => {
|
let secendHang = []// 过滤掉的下标=====》时间
|
||||||
return !item.some((item, index) => {
|
this.$store.state.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData.filter((item, index) => {
|
||||||
|
if (item.every((item, index) => { return item === '' })) {
|
||||||
|
secendHang.push(index)
|
||||||
|
}
|
||||||
|
return !item.every((item, index) => {
|
||||||
return item === ''
|
return item === ''
|
||||||
}) === true
|
}) === true
|
||||||
})
|
})
|
||||||
// 行列转置
|
// 行列转置
|
||||||
this.$store.state.transBefore = this.$store.state.transBefore[0].map(function (col, index) {
|
let arrCe = this.$store.state.transBefore.transBeforeAreaData
|
||||||
return this.$store.state.transBefore.map((row, key) => {
|
this.$store.state.transBefore.transBeforeAreaData = arrCe[0].map(function (col, index) {
|
||||||
|
return arrCe.map((row, key) => {
|
||||||
return row[index]
|
return row[index]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
// 将时间和地区名过滤掉
|
||||||
|
this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
|
||||||
|
return firstHang.indexOf(index) === -1
|
||||||
|
})
|
||||||
|
this.$store.state.transBefore.timeArr = this.$store.state.transBefore.timeArr.filter((item, index) => {
|
||||||
|
return secendHang.indexOf(index) === -1
|
||||||
|
})
|
||||||
|
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore.transBeforeAreaData')
|
||||||
|
this.showTableState = true
|
||||||
|
} else { // 非地区数据
|
||||||
|
// 先过滤每一行
|
||||||
|
let firstHang = []// 过滤掉的下标=====》地区
|
||||||
|
this.$store.state.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData.filter((item, index) => {
|
||||||
|
if (item.every((item, index) => { return item === '' })) {
|
||||||
|
firstHang.push(index)
|
||||||
|
}
|
||||||
|
return !item.every((item, index) => {
|
||||||
|
return item === ''
|
||||||
|
}) === true
|
||||||
|
})
|
||||||
|
// 在过滤每一列
|
||||||
|
// 行列转置
|
||||||
|
let brrCe = this.$store.state.transBefore.transBeforeTermsData
|
||||||
|
this.$store.state.transBefore.transBeforeTermsData = brrCe[0].map(function (col, index) {
|
||||||
|
return brrCe.map((row, key) => {
|
||||||
|
return row[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 在过滤每一行
|
||||||
|
let secendHang = []// 过滤掉的下标=====》时间
|
||||||
|
this.$store.state.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData.filter((item, index) => {
|
||||||
|
if (item.every((item, index) => { return item === '' })) {
|
||||||
|
secendHang.push(index)
|
||||||
|
}
|
||||||
|
return !item.every((item, index) => {
|
||||||
|
return item === ''
|
||||||
|
}) === true
|
||||||
|
})
|
||||||
|
// 行列转置
|
||||||
|
let arrCe = this.$store.state.transBefore.transBeforeTermsData
|
||||||
|
this.$store.state.transBefore.transBeforeTermsData = arrCe[0].map(function (col, index) {
|
||||||
|
return arrCe.map((row, key) => {
|
||||||
|
return row[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 将时间和地区名过滤掉
|
||||||
|
this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
|
||||||
|
return firstHang.indexOf(index) === -1
|
||||||
|
})
|
||||||
|
this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
|
||||||
|
return firstHang.indexOf(index) === -1
|
||||||
|
})
|
||||||
|
this.$store.state.transBefore.timeArr = this.$store.state.transBefore.timeArr.filter((item, index) => {
|
||||||
|
return secendHang.indexOf(index) === -1
|
||||||
|
})
|
||||||
|
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore.transBeforeAreaData')
|
||||||
|
this.showTableState = true
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '编辑':
|
case '编辑':
|
||||||
@@ -677,7 +824,13 @@ export default {
|
|||||||
this.$store.state.transState = this.chartsStatusMegger.transState
|
this.$store.state.transState = this.chartsStatusMegger.transState
|
||||||
break
|
break
|
||||||
case '维度转换':
|
case '维度转换':
|
||||||
this.$store.state.dimensionState = true
|
if (this.$route.query.type === 'area') {
|
||||||
|
this.$store.state.dimensionState = true
|
||||||
|
} else {
|
||||||
|
this.$store.state.noAreadimensionState = true
|
||||||
|
// this.chartsStatusMegger.transState = !this.chartsStatusMegger.transState
|
||||||
|
// this.$store.state.transState = this.chartsStatusMegger.transState
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case '保存默认':// 将分类id 和 分类数据存入本地
|
case '保存默认':// 将分类id 和 分类数据存入本地
|
||||||
// 获取本地保存数据
|
// 获取本地保存数据
|
||||||
@@ -890,10 +1043,11 @@ export default {
|
|||||||
})
|
})
|
||||||
this.defaultSelectLies = stateStatic
|
this.defaultSelectLies = stateStatic
|
||||||
console.log(this.defaultSelectLies, 'stateStatic')
|
console.log(this.defaultSelectLies, 'stateStatic')
|
||||||
|
this.$store.state.openOpenLeft = stateStatic
|
||||||
let dataDome = []
|
let dataDome = []
|
||||||
console.log(stateStatic, '数据')
|
console.log(stateStatic, '数据')
|
||||||
console.log(this.leftCateData[this.leftCateData.length - 1], '数据length-1')
|
console.log(this.leftCateData[this.leftCateData.length - 1], '数据length-1')
|
||||||
this.$store.state.selectDataLeft = this.leftCateData[this.leftCateData.length - 1]
|
|
||||||
// console.log(this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0].children[0], '1')
|
// console.log(this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0].children[0], '1')
|
||||||
if (this.leftCateData[this.leftCateData.length - 1].children !== undefined) {
|
if (this.leftCateData[this.leftCateData.length - 1].children !== undefined) {
|
||||||
if (this.leftCateData[this.leftCateData.length - 1].children[0].children !== undefined) {
|
if (this.leftCateData[this.leftCateData.length - 1].children[0].children !== undefined) {
|
||||||
@@ -913,11 +1067,13 @@ export default {
|
|||||||
dataDome = this.leftCateData[this.leftCateData.length - 1]
|
dataDome = this.leftCateData[this.leftCateData.length - 1]
|
||||||
}
|
}
|
||||||
this.defaultDataRight = dataDome
|
this.defaultDataRight = dataDome
|
||||||
|
this.$store.state.selectDataLeft = this.defaultDataRight
|
||||||
console.log(this.defaultDataRight, '1250')
|
console.log(this.defaultDataRight, '1250')
|
||||||
this.$store.state.selectfilter = this.defaultDataRight.f
|
this.$store.state.selectfilter = this.defaultDataRight.f
|
||||||
},
|
},
|
||||||
comTime (res) {
|
comTime (res) {
|
||||||
this.downLaSelect.time = res
|
console.log(res, '被选中的')
|
||||||
|
this.downLaSelect = res.indexID
|
||||||
},
|
},
|
||||||
// 接收子组件传值新增指标
|
// 接收子组件传值新增指标
|
||||||
emitStatesd (val) {
|
emitStatesd (val) {
|
||||||
@@ -940,8 +1096,37 @@ export default {
|
|||||||
// 重置参数
|
// 重置参数
|
||||||
prentsState (val) {
|
prentsState (val) {
|
||||||
this.stateTells = val
|
this.stateTells = val
|
||||||
|
this.labelAreaState = true
|
||||||
|
},
|
||||||
|
// 改变状态
|
||||||
|
stateDataGet (val) {
|
||||||
|
this.stateDataGetVal = val
|
||||||
|
},
|
||||||
|
stateDFGHJ (val) {
|
||||||
|
this.stateDataGetVal = val
|
||||||
|
this.labelAreaState = false
|
||||||
|
},
|
||||||
|
// 地区数据下拉发生变化
|
||||||
|
statertfResu (val) {
|
||||||
|
console.log(val, '1010110')
|
||||||
|
this.downLaSelectArea = val
|
||||||
|
},
|
||||||
|
// 重置清除空行空列状态
|
||||||
|
statertyui (val) {
|
||||||
|
this.showTableState = val
|
||||||
|
},
|
||||||
|
// 重置维度转换状态
|
||||||
|
emmitStateAd (val) {
|
||||||
|
// this.areaDimensionStateS = val
|
||||||
|
},
|
||||||
|
// 重置高级查询状态
|
||||||
|
tellParentsShowClos (val) {
|
||||||
|
this.advancedStates = val
|
||||||
|
},
|
||||||
|
// 改变状态
|
||||||
|
tellChangeFan (val) {
|
||||||
|
this.labelAreaStateks = val
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 计算字符串
|
// 计算字符串
|
||||||
@@ -984,16 +1169,6 @@ export default {
|
|||||||
// console.log(this.$route.query.type)
|
// console.log(this.$route.query.type)
|
||||||
this.initValue = this.computedNumberPx(200)
|
this.initValue = this.computedNumberPx(200)
|
||||||
console.log(this.computedNumberPx(200))
|
console.log(this.computedNumberPx(200))
|
||||||
// this.$detector().listenTo(this.$refs.leftHeight, (element) => {
|
|
||||||
// console.log(element)
|
|
||||||
// var width = element.offsetWidth
|
|
||||||
// var height = element.offsetHeight
|
|
||||||
// // this.$nextTick(() => {
|
|
||||||
// console.log('Size: ' + width + 'x' + height)
|
|
||||||
// // 使echarts尺寸重置
|
|
||||||
// this.leftHeights = height / (160 / ((1920 - 17) / document.body.clientWidth) / 10)
|
|
||||||
// // })
|
|
||||||
// })
|
|
||||||
// 获取菜单信息
|
// 获取菜单信息
|
||||||
this.getCateData()
|
this.getCateData()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="cont">
|
<div class="cont">
|
||||||
<!-- 全局搜索 -->
|
<!-- 全局搜索 -->
|
||||||
<search></search>
|
<search></search>
|
||||||
<div class="cont_content">
|
<div class="cont_content" v-if="cont_basic.length>0">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="left">个人中心</div>
|
<div class="left">个人中心</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
@@ -92,11 +92,15 @@
|
|||||||
@current-change="currentChange"
|
@current-change="currentChange"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<div class="collect_no" v-if="!collect">暂无收藏记录</div>
|
<div
|
||||||
|
class="collect_no"
|
||||||
|
v-if="!collect"
|
||||||
|
>{{!collect?collect.length!==0?'':'暂无收藏记录':'加载中...'}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="cont_basic.length===0" class="cont_content_basic">数据加载中...</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 页脚信息 -->
|
<!-- 页脚信息 -->
|
||||||
@@ -150,26 +154,26 @@ export default {
|
|||||||
staticSelect: '基本设置',
|
staticSelect: '基本设置',
|
||||||
// 基本设置数据
|
// 基本设置数据
|
||||||
cont_basic: [
|
cont_basic: [
|
||||||
{
|
// {
|
||||||
keys: '用户名称',
|
// keys: '用户名称',
|
||||||
values: '张三'
|
// values: '张三'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
keys: '邮箱',
|
// keys: '邮箱',
|
||||||
values: '1234567@163.com'
|
// values: '1234567@163.com'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
keys: '所属部门',
|
// keys: '所属部门',
|
||||||
values: '部门'
|
// values: '部门'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
keys: '机构名称',
|
// keys: '机构名称',
|
||||||
values: '某某机构'
|
// values: '某某机构'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
keys: '机构地址',
|
// keys: '机构地址',
|
||||||
values: '某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某'
|
// values: '某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某'
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
// 密码
|
// 密码
|
||||||
password: localStorage.getItem('userPwd'),
|
password: localStorage.getItem('userPwd'),
|
||||||
@@ -182,38 +186,39 @@ export default {
|
|||||||
// 收藏搜索
|
// 收藏搜索
|
||||||
searchCollect: '',
|
searchCollect: '',
|
||||||
// 收藏列表数据
|
// 收藏列表数据
|
||||||
collect: [
|
// collect: [
|
||||||
{
|
// // {
|
||||||
name: '发的货接口的话接口io福达合金你接口撒环能科技河南地方撒即可',
|
// // name: '发的货接口的话接口io福达合金你接口撒环能科技河南地方撒即可',
|
||||||
database: '月度数据发的货接口的话接口io福达合金你接口撒环能科技河南地方撒即可',
|
// // database: '月度数据发的货接口的话接口io福达合金你接口撒环能科技河南地方撒即可',
|
||||||
birthTime: '2019-09-18',
|
// // birthTime: '2019-09-18',
|
||||||
staticInput: false
|
// // staticInput: false
|
||||||
},
|
// // },
|
||||||
{
|
// // {
|
||||||
name: '1',
|
// // name: '1',
|
||||||
database: '月度数据',
|
// // database: '月度数据',
|
||||||
birthTime: '2019-09-18',
|
// // birthTime: '2019-09-18',
|
||||||
staticInput: false
|
// // staticInput: false
|
||||||
},
|
// // },
|
||||||
{
|
// // {
|
||||||
name: '1',
|
// // name: '1',
|
||||||
database: '月度数据',
|
// // database: '月度数据',
|
||||||
birthTime: '2019-09-18',
|
// // birthTime: '2019-09-18',
|
||||||
staticInput: false
|
// // staticInput: false
|
||||||
},
|
// // },
|
||||||
{
|
// // {
|
||||||
name: '1',
|
// // name: '1',
|
||||||
database: '月度数据',
|
// // database: '月度数据',
|
||||||
birthTime: '2019-09-18',
|
// // birthTime: '2019-09-18',
|
||||||
staticInput: false
|
// // staticInput: false
|
||||||
},
|
// // },
|
||||||
{
|
// // {
|
||||||
name: '1',
|
// // name: '1',
|
||||||
database: '月度数据',
|
// // database: '月度数据',
|
||||||
birthTime: '2019-09-18',
|
// // birthTime: '2019-09-18',
|
||||||
staticInput: false
|
// // staticInput: false
|
||||||
}
|
// // }
|
||||||
],
|
// ],
|
||||||
|
collect: null,
|
||||||
// 我的收藏名称
|
// 我的收藏名称
|
||||||
collectName: '',
|
collectName: '',
|
||||||
// 分页配置
|
// 分页配置
|
||||||
@@ -376,11 +381,35 @@ export default {
|
|||||||
// 请求接口完成 请求成功
|
// 请求接口完成 请求成功
|
||||||
// alert(res.data.message)
|
// alert(res.data.message)
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
this.cont_basic[0].values = res.data.data.username
|
let resdatares = [
|
||||||
this.cont_basic[1].values = res.data.data.email
|
{
|
||||||
this.cont_basic[2].values = res.data.data.company_dept
|
keys: '用户名称',
|
||||||
this.cont_basic[3].values = res.data.data.company_name
|
values: '张三'
|
||||||
this.cont_basic[4].values = res.data.data.company_addr
|
},
|
||||||
|
{
|
||||||
|
keys: '邮箱',
|
||||||
|
values: '1234567@163.com'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: '所属部门',
|
||||||
|
values: '部门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: '机构名称',
|
||||||
|
values: '某某机构'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys: '机构地址',
|
||||||
|
values: '某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某某'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
resdatares[0].values = res.data.data.username
|
||||||
|
resdatares[1].values = res.data.data.email
|
||||||
|
resdatares[2].values = res.data.data.company_dept
|
||||||
|
resdatares[3].values = res.data.data.company_name
|
||||||
|
resdatares[4].values = res.data.data.company_addr
|
||||||
|
this.cont_basic = resdatares
|
||||||
|
console.log(this.cont_basic, 'this.cont_basic')
|
||||||
}
|
}
|
||||||
}).catch((fail) => {
|
}).catch((fail) => {
|
||||||
console.log(fail)
|
console.log(fail)
|
||||||
@@ -904,5 +933,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
& > .cont_content_basic {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 38rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="content_cont">
|
<div class="content_cont">
|
||||||
<!-- 主内容 -->
|
<!-- 主内容 -->
|
||||||
<div class="mainCont">
|
<div class="mainCont">
|
||||||
<div class="mainCont_content">
|
<div class="mainCont_content" v-if="pageConfiguration.countSize!==0">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="left">相关搜索约为 {{pageConfiguration.countSize}} 条</div>
|
<div class="left">相关搜索约为 {{pageConfiguration.countSize}} 条</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
@current-change="currentChange"
|
@current-change="currentChange"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="pageConfiguration.countSize===0" style="height:20rem;width:100%;display:flex;align-items:center;justify-content:center;font-size:1.56rem;">哎呦,没有搜到结果呦!再试一遍吧!</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="pageConfiguration.countSize===0" style="height:20rem;width:100%;display:flex;align-items:center;justify-content:center;font-size:1.56rem;">哎呦,没有搜到结果呦!再试一遍吧!</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -86,10 +86,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 栏目数据 结构不可变
|
// 栏目数据 结构不可变
|
||||||
cityData: [
|
cityData: [
|
||||||
{ 'id': '110000', 'name': '年度数据', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' },
|
// { 'id': '110000', 'name': '年度数据', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' },
|
||||||
{ 'id': '110000', 'name': '季度数据', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' },
|
// { 'id': '110000', 'name': '季度数据', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' },
|
||||||
{ 'id': '110000', 'name': '月度数据', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' },
|
// { 'id': '110000', 'name': '月度数据', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' },
|
||||||
{ 'id': '110000', 'name': '-全部-', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' }
|
// { 'id': '110000', 'name': '-全部-', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' }
|
||||||
],
|
],
|
||||||
// 栏目级数
|
// 栏目级数
|
||||||
jishu: 1,
|
jishu: 1,
|
||||||
@@ -104,14 +104,14 @@ export default {
|
|||||||
],
|
],
|
||||||
// 搜索到的数据
|
// 搜索到的数据
|
||||||
searchData: [
|
searchData: [
|
||||||
{ id: 1, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 1, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 2, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 2, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 3, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 3, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 4, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 4, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 5, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 5, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 6, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 6, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 7, name: '张三', className: 'table1', lmss: '年度数据' },
|
// { id: 7, name: '张三', className: 'table1', lmss: '年度数据' },
|
||||||
{ id: 8, name: '张三', className: 'table1', lmss: '年度数据' }
|
// { id: 8, name: '张三', className: 'table1', lmss: '年度数据' }
|
||||||
],
|
],
|
||||||
// 分页
|
// 分页
|
||||||
// 分页配置
|
// 分页配置
|
||||||
|
|||||||
Reference in New Issue
Block a user