徐景良 2024-06-17 11:37:40 +08:00
commit 0627a833a2
1 changed files with 14 additions and 1 deletions

View File

@ -31,6 +31,9 @@
/>
</template>
</BasicForm>
<template v-for="(item, useIndex) in createOrModifyList[index]" :key="useIndex">
<CreateOrModifyComponent :data="item" />
</template>
</a-tab-pane>
</a-tabs>
</template>
@ -112,6 +115,11 @@
</template>
</a-table>
<!-- todo 创建/修改 /时间 -->
<template v-if="!(tabsColumns.length > 1)">
<template v-for="(item, index) in createOrModifyList" :key="index">
<CreateOrModifyComponent :data="item" />
</template>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
@ -130,6 +138,7 @@
import { CardGourp } from '@/components/FormViewer/index.ts';
import { subTableStore } from '@/store/modules/subTable';
import { changeCardStructure, cardNestStructure } from '@/views/demo/onlineform/util.ts';
import CreateOrModifyComponent from '@/views/demo/onlineform/formCall/CreateOrModifyComponent/index.vue';
const subTableDataStore = subTableStore();
@ -209,6 +218,10 @@
const arr: FormSchema[] = [];
data.tab.forEach((item) => {
if (item.field == 'Tabs') {
let arrayLength = item.componentProps.options.length
for(let i = 0; i < arrayLength; i++){
createOrModifyList.value.push([])
}
item.componentProps.options.forEach((val, index) => {
val.children.forEach((opt) => {
if (opt.rules !== undefined) {
@ -234,7 +247,7 @@
buttonLayout.value.push(opt);
}
if (['createuser', 'createtime', 'modifyuser', 'modifytime'].includes(opt.type)) {
createOrModifyList.value.push(opt);
createOrModifyList.value[index].push(opt);
}
subTableColumns.value = [
{