Commit 440d807f authored by 张俊's avatar 张俊

Merge branch 'zj' into dev

parents d59bf60b 0a8ef5bb
......@@ -19,8 +19,8 @@
<div class="type_box_select">
<info-list @download="download" :list_arr="now_service==0?list_arr:servicead_arr[now_user]">
<table-um :headers="header_arr" :datas="zd_table_arr" slot="zd_table"></table-um>
<process-card type="approval" :data="approval_arr[now_user]" slot="sp_card" v-if="(now_user==1&&service_header_arr['first'][2]!=='待审批')||now_user==2"></process-card>
<div class="info_contain1" slot="sp_result" v-if="service_header_arr['first'][2]=='待审批'">
<process-card type="approval" :data="approval_arr[now_user]" slot="sp_card" v-if="(now_user==1&&service_header_arr['first'][2].text!=='待审批')||now_user==2"></process-card>
<div class="info_contain1" slot="sp_result" v-if="service_header_arr['first'][2].text=='待审批'">
<el-form ref="form" :rules="rules" :model="form" label-width="0px">
<el-form-item prop="result">
<p class="formname">审批结果:</p>
......@@ -274,10 +274,11 @@ export default {
console.log(this.level);
if(this.userInfo){
this.now_user = this.level
this.get_service_info()
}else{
this.getCurrentUser()
}
this.get_service_info()
},
mounted() {},
methods: {
......@@ -289,6 +290,7 @@ export default {
console.log("--- user info ---");
this.$store.commit("userInfofun", data.data);
this.now_user = this.level
this.get_service_info()
console.log(this.level);
} else {
console.log(data.errMsg);
......@@ -351,43 +353,45 @@ export default {
this.$set(this.list_arr[6], "info", data.service_apply_info.apply_file.split('/')[data.service_apply_info.apply_file.split('/').length - 1]);
this.$set(this.list_arr[6], "url", data.service_apply_info.apply_file);
this.$set(this.list_arr[8], "info", data.service_apply_info.duration+data.service_apply_info.duration_unit);
this.$set(this.list_arr[9], "info", data.request_spcs_info);
this.$set(this.list_arr[9], "info", "访问次数:"+data.service_apply_info.request_spcs.pv+"/日 访问量:"+data.service_apply_info.request_spcs.count+"/日");
this.id = data.service_apply_info.id
if(data.service_apply_info.approval_status!==0){
this.servicead_arr[this.now_user].splice(1,1)
}
if(!((now_user==1&&service_header_arr['first'][2]!=='待审批')||now_user==2)){
if(!((this.now_user==1&&this.service_header_arr['first'][2].text!=='待审批')||this.now_user==2)){
this.servicead_arr[this.now_user].splice(0,1)
}
data.service_apply_info.approval_process.forEach(e => {
this.approval_arr[this.now_user].push(
{
title:e.level==1?'一级审批':'二级审批',
result:e.status==-1?'审批未通过':e.status==0?'审批中':'审批通过',
}
)
if(e.status!==0){
this.approval_arr[this.now_user][this.approval_arr[this.now_user].length - 1]['arr']=[
{
title:'审批时间:',
info:e.approval_time.split('+')[0].replace("T",' ')
},
{
title:'审批单位:',
info:e.user_info.department_name
},
{
title:'审批人:',
info:e.user_info.user_name
},
{
title:'审批意见:',
info:e.comments
},
]
}
});
if(data.service_apply_info.approval_process){
data.service_apply_info.approval_process.forEach(e => {
this.approval_arr[this.now_user].push(
{
title:e.level==1?'一级审批':'二级审批',
result:e.status==-1?'审批未通过':e.status==0?'审批中':'审批通过',
}
)
if(e.status!==0){
this.approval_arr[this.now_user][this.approval_arr[this.now_user].length - 1]['arr']=[
{
title:'审批时间:',
info:e.approval_time.split('+')[0].replace("T",' ')
},
{
title:'审批单位:',
info:e.user_info.department_name
},
{
title:'审批人:',
info:e.user_info.user_name
},
{
title:'审批意见:',
info:e.comments
},
]
}
});
}
console.log(this.approval_arr);
this.zd_table_arr = data.service_apply_info.res_fields?JSON.parse(data.service_apply_info.res_fields):[]
})
......
......@@ -691,13 +691,21 @@ export default {
getServiceyxztInfo() {
this.$http
.get("/static/servicedetail1.json")
.get(`/apaas/istio/service/apaas-proxy/overview/apaas-proxy-${this.$route.params.id}`)
.then((response) => {
console.log(response);
let data = response.data.data;
this.yx_state = data.serviceyxzt;
if(response.data.success){
let data = response.data.data
this.yx_state={
state: data.appState=='running'?'运行中':'等待中',
averageTime: data.respTime.avg+'ms',
maxTime: data.respTime.max+'ms',
averageTraffic: data.throughput.avg+'dps',
maxTraffic: data.throughput.max+'dps',
memory: data.resource.memory+'MB',
}
}
})
.catch(function(response) {});
},
},
};
......
......@@ -310,6 +310,22 @@ export default {
.catch(function(response) {});
},
setService(){
if(this.open){
if(this.maxline){
}else{
this.$message.error('请输入最大连接数')
return
}
}
if(this.open1){
if(this.maxline1&&this.usetime1&&this.timevalue){
}else{
this.$message.error('请输入所需参数')
return
}
}
var temp = {
id:parseInt(this.$route.params.id),
"name": this.form.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment