Browse Source

Merge remote-tracking branch 'origin/V20220228' into zouap_user

pull/1530/head
zouap 3 years ago
parent
commit
4a665a0ba4
4 changed files with 34 additions and 24 deletions
  1. +2
    -2
      templates/repo/debugjob/index.tmpl
  2. +1
    -1
      templates/repo/home.tmpl
  3. +7
    -6
      web_src/js/components/EditAboutInfo.vue
  4. +24
    -15
      web_src/js/components/ProAnalysis.vue

+ 2
- 2
templates/repo/debugjob/index.tmpl View File

@@ -490,11 +490,11 @@


<script> <script>
// 调试和评分新开窗口 // 调试和评分新开窗口
console.log({{.Tasks}})
const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;
let url={{.RepoLink}} let url={{.RepoLink}}
let getParam=getQueryVariable('debugListType') let getParam=getQueryVariable('debugListType')
let dropdownValue = getParam==='all'||getParam==='' ? '全部' : getParam
let dropdownValue = ['all','',false].includes(getParam)? '全部' : getParam
localStorage.setItem('all',location.href) localStorage.setItem('all',location.href)
function getQueryVariable(variable) function getQueryVariable(variable)
{ {


+ 1
- 1
templates/repo/home.tmpl View File

@@ -255,7 +255,7 @@
{{end}} {{end}}
</div> </div>
<div class="ui six wide tablet four wide computer column"> <div class="ui six wide tablet four wide computer column">
<div id="repo-desc" data-IsSigned= "{{.IsSigned}}" >
<div id="repo-desc" data-IsAdmin= "{{.Permission.IsAdmin}}" data-IsArchived="{{.Repository.IsArchived}}" >
<h4 id="about-desc" class="ui header">简介</h4> <h4 id="about-desc" class="ui header">简介</h4>
<input type="hidden" id="edit-alias" value="{{.Repository.Alias}}"> <input type="hidden" id="edit-alias" value="{{.Repository.Alias}}">
<p> <p>


+ 7
- 6
web_src/js/components/EditAboutInfo.vue View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<h4 id="about-desc" class="ui header desc-home">简介 <h4 id="about-desc" class="ui header desc-home">简介
<a class="edit-icon" v-if="IsSigned" id ="editBtn" href="javascript:void(0)" @click="editClick" >
<a class="edit-icon" v-if="IsPermit" id ="editBtn" href="javascript:void(0)" @click="editClick" >
<i class="gray edit outline icon" style="margin-right: 0;"></i> <i class="gray edit outline icon" style="margin-right: 0;"></i>
</a> </a>
</h4> </h4>
@@ -53,7 +53,7 @@ export default {
index_web: '', index_web: '',
repo_name_name: '', repo_name_name: '',
alias:'', alias:'',
IsSigned:false
IsPermit:false
}, },
// rule1:[{min:3,max:5,message:'1',trigger:"blur"}], // rule1:[{min:3,max:5,message:'1',trigger:"blur"}],
rule: { rule: {
@@ -65,14 +65,15 @@ export default {
}, },
methods: { methods: {
getIsSigned(){ getIsSigned(){
this.IsSigned = document.getElementById("repo-desc").dataset.issigned;
var isadmin= document.getElementById("repo-desc").dataset.isadmin;
var isarchived=document.getElementById("repo-desc").dataset.isarchived;
// console.log("IsSigned:",this.IsSigned) // console.log("IsSigned:",this.IsSigned)
if (this.IsSigned==true || this.IsSigned=="true"){
this.IsSigned=true;
if ((isadmin==true || isadmin=="true")&& (isarchived==false || isarchived=="false")){
this.IsPermit=true;
} }
}, },
editClick() { editClick() {
if (this.IsSigned){
if (this.IsPermit){
this.editDataDialog = true; this.editDataDialog = true;
} }
}, },


+ 24
- 15
web_src/js/components/ProAnalysis.vue View File

@@ -59,14 +59,21 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="项目名称中文"
align="left"
prop="name"
v-if='0'
>
</el-table-column>
<el-table-column
label="项目名称" label="项目名称"
width="125px" width="125px"
align="left" align="left"
prop="name"
prop="alias"
style="color:#0366D6;font-family: Roboto" style="color:#0366D6;font-family: Roboto"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<a @click=goToDetailPage(scope.row.repo_id,scope.row.name,scope.row.ownerName)>{{scope.row.name}} </a>
<a @click=goToDetailPage(scope.row.repo_id,scope.row.name,scope.row.ownerName,scope.row.alias)>{{scope.row.alias}} </a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -160,7 +167,7 @@
</div> </div>
<div id ="pro_detail" style="display:none;width: 100%;"> <div id ="pro_detail" style="display:none;width: 100%;">
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<a class="pro_item" :href="'../../../'+this.ownerName+'/'+this.pro_name">{{this.ownerName}}&nbsp/&nbsp{{this.pro_name}}</a> <span class="update_time">数据更新时间:</span><span style="font-size: 12px;">{{tableDataIDTotal.lastUpdatedTime}}&nbsp/&nbsp从{{tableDataIDTotal.recordBeginTime}}开始统计</span>
<a class="pro_item" :href="'../../../'+this.ownerName+'/'+this.pro_name">{{this.ownerName}}&nbsp/&nbsp{{this.alias}}</a> <span class="update_time">数据更新时间:</span><span style="font-size: 12px;">{{tableDataIDTotal.lastUpdatedTime}}&nbsp/&nbsp从{{tableDataIDTotal.recordBeginTime}}开始统计</span>
</div> </div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
项目描述:{{tableDataIDTotal.description | discriptionFun}} 项目描述:{{tableDataIDTotal.description | discriptionFun}}
@@ -388,6 +395,7 @@
create_time_pro: '', create_time_pro: '',
dynamic_pro:7, dynamic_pro:7,
pro_name:'', pro_name:'',
alias:'',
pro_id:'', pro_id:'',
ownerName:'', ownerName:'',
radarOpenI:'', radarOpenI:'',
@@ -445,7 +453,7 @@
startDate = this.comparedate(tmp,this.recordBeginTime) startDate = this.comparedate(tmp,this.recordBeginTime)


console.log("comparedate:"+startDate) console.log("comparedate:"+startDate)
saveFileName = this.pro_name+"_"+startDate+'_'+endDate
saveFileName = this.alias+"_"+startDate+'_'+endDate
}else{ }else{
switch(this.paramsID.type){ switch(this.paramsID.type){
case "yesterday":{ case "yesterday":{
@@ -453,7 +461,7 @@
startDate = this.comparedate(yesterday_tmp,this.recordBeginTime) startDate = this.comparedate(yesterday_tmp,this.recordBeginTime)
endDate = startDate endDate = startDate


saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
saveFileName = this.alias+"_"+startDate+'_'+ endDate
break break
} }
case "current_week":{ case "current_week":{
@@ -465,7 +473,7 @@


endDate = yesterday endDate = yesterday
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
saveFileName = this.alias+"_"+startDate+'_'+ endDate
break break
} }
case "current_month":{ case "current_month":{
@@ -475,7 +483,7 @@


endDate = yesterday endDate = yesterday
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
saveFileName = this.alias+"_"+startDate+'_'+ endDate
break break
} }
case "last_month":{ case "last_month":{
@@ -495,7 +503,7 @@
var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24) var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24)


endDate=this.saveFormatDate(lastYear, lastMonth+1, days); //月份从0开始,所以+1保存月份 endDate=this.saveFormatDate(lastYear, lastMonth+1, days); //月份从0开始,所以+1保存月份
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
saveFileName = this.alias+"_"+startDate+'_'+ endDate
break break
} }
case "monthly":{ case "monthly":{
@@ -504,7 +512,7 @@
startDate = this.comparedate(startDate,this.recordBeginTime) startDate = this.comparedate(startDate,this.recordBeginTime)


endDate = yesterday endDate = yesterday
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
saveFileName = this.alias+"_"+startDate+'_'+ endDate
break break
} }
case "current_year":{ case "current_year":{
@@ -512,14 +520,14 @@
startDate = this.comparedate(startDate,this.recordBeginTime) startDate = this.comparedate(startDate,this.recordBeginTime)


endDate = yesterday endDate = yesterday
saveFileName = this.pro_name+"_"+startDate+'_'+ endDate
saveFileName = this.alias+"_"+startDate+'_'+ endDate
break break
} }
case "all":{ case "all":{
console.log("e:"+today) console.log("e:"+today)
startDate = 'all' startDate = 'all'
endDate = yesterday endDate = yesterday
saveFileName = this.pro_name+'_所有'
saveFileName = this.alias+'_所有'
break break
} }
} }
@@ -641,7 +649,7 @@
this.tableData = res.data.pageRecords this.tableData = res.data.pageRecords
this.totalPage=res.data.totalPage this.totalPage=res.data.totalPage
this.totalNum = res.data.totalCount//this.totalPage*this.params.pagesize this.totalNum = res.data.totalCount//this.totalPage*this.params.pagesize
console.log("this.totalPage:"+this.totalPage)
// console.log("this.totalPage:"+this.totalPage)
}) })
}, },
@@ -652,13 +660,14 @@
this.getAllProList(this.params.type, this.dynamic) this.getAllProList(this.params.type, this.dynamic)
}, },
goToDetailPage(pro_id,pro_name,ownerName){
goToDetailPage(pro_id,pro_name,ownerName,alias){
this.currentPage=1 this.currentPage=1
document.getElementById("pro_main").style.display="none"; document.getElementById("pro_main").style.display="none";
document.getElementById("pro_detail").style.display="block"; document.getElementById("pro_detail").style.display="block";
console.log(pro_id)
console.log(pro_name)
// console.log(pro_id)
// console.log(pro_name)
this.pro_name=pro_name; this.pro_name=pro_name;
this.alias=alias;
this.pro_id=pro_id; this.pro_id=pro_id;
this.ownerName=ownerName this.ownerName=ownerName
this.getOneProData(pro_id); this.getOneProData(pro_id);


Loading…
Cancel
Save