添加loading

master
fanluyan 2 years ago
parent 868d924ada
commit c088e7b2ef

@ -243,6 +243,7 @@ import {
cmaSchelduleDetials,
getCmaSchelduleDetials,
getCmaSchelduleUpload,
getTermStatus,
} from "@/utils/api/index";
export default {
props: {
@ -514,6 +515,9 @@ export default {
if (this.checkList.length == 0) {
this.$message.error("请选择通道");
} else {
getTermStatus({ termId: this.deviceListData.zzid }).then((res) => {
console.log(res);
if (res.data.isonline) {
setScheduleRulel({
scheduleid: this.scheduleid,
list: [
@ -542,6 +546,15 @@ export default {
type: "error",
});
});
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
}
},
//

@ -55,7 +55,7 @@
</div>
<!-- 带参数的中心内容右侧参数区 -->
<div class="picSetBox">
<div class="swiperBox" v-loading="loading">
<div class="swiperBox" v-loading="loadingpic">
<carouselChart
ref="carouselpic"
:terminalPhoto="terminalPhoto"
@ -154,19 +154,7 @@
<el-button type="primary" @click.native.stop="handleSetSchedule()"
>拍照时间表</el-button
>
<!-- <el-dropdown
class="dropgps"
trigger="click"
@command="handleCommand"
>
<el-button type="primary">
GPS开关<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown" class="gpsdropStyle">
<el-dropdown-item command="open">开启GPS</el-dropdown-item>
<el-dropdown-item command="close">关闭GPS</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<el-dropdown
class="dropgps"
trigger="click"
@ -194,10 +182,6 @@
<el-dropdown-item command="close">关闭</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-button type="primary" @click="handlehistoryPic"
>历史图片</el-button
> -->
</div>
</div>
</div>
@ -259,8 +243,8 @@ export default {
totalPic: "",
dateValue: "", //
nopicPath: require("@/assets/img/nopic.jpg"),
loadingBg: true,
loading: true,
loadingBg: false,
loadingpic: false,
newPicData: "",
timer: null,
treetimer: null,
@ -453,7 +437,7 @@ export default {
},
//
getTerminalPhotoList(id, date, termId) {
this.loading = true;
this.loadingpic = true;
this.terminalPhoto = [];
console.log(id, date, termId);
getTerminalPhotoListJoggle({
@ -478,7 +462,7 @@ export default {
console.log(this.terminalPhoto.length);
this.totalPic = res.data.num;
//this.$refs.a.getphotodata(this.terminalPhoto);
this.loading = false;
this.loadingpic = false;
console.log(this.terminalPhoto);
})
.catch((err) => {
@ -505,25 +489,9 @@ export default {
//
handleSetSchedule() {
getTermStatus({ termId: this.newTermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
this.$refs.setschedule_ref.display();
this.$refs.setschedule_ref.getSingleAccess(
this.channelId,
this.cmdid
);
this.$refs.setschedule_ref.getSingleAccess(this.channelId, this.cmdid);
this.$refs.setschedule_ref.deviceList();
} else {
this.btnpicloading = false;
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
},
handleCommandWarn(command) {
switch (command) {
@ -613,6 +581,7 @@ export default {
console.log(res);
if (res.data.isonline) {
this.btnpicloading = true;
this.loadingpic = true;
getLatestPhotoJoggle({
captureType: 0,
channel: command,
@ -642,6 +611,7 @@ export default {
});
} else {
this.btnpicloading = false;
this.loadingpic = false;
this.$message({
duration: 1500,
showClose: true,
@ -659,6 +629,7 @@ export default {
console.log(res);
if (res.data.isonline) {
this.btnvideoloading = true;
this.loadingpic = true;
getLatestPhotoJoggle({
captureType: 1,
channel: command,
@ -686,6 +657,8 @@ export default {
console.log(err); //
});
} else {
this.btnvideoloading = false;
this.loadingpic = false;
this.$message({
duration: 1500,
showClose: true,
@ -730,6 +703,7 @@ export default {
});
this.btnpicloading = false;
this.btnvideoloading = false;
this.loadingpic = false;
}
console.log("2222222222222222");
});

Loading…
Cancel
Save