处理弹窗中loading的加载问题
获取普文件列表接口参数调整
This commit is contained in:
parent
2eb703e2ac
commit
da3e09e847
|
@ -52,42 +52,42 @@
|
||||||
<!-- 底部按钮结束 -->
|
<!-- 底部按钮结束 -->
|
||||||
</custom-modal>
|
</custom-modal>
|
||||||
<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">
|
||||||
<div style="position: relative;padding-bottom: 40px;height: 460px;overflow: hidden;">
|
<a-spin :spinning="loading_file">
|
||||||
<a-table
|
<div style="position: relative;padding-bottom: 40px;height: 460px;overflow: hidden;">
|
||||||
v-if="tableType=='multiple'"
|
<a-table
|
||||||
:data-source="list_file"
|
v-if="tableType=='multiple'"
|
||||||
:columns="columns_file"
|
:data-source="list_file"
|
||||||
:loading="loading_file"
|
:columns="columns_file"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
>
|
>
|
||||||
</a-table>
|
</a-table>
|
||||||
<custom-table
|
<custom-table
|
||||||
v-if="tableType=='single'"
|
v-if="tableType=='single'"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
size="middle"
|
size="middle"
|
||||||
:columns="columns_file"
|
:columns="columns_file"
|
||||||
:list="list_file"
|
:list="list_file"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:loading="loading_file_edit"
|
:selectedRowKeys.sync="selectedRowKeys_edit"
|
||||||
:selectedRowKeys.sync="selectedRowKeys_edit"
|
:selectionRows.sync="selectionRows_edit"
|
||||||
:selectionRows.sync="selectionRows_edit"
|
>
|
||||||
>
|
</custom-table>
|
||||||
</custom-table>
|
<a-pagination
|
||||||
<a-pagination
|
size="small"
|
||||||
size="small"
|
v-model="ipagination.current"
|
||||||
v-model="ipagination.current"
|
:pageSize="ipagination.pageSize"
|
||||||
:pageSize="ipagination.pageSize"
|
:page-size-options="ipagination.pageSizeOptions"
|
||||||
:page-size-options="ipagination.pageSizeOptions"
|
show-size-changer
|
||||||
show-size-changer
|
show-quick-jumper
|
||||||
show-quick-jumper
|
:total="ipagination.total"
|
||||||
:total="ipagination.total"
|
:show-total="(total, range) => `Total ${total} items Page ${ipagination.current} / ${Math.ceil(total / ipagination.pageSize)}`"
|
||||||
:show-total="(total, range) => `Total ${total} items Page ${ipagination.current} / ${Math.ceil(total / ipagination.pageSize)}`"
|
show-less-items
|
||||||
show-less-items
|
@change="handlePageChange"
|
||||||
@change="handlePageChange"
|
@showSizeChange="handleSizeChange"
|
||||||
@showSizeChange="handleSizeChange"
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
</a-spin>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<a-space class="operators" :size="20">
|
<a-space class="operators" :size="20">
|
||||||
<a-button type="success" @click="saveFileName">Save</a-button>
|
<a-button type="success" @click="saveFileName">Save</a-button>
|
||||||
|
@ -200,7 +200,6 @@ export default {
|
||||||
uploading: false,
|
uploading: false,
|
||||||
currRowData: {},
|
currRowData: {},
|
||||||
currFileType: "_S_",
|
currFileType: "_S_",
|
||||||
loading_file_edit: false,
|
|
||||||
selectedRowKeys_edit: [],
|
selectedRowKeys_edit: [],
|
||||||
selectionRows_edit: [],
|
selectionRows_edit: [],
|
||||||
tableType: "multiple"
|
tableType: "multiple"
|
||||||
|
@ -231,13 +230,21 @@ export default {
|
||||||
},
|
},
|
||||||
getSpectrumFile(params) {
|
getSpectrumFile(params) {
|
||||||
this.loading_file = true
|
this.loading_file = true
|
||||||
getAction("/spectrumFile/get", params).then(res => {
|
let params_arg = {}
|
||||||
|
if (this.tableType==="multiple") {
|
||||||
|
params_arg = {...params}
|
||||||
|
} else {
|
||||||
|
params_arg = {...params,name:this.currFileType}
|
||||||
|
}
|
||||||
|
getAction("/spectrumFile/get", params_arg).then(res => {
|
||||||
this.loading_file = false
|
this.loading_file = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
res.result.records.forEach((item,index) => {
|
res.result.records.forEach((item,index) => {
|
||||||
item.id = index
|
item.id = index
|
||||||
})
|
})
|
||||||
this.ipagination.total = res.result.total
|
this.ipagination.total = res.result.total
|
||||||
|
this.ipagination.current = res.result.current
|
||||||
|
this.ipagination.pageSize = res.result.size
|
||||||
this.list_file = res.result.records
|
this.list_file = res.result.records
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("This operation fails. Contact your system administrator")
|
this.$message.warning("This operation fails. Contact your system administrator")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user