提交 9cb3fade authored 作者: liuluyu's avatar liuluyu

Merge branch 'master' of http://47.97.51.208/root/zrch-risk-39

......@@ -79,6 +79,7 @@
"swagger-ui-dist": "^5.29.3",
"tinymce": "6.6.2",
"vditor": "^3.11.2",
"vkbeautify": "^0.99.3",
"vue": "^3.5.22",
"vue-cropper": "^0.6.5",
"vue-cropperjs": "^5.0.0",
......
......@@ -176,6 +176,9 @@ importers:
vditor:
specifier: ^3.11.2
version: 3.11.2
vkbeautify:
specifier: ^0.99.3
version: 0.99.3
vue:
specifier: ^3.5.22
version: 3.5.27(typescript@5.9.3)
......@@ -7619,6 +7622,9 @@ packages:
yaml:
optional: true
vkbeautify@0.99.3:
resolution: {integrity: sha512-2ozZEFfmVvQcHWoHLNuiKlUfDKlhh4KGsy54U0UrlLMR1SO+XKAIDqBxtBwHgNrekurlJwE8A9K6L49T78ZQ9Q==}
vue-component-type-helpers@2.2.12:
resolution: {integrity: sha512-YbGqHZ5/eW4SnkPNR44mKVc6ZKQoRs/Rux1sxC6rdwXb4qpbOSYfDr9DsTHolOTGmIKgM9j141mZbBeg05R1pw==}
......@@ -15963,6 +15969,8 @@ snapshots:
terser: 5.46.0
tsx: 4.21.0
vkbeautify@0.99.3: {}
vue-component-type-helpers@2.2.12: {}
vue-cropper@0.6.5: {}
......
......@@ -51,11 +51,11 @@ const gridOptions = reactive<VxeGridProps<RowVO>>({
{ field: 'itemName', title: '字段名称',width: "15%"},
{ field: 'values', title: '最近5年填报数据',width: "75%",
children: [
{ field: 'value1', title: '第一次',width: "15%"},
{ field: 'value2', title: '第二次',width: "15%"},
{ field: 'value3', title: '第三次',width: "15%"},
{ field: 'value4', title: '第四次',width: "15%"},
{ field: 'value5', title: '第五次',width: "15%"},
{ field: 'value0', title: '第一次',width: "15%"},
{ field: 'value1', title: '第二次',width: "15%"},
{ field: 'value2', title: '第三次',width: "15%"},
{ field: 'value3', title: '第四次',width: "15%"},
{ field: 'value4', title: '第五次',width: "15%"},
],
},
{ field: 'opt', title: '操作' ,width: "10%"},
......@@ -67,19 +67,24 @@ async function onDrawerShow(tplid: number) {
const retData = await findFillHistoryForCheck({
tplid: tplid
});
// 调试:查看数据结构
console.log('原始数据:', retData);
// 处理 values 数据
const processedData = retData.map(item => {
const processedData = retData.map((item, itemIndex) => {
const processedItem = {...item};
// 将 values 数组中的 value 属性提取出来
if (Array.isArray(processedItem.values)) {
processedItem.values.forEach((valueItem, index) => {
// 将每个 valueItem 的 value 属性设置到单独的字段中
processedItem[`value${index}`] = valueItem.value;
// 注意:index从0开始,但字段名应该从1开始
processedItem[`value${index + 1}`] = valueItem.value;
});
}
return processedItem;
});
console.log('处理后的数据:', processedData);
gridOptions.data = processedData;
return false;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论