forked from github/dataease
feat(视图): 表格支持阈值设置
This commit is contained in:
parent
12d8e572ba
commit
dad55e3862
@ -360,7 +360,6 @@ span {
|
||||
.value-item {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
.select-item {
|
||||
|
@ -207,7 +207,7 @@
|
||||
class="render-select"
|
||||
style="width: 100px"
|
||||
size="mini"
|
||||
@change="changeChartType()"
|
||||
@change="changeChartRender()"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pluginRenderOptions"
|
||||
@ -1469,7 +1469,7 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
buildParam(getData, trigger, needRefreshGroup = false, switchType = false) {
|
||||
buildParam(getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) {
|
||||
if (!this.view.resultCount ||
|
||||
this.view.resultCount === '' ||
|
||||
isNaN(Number(this.view.resultCount)) ||
|
||||
@ -1477,6 +1477,9 @@ export default {
|
||||
parseInt(this.view.resultCount) < 1) {
|
||||
this.view.resultCount = '1000'
|
||||
}
|
||||
if (switchType) {
|
||||
this.view.senior.threshold.tableThreshold = []
|
||||
}
|
||||
if (switchType && (this.view.type === 'table-info' || this.chart.type === 'table-info') && this.view.xaxis.length > 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
@ -1663,9 +1666,9 @@ export default {
|
||||
delete view.data
|
||||
return view
|
||||
},
|
||||
calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
|
||||
calcData(getData, trigger, needRefreshGroup = false, switchType = false, switchRender = false) {
|
||||
this.changeEditStatus(true)
|
||||
const view = this.buildParam(true, 'chart', false, switchType)
|
||||
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
||||
if (!view) return
|
||||
viewEditSave(this.panelInfo.id, view).then(() => {
|
||||
// this.getData(this.param.id)
|
||||
@ -2490,6 +2493,10 @@ export default {
|
||||
this.hasEdit = status
|
||||
this.$store.commit('recordViewEdit', { viewId: this.param.id, hasEdit: status })
|
||||
},
|
||||
changeChartRender() {
|
||||
this.setChartDefaultOptions()
|
||||
this.calcData(true, 'chart', true, false, true)
|
||||
},
|
||||
changeChartType() {
|
||||
this.setChartDefaultOptions()
|
||||
this.calcData(true, 'chart', true, true)
|
||||
|
Loading…
Reference in New Issue
Block a user