From f4f4824caf41205842e1f24523310b2c38b812fa Mon Sep 17 00:00:00 2001 From: sunshine7058 <2564255161@qq.com> Date: Wed, 6 Mar 2024 19:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E3=80=81=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E7=BB=84=E3=80=81=E5=93=81=E7=89=8C=E9=80=89=E6=8B=A9=E4=B8=BB?= =?UTF-8?q?=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product/attribute.js | 2 +- src/components/CheckAttribute/index.vue | 131 +++++++++++++++++++ src/components/CheckAttributeGroup/index.vue | 128 ++++++++++++++++++ src/components/CheckBrand/index.vue | 127 ++++++++++++++++++ src/main.js | 9 ++ src/views/product/attribute/index.vue | 38 ++---- src/views/product/attributeGroup/index.vue | 88 ++++++++++--- src/views/product/brand/index.vue | 2 +- src/views/product/category/index.vue | 76 +++++++---- src/views/product/comment/index.vue | 2 +- src/views/product/info/index.vue | 2 +- src/views/product/rule/index.vue | 2 +- src/views/system/config/index.vue | 2 +- src/views/system/dict/data.vue | 2 +- src/views/system/dict/index.vue | 2 +- src/views/system/post/index.vue | 2 +- src/views/system/role/index.vue | 4 +- src/views/tool/build/CodeTypeDialog.vue | 2 +- 18 files changed, 543 insertions(+), 78 deletions(-) create mode 100644 src/components/CheckAttribute/index.vue create mode 100644 src/components/CheckAttributeGroup/index.vue create mode 100644 src/components/CheckBrand/index.vue diff --git a/src/api/product/attribute.js b/src/api/product/attribute.js index 948166e..bc66f29 100644 --- a/src/api/product/attribute.js +++ b/src/api/product/attribute.js @@ -29,7 +29,7 @@ export function addAttribute(data) { // 修改商品属性 export function updateAttribute(data) { return request({ - url: '/product/attribute', + url: '/product/attribute/'+data.id, method: 'put', data: data }) diff --git a/src/components/CheckAttribute/index.vue b/src/components/CheckAttribute/index.vue new file mode 100644 index 0000000..47bc93f --- /dev/null +++ b/src/components/CheckAttribute/index.vue @@ -0,0 +1,131 @@ + + + diff --git a/src/components/CheckAttributeGroup/index.vue b/src/components/CheckAttributeGroup/index.vue new file mode 100644 index 0000000..07e011c --- /dev/null +++ b/src/components/CheckAttributeGroup/index.vue @@ -0,0 +1,128 @@ + + + diff --git a/src/components/CheckBrand/index.vue b/src/components/CheckBrand/index.vue new file mode 100644 index 0000000..9e15cb0 --- /dev/null +++ b/src/components/CheckBrand/index.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/main.js b/src/main.js index 546f125..48b928e 100644 --- a/src/main.js +++ b/src/main.js @@ -37,6 +37,12 @@ import DictTag from '@/components/DictTag' import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' +//属性选择 +import CheckAttribute from "@/components/CheckAttribute"; +//属性组选择 +import CheckAttributeGroup from "@/components/CheckAttributeGroup"; +//品牌选择 +import CheckBrand from "@/components/CheckBrand"; // 全局方法挂载 Vue.prototype.getDicts = getDicts @@ -57,6 +63,9 @@ Vue.component('Editor', Editor) Vue.component('FileUpload', FileUpload) Vue.component('ImageUpload', ImageUpload) Vue.component('ImagePreview', ImagePreview) +Vue.component('CheckAttribute', CheckAttribute) +Vue.component('CheckAttributeGroup', CheckAttributeGroup) +Vue.component('CheckBrand', CheckBrand) Vue.use(directive) Vue.use(plugins) diff --git a/src/views/product/attribute/index.vue b/src/views/product/attribute/index.vue index 6ae257a..53fbd7d 100644 --- a/src/views/product/attribute/index.vue +++ b/src/views/product/attribute/index.vue @@ -9,14 +9,6 @@ @keyup.enter.native="handleQuery" /> - - - 搜索 重置 @@ -71,9 +63,8 @@ - + -