feat(X-Pack):【数据填报】编辑表单前端入口调整

This commit is contained in:
ulleo 2024-05-22 15:38:41 +08:00
parent af908c4a9a
commit 5d97fde259
6 changed files with 56 additions and 5 deletions

View File

@ -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',

View File

@ -608,6 +608,8 @@ export default {
rename: '重命名',
untitled: '未命名表單',
create_new_form: '新建表單',
copy_new_form: '復制表單',
edit_form: '編輯表單',
title: '標題',
no_form: '暫無表單,點擊',
form_list_name: '填報表單',

View File

@ -606,6 +606,8 @@ export default {
rename: '重命名',
untitled: '未命名表单',
create_new_form: '新建表单',
copy_new_form: '复制表单',
edit_form: '编辑表单',
title: '标题',
no_form: '暂无表单,点击',
form_list_name: '填报表单',

View File

@ -72,6 +72,11 @@
:span="8"
>
<!-- 编辑 todo -->
<el-button
v-if="hasDataPermission('manage', data.privileges)"
type="primary"
@click="editForm(param)"
>{{ $t('panel.edit') }}</el-button>
</el-col>
</el-row>
@ -868,6 +873,10 @@ export default {
}*/
},
editForm(param) {
this.$emit('editForm', param)
},
showData(row) {
searchTable(this.param.id, {
primaryKeyValue: row.dataId,

View File

@ -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"
/>
<span class="text16 margin-left12">
<span
v-if="$route.query.copy"
class="text16 margin-left12"
>
{{ $t('data_fill.form.copy_new_form') }}
</span>
<span
v-else-if="$route.query.id"
class="text16 margin-left12"
>
{{ $t('data_fill.form.edit_form') }}
</span>
<span
v-else
class="text16 margin-left12"
>
{{ $t('data_fill.form.create_new_form') }}
</span>
</div>

View File

@ -386,6 +386,18 @@ export default {
</el-dropdown>
</template>
<span
v-if="data.nodeType !== 'folder'"
@click.stop
>
<el-button
icon="el-icon-edit"
type="text"
size="small"
@click="editForm(data)"
/>
</span>
<span
style="margin-left: 12px"
@click.stop
@ -410,20 +422,22 @@ export default {
{{ $t('panel.rename') }}
</el-dropdown-item>
<el-dropdown-item
icon="el-icon-edit-outline"
v-if="data.nodeType !== 'folder'"
icon="el-icon-edit"
:command="beforeClickMore('edit', data, node)"
>
{{ $t('panel.edit') }}
</el-dropdown-item>
<el-dropdown-item
icon="el-icon-right"
:command="beforeClickMore('move',data,node)"
:command="beforeClickMore('move', data, node)"
>
{{ $t('dataset.move_to') }}
</el-dropdown-item>
<el-dropdown-item
v-if="data.nodeType !== 'folder'"
icon="el-icon-document-copy"
:command="beforeClickMore('copy',data,node)"
:command="beforeClickMore('copy', data, node)"
>
{{ $t('dataset.copy') }}
</el-dropdown-item>
@ -454,6 +468,7 @@ export default {
<view-table
v-else
:param="displayFormData"
@editForm="editForm"
/>
</el-main>