| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | commonUrl: '', |
| | | series: [], |
| | | homeViewShow: true, |
| | | infoViewShow: false , |
| | |
| | | that.baseLedId = BaseLedId |
| | | that.basePort = BasePort |
| | | that.baseCrnId = BaseCrnId |
| | | // this.getUrl() |
| | | |
| | | |
| | | |
| | | this.getDate2() |
| | | setTimeout(()=>{ |
| | | // this.getServerData() |
| | | // this.initlineChart() |
| | | // this.initPieChart() |
| | | // this.getOther() |
| | | setTimeout(()=>{ |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | setTimeout(()=>{ |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | },3000) |
| | | },1000) |
| | | },1000) |
| | | }, |
| | | onLoad() { |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | this.getDate2() |
| | | this.getUrl() |
| | | |
| | | setInterval(()=>{ |
| | | this.getDate2() |
| | | this.getUrl() |
| | | // this.getInfo() |
| | | // this.getError() |
| | | this.getInfo2() |
| | | this.getError2() |
| | | this.controller() |
| | | },1000) |
| | | |
| | | setInterval(()=>{ |
| | | this.getDate2() |
| | | this.getUrl() |
| | | this.getInfo() |
| | | this.getError() |
| | | // this.getInfo2() |
| | | // this.getError2() |
| | | this.controller() |
| | | },1000) |
| | | setInterval(()=>{ |
| | | this.getServerData() |
| | | this.initlineChart() |
| | | this.initPieChart() |
| | | this.getOther() |
| | | this.getDate2() |
| | | },600000) |
| | | }, |
| | | methods: { |
| | |
| | | infoModel(res) { |
| | | let that = this |
| | | if (res.data && res.data !== "") { |
| | | that.infoText.title = res.data[0].title |
| | | if (that.infoType == 2 || that.infoType == 3) { |
| | | return; |
| | | } |
| | |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | that.chartsData.Line.categories = [ |
| | | that.getDateFormat(-11),that.getDateFormat(-10),that.getDateFormat(-9),that.getDateFormat(-8), |
| | | that.getDateFormat(-7),that.getDateFormat(-6),that.getDateFormat(-5),that.getDateFormat(-4), |
| | | that.getDateFormat(-3),that.getDateFormat(-2),that.getDateFormat(-1),that.getDateFormat(0),] |
| | | that.chartsData.Line.series = res.data.rows |
| | | setTimeout(()=> { |
| | | that.chartsData.Line.categories = [ |
| | | that.getDateFormat(-11),that.getDateFormat(-10),that.getDateFormat(-9),that.getDateFormat(-8), |
| | | that.getDateFormat(-7),that.getDateFormat(-6),that.getDateFormat(-5),that.getDateFormat(-4), |
| | | that.getDateFormat(-3),that.getDateFormat(-2),that.getDateFormat(-1),that.getDateFormat(0),] |
| | | that.chartsData.Line.series = res.data.rows |
| | | },1000) |
| | | |
| | | } |
| | | } |
| | | }) |
| | |
| | | uni.request({ |
| | | url: that.commonUrl + "/monitor/other", |
| | | data: { |
| | | crnId: that.baseCrnId, |
| | | crnId: that.baseCrnId, |
| | | ledId: that.baseLedId, |
| | | }, |
| | | success(result) { |