| | |
| | | getDeviceList: function() { |
| | | let that = this; |
| | | this.getDeviceListLoading = true; |
| | | this.$axios.get(`/api/devices`,{ |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`/api/device/query/devices`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | | } |
| | | } ) |
| | | .then(function (res) { |
| | | }).then(function (res) { |
| | | console.log(res); |
| | | console.log(res.data.list); |
| | | that.total = res.data.total; |
| | | that.deviceList = res.data.list; |
| | | that.getDeviceListLoading = false; |
| | | }) |
| | | .catch(function (error) { |
| | | }).catch(function (error) { |
| | | console.log(error); |
| | | that.getDeviceListLoading = false; |
| | | }); |
| | |
| | | //gb28181平台对接 |
| | | //刷新设备信息 |
| | | refDevice: function(itemData) { |
| | | ///api/devices/{deviceId}/sync |
| | | console.log("刷新对应设备:" + itemData.deviceId); |
| | | var that = this; |
| | | that.$refs[itemData.deviceId + 'refbtn' ].loading = true; |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: '/api/devices/' + itemData.deviceId + '/sync' |
| | | url: '/api/device/query/devices/' + itemData.deviceId + '/sync' |
| | | }).then(function(res) { |
| | | console.log("刷新设备结果:"+JSON.stringify(res)); |
| | | if (!res.data.deviceId) { |
| | |
| | | console.log(`修改传输方式为 ${row.streamMode}:${row.deviceId} `); |
| | | let that = this; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: '/api/devices/' + row.deviceId + '/transport/' + row.streamMode |
| | | method: 'post', |
| | | url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode |
| | | }).then(function(res) { |
| | | |
| | | }).catch(function(e) { |