jinlin
2024-02-23 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__log-error">
      <zt-table-wraper query-url="/sys/log/error/page" export-url="/sys/log/error/export"   v-slot="{ table }">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
        <el-form-item>
          <zt-button type="export" @click="table.exportHandle()"/>
        </el-form-item>
      </el-form>
      <el-table v-loading="table.dataLoading" :data="table.dataList" border @sort-change="table.sortChangeHandle">
        <el-table-column prop="requestUri" :label="$t('logError.requestUri')"/>
        <el-table-column prop="requestMethod" :label="$t('logError.requestMethod')"/>
        <el-table-column prop="requestParams" :label="$t('logError.requestParams')" width="150" :show-overflow-tooltip="true"/>
        <el-table-column prop="ip" :label="$t('logError.ip')"/>
        <el-table-column prop="userAgent" :label="$t('logError.userAgent')" width="150" :show-overflow-tooltip="true"/>
        <el-table-column prop="createDate" :label="$t('logError.createDate')" sortable="custom" width="180"/>
        <zt-table-column-handle :table="table" :has-edit="false" :has-delete="false" :has-view="false">
            <template v-slot="{ row }">
              <zt-table-button @click="infoHandle(row.errorInfo)">{{ $t('logError.errorInfo') }}</zt-table-button>
            </template>
          </zt-table-column-handle>
      </el-table>
      </zt-table-wraper>
    </div>
  </el-card>
</template>
 
<script>
  export default {
    data() {
      return {
        dataForm: {
          id: ''
        }
      }
    },
    methods: {
      // 异常信息
      infoHandle(info) {
        this.$alert(info, this.$t('logError.errorInfo'), {
          customClass: 'mod-sys__log-error-view-info'
        })
      }
    }
  }
</script>
 
<style lang="scss">
.mod-sys__log-error {
  &-view-info {
    width: 80%;
  }
}
</style>