diff --git a/src/utils/request.js b/src/utils/request.js index a5699f1..03897d8 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -34,6 +34,7 @@ service.interceptors.response.use( const res = response.data; if (res.code !== 200) { Message({ + showClose: true, message: res.msg || "Error", type: "error", duration: 5 * 1000, @@ -42,13 +43,26 @@ service.interceptors.response.use( // Message({ message: '重新登录', type: 'error', duration: 5 * 1000 }) router.push("/login"); } + if (res.code === 500) { + Message({ + showClose: true, + message: 服务器错误(500), + type: "error", + duration: 5 * 1000, + }); + } return Promise.reject(new Error(res.msg || "Error")); } else { return res; } }, (error) => { - Message({ message: error.message, type: "error", duration: 5 * 1000 }); + Message({ + message: error.message, + showClose: true, + type: "error", + duration: 5 * 1000, + }); return Promise.reject(error); } ); diff --git a/src/views/realTimeMonitor/components/setschedule.vue b/src/views/realTimeMonitor/components/setschedule.vue index 3ab6296..0d8d905 100644 --- a/src/views/realTimeMonitor/components/setschedule.vue +++ b/src/views/realTimeMonitor/components/setschedule.vue @@ -69,7 +69,11 @@ - 装置时间表对比 @@ -279,6 +283,7 @@ export default { sureloading: false, offsetnum: "", setNum: Math.floor(Math.random() * 10), + compareloading: false, }; }, mounted() { @@ -340,6 +345,7 @@ export default { //查询时间表 inquirebtn() { console.log(this.selaccess, this.selfacilityId); + this.compareloading = true; cmaSchelduleDetials({ channelid: this.selaccess, terminalid: this.selfacilityId, @@ -367,12 +373,14 @@ export default { if (res.code == 200) { if (res.data.isNew == true) { // this.shedulenr = res.data.list.join("; ") + this.compareloading = false; this.newshedulenr = res.data.list; this.timernum = 0; // this.$message.success("查询成功"); clearInterval(this.timer); this.timer = null; } else if (this.timernum > 9) { + this.compareloading = false; this.searchloading = false; this.timernum = 0; this.$message.warning("暂无拍照时间表!"); @@ -384,6 +392,7 @@ export default { } }) .catch((err) => { + this.compareloading = false; this.$message.error("查询失败"); clearInterval(this.timer); this.timer = null; @@ -636,9 +645,12 @@ export default { } .searchBtn { font-size: 14px; - text-decoration-line: underline; + display: flex; margin-left: auto; + span { + text-decoration-line: underline; + } } .flexnr { display: flex; diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index 92a87fb..98e2e9b 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -88,9 +88,19 @@ + {{ + item.alias !== null && item.alias !== "" + ? item.alias + : item.label + }} + @@ -392,12 +402,14 @@ export default { label: "全部", value: "", termid: "", + alias: "", }); this.channelList.forEach((item) => { this.channelListOption.push({ label: item.channelname, value: item.channelid, termid: item.termId, + alias: item.alias, }); }); this.channelListValue = this.channelListOption[0].value; //默认选中所有通道 diff --git a/src/views/realTimeSearch/index.vue b/src/views/realTimeSearch/index.vue index 112588c..7418f6b 100644 --- a/src/views/realTimeSearch/index.vue +++ b/src/views/realTimeSearch/index.vue @@ -49,9 +49,19 @@ + > + {{ + item.alias !== null && item.alias !== "" + ? item.alias + : item.name + }} + @@ -98,6 +108,11 @@ $moment(item.photoTime).format("MM-DD HH:mm") }} / {{ item.channnelname }} + {{ + item.alias !== null && item.alias !== "" + ? item.alias + : item.channnelname + }} @@ -122,10 +137,13 @@ }}

- 拍照时间:{{ - $moment(item.photoTime).format("MM-DD HH:mm") + 拍照时间:{{ $moment(item.photoTime).format("MM-DD HH:mm") }} + / + {{ + item.alias !== null && item.alias !== "" + ? item.alias + : item.channnelname }} - / {{ item.channnelname }} @@ -174,7 +192,7 @@ export default { xlOptions: [{ id: 0, name: "全部" }], //线路数据 gtOptions: [{ id: 0, name: "全部" }], //杆塔数据 zzOptions: [{ id: 0, name: "全部" }], //装置数据 - tdOptions: [{ id: 0, name: "全部" }], //通道数据 + tdOptions: [{ id: 0, name: "全部", alias: "" }], //通道数据 formdata: { dyid: "", lineid: "", @@ -254,7 +272,7 @@ export default { getSearchtd() { getSearchInfo({ type: 5, id: this.formdata.termid }) .then((res) => { - this.tdOptions = [{ id: 0, name: "全部" }]; + this.tdOptions = [{ id: 0, name: "全部", alias: "" }]; this.tdOptions = this.tdOptions.concat(res.data.list); this.formdata.channelid = this.tdOptions[0].id; // if (this.signtype == 0) {