2022-06-08 14:51:11 +08:00

95 lines
2.5 KiB
Vue

<template>
<!-- 劳务管理--人员管理 -->
<div class="personManage">
<div class="content_title">
<el-menu
:default-active="String(showModule)"
active-text-color="#5181F6"
class="el-menu-demo whiteBlock"
mode="horizontal"
style="width:370px"
>
<el-menu-item index="1" style="height:41px;line-height:41px" @click="switchTab(1)">{{$t('message.laborMange.modules')}}</el-menu-item>
<el-menu-item index="2" style="height:41px; line-height:41px" @click="switchTab(2)">{{$t('message.laborMange.modules1')}}</el-menu-item>
<el-menu-item index="3" style="height:41px; line-height:41px" @click="switchTab(3)">{{$t('message.laborMange.modules2')}}</el-menu-item>
</el-menu>
</div>
<div class="content_right"></div>
<!-- 劳务人员 -->
<Labor v-if="showModule==1" class="labor_module" />
<!-- 管理人员 -->
<Admin v-if="showModule==2" />
<!-- 临时人员 -->
<Temporary v-if="showModule==3" />
</div>
</template>
<script>
import Labor from "./personModule/laborComponent";
import Admin from "./personModule/administration";
import Temporary from "./personModule/temporary";
export default {
name: "personManage",
components: {
Labor,
Admin,
Temporary
},
data() {
return {
showModule: 1,
};
},
created(){
//详情返回对应的 列表模块
if(localStorage.getItem('showPersonModule')){
this.switchTab(Number(localStorage.getItem('showPersonModule')));
localStorage.removeItem('showPersonModule')
}
},
methods: {
switchTab(type) {
if (type == this.showModule) return;
if(type == 1){
window._paq.push(['trackEvent', '点击', '劳务人员','切换为劳务人员' ])
}
else if(type == 2){
window._paq.push(['trackEvent', '点击', '管理人员','切换为管理人员' ])
}
else if(type == 3){
window._paq.push(['trackEvent', '点击', '临时人员','切换为临时人员' ])
}
this.showModule = type;
},
},
};
</script>
<style lang="less" scoped>
.personManage {
width: 100%;
height: 100%;
position: relative;
}
.content_title {
z-index: 100;
position: absolute;
top: 0;
left: 0;
}
.labor_module {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
/deep/ .el-dialog__title, .pageTitle{
font-weight: 700 !important;
}
.el-menu-item{
width: 33.333%;
text-align: center;
padding: 0 16px !important;
}
</style>