From c7b519d6723d48adac2438df631226b27e72b515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Tue, 3 Nov 2020 19:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E8=B5=84=E6=BA=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shop-cloud/shop-cloud.vue | 40 +++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue index b19f5d2..9ff1545 100644 --- a/src/components/shop-cloud/shop-cloud.vue +++ b/src/components/shop-cloud/shop-cloud.vue @@ -1681,25 +1681,23 @@ export default { apply_connect_mobile: this.form.phone, memory: Number(this.formNew.memory), containers: this.formNew.containerGroup, - disk_num: this.formNew.dataDisk, - disk_cap: this.formNew.perDataDisk, - one_cpu_min: this.formNew.perCPU, - one_cpu_max: this.formNew.perCPUs, - one_memory_min: this.formNew.perRAM, - one_memory_max: this.formNew.perRAMs, + one_cpu_min: this.formNew.perCPU ? this.formNew.perCPU : 0, + one_cpu_max: this.formNew.perCPUs ? this.formNew.perCPUs : 0, + one_memory_min: this.formNew.perRAM ? this.formNew.perRAM : 0, + one_memory_max: this.formNew.perRAMs ? this.formNew.perRAMs : 0, }, disks: [ { - disk_num: this.formNew.dataDisk + "", - disk_cap: this.formNew.perDataDisk + "", - store_type: this.formNew.store_type + "", + disk_num: this.formNew.dataDisk ? this.formNew.dataDisk + "" : "0", + disk_cap: this.formNew.perDataDisk ? this.formNew.perDataDisk + "" : "0", + store_type: "nfs-client", }, ], payment: { // total_money: this.total_money, - disk_single_money: this.disk_single_money, - eci_single_money: this.eci_single_money, - total_money: this.amounts_payable, + disk_single_money: String(this.disk_single_money), + eci_single_money: String(this.eci_single_money), + total_money: String(this.amounts_payable), }, }; this.$api.serviceShop.applicationCloud(query).then((response) => { @@ -1729,19 +1727,25 @@ export default { apply_connect_mobile: this.form.phone, memory: Number(this.formOld.memory), containers: this.formOld.containerGroup, - one_cpu_min: this.formOld.perCPU, - one_cpu_max: this.formOld.perCPUs, - one_memory_min: this.formOld.perRAM, - one_memory_max: this.formOld.perRAMs, + one_cpu_min: this.formOld.perCPU ? this.formOld.perCPU : 0, + one_cpu_max: this.formOld.perCPUs ? this.formOld.perCPUs : 0, + one_memory_min: this.formOld.perRAM ? this.formOld.perRAM : 0, + one_memory_max: this.formOld.perRAMs ? this.formOld.perRAMs : 0, }, disks: [ { - disk_num: this.formOld.dataDisk, - disk_cap: this.formOld.perDataDisk, + disk_num: this.formOld.dataDisk ? this.formOld.dataDisk + "" : "0", + disk_cap: this.formOld.perDataDisk ? this.formOld.perDataDisk + "" : "0", store_type: "nfs-client", }, ], remove_disks: this.delDataDiskList.map((item) => item.id), + payment: { + // total_money: this.total_money, + disk_single_money: String(this.disk_single_money), + eci_single_money: String(this.eci_single_money), + total_money: String(this.amounts_payable), + }, }; this.$api.serviceShop.updateCloud(query).then((response) => { if (response.data.success == 1) { -- 2.26.0