diff --git a/src/pages/workbench/fwgl/approval_service_detail.vue b/src/pages/workbench/fwgl/approval_service_detail.vue index c84a940a692a3f003388084b4b775fdf04b4ae3d..9e64c05489a8a6417dc11687a5a961fecba0a5d4 100644 --- a/src/pages/workbench/fwgl/approval_service_detail.vue +++ b/src/pages/workbench/fwgl/approval_service_detail.vue @@ -19,8 +19,8 @@
审批结果:
@@ -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):[] }) diff --git a/src/pages/workbench/fwgl/serviceDetail.vue b/src/pages/workbench/fwgl/serviceDetail.vue index 6a9448bcaf18a83c8a1ec206623989b55678d0aa..33a11958cffbf6a7917fcb4654c1e00b50207283 100644 --- a/src/pages/workbench/fwgl/serviceDetail.vue +++ b/src/pages/workbench/fwgl/serviceDetail.vue @@ -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) {}); + }, }, }; diff --git a/src/pages/workbench/fwgl/serviceEdit.vue b/src/pages/workbench/fwgl/serviceEdit.vue index df0b9ff2ce378d5041f34ffc709e52cf92b37cd8..4d174d78b6fa718c6a71347fc4baaa21ec0dee64 100644 --- a/src/pages/workbench/fwgl/serviceEdit.vue +++ b/src/pages/workbench/fwgl/serviceEdit.vue @@ -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,