fix : 修复数据loading加载

This commit is contained in:
2024-03-05 21:47:53 +08:00
parent c242691a65
commit 204d687336
8 changed files with 109 additions and 47 deletions

View File

@@ -160,7 +160,7 @@
</template>
<script setup>
import {ElMessage, ElMessageBox} from "element-plus";
import {ElLoading, ElMessage, ElMessageBox} from "element-plus";
import {getTunnelList, addTunnel, deleteTunnel} from "@/api/tunnelManage";
import {getSiteDrawing, getSiteDetail} from "@/api/site";
import TunnelTitle from "@/components/tunnelTitle/index.vue";
@@ -323,11 +323,17 @@ const getTunnel = (id) => {
}
getTunnel(siteId)
const getList = () => {
const loading = ElLoading.service({
lock: true,
text: '正在加载系统资源',
background: 'rgba(0, 0, 0, 0.7)',
})
getTunnelList({
siteId: siteId,
...pageInfo
}).then(res => {
if (res.code === 1000) {
loading.close()
total.value = res.data.total
tunnelList.value = res.data.rows
showFirst.value = total.value / pageInfo.pageSize >= 1;