Commit 8520c76a authored by 刘殿昕's avatar 刘殿昕

云资源价格

parent dca59da1
......@@ -27,7 +27,7 @@
</span>
<span
class="right gap"
v-if="data.yydetail || data.xxdetail || data.yydev||data.public||data.unpublic||data.undeploy||data.deploy"
v-if="data.yydetail || data.xxdetail ||data.public||data.unpublic||data.undeploy||data.deploy"
>
|
</span>
......@@ -88,9 +88,9 @@
取消发布
</span>
<span class="info_fix" v-if="data.yydev" @click="subevent(6)">
<!-- <span class="info_fix" v-if="data.yydev" @click="subevent(6)">
应用开发
</span>
</span> -->
</p>
<div class="info_detail">
<p>
......
......@@ -1030,6 +1030,7 @@ export default {
let sumCM = 0;
let sumDisk = 0;
let a_deductions = 0;
let arrJifei = JSON.parse(JSON.stringify(this.jifeiList1));
if (this.activeName == "0") {
a_deductions = this.deductions;
if (this.cpu_memory && this.cpu_memory.length != 0) {
......@@ -1065,9 +1066,9 @@ export default {
}
sumCM = sumCM * Number(this.formNew.appDuration);
if (
this.formNew.dataDisk >= 1 &&
this.formNew.perDataDisk >= 1 &&
this.formNew.appDuration >= 1
this.formNew.dataDisk >= 0 &&
this.formNew.perDataDisk >= 0 &&
this.formNew.appDuration >= 0
) {
if (this.hard_disk && this.hard_disk.length != 0) {
this.disk_single_money = Number(this.hard_disk[0].price);
......@@ -1077,26 +1078,26 @@ export default {
Number(this.formNew.appDuration) *
Number(this.hard_disk[0].price);
}
this.jifeiList1[2] = {
arrJifei[2] = {
name: "数据盘",
num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`,
time: `${this.formNew.appDuration}个月`,
sum: `${sumDisk}金币`,
};
} else {
this.jifeiList1.splice(2);
arrJifei.splice(2);
}
this.jifeiList1[0].num = `${
this.formNew.cpu >= 1 ? this.formNew.cpu : 0
}核+${this.formNew.memory >= 1 ? this.formNew.memory : 0}G`;
this.jifeiList1[0].time = `${
arrJifei[0].num = `${this.formNew.cpu >= 1 ? this.formNew.cpu : 0}核+${
this.formNew.memory >= 1 ? this.formNew.memory : 0
}G`;
arrJifei[0].time = `${
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}个月`;
this.jifeiList1[0].sum = `${sumCM}金币`;
this.jifeiList1[1].num = `${
arrJifei[0].sum = `${sumCM}金币`;
arrJifei[1].num = `${
this.formNew.containerGroup >= 1 ? this.formNew.containerGroup : 0
}个`;
this.jifeiList1[1].time = `${
arrJifei[1].time = `${
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}个月`;
} else if (this.activeName == "1") {
......@@ -1134,9 +1135,9 @@ export default {
}
sumCM = sumCM * Number(this.formOld.appDuration);
if (
this.formOld.dataDisk >= 1 &&
this.formOld.perDataDisk >= 1 &&
this.formOld.appDuration >= 1
this.formOld.dataDisk >= 0 &&
this.formOld.perDataDisk >= 0 &&
this.formOld.appDuration >= 0
) {
if (this.hard_disk && this.hard_disk.length != 0) {
this.disk_single_money = Number(this.hard_disk[0].price);
......@@ -1146,29 +1147,32 @@ export default {
Number(this.formOld.appDuration) *
Number(this.hard_disk[0].price);
}
this.jifeiList1[2] = {
arrJifei[2] = {
name: "数据盘",
num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`,
time: `${this.formOld.appDuration}个月`,
sum: `${sumDisk}金币`,
};
} else {
this.jifeiList1.splice(2);
arrJifei.splice(2);
}
this.jifeiList1[0].num = `${
this.formOld.cpu >= 1 ? this.formOld.cpu : 0
}核+${this.formOld.memory >= 1 ? this.formOld.memory : 0}G`;
this.jifeiList1[0].time = `${
arrJifei[0].num = `${this.formOld.cpu >= 1 ? this.formOld.cpu : 0}核+${
this.formOld.memory >= 1 ? this.formOld.memory : 0
}G`;
arrJifei[0].time = `${
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`;
this.jifeiList1[0].sum = `${sumCM}金币`;
this.jifeiList1[1].num = `${
arrJifei[0].sum = `${sumCM}金币`;
arrJifei[1].num = `${
this.formOld.containerGroup >= 1 ? this.formOld.containerGroup : 0
}个`;
this.jifeiList1[1].time = `${
arrJifei[1].time = `${
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`;
}
this.$nextTick(() => {
this.jifeiList1 = arrJifei;
});
// console.log(sumCM, sumDisk)
this.amounts_payable = Number(
(Number(sumCM) + Number(sumDisk)).toFixed(2)
......@@ -1629,7 +1633,7 @@ export default {
name: "数据盘",
num: `${this.dataDiskList.length}个数据盘,共计${this.dataDiskList.length}GB"`,
time: "0个月",
sum: "2000金币",
sum: "0金币",
},
];
} else {
......
This diff is collapsed.
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