feat:修改联动

main
liu.shiyi 2 years ago
parent 6b463f4e74
commit c7d92e6be2

@ -7,6 +7,7 @@
:key="updateKey"
:class="{'light-theme':customTheme === 'light','auto-theme':customTheme =='auto','dark-theme':customTheme =='dark'}"
:config="option"
@click="rowClick"
/>
</div>
</template>
@ -48,6 +49,11 @@ export default {
this.chartInit()
},
methods: {
//
rowClick (row) {
console.log('点击')
this.linkage(row)
},
dataFormatting (config, data) {
const header = []
const dataList = []

@ -8,6 +8,7 @@
class="ranking-box"
:class="{'light-theme':customTheme === 'light','auto-theme':customTheme =='auto','dark-theme':customTheme =='dark'}"
:config="option"
@click="rowClick"
/>
</div>
</template>
@ -49,6 +50,11 @@ export default {
mounted () {
},
methods: {
//
rowClick (row) {
console.log(row)
this.linkage(row)
},
dataFormatting (config, data) {
const dataSourseList = []
data.data.forEach(item => {

@ -27,35 +27,8 @@ export default {
filterList = this.combineFilterList(isInner).filter(
field => ![undefined, ''].includes(field.value)
)
this.dataLinkageHandle(this.config, this.pageInfo.code, filterList)
},
// 数据联动时改变数据(与点击设置面板的更新按钮及初始化时的数据处理做区分)
async dataLinkageHandle (config, pageCode, filterList) {
const params = {
chart: {
...config,
option: undefined
},
current: 1,
pageCode,
type: config.type,
filterList,
treeParentId: this.treeParentId || '0'
}
this.dataLoading = true
return getUpdateChartInfo(params)
.then(res => {
console.log(2, res)
config = this.buildOption(config, res)
this.changeChartConfig(config)
this.changeChartKey(config.code)
})
.catch(error => {
console.error(error)
})
.finally(() => {
this.dataLoading = false
})
// this.dataLinkageHandle(this.config, this.pageInfo.code, filterList)
this.changeData(this.config, filterList)
},
/**
* 联动数据

Loading…
Cancel
Save