diff --git a/routers/api/v1/repo/repo_dashbord.go b/routers/api/v1/repo/repo_dashbord.go
index 60f3620ed..519077af2 100644
--- a/routers/api/v1/repo/repo_dashbord.go
+++ b/routers/api/v1/repo/repo_dashbord.go
@@ -314,6 +314,7 @@ func GetProjectLatestStatistics(ctx *context.Context) {
Mode: mode,
PR: pr,
RelAvatarLink: contributor.RelAvatarLink,
+ Email: contributor.Email,
}
users = append(users, userInfo)
diff --git a/web_src/js/components/DataAnalysis.vue b/web_src/js/components/DataAnalysis.vue
index 4d771dbb1..931f10e36 100755
--- a/web_src/js/components/DataAnalysis.vue
+++ b/web_src/js/components/DataAnalysis.vue
@@ -7,10 +7,8 @@
概览
-
概览.......
- 概览.......
- 概览.......
概览.......
- 概览.......
+ 暂无内容.......
+
@@ -20,13 +18,13 @@
项目分析
-
+
用户分析
-
+
@@ -48,6 +46,7 @@
loading:true,
loading1:true,
isRouterAlive: true,
+ isRouterAlive1: true,
isSecond:true,
isThird:false,
@@ -57,24 +56,20 @@
handleClick(tab, event){
if(tab.name=="second"){
this.reload()
- //document.getElementById('usr').style.display="none"
- //document.getElementById("pro").style.display='block'
-
- //this.$refs.ProAnalysis.getAllProList("all",7)
this.isSecond = true
this.isThird = false
this.$refs.ProAnalysis.getAllProList("all",7)
}
if(tab.name=="third"){
- // document.getElementById('usr').style.display="block"
- // document.getElementById("pro").style.display='none'
- this.reload()
+
+ this.reload1()
this.isSecond = false
this.isThird = true
- this.$refs.UserAnalysis.resetPage()
+
this.$refs.UserAnalysis.getUpdateTime()
this.$refs.UserAnalysis.getUserList("all_usr",7)
+
}
@@ -84,6 +79,10 @@
reload () {
this.isRouterAlive = false
this.$nextTick(() => (this.isRouterAlive = true))
+ },
+ reload1 () {
+ this.isRouterAlive1 = false
+ this.$nextTick(() => (this.isRouterAlive1 = true))
}
},
diff --git a/web_src/js/components/ProAnalysis.vue b/web_src/js/components/ProAnalysis.vue
index 882f610a4..6371fa884 100755
--- a/web_src/js/components/ProAnalysis.vue
+++ b/web_src/js/components/ProAnalysis.vue
@@ -29,8 +29,13 @@
@@ -142,10 +147,12 @@
@@ -153,7 +160,7 @@
- {{this.ownerName}} / {{this.pro_name}} 数据更新时间:{{tableDataIDTotal.lastUpdatedTime}} / 从{{tableDataIDTotal.recordBeginTime}}开始
+ {{this.ownerName}} / {{this.pro_name}} 数据更新时间:{{tableDataIDTotal.lastUpdatedTime}} / 从{{tableDataIDTotal.recordBeginTime}}开始统计
项目描述:{{tableDataIDTotal.description | discriptionFun}}
@@ -210,7 +217,7 @@
>
{{scope.row.user}}
@@ -266,8 +273,12 @@
@@ -286,7 +297,7 @@
@@ -318,10 +329,12 @@
@@ -357,6 +370,7 @@
search:'',
dynamic:7,
download_a:"",
+ downLoadSrc:'',
//单个项目参数
@@ -385,14 +399,22 @@
// download_file(){
// this.params.type='all'
// },
+ popMark(){
+ alert("数据为空时,不能下载!")
+ },
exportData(){
// this.getOneProList(this.pro_id,'all',true,7)
// this.getOneProList(this.pro_id,'all',false,7)
// this.fileName()
- this.currentPage=1
- var saveFileName = this.getFileName()
- export2Excel(this.columns,this.tableDataID,saveFileName)
+ if (this.tableDataID!=''){
+ this.currentPage=1
+ var saveFileName = this.getFileName()
+ export2Excel(this.columns,this.tableDataID,saveFileName)
+ }else{
+ alert("数据为空时,不能下载!")
+ }
+
},
getFileName(){
@@ -406,11 +428,7 @@
var yesterday = this.saveFormatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate());
var yesterday_tmp = this.formatDate(tmp.getFullYear(),tmp.getMonth()+1,tmp.getDate())
- let lastMonthDate = new Date(); // 上月日期
- lastMonthDate.setDate(1);
- lastMonthDate.setMonth(lastMonthDate.getMonth()-1);
- let lastYear = lastMonthDate.getYear();
- let lastMonth = lastMonthDate.getMonth();
+
var startDate=''
var endDate=''
var saveFileName = ''
@@ -458,10 +476,22 @@
break
}
case "last_month":{
- startDate=this.formatDate(nowYear, lastMonth+1, 1);
+
+ let lastMonthDate = new Date(); // 上月日期
+ lastMonthDate.setDate(1);
+ lastMonthDate.setMonth(lastMonthDate.getMonth()-1);
+ let lastYear = lastMonthDate.getFullYear();
+ let lastMonth = lastMonthDate.getMonth();
+
+ startDate=this.formatDate(lastYear, lastMonth+1, 1);
startDate = this.comparedate(startDate,this.recordBeginTime)
- endDate=this.saveFormatDate(nowYear, lastMonth+1, this.saveFormatDate(nowYear,lastMonth));
+
+ var monthStartDate = new Date(lastYear, lastMonth, 1);
+ var monthEndDate = new Date(lastYear, lastMonth+1, 1);
+ var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24)
+
+ endDate=this.saveFormatDate(lastYear, lastMonth+1, days); //月份从0开始,所以+1保存月份
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
break
}
@@ -501,6 +531,11 @@
resetCurrentPage(){
this.currentPage=1
},
+ handleSizeChange(val){
+ this.params.pagesize = val
+ this.resetPage()
+ this.getAllProList(this.params.type, this.dynamic)
+ },
handleCurrentChange(val){
console.log(val)
this.params.page = val
@@ -576,6 +611,9 @@
}
return (myyear +'-'+ mymonth +'-'+ myweekday);
},
+ //获得某月的天数
+
+
getAllProList(type_val,index){
console.log("类型:"+type_val)
@@ -636,10 +674,14 @@
return 'background:#f5f5f6;color:#606266'
}
},
-
+ handleSizeChangeID(val){
+ this.pageSize1=val
+ },
+
handleCurrentChangeID(currentPage){
this.currentPage = currentPage;
},
+
getOneProData(pro_id){
this.$axios.get('../api/v1/projectboard/project/'+pro_id,{
}).then((res)=>{
@@ -698,7 +740,39 @@
textStyle:{
color:'black'
},
- position: 'right'
+ position: 'right',
+
+
+
+ // formatter: function (params) {
+ // console.log('params:',params)
+ // console.log('params.data:',params[0])
+ // let str = params.data.name + "
";
+ // params.data.forEach((item) => {
+ // str +=
+ // '' + item.seriesName + " : " + ''+item.data[1] +''+ "
";
+ // });
+ // return str;
+ // },
+ // formatter: function (params, ticket, callback) {
+ // console.log(params);
+ // var showHtm="";
+ // var data = params.data.value
+ // for(var i=0;i'
+ // }
+ // return showHtm;
+ // }
+
+
+
+
+
+
},//提示层
legend: {
@@ -792,7 +866,7 @@
backgroundColor:'rgba(255,255,255,0.8)',
color:'black',
borderWidth:'1',
- borderColor:'gray',
+ borderColor:'#DCE7FB',
textStyle:{
color:'black'
},
@@ -1070,6 +1144,11 @@
created() {
// this.download_a=document.getElementById("download_file")
+ },
+ updated(){
+ if(document.querySelectorAll('img[avatar]').length!==0){
+ window.LetterAvatar.transform()
+ }
}
}
@@ -1127,7 +1206,7 @@
}
.items{
text-align: center;
- border-right:2px solid rgba(219, 219, 219, 100);
+ border-right:1px solid rgba(219, 219, 219, 100);
}
.item_l{
margin-right: 5px;
@@ -1139,6 +1218,7 @@
margin-right:5px;
border:1px solid rgba(219, 219, 219, 100);
height: 370px;
+ overflow:auto
}
.item_echart{
margin-top: 10px;
@@ -1150,5 +1230,6 @@
.item_content{
color: #409eff;
margin-top: 10px;
+ font-weight:bold;
}
\ No newline at end of file
diff --git a/web_src/js/components/UserAnalysis.vue b/web_src/js/components/UserAnalysis.vue
index dbd3743bc..15c43c025 100755
--- a/web_src/js/components/UserAnalysis.vue
+++ b/web_src/js/components/UserAnalysis.vue
@@ -27,8 +27,12 @@
-
- 下载报告
+
+
+
+ 下载报告
+ 下载报告
+
@@ -141,10 +145,12 @@
@@ -181,6 +187,9 @@
},
methods: {
+ popMark(){
+ alert("数据为空时,不能下载!")
+ },
exportData(){
// this.getUserList('all_usr',7)
var saveFileName = this.getFileName()
@@ -206,10 +215,16 @@
this.getUserList(this.type_val,this.dynamic)
},
+ handleSizeChange(val){
+ this.params.pageSize = val
+ this.resetPage()
+ this.getUserList(this.type_val,this.dynamic)
+ },
resetPage(){
this.page=1
this.params.page = 1
},
+
formatDate(myyear,mymonth,myweekday) {
// var myyear = this.date.getFullYear();
// var mymonth = this.date.getMonth() + 1;
@@ -408,6 +423,7 @@
mounted() {
// document.getElementById("all_usr").style.outline="none"
// document.getElementById("all_usr").focus()
+ this.getUpdateTime()
this.getUserList("all_usr",7)
},
created() {