<template>
  <mianStaff ref="main">
    <template v-slot:edit="scope">
      <div class="container normal-panel normal-margin" v-if="tool.checkAuth($route.name,'editStaff')">
          <editStaff  :data="scope.data" :type="'btn'" @onSuccess="query_hrMain"></editStaff>
      </div>
    </template>
     <template v-slot:createuser="scope">
        <createUser  v-if="tool.checkAuth($route.name,'editStaff') && !scope.data.userid" :data="scope.data"  @onSuccess="query_hrMain"></createUser>
     </template>
    <template v-slot:linkact="scope">
      <linkAccount v-if="tool.checkAuth($route.name,'editStaff')"  :data="scope.data"  @onSuccess="query_hrMain"></linkAccount>
    </template>
    <restPas slot="restpas" v-if="tool.checkAuth($route.name,'restpas')"></restPas>
  </mianStaff>
</template>

<script>
import mianStaff from './modules/main.vue'
import editStaff from "../list/modules/edit.vue"
import restPas from "./modules/restPassword.vue"
import linkAccount from "./modules/linkAccount.vue"
import createUser from "./modules/createUser.vue"

export default {
  components:{
    mianStaff,
    editStaff,
    restPas,
    linkAccount,
    createUser
  },
  data () {
    return {
      mainInfo:{}
    }
  },
  methods:{
    query_hrMain () {
      this.$refs.main.query_hrMain()
    }
  },
  mounted () {
  }
}

</script>
<style>
.user-panel .el-descriptions__title{width: 100%;}
</style>