| | |
| | | } |
| | | |
| | | if (debug) { |
| | | ip1 = 'http://192.168.0.110:8084/'; |
| | | // ip1 = 'http://locahost:8084/'; |
| | | ws = `192.168.0.110:9031`; |
| | | // ip1 = 'http://192.168.0.110:8084/'; |
| | | ip1 = 'http://localhost:8084/'; |
| | | // ws = `192.168.0.110:9031`; |
| | | ws = `localhost:9031`; |
| | | } |
| | | |
| | | const $http = axios.create({ |
| | |
| | | * 开启实时数据循环获取 |
| | | * @param {Object} params |
| | | */ |
| | | function startLoopFetchRealTimeData(onParam, callback) { |
| | | function startLoopFetchRealTimeData(onParam, callback, _interval) { |
| | | // 时间间隔 |
| | | let interval; |
| | | // 数据获取方法 |
| | |
| | | fetchFun = fetchOriginRealTimeData; |
| | | interval = 10 * 1000; |
| | | } |
| | | if (_interval) { |
| | | interval = _interval |
| | | } |
| | | // 开始循环任务 |
| | | clearFetchingTask(); |
| | | fetchingTask = setInterval(() => { |
| | |
| | | mode == 'debug' |
| | | ? { |
| | | deviceCode: this.deviceCode, |
| | | startTime: '2025-01-16 11:30:00', |
| | | endTime: '2025-01-16 11:32:00', |
| | | startTime: '2025-01-16 11:34:00', |
| | | endTime: '2025-01-16 11:35:00', |
| | | page, |
| | | perPage: 100 |
| | | } |
| | |
| | | return { |
| | | deviceCode: this.deviceCode, |
| | | updateTime: this.latestTime, |
| | | perPage: 10 |
| | | perPage: mode == 'debug' ? 1 : 10 |
| | | }; |
| | | }, |
| | | (res) => { |
| | | this.onFetchData(res.data); |
| | | this.onMapData(res.data); |
| | | thirdPartyDataApi.fetchLatestData(this.deviceType, this.deviceCode); |
| | | } |
| | | }, |
| | | mode == 'debug' ? 4000 : undefined |
| | | ); |
| | | }, |
| | | onMapData(dataList) { |
| | |
| | | <el-scrollbar ref="scrollbarRef" :height="height"> |
| | | <div ref="scrollContentRef"> |
| | | <div v-for="(item, index) in streams" :key="index"> |
| | | <el-text type="primary">[{{ item }}]: </el-text> |
| | | <el-text type="primary">{{ item.guid }}</el-text> |
| | | <el-text type="primary">{{ ' | ' + item.status }}</el-text> |
| | | <el-text type="primary">{{ ' | ' + item.startTime }}</el-text> |
| | | <el-text type="primary">{{ ' | ' + item.endTime }}</el-text> |
| | | <el-divider /> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |