diff --git a/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue b/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue index 4a00a5cc..7a0cc50b 100644 --- a/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue +++ b/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue @@ -88,13 +88,13 @@ @@ -312,7 +312,12 @@ watch( watch( () => props.columns, (newValue: any) => { - setTableColumns(newValue); + // 赋值列字段值是否隐藏,state.columns多了一列索引列 + if (newValue.length + 1 == state.columns.length) { + for (let i = 0; i < newValue.length; i++) { + state.columns[i + 1].hidden = !newValue[i].show; + } + } }, { deep: true, @@ -507,7 +512,9 @@ const onGenerateJson = async () => { for (let selectionData of selectionDatas) { let obj = {}; for (let column of state.columns) { - obj[column.title] = selectionData[column.dataKey]; + if (column.show) { + obj[column.title] = selectionData[column.dataKey]; + } } jsonObj.push(obj); } diff --git a/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue b/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue index d5802a88..f6df1029 100644 --- a/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue +++ b/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue @@ -35,6 +35,16 @@ + + + + + + 提交 diff --git a/mayfly_go_web/src/views/ops/tag/TagTreeList.vue b/mayfly_go_web/src/views/ops/tag/TagTreeList.vue index cd43d44e..6700ee98 100644 --- a/mayfly_go_web/src/views/ops/tag/TagTreeList.vue +++ b/mayfly_go_web/src/views/ops/tag/TagTreeList.vue @@ -4,7 +4,7 @@ 添加
- +