|
@@ -1,8 +1,8 @@
|
|
<template>
|
|
<template>
|
|
- <div class="OKRList" >
|
|
|
|
|
|
+ <div class="OKRList" v-infinite-scroll="handleInfiniteOnLoad">
|
|
<!-- <div class="topBox"> </div> -->
|
|
<!-- <div class="topBox"> </div> -->
|
|
<div class="title">
|
|
<div class="title">
|
|
- OKR广场
|
|
|
|
|
|
+ OKR看板
|
|
</div>
|
|
</div>
|
|
<div class="OKRBody" v-loading="loading">
|
|
<div class="OKRBody" v-loading="loading">
|
|
<div class="top-opt">
|
|
<div class="top-opt">
|
|
@@ -33,7 +33,8 @@
|
|
<el-input
|
|
<el-input
|
|
placeholder="输入搜索的名字"
|
|
placeholder="输入搜索的名字"
|
|
v-model="nameValue"
|
|
v-model="nameValue"
|
|
- clearable>
|
|
|
|
|
|
+ clearable
|
|
|
|
+ @change='searchName'>
|
|
<el-button slot="append" icon="el-icon-search" @click="searchName"></el-button>
|
|
<el-button slot="append" icon="el-icon-search" @click="searchName"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
|
|
|
|
@@ -43,8 +44,8 @@
|
|
</span> -->
|
|
</span> -->
|
|
</div>
|
|
</div>
|
|
<div class="listBody" >
|
|
<div class="listBody" >
|
|
- <div class="itemBody" @click="getThisOKR(item)" v-for="(item,index) in list" :key="index" >
|
|
|
|
- <div class="item">
|
|
|
|
|
|
+ <div class="itemBody" v-for="(item,index) in list" :key="index" >
|
|
|
|
+ <div class="item" @click="getThisOKR(item)">
|
|
<div class="item-top">
|
|
<div class="item-top">
|
|
<span class="jidu">第{{item.object.quarter}}季度</span>
|
|
<span class="jidu">第{{item.object.quarter}}季度</span>
|
|
<div class="targetName">
|
|
<div class="targetName">
|
|
@@ -110,6 +111,7 @@
|
|
<span class="tip"><span class="sc-bQduHL kArEgh"></span> KR</span>
|
|
<span class="tip"><span class="sc-bQduHL kArEgh"></span> KR</span>
|
|
<span class="info">
|
|
<span class="info">
|
|
{{item.krInfo}}
|
|
{{item.krInfo}}
|
|
|
|
+ <span v-for="element in item.remindVOS" :key="element.remindId" class="remindSpan">@{{element.name}}</span>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
<span class="progress">
|
|
<span class="progress">
|
|
@@ -281,14 +283,14 @@ let cycleOptions=[
|
|
},
|
|
},
|
|
]
|
|
]
|
|
import {postAction , getAction} from '@/utils/api/http.js'
|
|
import {postAction , getAction} from '@/utils/api/http.js'
|
|
|
|
+import infiniteScroll from 'vue-infinite-scroll'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
loading:false,
|
|
loading:false,
|
|
totalPage:0,
|
|
totalPage:0,
|
|
currentPage:1,
|
|
currentPage:1,
|
|
- isLoading:false,
|
|
|
|
- nomore:false,
|
|
|
|
|
|
+
|
|
follow:false,
|
|
follow:false,
|
|
yearValue:undefined,
|
|
yearValue:undefined,
|
|
yearsOptions:[],
|
|
yearsOptions:[],
|
|
@@ -319,32 +321,38 @@ export default {
|
|
{color: '#5cb87a', percentage: 80},
|
|
{color: '#5cb87a', percentage: 80},
|
|
{color: '#5cb87a', percentage: 100}
|
|
{color: '#5cb87a', percentage: 100}
|
|
],
|
|
],
|
|
|
|
+
|
|
|
|
+ // 滚动加载更多
|
|
|
|
+ loadingMore: true,//是否还有数据允许加载
|
|
|
|
+ pageIndex: 1,
|
|
|
|
+ pageSize: 16,
|
|
|
|
+ loading: false,
|
|
|
|
+ busy: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // watch: {
|
|
|
|
- // currentData:{
|
|
|
|
- // deep:true
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
|
|
+ directives: { infiniteScroll },
|
|
methods: {
|
|
methods: {
|
|
followHis(item){
|
|
followHis(item){
|
|
- // this.follow=!this.follow;
|
|
|
|
- console.log(item)
|
|
|
|
|
|
|
|
|
|
+ console.log(item)
|
|
let status=item.follow?0:1;
|
|
let status=item.follow?0:1;
|
|
|
|
+
|
|
|
|
+ this.list.forEach((ele,index)=>{
|
|
|
|
+ if(item.object.userId==ele.object.userId){
|
|
|
|
+ this.$set(ele,'follow',!item.follow)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
postAction('/okr/focusInfo/focus',{
|
|
postAction('/okr/focusInfo/focus',{
|
|
status,
|
|
status,
|
|
userId:item.object.userId
|
|
userId:item.object.userId
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
console.log(res)
|
|
console.log(res)
|
|
if(res.success){
|
|
if(res.success){
|
|
- this.list.forEach((ele,index)=>{
|
|
|
|
- if(item.object.userId==ele.object.userId){
|
|
|
|
- this.$set(ele,'follow',!item.follow)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
- this.$meaasge.error('取消关注失败,请稍后再试!')
|
|
|
|
|
|
+ this.$meaasge.error(res.message);
|
|
|
|
+ this.getList()
|
|
}
|
|
}
|
|
|
|
|
|
})
|
|
})
|
|
@@ -386,13 +394,16 @@ export default {
|
|
this.loading=true;
|
|
this.loading=true;
|
|
this.isCurrentQuarter=2;
|
|
this.isCurrentQuarter=2;
|
|
this.list=[];
|
|
this.list=[];
|
|
|
|
+ this.loadingMore=true;
|
|
|
|
+ this.pageIndex=2;
|
|
postAction('/okr/okr/getSyncUserListByMemberId',{
|
|
postAction('/okr/okr/getSyncUserListByMemberId',{
|
|
year:this.yearValue,
|
|
year:this.yearValue,
|
|
quarter:this.cycleValue,
|
|
quarter:this.cycleValue,
|
|
name:this.nameValue
|
|
name:this.nameValue
|
|
}).then((res)=>{
|
|
}).then((res)=>{
|
|
// console.log(res);
|
|
// console.log(res);
|
|
- this.loading=false;
|
|
|
|
|
|
+ this.loading=false;
|
|
|
|
+
|
|
this.isCurrentQuarter=res.result.isCurrentQuarter;
|
|
this.isCurrentQuarter=res.result.isCurrentQuarter;
|
|
this.list=res.result.list
|
|
this.list=res.result.list
|
|
})
|
|
})
|
|
@@ -404,6 +415,12 @@ export default {
|
|
object:{},
|
|
object:{},
|
|
krList:[]
|
|
krList:[]
|
|
},
|
|
},
|
|
|
|
+ this.okr=[];
|
|
|
|
+ this.taskInfoList=[];
|
|
|
|
+ this.taskFourWeek=[];
|
|
|
|
+ this.time={};
|
|
|
|
+ this.status=[];
|
|
|
|
+ this.okrObject={};
|
|
this.dialogVisible=true;
|
|
this.dialogVisible=true;
|
|
// console.log(item,this.isCurrentQuarter);
|
|
// console.log(item,this.isCurrentQuarter);
|
|
if(this.isCurrentQuarter!=1){
|
|
if(this.isCurrentQuarter!=1){
|
|
@@ -431,46 +448,75 @@ export default {
|
|
})
|
|
})
|
|
this.status=res.result.status;
|
|
this.status=res.result.status;
|
|
this.okrObject=res.result.okr[0].objectInfo;
|
|
this.okrObject=res.result.okr[0].objectInfo;
|
|
|
|
+ }else{
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
- // scroll() {
|
|
|
|
- // let scrollTop = document.documentElement.scrollTop||document.body.scrollTop;
|
|
|
|
- // let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
|
|
- // let scrollHeight = document.body.scrollHeight;
|
|
|
|
- // console.log(scrollTop+windowHeight,scrollHeight)
|
|
|
|
- // if(scrollTop+windowHeight>=scrollHeight){ //测试浏览器有的时候相加 会出现小数点 这里用 >= 不用 ==
|
|
|
|
- // if(this.page <= this.totalPage) {
|
|
|
|
- // this.getList();
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+ // 滚动事件
|
|
|
|
+ handleInfiniteOnLoad(){
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(this.loadingMore){
|
|
|
|
+ this.loading=true;
|
|
|
|
+ postAction('/okr/okr/getSyncUserListByMemberId',{
|
|
|
|
+ year:this.yearValue,
|
|
|
|
+ quarter:this.cycleValue,
|
|
|
|
+ name:this.nameValue,
|
|
|
|
+ pageNumber:this.pageIndex
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.loading=false;
|
|
|
|
+ if(res.success){
|
|
|
|
+ this.isCurrentQuarter=res.result.isCurrentQuarter;
|
|
|
|
+ // this.list=res.result.list;
|
|
|
|
+ this.yearValue=res.result.year;
|
|
|
|
+ this.cycleValue=res.result.quarter
|
|
|
|
+ if (res.result.list.length > 0) {
|
|
|
|
+ this.loadingMore = true
|
|
|
|
+ this.isScroll = true
|
|
|
|
+ this.list = [...this.list, ...res.result.list]
|
|
|
|
+ let pageNumber = this.pageIndex += 1
|
|
|
|
+ } else {
|
|
|
|
+ this.loadingMore = false
|
|
|
|
+ this.$message.warning('没有更多数据了!')
|
|
|
|
+ }
|
|
|
|
+ this.isCurrentQuarter=res.result.isCurrentQuarter;
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('服务器异常')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ destroyed(){
|
|
|
|
+ // console.log(this.$refs)
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
- // created () {
|
|
|
|
- // var that = this;
|
|
|
|
- // window.addEventListener('scroll',this.scroll,true)
|
|
|
|
- // console.log(this.$router)
|
|
|
|
- // this.getList();
|
|
|
|
- // },
|
|
|
|
- // destroyed () {
|
|
|
|
- // window.removeEventListener('scroll', this.scroll,true)
|
|
|
|
- // },
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+
|
|
|
|
+
|
|
this.loading=true;
|
|
this.loading=true;
|
|
- postAction('/okr/okr/getSyncUserListByMemberId',{
|
|
|
|
|
|
+ // postAction('/okr/okr/getSyncUserListByMemberId',{
|
|
|
|
|
|
- }).then((res)=>{
|
|
|
|
- console.log(res);
|
|
|
|
- this.loading=false;
|
|
|
|
- this.isCurrentQuarter=res.result.isCurrentQuarter;
|
|
|
|
- this.list=res.result.list;
|
|
|
|
- this.yearValue=res.result.year;
|
|
|
|
- this.cycleValue=res.result.quarter
|
|
|
|
- })
|
|
|
|
|
|
+ // }).then((res)=>{
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // this.loading=false;
|
|
|
|
+ // this.isCurrentQuarter=res.result.isCurrentQuarter;
|
|
|
|
+ // this.list=res.result.list;
|
|
|
|
+ // this.yearValue=res.result.year;
|
|
|
|
+ // this.cycleValue=res.result.quarter
|
|
|
|
+ // })
|
|
postAction('/okr/okr/getObjectYear ',{
|
|
postAction('/okr/okr/getObjectYear ',{
|
|
}).then((res)=>{
|
|
}).then((res)=>{
|
|
// console.log(res);
|
|
// console.log(res);
|
|
@@ -489,14 +535,16 @@ export default {
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
.OKRList{
|
|
.OKRList{
|
|
// max-height: 300px;
|
|
// max-height: 300px;
|
|
|
|
+ height: 100%;
|
|
|
|
+ overflow: auto;
|
|
.topBox{
|
|
.topBox{
|
|
height: 41px;
|
|
height: 41px;
|
|
}
|
|
}
|
|
.title{
|
|
.title{
|
|
background-color: #f4f6f9;
|
|
background-color: #f4f6f9;
|
|
- padding-left: 20px;
|
|
|
|
- height: 80px;
|
|
|
|
- line-height: 80px;
|
|
|
|
|
|
+ padding-left: 25px;
|
|
|
|
+ height: 60px;
|
|
|
|
+ line-height: 60px;
|
|
text-align: left;
|
|
text-align: left;
|
|
}
|
|
}
|
|
.OKRBody{
|
|
.OKRBody{
|
|
@@ -659,6 +707,12 @@ export default {
|
|
display:inline-block;
|
|
display:inline-block;
|
|
margin-right: 15px;
|
|
margin-right: 15px;
|
|
}
|
|
}
|
|
|
|
+ .remindSpan{
|
|
|
|
+ color:#2e9cff;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin-right: 3px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.targetBody{
|
|
.targetBody{
|
|
@@ -780,8 +834,9 @@ export default {
|
|
.krtitle{
|
|
.krtitle{
|
|
line-height: 40px;
|
|
line-height: 40px;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
- width: 30%;
|
|
|
|
|
|
+ width: 90px;
|
|
text-align: right;
|
|
text-align: right;
|
|
|
|
+ flex-shrink: 0;
|
|
}
|
|
}
|
|
.KR-opt{
|
|
.KR-opt{
|
|
width: 60%;
|
|
width: 60%;
|
|
@@ -800,11 +855,14 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ul{
|
|
|
|
+ padding: 0;
|
|
|
|
+}
|
|
ul,li{
|
|
ul,li{
|
|
margin: 0;
|
|
margin: 0;
|
|
- padding: 0;
|
|
|
|
|
|
+ padding-top: 0;
|
|
list-style: none;
|
|
list-style: none;
|
|
|
|
+
|
|
}
|
|
}
|
|
.okrPage{
|
|
.okrPage{
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -823,6 +881,7 @@ ul,li{
|
|
line-height: 50px;
|
|
line-height: 50px;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
+ margin-top: 15px;
|
|
}
|
|
}
|
|
|
|
|
|
.okrBody{
|
|
.okrBody{
|
|
@@ -1126,8 +1185,16 @@ ul,li{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.top-opt .el-input__inner {
|
|
|
|
+ border: none;
|
|
|
|
+ // text-align: center;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
|
+.el-message{
|
|
|
|
+ min-width: auto;
|
|
|
|
+}
|
|
.taskBody{
|
|
.taskBody{
|
|
.el-tooltip__popper.is-dark {
|
|
.el-tooltip__popper.is-dark {
|
|
background: #303133;
|
|
background: #303133;
|