Commit 0ae75816 authored by 张俊's avatar 张俊

上架上线按钮显示的修改

parent 0c08b7e8
......@@ -23,15 +23,17 @@
<span
class="right underline"
v-if="data.xxdetail"
@click="subevent(2)"
@click="subevent(2,get_strd(data.xxdetail)[0])"
:style="get_strd(data.xxdetail)[0]?{backgroundColor:'#ccc',color:'#e6ebfe'}:''"
title="申请下线至开发者应用"
>{{ data.xxdetail }}</span
>{{ get_strd(data.xxdetail)[1] }}</span
>
<span
class="right undersell"
v-if="data.yydetail"
@click="subevent(3)"
>{{ data.yydetail }}</span
:style="get_strd(data.yydetail)[0]?{backgroundColor:'#ccc',color:'#e6ebfe'}:''"
@click="subevent(3,get_strd(data.yydetail)[0])"
>{{ get_strd(data.yydetail)[1] }}</span
>
<span
class="right undersell undermy"
......@@ -92,7 +94,19 @@ export default {
},
mounted() {},
methods: {
subevent(val){
get_strd(str){
if(str){
if(str.indexOf('d')!==-1){
return [true,str.substr(0,str.length-1)]
}else {
return [false,str]
}
}
},
subevent(val,flag=false){
if(flag){
return
}
if(val == 0){
// this.$emit('deploy',this.data)
this.$router.push(`/yygl/${this.$route.params.level}/${this.$route.params.type}/deployment/${this.$route.params.id}?source=${this.$route.query.source}`)
......
......@@ -542,6 +542,13 @@ export default {
data.req_url
);
this.$set(this.service_header_arr, "url", data.cover);
if(this.now_user==1){
this.$set(
this.service_header_arr,
"fixed",
false
);
}
this.$set(
this.service_header_arr,
"fixedurl",
......
<template>
<div class="detail_contain">
<p class="now_page_title">
我的服务 / 注册发布的服务 /
我的服务 / {{now_user==0||now_user==4?'注册发布的服务':'平台服务管理'}} /
<span>服务编辑</span>
</p>
<div class="info_contain">
......
......@@ -34,14 +34,6 @@
<div v-if="now_service == 1&&now_user == 0">
<p style="color:#8890a7;">镜像列表:</p>
<!-- <table-um
:headers="header_arr"
:datas="image_arr"
:asyn_load1="asynLoad"
isLoad="255px"
@load_data="load_data"
@actiondelete="actiondelete"
></table-um> -->
<div
v-if="image_arr"
class="image_list_container"
......@@ -394,14 +386,15 @@ export default {
if (valid) {
this.anotherData = {
image_name:this.form.name,
tag:this.form.taps
tag:this.form.taps,
app_id:this.$route.params.id
}
console.log(this.anotherData);
setTimeout(()=>{
this.$refs['upload'].submit()
this.$message.success('开始上传')
this.$refs['form'].resetFields();
this.addImageFlag = false
// this.addImageFlag = false
})
} else {
console.log('error submit!!');
......@@ -424,6 +417,7 @@ export default {
},
upload_success(response, file, fileList){
if(response.success == 1){
this.addImageFlag = false
this.$message.success('上传成功')
this.get_image_list()
}else{
......@@ -531,21 +525,21 @@ export default {
btnCancelText: "",
position: "",
}
if(val.xxdetail == '申请下线'){
if(val.xxdetail == '申请下线'||val.xxdetail == '申请下线d'){
this.tipsOptions.message="该操作会将该应用从应用商店的平台应用区域下线至开发者应用区域,下线前需向超级管理员发送通知,超级管理员通过后此应用将下线至开发者应用区域。"
this.tipsOptions.btnSubmitText="发送通知"
}
if(val.xxdetail == '申请上线'){
if(val.xxdetail == '申请上线'||val.xxdetail == '申请上线d'){
this.tipsOptions.message="该操作会将该应用从应用商店开发者应用上线至平台应用"
this.tipsOptions.btnSubmitText="确认"
}
this.tipsOptions.position="left"
this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - ");
if(val.xxdetail == '申请下线'){
if(val.xxdetail == '申请下线'||val.xxdetail == '申请下线d'){
this.change_up_state('/apaas/hubApi/market/platformStatus',3)
}
if(val.xxdetail == '申请上线'){
if(val.xxdetail == '申请上线'||val.xxdetail == '申请上线d'){
this.change_up_state('/apaas/hubApi/market/platformStatus',1)
}
this.$refs.myConfirm.hideModel();
......@@ -561,20 +555,20 @@ export default {
btnCancelText: "",
position: "",
}
if(val.yydetail == '申请下架'){
if(val.yydetail == '申请下架'||val.yydetail == '申请下架d'){
this.tipsOptions.message="申请下架应用需要向组织管理员发送通知,组织管理员通过下架请求后该应用将从应用商店下架。"
this.tipsOptions.btnSubmitText="发送通知"
}
if(val.yydetail == '申请上架'){
if(val.yydetail == '申请上架'||val.yydetail == '申请上架d'){
this.tipsOptions.message="申请下架应用需要向组织管理员发送通知,组织管理员通过上架请求后该应用将在应用商店上架。"
this.tipsOptions.btnSubmitText="确认"
}
this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - ");
if(val.yydetail == '申请下架'){
if(val.yydetail == '申请下架'||val.yydetail == '申请下架d'){
this.change_up_state('/apaas/hubApi/market/deployStatus',3)
}
if(val.yydetail == '申请上架'){
if(val.yydetail == '申请上架'||val.yydetail == '申请上架d'){
this.change_up_state('/apaas/hubApi/market/deployStatus',1)
}
this.$refs.myConfirm.hideModel();
......@@ -587,46 +581,126 @@ export default {
.then((response) => {
if(response.data.success){
let data = response.data.data;
this.$set(this.service_header_arr, "name", data.app_name+'V'+data.version);
this.$set(this.service_header_arr['first'][0], "text", data.online_state_name);
this.$set(this.service_header_arr['first'][1], "text", data.type_name);
this.$set(this.service_header_arr['first'][2], "text", data.ywly_name);
var temp_info = {
name: data.app_name+'V'+data.version,
first: [
{
"name": "在线状态",
"text": data.online_state_name
},
{
"name": "应用类型",
"text": data.type_name
},
{
"name": "业务领域",
"text": data.ywly_name
}
],
second: [
{
"name": "申请类型",
"text": data.apply_type_name
},
{
"name": "申请开发次数",
"text": data.apply_times+''
},
{
"name": "申请部署次数",
"text": data.deploy_times+''
},
{
"name":"创建时间",
"text":data.create_date
}
],
yydetail: '',
xxdetail:'',
aqdetail: true,
fxdetail:false,
url:'',
}
if(data.apply_type_name){
this.$set(this.service_header_arr['second'][0], "text", data.apply_type_name);
}else{
temp_info['second'].splice(0,1)
}
var show_arr = [
[
[
['申请上架']
],
[
['申请上架d']
],
],
[
'',
'',
[
[
'申请下架',
'申请上线'
],
[
'申请上线d',
]
],
[
[
'申请上架d'
]
],
],
[
'',
'',
[
'',
'',
[
'申请下线'
],
[
'申请下线d'
]
]
]
]
var temp_str = show_arr[data.online_state][data.up_deploy_status][data.up_platform_status]
if(this.$route.query.source=='apply'){
}else{
this.service_header_arr['second'].splice(0,1)
}
this.$set(this.service_header_arr['second'][1], "text", data.apply_times+'');
this.$set(this.service_header_arr['second'][2], "text", data.deploy_times+'');
this.$set(this.service_header_arr['second'][3], "text", data.create_date);
this.$set(this.service_header_arr, "yydetail", '');
this.$set(this.service_header_arr, "xxdetail", '');
if(data.up_deploy_status==0){
this.$set(this.service_header_arr, "yydetail", '申请上架');
}else if(data.up_deploy_status==2){
this.$set(this.service_header_arr, "yydetail", '申请下架');
}
if(data.up_platform_status==0){
this.$set(this.service_header_arr, "xxdetail", '申请上线');
}else if(data.up_platform_status==2){
this.$set(this.service_header_arr, "xxdetail", '申请下线');
if(temp_str&&temp_str[0]&&temp_str[0].indexOf('')!==-1){
temp_info.yydetail = temp_str[0]
}
if(temp_str&&temp_str[1]&&temp_str[1].indexOf('')!==-1){
temp_info.yydetail = temp_str[1]
}
if(temp_str&&temp_str[0]&&temp_str[0].indexOf('线')!==-1){
temp_info.xxdetail = temp_str[0]
}
if(temp_str&&temp_str[1]&&temp_str[1].indexOf('线')!==-1){
temp_info.xxdetail = temp_str[1]
}
}
if(this.now_user == 0){
this.$set(this.service_header_arr, "fxdetail", true);
temp_info.fxdetail = true
}
if(this.now_user == 1){
this.$set(this.service_header_arr, "xxdetail", '');
this.$set(this.service_header_arr, "yydetail", '');
this.$set(this.service_header_arr, "fxdetail", '');
this.$set(this.service_header_arr, "aqdetail", false);
temp_info.xxdetail = ''
temp_info.yydetail = ''
temp_info.fxdetail = ''
temp_info.aqdetail = false
}
if(this.now_user == 2){
this.$set(this.service_header_arr, "xxdetail", '');
this.$set(this.service_header_arr, "yydetail", '');
this.$set(this.service_header_arr, "aqdetail", true);
temp_info.xxdetail = ''
temp_info.yydetail = ''
temp_info.aqdetail = true
}
this.$set(this.service_header_arr, "url", data.logo);
temp_info.url = data.logo
this.service_header_arr = temp_info
}
})
.catch(function(response) {});
......
......@@ -108,23 +108,23 @@
<nor-card title="平均响应时间" class="service_card">
<template>
<div style="height:115px;" class="service_num">
<p>{{ yx_state.averageTime }}</p>
<p>最大响应时间:{{ yx_state.maxTime }}</p>
<p>{{ yx_state.averageTime }}ms</p>
<p>最大响应时间:{{ yx_state.maxTime }}ms</p>
</div>
</template>
</nor-card>
<nor-card title="吞吐率" class="service_card">
<template>
<div style="height:115px;" class="service_num">
<p>{{ yx_state.averageTraffic }}</p>
<p>最大吞吐率:{{ yx_state.maxTraffic }}</p>
<p>{{ yx_state.averageTraffic }}dps</p>
<p>最大吞吐率:{{ yx_state.maxTraffic }}dps</p>
</div>
</template>
</nor-card>
<nor-card title="资源使用" class="service_card">
<template>
<div style="height:115px;padding-top:30px;" class="service_num">
<p>{{ yx_state.memory }}</p>
<p>{{ yx_state.memory }}MB</p>
</div>
</template>
</nor-card>
......@@ -152,19 +152,19 @@
<div style="height:115px;" class="service_num service_card_box">
<span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">服务平均响应时间</span>
<p>{{ micor_state.averageTime }}</p>
<p>最大响应时间:{{ micor_state.maxTime }}</p>
<p>{{ micor_state.averageTime }}ms</p>
<p>最大响应时间:{{ micor_state.maxTime }}ms</p>
</div>
<div style="height:115px;" class="service_num service_card_box">
<span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">吞吐率</span>
<p>{{ micor_state.averageTraffic }}</p>
<p>最大吞吐率:{{ micor_state.maxTraffic }}</p>
<p>{{ micor_state.averageTraffic }}dps</p>
<p>最大吞吐率:{{ micor_state.maxTraffic }}dps</p>
</div>
<div style="height:115px;padding-top:30px;" class="service_num service_card_box">
<span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">内存使用</span>
<p>{{ micor_state.memory }}</p>
<p>{{ micor_state.memory }}MB</p>
</div>
</div>
......@@ -1191,6 +1191,7 @@ background:khaki;
.service_num p:nth-of-type(1) {
font-size: 36px;
color: #3f4f9c;
font-weight: 600;
margin-bottom: 10px;
}
.service_num p:nth-of-type(2) {
......
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