<template>
  <VxeGrid v-bind="gridOptions" @cell-click="cellClick" />
</template>

<script>
import paoWanPgdConfig from './pgdTable'
import {getPgd} from "@/api/zyjh";
export default {
  name:'PwanPgd',
  data(){
    return{
      gridOptions:{},
    }
  },
  created(){
    const {options,columns}=paoWanPgdConfig()
    this.gridOptions=options
    this.gridOptions.columns=columns
  },
  methods:{
    initData(worker,zt){
      getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
        this.gridOptions.data=res.data
      })
    },
    cellClick({row}){
      this.$emit('initPgd',row)
    }
  }
}
</script>
