diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index 965787806c..f99895c847 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -608,6 +608,8 @@ export default { rename: 'Rename', untitled: 'Untitled', create_new_form: 'Create New Form', + copy_new_form: 'Copy Form', + edit_form: 'Edit Form', title: 'Title', no_form: 'Click to Create New', form_list_name: 'Form List', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index 68c52af545..e3d2e0dfd3 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -608,6 +608,8 @@ export default { rename: '重命名', untitled: '未命名表單', create_new_form: '新建表單', + copy_new_form: '復制表單', + edit_form: '編輯表單', title: '標題', no_form: '暫無表單,點擊', form_list_name: '填報表單', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index 8234cc151a..5575ebdbc5 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -606,6 +606,8 @@ export default { rename: '重命名', untitled: '未命名表单', create_new_form: '新建表单', + copy_new_form: '复制表单', + edit_form: '编辑表单', title: '标题', no_form: '暂无表单,点击', form_list_name: '填报表单', diff --git a/core/frontend/src/views/dataFilling/form/ViewTable.vue b/core/frontend/src/views/dataFilling/form/ViewTable.vue index 7558b216dc..294254d666 100644 --- a/core/frontend/src/views/dataFilling/form/ViewTable.vue +++ b/core/frontend/src/views/dataFilling/form/ViewTable.vue @@ -72,6 +72,11 @@ :span="8" > + {{ $t('panel.edit') }} @@ -868,6 +873,10 @@ export default { }*/ }, + editForm(param) { + this.$emit('editForm', param) + }, + showData(row) { searchTable(this.param.id, { primaryKeyValue: row.dataId, diff --git a/core/frontend/src/views/dataFilling/form/create.vue b/core/frontend/src/views/dataFilling/form/create.vue index 2984e22093..6f9c9da46c 100644 --- a/core/frontend/src/views/dataFilling/form/create.vue +++ b/core/frontend/src/views/dataFilling/form/create.vue @@ -283,7 +283,13 @@ export default { methods: { closeCreate: function() { // back to forms list - this.$router.replace('/data-filling/forms') + if (this.$route.query.copy) { + this.$router.replace({ name: 'data-filling-form', query: { id: this.$route.query.copy }}) + } else if (this.$route.query.id) { + this.$router.replace({ name: 'data-filling-form', query: { id: this.$route.query.id }}) + } else { + this.$router.replace('/data-filling/forms') + } }, onMoveInComponentList(e, originalEvent) { if (e.relatedContext?.component?.$el?.id === 'form-drag-place') { @@ -465,7 +471,22 @@ export default { class="toolbar-icon-active icon20" @click="closeCreate" /> - + + {{ $t('data_fill.form.copy_new_form') }} + + + {{ $t('data_fill.form.edit_form') }} + + {{ $t('data_fill.form.create_new_form') }} diff --git a/core/frontend/src/views/dataFilling/form/index.vue b/core/frontend/src/views/dataFilling/form/index.vue index dedf1d6514..19ffa1269d 100644 --- a/core/frontend/src/views/dataFilling/form/index.vue +++ b/core/frontend/src/views/dataFilling/form/index.vue @@ -386,6 +386,18 @@ export default { + + + + {{ $t('panel.edit') }} {{ $t('dataset.move_to') }} {{ $t('dataset.copy') }} @@ -454,6 +468,7 @@ export default {