forked from github/dataease
fix(图表): 修复图表复制字段无法保存的问题
This commit is contained in:
parent
a45381e6e8
commit
ed137a7caf
@ -214,22 +214,9 @@ provide('quota', () => state.quota)
|
|||||||
watch(
|
watch(
|
||||||
[() => view.value['tableId']],
|
[() => view.value['tableId']],
|
||||||
() => {
|
() => {
|
||||||
if (props.view.id) {
|
|
||||||
fieldLoading.value = true
|
fieldLoading.value = true
|
||||||
deleteChartFieldByChartId(props.view.id)
|
deleteChartFieldByChartId(props.view.id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
watchDs()
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
fieldLoading.value = false
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
watchDs()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
)
|
|
||||||
const watchDs = () => {
|
|
||||||
getFields(props.view.tableId, props.view.id, props.view.type)
|
getFields(props.view.tableId, props.view.id, props.view.type)
|
||||||
const nodeId = view.value['tableId']
|
const nodeId = view.value['tableId']
|
||||||
if (!!nodeId) {
|
if (!!nodeId) {
|
||||||
@ -239,7 +226,13 @@ const watchDs = () => {
|
|||||||
if (node?.data) {
|
if (node?.data) {
|
||||||
curDatasetWeight.value = node.data.weight
|
curDatasetWeight.value = node.data.weight
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
.catch(() => {
|
||||||
|
fieldLoading.value = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
)
|
||||||
const getFields = (id, chartId, type) => {
|
const getFields = (id, chartId, type) => {
|
||||||
if (id && chartId) {
|
if (id && chartId) {
|
||||||
fieldLoading.value = true
|
fieldLoading.value = true
|
||||||
|
Loading…
Reference in New Issue
Block a user