fix: 修复组件选择数据集时,不选择直接点击确定,出现接口404的情况

main
wu.jian2 2 years ago
parent 9d1a6b5669
commit 97fbc9769a

@ -28,11 +28,7 @@
<data-set-select <data-set-select
:dataset-name="datasetName" :dataset-name="datasetName"
:ds-id="config.dataSource.businessKey" :ds-id="config.dataSource.businessKey"
@getDsId=" @getDsId="dsId => { getDataSetDetailsById(dsId, 'treeTable');}"
dsId => {
getDataSetDetailsById(dsId, 'treeTable');
}
"
/> />
</el-form-item> </el-form-item>
</div> </div>
@ -713,6 +709,7 @@ export default {
}, },
// //
getDataSetDetailsById (id, type) { getDataSetDetailsById (id, type) {
if (id) {
this.config.dataSource.businessKey = id this.config.dataSource.businessKey = id
getDataSetDetails(id).then(res => { getDataSetDetails(id).then(res => {
this.fieldsList = res.fields this.fieldsList = res.fields
@ -778,6 +775,7 @@ export default {
}) || [] }) || []
} }
}) })
}
}, },
// //
dimensionFieldListChange (list) { dimensionFieldListChange (list) {

@ -139,8 +139,6 @@ export default {
// return // return
// } // }
getUpdateChartInfo(params).then((res) => { getUpdateChartInfo(params).then((res) => {
console.log('更新组件数据', res)
console.log('更新组件数据', config)
// 数据集脚本前端执行 // 数据集脚本前端执行
if (res.executionByFrontend) { if (res.executionByFrontend) {
try { try {

@ -38,7 +38,6 @@ export default {
// 初始化缓存数据集字段 // 初始化缓存数据集字段
getCacheDataFields ({ commit, dispatch }, { dataSetId }) { getCacheDataFields ({ commit, dispatch }, { dataSetId }) {
getDataSetDetails(dataSetId).then(data => { getDataSetDetails(dataSetId).then(data => {
console.log(2, data)
commit('changeCacheDataFields', { dataSetId, data }) commit('changeCacheDataFields', { dataSetId, data })
commit('changeCacheDataParams', { dataSetId, data }) commit('changeCacheDataParams', { dataSetId, data })
}) })

Loading…
Cancel
Save