添加模块

This commit is contained in:
yangjun 2024-08-23 22:05:18 +08:00
parent 001b584e77
commit 421d82c686
2 changed files with 34 additions and 1 deletions

View File

@ -90,6 +90,11 @@
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
</a-table>
</a-col>
<!-- 自增表格两列关联 11 -->
<a-col v-else-if="item.type === '11'" :span="24">
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
</a-table>
</a-col>
<a-col v-else> </a-col>

View File

@ -151,6 +151,25 @@
</template>
</a-table>
</a-col>
<!-- 自增表格两列关联 10 -->
<a-col v-else-if="item.type === '11'" :span="24">
<div><a-button type="primary" @click="handleZzbg(item)" class="increase" preIcon="ant-design:plus-outlined">新增</a-button> </div>
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<button type="danger" @click="handleZzbgDel(item.list, record.sort)" class="ant-btn">删除</button>
</template>
<template v-else>
<a-input
placeholder="请输入内容"
v-model:value="record[column.key]"
@blur="handleTwoGlxm(item)"
style="width: 100%"
></a-input>
</template>
</template>
</a-table>
</a-col>
<a-col v-else> </a-col>
@ -249,6 +268,11 @@
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
</a-table>
</a-col>
<!-- 自增表格两列关联 11 -->
<a-col v-else-if="item.type === '11'" :span="24">
<a-table :columns="getTableZzColumns(item.zyJxdgPzxxList)" :dataSource="item.list" :pagination="false">
</a-table>
</a-col>
<a-col v-else> </a-col>
@ -315,7 +339,11 @@ function handleGlxm(item) {
//
var item3 = item2.zyJxdgPzxxList;
if (item3 != null && item3.length > 0) {
item2.list.push({ [item3[0].id]: title });
if (item2.type == '11') {
item2.list.push({ [item3[0].id]: '', [item3[1].id]: title });
} else {
item2.list.push({ [item3[0].id]: title });
}
}
}
}