You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
922 B

1 year ago
<template>
<VxeGrid v-bind="gridOptions" @cell-click="cellClick" />
</template>
<script>
import paoWanPgdConfig from './pgdTable'
11 months ago
import {getDw, getPgd, getYcldw} from "@/api/zyjh";
1 year ago
export default {
name:'PwanPgd',
props:{
workers:{
type:Array,
default:[]
}
},
1 year ago
data(){
return{
gridOptions:{},
setExt:null,
1 year ago
}
},
created(){
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
1 year ago
this.gridOptions=options
this.gridOptions.columns=columns
},
methods:{
initData(worker,zt){
11 months ago
getDw({type:'ycl'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
})
},
1 year ago
cellClick({row}){
this.$emit('pgdClick',row)
1 year ago
this.$emit('initPgd',row)
}
}
}
</script>