fanzhen0107
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
<el-row class="tac" v-if="defaultSelectLies">
|
||||
<el-col :span="24">
|
||||
<el-menu
|
||||
:default-openeds="defaultSelectLies"
|
||||
:default-openeds="$store.state.advancedSearchState?[]:defaultSelectLies"
|
||||
@open="handleOpen"
|
||||
@close="handleClose"
|
||||
@select="selectActive"
|
||||
@@ -180,6 +180,7 @@
|
||||
<!-- 列表 -->
|
||||
<!-- 图标切换 -->
|
||||
<ChartsCut
|
||||
v-show="$store.state.classifyIdDataState"
|
||||
@cutStatic="cutStatic"
|
||||
:defaultDataRight="defaultDataRight"
|
||||
@stateTell="stateTell"
|
||||
@@ -213,7 +214,7 @@
|
||||
:advancedStates="advancedStates"
|
||||
@tellParentsShowClos="tellParentsShowClos"
|
||||
@tellChangeFan="tellChangeFan"
|
||||
:loadings.sync="loading"
|
||||
:loadings.sync="loading&&$store.state.classifyIdDataState"
|
||||
></ChartsCont>
|
||||
</div>
|
||||
<div class="container">
|
||||
@@ -472,6 +473,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/*
|
||||
* @desc 触发子组件 childChartCont 的downLaSelects方法
|
||||
*/
|
||||
chuFachildChartCont () {
|
||||
console.log(this.$refs, 'this.$refs')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.childChartCont.downLaSelects()
|
||||
})
|
||||
},
|
||||
// 地区数据维度转换状态
|
||||
areaDimensionState (val) {
|
||||
console.log(val, 'bbbval')
|
||||
@@ -605,9 +615,12 @@ export default {
|
||||
case 4:// 导出至excel!!
|
||||
if (this.$store.state.transBefore) {
|
||||
let brt = new ComputedData()
|
||||
brt.insertCollectS(this.$store.state.tableData, this.$store.state.tableLine, this.$store.state.listInputVal, this.$store.state.lineInputVal)
|
||||
console.log(this.$store.state.selectDataLeft, '左侧选中数据')
|
||||
let objData = brt.insertCollectS(JSON.parse(JSON.stringify(this.$store.state.tableData)), JSON.parse(JSON.stringify(this.$store.state.tableLine)), JSON.parse(JSON.stringify(this.$store.state.listInputVal)), JSON.parse(JSON.stringify(this.$store.state.lineInputVal)))
|
||||
let objData = null
|
||||
if (this.indStatic === 0) {
|
||||
objData = brt.exportDataAll(JSON.parse(JSON.stringify(this.$store.state.tableData)), JSON.parse(JSON.stringify(this.$store.state.tableLine)))
|
||||
} else {
|
||||
objData = brt.insertCollectS(JSON.parse(JSON.stringify(this.$store.state.tableData)), JSON.parse(JSON.stringify(this.$store.state.tableLine)), JSON.parse(JSON.stringify(this.$store.state.listInputVal)), JSON.parse(JSON.stringify(this.$store.state.lineInputVal)))
|
||||
}
|
||||
// 调用接口导出至excel
|
||||
this.$axios({
|
||||
method: 'POST',
|
||||
@@ -653,75 +666,20 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$axios({
|
||||
method: 'GET',
|
||||
url: 'data/data/quick',
|
||||
params: {
|
||||
type: this.$store.state.selectDataLeft.f
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res, '时间筛选')
|
||||
console.log(Object.keys(res.data.data.list))
|
||||
// 请求接口完成 请求成功
|
||||
if (res.data.code === 200) {
|
||||
this.$axios({
|
||||
method: 'POST',
|
||||
url: 'data/data/query',
|
||||
data: {
|
||||
type: this.$route.query.type === 'area' ? 2 : 1,
|
||||
data: this.$store.state.advanceData,
|
||||
area: '',
|
||||
quota: '',
|
||||
cate: 1,
|
||||
f: this.$store.state.selectDataLeft.f,
|
||||
date: Object.keys(res.data.data.list)[0]
|
||||
|
||||
}
|
||||
}).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[0]
|
||||
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
|
||||
// 调用子组件 的方法渲染高级查询数据
|
||||
that.$nextTick(() => {
|
||||
// console.log(that.$refs.childChartsCut, 'that.$refs.childChartsCut')
|
||||
// 改变高级查询状态
|
||||
that.$store.state.advancedSearchState = true
|
||||
// 默认选中指标
|
||||
that.$store.state.labelIndexName = res.data.data.termsName[0]
|
||||
// 初次筛选的指标和地区名称
|
||||
that.$store.state.advanceQueryInit.labelName = res.data.data.termsName
|
||||
that.$store.state.advanceQueryInit.areaName = res.data.data.areaName
|
||||
that.$refs.childChartsCut.serializedData(res.data.data.termsName, res.data.data.areaName)
|
||||
// 恢复状态
|
||||
that.stateDFGHJ(false)
|
||||
})
|
||||
} else {
|
||||
that.$store.state.transBefore = null
|
||||
that.advancedStates = true
|
||||
}
|
||||
// 告诉子组件渲染高级查询数据
|
||||
}).catch((fail) => {
|
||||
console.log(fail)
|
||||
})
|
||||
}
|
||||
}).catch((fail) => {
|
||||
console.log(fail)
|
||||
that.cutStateSeach = 'simpleness'
|
||||
that.advancedStates = true
|
||||
// 调用子组件 的方法渲染高级查询数据
|
||||
that.$store.state.advancedSearchState = true
|
||||
console.log(this.$store.state.dataArealabelTime, 'this.$store.state.dataArealabelTime')
|
||||
console.log(this.$store.state.advanceData, 'this.$store.state.advanceData')
|
||||
this.$store.state.advancedSelectClassfiid = this.$store.state.advanceData.map((item, index) => {
|
||||
return item.classify_id
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
// 左侧菜单数据
|
||||
this.getCateData()
|
||||
this.childChartContShow(this.$store.state.advancedSelectClassfiid)
|
||||
this.$store.state.labelIndexName = this.$store.state.advanceData[0].nameText
|
||||
})
|
||||
break
|
||||
}
|
||||
@@ -1171,80 +1129,86 @@ export default {
|
||||
defaultSelectLie () {
|
||||
console.log(this.leftCateData, 'this.leftCateDatathis.leftCateDatathis.leftCateData')
|
||||
console.log(this.$route.query.defaultLeftId, 'this.$router.query.defaultLeftId')
|
||||
if (this.$route.query.defaultLeftId === 'default') { // 从导航中点击
|
||||
let stateStatic = []
|
||||
this.leftCateData.forEach((item1, index1) => {
|
||||
if (index1 === this.leftCateData.length - 1) {
|
||||
stateStatic.push('' + index1)
|
||||
if (item1.children) {
|
||||
item1.children.forEach((item2, index2) => {
|
||||
if (index2 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2)
|
||||
if (item2.children) {
|
||||
item2.children.forEach((item3, index3) => {
|
||||
if (index3 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2 + '-' + index3)
|
||||
if (item3.children) {
|
||||
item3.children.forEach((item4, index4) => {
|
||||
if (index4 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2 + '-' + index3 + '-' + index4)
|
||||
if (item4.children) {
|
||||
item4.children.forEach((item5, index5) => {
|
||||
if (index5 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2 + '-' + index3 + '-' + index4 + '-' + index5)
|
||||
}
|
||||
})
|
||||
// 非高级查询
|
||||
if (!this.$store.state.advancedSearchState) {
|
||||
if (this.$route.query.defaultLeftId === 'default') { // 从导航中点击
|
||||
let stateStatic = []
|
||||
this.leftCateData.forEach((item1, index1) => {
|
||||
if (index1 === this.leftCateData.length - 1) {
|
||||
stateStatic.push('' + index1)
|
||||
if (item1.children) {
|
||||
item1.children.forEach((item2, index2) => {
|
||||
if (index2 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2)
|
||||
if (item2.children) {
|
||||
item2.children.forEach((item3, index3) => {
|
||||
if (index3 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2 + '-' + index3)
|
||||
if (item3.children) {
|
||||
item3.children.forEach((item4, index4) => {
|
||||
if (index4 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2 + '-' + index3 + '-' + index4)
|
||||
if (item4.children) {
|
||||
item4.children.forEach((item5, index5) => {
|
||||
if (index5 === 0) {
|
||||
stateStatic.push('' + index1 + '-' + index2 + '-' + index3 + '-' + index4 + '-' + index5)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
this.defaultSelectLies = stateStatic
|
||||
console.log(this.defaultSelectLies, 'stateStatic')
|
||||
this.$store.state.openOpenLeft = stateStatic
|
||||
let dataDome = []
|
||||
console.log(stateStatic, '数据')
|
||||
console.log(this.leftCateData[this.leftCateData.length - 1], '数据length-1')
|
||||
})
|
||||
this.defaultSelectLies = stateStatic
|
||||
console.log(this.defaultSelectLies, 'stateStatic')
|
||||
this.$store.state.openOpenLeft = stateStatic
|
||||
let dataDome = []
|
||||
console.log(stateStatic, '数据')
|
||||
console.log(this.leftCateData[this.leftCateData.length - 1], '数据length-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[0].children !== undefined) {
|
||||
if (this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children !== undefined) {
|
||||
if (this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0].children !== undefined) {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0].children[0]
|
||||
// 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[0].children !== undefined) {
|
||||
if (this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children !== undefined) {
|
||||
if (this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0].children !== undefined) {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0].children[0]
|
||||
} else {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0]
|
||||
}
|
||||
} else {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0].children[0].children[0]
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0].children[0]
|
||||
}
|
||||
} else {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0].children[0]
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0]
|
||||
}
|
||||
} else {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1].children[0]
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1]
|
||||
}
|
||||
} else {
|
||||
dataDome = this.leftCateData[this.leftCateData.length - 1]
|
||||
this.defaultDataRight = dataDome
|
||||
this.$store.state.selectDataLeft = this.defaultDataRight
|
||||
console.log(this.defaultDataRight, '1250')
|
||||
console.log(this.$store.state.selectDataLeft, '12500')
|
||||
this.$store.state.selectfilter = this.defaultDataRight.f
|
||||
} else { // 从数据更新,快速
|
||||
this.defaultDataSelectDG()
|
||||
console.log(this.filterDataArr, '非导航左侧选中')
|
||||
console.log(this.filterDataArr.defaultCode, '代码')
|
||||
this.defaultSelectLies = this.filterDataArr.defaultCode
|
||||
this.$store.state.openOpenLeft = this.filterDataArr.defaultCode
|
||||
this.$store.state.selectDataLeft = this.filterDataArr.objectData
|
||||
this.defaultDataRight = this.filterDataArr.objectData
|
||||
this.$store.state.selectfilter = this.filterDataArr.objectData.f
|
||||
}
|
||||
this.defaultDataRight = dataDome
|
||||
this.$store.state.selectDataLeft = this.defaultDataRight
|
||||
console.log(this.defaultDataRight, '1250')
|
||||
console.log(this.$store.state.selectDataLeft, '12500')
|
||||
this.$store.state.selectfilter = this.defaultDataRight.f
|
||||
} else { // 从数据更新,快速
|
||||
this.defaultDataSelectDG()
|
||||
console.log(this.filterDataArr, '非导航左侧选中')
|
||||
console.log(this.filterDataArr.defaultCode, '代码')
|
||||
this.defaultSelectLies = this.filterDataArr.defaultCode
|
||||
this.$store.state.openOpenLeft = this.filterDataArr.defaultCode
|
||||
this.$store.state.selectDataLeft = this.filterDataArr.objectData
|
||||
this.defaultDataRight = this.filterDataArr.objectData
|
||||
this.$store.state.selectfilter = this.filterDataArr.objectData.f
|
||||
} else {
|
||||
// this.defaultDataRight = []
|
||||
// this.defaultSelectLies = []
|
||||
}
|
||||
},
|
||||
comTime (res) {
|
||||
@@ -1316,6 +1280,14 @@ export default {
|
||||
// 调用子组件的方法重置数据
|
||||
changeScreenCom () {
|
||||
this.$refs.childChartCont.initTableData()
|
||||
},
|
||||
// 调用子组件的方法重置筛选数据
|
||||
childChartsCutShow () {
|
||||
this.$refs.childChartsCut.showLabelArea()
|
||||
},
|
||||
// 调用子组件的方法重置筛选数据
|
||||
childChartContShow (res) {
|
||||
this.$refs.childChartCont.getInfor(res)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -1358,7 +1330,7 @@ export default {
|
||||
this.dataPos = this.$route.query.type
|
||||
// console.log(this.$route.query.type)
|
||||
this.initValue = this.computedNumberPx(200)
|
||||
console.log(this.computedNumberPx(200))
|
||||
// console.log(this.computedNumberPx(200))
|
||||
// 获取菜单信息
|
||||
this.getCateData()
|
||||
if (this.$route.query.type !== 'area') {
|
||||
|
||||
Reference in New Issue
Block a user