Riku
2025-05-14 fac3e813d205f000125eb8f7b2dd4976f4166edf
动态溯源功能调试中
已修改4个文件
27 ■■■■■ 文件已修改
src/api/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/factor/data.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/realtimemode/RealtimeMode.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sourcetrace/SourceTrace.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -12,9 +12,10 @@
}
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({
src/utils/factor/data.js
@@ -186,7 +186,7 @@
 * 开启实时数据循环获取
 * @param {Object} params
 */
function startLoopFetchRealTimeData(onParam, callback) {
function startLoopFetchRealTimeData(onParam, callback, _interval) {
  // 时间间隔
  let interval;
  // 数据获取方法
@@ -199,6 +199,9 @@
    fetchFun = fetchOriginRealTimeData;
    interval = 10 * 1000;
  }
  if (_interval) {
    interval = _interval
  }
  // 开始循环任务
  clearFetchingTask();
  fetchingTask = setInterval(() => {
src/views/realtimemode/RealtimeMode.vue
@@ -117,8 +117,8 @@
          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
              }
@@ -144,14 +144,15 @@
          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) {
src/views/sourcetrace/SourceTrace.vue
@@ -10,7 +10,11 @@
      <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>