licp
2024-12-19 97c857f75a9ef32489678e8dd5925472e9c7a9d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<template>
  <el-tabs v-model="activeName" :lazy="true" type="border-card">
    <el-tab-pane label="人员基本信息" name="人员基本信息">
      <PersonnelList v-if="activeName === '人员基本信息' && isShowAll" ref="personnelList" :currentCompaniesList="currentCompaniesList"
                     :departId="departId" @refreshTree="refreshTree"
                     @updatePerson="updatePerson"></PersonnelList>
      <personnelInformation v-if="activeName === '人员基本信息' && !isShowAll" :clickNodeVal="clickNodeVal"></personnelInformation>
    </el-tab-pane>
    <el-tab-pane label="培训计划" name="培训计划">
      <PersonnelTraining v-if="activeName === '培训计划'" ref="personnelTraining"
                         :departId="departId" :isDepartment="isDepartment"></PersonnelTraining>
    </el-tab-pane>
    <el-tab-pane label="监督计划" name="监督计划">
      <Plan v-if="activeName === '监督计划'"></Plan>
    </el-tab-pane>
    <el-tab-pane label="岗位职责" name="岗位职责">
      <job-responsibilities v-if="activeName === '岗位职责'" ref="jobResponsibilities"
                            :departId="departId"
                            :isDepartment="isDepartment"></job-responsibilities>
    </el-tab-pane>
    <el-tab-pane label="工作履历" name="工作履历">
      <trackRecord v-if="activeName === '工作履历'" :clickNodeVal="clickNodeVal"></trackRecord>
    </el-tab-pane>
    <el-tab-pane label="奖惩记录" name="奖惩记录">
      <rewardPunishmentRecord v-if="activeName === '奖惩记录'"
                              :departId="departId" :isDepartment="isDepartment"></rewardPunishmentRecord>
    </el-tab-pane>
    <el-tab-pane label="培训记录" name="培训记录">
      <training-record v-if="activeName === '培训记录'" ref="trainingRecord"
                       :departId="departId"
                       :isDepartment="isDepartment"></training-record>
    </el-tab-pane>
    <el-tab-pane label="监督记录" name="监督记录">
      <Records v-if="activeName === '监督记录'" ref="recordsRef" :departId="departId" :isDepartment="isDepartment"></Records>
    </el-tab-pane>
    <el-tab-pane label="任职授权记录" name="任职授权记录">
      <Mandate v-if="activeName === '任职授权记录'" ref="manDateRef" :departId="departId" :isDepartment="isDepartment"></Mandate>
    </el-tab-pane>
    <el-tab-pane label="人员能力" name="人员能力">
      <personnel-capacity v-if="activeName === '人员能力'" ref="personnelCapacity"
                          :departId="departId"
                          :isDepartment="isDepartment"></personnel-capacity>
    </el-tab-pane>
    <el-tab-pane label="沟通记录" name="沟通记录">
      <Communicate v-if="activeName === '沟通记录'" ref="communicateRef" :departId="departId" :isDepartment="isDepartment"></Communicate>
    </el-tab-pane>
  </el-tabs>
</template>
<script>
import Plan from './components/Plan/index.vue';
import Records from './components/Records/index.vue';
import Communicate from './components/Communicate/index.vue';
import Mandate from './components/Mandate/index.vue';
import PersonnelList from '../../do/a6-personnel-collect/personnel-list.vue';
import PersonnelTraining from '../../do/a6-personnel-training/index.vue';
import JobResponsibilities from '../../do/a6-personnel/job-responsibilities.vue';
import TrainingRecord from '../../do/a6-personnel/training-record.vue';
import PersonnelCapacity from '../../do/a6-personnel/personnel-capacity.vue';
import trackRecord from "../../do/a6-personnel/track-record.vue";
import rewardPunishmentRecord from "../../do/a6-personnel/reward-punishment-record.vue";
import PersonnelInformation from "../../do/a6-personnel/personnel-information.vue";
 
export default {
  props: {
    clickNodeVal: {
      type: Object,
      default: () => {
        return {};
      }
    },
    departId: {
      type: Number,
      default: 0
    },
    isDepartment: {
      type: Boolean,
      default: false
    },
    isShowAll: {
      type: Boolean,
      default: false
    },
    currentCompaniesList: {
      type: Array,
      default: []
    }
  },
  components: {
    PersonnelInformation,
    rewardPunishmentRecord,
    trackRecord,
    PersonnelCapacity,
    TrainingRecord,
    JobResponsibilities,
    PersonnelTraining,
    PersonnelList,
    Plan,
    Records,
    Communicate,
    Mandate
  },
  watch: {
    departId: {
      handler(newId, oldId) {
        if (newId) {
          switch (this.activeName) {
            case '沟通记录':
              this.$refs.communicateRef.getDepart(newId);
              break;
            case '任职授权记录':
              this.$refs.manDateRef.getDepart(newId);
              break;
            default:
              break;
          }
        }
      }
    }
  },
  data() {
    return {
      activeName: '人员基本信息',
    }
  },
  methods:{
    updatePerson (row) {
      this.$parent.updatePerson(row);
    },
    refreshTree () {
      this.$parent.refreshTree();
    },
  }
};
</script>
<style scoped>
.box {
  height: calc(100vh - 11em);
}
 
.el-tabs >>> .el-tabs--border-card {
  box-shadow: unset;
  border: unset;
}
 
.flex_column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
</style>