无人机管理后台前端(已迁走)
zhongrj
2024-11-29 0bb61109b05591e4605f9433b57fe644575e03ed
错误日志查询条件无效及优化
3 files modified
25 ■■■■ changed files
src/api/logs.js 3 ●●●● patch | view | raw | blame | history
src/views/monitor/log/api.vue 1 ●●●● patch | view | raw | blame | history
src/views/monitor/log/error.vue 21 ●●●● patch | view | raw | blame | history
src/api/logs.js
@@ -23,11 +23,12 @@
  });
};
export const getErrorList = (current, size) => {
export const getErrorList = (current, size,params) => {
  return request({
    url: '/blade-log/error/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
src/views/monitor/log/api.vue
@@ -186,7 +186,6 @@
    },
    onLoad(page, params = {}) {
      const { daterange } = this.query;
      console.log(daterange,999)
      let values = {
        ...params,
        ...this.query,
src/views/monitor/log/error.vue
@@ -52,16 +52,16 @@
        dialogType: 'drawer',
        column: [
          {
            label: '服务id',
            label: '服务名称',
            prop: 'serviceId',
            search: true,
            searchSpan:4,
            width: '120',
          },
          {
            label: '服务host',
            prop: 'serverHost',
            search: true,
            width: '150',
          },
          {
            label: '服务ip',
@@ -81,6 +81,15 @@
          {
            label: '请求接口',
            prop: 'requestUri',
            search: true,
            searchSpan:6,
          },
          {
            label: '操作人',
            prop: 'createBy',
            search: true,
            searchSpan:4,
            width: '120',
          },
          {
            label: '日志时间',
@@ -151,8 +160,12 @@
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      let values = {
        ...params,
        ...this.query,
      };
      this.loading = true;
      getErrorList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
      getErrorList(page.currentPage, page.pageSize, values).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;