|
@@ -1,7 +1,11 @@
|
|
|
<template>
|
|
|
<section class="content">
|
|
|
<div class="box box-info">
|
|
|
- <div class="box-body">
|
|
|
+ <div
|
|
|
+ class="box-body"
|
|
|
+ v-loading.fullscreen="loading"
|
|
|
+ element-loading-text="请稍后..."
|
|
|
+ >
|
|
|
<!-- 搜索 -->
|
|
|
<el-form inline :model="searchForm" label-width="70px">
|
|
|
<el-form-item label="顶级机构">
|
|
@@ -467,6 +471,7 @@
|
|
|
<script>
|
|
|
import { CORE_API } from "@/constants/constants.js";
|
|
|
import { mapState } from "vuex";
|
|
|
+import { setTimeout } from "timers";
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
@@ -486,6 +491,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ loading: false,
|
|
|
orgLoading4InsertOrUpdate: false,
|
|
|
isSuperAdmin: false,
|
|
|
roleList4Search: [],
|
|
@@ -695,7 +701,12 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
search() {
|
|
|
- this.loading = true;
|
|
|
+ let searchLock = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ if (searchLock) {
|
|
|
+ this.loading = true;
|
|
|
+ }
|
|
|
+ }, 500);
|
|
|
var param = new URLSearchParams(this.searchForm);
|
|
|
var url =
|
|
|
CORE_API +
|
|
@@ -705,12 +716,18 @@ export default {
|
|
|
this.pageSize +
|
|
|
"?" +
|
|
|
param;
|
|
|
- this.$httpWithMsg.get(url).then(response => {
|
|
|
- console.log(response);
|
|
|
- this.tableData = response.data.list;
|
|
|
- this.total = response.data.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.$httpWithMsg
|
|
|
+ .get(url)
|
|
|
+ .then(response => {
|
|
|
+ console.log(response);
|
|
|
+ this.tableData = response.data.list;
|
|
|
+ this.total = response.data.total;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ searchLock = false;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentPage = val;
|