processingRecordDialog.vue 2.7 KB
<template>
  <div>
    <el-dialog title="处理记录" :visible.sync="dialogTableVisible" @close="handleClose">
      <el-table :data="gridData">
        <el-table-column type="index" property="date" label="序号" width="80" align="center">
          <template slot-scope="scope">
            {{ gridData.length - scope.$index }}
          </template>
        </el-table-column>
        <el-table-column property="f_create_by" label="操作人" width="120"></el-table-column>
        <el-table-column property="f_create_time" label="操作时间" width="200"></el-table-column>
        <el-table-column property="f_event_type" label="事件类型" width="200" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column property="f_progress_status" label="进展情况" :show-overflow-tooltip="true"></el-table-column>
      </el-table>
      <el-row>
        <el-col :span="24" style="display: flex;justify-content: end;margin-top: 10px">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="pageForm.page"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="pageForm.size"
            layout="total, sizes, prev, pager, next, jumper"
            :total="pageForm.total">
          </el-pagination>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>

<script>
import { getProcessingRecord } from '@/api/projectSubmission'
export default {
  name: "processingRecordDialog",
  data(){
    return {
      dialogTableVisible:false,
      gridData:[],
      projectId:'',
      pageForm:{
        page:1,
        size:10,
        total:0
      }
    }
  },
  mounted(){

  },
  methods:{
    async getRecordData(){
      let params ={
        pageBean: {
          page: 1,
          pageSize: 10,
          showTotal: true,
        },
        querys: [
          {
            property: "f_project_id",
            value: this.projectId?this.projectId:'',
            group: "advance",
            relation: "AND",
            operation: "EQUAL"
          }
        ]
      }
      await getProcessingRecord(params).then((res)=>{
        console.log('打印获取处理记录的res',res)
        const { rows, total } = res;
        this.gridData = rows;
        this.pageForm.total =  total;
      })
    },
    open(row){
      this.dialogTableVisible = true;
      this.projectId = row.id_;
      this.getRecordData();
    },
    handleClose(){
      this.dialogTableVisible = false;
    },
    handleSizeChange(val){
      this.pageForm.size = val;
      this.getRecordData();
    },
    handleCurrentChange(val){
      this.pageForm.page = val;
      this.getRecordData();
    }
  }
}
</script>

<style scoped>

</style>