|
|
@@ -25,13 +25,29 @@
|
|
|
<v-row>
|
|
|
<v-col cols="6">
|
|
|
<MCard title="候选元数据">
|
|
|
+ <template #title>
|
|
|
+ <div style="width: 200px; font-weight: normal;">
|
|
|
+ <v-text-field
|
|
|
+ v-model="candidate.search"
|
|
|
+ placeholder="请输入名称"
|
|
|
+ outlined
|
|
|
+ hide-details
|
|
|
+ dense
|
|
|
+ clearable
|
|
|
+ append-icon="mdi-magnify"
|
|
|
+ @click:append="handleCandidateSearch"
|
|
|
+ @keyup.enter="handleCandidateSearch"
|
|
|
+ @click:clear="handleCandidateSearch"
|
|
|
+ ></v-text-field>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<table-list
|
|
|
ref="candidateTable"
|
|
|
:loading="candidate.loading"
|
|
|
:headers="candidate.headers"
|
|
|
:items="candidate.items"
|
|
|
:total="candidate.total"
|
|
|
- height="400px"
|
|
|
+ :height="candidate.items.length > 0 ? '400px' : '490px'"
|
|
|
:select-item="true"
|
|
|
fixed-header
|
|
|
:page-info="candidate.pageInfo"
|
|
|
@@ -101,6 +117,7 @@ export default {
|
|
|
size: 10,
|
|
|
current: 1
|
|
|
},
|
|
|
+ search: null,
|
|
|
items: [],
|
|
|
selected: [],
|
|
|
headers: [
|
|
|
@@ -190,7 +207,8 @@ export default {
|
|
|
this.candidate.loading = true
|
|
|
try {
|
|
|
const { data } = await api.getMetaDataList({
|
|
|
- ...this.candidate.pageInfo
|
|
|
+ ...this.candidate.pageInfo,
|
|
|
+ name_zh: this.candidate.search
|
|
|
})
|
|
|
this.candidate.items = data.records || []
|
|
|
this.candidate.total = data.total || 0
|
|
|
@@ -204,6 +222,10 @@ export default {
|
|
|
this.candidate.pageInfo.current = index
|
|
|
this.getCandidate()
|
|
|
},
|
|
|
+ handleCandidateSearch () {
|
|
|
+ this.candidate.pageInfo.current = 1
|
|
|
+ this.getCandidate()
|
|
|
+ },
|
|
|
// 处理候选列表选中
|
|
|
handleCandidateSelected (selectedItems) {
|
|
|
this.candidate.selected = selectedItems
|