File List 表单上面增加“搜索框”用来查询数据
This commit is contained in:
parent
6ba65075be
commit
3cf42843c5
|
@ -54,7 +54,17 @@
|
||||||
<a-modal v-model="visible_file" :width="1200" title="File List" @cancel="cancelFileModale">
|
<a-modal v-model="visible_file" :width="1200" title="File List" @cancel="cancelFileModale">
|
||||||
<a-spin :spinning="loading_file">
|
<a-spin :spinning="loading_file">
|
||||||
<div style="position: relative;padding-bottom: 40px;height: 460px;overflow: hidden;">
|
<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
|
<a-table
|
||||||
v-if="tableType=='multiple'"
|
v-if="tableType=='multiple'"
|
||||||
:data-source="list_file"
|
:data-source="list_file"
|
||||||
|
@ -205,7 +215,8 @@ export default {
|
||||||
currFileType: "_S_",
|
currFileType: "_S_",
|
||||||
selectedRowKeys_edit: [],
|
selectedRowKeys_edit: [],
|
||||||
selectionRows_edit: [],
|
selectionRows_edit: [],
|
||||||
tableType: "multiple"
|
tableType: "multiple",
|
||||||
|
searchName: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -243,9 +254,12 @@ export default {
|
||||||
this.tableType = str==="_S_"?"multiple":"single"
|
this.tableType = str==="_S_"?"multiple":"single"
|
||||||
this.getSpectrumFile({pageNo:1,pageSize:10})
|
this.getSpectrumFile({pageNo:1,pageSize:10})
|
||||||
},
|
},
|
||||||
|
onSearchFileName() {
|
||||||
|
this.getSpectrumFile({pageNo:1,pageSize:10})
|
||||||
|
},
|
||||||
getSpectrumFile(params) {
|
getSpectrumFile(params) {
|
||||||
this.loading_file = true
|
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 => {
|
getAction("/spectrumFile/get", params_arg).then(res => {
|
||||||
this.loading_file = false
|
this.loading_file = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
@ -470,5 +484,7 @@ export default {
|
||||||
/deep/.ant-table-tbody .ant-table-row td{
|
/deep/.ant-table-tbody .ant-table-row td{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.ant-input{
|
||||||
|
width: 380px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user