From 72ed363ac39776e205205d498cd8d9d31d6ff447 Mon Sep 17 00:00:00 2001 From: mabo Date: Tue, 29 Jun 2021 18:13:58 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E6=9F=A5=E7=9C=8B=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/goods/goods-review/index.vue | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/manager/src/views/goods/goods-review/index.vue b/manager/src/views/goods/goods-review/index.vue index 3be73358..4f149a78 100644 --- a/manager/src/views/goods/goods-review/index.vue +++ b/manager/src/views/goods/goods-review/index.vue @@ -28,7 +28,7 @@ size="small" show-total show-elevator show-sizer> - +
@@ -58,12 +58,15 @@ -
+
评价图
- + + +
@@ -74,10 +77,13 @@
商家回复:
{{ infoData.reply }}
-
+
- + +
From 950b8a097cab14981e334e61b81a260f82cac684 Mon Sep 17 00:00:00 2001 From: mabo Date: Wed, 30 Jun 2021 09:45:36 +0800 Subject: [PATCH 02/15] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/goodsDetail/ShowGoodsDetail.vue | 2 +- buyer/src/components/verify/index.vue | 2 +- manager/src/views/goods/goods-info/goods.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoodsDetail.vue b/buyer/src/components/goodsDetail/ShowGoodsDetail.vue index d58f5a6e..647c0b69 100644 --- a/buyer/src/components/goodsDetail/ShowGoodsDetail.vue +++ b/buyer/src/components/goodsDetail/ShowGoodsDetail.vue @@ -92,7 +92,7 @@ {{param.paramName}}{{param.paramValue}} - +
暂无商品参数
diff --git a/buyer/src/components/verify/index.vue b/buyer/src/components/verify/index.vue index 39ecee85..eb6b7705 100644 --- a/buyer/src/components/verify/index.vue +++ b/buyer/src/components/verify/index.vue @@ -112,7 +112,7 @@ export default { handler: function (v) { this.type = v; } - }, + } } }; diff --git a/manager/src/views/goods/goods-info/goods.vue b/manager/src/views/goods/goods-info/goods.vue index 65a99b3d..7585a6cd 100644 --- a/manager/src/views/goods/goods-info/goods.vue +++ b/manager/src/views/goods/goods-info/goods.vue @@ -200,9 +200,9 @@ export default { width: 100, render: (h, params) => { if (params.row.marketEnable == "DOWN") { - return h("Tag", {props: {color: "green"},},"上架"); + return h("Tag", {props: {color: "volcano"},},"下架"); } else if (params.row.marketEnable == "UPPER") { - return h("Tag", {props: {color: "volcano",},},"下架"); + return h("Tag", {props: {color: "green",},},"上架"); } }, }, From 4340b1a5b7657d4b9cb994c105ebcd6eb63ab8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Wed, 30 Jun 2021 14:28:50 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB=EF=BC=8C=E9=9A=90=E8=97=8F=E6=B2=A1=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E6=A5=BC=E5=B1=82=E8=A3=85=E4=BF=AE=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/goods/goods-manage/category.vue | 117 +++++++++++------- .../src/views/lili-dialog/template/pages.vue | 9 +- 2 files changed, 77 insertions(+), 49 deletions(-) diff --git a/manager/src/views/goods/goods-manage/category.vue b/manager/src/views/goods/goods-manage/category.vue index deacb087..144de5d4 100644 --- a/manager/src/views/goods/goods-manage/category.vue +++ b/manager/src/views/goods/goods-manage/category.vue @@ -2,13 +2,8 @@
- 选择分类: - -
- + - +
@@ -132,19 +127,17 @@ import { saveCategorySpec, getCategoryTree, } from "@/api/goods"; -import TreeTable from "@/views/my-components/tree-table/Table/Table"; + import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; export default { name: "lili-components", components: { - TreeTable, uploadPicInput, }, data() { return { categoryList: [], // 分类列表 - sortCateList: [], //筛选出分类第一级 sortCate: "", //筛选的数据 loading: false, // 加载状态 selectCount: 0, // 选择数量 @@ -184,47 +177,44 @@ export default { { title: "分类名称", key: "name", - minWidth: "120px", + tree: true, }, { title: "状态", key: "deleteFlag", - headerAlign: "center", - type: "template", - template: "deleteFlag", + + slot: "deleteFlag", }, { - title: "佣金(%)", + title: "佣金", key: "commissionRate", - headerAlign: "center", - type: "template", - template: "commissionRate", + + slot: "commissionRate", }, { fixed: "right", title: "操作", key: "action", - align: "left", - headerAlign: "center", - type: "template", - template: "action", + + slot: "action", }, ], tableData: [], categoryIndex: 0, + checkedCategoryChildren: "", //选中的分类子级 }; }, methods: { - changeSortCate(val) { - let way = this.categoryList.find((item, index) => { - if (item.name == val) { - this.categoryIndex = index; - console.log((this.categoryIndex = index)); - return item.name == val; - } - }); - this.tableData = [way]; - }, + // changeSortCate(val) { + // let way = this.categoryList.find((item, index) => { + // if (item.name == val) { + // this.categoryIndex = index; + // console.log((this.categoryIndex = index)); + // return item.name == val; + // } + // }); + // this.tableData = [way]; + // }, init() { this.getAllList(0); this.getBrandList(); @@ -240,7 +230,6 @@ export default { getSpecList() { getSpecificationList().then((res) => { if (res.length != 0) { - this.specifications = res; } }); @@ -379,26 +368,64 @@ export default { }, }); }, + + // 异步手动加载分类名称 + handleLoadData(item, callback) { + console.warn(item); + if (item.level == 0) { + let categoryList = JSON.parse(JSON.stringify(this.categoryList)); + categoryList.forEach((val) => { + if (val.id == item.id) { + val.children.map((child) => { + child._loading = false; + child.children = []; + }); + // 模拟加载 + setTimeout(() => { + callback(val.children); + }, 1000); + } + }); + } else { + this.deepCategoryChildren(item.id, this.categoryList); + console.log(this.checkedCategoryChildren); + setTimeout(() => { + callback(this.checkedCategoryChildren); + }, 1000); + } + }, + + // 通过递归children来实现手动加载数据 + deepCategoryChildren(id, list) { + if (id != "0" && list.length != 0) { + for (let i = 0; i < list.length; i++) { + let item = list[i]; + if (item.id == id) { + this.checkedCategoryChildren = item.children; + return; + } else { + this.deepCategoryChildren(id, item.children); + } + } + } + }, + getAllList(parent_id) { - this.sortCateList = []; this.loading = true; getCategoryTree(parent_id).then((res) => { this.loading = false; if (res.success) { localStorage.setItem("category", JSON.stringify(res.result)); - res.result.forEach((e, index, arr) => { - this.sortCateList.push({ - label: e.name, - value: e.name, - }); - this.sortCate = arr[0].name; + this.categoryList = JSON.parse(JSON.stringify(res.result)); + this.tableData = res.result.map((item) => { + if (item.children.length != 0) { + item.children = []; + item._loading = false; + } + return item; }); - this.categoryList = res.result; - - this.$nextTick(() => { - this.$set(this, "tableData", [res.result[this.categoryIndex]]); - }); + console.log(this.tableData); } }); }, diff --git a/manager/src/views/lili-dialog/template/pages.vue b/manager/src/views/lili-dialog/template/pages.vue index 8a151a3f..659b83cf 100644 --- a/manager/src/views/lili-dialog/template/pages.vue +++ b/manager/src/views/lili-dialog/template/pages.vue @@ -1,10 +1,11 @@