File List 表单上面增加“搜索框”用来查询数据

This commit is contained in:
renpy 2023-09-08 10:40:00 +08:00
parent 6ba65075be
commit 3cf42843c5

View File

@ -54,7 +54,17 @@
<a-modal v-model="visible_file" :width="1200" title="File List" @cancel="cancelFileModale">
<a-spin :spinning="loading_file">
<div style="position: relative;padding-bottom: 40px;height: 460px;overflow: hidden;">
//
<a-row type="flex" style="margin-bottom: 15px;">
<a-col flex="400px">
<a-input placeholder="search..." v-model="searchName" />
</a-col>
<a-col flex="108px">
<a-button class="search-btn" type="primary" @click="onSearchFileName">
<img src="@/assets/images/global/search.png" alt="" />
Search
</a-button>
</a-col>
</a-row>
<a-table
v-if="tableType=='multiple'"
:data-source="list_file"
@ -205,7 +215,8 @@ export default {
currFileType: "_S_",
selectedRowKeys_edit: [],
selectionRows_edit: [],
tableType: "multiple"
tableType: "multiple",
searchName: ""
}
},
methods: {
@ -243,9 +254,12 @@ export default {
this.tableType = str==="_S_"?"multiple":"single"
this.getSpectrumFile({pageNo:1,pageSize:10})
},
onSearchFileName() {
this.getSpectrumFile({pageNo:1,pageSize:10})
},
getSpectrumFile(params) {
this.loading_file = true
let params_arg = {...params,name:this.currFileType}
let params_arg = {...params,name:`${this.searchName?this.searchName+',':''}${this.currFileType}`}
getAction("/spectrumFile/get", params_arg).then(res => {
this.loading_file = false
if (res.success) {
@ -470,5 +484,7 @@ export default {
/deep/.ant-table-tbody .ant-table-row td{
cursor: pointer;
}
.ant-input{
width: 380px;
}
</style>