| | |
| | | axios.defaults.baseURL = 'http://localhost:8919/fg/'; |
| | | axios.defaults.withCredentials = true; // 保持请求头 |
| | | } |
| | | |
| | | let skipUrls = ["Server_stateAction_action_getTimestamp"]; |
| | | // 添加请求拦截器 |
| | | axios.interceptors.request.use(function (config) { |
| | | // 防重放操作 |
| | | let rejectReplayStr = rejectReplay(); |
| | | let url = config.url; |
| | | if(url.indexOf("?") == -1) { |
| | | url = url.trim()+"?"+rejectReplayStr; |
| | | }else { |
| | | url = url.trim()+"&"+rejectReplayStr; |
| | | let isIn = false; |
| | | for(let i=0; i<skipUrls.length; i++) { |
| | | let skipUrl = skipUrls[i]; |
| | | if(skipUrl == url) { |
| | | isIn = true; |
| | | break; |
| | | } |
| | | } |
| | | if(!isIn) { |
| | | if(url.indexOf("?") == -1) { |
| | | url = url.trim()+"?"+rejectReplayStr; |
| | | }else { |
| | | url = url.trim()+"&"+rejectReplayStr; |
| | | } |
| | | } |
| | | config.url = url; |
| | | // 在发送请求之前做些什么 |
| | |
| | | label: '平台logo', |
| | | des: '显示平台logo状态', |
| | | fileName: 'gjdw', // gjdw, nfdw, gjdx, qwh |
| | | value: false, |
| | | value: true, |
| | | }, |
| | | uKey: { |
| | | label: 'uKey', |
| | |
| | | bigScreen: { |
| | | label: '大屏数据展示', |
| | | des: '首页显示大屏展示', |
| | | value: false, |
| | | value: true, |
| | | }, |
| | | verifyCode: { |
| | | label: '验证码', |
| | |
| | | if (JSON.parse(historyList.data.result).code === 0) { |
| | | this.$layer.close(loading); // 关闭等待框 |
| | | this.table.datas = []; |
| | | this.total = 0 ; |
| | | if(this.queryInfo.currentPage != 1) { |
| | | this.queryInfo.currentPage = 1; |
| | | this.historyArlm(); |
| | | } |
| | | return false; |
| | | } |
| | | const newHist = JSON.parse(historyList.data.result).data; |
| | |
| | | }, |
| | | }, |
| | | }); |
| | | //console.log("alarmDatas", alarmDatas); |
| | | const newsAlaa = JSON.parse(alarmDatas.data.result).data; |
| | | const rs = JSON.parse(alarmDatas.data.result); |
| | | const newsAlaa = rs.data; |
| | | this.isFirstQuery = false; |
| | | // console.log("newsAlaa", newsAlaa); |
| | | loading && this.$layer.close(loading); // 关闭等待框 |
| | | this.total1 = newsAlaa[newsAlaa.length - 1].page.pageAll; |
| | | if(rs.code == 0) { |
| | | this.total1 = 0; |
| | | // 重置分页信息 |
| | | if(this.queryInfo1.pagenum != 1) { |
| | | this.queryInfo1.pagenum = 1; |
| | | this.paramsAlram1(); |
| | | } |
| | | }else { |
| | | this.total1 = newsAlaa[newsAlaa.length - 1].page.pageAll; |
| | | } |
| | | |
| | | this.table1.datas = newsAlaa.filter((item, index) => { |
| | | if (item.adata) { |
| | | item.room1 = index + 1; |
| | |
| | | }, |
| | | }, |
| | | }); |
| | | const newsAlaa = JSON.parse(alarmDatas.data.result).data; |
| | | const rs = JSON.parse(alarmDatas.data.result); |
| | | const newsAlaa = rs.data; |
| | | this.isFirstQuery = false; |
| | | loading && this.$layer.close(loading); // 关闭等待框 |
| | | this.total2 = newsAlaa[newsAlaa.length - 1].page.pageAll; |
| | | if(rs.code == 0) { |
| | | this.total2 = 0; |
| | | // 重置分页信息 |
| | | if(this.queryInfo2.pagenum != 1) { |
| | | this.queryInfo2.pagenum = 1; |
| | | this.paramsAlram2(); |
| | | } |
| | | }else { |
| | | this.total2 = newsAlaa[newsAlaa.length - 1].page.pageAll; |
| | | } |
| | | this.table2.datas = newsAlaa.filter((item, index) => { |
| | | if (item.adata) { |
| | | item.room1 = index + 1; |