From a8189653d91cdbfa86a176cfeec7dcff3349d7f2 Mon Sep 17 00:00:00 2001 From: liudianxin Date: Mon, 24 Aug 2020 17:43:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=88=E6=98=AF=E4=B8=80=E5=A0=86bug+?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/order-list/order-list-com.vue | 3 +- .../service-list/commodity-card.vue | 7 ++- .../service-list/service_shop_menu.vue | 18 +++--- src/components/shop-cloud/shop-cloud.vue | 59 ++++++++++++++++--- src/pages/user/user_info.vue | 6 +- src/pages/workbench/fwgl/cloud-detail.vue | 21 ++++--- 6 files changed, 83 insertions(+), 31 deletions(-) diff --git a/src/components/order-list/order-list-com.vue b/src/components/order-list/order-list-com.vue index 274ef1b..414628f 100644 --- a/src/components/order-list/order-list-com.vue +++ b/src/components/order-list/order-list-com.vue @@ -322,8 +322,7 @@ export default { .order_block .input_right .el-input--prefix .el-input__inner { padding-left: 40px; } -.order_block .input_right .el-input__prefix, -.el-input__suffix { +.order_block .input_right .el-input__prefix { left: 10px; } .order_block .input_right .el-input--prefix .el-input__inner { diff --git a/src/components/service-list/commodity-card.vue b/src/components/service-list/commodity-card.vue index 90c3361..62c8c1f 100644 --- a/src/components/service-list/commodity-card.vue +++ b/src/components/service-list/commodity-card.vue @@ -55,7 +55,7 @@ export default { is_subscribe: 0, // 是否订阅 }; this.$api.serviceShop - .addShoppingCart() + .addShoppingCart(query) .then(({ data }) => { if (data.success == 1) { this.$message({ @@ -108,6 +108,7 @@ export default { width: 60px; height: 60px; border-radius: 8px; + border: 3px solid #f6f7fb; } .com_card_msg { margin-top: 20px; @@ -133,7 +134,9 @@ export default { } .com_card_msg_num { color: #8890a7; - font-size: 16px; + font-size: 14px; + position: relative; + top: 2px; } .com_card_msg_num1 { color: #242c43; diff --git a/src/components/service-list/service_shop_menu.vue b/src/components/service-list/service_shop_menu.vue index 99c1444..8639b47 100644 --- a/src/components/service-list/service_shop_menu.vue +++ b/src/components/service-list/service_shop_menu.vue @@ -22,18 +22,18 @@ export default { data() { return { actives: "", - menuList: [] + menuList: [], }; }, computed: { getActive() { return this.$store.state.serviceShopMenu; - } + }, }, watch: { getActive(newVal) { this.getActiveMenu(newVal); - } + }, }, mounted() { this.getShopMenu(); @@ -43,22 +43,22 @@ export default { methods: { active(val) { this.$store.commit("serviceShopMenuAct", val); + this.$router.push(val); }, getActiveMenu(val) { this.actives = val; - this.$router.push(val); }, getShopMenu() { - this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { + this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => { if (response.data.success == 1) { let arr = response.data.data[0].Child; let shopArr = []; - arr.forEach(item => { + arr.forEach((item) => { if (item.visit_url == "/shop") { shopArr = item.Child; } }); - shopArr.forEach(item => { + shopArr.forEach((item) => { let uri = item.visit_url.substring(6); if (uri.indexOf("/") != -1) { uri = uri.substring(0, uri.indexOf("/")); @@ -101,8 +101,8 @@ export default { this.menuList = shopArr; } }); - } - } + }, + }, }; diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue index 97fcef7..92178b4 100644 --- a/src/components/shop-cloud/shop-cloud.vue +++ b/src/components/shop-cloud/shop-cloud.vue @@ -843,9 +843,12 @@ export default { data() { var checkName = (rule, value, callback) => { let self = this; - console.log(self); - if (new RegExp("^[a-z0-9]([0-9]||[a-z]||-)*$").test(value)) { - console.log(self); + let reg = new RegExp(/^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/); + if (value.length > 63) { + callback(new Error("命名空间最长不超过63位")); + } else if (!reg.test(value)) { + callback(new Error("小写字母或数字开头,可以由小写字母、数字、- 组成")); + } else { self.$api.serviceShop .checkNameSpaceCouldUse({ id: value }) .then(({ data }) => { @@ -861,8 +864,6 @@ export default { console.log(error); callback(new Error("命名空间名称验证失败")); }); - } else { - callback(new Error("小写字母或数字开头,可以由小写字母、数字、- 组成")); } }; return { @@ -1067,6 +1068,47 @@ export default { this.getNameSpaceList(); }, methods: { + getQueryId() { + if (this.$route.query.namespace && this.$route.query.namespace != "") { + this.activeName = "1"; + let index = this.workSpaceOptions.findIndex((item) => { + return item.namespace == this.$route.query.namespace; + }); + if (index != -1) { + let paramsOld = this.workSpaceOptions[index]; + this.workSpace = index; + this.workSpaceId = paramsOld.Id; + this.paramsOld = paramsOld; + this.formOld.namespace = paramsOld.namespace; + this.formOld.workplace = paramsOld.workplace; + this.formOld.workplacedesc = paramsOld.workplacedesc; + this.formOld.cpu = paramsOld.cpu; + this.formOld.memory = paramsOld.memory; + this.formOld.containerGroup = paramsOld.containers; + this.specArr[0].val = paramsOld.cpu; + this.specArr[1].val = paramsOld.memory; + this.specArr[2].val = paramsOld.containers; + this.formOld.dataDisk = ""; + this.formOld.perDataDisk = ""; + this.formOld.perCPUs = paramsOld.one_cpu_max; + this.formOld.perCPU = paramsOld.one_cpu_min; + this.formOld.perRAMs = paramsOld.one_memory_max; + this.formOld.perRAM = paramsOld.one_memory_min; + this.rqzArr[0].max = paramsOld.one_cpu_max; + this.rqzArr[0].default = paramsOld.one_cpu_min; + this.rqzArr[1].max = paramsOld.one_memory_max; + this.rqzArr[1].default = paramsOld.one_memory_min; + this.formOld.store_type = paramsOld.store_type; + this.dataDiskList = paramsOld.disk_list || []; + this.dataDiskList.forEach((item, index) => { + item.name = `磁盘${index + 1}`; + }); + this.form.link_man = paramsOld.apply_connect_username; + this.form.phone = paramsOld.apply_connect_mobile; + this.formShow = true; + } + } + }, tabClick() {}, getNewList(val) { console.log(val); @@ -1260,14 +1302,15 @@ export default { this.dialogVisible = false; }, getUser() { - this.form.department_name = this.$store.state.userInfo.department_name; - this.form.phone = ""; - this.form.link_man = ""; + this.$api.user.getNowUser().then((response) => { + this.form.department_name = response.data.data.department_name; + }); }, getNameSpaceList() { this.$api.serviceShop.getCloudList().then((response) => { if (response.data.success == 1) { this.workSpaceOptions = response.data.data; + this.getQueryId(); } }); }, diff --git a/src/pages/user/user_info.vue b/src/pages/user/user_info.vue index ffbfe0c..d6d2f37 100644 --- a/src/pages/user/user_info.vue +++ b/src/pages/user/user_info.vue @@ -13,7 +13,7 @@

账号:

- +

密码:

@@ -786,4 +786,8 @@ export default { background-color: #e8eaf4; color: #0f2683; } +.change_psw .el-input__suffix { + width: 20px; + right: 10px; +} \ No newline at end of file diff --git a/src/pages/workbench/fwgl/cloud-detail.vue b/src/pages/workbench/fwgl/cloud-detail.vue index e54b799..c1dd92c 100644 --- a/src/pages/workbench/fwgl/cloud-detail.vue +++ b/src/pages/workbench/fwgl/cloud-detail.vue @@ -171,8 +171,8 @@
当您觉得使用空间不足时,可以选择至服务超市- 云资源服务页面 云资源服务页面的升级现有工作区域来完成配置扩容操作。 @@ -248,7 +248,7 @@