|
|
@@ -8,18 +8,18 @@ |
|
|
|
<bar-label :width="'95%'" :height="'500px'"></bar-label> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<span class="sta_iterm">统计周期:</span> |
|
|
|
<button type="button" class='btn' id ="yesterday" v-bind:class="{colorChange:1==dynamic}" @click="getAllProList('yesterday',1)">昨天</button> |
|
|
|
<button type="button" class='btn' id = "current_week" v-bind:class="{colorChange:2==dynamic}" @click="getAllProList('current_week',2)">本周</button> |
|
|
|
<button type="button" class='btn' id = "current_month" v-bind:class="{colorChange:3==dynamic}" @click="getAllProList('current_month',3)">本月</button> |
|
|
|
<button type="button" class='btn' id = "last_month" v-bind:class="{colorChange:4==dynamic}" @click="getAllProList('last_month',4)">上月</button> |
|
|
|
<button type="button" class='btn' id = "monthly" v-bind:class="{colorChange:5==dynamic}" @click="getAllProList('monthly',5)">近30天</button> |
|
|
|
<button type="button" class='btn' id = "current_year" v-bind:class="{colorChange:6==dynamic}" @click="getAllProList('current_year',6)">今年</button> |
|
|
|
<button type="button" class='btn' id = "all" v-bind:class="{colorChange:7==dynamic}" @click="getAllProList('all',7)">所有</button> |
|
|
|
<button type="button" class='btn' id ="yesterday" v-bind:class="{colorChange:1==dynamic}" @click="resetPage(),getAllProList('yesterday',1)">昨天</button> |
|
|
|
<button type="button" class='btn' id = "current_week" v-bind:class="{colorChange:2==dynamic}" @click="resetPage(),getAllProList('current_week',2)">本周</button> |
|
|
|
<button type="button" class='btn' id = "current_month" v-bind:class="{colorChange:3==dynamic}" @click="resetPage(),getAllProList('current_month',3)">本月</button> |
|
|
|
<button type="button" class='btn' id = "last_month" v-bind:class="{colorChange:4==dynamic}" @click="resetPage(),getAllProList('last_month',4)">上月</button> |
|
|
|
<button type="button" class='btn' id = "monthly" v-bind:class="{colorChange:5==dynamic}" @click="resetPage(),getAllProList('monthly',5)">近30天</button> |
|
|
|
<button type="button" class='btn' id = "current_year" v-bind:class="{colorChange:6==dynamic}" @click="resetPage(),getAllProList('current_year',6)">今年</button> |
|
|
|
<button type="button" class='btn' id = "all" v-bind:class="{colorChange:7==dynamic}" @click="resetPage(),getAllProList('all',7)">所有</button> |
|
|
|
<span style="margin-left: 20px;"> |
|
|
|
<el-date-picker |
|
|
|
v-model="value_time" |
|
|
|
prefix-icon="el-icon-time" |
|
|
|
@change="getAllProList('',0)" |
|
|
|
@change="resetPage(),getAllProList('',0)" |
|
|
|
type="daterange" |
|
|
|
size='small' |
|
|
|
range-separator="至" |
|
|
@@ -35,7 +35,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<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> |
|
|
|
</span> |
|
|
|
</span> |
|
|
@@ -53,6 +53,16 @@ |
|
|
|
stripe |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
label="拥有者" |
|
|
|
align="center" |
|
|
|
prop="ownerName" |
|
|
|
stripe |
|
|
|
v-if='0' |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
label="项目名称" |
|
|
|
width="125px" |
|
|
@@ -61,7 +71,7 @@ |
|
|
|
style="color:#0366D6 100%;" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a @click=goToDetailPage(scope.row.repo_id,scope.row.name)>{{scope.row.name}} </a> |
|
|
|
<a @click=goToDetailPage(scope.row.repo_id,scope.row.name,scope.row.ownerName)>{{scope.row.name}} </a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
@@ -146,7 +156,7 @@ |
|
|
|
</div> |
|
|
|
<div id ="pro_detail" style="display:none;width: 100%;"> |
|
|
|
<div style="margin-top: 10px;"> |
|
|
|
<b class="pro_item">OpenI / {{this.pro_name}}</b> <span class="update_time">数据更新时间:{{tableDataIDTotal.lastUpdatedTime}}/{{tableDataIDTotal.recordBeginTime}}</span> |
|
|
|
<b class="pro_item">{{this.ownerName}}/{{this.pro_name}}</b> <span class="update_time">数据更新时间:{{tableDataIDTotal.lastUpdatedTime}}/{{tableDataIDTotal.recordBeginTime}}</span> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px;"> |
|
|
|
项目描述:{{tableDataIDTotal.description | discriptionFun}} |
|
|
@@ -175,7 +185,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span='4' style="text-align: center;"> |
|
|
|
<el-row>任务完成比例</el-row> |
|
|
|
<el-row class="item_content">{{tableDataIDTotal.issueClosedRatio}}</el-row> |
|
|
|
<el-row class="item_content">{{tableDataIDTotal.issueClosedRatio * 100}}%</el-row> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
@@ -205,14 +215,19 @@ |
|
|
|
label="用户名" |
|
|
|
align="center" |
|
|
|
prop="user"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a v-if="scope.row.mode!=-1" :href="AppSubUrl +'../../../'+ scope.row.user"><img class="ui avatar s16 image js-popover-card" :src="scope.row.relAvatarLink">{{scope.row.user}} </a> |
|
|
|
<a v-else :href="'mailto:'+ scope.row.email "> <img class="ui avatar s16 image js-popover-card" :avatar="scope.row.email"> {{scope.row.user}}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="身份" |
|
|
|
align="center" |
|
|
|
prop="mode"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.row.mode | showMode}} |
|
|
|
</template> |
|
|
|
prop="mode" |
|
|
|
v-if='0'> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.row.mode | showMode}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="pr" |
|
|
@@ -233,18 +248,18 @@ |
|
|
|
</div> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<span class="sta_iterm">统计周期:</span> |
|
|
|
<button type="button" class='btn' id ="yesterday_pro" v-bind:class="{colorChange:1==dynamic_pro}" @click="getOneProList(pro_id,'yesterday',true,1),getOneProList(pro_id,'yesterday',false,1)">昨天</button> |
|
|
|
<button type="button" class='btn' id = "current_week_pro" v-bind:class="{colorChange:2==dynamic_pro}" @click="getOneProList(pro_id,'current_week',true,2),getOneProList(pro_id,'current_week',false,2)">本周</button> |
|
|
|
<button type="button" class='btn' id = "current_month_pro" v-bind:class="{colorChange:3==dynamic_pro}" @click="getOneProList(pro_id,'current_month',true,3),getOneProList(pro_id,'current_month',false,3)">本月</button> |
|
|
|
<button type="button" class='btn' id = "last_month_pro" v-bind:class="{colorChange:4==dynamic_pro}" @click="getOneProList(pro_id,'last_month',true,4),getOneProList(pro_id,'last_month',false,4)">上月</button> |
|
|
|
<button type="button" class='btn' id = "monthly_pro" v-bind:class="{colorChange:5==dynamic_pro}" @click="getOneProList(pro_id,'monthly',true,5),getOneProList(pro_id,'monthly',false,5)">近30天</button> |
|
|
|
<button type="button" class='btn' id = "current_year_pro" v-bind:class="{colorChange:6==dynamic}" @click="getOneProList(pro_id,'current_year',true,6),getOneProList(pro_id,'current_year',false,6)">今年</button> |
|
|
|
<button type="button" class='btn' id = "all_pro" v-bind:class="{colorChange:7==dynamic_pro}" @click="getOneProList(pro_id,'all',true,7),getOneProList(pro_id,'all',false,7)">所有</button> |
|
|
|
<button type="button" class='btn' id ="yesterday_pro" v-bind:class="{colorChange:1==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'yesterday',true,1),getOneProList(pro_id,'yesterday',false,1)">昨天</button> |
|
|
|
<button type="button" class='btn' id = "current_week_pro" v-bind:class="{colorChange:2==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'current_week',true,2),getOneProList(pro_id,'current_week',false,2)">本周</button> |
|
|
|
<button type="button" class='btn' id = "current_month_pro" v-bind:class="{colorChange:3==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'current_month',true,3),getOneProList(pro_id,'current_month',false,3)">本月</button> |
|
|
|
<button type="button" class='btn' id = "last_month_pro" v-bind:class="{colorChange:4==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'last_month',true,4),getOneProList(pro_id,'last_month',false,4)">上月</button> |
|
|
|
<button type="button" class='btn' id = "monthly_pro" v-bind:class="{colorChange:5==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'monthly',true,5),getOneProList(pro_id,'monthly',false,5)">近30天</button> |
|
|
|
<button type="button" class='btn' id = "current_year_pro" v-bind:class="{colorChange:6==dynamic}" @click="resetCurrentPage(),getOneProList(pro_id,'current_year',true,6),getOneProList(pro_id,'current_year',false,6)">今年</button> |
|
|
|
<button type="button" class='btn' id = "all_pro" v-bind:class="{colorChange:7==dynamic_pro}" @click="resetCurrentPage(),getOneProList(pro_id,'all',true,7),getOneProList(pro_id,'all',false,7)">所有</button> |
|
|
|
<span style="margin-left: 20px;"> |
|
|
|
<el-date-picker |
|
|
|
v-model="create_time_pro" |
|
|
|
prefix-icon="el-icon-time" |
|
|
|
@change="getOneProList(pro_id,'',true,0),getOneProList(pro_id,'',false,0),clickCheckBox" |
|
|
|
@change="resetCurrentPage(),getOneProList(pro_id,'',true,0),getOneProList(pro_id,'',false,0),clickCheckBox" |
|
|
|
type="daterange" |
|
|
|
size='small' |
|
|
|
range-separator="至" |
|
|
@@ -321,6 +336,8 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
// import barLabel from './basic/barLabel.vue'; |
|
|
|
const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; |
|
|
|
|
|
|
|
import { export2Excel } from '../excel/util.js' |
|
|
|
export default{ |
|
|
|
name:'ProAnalysis', |
|
|
@@ -358,6 +375,7 @@ |
|
|
|
dynamic_pro:7, |
|
|
|
pro_name:'', |
|
|
|
pro_id:'', |
|
|
|
ownerName:'', |
|
|
|
radarOpenI:'', |
|
|
|
echartsOITd:'', |
|
|
|
echartsSelectData:'', |
|
|
@@ -375,6 +393,7 @@ |
|
|
|
// 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) |
|
|
|
}, |
|
|
@@ -458,9 +477,17 @@ |
|
|
|
return saveFileName |
|
|
|
|
|
|
|
}, |
|
|
|
resetPage(){ |
|
|
|
this.page=1 |
|
|
|
this.params.page = 1 |
|
|
|
}, |
|
|
|
resetCurrentPage(){ |
|
|
|
this.currentPage=1 |
|
|
|
}, |
|
|
|
handleCurrentChange(val){ |
|
|
|
console.log(val) |
|
|
|
this.params.page = val |
|
|
|
this.page = val |
|
|
|
switch(this.params.type){ |
|
|
|
case "yesterday":{ |
|
|
|
this.value_time='' |
|
|
@@ -561,19 +588,21 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
searchName(){ |
|
|
|
this.params.q = this.search |
|
|
|
this.params.page = 1 |
|
|
|
this.getAllProList("all",7) |
|
|
|
this.params.q = this.search |
|
|
|
this.params.page = 1 |
|
|
|
this.page=1 |
|
|
|
this.getAllProList(this.params.type, this.dynamic) |
|
|
|
}, |
|
|
|
|
|
|
|
goToDetailPage(pro_id,pro_name){ |
|
|
|
|
|
|
|
goToDetailPage(pro_id,pro_name,ownerName){ |
|
|
|
this.currentPage=1 |
|
|
|
document.getElementById("pro_main").style.display="none"; |
|
|
|
document.getElementById("pro_detail").style.display="block"; |
|
|
|
console.log(pro_id) |
|
|
|
console.log(pro_name) |
|
|
|
this.pro_name=pro_name; |
|
|
|
this.pro_id=pro_id; |
|
|
|
this.ownerName=ownerName |
|
|
|
this.getOneProData(pro_id); |
|
|
|
this.getOneProList(pro_id,"monthly",true,5); |
|
|
|
this.getOneProList(pro_id,"monthly",false,5); |
|
|
@@ -723,7 +752,7 @@ |
|
|
|
var ydata_openI=[] |
|
|
|
for(var i =0;i<this.tableDataIDOpenI.length;i++){ |
|
|
|
xdata_openI.push(this.tableDataIDOpenI[i].date); |
|
|
|
ydata_openI.push(this.roundingF(this.tableDataIDOpenI[this.tableDataIDOpenI.length-1-i].openi)) |
|
|
|
ydata_openI.push(this.roundingF(this.tableDataIDOpenI[i].openi)) |
|
|
|
} |
|
|
|
console.log("ydata_openI:"+ydata_openI) |
|
|
|
console.log(xdata_openI) |
|
|
@@ -810,7 +839,7 @@ |
|
|
|
var ydata_commit=[] |
|
|
|
// if () |
|
|
|
for(var i =0;i<this.tableDataID.length;i++){ |
|
|
|
xdata.push(this.tableDataID[i].date); |
|
|
|
xdata.push(this.tableDataID[this.tableDataID.length-1-i].date); |
|
|
|
ydata_view.push(this.roundingF(this.tableDataID[this.tableDataID.length-1-i].view)) |
|
|
|
ydata_download.push(this.roundingF(this.tableDataID[this.tableDataID.length-1-i].download)) |
|
|
|
ydata_commit.push(this.roundingF(this.tableDataID[this.tableDataID.length-1-i].commit)) |
|
|
@@ -908,6 +937,7 @@ |
|
|
|
// option.legend.selected = obj; |
|
|
|
// this.echartsSelectData.setOption(option); |
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
@@ -961,7 +991,16 @@ |
|
|
|
}else{ |
|
|
|
return "未定义" |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
showContext(value){ |
|
|
|
if (value.mode!=-1){ |
|
|
|
return " <img class=\"ui avatar image\" src= \" "+ value.RelAvatarLink+ " \" > "+" <a href= \" " + AppSubUrl+"/"+value.user+ "\">"+value.user+" </a>" |
|
|
|
} |
|
|
|
else{ |
|
|
|
return " <a href=\" mailto:" + value.email + "class=\"circular ui button\">" +value.user+ "</a>" |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@@ -984,6 +1023,19 @@ |
|
|
|
// } |
|
|
|
// console.log("this.radarOpenI:"+this.radarOpenI) |
|
|
|
}, |
|
|
|
|
|
|
|
watch:{ |
|
|
|
search(val){ |
|
|
|
if(!val){ |
|
|
|
this.params.q = this.search |
|
|
|
this.params.page = 1 |
|
|
|
this.page=1 |
|
|
|
this.getAllProList(this.params.type, this.dynamic) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
// this.download_a=document.getElementById("download_file") |
|
|
|
} |
|
|
|