【表单发布后】详情disable 选项卡

zzq
Zhufu 2024-06-12 13:56:06 +08:00
parent 97147b4c1b
commit 632f3bbf26
1 changed files with 32 additions and 2 deletions

View File

@ -408,13 +408,43 @@
}
if (!unref(isUpdate) && unref(isDetail)) {
getTitle.value = '详情';
let isTabs = false
data.tab = changeCardStructure(data.tab)
data.tab.forEach(itemComponent => {
if(itemComponent.component){
if(itemComponent.component === 'Tabs'){
isTabs = true
itemComponent.componentProps.options.forEach(itemChild => {
itemChild.children.forEach(itemChildComponent => {
if(itemChildComponent.component){
itemChildComponent.componentProps.disabled = true
}
})
})
}else if(itemComponent.component){
itemComponent.componentProps.disabled = true
}
})
data.tab = cardNestStructure(data.tab)
if(isTabs){
data.tab = data.tab[0]
data.tab.componentProps.options = data.tab.componentProps.options.map(item => {
return {
value: item.value,
label: item.label,
schemas: item.children
}
})
data.tab.componentProps.options = cardNestStructure(data.tab.componentProps.options)
data.tab.componentProps.options = data.tab.componentProps.options.map(item => {
return {
value: item.value,
label: item.label,
children: item.schemas
}
})
tabsColumns.value = data.tab.componentProps.options
}else{
data.tab = cardNestStructure(data.tab)
}
if (Object.keys(cardValues.value).length > 0) {
Object.keys(cardValues.value).forEach((cardItem) => {
let cardItemKeyList = Object.keys(cardValues.value[cardItem]);