feat:修复业务组件数据回显问题

main
liu.shiyi 2 years ago
parent 62ff66f146
commit 9f7dc56519

@ -13,8 +13,10 @@ import * as $dataRoomAxios from 'data-room-ui/js/utils/http.js'
import { registerConfig } from '@gcpaas/data-room-ui'
import remoteComponents from '@/remoteComponents/exports.js'
import customDatasetComponents from '@/customDatasetComponents/exports.js'
import { Column } from '@antv/g2plot';
// import customPlots from '@/customPlots/exports'
Vue.use(ElementUI, { size: 'mini' })
Vue.prototype.Column = Column
registerConfig(
{
routers: {

@ -85,7 +85,7 @@ export default {
const data = await getBizComponentInfo(this.$route.query?.code)
this.vueContentInner = data.vueContent
this.settingContentInner = data.settingContent
this.dataFormatting(this.config)
this.config = this.dataFormatting(this.config)
this.remoteComponent = remoteVueLoader('data:text/plain,' + encodeURIComponent(this.vueContentInner))
this.loading = false
}
@ -105,7 +105,7 @@ export default {
//
getRemoteComponent () {
this.loading = true
this.dataFormatting(this.config, { success: false })
this.config = this.dataFormatting(this.config, { success: false })
this.remoteComponent = remoteVueLoader('data:text/plain,' + encodeURIComponent(this.vueContentInner))
this.loading = false
},
@ -115,6 +115,7 @@ export default {
*/
// config.settingoption
transformSettingToOption (config, type) {
let option = null
config.setting.forEach(set => {
if (set.optionField) {
@ -154,7 +155,7 @@ export default {
config.option.data = data
} else {
//
config.option.data = this.plotList?.find(plot => plot.name === config.name)?.option?.data
config.option.data = this.plotList?.find(plot => plot.name === config.name)?.option?.data || config.option.data
}
return config
},

Loading…
Cancel
Save