|
|
|
@ -30,13 +30,13 @@
|
|
|
|
|
>查询实际时间表</el-button
|
|
|
|
|
> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flexno bt30" v-if="this.shedulenr.length !== 0">
|
|
|
|
|
<div class="flexno bt30">
|
|
|
|
|
<!-- <div class="timehead">
|
|
|
|
|
<label>时间表规则:</label>
|
|
|
|
|
<p>ssssssssssss</p>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="timeShow" v-loading="loading">
|
|
|
|
|
<div class="leftTime">
|
|
|
|
|
<div class="leftTime" v-if="shedulenr.length !== 0">
|
|
|
|
|
<div class="w8">时间表:</div>
|
|
|
|
|
<div class="w80 flexonly" v-loading="timeloading">
|
|
|
|
|
<el-tag
|
|
|
|
@ -48,21 +48,24 @@
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="rightTime">
|
|
|
|
|
<div class="rightTime" v-if="newshedulenr.length !== 0">
|
|
|
|
|
<div class="w8">装置时间表:</div>
|
|
|
|
|
<div class="w80 flexonly" v-loading="timeloading">
|
|
|
|
|
<el-tag
|
|
|
|
|
class="mr10 mt10"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-for="(val, index) in this.shedulenr"
|
|
|
|
|
v-for="(val, index) in this.newshedulenr"
|
|
|
|
|
:key="index"
|
|
|
|
|
>{{ val }}</el-tag
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="shedulenr.length == 0 && newshedulenr.length == 0">
|
|
|
|
|
暂无拍照时间表
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flexno bt30" v-else>暂无设置时间表</div>
|
|
|
|
|
|
|
|
|
|
<el-button class="searchBtn" type="text" @click="inquirebtn()"
|
|
|
|
|
>装置时间表对比</el-button
|
|
|
|
|
>
|
|
|
|
@ -187,7 +190,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="closebtn">取 消</el-button>
|
|
|
|
|
<el-button type="primary" v-debounce="submitForm">确 定</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
v-debounce="submitForm"
|
|
|
|
|
:loading="sureloading"
|
|
|
|
|
>确 定</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
@ -204,6 +212,9 @@ import {
|
|
|
|
|
selectPhotoTimeGetJoggle,
|
|
|
|
|
selectPhotoTimeJoggle,
|
|
|
|
|
getPhotoTimeJoggle,
|
|
|
|
|
cmaSchelduleDetials,
|
|
|
|
|
getCmaSchelduleDetials,
|
|
|
|
|
getCmaSchelduleUpload,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
@ -242,8 +253,16 @@ export default {
|
|
|
|
|
newcmdzzid: "",
|
|
|
|
|
newrequestId: "",
|
|
|
|
|
timer: null, //定时器
|
|
|
|
|
timers: null,
|
|
|
|
|
timernum: 0,
|
|
|
|
|
i: 0,
|
|
|
|
|
timeloading: false,
|
|
|
|
|
|
|
|
|
|
requestId: "",
|
|
|
|
|
newshedulenr: [], //装置时间表
|
|
|
|
|
requestList: [],
|
|
|
|
|
requestArr: [], //通过requestid获取状态
|
|
|
|
|
sureloading: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -270,7 +289,7 @@ export default {
|
|
|
|
|
terminalid: this.selfacilityId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.$message.success("查询成功");
|
|
|
|
|
// this.$message.success("查询成功");
|
|
|
|
|
// this.shedulenr = res.data.list.join("; ")
|
|
|
|
|
this.shedulenr = res.data.list;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -290,7 +309,7 @@ export default {
|
|
|
|
|
terminalid: this.selfacilityId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.$message.success("查询成功");
|
|
|
|
|
// this.$message.success("查询成功");
|
|
|
|
|
// this.shedulenr = res.data.list.join("; ")
|
|
|
|
|
this.shedulenr = res.data.list;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -300,9 +319,57 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//查询时间表
|
|
|
|
|
|
|
|
|
|
inquirebtn() {
|
|
|
|
|
console.log(this.selaccess, this.selfacilityId);
|
|
|
|
|
cmaSchelduleDetials({
|
|
|
|
|
channelid: this.selaccess,
|
|
|
|
|
terminalid: this.selfacilityId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.requestId = res.data.requestId;
|
|
|
|
|
this.realNewtime();
|
|
|
|
|
this.timer = window.setInterval(() => {
|
|
|
|
|
//console.log(this.requestList);
|
|
|
|
|
this.realNewtime();
|
|
|
|
|
this.timernum++;
|
|
|
|
|
}, 3000);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
this.$message.error("查询失败");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//查询真是时间时间表
|
|
|
|
|
|
|
|
|
|
realNewtime() {
|
|
|
|
|
getCmaSchelduleDetials({
|
|
|
|
|
requestid: this.requestId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
if (res.data.isNew == true) {
|
|
|
|
|
// this.shedulenr = res.data.list.join("; ")
|
|
|
|
|
this.newshedulenr = res.data.list;
|
|
|
|
|
this.timernum = 0;
|
|
|
|
|
// this.$message.success("查询成功");
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
} else if (this.timernum > 9) {
|
|
|
|
|
this.searchloading = false;
|
|
|
|
|
this.timernum = 0;
|
|
|
|
|
this.$message.warning("暂无时间表!");
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.code.msg);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
this.$message.error("查询失败");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取线路列表数据
|
|
|
|
|
deviceList() {
|
|
|
|
|
getScheduleRulelListJoggle({
|
|
|
|
@ -419,17 +486,14 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.isShowset = false;
|
|
|
|
|
console.log(res);
|
|
|
|
|
// // this.$message({
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// message: '添加成功',type: 'success'
|
|
|
|
|
// });;
|
|
|
|
|
console.log(this.checkList);
|
|
|
|
|
// this.$store.commit("SET_CHANNELID", this.checkList); //将通道保存在vuex中
|
|
|
|
|
// this.$store.commit("SET_TERMID", this.deviceListData.zzid); //将装置保存在vuex中
|
|
|
|
|
this.handlexfTime(this.deviceListData.zzid, this.checkList);
|
|
|
|
|
this.deviceList();
|
|
|
|
|
this.requestList = res.data.list;
|
|
|
|
|
this.requestTime();
|
|
|
|
|
this.timers = window.setInterval(() => {
|
|
|
|
|
//console.log(this.requestList);
|
|
|
|
|
this.requestTime();
|
|
|
|
|
this.i++;
|
|
|
|
|
}, 3000);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
this.$message({
|
|
|
|
@ -441,19 +505,37 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//下发时间表
|
|
|
|
|
handlexfTime(termid, channelid) {
|
|
|
|
|
console.log("下发时间表");
|
|
|
|
|
console.log(termid);
|
|
|
|
|
console.log(channelid);
|
|
|
|
|
console.log("下发时间表结束");
|
|
|
|
|
getPhotoTimeJoggle({
|
|
|
|
|
channel: channelid,
|
|
|
|
|
termId: termid,
|
|
|
|
|
requestTime() {
|
|
|
|
|
//
|
|
|
|
|
this.sureloading = true;
|
|
|
|
|
getCmaSchelduleUpload({
|
|
|
|
|
list: this.requestList,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message.success("拍照时间表设置下发成功");
|
|
|
|
|
console.log("aaaaaaaaaaaaaaaaaaaaaaaa");
|
|
|
|
|
this.requestArr = res.data.list;
|
|
|
|
|
this.requestList = this.requestArr.filter(function (
|
|
|
|
|
value,
|
|
|
|
|
index,
|
|
|
|
|
arr
|
|
|
|
|
) {
|
|
|
|
|
console.log(value, index, arr);
|
|
|
|
|
return value.status !== 1;
|
|
|
|
|
});
|
|
|
|
|
console.log(this.requestArr);
|
|
|
|
|
if (this.requestList.length == 0) {
|
|
|
|
|
this.isShowset = false;
|
|
|
|
|
this.sureloading = false;
|
|
|
|
|
this.$message.success("下发成功");
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
} else if (this.i > 9) {
|
|
|
|
|
this.isShowset = false;
|
|
|
|
|
this.sureloading = false;
|
|
|
|
|
this.i = 0;
|
|
|
|
|
this.$message.warning("下发失败,请稍后再试!");
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
@ -462,6 +544,8 @@ export default {
|
|
|
|
|
this.isShowset = false;
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.deviceList();
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
},
|
|
|
|
|
display() {
|
|
|
|
|
this.isShow = true;
|
|
|
|
@ -472,6 +556,8 @@ export default {
|
|
|
|
|
handleclose() {
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
console.log("关闭轮询");
|
|
|
|
|
clearInterval(this.timers);
|
|
|
|
|
this.timers = null;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|