diff --git a/src/views/component/table.vue b/src/views/component/table.vue index 21c1727..f8df830 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -464,44 +464,41 @@ export default { // }) // } // this.form = res.fields - this.table = res.fields + this.table = this.form ?.filter((i) => i.list_show) .map((i) => { let linkOb = {}; - if (i.parameter_id) { - linkOb.customFn = (row) => { - return {row[i.link_with_name]?.value}; - }; - } - if (i.link_table_name) { - if (i.link_relation === "hasOne") { - linkOb.customFn = (row) => { + if (i._relations) { + let { link_relation, foreign_key, link_with_name } = i._relations + if (link_relation === 'newHasOne' || link_relation === 'hasOne') { + linkOb.customFn = row => { if (i.edit_input === "file") { return ( - {row[i.link_with_name]?.original_name} + {row[link_with_name]?.original_name} ); } else { return ( - {row[i.link_with_name]?.name || - row[i.link_with_name]?.no || - row[i.link_with_name]?.value} + {row[link_with_name]?.name || + row[link_with_name]?.no || + row[link_with_name]?.value} ); } - }; + } } - if (i.link_relation === "hasMany") { + + if (link_relation === "hasMany" || link_relation === 'newHasMany') { linkOb.customFn = (row) => { return (
- {row[i.link_with_name]?.map((o) => ( + {row[link_with_name]?.map((o) => ( {o?.name || o?.no || o?.value} ))}
diff --git a/src/views/system/components/editPane.vue b/src/views/system/components/editPane.vue index 0cb13d8..6fe4e06 100644 --- a/src/views/system/components/editPane.vue +++ b/src/views/system/components/editPane.vue @@ -23,6 +23,36 @@ placeholder="请输入帮助文字" > + +
+
+ + +
+ +
+
+
+
+ +
+
+ + +
+
@@ -140,7 +173,6 @@