From 6c5fbb6f0da30dc9b9d6b4d9c0d30a38d468ce28 Mon Sep 17 00:00:00 2001 From: 2812875475 <2812875475@qq.com> Date: Sat, 23 Mar 2024 09:04:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=B1=9E=E6=80=A7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouttest/index.vue | 19 +++++++++++++ src/router/index.js | 14 +++++++++ src/views/a/index.vue | 23 +++++++++++++++ src/views/product/productInfo/index.vue | 38 ++++++++++++++----------- 4 files changed, 78 insertions(+), 16 deletions(-) create mode 100644 src/layouttest/index.vue create mode 100644 src/views/a/index.vue diff --git a/src/layouttest/index.vue b/src/layouttest/index.vue new file mode 100644 index 0000000..e756531 --- /dev/null +++ b/src/layouttest/index.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/router/index.js b/src/router/index.js index 2afac71..1c8da96 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,7 @@ import Vue from 'vue' import Router from 'vue-router' /* Layout */ import Layout from '@/layout' +import Layouttest from "@/layouttest"; Vue.use(Router) @@ -73,6 +74,19 @@ export const constantRoutes = [ } ] }, + { + path: '', + component: Layouttest, + redirect: 'test', + children: [ + { + path: 'test', + component: () => import('@/views/a/index'), + name: 'Test', + meta: {title: "测试", icon: 'dashboard', affix: true} + } + ] + }, { path: '/user', component: Layout, diff --git a/src/views/a/index.vue b/src/views/a/index.vue new file mode 100644 index 0000000..f8fa94a --- /dev/null +++ b/src/views/a/index.vue @@ -0,0 +1,23 @@ + + + diff --git a/src/views/product/productInfo/index.vue b/src/views/product/productInfo/index.vue index ddb4fe5..9a312ea 100644 --- a/src/views/product/productInfo/index.vue +++ b/src/views/product/productInfo/index.vue @@ -286,12 +286,12 @@
属性组名称【{{ templateAttributeGroup.groupName }}】
-
- - - - - +
+ + + + +
@@ -299,7 +299,7 @@ - 商品属性 + 商品属性{{e}} @@ -313,7 +313,7 @@ - 自有属性 + 自有属性{{e}} @@ -520,8 +520,8 @@ export default { d:[], e:[ { - "name":null, - "value":null + "attributeId":0, + "value":"" } ], }; @@ -761,10 +761,18 @@ export default { this.reset(); const id = row.id || this.ids getInfo(id).then(response => { + console.log(response) + this.form = response.data; this.oneSettingValue=response.data.specification + this.e=[] - this.e=response.data.asProductAttributeInfo + this.e1=[] + this.e2=[] + this.e3=[] + this.e = response.data.asProductAttributeInfo.map(item => { + return { attributeId: item.attributeId, value: item.value }; + }); console.log(this.e) this.changeRule(response.data.ruleId) this.onSubmit() @@ -782,27 +790,25 @@ export default { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - this.selectAttribut() + this.selectAttribute() console.log(this.form) updateInfo(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); - this.form="" }); } else { - this.selectAttribut() + this.selectAttribute() addInfo(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); - this.form="" }); } } }); }, - selectAttribut(){ + selectAttribute(){ this.a=[] this.b=[] this.c=[]