diff --git a/src/views/component/table.vue b/src/views/component/table.vue index 0b481cd..f8c8fad 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -411,6 +411,16 @@ export default { ['admins',[]] ]) let { fields, relation } = res; + let fieldRes = await fieldIndex( + { + page: 1, + page_size: 999, + custom_form_id: this.customForm.customFormId, + sort_name: "sort", + sort_type: "asc", + }, + false + ); if ( !fields || !relation || @@ -419,7 +429,7 @@ export default { ) { throw new Error("fields或relation格式错误"); } - fields.forEach((i, index) => { + fieldRes?.forEach((i, index) => { i._relations = relation.find((j) => j.local_key === i.field); if (i.select_item && typeof i.select_item === 'object') { let keys = Object.keys(i.select_item) diff --git a/src/views/system/components/linkWith.vue b/src/views/system/components/linkWith.vue index 9c0c33d..f76d712 100644 --- a/src/views/system/components/linkWith.vue +++ b/src/views/system/components/linkWith.vue @@ -58,7 +58,7 @@ export default { } }}> { - this.localFields.map(i => { + [{field:'id',name:'id'},...this.localFields].map(i => { return ( )