fix:修改表格loading bug
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
:targetTab="targetTab"
|
||||
@changeTab="changeTab"
|
||||
class="full-width-height"
|
||||
v-loading="tools.loading"
|
||||
>
|
||||
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
||||
<template v-slot:top-tool-right>
|
||||
@@ -19,7 +20,6 @@
|
||||
<template v-slot>
|
||||
<alertMessageTable
|
||||
ref="dataTable"
|
||||
v-loading="tools.loading"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="mainTableHeight"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<asset-table
|
||||
ref="dataTable"
|
||||
:api="url"
|
||||
v-loading="tools.loading"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="mainTableHeight"
|
||||
:table-data="tableData"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<template v-slot>
|
||||
<cabinet-table
|
||||
ref="dataTable"
|
||||
v-loading="tools.loading"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="mainTableHeight"
|
||||
|
||||
@@ -320,6 +320,7 @@ export default {
|
||||
this.$set(this.endpointSearchLabel, 'moduleIds', this.module.id)
|
||||
}
|
||||
this.$set(this.endpointSearchLabel, 'pageSize', '-1')
|
||||
this.tools.loading = true
|
||||
this.$get('monitor/endpoint', this.endpointSearchLabel).then(response => {
|
||||
this.tools.loading = false
|
||||
if (response.code === 200) {
|
||||
|
||||
@@ -16,7 +16,7 @@ export default {
|
||||
},
|
||||
/* 工具参数 */
|
||||
tools: {
|
||||
loading: false, // 是否显示table加载动画
|
||||
loading: true, // 是否显示table加载动画
|
||||
customTableTitle: [], // 自定义列工具的数据
|
||||
extraTableTitle: [] // 特殊页面(asset)额外的列
|
||||
},
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
<template>
|
||||
<div class="mc" @click.self="clickOutside">
|
||||
<div class="right-box right-box-project-alert">
|
||||
<!-- begin--顶部按钮-->
|
||||
<div class="right-box-top-btns">
|
||||
<!--<button id="edit-ep-del" type="button" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light ">-->
|
||||
<!--<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>-->
|
||||
<!--<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>-->
|
||||
<!--</button>-->
|
||||
</div>
|
||||
<!-- end--顶部按钮-->
|
||||
|
||||
<!-- begin--标题-->
|
||||
<div class="right-box-title">Alert messages</div>
|
||||
<!-- end--标题-->
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:search-msg="searchMsg"
|
||||
@search="search"
|
||||
v-loading="tools.loading"
|
||||
>
|
||||
<template v-slot:top-tool-right>
|
||||
<el-select v-model="state" class="margin-r-10" size="small" value-key="value" @change="getTableData">
|
||||
@@ -26,7 +27,6 @@
|
||||
<template v-slot:default="slotProps">
|
||||
<alert-message-table
|
||||
ref="dataTable"
|
||||
v-loading="tools.loading"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="mainTableHeight"
|
||||
|
||||
@@ -97,6 +97,7 @@ export const parentTableCommon = {
|
||||
methods: {
|
||||
getTableData: function () {
|
||||
this.searchLabel.pageSize = -1
|
||||
this.tools.loading = true
|
||||
this.$get(this.url, this.searchLabel).then(response => {
|
||||
this.tools.loading = false
|
||||
if (response.code === 200) {
|
||||
|
||||
@@ -106,6 +106,7 @@ export default {
|
||||
pageNo: this.pageObj.pageNo,
|
||||
pageSize: this.pageObj.pageSize
|
||||
}
|
||||
this.tools.loading = true
|
||||
this.$get(this.url, params).then(response => {
|
||||
this.tools.loading = false
|
||||
if (response.code === 200) {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<template v-slot:default="slotProps">
|
||||
<endpoint-table
|
||||
ref="dataTable"
|
||||
:loading="tools.loading"
|
||||
v-loading="tools.loading"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="dataListLayout.indexOf('clickSearch') > -1 ? endpointTableHeight : mainTableHeight"
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"baseUrl":"http://192.168.40.42:8080/nz-admin/", "version": "2.0.2021.05.11.19.43"}
|
||||
{"baseUrl":"/", "version": "2.0.2021.05.11.19.43"}
|
||||
|
||||
Reference in New Issue
Block a user