<template>
    <el-table
        :data="tableData"
        stripe
        style="width: 100%">
        <el-table-column
        prop="objName"
        label="工程名称"
        width="220"
        show-overflow-tooltip>
        </el-table-column>
        <el-table-column
        prop=""
        label="审定阶段"
        width="140"
        show-overflow-tooltip>
            <template >
                <span>{{planProcessName}}</span>
            </template>
        </el-table-column>
        <el-table-column
        prop="stageStatus"
        label="审定状态"
        width="180"
        show-overflow-tooltip>
            <template #default="scope">
              <p v-if="scope.row.stageStatus == 0"><span>未审定</span></p>
              <p v-if="scope.row.stageStatus == 1"><span>审定通过</span></p>
              <p v-if="scope.row.stageStatus == 2"><span>审定驳回</span></p>
            </template>
        </el-table-column>
        <el-table-column
        prop="stageStatusReson"
        label="审定意见"
        width="200"
        show-overflow-tooltip>
        </el-table-column>
        <el-table-column
        prop="intm"
        label="审定操作时间"
        width="160">
            <template #default="scope">
                <span>{{ formatDateTime2(scope.row.intm) }}</span>
            </template>
        </el-table-column>
        <el-table-column
        prop="persName"
        label="操作用户">
        </el-table-column>
    </el-table>
</template>
<script>
import request from '@/utils/gw_ajax_request.js';
import { formatDateTime2 } from '@/utils/gw_date.js';
export default {
  props: ['rgstrId', 'planProcessId', 'planProcessName'],
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.getTableDataList();
  },
  methods: {
    formatDateTime2,
    getTableDataList() {
      const data = {
        rgstrId: this.rgstrId,
        planProcessId: this.planProcessId,
      };
      request.post(`/tac/province/examRecord/list`, data).then((res) => {
        if (res.success) {
          this.tableData = res.data;
        } else {
          this.$message.error(res.message);
        }
      });
    },
  },
  watch: {
    rgstrId() {
      this.getTableDataList();
    },
    professionType() {
      this.getTableDataList();
    },
  },
};
</script>
<style>

</style>
