diff --git a/src/router/full-routers.js b/src/router/full-routers.js index d6adfa3..d2603f3 100644 --- a/src/router/full-routers.js +++ b/src/router/full-routers.js @@ -173,72 +173,59 @@ export default { }, ], }, - // { - // "menuId": getUUID(), - // "parentId": 0, - // "parentName": null, - // "name": "教务管理", - // "url": "local-affairs", - // "perms": "", - // "type": 0, - // "elIcon": "el-icon-office-building", - // "orderNum": 0, - // "open": null, - // list: [ - // { - // "menuId": getUUID(), - // "parentId": 2, - // "parentName": null, - // "name": "年级管理", - // "url": "local-affairs/grade", - // "perms": "", - // "type": 1, - // "icon": "log", - // "orderNum": 0, - // "open": null, - // "list": [] - // }, - // { - // "menuId": getUUID(), - // "parentId": 2, - // "parentName": null, - // "name": "班级管理", - // "url": "local-affairs/class", - // "perms": "", - // "type": 1, - // "icon": "log", - // "orderNum": 0, - // "open": null, - // "list": [] - // }, - // { - // "menuId": getUUID(), - // "parentId": 2, - // "parentName": null, - // "name": "教师管理", - // "url": "local-teacher/teacher", - // "perms": "", - // "type": 1, - // "icon": "log", - // "orderNum": 0, - // "open": null, - // "list": [] - // }, - // { - // "menuId": getUUID(), - // "parentId": 0, - // "parentName": null, - // "name": "学校管理", - // "url": "local-school/school", - // "perms": "", - // "type": 1, - // "elIcon": "el-icon-school", - // "orderNum": 0, - // "open": null, - // list: [] - // }, - // ] - // }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "数据中心", + url: "", + perms: "", + type: 0, + elIcon: "el-icon-tickets", + orderNum: 0, + open: null, + list: [ + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "客户分析", + url: "datacenter/customer-analysis/index", + perms: "", + type: 1, + elIcon: "el-icon-user", + orderNum: 0, + open: null, + list: [], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "商品分析", + url: "datacenter/product-analysis/index", + perms: "", + type: 1, + elIcon: "el-icon-data-analysis", + orderNum: 0, + open: null, + list: [], + }, + { + menuId: getUUID(), + parentId: 0, + parentName: null, + name: "订单统计分析", + url: "datacenter/order-analysis/index", + perms: "", + type: 1, + elIcon: "el-icon-shopping-cart-full", + orderNum: 0, + open: null, + list: [], + }, + ], + }, ], code: 0, permissions: [], diff --git a/src/views/modules/datacenter/customer-analysis/index.vue b/src/views/modules/datacenter/customer-analysis/index.vue new file mode 100644 index 0000000..7a20056 --- /dev/null +++ b/src/views/modules/datacenter/customer-analysis/index.vue @@ -0,0 +1,237 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/datacenter/order-analysis/index.vue b/src/views/modules/datacenter/order-analysis/index.vue new file mode 100644 index 0000000..08d4d97 --- /dev/null +++ b/src/views/modules/datacenter/order-analysis/index.vue @@ -0,0 +1,285 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/datacenter/product-analysis/index.vue b/src/views/modules/datacenter/product-analysis/index.vue new file mode 100644 index 0000000..6279d4c --- /dev/null +++ b/src/views/modules/datacenter/product-analysis/index.vue @@ -0,0 +1,242 @@ + + + + + \ No newline at end of file diff --git a/src/views/modules/presale/products/index.vue b/src/views/modules/presale/products/index.vue index ea73249..932c183 100644 --- a/src/views/modules/presale/products/index.vue +++ b/src/views/modules/presale/products/index.vue @@ -334,11 +334,47 @@ export default { { title: "预售价", align: "center", - field: "discountActivity", + field: "presalePrice", type: "jsx", - render: ({ row }) => { - if (row.discountActivity) { - return {row.discountActivity.ruleObject.discount}折; + render: ({ row }) => { + if ( + Math.min.apply( + Math, + row.productSpecificationList.map((item) => item.presalePrice) + ) == + Math.max.apply( + Math, + row.productSpecificationList.map((item) => item.presalePrice) + ) + ) { + return ( + + {Math.min.apply( + Math, + row.productSpecificationList.map( + (item) => item.presalePrice + ) + )} + + ); + } else { + return ( + + {Math.min.apply( + Math, + row.productSpecificationList.map( + (item) => item.presalePrice + ) + )} + 至 + {Math.max.apply( + Math, + row.productSpecificationList.map( + (item) => item.presalePrice + ) + )} + + ); } }, }, diff --git a/src/views/modules/presale/products/popup/add-or-update.vue b/src/views/modules/presale/products/popup/add-or-update.vue index c1c036a..ace4b01 100644 --- a/src/views/modules/presale/products/popup/add-or-update.vue +++ b/src/views/modules/presale/products/popup/add-or-update.vue @@ -20,8 +20,8 @@