Commit ce1f2e2d authored by 徐一鸣's avatar 徐一鸣

Merge branch 'dev' into xym

parents d9ecc911 f63abf18
...@@ -50,7 +50,24 @@ ...@@ -50,7 +50,24 @@
</template> </template>
</ul> </ul>
<div class="steps_container"> <div class="steps_container steps_done" v-if="done">
<div class="steps_done_info">
<div class="left_container">
<img
:src="require('../../assets/imgs/steps_done.png')"
width="100%"
/>
</div>
<div class="right_container">
<p v-if="doneTitle" v-text="doneTitle"></p>
<p v-if="doneSubTitle" v-text="doneSubTitle"></p>
</div>
</div>
<div class="done_action apass_button">
<slot name="action"></slot>
</div>
</div>
<div class="steps_container" v-else>
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
...@@ -64,11 +81,22 @@ export default { ...@@ -64,11 +81,22 @@ export default {
type: Number, type: Number,
default: () => "", default: () => "",
}, },
done: {
type: Boolean,
default: () => false,
},
doneTitle: {
type: String,
default: () => "操作成功",
},
doneSubTitle: {
type: String,
default: () => "",
},
}, },
data: () => ({ data: () => ({
steps: [], steps: [],
}), }),
computed: {},
methods: { methods: {
getSteps() { getSteps() {
this.steps = this.$slots.default this.steps = this.$slots.default
...@@ -88,6 +116,12 @@ export default { ...@@ -88,6 +116,12 @@ export default {
</script> </script>
<style scoped> <style scoped>
.app_build_steps {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
}
.steps_header { .steps_header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -152,9 +186,44 @@ export default { ...@@ -152,9 +186,44 @@ export default {
.steps_header > .step_item.active .step_name { .steps_header > .step_item.active .step_name {
color: #8890a7; color: #8890a7;
} }
.steps_container { .steps_container {
border-top: 2px solid #f4f7fc; border-top: 2px solid #f4f7fc;
margin-top: 20px; margin-top: 20px;
flex-grow: 1;
}
.steps_done {
position: relative;
}
.steps_done_info {
position: absolute;
top: calc(50% - 40px);
left: 50%;
transform: translate(-50%, -50%);
}
.steps_done_info > * {
display: inline-block;
vertical-align: middle;
}
.steps_done_info > .left_container {
width: 70px;
font-size: 0;
margin-right: 10px;
}
.steps_done_info > .right_container > p:nth-child(1) {
font-size: 18px;
font-weight: 700;
line-height: 24px;
color: #242c43;
}
.steps_done_info > .right_container > p:nth-child(2) {
font-size: 14px;
line-height: 20px;
color: #8890a7;
margin-top: 5px;
}
.done_action {
position: absolute;
right: 0;
bottom: 0;
} }
</style> </style>
...@@ -101,18 +101,24 @@ export default { ...@@ -101,18 +101,24 @@ export default {
roundCap: true, roundCap: true,
itemStyle: { itemStyle: {
normal: { normal: {
color: color: new graphic.LinearGradient(0, 0, 1, 0, [
self.dangerousValue == "high" { offset: 0, color: "#fff" },
? self.data.data >= 80 {
? "#e15260" offset: 1,
: "#515fe7" color:
: self.data.data > 75 self.dangerousValue == "high"
? "#00cfc6" ? self.data.data >= 80
: self.data.data > 50 ? "#e15260"
? "#54cefd" : "#515fe7"
: self.data.data > 25 : self.data.data > 75
? "#54cefd" ? "#00cfc6"
: "#25bdb1" : self.data.data > 50
? "#54cefd"
: self.data.data > 25
? "#54cefd"
: "#25bdb1"
}
])
} }
}, },
barGap: "-100%" barGap: "-100%"
......
...@@ -7,18 +7,31 @@ ...@@ -7,18 +7,31 @@
</div> </div>
<el-row class="cell_row"> <el-row class="cell_row">
<el-col :span="10" class="cell_msg"> <el-col :span="10" class="cell_msg">
<img :src="cellItem.cover" class="cell_msg_img" /> <img v-if="cellItem.order_type != 3" :src="cellItem.cover" class="cell_msg_img" />
<img v-else :src="require('@/assets/imgs/img_yunziyuan.png')" class="cell_msg_img" />
<div class="cell_msg_right"> <div class="cell_msg_right">
<div class="cell_name"> <div v-if="cellItem.order_type != 3" class="cell_name">
<span>{{ cellItem.name }}</span> <span>{{ cellItem.name }}</span>
<span v-if="cellItem.mapService" class="tags map_service">mapService</span> <span v-if="cellItem.mapService" class="tags map_service">mapService</span>
<span v-if="cellItem.openness == 1" class="tags shared">共享</span> <span v-if="cellItem.openness == 1" class="tags shared">共享</span>
<span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span> <span v-else-if="cellItem.openness == 2" class="tags restricted">受限</span>
<span v-else-if="cellItem.openness == 3" class="tags sensitive">敏感</span> <span v-else-if="cellItem.openness == 3" class="tags sensitive">敏感</span>
</div> </div>
<div v-else class="cell_name">
<span>云资源申请</span>
</div>
<div class="cell_msg_other"> <div class="cell_msg_other">
<div class="cell_type">{{ cellItem.sector }}</div> <div
<div class="cell_creator">{{ cellItem.src_organization }}</div> class="cell_type"
>{{ cellItem.order_type != 3 ? cellItem.sector : cellItem.namespace }}</div>
<div
v-if="cellItem.order_type != 3"
class="cell_creator"
>{{ cellItem.src_organization }}</div>
<div
v-else
class="cell_creator"
>{{ cellItem.apply_type == 0 ? "申请新的工作区域" : "升级现有工作区域" }}</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -33,8 +46,13 @@ ...@@ -33,8 +46,13 @@
<div>规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}</div> <div>规格:{{ cellItem.spec_app == 0 ? "申请获取应用镜像部署权限" : "申请获取应用镜像开发权限" }}</div>
</div> </div>
<div v-else-if="cellItem.order_type == 3"> <div v-else-if="cellItem.order_type == 3">
<div>规格:CPU 2核,内存 4GB,容器组 8个;数据盘 3块,每块数据盘容量 2GB</div> <div>
<div class="cell_specification_type">单个容器组:CPU最高 4核,默认 2核;内存最高 8 GB,默认 4GB</div> 规格:CPU {{ cellItem.cpu }}核,内存 {{ cellItem.memory }}GB,容器组 {{ cellItem.containers }}个;
<span v-if="cellItem.disk_num != 0">{{ cellItem.disk_num }}数据盘 {{ cellItem.disk_num }}块,每块数据盘容量 {{ cellItem.disk_cap }}GB</span>
</div>
<div
class="cell_specification_type"
>单个容器组:CPU最高 {{ cellItem.one_cpu_max }}核,默认 {{ cellItem.one_cpu_min }}核;内存最高 {{ cellItem.one_memory_max }}GB,默认 {{ cellItem.one_memory_min }}GB</div>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="approval_status"> <el-col :span="4" class="approval_status">
...@@ -93,7 +111,7 @@ ...@@ -93,7 +111,7 @@
class="cell_option_btn" class="cell_option_btn"
@click="viewDetail(cellItem.order_id)" @click="viewDetail(cellItem.order_id)"
>查看详情</el-button> >查看详情</el-button>
<div class="cell_option_spec" @click="nextApply">再次申请</div> <div v-if="cellItem.approval_second_level == 1 && cellItem.pay_status != -1" class="cell_option_spec" @click="nextApply">再次申请</div>
</div> </div>
</el-col> </el-col>
<el-collapse-transition> <el-collapse-transition>
...@@ -220,6 +238,10 @@ export default { ...@@ -220,6 +238,10 @@ export default {
duration: this.cellItem.duration, duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit duration_unit: this.cellItem.duration_unit
}; };
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
} else if (this.cellItem.order_type == 2) { } else if (this.cellItem.order_type == 2) {
query = { query = {
app_id: parseFloat(this.cellItem.app_id), app_id: parseFloat(this.cellItem.app_id),
...@@ -227,11 +249,15 @@ export default { ...@@ -227,11 +249,15 @@ export default {
duration: this.cellItem.duration, duration: this.cellItem.duration,
duration_unit: this.cellItem.duration_unit duration_unit: this.cellItem.duration_unit
}; };
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
} else if (this.cellItem.order_type == 2) {
this.$router.push({
path: "/shop/shop_cloud"
});
} }
this.$router.push({
path: "/shop/shop_car_apply",
query: query
});
}, },
getMessage() { getMessage() {
if (this.cellItem.order_type == 1) { if (this.cellItem.order_type == 1) {
...@@ -310,6 +336,7 @@ export default { ...@@ -310,6 +336,7 @@ export default {
width: 118px; width: 118px;
height: 118px; height: 118px;
border-radius: 8px; border-radius: 8px;
border: 3px #f4f7fc solid;
} }
.cell_msg_right { .cell_msg_right {
width: calc(100% - 140px); width: calc(100% - 140px);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<span class="com_cell_item_title">服务类型:</span> <span class="com_cell_item_title">服务类型:</span>
<span <span
class="com_cell_data" class="com_cell_data"
>{{ cellData.data_service_type1_name }}&nbsp;&nbsp;{{ cellData.data_service_type2_str }}&nbsp;&nbsp;{{ cellData.data_service_type3_str }}</span> >{{ cellData.data_service_type1_name }}&nbsp;&nbsp;{{ cellData.data_service_type2_name }}&nbsp;&nbsp;{{ cellData.data_service_type3_name }}</span>
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">更新时间:</span> <span class="com_cell_item_title">更新时间:</span>
...@@ -89,6 +89,7 @@ export default { ...@@ -89,6 +89,7 @@ export default {
height: 166px; height: 166px;
border-radius: 12px; border-radius: 12px;
overflow: hidden; overflow: hidden;
border: 4px #f4f7fc solid;
} }
.com_cell_img { .com_cell_img {
width: 100%; width: 100%;
...@@ -100,12 +101,13 @@ export default { ...@@ -100,12 +101,13 @@ export default {
} }
.com_cell_msg_title { .com_cell_msg_title {
color: #0d1847; color: #0d1847;
font-size: 22px; font-size: 18px;
line-height: 30px;
font-weight: 700; font-weight: 700;
margin-bottom: 6px; margin-bottom: 6px;
} }
.com_cell_item { .com_cell_item {
font-size: 16px; font-size: 14px;
line-height: 26px; line-height: 26px;
margin-top: 1px; margin-top: 1px;
color: #8890a7; color: #8890a7;
...@@ -124,12 +126,12 @@ export default { ...@@ -124,12 +126,12 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
.com_cell_right { .com_cell_right {
width: 250px; width: 300px;
padding: 25px 0 0 50px; padding: 25px 0 0 50px;
} }
.com_cell_right_text { .com_cell_right_text {
font-size: 14px; font-size: 16px;
margin-top: 15px; margin-top: 25px;
} }
.com_cell_right_time_tit { .com_cell_right_time_tit {
color: #8890a7; color: #8890a7;
...@@ -140,10 +142,10 @@ export default { ...@@ -140,10 +142,10 @@ export default {
.com_cell_right_btn { .com_cell_right_btn {
background-color: #0f2683; background-color: #0f2683;
color: #f8f9fd; color: #f8f9fd;
width: 160px; width: 220px;
height: 40px; height: 40px;
border-radius: 20px; border-radius: 20px;
margin-top: 35px; margin-top: 25px;
} }
.tags { .tags {
display: inline-block; display: inline-block;
...@@ -181,10 +183,10 @@ export default { ...@@ -181,10 +183,10 @@ export default {
.com_cell_right .el-rate__text { .com_cell_right .el-rate__text {
display: inline-block; display: inline-block;
margin-left: 10px; margin-left: 10px;
font-size: 22px; font-size: 32px;
font-weight: 700; font-weight: 700;
} }
.com_cell_right .el-rate__icon { .com_cell_right .el-rate__icon {
font-size: 20px; font-size: 28px;
} }
</style> </style>
\ No newline at end of file
...@@ -223,7 +223,11 @@ export default { ...@@ -223,7 +223,11 @@ export default {
time_app: null, time_app: null,
times: null times: null
}), }),
mounted() {}, mounted() {
window.onresize = () => {
this.judgeHeight();
};
},
watch: { watch: {
urlFilter: { urlFilter: {
handler(val) { handler(val) {
...@@ -335,7 +339,7 @@ export default { ...@@ -335,7 +339,7 @@ export default {
this.time_app = setInterval(() => { this.time_app = setInterval(() => {
if (this.refresh_app_1 && this.refresh_app_2 && this.refresh_app_3) { if (this.refresh_app_1 && this.refresh_app_2 && this.refresh_app_3) {
this.judgeHeight(); this.judgeHeight();
clearInterval(this.time_app) clearInterval(this.time_app);
} }
}, 50); }, 50);
} else { } else {
...@@ -377,7 +381,7 @@ export default { ...@@ -377,7 +381,7 @@ export default {
} }
} }
} }
this.$set((this.filterLists = list)); this.filterLists = [...list];
}, },
clickOpen(index) { clickOpen(index) {
let list = this.openList; let list = this.openList;
......
...@@ -104,30 +104,42 @@ ...@@ -104,30 +104,42 @@
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="22">
<el-form-item class="form_item">
<div class="form_item_title">数据盘(可选):</div>
<el-select v-model="formNew.store_type" placeholder="请选择数据盘类型">
<el-option
v-for="item in options_store_type"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">数据盘(可选):</div>
<el-input-number <el-input-number
v-model="formNew.dataDisk" v-model="formNew.dataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择数量" placeholder="请选择增加数据盘的数量"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">每块数据盘容量:</div>
<el-input-number <el-input-number
v-model="formNew.perDataDisk" v-model="formNew.perDataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择容量" placeholder="请选择每块数据盘的容量"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<div class="form_title">单个容器组规格</div> <div class="form_title">单个容器组规格</div>
</el-col> </el-col>
...@@ -330,24 +342,37 @@ ...@@ -330,24 +342,37 @@
></table-um> ></table-um>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="22">
<el-form-item class="form_item">
<div class="form_item_title">增加数据盘:</div>
<el-select v-model="formOld.store_type" placeholder="请选择数据盘类型">
<el-option
v-for="item in options_store_type"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">增加数据盘:</div>
<el-input-number <el-input-number
v-model="formOld.dataDisk" v-model="formOld.dataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择增加数据盘的数量"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item class="form_item input_has_right"> <el-form-item class="form_item input_has_right">
<div class="form_item_title">每块数据盘容量:</div>
<el-input-number <el-input-number
v-model="formOld.perDataDisk" v-model="formOld.perDataDisk"
controls-position="right" controls-position="right"
:min="0" :min="0"
placeholder="请选择每块数据盘的容量"
></el-input-number> ></el-input-number>
<div class="input_right">GB</div> <div class="input_right">GB</div>
</el-form-item> </el-form-item>
...@@ -562,12 +587,16 @@ ...@@ -562,12 +587,16 @@
<span class="dia_block_item_title">容器组:</span> <span class="dia_block_item_title">容器组:</span>
<span class="dia_block_item_val">{{ diaForm.containerGroup }}</span> <span class="dia_block_item_val">{{ diaForm.containerGroup }}</span>
</div> </div>
<div class="dia_block_item_in"> <div class="dia_block_item_in" v-if="diaForm.dataDisk != 0">
<span class="dia_block_item_title">数据盘:</span> <span class="dia_block_item_title">数据盘:</span>
<span <span
class="dia_block_item_val" class="dia_block_item_val"
>{{ diaForm.dataDisk }}块,每块{{ diaForm.perDataDisk }}GB</span> >{{ diaForm.dataDisk }}块,每块{{ diaForm.perDataDisk }}GB</span>
</div> </div>
<div class="dia_block_item_in" v-if="diaForm.dataDisk != 0">
<span class="dia_block_item_title">数据盘类型:</span>
<span class="dia_block_item_val">{{ diaForm.store_type }}</span>
</div>
</div> </div>
<span class="dia_item_all_title">单个容器组规格:</span> <span class="dia_item_all_title">单个容器组规格:</span>
<div class="dia_block_item"> <div class="dia_block_item">
...@@ -753,7 +782,8 @@ export default { ...@@ -753,7 +782,8 @@ export default {
appDuration: undefined, appDuration: undefined,
durType: 1, durType: 1,
apply_file: "", apply_file: "",
apply_file_name: "" apply_file_name: "",
store_type: "nfs-client"
}, },
ruleNew: { ruleNew: {
namespace: [ namespace: [
...@@ -803,6 +833,10 @@ export default { ...@@ -803,6 +833,10 @@ export default {
{ value: "16", label: "16" }, { value: "16", label: "16" },
{ value: "32", label: "32" } { value: "32", label: "32" }
], ],
options_store_type: [
{ value: "nfs-client", label: "nfs-client" },
{ value: "rook-ceph-block", label: "rook-ceph-block" }
],
formShow: false, formShow: false,
specArr: [ specArr: [
{ title: "CPU", val: "4", src: "ic_CPU" }, { title: "CPU", val: "4", src: "ic_CPU" },
...@@ -834,23 +868,10 @@ export default { ...@@ -834,23 +868,10 @@ export default {
appDuration: undefined, appDuration: undefined,
durType: 1, durType: 1,
apply_file: "", apply_file: "",
apply_file_name: "" apply_file_name: "",
}, store_type: "nfs-client"
paramsOld: {
cpu: "",
memory: "",
containerGroup: undefined,
dataDisk: undefined,
perDataDisk: undefined,
perCPUs: undefined,
perCPU: undefined,
perRAMs: undefined,
perRAM: undefined,
appDuration: undefined,
durType: 1,
apply_file: "",
apply_file_name: ""
}, },
paramsOld: {},
ruleOld: { ruleOld: {
namespace: [ namespace: [
{ required: true, message: "请输入工作区域名称", trigger: "blur" } { required: true, message: "请输入工作区域名称", trigger: "blur" }
...@@ -944,7 +965,8 @@ export default { ...@@ -944,7 +965,8 @@ export default {
this.formOld.perCPU = paramsOld.one_cpu_min; this.formOld.perCPU = paramsOld.one_cpu_min;
this.formOld.perRAMs = paramsOld.one_memory_max; this.formOld.perRAMs = paramsOld.one_memory_max;
this.formOld.perRAM = paramsOld.one_memory_min; this.formOld.perRAM = paramsOld.one_memory_min;
this.dataDiskList = paramsOld.disk_list; this.formOld.store_type = paramsOld.store_type;
this.dataDiskList = paramsOld.disk_list || [];
this.formShow = true; this.formShow = true;
} else { } else {
this.formShow = false; this.formShow = false;
...@@ -999,7 +1021,14 @@ export default { ...@@ -999,7 +1021,14 @@ export default {
one_cpu_max: this.formNew.perCPUs, one_cpu_max: this.formNew.perCPUs,
one_memory_min: this.formNew.perRAM, one_memory_min: this.formNew.perRAM,
one_memory_max: this.formNew.perRAMs one_memory_max: this.formNew.perRAMs
} },
disks: [
{
disk_num: this.formNew.dataDisk,
disk_cap: this.formNew.perDataDisk,
store_type: this.formNew.store_type
}
]
}; };
this.$api.serviceShop.applicationCloud(query).then(response => { this.$api.serviceShop.applicationCloud(query).then(response => {
console.log(response); console.log(response);
...@@ -1016,13 +1045,18 @@ export default { ...@@ -1016,13 +1045,18 @@ export default {
apply_connect_mobile: this.form.phone, apply_connect_mobile: this.form.phone,
memory: Number(this.formOld.memory), memory: Number(this.formOld.memory),
containers: this.formOld.containerGroup, containers: this.formOld.containerGroup,
disk_num: this.formOld.dataDisk,
disk_cap: this.formOld.perDataDisk,
one_cpu_min: this.formOld.perCPU, one_cpu_min: this.formOld.perCPU,
one_cpu_max: this.formOld.perCPUs, one_cpu_max: this.formOld.perCPUs,
one_memory_min: this.formOld.perRAM, one_memory_min: this.formOld.perRAM,
one_memory_max: this.formOld.perRAMs one_memory_max: this.formOld.perRAMs
} },
disks: [
{
disk_num: this.formOld.dataDisk,
disk_cap: this.formOld.perDataDisk,
store_type: this.formOld.store_type
}
]
}; };
this.$api.serviceShop.updateCloud(query).then(response => { this.$api.serviceShop.updateCloud(query).then(response => {
console.log(response); console.log(response);
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
20 - // 距左侧标题的边距 20 - // 距左侧标题的边距
110; // 折叠按钮的宽度 110; // 折叠按钮的宽度
this.filterLength = Math.floor(width / 110); this.filterLength = Math.floor(width / 150);
// console.log("每行最多可容纳" + this.filterLength + "个filter"); // console.log("每行最多可容纳" + this.filterLength + "个filter");
}); });
} }
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
.ces_filter_data > li > a { .ces_filter_data > li > a {
display: block; display: block;
height: 30px; height: 30px;
width: 90px; width: 130px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 12px; border-radius: 12px;
text-align: center; text-align: center;
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 操作按钮 --> <!-- 操作按钮 -->
<span v-if="item.type === 'Button'"> <span v-if="item.type === 'Button'">
<b v-for="(btn, key) in item.btnList" :key="key"> <b v-for="(btn, key) in item.btnList" :key="key" :style="{marginRight:item.btngap}" v-if="!item.public_flag||item.public_flag==false?true:get_show_func(key,scope)">
<em v-if="btn.label == '分配'"> <em v-if="btn.label == '分配'">
<em <em
v-if="btn.label == '分配' && scope.row.state == 0" v-if="btn.label == '分配' && scope.row.state == 0"
...@@ -97,7 +97,11 @@ ...@@ -97,7 +97,11 @@
<em v-if="btn.label == '分配' && scope.row.state == 1">已分配</em> <em v-if="btn.label == '分配' && scope.row.state == 1">已分配</em>
</em> </em>
<em v-if="btn.type == 'goods-shelf'"> <em v-else-if="btn.label == '当前版本'">
<em style="pointer-events:none;color:#a9aec0;">{{btn.label}}</em>
</em>
<!-- <em v-if="btn.type == 'goods-shelf'">
<em <em
v-if="scope.row.state == 0" v-if="scope.row.state == 0"
class="cur_pointer" class="cur_pointer"
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
@click="handleClick(btn.type, scope.row)" @click="handleClick(btn.type, scope.row)"
>下架</em> >下架</em>
<em v-if="scope.row.state == 2">下架</em> <em v-if="scope.row.state == 2">下架</em>
</em> </em> -->
<em <em
class="cur_pointer" class="cur_pointer"
...@@ -363,6 +367,10 @@ export default { ...@@ -363,6 +367,10 @@ export default {
type: Array, type: Array,
default: null default: null
}, },
public_arr: {
type: Array,
default: null
},
getSelectBtn: { getSelectBtn: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -434,6 +442,22 @@ export default { ...@@ -434,6 +442,22 @@ export default {
} }
}, },
methods: { methods: {
get_show_func(btn,val){
// return true
console.log(btn,val);
this.public_arr.forEach(e => {
if(e.tag==val.row.tag){
// if(btn == 3){
// return true
// }else{
// return false
// }
return true
}else{
return true
}
});
},
//本地删除 //本地删除
deleteLocal(val) { deleteLocal(val) {
this.selectedTabsPage.splice(val.$index, 1); this.selectedTabsPage.splice(val.$index, 1);
......
...@@ -10,22 +10,22 @@ ...@@ -10,22 +10,22 @@
<div class="detail_head_cell detail_head_status border_right"> <div class="detail_head_cell detail_head_status border_right">
<p class="detail_head_cell_title">申请状态</p> <p class="detail_head_cell_title">申请状态</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_yellow"
v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1" v-if="orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1"
>待审核</p> >待审核</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_yellow"
v-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1" v-if="orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
>审核中</p> >审核中</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_blue"
v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1" v-if="orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
>审核通过</p> >审核通过</p>
<p <p
class="detail_head_cell_val blue" class="detail_head_cell_val text_red"
v-if="orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1" v-if="orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1"
>审核未通过</p> >审核未通过</p>
<p class="detail_head_cell_val blue" v-if="orderDetail.pay_status == -1">订单已取消</p> <p class="detail_head_cell_val text_blackblue" v-if="orderDetail.pay_status == -1">订单已取消</p>
</div> </div>
<div class="detail_head_cell detail_head_no border_right"> <div class="detail_head_cell detail_head_no border_right">
<p class="detail_head_cell_title">订单编号</p> <p class="detail_head_cell_title">订单编号</p>
...@@ -118,10 +118,10 @@ ...@@ -118,10 +118,10 @@
</div> </div>
</el-col> </el-col>
<el-col :span="10" v-else-if="orderDetail.order_type == 3" class="detail_service_msg"> <el-col :span="10" v-else-if="orderDetail.order_type == 3" class="detail_service_msg">
<img :src="orderDetail.cover" class="detail_service_msg_img" /> <img :src="require('@/assets/imgs/img_yunziyuan.png')" class="detail_service_msg_img" />
<div class="detail_service_msg_right"> <div class="detail_service_msg_right">
<div class="detail_service_name_cloud"> <div class="detail_service_name_cloud">
<span>{{ orderDetail.name }}</span> <span>{{ orderDetail.namespace }}(云资源申请)</span>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -195,7 +195,9 @@ ...@@ -195,7 +195,9 @@
</div> </div>
<div class="params_block_item_in"> <div class="params_block_item_in">
<span class="params_block_item_title">数据盘:</span> <span class="params_block_item_title">数据盘:</span>
<span class="params_block_item_val">{{ orderDetail.disk_num}}块,每块{{orderDetail.disk_cap }}GB</span> <span
class="params_block_item_val"
>{{ orderDetail.disk_num}}块,每块{{orderDetail.disk_cap }}GB</span>
</div> </div>
</div> </div>
<span class="params_block_title margin_top_20">单个容器组规格:</span> <span class="params_block_title margin_top_20">单个容器组规格:</span>
...@@ -222,7 +224,7 @@ ...@@ -222,7 +224,7 @@
</div> </div>
<div class="detail_title">申请人信息</div> <div class="detail_title">申请人信息</div>
<info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list> <info-list @download="download" :list_arr="list_arr" class="detail_s_val"></info-list>
<process-card :data="approval_arr1" class="detail_s_val"></process-card> <process-card v-if="orderDetail.order_type != 3" :data="approval_arr1" class="detail_s_val"></process-card>
</block-radius> </block-radius>
</div> </div>
</template> </template>
...@@ -506,9 +508,18 @@ export default { ...@@ -506,9 +508,18 @@ export default {
line-height: 28px; line-height: 28px;
color: #242c43; color: #242c43;
} }
.blue { .text_blue {
color: #515fe7; color: #515fe7;
} }
.text_yellow {
color: #ef9433;
}
.text_blackblue {
color: #242c43;
}
.text_red {
color: #e15260;
}
.btn_group { .btn_group {
position: absolute; position: absolute;
right: 20px; right: 20px;
...@@ -579,6 +590,7 @@ export default { ...@@ -579,6 +590,7 @@ export default {
width: 118px; width: 118px;
height: 118px; height: 118px;
border-radius: 8px; border-radius: 8px;
border: 3px #f4f7fc solid;
} }
.detail_service_msg_right { .detail_service_msg_right {
width: calc(100% - 140px); width: calc(100% - 140px);
......
...@@ -288,6 +288,7 @@ export default { ...@@ -288,6 +288,7 @@ export default {
: this.user_data.userType == 3 : this.user_data.userType == 3
? "普通用户" ? "普通用户"
: "普通用户开发者"; : "普通用户开发者";
this.imgList = [];
this.imgList.push(data.picture_path); this.imgList.push(data.picture_path);
this.formBusiness.businessSystemName = data.system_name; this.formBusiness.businessSystemName = data.system_name;
this.formBusiness.domainName = data.domain_name; this.formBusiness.domainName = data.domain_name;
......
This diff is collapsed.
<template> <template>
<!--
apply_id
user_id
apply_type
use_uid
id
-->
<div> <div>
<el-breadcrumb separator="/" class="bread_crumb1 bread_left"> <el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item <el-breadcrumb-item
...@@ -21,17 +28,11 @@ ...@@ -21,17 +28,11 @@
<span class="head_right_msg_item">{{ cloudData.phone }}</span> <span class="head_right_msg_item">{{ cloudData.phone }}</span>
资源申请状态: 资源申请状态:
<span <span
v-if="apply_type == 0 && approve_state == 0 || apply_type != 0 && approve_update_state == 0" v-if="apply_type == 0"
class="head_right_msg_item apply_wait" class="head_right_msg_item apply_wait"
>待审批</span> >待审批</span>
<span <span v-if="apply_type == 1" class="head_right_msg_item apply_success">审批通过</span>
v-if="apply_type == 0 && approve_state == 1 || apply_type != 0 && approve_update_state == 1" <span v-if="apply_type == -1" class="head_right_msg_item apply_refuse">审批未通过</span>
class="head_right_msg_item apply_success"
>审批通过</span>
<span
v-if="apply_type == 0 && approve_state == -1 || apply_type != 0 && approve_update_state == -1"
class="head_right_msg_item apply_refuse"
>审批未通过</span>
</p> </p>
<p class="head_right_msg_p"> <p class="head_right_msg_p">
业务系统名: 业务系统名:
...@@ -66,7 +67,13 @@ ...@@ -66,7 +67,13 @@
<div class="params_block_item_in"> <div class="params_block_item_in">
<span class="params_block_item_title">数据盘:</span> <span class="params_block_item_title">数据盘:</span>
<div class="params_block_item_val"> <div class="params_block_item_val">
<div>{{ cloudDteail.disk}}</div> <div>{{ cloudDteail.disk }}</div>
</div>
</div>
<div class="params_block_item_in">
<span class="params_block_item_title">数据盘类型:</span>
<div class="params_block_item_val">
<div>{{ cloudDteail.store_type }}</div>
</div> </div>
</div> </div>
<div class="params_block_item_in"> <div class="params_block_item_in">
...@@ -113,6 +120,12 @@ ...@@ -113,6 +120,12 @@
<div>{{ cloudDetailNew.adjust_disk}}</div> <div>{{ cloudDetailNew.adjust_disk}}</div>
</div> </div>
</div> </div>
<div class="params_block_item_in">
<span class="params_block_item_title">数据盘类型:</span>
<div class="params_block_item_val">
<div>{{ cloudDetailNew.store_type }}</div>
</div>
</div>
<div class="params_block_item_in"> <div class="params_block_item_in">
<span class="params_block_item_title">续期时长:</span> <span class="params_block_item_title">续期时长:</span>
<span class="params_block_item_val">{{ cloudDetailNew.adjust_duration_time }}</span> <span class="params_block_item_val">{{ cloudDetailNew.adjust_duration_time }}</span>
...@@ -223,11 +236,36 @@ ...@@ -223,11 +236,36 @@
</div> </div>
</InfoList> </InfoList>
</div> </div>
<div class="btn_footer"> <div
<el-button class="submit" @click="submit">提交资源申请</el-button> class="btn_footer"
<el-button class="adjustment" @click="adjustment">资源调整</el-button> v-if="now_user != 0 || (now_user == 0 && apploy_msg.second_level != 0)"
<el-button class="adjustment" @click="distribution">分配</el-button> >
<el-button class="refuse" @click="refuse">拒绝</el-button> <el-button
v-if="now_user == 1 && apploy_msg.first_level == 0"
class="submit"
@click="submit"
>提交资源申请</el-button>
<el-button
v-if="now_user == 0 && apploy_msg.second_level != 0"
class="adjustment"
@click="adjustment"
>资源调整</el-button>
<el-button
class="adjustment"
v-if="now_user == 1 && apploy_msg.second_level == 1 && use_uid == ''"
@click="distribution"
>分配</el-button>
<el-button
v-if="now_user == 2 && apploy_msg.second_level == 0 || now_user == 1 && apploy_msg.first_level == 0"
class="refuse"
@click="refuse"
>拒绝</el-button>
<el-button
v-if="now_user == 2 && apploy_msg.second_level == 0"
class="adjustment"
@click="pass"
>通过</el-button>
<el-button v-if="now_user == 2 && use_uid != ''" class="refuse" @click="deleteItem">删除</el-button>
</div> </div>
</BlockRadius> </BlockRadius>
<AllotInfoConfirm ref="allotConfirm"></AllotInfoConfirm> <AllotInfoConfirm ref="allotConfirm"></AllotInfoConfirm>
...@@ -443,7 +481,14 @@ export default { ...@@ -443,7 +481,14 @@ export default {
}, },
apply_type: 0, apply_type: 0,
approve_state: 1, approve_state: 1,
approve_update_state: 1 approve_update_state: 1,
apploy_msg: {
first_level: null,
second_level: null
},
use_uid: "",
could_delete: false,
apply_id: ""
}; };
}, },
watch: {}, watch: {},
...@@ -485,8 +530,9 @@ export default { ...@@ -485,8 +530,9 @@ export default {
} }
}); });
}, },
submit() {},
refuse() {}, refuse() {},
pass() {},
deleteItem() {},
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
if (data.success == 1) { if (data.success == 1) {
...@@ -497,21 +543,52 @@ export default { ...@@ -497,21 +543,52 @@ export default {
} }
}); });
}, },
submit(item) { submit() {
this.$refs.allotConfirm.getDetail(item.apply_id); this.$refs.allotConfirm.getDetail(this.apply_id);
}, },
clickTab() {}, clickTab() {},
setListWithRole() { setListWithRole() {
console.log(this.now_user);
if (this.now_user == 0) { if (this.now_user == 0) {
let index = this.list_arr.findIndex( // 普通用户
item => item.title == "资源使用情况:" if (this.apply_type == 0) {
); // 申请类型0
this.list_arr.splice(index); let index = this.list_arr.findIndex(
this.tabShow = false; item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
this.tabShow = false;
} else if (this.apply_type != 0) {
// 申请类型1
this.tabShow = false;
}
} else if (this.now_user == 1) { } else if (this.now_user == 1) {
this.tabShow = true; // 组织
if (this.apply_type == 0) {
// 申请类型
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
} else if (this.apply_type != 0) {
}
if (this.apploy_msg.first_level == 0) {
// 没分配
this.tabShow = false;
} else if (this.apploy_msg.first_level != 0) {
// 分配
this.tabShow = true;
}
} else if (this.now_user == 2) { } else if (this.now_user == 2) {
// 超管
if (this.apply_type == 0) {
let index = this.list_arr.findIndex(
item => item.title == "资源使用情况:"
);
this.list_arr.splice(index);
this.tabShow = false;
} else if (this.apply_type != 0) {
this.tabShow = false;
}
} }
this.activeName = "0"; this.activeName = "0";
}, },
...@@ -524,7 +601,9 @@ export default { ...@@ -524,7 +601,9 @@ export default {
this.$api.workbench.getCloudDetail(query).then(response => { this.$api.workbench.getCloudDetail(query).then(response => {
let data = response.data.data; let data = response.data.data;
console.log(data); console.log(data);
this.list_arr[3].info = helper.downloadFileFormat(data.apply_file); // application file name this.list_arr[3].info = helper.downloadFileFormat(
data.apply_file ? data.apply_file : ""
); // application file name
this.list_arr[3].url = data.apply_file; // application file url this.list_arr[3].url = data.apply_file; // application file url
this.list_arr[6].info = data.bgn_time; // get time this.list_arr[6].info = data.bgn_time; // get time
this.list_arr[7].info = data.time_remaining; // remaining days this.list_arr[7].info = data.time_remaining; // remaining days
...@@ -573,13 +652,15 @@ export default { ...@@ -573,13 +652,15 @@ export default {
this.cloudDteail.adjust_one_cpu_min = data.adjust_one_cpu_min; this.cloudDteail.adjust_one_cpu_min = data.adjust_one_cpu_min;
this.cloudDteail.adjust_one_memory_max = data.adjust_one_memory_max; this.cloudDteail.adjust_one_memory_max = data.adjust_one_memory_max;
this.cloudDteail.adjust_one_memory_min = data.adjust_one_memory_min; this.cloudDteail.adjust_one_memory_min = data.adjust_one_memory_min;
this.apploy_msg.first_level = data.first_level;
this.apploy_msg.second_level = data.second_level;
this.setListWithRole(); this.setListWithRole();
}); });
} }
} }
}; };
</script> </script>
<style> <style scoped>
.in_cloud_block { .in_cloud_block {
margin: 0 20px; margin: 0 20px;
} }
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</p> </p>
<div style="overflow:hidden;height:700px;" class="limit-elscroll"> <div style="overflow:hidden;height:700px;" class="limit-elscroll">
<el-scrollbar class="service_list"> <el-scrollbar class="service_list">
<div class="service_box" v-for="(item,index) in service_list_arr" :key="index+60000">{{item.service}} <span v-if="item.is_unhealth" class="service_tips">故障</span> </div> <div class="service_box" @click="change_micor(index)" :style="now_micor_service==index?{paddingLeft:'30px',borderLeft:'8px solid #515fe7',backgroundColor:'#fbfcfe'}:''" v-for="(item,index) in service_list_arr" :key="index+60000">{{item.service}} <span v-if="item.is_unhealth" class="service_tips">故障</span> </div>
</el-scrollbar> </el-scrollbar>
<div class="service_detail"> <div class="service_detail">
<nor-card title="服务概况" flag="true"> <nor-card title="服务概况" flag="true">
...@@ -140,27 +140,27 @@ ...@@ -140,27 +140,27 @@
<p <p
style="color: #707693;font-size: 16px;text-align:center;" style="color: #707693;font-size: 16px;text-align:center;"
>服务状态</p> >服务状态</p>
<waveIcon :state="yx_state.state" style="margin:10px auto;"></waveIcon> <waveIcon :state="micor_state.state" style="margin:10px auto;"></waveIcon>
<p <p
style="color: #58617a;font-size: 16px;text-align:center;" style="color: #58617a;font-size: 16px;text-align:center;"
>{{ yx_state.state }}</p> >{{ micor_state.state }}</p>
</div> </div>
<div style="height:115px;" class="service_num service_card_box"> <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> <span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">服务平均响应时间</span>
<p>{{ yx_state.averageTime }}</p> <p>{{ micor_state.averageTime }}</p>
<p>最大响应时间:{{ yx_state.maxTime }}</p> <p>最大响应时间:{{ micor_state.maxTime }}</p>
</div> </div>
<div style="height:115px;" class="service_num service_card_box"> <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> <span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">吞吐率</span>
<p>{{ yx_state.averageTraffic }}</p> <p>{{ micor_state.averageTraffic }}</p>
<p>最大吞吐率:{{ yx_state.maxTraffic }}</p> <p>最大吞吐率:{{ micor_state.maxTraffic }}</p>
</div> </div>
<div style="height:115px;padding-top:30px;" class="service_num service_card_box"> <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> <span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">内存使用</span>
<p>{{ yx_state.memory }}</p> <p>{{ micor_state.memory }}</p>
</div> </div>
</div> </div>
...@@ -169,9 +169,9 @@ ...@@ -169,9 +169,9 @@
<nor-card title="服务设置" flag="true"> <nor-card title="服务设置" flag="true">
<div class="addimage">多版本回滚</div> <div class="addimage">多版本回滚</div>
<!-- <p class="imagebox"> <p class="imagebox">
<span <span
@click="image_select = index" @click="image_select = index;getImageInfo()"
:style=" :style="
image_select == index image_select == index
? { backgroundColor: '#8390ee', color: '#f8f9fd' } ? { backgroundColor: '#8390ee', color: '#f8f9fd' }
...@@ -180,15 +180,16 @@ ...@@ -180,15 +180,16 @@
v-for="(item, index) in image_arr" v-for="(item, index) in image_arr"
:key="index + 6000" :key="index + 6000"
>{{ item.name }}</span> >{{ item.name }}</span>
</p> --> </p>
<table-um <table-um
v-for="(item, index) in image_arr" v-for="(item, index) in image_arr"
:key="index+7000" :key="index+7000"
:height="300"
v-show="image_select == index" v-show="image_select == index"
:headers="header_image_arr" :headers="header_image_arr"
:datas="image_arr[index].data" :datas="image_arr[index].data"
:public_arr="now_image_version"
:stripe="true" :stripe="true"
:paginationShow="true"
@update="update" @update="update"
@rollback="rollback" @rollback="rollback"
@grouppublic="grouppublic" @grouppublic="grouppublic"
...@@ -236,84 +237,7 @@ export default { ...@@ -236,84 +237,7 @@ export default {
imgList: [], imgList: [],
imgList1: [], imgList1: [],
header_data:"", header_data:"",
service_list_arr:[ service_list_arr:[],
{
service:'cemplat-api1',
is_unhealth:1
},
{
service:'cemplat-api1',
is_unhealth:1
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
],
yx_state: { yx_state: {
state: "", state: "",
averageTime: "", averageTime: "",
...@@ -322,6 +246,15 @@ export default { ...@@ -322,6 +246,15 @@ export default {
maxTraffic: "", maxTraffic: "",
memory: "" memory: ""
}, },
micor_state: {
state: "",
averageTime: "",
maxTime: "",
averageTraffic: "",
maxTraffic: "",
memory: ""
},
now_micor_service:0,
image_arr: [], image_arr: [],
area_arr: [ area_arr: [
{ {
...@@ -369,6 +302,7 @@ export default { ...@@ -369,6 +302,7 @@ export default {
value: 10 value: 10
} }
], ],
now_image_version:[],
form: { form: {
name: "", name: "",
fileList: "", fileList: "",
...@@ -393,28 +327,21 @@ export default { ...@@ -393,28 +327,21 @@ export default {
}, },
header_image_arr: [ header_image_arr: [
{ {
prop: "vision", prop: "tag",
label: "版本号", label: "版本号",
minWidth: "20%",
align: "center"
},
{
prop: "state",
label: "状态",
minWidth: "20%",
align: "center" align: "center"
}, },
{ {
prop: "date", prop: "date",
label: "在线日期", label: "在线日期",
minWidth: "30%",
align: "center" align: "center"
}, },
{ {
label: "操作", label: "操作",
type: "Button", type: "Button",
align: "center", align: "center",
minWidth: "30%", btngap:'15px',
public_flag:true,
btnList: [ btnList: [
{ {
type: "update", type: "update",
...@@ -422,7 +349,7 @@ export default { ...@@ -422,7 +349,7 @@ export default {
}, },
{ {
type: "rollback", type: "rollback",
label: "退" label: ""
}, },
{ {
type: "grouppublic", type: "grouppublic",
...@@ -430,8 +357,12 @@ export default { ...@@ -430,8 +357,12 @@ export default {
}, },
{ {
type: "online", type: "online",
label: "下线" label: "当前版本",
} },
{
type: "delete",
label: "删除"
},
] ]
} }
], ],
...@@ -654,13 +585,52 @@ export default { ...@@ -654,13 +585,52 @@ export default {
} }
}) })
}, },
get_micro_service(){
this.$http
.get(`/apaas/istio/service/${this.header_data.namespace}/overview/${this.service_list_arr[this.now_micor_service].service}`)
.then(response => {
if(response.data.success){
let data = response.data.data
this.image_arr = []
data.imageNames.forEach(e => {
this.image_arr.push({
name:e,
data:[]
})
});
this.micor_state= {
state: data.appState,
averageTime: data.respTime.avg,
maxTime: data.respTime.max,
averageTraffic: data.throughput.avg,
maxTraffic: data.throughput.max,
memory: data.resource.memory
}
this.getImageInfo()
}
})
},
change_micor(n){
this.now_micor_service = n
this.get_micro_service()
},
compare(property){
return function(a,b){
var value1 = a[property];
var value2 = b[property];
// return value2 - value1;
return value1 - value2;
}
},
getImageInfo() { getImageInfo() {
this.$http this.$http
.get("./static/deployappdetail.json") .get(`/apaas/istio/service/${this.header_data.namespace}/image/${this.service_list_arr[this.now_micor_service].service}/${this.image_arr[this.image_select].name}/versions`)
.then(response => { .then(response => {
console.log(response); console.log(response);
let data = response.data.data; let data = response.data.data;
this.image_arr = data.imagearr; // this.image_arr = data.imagearr;
this.$set(this.image_arr[this.image_select],'data',data.list.sort(this.compare('date')))
this.now_image_version = data.runnings
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
...@@ -812,6 +782,9 @@ export default { ...@@ -812,6 +782,9 @@ export default {
.then(response => { .then(response => {
if(response.data.success){ if(response.data.success){
this.service_list_arr = response.data.data this.service_list_arr = response.data.data
if(this.service_list_arr&&this.service_list_arr.length){
this.get_micro_service()
}
} }
}) })
} }
......
...@@ -473,6 +473,7 @@ export default { ...@@ -473,6 +473,7 @@ export default {
namespace: this.baseInfoForm.namespace, namespace: this.baseInfoForm.namespace,
uu: this.evtUuid, uu: this.evtUuid,
values: this.app_set_info, values: this.app_set_info,
source: this.$route.query.source == "apply" ? "apply" : ""
}; };
} else { } else {
//编辑提交 //编辑提交
...@@ -483,6 +484,7 @@ export default { ...@@ -483,6 +484,7 @@ export default {
namespace: this.baseInfoForm.namespace, namespace: this.baseInfoForm.namespace,
uu: this.evtUuid, uu: this.evtUuid,
values: yaml.load(this.app_set_code), values: yaml.load(this.app_set_code),
source: this.$route.query.source == "apply" ? "apply" : ""
}; };
} }
this.next_step(); this.next_step();
......
This diff is collapsed.
...@@ -34,7 +34,7 @@ const workbench = { ...@@ -34,7 +34,7 @@ const workbench = {
}, },
// cloud resource approval // cloud resource approval
setCloudApproval(params) { setCloudApproval(params) {
return axios.put(`/apaas/service/v3/resource/apply/approve?apply_id=${params.applyId}&apply_state=${params.applyState}&apply_type=${params.applyType}&cloud_id=${params.applyCloudId}`, params) return axios.put(`/apaas/service/v3/resource/apply/approve?apply_id=${params.applyId}&apply_state=${params.applyState}&apply_type=${params.applyType}&cloud_id=${params.applyCloudId}&namespace=${params.namespace}`, params)
}, },
// cloud resource allocation // cloud resource allocation
setCloudAllocation(params) { setCloudAllocation(params) {
...@@ -48,6 +48,10 @@ const workbench = { ...@@ -48,6 +48,10 @@ const workbench = {
disabledCloud(params) { disabledCloud(params) {
return axios.put(`/apaas/service/v3/resource/apply/disable?id=${params.id}&type=${params.type}`) return axios.put(`/apaas/service/v3/resource/apply/disable?id=${params.id}&type=${params.type}`)
}, },
// get cloud's application
getCloudApplication(params) {
return axios.get(`/apaas/hubApi/market/deployList?page=1&limit=10000&namespaces=${params.namespace}`)
},
} }
export default workbench; export default workbench;
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