添加loading

master
fanluyan 2 years ago
parent 808be68b0f
commit 970cf34dfc

@ -18,6 +18,7 @@
height="calc(100% - 40px)" height="calc(100% - 40px)"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@row-click="handleRowClick" @row-click="handleRowClick"
v-loading="loading"
> >
<!-- <el-table-column type="index" width="55"> </el-table-column> <!-- <el-table-column type="index" width="55"> </el-table-column>
<el-table-column type="selection" width="55"> </el-table-column> --> <el-table-column type="selection" width="55"> </el-table-column> -->
@ -106,14 +107,16 @@ export default {
page: 1, // page: 1, //
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
loading: true,
}; };
}, },
created() { created() {
this.deviceList(); this.deviceList();
}, },
methods: { methods: {
//线 //
deviceList() { deviceList() {
this.loading = true;
getScheduleRulelListJoggle({ getScheduleRulelListJoggle({
pageindex: this.page, pageindex: this.page,
pagesize: this.pageSize, pagesize: this.pageSize,
@ -121,6 +124,7 @@ export default {
.then((res) => { .then((res) => {
this.deviceTableData = res.data.list; this.deviceTableData = res.data.list;
this.total = res.data.total; this.total = res.data.total;
this.loading = false;
}) })
.catch((err) => {}); .catch((err) => {});
}, },

@ -15,6 +15,7 @@
height="calc(100% - 40px)" height="calc(100% - 40px)"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@row-click="handleRowClick" @row-click="handleRowClick"
v-loading="loading"
> >
<el-table-column <el-table-column
prop="displayName" prop="displayName"
@ -144,6 +145,7 @@ export default {
methods: { methods: {
//// ////
terminalList(page, pageSize) { terminalList(page, pageSize) {
this.loading = true;
getTerminalJoggle({ getTerminalJoggle({
pageindex: page, pageindex: page,
pagesize: pageSize, pagesize: pageSize,
@ -152,6 +154,7 @@ export default {
console.log(res); console.log(res);
this.terminalTableData = res.data.list; this.terminalTableData = res.data.list;
this.total = res.data.total; this.total = res.data.total;
this.loading = false;
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //

@ -15,6 +15,7 @@
height="calc(100% - 40px)" height="calc(100% - 40px)"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@row-click="handleRowClick" @row-click="handleRowClick"
v-loading="loading"
> >
<!-- <el-table-column type="selection" width="55"> </el-table-column> --> <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
<el-table-column label="单位" show-overflow-tooltip> <el-table-column label="单位" show-overflow-tooltip>
@ -103,6 +104,7 @@ export default {
page: 1, // page: 1, //
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
loading: true,
}; };
}, },
created() { created() {
@ -111,6 +113,7 @@ export default {
methods: { methods: {
//线 //线
lineList() { lineList() {
this.loading = true;
getLineListJoggle({ getLineListJoggle({
pageindex: this.page, pageindex: this.page,
pagesize: this.pageSize, pagesize: this.pageSize,
@ -118,6 +121,7 @@ export default {
.then((res) => { .then((res) => {
this.lineTableData = res.data.list; this.lineTableData = res.data.list;
this.total = res.data.total; this.total = res.data.total;
this.loading = false;
}) })
.catch((err) => {}); .catch((err) => {});
}, },

@ -1,5 +1,5 @@
<template> <template>
<div class="monitorBox"> <div class="monitorBox" v-loading="loadingBg">
<div class="monitor-container"> <div class="monitor-container">
<!-- 左侧数据列表树 --> <!-- 左侧数据列表树 -->
<div class="sideBar"> <div class="sideBar">
@ -24,9 +24,8 @@
</span> </span>
</el-tree> </el-tree>
</div> </div>
<!-- 带参数的中心内容右侧参数区 --> <!-- 带参数的中心内容右侧参数区 -->
<div class="picSetBox"> <div class="picSetBox" v-loading="loading">
<div class="swiperBox"> <div class="swiperBox">
<carouselChart <carouselChart
:terminalPhoto="terminalPhoto" :terminalPhoto="terminalPhoto"
@ -98,7 +97,6 @@
</div> </div>
</div> </div>
</div> </div>
<setschedule ref="setschedule_ref"></setschedule> <setschedule ref="setschedule_ref"></setschedule>
</div> </div>
</div> </div>
@ -137,6 +135,8 @@ export default {
terminalPhoto: [], // terminalPhoto: [], //
dateValue: "", // dateValue: "", //
nopicPath: require("@/assets/img/nopic.jpg"), nopicPath: require("@/assets/img/nopic.jpg"),
loadingBg: true,
loading: true,
}; };
}, },
watch: {}, watch: {},
@ -164,6 +164,7 @@ export default {
}, },
// //
getLineTreeList() { getLineTreeList() {
this.loadingBg = true;
getdyTreeListJoggle() getdyTreeListJoggle()
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -180,6 +181,7 @@ export default {
this.getChannelList(this.channelId); //id this.getChannelList(this.channelId); //id
}); });
} }
this.loadingBg = false;
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
@ -225,6 +227,7 @@ export default {
}, },
// //
getTerminalPhotoList(id, date, termId) { getTerminalPhotoList(id, date, termId) {
this.loading = true;
this.terminalPhoto = []; this.terminalPhoto = [];
console.log(id, date, termId); console.log(id, date, termId);
getTerminalPhotoListJoggle({ getTerminalPhotoListJoggle({
@ -240,10 +243,10 @@ export default {
path: this.nopicPath, path: this.nopicPath,
}, },
]; ];
//alert("");
} else { } else {
this.terminalPhoto = res.data.list; this.terminalPhoto = res.data.list;
} }
this.loading = false;
console.log(this.terminalPhoto); console.log(this.terminalPhoto);
}) })
.catch((err) => { .catch((err) => {

Loading…
Cancel
Save