From 5db1bf6ce70a2a876136ff7ea44a5622abec09b6 Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Mon, 13 Jul 2020 18:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/workbench/yygl/app_detail.vue | 6 +- src/pages/workbench/yygl/apply_app_detail.vue | 10 +- .../workbench/yygl/deploy_app_detail.vue | 128 +++++++++++++++++- 3 files changed, 138 insertions(+), 6 deletions(-) diff --git a/src/pages/workbench/yygl/app_detail.vue b/src/pages/workbench/yygl/app_detail.vue index 9a1980f..3b04fd4 100644 --- a/src/pages/workbench/yygl/app_detail.vue +++ b/src/pages/workbench/yygl/app_detail.vue @@ -450,7 +450,11 @@ export default { if(response.data.success==1){ console.log(response); this.asynLoad=true - this.image_arr.push(...response.data.data) + if(response.data.data&&response.data.data.length){ + this.image_arr.push(...response.data.data) + }else{ + this.image_arr = [] + } this.total = response.data.total this.image_loading = false; this.image_noMore = false; diff --git a/src/pages/workbench/yygl/apply_app_detail.vue b/src/pages/workbench/yygl/apply_app_detail.vue index 93f17ff..473ce7f 100644 --- a/src/pages/workbench/yygl/apply_app_detail.vue +++ b/src/pages/workbench/yygl/apply_app_detail.vue @@ -29,6 +29,7 @@ + @@ -245,6 +246,10 @@ export default { title: "申请规格:", info: "", }, + { + title: "申请时间:", + info: "", + }, { title: "审批信息", prop:"title", @@ -271,7 +276,7 @@ export default { methods: { get_app_code(){ this.$http - .get("/apaas/hubApi/market/values/"+this.$route.params.id) + .get("/apaas/hubApi/market/values/"+this.$route.params.app_id) .then((response) => { let data = response.data.data; this.appcode = data @@ -280,7 +285,7 @@ export default { }, getreadme(){ this.$http - .get("/apaas/hubApi/market/app/detail/"+this.$route.params.id) + .get("/apaas/hubApi/market/app/detail/"+this.$route.params.app_id) .then((response) => { let data = response.data.data; this.$set(this.list_arr[0], "info", data.yyjj); @@ -337,6 +342,7 @@ export default { this.$set(this.servicead_arr[2], "info", data.apply_file); this.$set(this.servicead_arr[2], "url", data.apply_file); this.$set(this.servicead_arr[3], "info", data.apply_type_name); + this.$set(this.servicead_arr[4], "info", data.apply_time); }) .catch(function(response) {}); }, diff --git a/src/pages/workbench/yygl/deploy_app_detail.vue b/src/pages/workbench/yygl/deploy_app_detail.vue index 7a35f4e..2636267 100644 --- a/src/pages/workbench/yygl/deploy_app_detail.vue +++ b/src/pages/workbench/yygl/deploy_app_detail.vue @@ -30,7 +30,11 @@ :editable="false" v-if="now_service == 0" /> + +
+ 服务发布 +
@@ -219,8 +223,55 @@
+ + + + + @@ -232,6 +283,7 @@ import uploadFile from "@/components/general/upload_file"; import norCard from "@/components/card"; import waveIcon from "@/components/general/wave_icon"; import Topology from "@/components/topology.vue"; +import apassDialog from '@/components/apass-dialog' import { getRole } from "@/utils/common"; import { mapGetters, mapState } from "vuex"; export default { @@ -242,7 +294,8 @@ export default { uploadFile, norCard, Topology, - waveIcon + waveIcon, + apassDialog }, data() { return { @@ -254,6 +307,14 @@ export default { imgList1: [], header_data:"", service_list_arr:[], + publicForm:{ + area:'', + open:'' + }, + public_rules:{ + area:[{ required: true, message: '请选择服务领域', trigger: 'change' }], + open:[{ required: true, message: '请选择开放程度', trigger: 'change' }], + }, yx_state: { state: "", averageTime: "", @@ -270,6 +331,7 @@ export default { maxTraffic: "", memory: "" }, + public_flag:false, now_micor_service:0, image_arr: [], area_arr: [ @@ -425,8 +487,8 @@ export default { text: "" } ], - yydebugger: true, - yydev:true, + yydebugger: false, + yydev:false, url: "" }, now_service: 0, @@ -521,7 +583,25 @@ export default { }, methods: { + public_service(){ + this.$refs.actiondialog.show(); + }, + dialogCancel(){ + this.$refs.actiondialog.hide(); + }, + save_file(){ + this.$refs['publicForm'].validate((valid) => { + if (valid) { + this.$refs.actiondialog.hide(); + this.$router.push('/fwzc/fwcs') + } else { + console.log('error submit!!'); + return false; + } + }); + }, event_source(){ + //更新版本时请求版本状态 var _this = this const se = new EventSource(`/apaas/istio/service/${this.header_data.namespace}/versions/events/${this.service_list_arr[this.now_micor_service].service}/${this.now_tag}/subscribe`, { withCredentials: true }) // 后端接口,要配置允许跨域属性 se.onopen=function(e){} @@ -553,6 +633,7 @@ export default { detail(val) { console.log(val); }, + //更新 update(val) { this.up_flag = true this.$message.success('开始更新版本') @@ -566,6 +647,7 @@ export default { } }) }, + //蓝绿发布 together(val){ this.up_flag = true this.$http @@ -576,6 +658,7 @@ export default { this.get_micro_service() }) }, + //删除 delete_ver(val){ this.up_flag = true this.$http @@ -795,6 +878,10 @@ export default { .then(response => { let data = response.data.data; this.header_data = data + this.public_flag = false + if(data.is_apply==0&&(data.type==2||data.type==3)){ + this.public_flag = true + } this.$set( this.service_header_arr, "name", @@ -822,6 +909,18 @@ export default { data.namespace+'('+data.workplace+')' ); this.$set(this.service_header_arr["second"][2], "text", data.created); + + //应用开发调试按钮显示 + if(this.now_user==0||this.now_user==3||this.now_user==4){ + this.service_header_arr.yydebugger = true + }else{ + this.service_header_arr.yydebugger = false + } + if(this.now_user==0||this.now_user==4){ + this.service_header_arr.yydev = true + }else{ + this.service_header_arr.yydev = false + } }) .catch(function(response) {}); }, @@ -884,6 +983,15 @@ export default { background-color: #f7f8f9; width: 1022px; } +.dialog-content .el-input__inner{ + background-color: #f7f8f9; + width: 460px; +} +.dialog-content .el-form-item{ + margin-top: 15px; + margin-bottom: 0; +} + .service_list ::-webkit-scrollbar { width: 0px; /*对垂直流动条有效*/ height: 0px; /*对水平流动条有效*/ @@ -914,6 +1022,9 @@ background:khaki; -- 2.26.0