record.vue 3.66 KB
<!-- 修改记录 -->
<template>
  <div class="config-employee">
    <div class="config-employee-main">
      <p class="edit-title">操作记录</p>
      <div class="container">
        <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
          <template slot="auth-button" slot-scope="scope">
            <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
            <el-button type="text" @click="handleEdit(2, scope.scope)">修改</el-button>
            <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
          </template>
        </GLTable>
      </div>
    </div>
  </div>
</template>

<script>
// import { getDetailLogApi } from '@/api/modules/employee'
export default {
  name: 'record',
  data() {
    return {
      searchForm: {},
      pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
      getListApi: this.$apis.employee.getDetailLogApi,
      tableParams: {
        listName: 'data',
        tableColumns: [
          {
            label: '登录账户',
            prop: 'operator',
            line: 2,
            formatter: cellValue => {
              return cellValue.operator || '-'
            }
          },
          {
            label: '登录产品',
            prop: 'productName',
            line: 2,
            formatter: cellValue => {
              return cellValue.productName || '-'
            }
          },
          {
            label: '登录IP',
            prop: 'ip',
            line: 2,
            formatter: cellValue => {
              return cellValue.ip || '-'
            }
          },
          {
            label: '修改内容',
            prop: 'module',
            formatter: cellValue => {
              return cellValue.module + '-' + cellValue.action
            }
          },
          {
            label: '操作人',
            prop: 'userName',
            line: 2,
            formatter: cellValue => {
              return cellValue.userName || '-'
            }
          },
          {
            label: '操作时间',
            prop: 'createdTime',
            width: '180px',
            formatter: cellValue => {
              return cellValue.createdTime || '-'
            }
          }
        ]
      }
    }
  },

  props: {
    id: {
      type: String,
      default: ''
    }
  },

  mounted() {},

  methods: {
    beforeSearchFn() {
      return new Promise(resolve => {
        this.searchForm = {
          bussinessId: this.id,
          moduleName: '员工模块'
        }
        resolve()
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.config-employee {
  &-main {
    background: #ffffff;
  }
}
.edit-title {
  font-size: 16px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 600;
  color: #333333;
  padding: 20px 20px;
  border-bottom: 1px solid #e5e5e5;
}
.config-employee .container {
  background: #ffffff;
  padding: 20px;
}
.config-employee .flex {
  display: flex;
  justify-content: space-between;
}
/* .config-employee .edit-container {
  margin-bottom: 84px;
} */

.config-employee .footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 64px;
  text-align: center;
  line-height: 64px;
  background: #ffffff;
  z-index: 999;
}

.config-employee .flex {
  display: flex;
  justify-content: space-between;
}
.config-employee .filter-tree {
  width: 360px;
  max-height: 200px;
  overflow: scroll;
}
.config-employee .el-checkbox:last-of-type {
  margin-right: 8px;
}
.config-employee .filter-tree .el-tree-node__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>