Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zrch-risk-39
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
zrch-risk-39
Commits
4b392f21
提交
4b392f21
authored
2月 27, 2026
作者:
kxjia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tb2.vue 修改
上级
deef9285
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
39 行增加
和
5 行删除
+39
-5
Tb2.vue
...isk-client-39/src/views/baosong/report/components/Tb2.vue
+13
-0
MultiColumnTable.vue
...views/baosong/report/tableComponents/MultiColumnTable.vue
+26
-5
没有找到文件。
zrch-risk-client-39/src/views/baosong/report/components/Tb2.vue
浏览文件 @
4b392f21
...
...
@@ -517,6 +517,19 @@ function collectAllFields(content, fields = []) {
collectAllFields
(
item
.
extraFields
[
key
],
fields
);
}
}
if
(
item
.
formType
===
'AttachTable'
&&
item
.
gridOptions
&&
item
.
gridOptions
.
datas
)
{
for
(
const
data
of
item
.
gridOptions
.
datas
)
{
for
(
const
key
in
data
)
{
if
(
data
[
key
]
&&
typeof
data
[
key
]
===
'object'
&&
data
[
key
].
field
)
{
fields
.
push
({
field
:
data
[
key
].
field
,
formType
:
data
[
key
].
formType
});
if
(
data
[
key
].
otherField
)
{
fields
.
push
({
field
:
data
[
key
].
otherField
,
formType
:
'input'
});
}
}
}
}
}
}
return
fields
;
...
...
zrch-risk-client-39/src/views/baosong/report/tableComponents/MultiColumnTable.vue
浏览文件 @
4b392f21
...
...
@@ -528,20 +528,41 @@ const getFormData = () => {
}
const
setFormData
=
(
dataVale
)
=>
{
console
.
log
(
'MultiColumnTable setFormData called, dataVale:'
,
dataVale
);
tableData
.
value
=
dataVale
.
map
(
row
=>
{
const
newRow
=
{
...
row
}
props
.
fields
.
forEach
(
field
=>
{
if
(
field
.
formType
===
'table'
)
{
field
.
gridOptions
.
data
=
JSON
.
parse
(
row
[
field
.
field
])
const
fieldWithGrid
=
field
as
any
;
fieldWithGrid
.
gridOptions
.
data
=
JSON
.
parse
(
row
[
field
.
field
])
}
else
if
(
field
.
formType
===
'AttachTable'
)
{
const
key
=
`
${
field
.
field
}
_
${
dataVale
.
indexOf
(
row
)}
`
;
const
child
=
attchTableRefs
.
value
[
key
];
console
.
log
(
'MultiColumnTable AttachTable - key:'
,
key
,
'child:'
,
child
,
'row:'
,
row
);
if
(
child
&&
child
.
setFormData
)
{
child
.
setFormData
(
dataVale
)
const
tableData
=
{};
const
fieldWithGrid
=
field
as
any
;
console
.
log
(
'MultiColumnTable AttachTable - fieldWithGrid:'
,
fieldWithGrid
);
if
(
fieldWithGrid
.
gridOptions
&&
fieldWithGrid
.
gridOptions
.
datas
)
{
console
.
log
(
'MultiColumnTable AttachTable - gridOptions.datas:'
,
fieldWithGrid
.
gridOptions
.
datas
);
fieldWithGrid
.
gridOptions
.
datas
.
forEach
((
dataRow
:
any
,
rowIndex
:
number
)
=>
{
console
.
log
(
`MultiColumnTable AttachTable - dataRow[
${
rowIndex
}
]:`
,
dataRow
);
Object
.
values
(
dataRow
).
forEach
((
cellValue
:
any
,
cellIndex
:
number
)
=>
{
console
.
log
(
`MultiColumnTable AttachTable - cellValue[
${
cellIndex
}
]:`
,
cellValue
);
if
(
cellValue
&&
typeof
cellValue
===
'object'
&&
cellValue
.
field
)
{
console
.
log
(
`MultiColumnTable AttachTable - found field:
${
cellValue
.
field
}
, value in row:`
,
row
[
cellValue
.
field
]);
tableData
[
cellValue
.
field
]
=
row
[
cellValue
.
field
];
}
});
});
}
console
.
log
(
'MultiColumnTable AttachTable - final tableData:'
,
tableData
);
child
.
setFormData
(
tableData
);
}
}
else
if
(
field
.
formType
===
'combinaform'
)
{
if
(
field
.
childs
&&
Array
.
isArray
(
field
.
childs
))
{
field
.
childs
.
forEach
(
child
=>
{
const
fieldWithChilds
=
field
as
any
;
if
(
fieldWithChilds
.
childs
&&
Array
.
isArray
(
fieldWithChilds
.
childs
))
{
fieldWithChilds
.
childs
.
forEach
((
child
:
any
)
=>
{
if
(
child
.
formType
===
'checkbox'
&&
!
Array
.
isArray
(
newRow
[
child
.
field
]))
{
newRow
[
child
.
field
]
=
[]
}
...
...
@@ -569,7 +590,7 @@ const gridEvents: VxeGridListeners = {
toolbarButtonClick
(
params
)
{
if
(
params
.
code
===
"add"
)
{
const
fieldName
=
params
.
button
.
field
const
fieldName
=
(
params
.
button
as
any
)
.
field
const
fieldConfig
=
props
.
fields
.
find
(
field
=>
field
.
field
===
fieldName
)
if
(
fieldConfig
&&
fieldConfig
.
gridOptions
)
{
const
newRow
:
Record
<
string
,
any
>
=
{}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论