diff --git a/template/admin/README.md b/template/admin/README.md index 2e10e71b2..b86a6365a 100644 --- a/template/admin/README.md +++ b/template/admin/README.md @@ -22,7 +22,7 @@ product 商品 ├─ product 商品管理 ├─ productList 商品管理目录 ├─ index.vue 首页 -├─ components 组件 +├─ components 组建 ├─ tableFrom.vue ├─ tableList.vue ├─ handle 操作功能页面目录 @@ -30,7 +30,7 @@ product 商品 ├─ productCategory 商品分类目录 ├─ index.vue 商品分类首页 -页面命名、组件、文件夹 命名格式小驼峰命名法,例如:用户列表 userList +页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList 类名函数命名 大驼峰式 例如:addUser 变量命名 小驼峰式 例如:user 或者 userInfo _userinfo user-info @@ -39,13 +39,13 @@ product 商品 ### 文件管理规范 pages 页面模块必须件文件夹区分 api 接口一个模块一个文件 -组件 一个组件一个文件夹 +组建 一个组建一个文件夹 plugins 插件一个插件一个文件夹 vuex 路由状态管理,一个模块在modules 中建一个文件夹 router 一个模块一个模块在modules 中建一个文件夹 -style 样式尽量采用iView自带组件,common.less 系统通用样式不要轻易动 +style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动 自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式 -组件样式 styles 中添加文件夹 composents 对应components 目录新建样式文件 +组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件 utils 自定义工具js 独立命名,一般不用新建文件夹 ## 模块命名 diff --git a/template/admin/package-lock.json b/template/admin/package-lock.json index 278581df5..0cf1b01fe 100644 --- a/template/admin/package-lock.json +++ b/template/admin/package-lock.json @@ -2454,32 +2454,96 @@ } } }, - "@form-create/core": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/@form-create/core/-/core-1.0.18.tgz", - "integrity": "sha512-DOHn9izm39M2B9BW1F7g/8wbOYlfLwpdHfoEHNl0qG2P78m7F8uO//TvbX9qO9byFuGTAST30LrAA1G8qPjQ5w==", + "@form-create/component-ivu-checkbox": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-checkbox/-/component-ivu-checkbox-2.5.27.tgz", + "integrity": "sha512-E29BvKCR1Ozu8AHAozFI2i2psKwuAx6BPPdoRP8nzgzLEgJbBTumReJttJeU8PMid/G+thi6Tn6Iz7uk2nnztw==", "requires": { - "@form-create/utils": "^1.0.15", - "vue": "^2.6.10" + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-ivu-frame": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-frame/-/component-ivu-frame-2.5.27.tgz", + "integrity": "sha512-GBDHSGuiJhp0Oq278Y9Q9Z2xwdTMxiaSWgWhhUB/VEVqLBOSr8UVhBsRKydbhg2CGhlgDaWjpHwO6gQYiNHLdw==", + "requires": { + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-ivu-group": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-group/-/component-ivu-group-2.5.27.tgz", + "integrity": "sha512-UEo64Mqp6ahWht+4TLpbQMwD1THofDLcWZyzCEU1e/ANQFLA9YlI3hoydQ+Iyh4Wb4dgOSwLiRJmeNpcKKn4EA==", + "requires": { + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-ivu-radio": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-radio/-/component-ivu-radio-2.5.27.tgz", + "integrity": "sha512-JWo8sbw4htg5aN6UxlCF3+abLclHjV5ar4N6qYDBmvFjI3gjKQxv7VN+g7S0TWvoS6ruI5/kUv1Xo3nt/Gx7Tg==", + "requires": { + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-ivu-select": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-select/-/component-ivu-select-2.5.27.tgz", + "integrity": "sha512-bZjwUmVUnCjzeZPYRBdWROY2ldcVntbYlHgK3hnA1e2whTbtVPSbhLtFheqCFKCoxZKLidNRQMJfyzWvgaoS4w==", + "requires": { + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-ivu-tree": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-tree/-/component-ivu-tree-2.5.27.tgz", + "integrity": "sha512-zraldTfO4QoJmxolovvSKqd0WQEYa7ZOU2+C8t93e4tN2rIHLnIFVJe4jz3ymgobOXLgyl17oHqZiW3C74k1Dw==", + "requires": { + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-ivu-upload": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/component-ivu-upload/-/component-ivu-upload-2.5.27.tgz", + "integrity": "sha512-yiRXvanqSkIklUVbcsBcct2rBb6FgUZ0frCRIOxMHeuSz4/OVVz/OK3S+d0x+EBcRfAwJYxbsIwaC3ybl9b28A==", + "requires": { + "@form-create/utils": "^2.5.27" + } + }, + "@form-create/component-subform": { + "version": "2.5.25", + "resolved": "https://registry.npmmirror.com/@form-create/component-subform/-/component-subform-2.5.25.tgz", + "integrity": "sha512-puGWWxSOeII4y4mCNxrKF/eH4nY1AQAx87VchzErLmemwF6TtNBLBsJLCCmFAVLYn1koYU5nNu5Y2yG9s2CKlQ==" + }, + "@form-create/core": { + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/core/-/core-2.5.27.tgz", + "integrity": "sha512-f2Lp1lW2YobviQbZzFspozQ5+7r2swx7l8ZiBjTj1X4OblGJBvRyg5tuFI2r/OlXr9+r9giDWXoKViPPdf1dIQ==", + "requires": { + "@form-create/utils": "^2.5.27" } }, "@form-create/iview": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/@form-create/iview/-/iview-1.0.18.tgz", - "integrity": "sha512-F+w7kziOIMh9nXrWP7sggxGYeD4hgcWYjnowRsDCkiMs29E1t4jZ18EdEknl07Iea6FVK3zhD2OuBbykchiK3g==", + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/iview/-/iview-2.5.27.tgz", + "integrity": "sha512-Yi3l84jPYIcYlZW5MGGQDJhDTdiEJW/ErYwrfoL1owr++cWEQlCpJmbh2toTowYR/gnGcdvA+TrYBEa4KTVLDA==", "requires": { - "@form-create/core": "^1.0.18", - "@form-create/utils": "^1.0.15", - "iview": "^3.3.3" + "@form-create/component-ivu-checkbox": "^2.5.27", + "@form-create/component-ivu-frame": "^2.5.27", + "@form-create/component-ivu-group": "^2.5.27", + "@form-create/component-ivu-radio": "^2.5.27", + "@form-create/component-ivu-select": "^2.5.27", + "@form-create/component-ivu-tree": "^2.5.27", + "@form-create/component-ivu-upload": "^2.5.27", + "@form-create/component-subform": "^2.5.25", + "@form-create/core": "^2.5.27", + "@form-create/utils": "^2.5.27" } }, "@form-create/utils": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/@form-create/utils/-/utils-1.0.15.tgz", - "integrity": "sha512-IK1U3RcYEucgvt0bt51/xXdzdj1ShRfZJhXywjcUtIXVyZlD/jbRdXaGOn7q9Mvq+9MuqEKwtmtCvP8cb3Qlyw==", - "requires": { - "vue": "^2.5.2" - } + "version": "2.5.27", + "resolved": "https://registry.npmmirror.com/@form-create/utils/-/utils-2.5.27.tgz", + "integrity": "sha512-QLzenitKzakxQ8bK8yFYd/9n4eT4E9jKkEneU0yhbjr0ter5uqguGGNJP7gI8waysRAS49VSjQOAY0b4l7mWvg==" }, "@gar/promisify": { "version": "1.1.3", diff --git a/template/admin/package.json b/template/admin/package.json index 7b5aaebe8..9c63199ff 100644 --- a/template/admin/package.json +++ b/template/admin/package.json @@ -5,6 +5,7 @@ "private": false, "scripts": { "serve": "vue-cli-service serve --open --mode=dev", + "dev": "vue-cli-service serve --open --mode=dev", "build": "vue-cli-service build --mode=production", "eslint:comment": "使用 ESLint 检查并自动修复 src 目录下所有扩展名为 .js 和 .vue 的文件", "eslint": "eslint --ext .js,.vue,.ts --ignore-path .gitignore --fix src", @@ -15,7 +16,7 @@ "@babel/polyfill": "^7.8.7", "@babel/runtime": "^7.2.0", "@better-scroll/core": "^2.0.5", - "@form-create/iview": "^1.0.18", + "@form-create/iview": "^2.5.27", "async-validator": "^3.4.0", "awe-dnd": "^0.3.4", "better-scroll": "^1.15.2", diff --git a/template/admin/src/api/export.js b/template/admin/src/api/export.js new file mode 100644 index 000000000..d0a0adbb8 --- /dev/null +++ b/template/admin/src/api/export.js @@ -0,0 +1,87 @@ +// +---------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +---------------------------------------------------------------------- +// | Author: CRMEB Team +// +---------------------------------------------------------------------- + +import request from '@/libs/request'; + +/** + * 用户列表导出 + */ +export function exportUserList(data) { + return request({ + url: '/export/user_list', + method: 'get', + params: data, + }); +} + +/** + * 订单列表导出 + */ +export function exportOrderList(data) { + return request({ + url: '/export/order_list', + method: 'get', + params: data, + }); +} + +/** + * 商品列表导出 + */ +export function exportProductList(data) { + return request({ + url: '/export/product_list', + method: 'get', + params: data, + }); +} + +/** + * 砍价列表导出 + */ +export function exportBargainList(data) { + return request({ + url: '/export/bargain_list', + method: 'get', + params: data, + }); +} + +/** + * 拼团列表导出 + */ +export function exportCombinationList(data) { + return request({ + url: '/export/combination_list', + method: 'get', + params: data, + }); +} + +/** + * 秒杀列表导出 + */ +export function exportSeckillList(data) { + return request({ + url: '/export/seckill_list', + method: 'get', + params: data, + }); +} + +/** + * 会员卡导出 + */ +export function exportmberCardList(id) { + return request({ + url: `/export/member_card/${id}`, + method: 'get', + }); +} \ No newline at end of file diff --git a/template/admin/src/components/customerInfo/index.vue b/template/admin/src/components/customerInfo/index.vue index 5ff394b20..5c9f8f87d 100644 --- a/template/admin/src/components/customerInfo/index.vue +++ b/template/admin/src/components/customerInfo/index.vue @@ -58,17 +58,21 @@