|
@@ -5,18 +5,18 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 20px;"> |
|
|
<div style="margin-top: 20px;"> |
|
|
<span class="sta_iterm">统计周期:</span> |
|
|
<span class="sta_iterm">统计周期:</span> |
|
|
<button type="button" class='btn' id ="yesterday_usr" v-bind:class="{colorChange:1==dynamic}" @click="getUserList('yesterday_usr',1)">昨天</button> |
|
|
|
|
|
<button type="button" class='btn' id = "current_week_usr" v-bind:class="{colorChange:2==dynamic}" @click="getUserList('current_week_usr',2)">本周</button> |
|
|
|
|
|
<button type="button" class='btn' id = "current_month_usr" v-bind:class="{colorChange:3==dynamic}" @click="getUserList('current_month_usr',3)">本月</button> |
|
|
|
|
|
<button type="button" class='btn' id = "last_month_usr" v-bind:class="{colorChange:4==dynamic}" @click="getUserList('last_month_usr',4)">上月</button> |
|
|
|
|
|
<button type="button" class='btn' id = "monthly_usr" v-bind:class="{colorChange:5==dynamic}" @click="getUserList('monthly_usr',5)">近30天</button> |
|
|
|
|
|
<button type="button" class='btn' id = "current_year_usr" v-bind:class="{colorChange:6==dynamic}" @click="getUserList('current_year_usr',6)">今年</button> |
|
|
|
|
|
<button type="button" class='btn' id = "all_usr" v-bind:class="{colorChange:7==dynamic}" @click="getUserList('all_usr',7)">所有</button> |
|
|
|
|
|
|
|
|
<button type="button" class='btn' id ="yesterday_usr" v-bind:class="{colorChange:1==dynamic}" @click="resetPage(),getUserList('yesterday_usr',1)">昨天</button> |
|
|
|
|
|
<button type="button" class='btn' id = "current_week_usr" v-bind:class="{colorChange:2==dynamic}" @click="resetPage(),getUserList('current_week_usr',2)">本周</button> |
|
|
|
|
|
<button type="button" class='btn' id = "current_month_usr" v-bind:class="{colorChange:3==dynamic}" @click="resetPage(),getUserList('current_month_usr',3)">本月</button> |
|
|
|
|
|
<button type="button" class='btn' id = "last_month_usr" v-bind:class="{colorChange:4==dynamic}" @click="resetPage(),getUserList('last_month_usr',4)">上月</button> |
|
|
|
|
|
<button type="button" class='btn' id = "monthly_usr" v-bind:class="{colorChange:5==dynamic}" @click="resetPage(),getUserList('monthly_usr',5)">近30天</button> |
|
|
|
|
|
<button type="button" class='btn' id = "current_year_usr" v-bind:class="{colorChange:6==dynamic}" @click="resetPage(),getUserList('current_year_usr',6)">今年</button> |
|
|
|
|
|
<button type="button" class='btn' id = "all_usr" v-bind:class="{colorChange:7==dynamic}" @click="resetPage(),getUserList('all_usr',7)">所有</button> |
|
|
<span style="margin-left: 20px;"> |
|
|
<span style="margin-left: 20px;"> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="value_time" |
|
|
v-model="value_time" |
|
|
prefix-icon="el-icon-time" |
|
|
prefix-icon="el-icon-time" |
|
|
@change="getUserList('',0)" |
|
|
|
|
|
|
|
|
@change="resetPage(),getUserList('',0)" |
|
|
type="daterange" |
|
|
type="daterange" |
|
|
size='small' |
|
|
size='small' |
|
|
unlink-panels |
|
|
unlink-panels |
|
@@ -28,17 +28,17 @@ |
|
|
<span style="float:right; margin-right: 20px;" > |
|
|
<span style="float:right; margin-right: 20px;" > |
|
|
<a style="display:inline-block;margin-left: 20px; " id = 'download'> |
|
|
<a style="display:inline-block;margin-left: 20px; " id = 'download'> |
|
|
<i class="el-icon-download"></i> |
|
|
<i class="el-icon-download"></i> |
|
|
<span ><a @click="exportData()">下载报告</a> </span> |
|
|
|
|
|
|
|
|
<span ><a :href= "'../tool/query_user_static_page/?startDate='+this.params.startDate+'&endDate='+this.params.endDate+'&IsReturnFile=true'+'&userName='+this.params.userName" >下载报告</a> </span> |
|
|
</a> |
|
|
</a> |
|
|
<span style="display:inline-block;margin-left: 20px; "> |
|
|
<span style="display:inline-block;margin-left: 20px; "> |
|
|
<el-input size="small" placeholder="输入用户名搜索" v-model="search" class="input-with-select" @keyup.enter.native="searchName() "><i slot="suffix" class="el-input__icon el-icon-search"></i> |
|
|
|
|
|
|
|
|
<el-input size="small" placeholder="输入用户名搜索" v-model="search" class="input-with-select" @keyup.enter.native="searchName() "><i slot="suffix" class="el-input__icon el-icon-search" @click="searchName() "></i> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</span> |
|
|
</span> |
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 30px;"> |
|
|
<div style="margin-top: 30px;"> |
|
|
<el-table |
|
|
<el-table |
|
|
:data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)" |
|
|
|
|
|
|
|
|
:data="tableData" |
|
|
style="width: 100%" |
|
|
style="width: 100%" |
|
|
:header-cell-style="tableHeaderStyle" |
|
|
:header-cell-style="tableHeaderStyle" |
|
|
:cell-style='cellStyle'> |
|
|
:cell-style='cellStyle'> |
|
@@ -123,18 +123,18 @@ |
|
|
label="用户注册时间" |
|
|
label="用户注册时间" |
|
|
width="120px" |
|
|
width="120px" |
|
|
align="center"> |
|
|
align="center"> |
|
|
<!-- <template slot-scope="scope"> |
|
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
{{scope.row.RegistDate | transformTimestamp}} |
|
|
{{scope.row.RegistDate | transformTimestamp}} |
|
|
</template> --> |
|
|
|
|
|
|
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="CountDate" |
|
|
prop="CountDate" |
|
|
label="系统统计时间" |
|
|
label="系统统计时间" |
|
|
width="120px" |
|
|
width="120px" |
|
|
align="center"> |
|
|
align="center"> |
|
|
<!-- <template slot-scope="scope"> |
|
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
{{scope.row.CountDate | transformTimestamp}} |
|
|
{{scope.row.CountDate | transformTimestamp}} |
|
|
</template> --> |
|
|
|
|
|
|
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
@@ -142,10 +142,10 @@ |
|
|
<el-pagination |
|
|
<el-pagination |
|
|
background |
|
|
background |
|
|
@current-change="handleCurrentChange" |
|
|
@current-change="handleCurrentChange" |
|
|
:current-page="currentPage" |
|
|
|
|
|
|
|
|
:current-page="page" |
|
|
:page-size="pageSize" |
|
|
:page-size="pageSize" |
|
|
layout="prev, pager, next" |
|
|
layout="prev, pager, next" |
|
|
:total="tableData.length"> |
|
|
|
|
|
|
|
|
:total="totalNum"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
@@ -161,17 +161,17 @@ |
|
|
type_val:'', |
|
|
type_val:'', |
|
|
recordBeginTime:'', |
|
|
recordBeginTime:'', |
|
|
lastUpdatedTime:'', |
|
|
lastUpdatedTime:'', |
|
|
currentPage:1, |
|
|
|
|
|
|
|
|
page:1, |
|
|
pageSize:10, |
|
|
pageSize:10, |
|
|
params:{startDate:'',endDate:''}, |
|
|
|
|
|
|
|
|
params:{startDate:'',endDate:'',page:1,pageSize:10,userName:''}, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
|
|
|
|
|
|
|
|
|
totalNum:0, |
|
|
pickerOptions: { |
|
|
pickerOptions: { |
|
|
}, |
|
|
}, |
|
|
value_time: '', |
|
|
value_time: '', |
|
|
search:'', |
|
|
search:'', |
|
|
data:'', |
|
|
data:'', |
|
|
columns: [{title: 'ID',key: 'ID'},{title: '用户名',key: 'Name'},{title: 'PR数',key: 'CodeMergeCount'},{title: 'cimmit数',key:'CommitCount'},{title: '提出任务数',key: 'IssueCount'},{title: '评论数',key: 'CommentCount'},{title: '关注项目数',key: 'FocusRepoCount'},{title: '点赞项目数',key: 'StarRepoCount'},{title: '登录次数',key: 'LoginCount'},{title:'关注者数',key:'WatchedCount'},{title:'commit代码行数',key:'CommitCodeSize'},{title:'已解决任务数',key:'SolveIssueCount'},{title:'百科页面贡献次数',key:'EncyclopediasCount'},{title:'创建项目',key:'CreateRepoCount'},{title:'用户注册时间',key:'RegistDate'},{title:'系统统计时间',key:'CountDate'}], |
|
|
|
|
|
|
|
|
columns: [{title: 'ID',key: 'ID'},{title: '用户名',key: 'Name'},{title: 'PR数',key: 'CodeMergeCount'},{title: 'commit数',key:'CommitCount'},{title: '提出任务数',key: 'IssueCount'},{title: '评论数',key: 'CommentCount'},{title: '关注项目数',key: 'FocusRepoCount'},{title: '点赞项目数',key: 'StarRepoCount'},{title: '登录次数',key: 'LoginCount'},{title:'关注者数',key:'WatchedCount'},{title:'commit代码行数',key:'CommitCodeSize'},{title:'已解决任务数',key:'SolveIssueCount'},{title:'百科页面贡献次数',key:'EncyclopediasCount'},{title:'创建项目',key:'CreateRepoCount'},{title:'用户注册时间',key:'RegistDate'},{title:'系统统计时间',key:'CountDate'}], |
|
|
blob:'', |
|
|
blob:'', |
|
|
fileName:'', |
|
|
fileName:'', |
|
|
dynamic:7, |
|
|
dynamic:7, |
|
@@ -200,8 +200,15 @@ |
|
|
return saveFileName |
|
|
return saveFileName |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
handleCurrentChange(currentPage){ |
|
|
|
|
|
this.currentPage = currentPage; |
|
|
|
|
|
|
|
|
handleCurrentChange(val){ |
|
|
|
|
|
this.params.page = val |
|
|
|
|
|
this.page = val |
|
|
|
|
|
this.getUserList(this.type_val,this.dynamic) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
resetPage(){ |
|
|
|
|
|
this.page=1 |
|
|
|
|
|
this.params.page = 1 |
|
|
}, |
|
|
}, |
|
|
formatDate(myyear,mymonth,myweekday) { |
|
|
formatDate(myyear,mymonth,myweekday) { |
|
|
// var myyear = this.date.getFullYear(); |
|
|
// var myyear = this.date.getFullYear(); |
|
@@ -224,7 +231,14 @@ |
|
|
let days = (monthEndDate - monthStartDate)/(1000 * 60 * 60 * 24); |
|
|
let days = (monthEndDate - monthStartDate)/(1000 * 60 * 60 * 24); |
|
|
return days; |
|
|
return days; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getUpdateTime(){ |
|
|
|
|
|
this.$axios.get('../api/v1/projectboard/project',{ |
|
|
|
|
|
params:this.params_pro |
|
|
|
|
|
}).then((res)=>{ |
|
|
|
|
|
this.recordBeginTime=res.data.recordBeginTime |
|
|
|
|
|
this.lastUpdatedTime=res.data.lastUpdatedTime |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
getUserList(type_val,index){ |
|
|
getUserList(type_val,index){ |
|
|
this.type_val = type_val |
|
|
this.type_val = type_val |
|
|
this.dynamic = index; |
|
|
this.dynamic = index; |
|
@@ -295,50 +309,63 @@ |
|
|
} |
|
|
} |
|
|
case "all_usr":{ |
|
|
case "all_usr":{ |
|
|
console.log("e:"+today) |
|
|
console.log("e:"+today) |
|
|
this.params.startDate = this.recordBeginTime//this.formatDate(2000, 1, 1); // |
|
|
|
|
|
|
|
|
this.params.startDate = 'all'//this.formatDate(2000, 1, 1); //this.recordBeginTime// |
|
|
this.params.endDate = today |
|
|
this.params.endDate = today |
|
|
this.value_time=[] |
|
|
this.value_time=[] |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
this.$axios.get('../tool/query_user_static',{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$axios.get('../tool/query_user_static_page',{ |
|
|
params:this.params |
|
|
params:this.params |
|
|
}).then((res)=>{ |
|
|
}).then((res)=>{ |
|
|
this.currentPage = 1 |
|
|
|
|
|
this.tableData = res.data |
|
|
|
|
|
console.log(" this.tableData:", this.tableData.length) |
|
|
|
|
|
for(var i=0;i<this.tableData.length;i++){ |
|
|
|
|
|
this.tableData[i].RegistDate = this.transformTimestamp(this.tableData[i].RegistDate) |
|
|
|
|
|
this.tableData[i].CountDate = this.transformTimestamp(this.tableData[i].CountDate) |
|
|
|
|
|
console.log(" this.tableData:", this.tableData[i].RegistDate) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.$axios.get('../api/v1/projectboard/project',{ |
|
|
|
|
|
params:this.params_pro |
|
|
|
|
|
}).then((res)=>{ |
|
|
|
|
|
this.recordBeginTime=res.data.recordBeginTime |
|
|
|
|
|
this.lastUpdatedTime=res.data.lastUpdatedTime |
|
|
|
|
|
|
|
|
this.tableData = res.data.data |
|
|
|
|
|
// console.log("res.data:"+res.data.data) |
|
|
|
|
|
|
|
|
|
|
|
this.totalNum = res.data.count |
|
|
|
|
|
console.log("res.count:"+res.data.count) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// this.$axios.get('../tool/query_user_static',{ |
|
|
|
|
|
// params:this.params |
|
|
|
|
|
// }).then((res)=>{ |
|
|
|
|
|
// this.currentPage = 1 |
|
|
|
|
|
// this.tableData = res.data |
|
|
|
|
|
// console.log(" this.tableData:", this.tableData.length) |
|
|
|
|
|
// for(var i=0;i<this.tableData.length;i++){ |
|
|
|
|
|
// this.tableData[i].RegistDate = this.transformTimestamp(this.tableData[i].RegistDate) |
|
|
|
|
|
// this.tableData[i].CountDate = this.transformTimestamp(this.tableData[i].CountDate) |
|
|
|
|
|
// console.log(" this.tableData:", this.tableData[i].RegistDate) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
searchName(){ |
|
|
searchName(){ |
|
|
// this.params.q = this.search |
|
|
// this.params.q = this.search |
|
|
// this.params.page = 1 |
|
|
// this.params.page = 1 |
|
|
// this.getUserList("all_usr") |
|
|
// this.getUserList("all_usr") |
|
|
var search = this.search; |
|
|
|
|
|
this.getUserList("all_usr",7) |
|
|
|
|
|
this.tableData = this.tableData.filter(data => !search || data.Name.toLowerCase().includes(search.toLowerCase())) |
|
|
|
|
|
|
|
|
// var search = this.search; |
|
|
|
|
|
// this.getUserList("all_usr",7) |
|
|
|
|
|
// this.tableData = this.tableData.filter(data => !search || data.Name.toLowerCase().includes(search.toLowerCase())) |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
goToDetailPage(pro_id,pro_name){ |
|
|
|
|
|
sessionStorage.setItem("pro_id",pro_id); |
|
|
|
|
|
sessionStorage.setItem("pro_name",pro_name); |
|
|
|
|
|
document.getElementById("pro_main").style.display="none"; |
|
|
|
|
|
document.getElementById("pro_detail").style.display="block"; |
|
|
|
|
|
|
|
|
this.params.userName = this.search |
|
|
|
|
|
this.params.page = 1 |
|
|
|
|
|
this.page=1 |
|
|
|
|
|
this.getUserList(this.type_val, this.dynamic) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
// goToDetailPage(pro_id,pro_name){ |
|
|
|
|
|
// sessionStorage.setItem("pro_id",pro_id); |
|
|
|
|
|
// sessionStorage.setItem("pro_name",pro_name); |
|
|
|
|
|
// document.getElementById("pro_main").style.display="none"; |
|
|
|
|
|
// document.getElementById("pro_detail").style.display="block"; |
|
|
|
|
|
|
|
|
|
|
|
// }, |
|
|
tableHeaderStyle({row,column,rowIndex,columnIndex}){ |
|
|
tableHeaderStyle({row,column,rowIndex,columnIndex}){ |
|
|
|
|
|
|
|
|
if(rowIndex===0){ |
|
|
if(rowIndex===0){ |
|
@@ -351,6 +378,11 @@ |
|
|
return 'background:#f5f5f6;color:#606266' |
|
|
return 'background:#f5f5f6;color:#606266' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
filters:{ |
|
|
|
|
|
|
|
|
transformTimestamp(timestamp){ |
|
|
transformTimestamp(timestamp){ |
|
|
console.log("timestamp",timestamp) |
|
|
console.log("timestamp",timestamp) |
|
|
let a = new Date(timestamp*1000); |
|
|
let a = new Date(timestamp*1000); |
|
@@ -365,9 +397,6 @@ |
|
|
console.log('dateString', dateString); // > dateString 2021-07-06 14:23 |
|
|
console.log('dateString', dateString); // > dateString 2021-07-06 14:23 |
|
|
return dateString; |
|
|
return dateString; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
filters:{ |
|
|
|
|
|
|
|
|
|
|
|
// transformTimestamp(timestamp){ |
|
|
// transformTimestamp(timestamp){ |
|
|
// var dateString= new Date(timestamp); |
|
|
// var dateString= new Date(timestamp); |
|
@@ -377,8 +406,8 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
mounted() { |
|
|
mounted() { |
|
|
document.getElementById("all_usr").style.outline="none" |
|
|
|
|
|
document.getElementById("all_usr").focus() |
|
|
|
|
|
|
|
|
// document.getElementById("all_usr").style.outline="none" |
|
|
|
|
|
// document.getElementById("all_usr").focus() |
|
|
this.getUserList("all_usr",7) |
|
|
this.getUserList("all_usr",7) |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@@ -386,9 +415,15 @@ |
|
|
}, |
|
|
}, |
|
|
watch:{ |
|
|
watch:{ |
|
|
search(val){ |
|
|
search(val){ |
|
|
|
|
|
// if(!val){ |
|
|
|
|
|
// this.getUserList("all_usr",7) |
|
|
|
|
|
// } |
|
|
if(!val){ |
|
|
if(!val){ |
|
|
this.getUserList("all_usr",7) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.params.userName = this.search |
|
|
|
|
|
this.params.page = 1 |
|
|
|
|
|
this.page=1 |
|
|
|
|
|
this.getUserList(this.type_val, this.dynamic) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
@@ -426,16 +461,19 @@ |
|
|
.btn:active{ |
|
|
.btn:active{ |
|
|
background-color:#409effd6 ; |
|
|
background-color:#409effd6 ; |
|
|
} */ |
|
|
} */ |
|
|
/deep/ .el-date-picker { |
|
|
|
|
|
width: 200px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* /deep/ .el-date-picker { |
|
|
|
|
|
width: 220px; |
|
|
|
|
|
} */ |
|
|
/deep/ .el-table { |
|
|
/deep/ .el-table { |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
} |
|
|
} |
|
|
/deep/ .el-table tbody tr:hover>td { |
|
|
/deep/ .el-table tbody tr:hover>td { |
|
|
background-color:#D3D3D3!important; |
|
|
background-color:#D3D3D3!important; |
|
|
opacity:1 |
|
|
opacity:1 |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
/deep/ .el-range-separator{ |
|
|
|
|
|
width: 20% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.colorChange { |
|
|
.colorChange { |
|
|
background-color: #409effd6; |
|
|
background-color: #409effd6; |
|
|