From 07c218af6d604c5ea33cdb4d1d3ebef8e01b490e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 29 Apr 2024 17:17:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 +- src/api/product/type.js | 44 ++ src/router/index.js | 33 +- src/views/product/attributeGroup/1 | 301 +++++++++++ src/views/product/attributeGroup/index.vue | 9 +- src/views/product/brand/index.vue | 155 +++--- src/views/product/info/index.vue | 560 ++++++++++++--------- src/views/product/rule/index.vue | 53 +- src/views/product/type/index.vue | 302 +++++++++++ 9 files changed, 1126 insertions(+), 335 deletions(-) create mode 100644 src/api/product/type.js create mode 100644 src/views/product/attributeGroup/1 create mode 100644 src/views/product/type/index.vue diff --git a/package.json b/package.json index 6a46cc5..0a29f02 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "muyu", + "name": "ruoyi", "version": "3.6.3", "description": "若依管理系统", "author": "若依", @@ -33,7 +33,7 @@ ], "repository": { "type": "git", - "url": "https://gitee.com/y_project/MuYu-Cloud.git" + "url": "https://gitee.com/y_project/RuoYi-Cloud.git" }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", diff --git a/src/api/product/type.js b/src/api/product/type.js new file mode 100644 index 0000000..1c282c4 --- /dev/null +++ b/src/api/product/type.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询商品规格列表 +export function listType(query) { + return request({ + url: '/product/type/list', + method: 'get', + params: query + }) +} + +// 查询商品规格详细 +export function getType(id) { + return request({ + url: '/product/type/' + id, + method: 'get' + }) +} + +// 新增商品规格 +export function addType(data) { + return request({ + url: '/product/type', + method: 'post', + data: data + }) +} + +// 修改商品规格 +export function updateType(data) { + return request({ + url: '/product/type/'+data.id, + method: 'put', + data: data + }) +} + +// 删除商品规格 +export function delType(id) { + return request({ + url: '/product/type/' + id, + method: 'delete' + }) +} diff --git a/src/router/index.js b/src/router/index.js index 2afac71..47f1cec 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,10 +1,11 @@ import Vue from 'vue' import Router from 'vue-router' -/* Layout */ -import Layout from '@/layout' Vue.use(Router) +/* Layout */ +import Layout from '@/layout' + /** * Note: 路由配置项 * @@ -19,12 +20,12 @@ Vue.use(Router) * roles: ['admin', 'common'] // 访问路由的角色权限 * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限 * meta : { - noCache: true // 如果设置为true,则不会被 缓存(默认 false) - title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 - icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg - breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 - activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 - } + noCache: true // 如果设置为true,则不会被 缓存(默认 false) + title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 + icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg + breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 + activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 + } */ // 公共路由 @@ -69,7 +70,7 @@ export const constantRoutes = [ path: 'index', component: () => import('@/views/index'), name: 'Index', - meta: {title: '首页', icon: 'dashboard', affix: true} + meta: { title: '首页', icon: 'dashboard', affix: true } } ] }, @@ -83,7 +84,7 @@ export const constantRoutes = [ path: 'profile', component: () => import('@/views/system/user/profile/index'), name: 'Profile', - meta: {title: '个人中心', icon: 'user'} + meta: { title: '个人中心', icon: 'user' } } ] } @@ -101,7 +102,7 @@ export const dynamicRoutes = [ path: 'role/:userId(\\d+)', component: () => import('@/views/system/user/authRole'), name: 'AuthRole', - meta: {title: '分配角色', activeMenu: '/system/user'} + meta: { title: '分配角色', activeMenu: '/system/user' } } ] }, @@ -115,7 +116,7 @@ export const dynamicRoutes = [ path: 'user/:roleId(\\d+)', component: () => import('@/views/system/role/authUser'), name: 'AuthUser', - meta: {title: '分配用户', activeMenu: '/system/role'} + meta: { title: '分配用户', activeMenu: '/system/role' } } ] }, @@ -129,7 +130,7 @@ export const dynamicRoutes = [ path: 'index/:dictId(\\d+)', component: () => import('@/views/system/dict/data'), name: 'Data', - meta: {title: '字典数据', activeMenu: '/system/dict'} + meta: { title: '字典数据', activeMenu: '/system/dict' } } ] }, @@ -143,7 +144,7 @@ export const dynamicRoutes = [ path: 'index/:jobId(\\d+)', component: () => import('@/views/monitor/job/log'), name: 'JobLog', - meta: {title: '调度日志', activeMenu: '/monitor/job'} + meta: { title: '调度日志', activeMenu: '/monitor/job' } } ] }, @@ -157,7 +158,7 @@ export const dynamicRoutes = [ path: 'index/:tableId(\\d+)', component: () => import('@/views/tool/gen/editTable'), name: 'GenEdit', - meta: {title: '修改生成配置', activeMenu: '/tool/gen'} + meta: { title: '修改生成配置', activeMenu: '/tool/gen' } } ] } @@ -177,6 +178,6 @@ Router.prototype.replace = function push(location) { export default new Router({ mode: 'history', // 去掉url中的# - scrollBehavior: () => ({y: 0}), + scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) diff --git a/src/views/product/attributeGroup/1 b/src/views/product/attributeGroup/1 new file mode 100644 index 0000000..b262f9f --- /dev/null +++ b/src/views/product/attributeGroup/1 @@ -0,0 +1,301 @@ + + + diff --git a/src/views/product/attributeGroup/index.vue b/src/views/product/attributeGroup/index.vue index 4a3b7df..8d31128 100644 --- a/src/views/product/attributeGroup/index.vue +++ b/src/views/product/attributeGroup/index.vue @@ -73,7 +73,7 @@ - +