﻿<template>
  <div id="oa-pc-app">
    <router-view v-if="isQiankun || isFullPage" />
    <ele-pro-layout v-else :menus="menus" :project-name="PROJECT_NAME" :collapse.sync="sidebarCollapsed" :show-tabs="false" :show-footer="false" home-path="/" layout-path="/">
      <router-view />
    </ele-pro-layout>
  </div>
</template>
<script>
import { PROJECT_NAME } from '@/config/setting';
export default {
  name: 'App',
  data() {
    return { PROJECT_NAME, sidebarCollapsed: false, menus: [
      { path: '/', meta: { title: '首页', icon: 'el-icon-house' } },
      {
        path: '/hr',
        meta: { title: '人事管理', icon: 'el-icon-user' },
        children: [
          { path: '/organization', meta: { title: '组织机构' } },
          { path: '/employee-archive', meta: { title: '员工档案' } },
          { path: '/onboarding-handling', meta: { title: '办理入职' } },
          { path: '/regularization-handling', meta: { title: '转正办理' } },
          {
            path: '/resignation',
            meta: { title: '离职管理' },
            children: [
              { path: '/resignation-application', meta: { title: '离职申请' } },
              { path: '/resignation-handover-order', meta: { title: '离职交接单' } }
            ]
          },
          { path: '/position-transfer', meta: { title: '岗位调动办理' } },
          { path: '/qualification-management', meta: { title: '资质管理' } },
          { path: '/term-management', meta: { title: '期限管理' } },
          {
            path: '/employee-template',
            meta: { title: '员工模板' },
            children: [
              { path: '/offer-letter-template', meta: { title: '录用通知书' } },
              { path: '/onboarding-contract-template', meta: { title: '入职合同模板' } },
              { path: '/regularization-template', meta: { title: '转正申请模板' } },
              { path: '/resignation-letter', meta: { title: '辞职申请书' } },
              { path: '/resignation-handover-table', meta: { title: '离职交接表' } },
              { path: '/resignation-certificate', meta: { title: '离职证明' } },
              { path: '/position-transfer-template', meta: { title: '岗位调动' } }
            ]
          }
        ]
      },
      {
        path: '/contract',
        meta: { title: '合同管理', icon: 'el-icon-document' },
        children: [
          { path: '/contract-template', meta: { title: '合同模版' } },
          { path: '/contract-management', meta: { title: '合同管理' } }
        ]
      },
      {
        path: '/approval',
        meta: { title: '行政审批', icon: 'el-icon-finished' },
        children: [
          { path: '/approval-sync-attendance', meta: { title: '行政审批同步考勤' } }
        ]
      },
      {
        path: '/position',
        meta: { title: '岗位管理', icon: 'el-icon-suitcase' },
        children: [
          { path: '/position-management', meta: { title: '岗位设定' } },
          { path: '/position-sequence', meta: { title: '岗位序列' } },
          { path: '/position-application', meta: { title: '岗位申请' } }
        ]
      },
      { path: '/recruitment-plan', meta: { title: '招聘需求计划', icon: 'el-icon-suitcase' } },
      { path: '/talent-pool', meta: { title: '人才库', icon: 'el-icon-user' } },
      { path: '/offer-notify', meta: { title: 'Offer 通知', icon: 'el-icon-s-promotion' } },
      { path: '/performance-scoring', meta: { title: '绩效评分', icon: 'el-icon-edit-outline' } },
      { path: '/performance-scheme', meta: { title: '绩效方案', icon: 'el-icon-document-checked' } },
      { path: '/personnel-structure-dashboard', meta: { title: '人员结构看板', icon: 'el-icon-data-analysis' } },
      { path: '/personnel-structure-analysis-board', meta: { title: '人员结构分析看板', icon: 'el-icon-pie-chart' } },
      {
        path: '/attendance',
        meta: { title: '考勤管理', icon: 'el-icon-time' },
        children: [
          { path: '/attendance/rule', meta: { title: '打卡规则设定' } },
          { path: '/attendance/report', meta: { title: '考勤统计' } }
        ]
      }
    ] };
  },
  computed: { isQiankun() { return Boolean(window.__POWERED_BY_QIANKUN__); }, isFullPage() { return Boolean(this.$route.meta?.fullPage); } }
};
</script>
<style src="./styles/App.css"></style>