<template>
  <div>
    <el-button size="mini" @click="click">分数调整记录</el-button>
    <el-dialog title="分数调整记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
        <el-table-column label="调整分" align="center" prop="ajMark" />
        <el-table-column label="调整原因" align="center" prop="ajCause" />
        <el-table-column label="调整时间" align="center" prop="createTime" />
        <el-table-column label="调整人" align="center" prop="createBy" />
      </el-table>
    </el-dialog>
  </div>
</template>

<script>
import { listAdjustlog} from "@/api/business/ehr/pm/adjustlog";
export default {
  name: "AdjustlogDialog",
  props: ['pmId'],
  data() {
    return {
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 1000,
        performanceId: null,
      },
      // 总条数
      total: 0,
      // 表格数据
      listData: [],
      // 遮罩层
      loading: true,
      // 是否显示弹出层
      open: false,
    };
  },
  watch: {},
  methods: {
    //点击了当前按钮
    click() {
      this.queryParams.performanceId = this.pmId;
      this.open = true;
      this.loading = true;
      listAdjustlog(this.queryParams).then(response => {
        this.listData = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
  },
  created() {},
  mounted() {},
  destroyed() {},
};
</script>
