Commit 32ed00c7 authored by ww-xxy's avatar ww-xxy

对接首页接口

parent 53452ed4
...@@ -5,17 +5,17 @@ ...@@ -5,17 +5,17 @@
<el-col :span="6" :xs="12"> <el-col :span="6" :xs="12">
<el-card> <el-card>
<div class="data_left"> <div class="data_left">
<div class="title">今日数据洞察</div> <div class="title" style="margin-bottom:40px">今日数据洞察</div>
<div class="cell1"> <div class="cell1">
<div class="title">人事数据</div> <div class="title">人事数据</div>
<div class="datas flex flex-align-center flex-pack-justify flex_warp"> <div class="datas flex flex-align-center flex-pack-justify flex_warp">
<div class="item"> <div class="item">
<div>总人数</div> <div>总人数</div>
<div>999</div> <div>{{homeStat.totalPersonNum}}</div>
</div> </div>
<div class="item"> <div class="item">
<div>部门人数</div> <div>部门人数</div>
<div>20</div> <div>{{homeStat.totalDeptNum}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -24,15 +24,27 @@ ...@@ -24,15 +24,27 @@
<div class="datas flex flex-align-center flex-pack-justify flex_warp"> <div class="datas flex flex-align-center flex-pack-justify flex_warp">
<div class="item"> <div class="item">
<div>打卡人数</div> <div>打卡人数</div>
<div>999</div> <div>{{homeStat.attendPersonNum}}</div>
</div> </div>
<div class="item"> <div class="item">
<div>出勤率</div> <div>出勤率</div>
<div>20</div> <div>{{homeStat.attendRadio}}%</div>
</div> </div>
<div class="item"> <div class="item">
<div>请假人数</div> <div>请假人数</div>
<div>20</div> <div>{{homeStat.levealPersonNum}}</div>
</div>
<div class="item">
<div>迟到人数</div>
<div>{{homeStat.latePersonNum}}</div>
</div>
<div class="item">
<div>早退人数</div>
<div>{{homeStat.leftEarlyPersonNum}}</div>
</div>
<div class="item">
<div>缺卡人数</div>
<div>{{homeStat.missCardPersonNum}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -48,11 +60,12 @@ ...@@ -48,11 +60,12 @@
创新性与技术性的重要支撑以及效能性与发展性的不懈追求 创新性与技术性的重要支撑以及效能性与发展性的不懈追求
</div> </div>
<div class="selectBars flex flex-align-center flex-pack-justify flex_warp"> <div class="selectBars flex flex-align-center flex-pack-justify flex_warp">
<div class="Bar_item" v-for="(item,index) in barList" :key="index" @click="tabChildren(item.barName)"> <div class="Bar_item" v-for="(item, index) in barList" :key="index"
@click="tabChildren(item.barName)">
<div class="icon"> <div class="icon">
<img :src="item.icon"> <img :src="item.icon">
</div> </div>
<div class="barnam">{{item.barName}}</div> <div class="barnam">{{ item.barName }}</div>
<div class="des" v-html="item.desc"></div> <div class="des" v-html="item.desc"></div>
</div> </div>
</div> </div>
...@@ -73,178 +86,220 @@ export default { ...@@ -73,178 +86,220 @@ export default {
return this.mapMenu(this.userData.barList) return this.mapMenu(this.userData.barList)
} }
}, },
data(){ data() {
return{ return {
barList:[ // 数据洞察
homeStat:{
totalPersonNum:0,//总人数
totalDeptNum:0,//部门数
attendPersonNum:0,//考勤人数
attendRadio:0,//出勤率
levealPersonNum:0,//请假人数
latePersonNum:0,//迟到人数
leftEarlyPersonNum:0,//早退人数
missCardPersonNum:0,//缺卡人数
},
barList: [
{ {
icon:require('@/assets/images/u148.png'), icon: require('@/assets/images/u148.png'),
barName:'智能人事', barName: '智能人事',
desc:'提供包括组织管理、职位管理、人事管理、人事<br>统计报表等相关功能', desc: '提供包括组织管理、职位管理、人事管理、人事<br>统计报表等相关功能',
navList:[] navList: []
}, },
{ {
icon:require('@/assets/images/u153.png'), icon: require('@/assets/images/u153.png'),
barName:'考勤打卡', barName: '考勤打卡',
desc:'提供包括组织管理、职位管理、人事管理、人事<br>统计报表等相关功能', desc: '提供包括组织管理、职位管理、人事管理、人事<br>统计报表等相关功能',
navList:[] navList: []
}, },
{ {
icon:require('@/assets/images/u158.png'), icon: require('@/assets/images/u158.png'),
barName:'绩效管理', barName: '绩效管理',
desc:'根据部门/个人承担的目标和任务完成情况以及工作<br>评价结果、加减分纪实现考核结果自动生成。', desc: '根据部门/个人承担的目标和任务完成情况以及工作<br>评价结果、加减分纪实现考核结果自动生成。',
navList:[] navList: []
}, },
{ {
icon:require('@/assets/images/u167.png'), icon: require('@/assets/images/u167.png'),
barName:'OA审批', barName: 'OA审批',
desc:'无纸化审批流程,轻松完成打卡请假、移动审批等<br>操作,审批资料查找方便', desc: '无纸化审批流程,轻松完成打卡请假、移动审批等<br>操作,审批资料查找方便',
navList:[] navList: []
}, },
{ {
icon:require('@/assets/images/u172.png'), icon: require('@/assets/images/u172.png'),
barName:'数据分析', barName: '数据分析',
desc:'完整团队经营状态的数字化,人财物事数据分析<br>展示,为管理提供智能决策依据', desc: '完整团队经营状态的数字化,人财物事数据分析<br>展示,为管理提供智能决策依据',
navList:[] navList: []
}, },
{ {
icon:require('@/assets/images/u177.png'), icon: require('@/assets/images/u177.png'),
barName:'系统设置', barName: '系统设置',
desc:'提供包括RBAC用户-角色-权限管理、版本管理、<br>操作及登录日志管理等功能', desc: '提供包括RBAC用户-角色-权限管理、版本管理、<br>操作及登录日志管理等功能',
navList:[] navList: []
} }
] ]
} }
}, },
created(){ created() {
this.$store.commit('setHeadBar',[]) this.$store.commit('setHeadBar', [])
this.$store.commit("setCurrentParentName",'') this.$store.commit("setCurrentParentName", '')
this.$store.commit('setCurrentThirdArr',[]) this.$store.commit('setCurrentThirdArr', [])
this.$store.commit('setCurrentSecondPath','') this.$store.commit('setCurrentSecondPath', '')
this.$store.commit('setThirdPath','') this.$store.commit('setThirdPath', '')
this.homeNum()
}, },
methods:{ methods: {
tabChildren(name){ tabChildren(name) {
console.log("name:"+name) console.log("name:" + name)
this.$store.commit("setCurrentParentName",name)//存储选择路由 this.$store.commit("setCurrentParentName", name)//存储选择路由
let result = this.menu.find(item => item.name === name) let result = this.menu.find(item => item.name === name)
this.$store.commit('setHeadBar',result) this.$store.commit('setHeadBar', result)
console.log("result:",result) console.log("result:", result)
// 路由跳转 // 路由跳转
if(result.children.length>0){ if (result.children.length > 0) {
this.$store.commit('setCurrentThirdArr',result.children[0].children) this.$store.commit('setCurrentThirdArr', result.children[0].children)
this.$store.commit('setCurrentSecondPath',result.children[0].path) this.$store.commit('setCurrentSecondPath', result.children[0].path)
this.$store.commit('setThirdPath',result.children[0].path) this.$store.commit('setThirdPath', result.children[0].path)
this.$router.push({path:result.children[0].path}) this.$router.push({ path: result.children[0].path })
}else{ } else {
this.$message.error('暂未完成添加'); this.$message.error('暂未完成添加');
} }
}, },
mapMenu(arr){ mapMenu(arr) {
if(arr.length === 0) return [] if (arr.length === 0) return []
let result = arr.map(item => { let result = arr.map(item => {
const url = item.url const url = item.url
? item.url ? item.url
: item.childList[0] : item.childList[0]
? item.childList[0].url || "" ? item.childList[0].url || ""
: ""; : "";
return { return {
name: item.name, name: item.name,
path: url, path: url,
id: item.id, id: item.id,
icon: item.imgPath, icon: item.imgPath,
children:item.childList.length === 0? []:this.mapMenu(item.childList) children: item.childList.length === 0 ? [] : this.mapMenu(item.childList)
} }
}) })
return result return result
}, },
// 查询统计数据
homeNum() {
this.$post("/login/index").then((res) => {
const { code, data } = res
if (code == 1) {
this.homeStat = Object.assign({},this.homeStat,data.homeStat)
console.log(data,"####")
}
});
}
} }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.page-home{ .page-home {
width: 100%; width: 100%;
min-width: 1400px; min-width: 1400px;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
// padding: 2% 5%; // padding: 2% 5%;
background-color: #f3f2f2; background-color: #f3f2f2;
.data_left{
.cell1{ .data_left {
padding: 50px 20px 0 20px;
.cell1 {
font-size: 16px; font-size: 16px;
.title{
.title {
color: #409EFF; color: #409EFF;
margin-bottom: 20px; margin-bottom: 20px;
} }
.item{
.item {
text-align: left; text-align: left;
width: 50%; width: 50%;
margin-bottom: 20px; margin-bottom: 20px;
} }
.item div:first-child{
.item div:first-child {
color: gray; color: gray;
margin-bottom: 20px; margin-bottom: 20px;
} }
border-bottom: 1px solid rgb(245, 245, 245); border-bottom: 1px solid rgb(245, 245, 245);
padding: 10px 0; padding: 10px 0;
} }
.cell1:last-child{
border:none .cell1:last-child {
border: none
} }
} }
// 数据标题 // 数据标题
.data_left>.title,.data_right>.title{ .data_left>.title,
.data_right>.title {
text-align: center; text-align: center;
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
} }
.right_card{
.right_card {
background-image: url('~@/assets/images/u162.svg'); background-image: url('~@/assets/images/u162.svg');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% auto; background-size: 100% auto;
background-position: bottom; background-position: bottom;
} }
// 导航栏 // 导航栏
.data_right{ .data_right {
.textWord{ padding-top: 40px;
.textWord {
text-align: center; text-align: center;
margin-top: 30px; margin-top: 30px;
font-size: 16px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
} }
} }
.selectBars{
.selectBars {
padding: 0 20px; padding: 0 20px;
} }
.Bar_item{
.Bar_item {
width: 30%; width: 30%;
margin-top: 50px; margin-top: 50px;
border-radius: 10px; border-radius: 10px;
padding: 20px 0; padding: 20px 0;
text-align: center; text-align: center;
background: linear-gradient(90deg, rgba(187, 193, 255,0.3), rgb(235, 235, 235)); background: linear-gradient(90deg, rgba(187, 193, 255, 0.3), rgb(235, 235, 235));
cursor: pointer; cursor: pointer;
.icon img{
.icon img {
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.barnam{
.barnam {
font-size: 18px; font-size: 18px;
margin-top: 10px; margin-top: 10px;
} }
.des{
.des {
font-size: 14px; font-size: 14px;
color: #666; color: #666;
margin-top: 15px; margin-top: 15px;
} }
} }
} }
::v-deep .el-row,::v-deep .el-col{
::v-deep .el-row,
::v-deep .el-col {
height: 100%; height: 100%;
} }
::v-deep .el-card{
::v-deep .el-card {
height: 100%; height: 100%;
} }</style>
</style>
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
+ 创建目标</el-button + 创建目标</el-button
> >
</div> </div>
<div class="mid_content"> <div class="mid_content" style="height: auto;">
<div class="goal_box" v-for="(val, i) in dataList" :key="i"> <div class="goal_box" v-for="(val, i) in dataList" :key="i">
<div class="goal_title"> <div class="goal_title">
<img src="../../../../assets/images/u17641.svg" alt="" /> <img src="../../../../assets/images/u17641.svg" alt="" />
...@@ -556,7 +556,7 @@ export default { ...@@ -556,7 +556,7 @@ export default {
},//看板查询条件 },//看板查询条件
query:{ query:{
page:1, page:1,
size:8, size:-1,
assessmentScope:1//考核范围(1.部门,2.个人) assessmentScope:1//考核范围(1.部门,2.个人)
},//目标管理查询条件 },//目标管理查询条件
StatQuery:{ StatQuery:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment