forked from github/dataease
Merge pull request #8893 from ulleo/dev
pref(X-Pack): 优化数据填报表单管理页面的查询框触发查询效果
This commit is contained in:
commit
af0e6d87ad
@ -602,7 +602,14 @@ export default {
|
||||
datasource: 'Datasource',
|
||||
table: 'Table',
|
||||
creator: 'Creator',
|
||||
createTime: 'Create Time'
|
||||
createTime: 'Create Time',
|
||||
operation: 'Operation',
|
||||
operator: 'Operator',
|
||||
operate_time: 'Operate Time',
|
||||
modify: 'Modify',
|
||||
show: 'Show',
|
||||
delete: 'Delete',
|
||||
show_data: 'Show Data'
|
||||
},
|
||||
data: {
|
||||
confirm_delete: 'Confirm delete?'
|
||||
@ -611,7 +618,8 @@ export default {
|
||||
confirm_enable: 'Confirm enable task?',
|
||||
confirm_disable: 'Confirm disable task?'
|
||||
},
|
||||
on_the_left: 'Please select a form on the left'
|
||||
on_the_left: 'Please select a form on the left',
|
||||
search_by_commit_name: 'Search by operator name'
|
||||
},
|
||||
detabs: {
|
||||
custom_sort: 'Custom Sort',
|
||||
|
@ -602,7 +602,14 @@ export default {
|
||||
datasource: '數據源',
|
||||
table: '數據庫表',
|
||||
creator: '創建人',
|
||||
createTime: '創建時間'
|
||||
createTime: '創建時間',
|
||||
operation: '操作',
|
||||
operator: '操作人',
|
||||
operate_time: '操作時間',
|
||||
modify: '修改',
|
||||
show: '查看',
|
||||
delete: '刪除',
|
||||
show_data: '查看數據'
|
||||
},
|
||||
data: {
|
||||
confirm_delete: '確認刪除?'
|
||||
@ -611,7 +618,9 @@ export default {
|
||||
confirm_enable: '確認啟動任務?(單次任務會新建下發任務)',
|
||||
confirm_disable: '確認停止任務?'
|
||||
},
|
||||
on_the_left: '請在左側選擇表單'
|
||||
on_the_left: '請在左側選擇表單',
|
||||
search_by_commit_name: '根據操作人名稱搜索'
|
||||
|
||||
},
|
||||
detabs: {
|
||||
custom_sort: '自定義排序',
|
||||
|
@ -601,7 +601,14 @@ export default {
|
||||
datasource: '数据源',
|
||||
table: '数据库表',
|
||||
creator: '创建人',
|
||||
createTime: '创建时间'
|
||||
createTime: '创建时间',
|
||||
operation: '操作',
|
||||
operator: '操作人',
|
||||
operate_time: '操作时间',
|
||||
modify: '修改',
|
||||
show: '查看',
|
||||
delete: '删除',
|
||||
show_data: '查看数据'
|
||||
},
|
||||
data: {
|
||||
confirm_delete: '确认删除?'
|
||||
@ -610,7 +617,8 @@ export default {
|
||||
confirm_enable: '确认启动任务?(单次任务会新建下发任务)',
|
||||
confirm_disable: '确认停止任务?'
|
||||
},
|
||||
on_the_left: '请在左侧选择表单'
|
||||
on_the_left: '请在左侧选择表单',
|
||||
search_by_commit_name: '根据操作人名称搜索'
|
||||
},
|
||||
detabs: {
|
||||
custom_sort: '自定义排序',
|
||||
|
@ -181,7 +181,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
:label="$t('data_fill.form.operation')"
|
||||
width="160"
|
||||
fixed="right"
|
||||
>
|
||||
@ -190,19 +190,19 @@
|
||||
type="text"
|
||||
@click="updateRow(scope.row.data)"
|
||||
>
|
||||
修改
|
||||
{{ $t('data_fill.form.modify') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="openRow(scope.row.data)"
|
||||
>
|
||||
查看
|
||||
{{ $t('data_fill.form.show') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="deleteRow(scope.row.data[paginationConfig.key])"
|
||||
>
|
||||
删除
|
||||
{{ $t('data_fill.form.delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -223,15 +223,16 @@
|
||||
:offset="16"
|
||||
>
|
||||
<el-input
|
||||
ref="search"
|
||||
ref="search2"
|
||||
v-model="operateName"
|
||||
:placeholder="$t('user.search_by_name')"
|
||||
:placeholder="$t('data_fill.search_by_commit_name')"
|
||||
prefix-icon="el-icon-search"
|
||||
class="name-email-search"
|
||||
size="small"
|
||||
clearable
|
||||
@blur="searchTableRecordData"
|
||||
@clear="searchTableRecordData"
|
||||
@clear="entryKey('record')"
|
||||
@keyup.enter.native="entryKey('record')"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -251,7 +252,7 @@
|
||||
<el-table-column
|
||||
key="operate"
|
||||
prop="operate"
|
||||
label="操作"
|
||||
:label="$t('data_fill.form.operation')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.operate === 'INSERT'">
|
||||
@ -271,7 +272,7 @@
|
||||
<el-table-column
|
||||
key="commitByName"
|
||||
prop="commitByName"
|
||||
label="操作人"
|
||||
:label="$t('data_fill.form.operator')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.commitByName ? scope.row.commitByName: scope.row.commitBy }}
|
||||
@ -280,7 +281,7 @@
|
||||
<el-table-column
|
||||
key="commitTime"
|
||||
prop="commitTime"
|
||||
label="操作时间"
|
||||
:label="$t('data_fill.form.operate_time')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ new Date(scope.row.commitTime).format("yyyy-MM-dd hh:mm:ss") }}
|
||||
@ -288,7 +289,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
key="id"
|
||||
label="操作"
|
||||
:label="$t('data_fill.form.operation')"
|
||||
prop="id"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@ -297,7 +298,7 @@
|
||||
type="text"
|
||||
@click="showData(scope.row)"
|
||||
>
|
||||
查看数据
|
||||
{{ $t('data_fill.form.show_data') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -325,7 +326,7 @@
|
||||
:offset="8"
|
||||
>
|
||||
<el-input
|
||||
ref="search"
|
||||
ref="search3"
|
||||
v-model="taskName"
|
||||
:placeholder="$t('commons.search_by_name')"
|
||||
prefix-icon="el-icon-search"
|
||||
@ -333,7 +334,8 @@
|
||||
size="small"
|
||||
clearable
|
||||
@blur="searchFormTaskData"
|
||||
@clear="searchFormTaskData"
|
||||
@clear="entryKey('task')"
|
||||
@keyup.enter.native="entryKey('task')"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -400,7 +402,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
key="id"
|
||||
label="操作"
|
||||
:label="$t('data_fill.form.operation')"
|
||||
prop="id"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@ -602,13 +604,31 @@ export default {
|
||||
this.tasks = []
|
||||
}
|
||||
this.initTable(this.param.id)
|
||||
},
|
||||
tabActive: function(newVal, oldVal) {
|
||||
this.resetPage()
|
||||
if (newVal === 'record') {
|
||||
this.searchTableRecordData()
|
||||
} else if (newVal === 'task') {
|
||||
this.searchFormTaskData()
|
||||
} else {
|
||||
this.searchTableData()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTable(this.param.id)
|
||||
},
|
||||
methods: {
|
||||
|
||||
entryKey(type) {
|
||||
if (type === 'record') {
|
||||
this.$refs.search2.focus()
|
||||
this.$refs.search2.blur()
|
||||
} else if (type === 'task') {
|
||||
this.$refs.search3.focus()
|
||||
this.$refs.search3.blur()
|
||||
}
|
||||
},
|
||||
initTable(id) {
|
||||
this.resetPage()
|
||||
this.searchTableData()
|
||||
@ -712,6 +732,7 @@ export default {
|
||||
|
||||
resetPage() {
|
||||
this.operateName = ''
|
||||
this.taskName = ''
|
||||
this.paginationConfig = {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
@ -734,12 +755,12 @@ export default {
|
||||
/* if (this.tabActive === 'dataPreview') {
|
||||
this.initTable(this.param.id)
|
||||
}*/
|
||||
if (this.tabActive === 'record') {
|
||||
/* if (this.tabActive === 'record') {
|
||||
this.searchTableRecordData()
|
||||
}
|
||||
if (this.tabActive === 'task') {
|
||||
this.searchFormTaskData()
|
||||
}
|
||||
}*/
|
||||
},
|
||||
|
||||
showData(row) {
|
||||
|
@ -54,8 +54,8 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
currentKey: {
|
||||
handler(newVal, oldVla) {
|
||||
if (newVal !== oldVla) {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.myTaskName = ''
|
||||
this.finishedTaskName = ''
|
||||
this.expiredTaskName = ''
|
||||
@ -436,7 +436,7 @@ export default {
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
key="id"
|
||||
label="操作"
|
||||
:label="$t('data_fill.form.operation')"
|
||||
prop="id"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@ -520,7 +520,7 @@ export default {
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
key="id"
|
||||
label="操作"
|
||||
:label="$t('data_fill.form.operation')"
|
||||
prop="id"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
Loading…
Reference in New Issue
Block a user