forked from github/dataease
feat(视图): 回退
This commit is contained in:
parent
eb809c7610
commit
2e8e9cc8e9
@ -301,16 +301,16 @@ export default {
|
|||||||
activated() {
|
activated() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData: async function(id) {
|
initTableData(id) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
await post('/dataset/table/get/' + id, null).then(response => {
|
post('/dataset/table/get/' + id, null).then(response => {
|
||||||
this.table = response.data
|
this.table = response.data
|
||||||
this.initTableField(id)
|
this.initTableField(id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initTableField: async function(id) {
|
initTableField(id) {
|
||||||
await post('/dataset/table/getFieldsFromDE', this.table).then(response => {
|
post('/dataset/table/getFieldsFromDE', this.table).then(response => {
|
||||||
this.dimension = response.data.dimension
|
this.dimension = response.data.dimension
|
||||||
this.quota = response.data.quota
|
this.quota = response.data.quota
|
||||||
})
|
})
|
||||||
@ -357,9 +357,9 @@ export default {
|
|||||||
closeEdit() {
|
closeEdit() {
|
||||||
this.$emit('switchComponent', { name: '' })
|
this.$emit('switchComponent', { name: '' })
|
||||||
},
|
},
|
||||||
getData: async function(id) {
|
getData(id) {
|
||||||
if (id) {
|
if (id) {
|
||||||
await post('/chart/view/getData/' + id, null).then(response => {
|
post('/chart/view/getData/' + id, null).then(response => {
|
||||||
this.initTableData(response.data.tableId)
|
this.initTableData(response.data.tableId)
|
||||||
this.view = JSON.parse(JSON.stringify(response.data))
|
this.view = JSON.parse(JSON.stringify(response.data))
|
||||||
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
||||||
|
Loading…
Reference in New Issue
Block a user