fanzhen0114
This commit is contained in:
15
src/App.vue
15
src/App.vue
@@ -1,10 +1,25 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
<div class="hint">为了获得更好的用户体验,请使用火狐、谷歌、360浏览器极速模式或IE9及以上版本的浏览器。</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
// 引入去掉浏览器默认样式css
|
||||
@import './assets/css/selfSetCss.css';
|
||||
.hint{
|
||||
width: 100%;
|
||||
height: 2.875rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 20;
|
||||
color: #fff;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
font-size: .75rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -369,6 +369,7 @@ class computedFunc {
|
||||
})
|
||||
// 总数据处理
|
||||
this.transBeforeData.areaName.forEach((itemName, indexName) => {
|
||||
console.log(this.transBeforeData.transBeforeAreaData, 'this.transBeforeData.transBeforeAreaData')
|
||||
var tableLine = {}
|
||||
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
|
||||
if (dataKey === 0) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
@open="handleOpen"
|
||||
@close="handleClose"
|
||||
@select="selectActive"
|
||||
:unique-opened="true"
|
||||
style="border:none"
|
||||
>
|
||||
<el-submenu
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<img
|
||||
:src="indexToExplain"
|
||||
alt
|
||||
v-if="index!==0&&!transState&&areaDataState!=='area'&&!computedLineSty(index)"
|
||||
v-if="index!==0&&$store.state.SelecttDimension.row==='zb'"
|
||||
class="slotExplain"
|
||||
:style="{'margin':indStatic===0?'0':''}"
|
||||
@click="indexExplain(scope.column.label)"
|
||||
@@ -50,7 +50,7 @@
|
||||
<img
|
||||
:src="indexToExplain"
|
||||
alt
|
||||
v-if="index===0&&transState&&areaDataState!=='area'&&!computedListSty(scope.$index)"
|
||||
v-if="index===0&&$store.state.SelecttDimension.col==='zb'"
|
||||
class="slotExplain"
|
||||
:style="{'margin':indStatic===0?'0':''}"
|
||||
@click="indexExplain(scope.row['table_line0'])"
|
||||
@@ -104,10 +104,6 @@ export default {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
// downLaSelects: {
|
||||
// type: String,
|
||||
// required: true
|
||||
// },
|
||||
showTableState: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
@@ -131,161 +127,161 @@ export default {
|
||||
// 指标解释
|
||||
indexToExplain: require('../../../static/chatCont/zhibiaojieshi.png'),
|
||||
tableData: [
|
||||
{
|
||||
table_line1: '(1,1)5456456456456456456454564564',
|
||||
table_line2: '(1,2)',
|
||||
table_line3: '(1,3)',
|
||||
table_line4: '(1,4)',
|
||||
table_line5: '(1,5)',
|
||||
table_line6: '(1,6)',
|
||||
table_line7: '(1,7)',
|
||||
table_line8: '(1,8)',
|
||||
table_line9: '(1,9)',
|
||||
table_line10: '(1,10)',
|
||||
table_line11: '(1,11)',
|
||||
table_line12: '(1,12)',
|
||||
table_line13: '(1,13)',
|
||||
table_line14: '(1,14)',
|
||||
table_line15: '(1,15)',
|
||||
table_line16: '(1,16)'
|
||||
},
|
||||
{
|
||||
table_line1: '(1,1)546454',
|
||||
table_line2: '(1,2)',
|
||||
table_line3: '(1,3)',
|
||||
table_line4: '(1,4)',
|
||||
table_line5: '(1,5)',
|
||||
table_line6: '(1,6)',
|
||||
table_line7: '(1,7)',
|
||||
table_line8: '(1,8)',
|
||||
table_line9: '(1,9)',
|
||||
table_line10: '(1,10)',
|
||||
table_line11: '(1,11)',
|
||||
table_line12: '(1,12)',
|
||||
table_line13: '(1,13)',
|
||||
table_line14: '(1,14)',
|
||||
table_line15: '(1,15)',
|
||||
table_line16: '(1,16)'
|
||||
}
|
||||
// {
|
||||
// table_line1: '(1,1)5456456456456456456454564564',
|
||||
// table_line2: '(1,2)',
|
||||
// table_line3: '(1,3)',
|
||||
// table_line4: '(1,4)',
|
||||
// table_line5: '(1,5)',
|
||||
// table_line6: '(1,6)',
|
||||
// table_line7: '(1,7)',
|
||||
// table_line8: '(1,8)',
|
||||
// table_line9: '(1,9)',
|
||||
// table_line10: '(1,10)',
|
||||
// table_line11: '(1,11)',
|
||||
// table_line12: '(1,12)',
|
||||
// table_line13: '(1,13)',
|
||||
// table_line14: '(1,14)',
|
||||
// table_line15: '(1,15)',
|
||||
// table_line16: '(1,16)'
|
||||
// },
|
||||
// {
|
||||
// table_line1: '(1,1)546454',
|
||||
// table_line2: '(1,2)',
|
||||
// table_line3: '(1,3)',
|
||||
// table_line4: '(1,4)',
|
||||
// table_line5: '(1,5)',
|
||||
// table_line6: '(1,6)',
|
||||
// table_line7: '(1,7)',
|
||||
// table_line8: '(1,8)',
|
||||
// table_line9: '(1,9)',
|
||||
// table_line10: '(1,10)',
|
||||
// table_line11: '(1,11)',
|
||||
// table_line12: '(1,12)',
|
||||
// table_line13: '(1,13)',
|
||||
// table_line14: '(1,14)',
|
||||
// table_line15: '(1,15)',
|
||||
// table_line16: '(1,16)'
|
||||
// }
|
||||
],
|
||||
tableDataS: [
|
||||
{
|
||||
date: '2016-05-03',
|
||||
name: '王小名',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-08',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-06',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}
|
||||
// {
|
||||
// date: '2016-05-03',
|
||||
// name: '王小名',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-02',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-04',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-01',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-08',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-06',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-07',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }
|
||||
],
|
||||
// 列数据(label,labelId)
|
||||
tableLine: [
|
||||
{
|
||||
labelId: 'table_line1',
|
||||
label: '指标'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line2',
|
||||
label: '2019年10月1日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line3',
|
||||
label: '2019年10月2日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line4',
|
||||
label: '2019年10月3日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line5',
|
||||
label: '2019年10月5日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line6',
|
||||
label: '2019年10月5日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line7',
|
||||
label: '2019年10月6日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line8',
|
||||
label: '2019年10月7日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line9',
|
||||
label: '2019年10月8日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line10',
|
||||
label: '2019年10月9日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line11',
|
||||
label: '2019年10月10日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line12',
|
||||
label: '2019年10月11日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line13',
|
||||
label: '2019年10月12日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line14',
|
||||
label: '2019年10月13日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line15',
|
||||
label: '2019年10月14日'
|
||||
},
|
||||
{
|
||||
labelId: 'table_line16',
|
||||
label: '2019年10月15日'
|
||||
}
|
||||
// {
|
||||
// labelId: 'table_line1',
|
||||
// label: '指标'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line2',
|
||||
// label: '2019年10月1日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line3',
|
||||
// label: '2019年10月2日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line4',
|
||||
// label: '2019年10月3日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line5',
|
||||
// label: '2019年10月5日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line6',
|
||||
// label: '2019年10月5日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line7',
|
||||
// label: '2019年10月6日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line8',
|
||||
// label: '2019年10月7日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line9',
|
||||
// label: '2019年10月8日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line10',
|
||||
// label: '2019年10月9日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line11',
|
||||
// label: '2019年10月10日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line12',
|
||||
// label: '2019年10月11日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line13',
|
||||
// label: '2019年10月12日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line14',
|
||||
// label: '2019年10月13日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line15',
|
||||
// label: '2019年10月14日'
|
||||
// },
|
||||
// {
|
||||
// labelId: 'table_line16',
|
||||
// label: '2019年10月15日'
|
||||
// }
|
||||
],
|
||||
// 转置状态(true:时间在表头上,false:指标名称或者地区名称在表头上)
|
||||
transState: false,
|
||||
@@ -475,6 +471,11 @@ export default {
|
||||
this.$store.state.defaultShowDataState = false
|
||||
// 还原转置状态和行列状态
|
||||
this.transState = true
|
||||
this.$store.state.yesNoClickChange = false
|
||||
this.$store.state.areaDimensionState = false
|
||||
// 恢复选中
|
||||
// 重置三维转换默认选中
|
||||
this.$parent.change3Ds()
|
||||
this.chartsStatusMegger.transState = this.transState
|
||||
if (this.$route.query.type !== 'area') {
|
||||
this.$store.state.SelecttDimension = {
|
||||
@@ -486,11 +487,12 @@ export default {
|
||||
row: 'sj',
|
||||
col: 'dq'
|
||||
}
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.SelecttDimension')
|
||||
}
|
||||
if (val) {
|
||||
// 初始化公共数据
|
||||
// console.log(this.defaultDataRight, '获取左侧选中数据555')
|
||||
this.leftState = false
|
||||
this.leftState = true
|
||||
// 恢复高级查询状态
|
||||
this.$store.state.advancedSearchState = false
|
||||
// 调接口拿到所有当前分类下的所有的指标、地区、时间
|
||||
@@ -596,32 +598,34 @@ export default {
|
||||
downLaSelectArea (valStrinf) {
|
||||
console.log(valStrinf, '555222000选中')
|
||||
console.log(this.$store.state.AreaAllCountData, 'kkkkk数据')
|
||||
if (this.$store.state.defaultShowDataState && this.labelAreaNum) {
|
||||
if (this.$store.state.defaultShowDataState && this.labelAreaNum && this.$store.state.defaultShowLabelAreaState !== 'defaultOnLine') {
|
||||
this.transBefore = this.$store.state.transBefore
|
||||
} else {
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
if (this.$store.state.newSelectDaaState) {
|
||||
this.$store.state.labelIndexName = valStrinf
|
||||
this.$store.state.areaIndexName = ''
|
||||
this.selectState = 1
|
||||
if (this.$route.query.type === 'area') {
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
if (this.$store.state.newSelectDaaState) {
|
||||
this.$store.state.labelIndexName = valStrinf
|
||||
this.$store.state.areaIndexName = ''
|
||||
this.selectState = 1
|
||||
} else {
|
||||
this.$store.state.labelIndexName = ''
|
||||
this.$store.state.areaIndexName = valStrinf
|
||||
this.selectState = 2
|
||||
}
|
||||
this.getDatas()
|
||||
} else {
|
||||
this.$store.state.labelIndexName = ''
|
||||
this.$store.state.areaIndexName = valStrinf
|
||||
this.selectState = 2
|
||||
console.log(this.leftState, '走这里')
|
||||
if (this.$store.state.newSelectDaaState) {
|
||||
this.$store.state.labelIndexName = valStrinf
|
||||
this.$store.state.areaIndexName = ''
|
||||
this.selectState = 1
|
||||
} else {
|
||||
this.$store.state.labelIndexName = ''
|
||||
this.$store.state.areaIndexName = valStrinf
|
||||
this.selectState = 2
|
||||
}
|
||||
this.advancedSearchDataShow()
|
||||
}
|
||||
this.getDatas()
|
||||
} else {
|
||||
console.log(this.leftState, '走这里')
|
||||
if (this.$store.state.newSelectDaaState) {
|
||||
this.$store.state.labelIndexName = valStrinf
|
||||
this.$store.state.areaIndexName = ''
|
||||
this.selectState = 1
|
||||
} else {
|
||||
this.$store.state.labelIndexName = ''
|
||||
this.$store.state.areaIndexName = valStrinf
|
||||
this.selectState = 2
|
||||
}
|
||||
this.advancedSearchDataShow()
|
||||
}
|
||||
}
|
||||
this.labelAreaNum = false
|
||||
@@ -642,21 +646,24 @@ export default {
|
||||
* */
|
||||
lieWidthComputed () {
|
||||
// 总数据
|
||||
// console.log(JSON.parse(JSON.stringify(this.tableData.map((item, index) => { return Object.values(item) }))), '数据表演')
|
||||
let AllCountData = (this.tableData.map((item, index) => { return Object.values(item) }))
|
||||
// console.log(AllCountData, 'AllCountData')
|
||||
AllCountData.unshift(this.tableLine.map((item, index) => { return item.label }))
|
||||
// 将数据进行行列转换
|
||||
let zhuanChange = AllCountData[0].map((col, index) => {
|
||||
return AllCountData.map((row, key) => {
|
||||
// console.log(row[index].length, 'rowrow')
|
||||
return row[index].length
|
||||
})
|
||||
})
|
||||
console.log(zhuanChange, 'AllCountData')
|
||||
// console.log(zhuanChange, 'AllCountData')
|
||||
this.lieWidthArr = zhuanChange.map((item, index) => {
|
||||
return item.reduce((total, currentValue) => {
|
||||
return total > currentValue ? total : currentValue
|
||||
})
|
||||
})
|
||||
console.log(this.lieWidthArr, 'this.lieWidthArr')
|
||||
// console.log(this.lieWidthArr, 'this.lieWidthArr')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.doLayout()
|
||||
})
|
||||
@@ -667,14 +674,51 @@ export default {
|
||||
* */
|
||||
/* eslint-disable */
|
||||
downLaSelects() {
|
||||
console.log(this.$store.state.advancedSearchState, 'this.$store.state.advancedSearchState0000000000000000000000')
|
||||
if (this.leftState) {
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
this.getDatas()
|
||||
} else {
|
||||
this.advancedSearchDataShow()
|
||||
// console.log(this.$store.state.advancedSearchState, 'this.$store.state.advancedSearchState0000000000000000000000')
|
||||
// console.log(this.leftState, 'this.leftState')
|
||||
// if (this.leftState) {
|
||||
// if (this.$route.query.type !== 'area') {
|
||||
// if (!this.$store.state.advancedSearchState) {
|
||||
// this.getDatas()
|
||||
// } else {
|
||||
// this.advancedSearchDataShow()
|
||||
// }
|
||||
// } else {
|
||||
|
||||
// }
|
||||
// } else {
|
||||
if (this.$route.query.type !== 'area') {
|
||||
if (this.$route.query.defaultLeftId === 'default' && this.$store.state.defaultShowLabelAreaState === 'defaultOnLine') {// 显示默认数据并且是显示默认线上数据
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
this.getDatas()
|
||||
} else {
|
||||
this.advancedSearchDataShow()
|
||||
}
|
||||
} else if (this.$route.query.defaultLeftId === 'default' && this.$store.state.defaultShowLabelAreaState === 'normal') {// 显示默认数据并且是正常显示数据
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
this.getDatas()
|
||||
} else {
|
||||
this.advancedSearchDataShow()
|
||||
}
|
||||
} else if (this.$route.query.defaultLeftId !== 'default') {// 显示非正常数据
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
this.getDatas()
|
||||
} else {
|
||||
this.advancedSearchDataShow()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(this.$store.state.timeNum,'this.$store.state.timeNum')
|
||||
if (this.$route.query.defaultLeftId === 'default' && !this.$store.state.timeNum) {// 显示非正常数据
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
this.getDatas()
|
||||
} else {
|
||||
this.advancedSearchDataShow()
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
this.$store.state.timeNum = false
|
||||
},
|
||||
// 获取所有当前分类下的所有的指标、地区、时间
|
||||
getInfor(classifyId) {
|
||||
@@ -722,7 +766,11 @@ export default {
|
||||
} else {
|
||||
console.log(this.$store.state.transBefore, 'this.transBefore else')
|
||||
this.$parent.childChartsCutShow()
|
||||
if (this.$store.state.yesNoClickChange && this.$store.state.defaultShowLabelAreaState === 'defaultLocal') {
|
||||
this.$parent.changeCutShow()
|
||||
}
|
||||
}
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.SelecttDimension')
|
||||
}).catch((fail) => {
|
||||
console.log(fail)
|
||||
})
|
||||
@@ -826,10 +874,14 @@ export default {
|
||||
},
|
||||
// 指标解释
|
||||
indexExplain(labIndexName) {
|
||||
console.log(labIndexName, 'labIndexName')
|
||||
if (this.transBefore.termsName.indexOf(labIndexName) !== -1) {
|
||||
console.log('指标解释:', this.transBefore.termsExplain[this.transBefore.termsName.indexOf(labIndexName)])
|
||||
this.$store.state.labelExplainData = this.transBefore.termsExplain[this.transBefore.termsName.indexOf(labIndexName)]
|
||||
this.$store.state.labelExplainState = true
|
||||
} else {
|
||||
this.$store.state.labelExplainData = labIndexName
|
||||
this.$store.state.labelExplainState = true
|
||||
}
|
||||
},
|
||||
// 统计数据对行,对列处理
|
||||
@@ -1089,15 +1141,24 @@ export default {
|
||||
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]
|
||||
console.log(this.$store.state.yesNoClickZZ, '走这里')
|
||||
// 转置后在请求数据 需要将数据转置
|
||||
if (this.$store.state.yesNoClickZZ && !this.leftState) {
|
||||
let transBeforeAreaData = JSON.parse(JSON.stringify(res.data.data.transBeforeAreaData[0]))
|
||||
brrtf.transBeforeAreaData = transBeforeAreaData[0].map((col, index) => {
|
||||
return transBeforeAreaData.map((row, key) => {
|
||||
return row[index]
|
||||
})
|
||||
})
|
||||
} else {
|
||||
brrtf.transBeforeAreaData = res.data.data.transBeforeAreaData[0]
|
||||
}
|
||||
brrtf.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||
} else {
|
||||
brrtf.transBeforeAreaData = res.data.data.transBeforeAreaData
|
||||
@@ -1170,12 +1231,11 @@ export default {
|
||||
this.$store.state.noDataState = false
|
||||
this.$emit('update:loading', false)
|
||||
}
|
||||
if (this.$route.query.type !== 'area') {
|
||||
this.$store.state.SelecttDimension.col = 'zb'
|
||||
this.$store.state.SelecttDimension.row = 'sj'
|
||||
}
|
||||
this.leftState = true
|
||||
console.log(JSON.parse(JSON.stringify(this.transBefore)), 'JSON.parse(JSON.stringify(this.transBefore))')
|
||||
this.$store.state.allNochangeInitData = JSON.parse(JSON.stringify(this.transBefore))
|
||||
// this.transState = this.$store.state.yesNoClickZZ
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.SelecttDimension')
|
||||
}).catch((fail) => {
|
||||
console.log(fail, 2369)
|
||||
})
|
||||
|
||||
@@ -64,7 +64,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart_right" v-if="$route.query.type==='area'&&$store.state.areaDimensionState">
|
||||
<div
|
||||
class="chart_right"
|
||||
v-if="$route.query.type==='area'&&$store.state.areaDimensionState&&optionsDimension.length>0"
|
||||
>
|
||||
{{leftLabel[$store.state.noSelecttDimension]}}:
|
||||
<el-cascader
|
||||
v-model="valueDimension"
|
||||
@@ -199,10 +202,10 @@ export default {
|
||||
},
|
||||
valueDimension: [],
|
||||
optionsDimension: [
|
||||
{
|
||||
value: '',
|
||||
label: ''
|
||||
}
|
||||
// {
|
||||
// value: '',
|
||||
// label: ''
|
||||
// }
|
||||
],
|
||||
// 默认数据显示状态
|
||||
defaultStateShowData: true
|
||||
@@ -256,6 +259,19 @@ export default {
|
||||
},
|
||||
// 监听地区维度转换数据变换
|
||||
areaDimensionStateS (newVal) {
|
||||
if (newVal) {
|
||||
this.areaDimensionDo(newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @desc 地区数据维度转换之后的下拉筛选数据
|
||||
* @param newVal 变化后的数据
|
||||
*
|
||||
*/
|
||||
areaDimensionDo (newVal) {
|
||||
console.log('你你你你你你?')
|
||||
if (newVal) {
|
||||
if (this.$store.state.noSelecttDimension === 'sj') {
|
||||
this.optionsDimension = this.$store.state.dataArealabelTime.timeArr.map((item, index) => {
|
||||
@@ -279,14 +295,12 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
this.valueDimension = this.$store.newSelectChangeData
|
||||
this.valueDimension = this.$store.state.newSelectChangeData
|
||||
console.log(this.valueDimension, 'this.valueDimension0')
|
||||
// 告诉父组件数据渲染完
|
||||
this.$emit('emmitStateAd', false)
|
||||
}
|
||||
console.log(this.valueDimension, 'this.valueDimension')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
// 地区维度转换筛选
|
||||
handleChangeDimension () {
|
||||
console.log(this.valueDimension, 'this.valueDimension')
|
||||
@@ -383,7 +397,7 @@ export default {
|
||||
value: '序列',
|
||||
label: '序列'
|
||||
})
|
||||
if (this.$route.query.defaultLeftId === 'default' && this.$store.state.defaultShowDataState) {
|
||||
if (this.$route.query.defaultLeftId === 'default' && this.$store.state.defaultShowDataState && this.$store.state.defaultShowLabelAreaState !== 'defaultOnLine') {
|
||||
this.value = [this.$store.state.newSelectLabelArea.sequenceCont]
|
||||
} else {
|
||||
this.value = [this.options[1].value]
|
||||
@@ -403,7 +417,7 @@ export default {
|
||||
value: '序列',
|
||||
label: '序列'
|
||||
})
|
||||
if (this.$route.query.defaultLeftId === 'default' && this.$store.state.defaultShowDataState) {
|
||||
if (this.$route.query.defaultLeftId === 'default' && this.$store.state.defaultShowDataState && this.$store.state.defaultShowLabelAreaState !== 'defaultOnLine') {
|
||||
this.value = [this.$store.state.newSelectLabelArea.sequenceCont]
|
||||
} else {
|
||||
this.value = [this.options[1].value]
|
||||
@@ -467,6 +481,7 @@ export default {
|
||||
sequenceCont: this.value[0],
|
||||
sequenceState: this.stateChangeSDF ? 1 : 2// 1筛选指标 2筛选地区
|
||||
}
|
||||
console.log(this.options, 'this.option012')
|
||||
},
|
||||
// 聚焦显示提示的搜索框
|
||||
focusShow () {
|
||||
@@ -677,8 +692,12 @@ export default {
|
||||
this.$store.state.newSelectDaaState = this.stateChangeSDF
|
||||
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 === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||
this.$store.state.SelecttDimension.row = 'zb'
|
||||
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
|
||||
this.$store.state.SelecttDimension.col = 'dq'
|
||||
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
|
||||
this.$store.state.SelecttDimension.row = 'dq'
|
||||
}
|
||||
this.$store.state.defaultShowDataState = false
|
||||
this.showLabelArea()
|
||||
@@ -719,6 +738,7 @@ export default {
|
||||
},
|
||||
callBackValOpen (res) { // 展开回调
|
||||
console.log(res, '展开')
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.advancedSearchState0000000000000000000000')
|
||||
this.changesInputStu()
|
||||
},
|
||||
callBackValClose (res) { // 关闭回调
|
||||
|
||||
@@ -77,6 +77,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
changeTabel (stateSD, strd) {
|
||||
console.log(stateSD, strd, 'stateSD, strd')
|
||||
if (strd === 'row') {
|
||||
this.rowVal = stateSD
|
||||
} else if (strd === 'col') {
|
||||
@@ -85,6 +86,7 @@ export default {
|
||||
},
|
||||
// 维度转换默认
|
||||
change3D () {
|
||||
console.log(this.$store.state.SelecttDimension, '3d56')
|
||||
this.rowVal = this.arrValueZd[this.$store.state.SelecttDimension.col]
|
||||
this.colVal = this.arrValueZd[this.$store.state.SelecttDimension.row]
|
||||
},
|
||||
@@ -122,6 +124,7 @@ export default {
|
||||
row: this.arrValue[this.colVal],
|
||||
col: this.arrValue[this.rowVal]
|
||||
}
|
||||
this.$store.state.newSelectChangeData = paramsd.area
|
||||
} 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 = {
|
||||
@@ -136,6 +139,7 @@ export default {
|
||||
row: this.arrValue[this.colVal],
|
||||
col: this.arrValue[this.rowVal]
|
||||
}
|
||||
this.$store.state.newSelectChangeData = paramsd.quota
|
||||
} 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 = {
|
||||
@@ -150,9 +154,11 @@ export default {
|
||||
row: this.arrValue[this.colVal],
|
||||
col: this.arrValue[this.rowVal]
|
||||
}
|
||||
this.$store.state.newSelectChangeData = paramsd.date
|
||||
}
|
||||
this.$store.state.SelecttDimension.row = this.arrValue[this.colVal]
|
||||
this.$store.state.SelecttDimension.col = this.arrValue[this.rowVal]
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.SelecttDimension0236')
|
||||
this.$axios({
|
||||
method: 'POST',
|
||||
url: 'data/data/wd-trans',
|
||||
@@ -169,22 +175,33 @@ export default {
|
||||
transBefore.termsName = res.data.data.termsName
|
||||
transBefore.areaName = this.$store.state.transBefore.areaName
|
||||
transBefore.termsExplain = res.data.data.termsExplain
|
||||
this.$store.newSelectChangeData = res.data.data.areaName
|
||||
this.$store.newSelectChangeData = this.$store.state.dataArealabelTime.areaArr
|
||||
} else if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'sj')) {
|
||||
transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
||||
transBefore.termsName = this.$store.state.transBefore.termsName
|
||||
transBefore.areaName = res.data.data.areaName
|
||||
transBefore.termsExplain = this.$store.state.transBefore.termsExplain
|
||||
this.$store.newSelectChangeData = res.data.data.termsName
|
||||
this.$store.newSelectChangeData = this.$store.state.dataArealabelTime.quotaArr
|
||||
} else if ((this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'zb')) {
|
||||
transBefore.timeArr = this.$store.state.transBefore.timeArr.map((item, index) => { return item.toString() })
|
||||
transBefore.termsName = res.data.data.termsName
|
||||
transBefore.areaName = res.data.data.areaName
|
||||
transBefore.termsExplain = res.data.data.termsExplain
|
||||
this.$store.newSelectChangeData = res.data.data.timeArr.map((item, index) => { return item.toString() })
|
||||
this.$store.newSelectChangeData = this.$store.state.dataArealabelTime.timeArr
|
||||
}
|
||||
transBefore.tableExplain = res.data.data.tableExplain
|
||||
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
|
||||
// 转置后请求数据需要将数据转置
|
||||
// if (!this.$store.state.yesNoClickZZ) {
|
||||
// let transBeforeAreaData = JSON.parse(JSON.stringify(res.data.data.transBeforeAreaData[0]))
|
||||
// transBefore.transBeforeAreaData = transBeforeAreaData[0].map((col, index) => {
|
||||
// return transBeforeAreaData.map((row, key) => {
|
||||
// return row[index]
|
||||
// })
|
||||
// })
|
||||
// } else {
|
||||
// transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData[0]
|
||||
// }
|
||||
transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData[0]
|
||||
console.log(transBefore, '000')
|
||||
this.$store.state.transdtr = true
|
||||
@@ -216,7 +233,7 @@ export default {
|
||||
return row[index]
|
||||
})
|
||||
})
|
||||
this.$store.state.befaultAfter = 'wdzh'
|
||||
// this.$store.state.befaultAfter = 'wdzh'
|
||||
}
|
||||
this.$store.state.yesNoClickChange = true
|
||||
}).catch((fail) => {
|
||||
@@ -226,6 +243,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.change3D()
|
||||
console.log(1003)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -77,28 +77,28 @@ export default {
|
||||
},
|
||||
// 维度转换默认
|
||||
change3D () {
|
||||
if (this.$store.state.transState) {
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.SelecttDimension')
|
||||
if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
|
||||
this.rowVal = '指标'
|
||||
this.colVal = '时间'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
|
||||
this.rowVal = '时间'
|
||||
this.colVal = '指标'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'sj') {
|
||||
this.rowVal = '地区'
|
||||
this.colVal = '时间'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'dq') {
|
||||
this.rowVal = '时间'
|
||||
this.colVal = '地区'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'zb') {
|
||||
this.rowVal = '地区'
|
||||
this.colVal = '指标'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'dq') {
|
||||
this.rowVal = '指标'
|
||||
this.colVal = '地区'
|
||||
}
|
||||
// if (this.$store.state.transState) {
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.SelecttDimension')
|
||||
if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
|
||||
this.rowVal = '指标'
|
||||
this.colVal = '时间'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
|
||||
this.rowVal = '时间'
|
||||
this.colVal = '指标'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'sj') {
|
||||
this.rowVal = '地区'
|
||||
this.colVal = '时间'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'dq') {
|
||||
this.rowVal = '时间'
|
||||
this.colVal = '地区'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'zb') {
|
||||
this.rowVal = '地区'
|
||||
this.colVal = '指标'
|
||||
} else if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'dq') {
|
||||
this.rowVal = '指标'
|
||||
this.colVal = '地区'
|
||||
}
|
||||
// }
|
||||
},
|
||||
// 确定维度转换
|
||||
trueChange () {
|
||||
@@ -111,15 +111,17 @@ export default {
|
||||
this.$store.state.noAreadimensionState = false
|
||||
} else {
|
||||
// 告诉父组件转置
|
||||
this.$store.state.SelecttDimension.col = this.arrValue[this.rowVal]
|
||||
this.$store.state.SelecttDimension.row = this.arrValue[this.colVal]
|
||||
console.log(this.$store.state.SelecttDimension, '非地区数据维度转换=》转置')
|
||||
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 () {
|
||||
console.log('我只醒了')
|
||||
console.log(this.$store.state.SelecttDimension, '非地区数据维度转换=》转置')
|
||||
this.change3D()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,12 +121,16 @@ export default new Vuex.Store({
|
||||
defaultDataId: '',
|
||||
// 默认显示时间状态(本地显示或线上显示)===>defaultLocal defaultOnLine
|
||||
defaultShowTimeState: 'defaultOnLine',
|
||||
// 默认显示地区或指标状态(本地显示或线上显示)===>defaultLocal defaultOnLine
|
||||
// 默认显示地区或指标状态(本地显示或线上显示)===>defaultLocal默认本地 defaultOnLine默认线上 normal正常显示
|
||||
defaultShowLabelAreaState: 'defaultOnLine',
|
||||
// 默认数据显示状态 true显示 false不显示
|
||||
defaultShowDataState: true,
|
||||
// 是否点击转置按钮
|
||||
yesNoClickZZ: false,
|
||||
// 是否点击维度转换的确定按钮
|
||||
yesNoClickChange: false
|
||||
yesNoClickChange: false,
|
||||
// 时间次数true为1次 false为非1次
|
||||
timeNum: true
|
||||
|
||||
},
|
||||
mutations: {},
|
||||
|
||||
@@ -542,6 +542,8 @@ export default {
|
||||
this.$store.state.selectDataLeft = this.defaultDataRight
|
||||
this.$store.state.selectfilter = this.defaultDataRight.f
|
||||
this.$store.state.yesNoClickChange = false
|
||||
this.$store.state.timeNum = true
|
||||
this.$store.state.yesNoClickZZ = false
|
||||
},
|
||||
handleClose (key, keyPath) {
|
||||
console.log(key, keyPath, '关闭打印')
|
||||
@@ -665,6 +667,11 @@ export default {
|
||||
confirmButtonText: '确定'
|
||||
})
|
||||
return
|
||||
} else if (this.$store.state.advanceData.length > 101) {
|
||||
this.$alert('最多选择100条数据进行查询!', '温馨提示', {
|
||||
confirmButtonText: '确定'
|
||||
})
|
||||
return
|
||||
}
|
||||
that.cutStateSeach = 'simpleness'
|
||||
that.advancedStates = true
|
||||
@@ -851,7 +858,11 @@ export default {
|
||||
}
|
||||
break
|
||||
case '转置':
|
||||
if (this.$store.state.befaultAfter !== 'wdzh') {
|
||||
// 是否点击转置
|
||||
this.$store.state.yesNoClickZZ = !this.$store.state.yesNoClickZZ
|
||||
if (this.$store.state.befaultAfter === 'zz') {
|
||||
this.$store.state.befaultAfter = 'no'
|
||||
} else {
|
||||
this.$store.state.befaultAfter = 'zz'
|
||||
}
|
||||
this.cutStatic(0)
|
||||
@@ -873,6 +884,8 @@ export default {
|
||||
col: this.$store.state.SelecttDimension.row
|
||||
}
|
||||
this.$store.state.SelecttDimension = zhuanChange
|
||||
console.log(this.$store.state.SelecttDimension, '非地区数据维度转换=》转置')
|
||||
this.change3Ds()
|
||||
this.chartsStatusMegger.transState = !this.chartsStatusMegger.transState
|
||||
this.$store.state.transState = this.chartsStatusMegger.transState
|
||||
} else {
|
||||
@@ -943,47 +956,76 @@ export default {
|
||||
if (JSON.parse(localStorage.getItem('classFiyData'))) { // 本地存在
|
||||
let arrtsBGY = JSON.parse(localStorage.getItem('classFiyData'))
|
||||
if (!arrtsBGY.find(item => item.type === this.$route.query.type)) {
|
||||
let btyData = JSON.parse(JSON.stringify(this.$store.state.allNochangeInitData))
|
||||
if (this.$store.state.yesNoClickZZ) {
|
||||
let btyAreaData = btyData.transBeforeAreaData
|
||||
btyData.transBeforeAreaData = btyAreaData[0].map((col, index) => {
|
||||
return btyAreaData.map((row, key) => {
|
||||
return row[index]
|
||||
})
|
||||
})
|
||||
}
|
||||
arrtsBGY.push({
|
||||
type: this.$route.query.type,
|
||||
allNochangeInitData: this.$store.state.allNochangeInitData,
|
||||
transBefore: this.$store.state.transBefore,
|
||||
allNochangeInitData: btyData,
|
||||
transBefore: btyData,
|
||||
selectDate: {
|
||||
time: this.$store.state.newSelectTime,
|
||||
sequence: this.$store.state.newSelectLabelArea
|
||||
sequence: this.$store.state.yesNoClickChange ? { sequenceCont: this.$store.state.newSelectChangeData, sequenceState: 3 } : this.$store.state.newSelectLabelArea
|
||||
},
|
||||
selectDataLeft: this.$store.state.selectDataLeft, // 左侧选中
|
||||
SelecttDimension: this.$store.state.SelecttDimension,
|
||||
yesNoClickChange: this.$store.state.yesNoClickChange// 维度转换是否被点击
|
||||
yesNoClickChange: this.$store.state.yesNoClickChange, // 维度转换是否被点击
|
||||
yesNoClickZZ: this.$store.state.yesNoClickZZ// 转置是否被点击
|
||||
})
|
||||
localStorage.setItem('classFiyData', JSON.stringify(arrtsBGY))
|
||||
} else {
|
||||
console.log('走这里')
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).transBefore = this.$store.state.transBefore
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).allNochangeInitData = this.$store.state.allNochangeInitData
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).selectDate = {
|
||||
time: this.$store.state.newSelectTime
|
||||
let btyData = JSON.parse(JSON.stringify(this.$store.state.allNochangeInitData))
|
||||
if (this.$store.state.yesNoClickZZ) {
|
||||
let btyAreaData = btyData.transBeforeAreaData
|
||||
btyData.transBeforeAreaData = btyAreaData[0].map((col, index) => {
|
||||
return btyAreaData.map((row, key) => {
|
||||
return row[index]
|
||||
})
|
||||
})
|
||||
}
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).transBefore = btyData
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).allNochangeInitData = btyData
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).selectDate = {
|
||||
time: this.$store.state.newSelectTime,
|
||||
sequence: this.$store.state.yesNoClickChange ? { sequenceCont: this.$store.state.newSelectChangeData, sequenceState: 3 } : this.$store.state.newSelectLabelArea
|
||||
}
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).selectDate.sequence = this.$store.state.newSelectLabelArea
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).selectDataLeft = this.$store.state.selectDataLeft
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).SelecttDimension = this.$store.state.SelecttDimension
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).yesNoClickChange = this.$store.state.yesNoClickChange
|
||||
|
||||
arrtsBGY.find(item => item.type === this.$route.query.type).yesNoClickZZ = this.$store.state.yesNoClickZZ
|
||||
localStorage.setItem('classFiyData', JSON.stringify(arrtsBGY))
|
||||
}
|
||||
} else { // 本地不存在
|
||||
let btyData = JSON.parse(JSON.stringify(this.$store.state.allNochangeInitData))
|
||||
if (this.$store.state.yesNoClickZZ) {
|
||||
let btyAreaData = btyData.transBeforeAreaData
|
||||
btyData.transBeforeAreaData = btyAreaData[0].map((col, index) => {
|
||||
return btyAreaData.map((row, key) => {
|
||||
return row[index]
|
||||
})
|
||||
})
|
||||
}
|
||||
localStorage.setItem('classFiyData', JSON.stringify([{
|
||||
type: this.$route.query.type,
|
||||
allNochangeInitData: this.$store.state.allNochangeInitData,
|
||||
transBefore: this.$store.state.transBefore,
|
||||
allNochangeInitData: btyData,
|
||||
transBefore: btyData,
|
||||
selectDate: {
|
||||
time: this.$store.state.newSelectTime,
|
||||
sequence: this.$store.state.newSelectLabelArea
|
||||
sequence: this.$store.state.yesNoClickChange ? { sequenceCont: this.$store.state.newSelectChangeData, sequenceState: 3 } : this.$store.state.newSelectLabelArea
|
||||
// sequenceCont:,//序列选中内容
|
||||
// sequenceState://序列状态 筛选指标 筛选地区
|
||||
},
|
||||
selectDataLeft: this.$store.state.selectDataLeft, // 左侧选中
|
||||
SelecttDimension: this.$store.state.SelecttDimension, // 行列代表的是指标、地区、时间
|
||||
yesNoClickChange: this.$store.state.yesNoClickChange// 维度转换是否被点击
|
||||
yesNoClickChange: this.$store.state.yesNoClickChange, // 维度转换是否被点击
|
||||
yesNoClickZZ: this.$store.state.yesNoClickZZ// 维度转换是否被点击
|
||||
}]))
|
||||
}
|
||||
}
|
||||
@@ -999,26 +1041,41 @@ export default {
|
||||
case '恢复默认':// 将分类id 和 分类数据从本地删除
|
||||
this.cutStatic(0)
|
||||
if (this.$store.state.transBefore) {
|
||||
if (JSON.parse(sessionStorage.getItem('classFiyData'))) {
|
||||
let arrtsBGY = JSON.parse(sessionStorage.getItem('classFiyData'))
|
||||
if (!arrtsBGY.find(item => item.id === this.defaultDataRight.id)) {
|
||||
// alert('默认数据已恢复!')
|
||||
if (JSON.parse(localStorage.getItem('classFiyData'))) {
|
||||
let arrtsBGY = JSON.parse(localStorage.getItem('classFiyData'))
|
||||
console.log(arrtsBGY)
|
||||
if (!arrtsBGY.find(item => item.type === this.$route.query.type)) {
|
||||
this.$alert('默认数据已恢复!', '温馨提示', {
|
||||
confirmButtonText: '确定'
|
||||
confirmButtonText: '确定',
|
||||
callback: actioon => {
|
||||
this.$router.go(0)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
arrtsBGY = arrtsBGY.filter((item, index) => {
|
||||
return item.id !== this.defaultDataRight.id
|
||||
console.log(item, 'item0')
|
||||
return item.type !== this.$route.query.type
|
||||
})
|
||||
if (arrtsBGY.length > 0) {
|
||||
localStorage.setItem('classFiyData', JSON.stringify(arrtsBGY))
|
||||
} else {
|
||||
localStorage.removeItem('classFiyData')
|
||||
}
|
||||
this.$alert('默认数据已恢复!', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: actioon => {
|
||||
this.$router.go(0)
|
||||
}
|
||||
})
|
||||
sessionStorage.setItem('classFiyData', JSON.stringify(arrtsBGY))
|
||||
}
|
||||
} else {
|
||||
// alert('默认数据已恢复!')
|
||||
this.$alert('默认数据已恢复!', '温馨提示', {
|
||||
confirmButtonText: '确定'
|
||||
confirmButtonText: '确定',
|
||||
callback: actioon => {
|
||||
this.$router.go(0)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$router.go(0)
|
||||
} else {
|
||||
this.$alert('暂无数据,恢复默认功能无法使用!', '温馨提示', {
|
||||
confirmButtonText: '确定'
|
||||
@@ -1245,28 +1302,61 @@ export default {
|
||||
// 调用接口请求默认显示数据
|
||||
let arrData = localStorage.getItem('classFiyData')
|
||||
if (!arrData) {
|
||||
this.$axios({
|
||||
method: 'GET',
|
||||
url: 'data/data/default',
|
||||
params: {
|
||||
type: this.$route.query.type
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res, '默认展示id10')
|
||||
this.$store.state.defaultDataId = res.data.data
|
||||
this.$store.state.selectDataLeft = res.data.data
|
||||
this.$store.state.selectfilter = this.$store.state.defaultDataId.f
|
||||
this.$refs.childChartsCut.searchSelect(this.$store.state.defaultDataId.f, 'default3')
|
||||
this.$refs.childChartCont.getInfor(this.$store.state.defaultDataId.id)
|
||||
})
|
||||
return
|
||||
}
|
||||
if (JSON.parse(arrData).find(item => item.type === this.$route.query.type)) {
|
||||
this.$store.state.defaultShowLabelAreaState = 'defaultLocal'
|
||||
console.log(JSON.parse(arrData).find(item => item.type === this.$route.query.type))
|
||||
// 调用子组件 searchSelect 方法渲染下拉
|
||||
// 赋值数据
|
||||
// console.log(JSON.parse(arrData).find(item => item.type === this.$route.query.type).transBefore, '赋值数据')
|
||||
this.$refs.childChartsCut.searchSelect(JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDataLeft.f, JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDate)
|
||||
this.$refs.childChartCont.getInfor(JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDataLeft.id)
|
||||
this.$store.state.selectDataLeft = JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDataLeft
|
||||
this.$store.state.selectfilter = this.$store.state.selectDataLeft.f
|
||||
this.$store.state.SelecttDimension = JSON.parse(arrData).find(item => item.type === this.$route.query.type).SelecttDimension
|
||||
this.$store.state.yesNoClickZZ = JSON.parse(arrData).find(item => item.type === this.$route.query.type).yesNoClickZZ
|
||||
this.$store.state.yesNoClickChange = JSON.parse(arrData).find(item => item.type === this.$route.query.type).yesNoClickChange
|
||||
if (this.$route.query.type === 'area') {
|
||||
let changeDarat = JSON.parse(JSON.stringify(JSON.parse(arrData).find(item => item.type === this.$route.query.type).allNochangeInitData))
|
||||
this.$store.state.transBefore = JSON.parse(JSON.stringify(changeDarat))
|
||||
this.$store.state.noChangeData = JSON.parse(JSON.stringify(changeDarat))
|
||||
this.$store.state.allNochangeInitData = JSON.parse(JSON.stringify(changeDarat))
|
||||
this.$store.state.newSelectLabelArea = JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDate.sequence
|
||||
this.$store.state.areaDimensionState = JSON.parse(arrData).find(item => item.type === this.$route.query.type).yesNoClickChange
|
||||
this.$store.state.yesNoClickChange = JSON.parse(arrData).find(item => item.type === this.$route.query.type).yesNoClickChange
|
||||
} else {
|
||||
this.$store.state.transBefore = JSON.parse(arrData).find(item => item.type === this.$route.query.type).allNochangeInitData
|
||||
this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.$store.state.transBefore))
|
||||
this.$store.state.allNochangeInitData = JSON.parse(arrData).find(item => item.type === this.$route.query.type).allNochangeInitData
|
||||
}
|
||||
console.log(this.$store.state.SelecttDimension, 'this.$store.state.advancedSearchState0000000000000000000000')
|
||||
this.$refs.childChartsCut.searchSelect(JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDataLeft.f, JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDate)
|
||||
this.$refs.childChartCont.getInfor(JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDataLeft.id)
|
||||
if (this.$store.state.yesNoClickChange && this.$route.query.type === 'area') {
|
||||
if ((this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') || (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb')) {
|
||||
this.$store.state.noSelecttDimension = 'dq'
|
||||
} else if ((this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'sj') || (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'dq')) {
|
||||
this.$store.state.noSelecttDimension = 'zb'
|
||||
} else if ((this.$store.state.SelecttDimension.col === 'dq' && this.$store.state.SelecttDimension.row === 'zb') || (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'dq')) {
|
||||
this.$store.state.noSelecttDimension = 'sj'
|
||||
}
|
||||
this.$store.state.newSelectChangeData = [JSON.parse(arrData).find(item => item.type === this.$route.query.type).selectDate.sequence.sequenceCont]
|
||||
|
||||
// this.$refs.childChartsCut.areaDimensionDo(true)
|
||||
}
|
||||
} else {
|
||||
this.$axios({
|
||||
method: 'GET',
|
||||
@@ -1277,6 +1367,10 @@ export default {
|
||||
}).then(res => {
|
||||
console.log(res, '默认展示id')
|
||||
this.$store.state.defaultDataId = res.data.data
|
||||
this.$store.state.selectDataLeft = res.data.data
|
||||
this.$store.state.selectfilter = this.$store.state.defaultDataId.f
|
||||
this.$refs.childChartsCut.searchSelect(this.$store.state.defaultDataId.f, 'default3')
|
||||
this.$refs.childChartCont.getInfor(this.$store.state.defaultDataId.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -1360,6 +1454,17 @@ export default {
|
||||
// 调用子组件的方法重置筛选数据
|
||||
childChartContShow (res) {
|
||||
this.$refs.childChartCont.getInfor(res)
|
||||
},
|
||||
// 调用子组件的方法重置维度转换下拉筛选数据
|
||||
changeCutShow () {
|
||||
this.$refs.childChartsCut.areaDimensionDo(true)
|
||||
// 重置三维转换默认选中
|
||||
this.$refs.childDimension.change3D()
|
||||
},
|
||||
// 调用子组件的方法重置维度转换下拉筛选数据
|
||||
change3Ds () {
|
||||
// 重置三维转换默认选中
|
||||
this.$refs.childDimension.change3D()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user