| | |
| | | }, |
| | | onLoad() { |
| | | this.getCurrentTree(); |
| | | this.Socketonline(); |
| | | this.GetAutoStatus(); |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.intervalId) { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.Socketonline(); |
| | | this.GetAutoStatus(); |
| | | setInterval(() => { |
| | | this.Socketonline(); |
| | | this.GetAutoStatus(); |
| | | }, 5000); |
| | | |
| | | var print = uni.getStorageSync('printFloor'); |
| | | if (print) { |
| | |
| | | AndroidCheckUpdate: function() { |
| | | var _this = this; |
| | | uni.request({ |
| | | url: 'http://192.168.30.250:5000/api/PDA/GetPDAVersion?version=' + this.version, |
| | | url: 'http://10.31.3.252:5000/api/PDA/GetPDAVersion?version=' + this.version, |
| | | method: 'GET', |
| | | data: {}, |
| | | success: res => { |
| | |
| | | icon: "none" |
| | | }); |
| | | var dtask = plus.downloader.createDownload( |
| | | "http://192.168.30.250:5000/api/PDA/DownLoadApp", {}, |
| | | "http://10.31.3.252:5000/api/PDA/DownLoadApp", {}, |
| | | function(d, status) { |
| | | // 涓嬭浇瀹屾垚 |
| | | if (status == 200) { |
| | |
| | | this.$u.post('/api/Menu/getTreeMenu', {}).then(result => { |
| | | this.tree = result; |
| | | }) |
| | | }, |
| | | GetAutoStatus() { |
| | | this.$u.post('/api/PDA/GetAutoStatus', {}).then(result => { |
| | | if (result == false) { |
| | | this.value = false; |
| | | } else { |
| | | this.value = true; |
| | | } |
| | | }).catch(error => { |
| | | this.value = false; |
| | | }); |
| | | }, |
| | | Socketonline() { |
| | | this.$u.post('/api/PDA/Socketonline', {}).then(result => { |
| | | if (result.data != null && result.data == false) { |
| | | console.log(result); |
| | | this.online = false; |
| | | } else { |
| | | this.online = true; |
| | | } |
| | | // = result; |
| | | }).catch(error => { |
| | | this.online = false; |
| | | }); |
| | | }, |
| | | getTree(id, data, isRootId) { |
| | | this.datas.forEach((x) => { |