diff --git a/src/api/system/customForm.js b/src/api/system/customForm.js index d9e9198..06d9c1c 100644 --- a/src/api/system/customForm.js +++ b/src/api/system/customForm.js @@ -65,3 +65,11 @@ export function relationDestroy(params) { params }) } + +export function clone (params) { + return request({ + method: 'get', + url: '/api/admin/custom-form/clone-table', + params + }) +} diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 668e182..3859c95 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -96,6 +96,9 @@ const componentHandler = (path) => { // path为#,左边栏根目录无视图,##下级根目录无视图,$不显示在左边栏视图,^左边栏根目录有视图 export function generaMenu(routes, data) { data.forEach(item => { + if (!item.path) { + item.path = item.url + } let params = {}; if(item.path?.includes('?')){ let flag = item.path.split('?') diff --git a/src/views/component/detail.vue b/src/views/component/detail.vue new file mode 100644 index 0000000..d92c7c3 --- /dev/null +++ b/src/views/component/detail.vue @@ -0,0 +1,245 @@ + + + + + diff --git a/src/views/component/table.vue b/src/views/component/table.vue index f8c8fad..611a45c 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -411,16 +411,7 @@ 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 - ); + let fieldRes = fields.sort((a,b) => a.sort - b.sort) if ( !fields || !relation || diff --git a/src/views/system/components/linkWith.vue b/src/views/system/components/linkWith.vue index f76d712..a2a6968 100644 --- a/src/views/system/components/linkWith.vue +++ b/src/views/system/components/linkWith.vue @@ -45,6 +45,29 @@ export default { list: [], table: [ + { + prop: 'custom_form_field', + label: '对应显示字段', + customFn: (row) => { + return ( + { + row.custom_form_field = e + } + }}> + { + this.localFields.map(i => { + return ( + + ) + }) + } + + ); + }, + }, { prop: "local_key", label: "关联本地字段", diff --git a/src/views/system/form.vue b/src/views/system/form.vue index 6001fb6..6d4ad44 100644 --- a/src/views/system/form.vue +++ b/src/views/system/form.vue @@ -3,12 +3,28 @@
- +
- - + +
@@ -22,20 +38,48 @@ :destroy-action="destroy" :border="true" :table-item="table" - @editor="row => { - $refs['addForm'].setType('editor'); - $refs['addForm'].setId(row.id); - $refs['addForm'].show(); - }"> + @editor=" + (row) => { + $refs['addForm'].setType('editor'); + $refs['addForm'].setId(row.id); + $refs['addForm'].show(); + } + " + > @@ -46,7 +90,7 @@