diff --git a/src/api/product/rule.js b/src/api/product/rule.js
index f2de650..4f2900f 100644
--- a/src/api/product/rule.js
+++ b/src/api/product/rule.js
@@ -34,6 +34,14 @@ export function updateRule(data) {
data: data
})
}
+// 修改规格 状态
+export function updateRuleInfoState(wyzRuleInfoSaveReq) {
+ return request({
+ url: '/product/ruleAttr/ruleInfoStateReq',
+ method: 'put',
+ data: wyzRuleInfoSaveReq
+ })
+}
// 删除商品规格
export function delRule(id) {
diff --git a/src/views/product/attributeGroup/index.vue b/src/views/product/attributeGroup/index.vue
index a60a205..a2263a6 100644
--- a/src/views/product/attributeGroup/index.vue
+++ b/src/views/product/attributeGroup/index.vue
@@ -81,6 +81,7 @@
+
-
>
diff --git a/src/views/product/category/index.vue b/src/views/product/category/index.vue
index e3d1b85..1108899 100644
--- a/src/views/product/category/index.vue
+++ b/src/views/product/category/index.vue
@@ -68,7 +68,7 @@
-
+
@@ -84,8 +84,10 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['product:category:edit']"
+
>修改
{
- this.categoryList = this.handleTree(response.data, "id", "parentId");
+ const idToName = response.data.reduce((acc, node) => {
+ acc[node.id] = node.name;
+ return acc;
+ }, {});
+ console.log(idToName);
+ const updatedTreeData = response.data.map(node => {
+ // 如果 parentId 为 null,说明没有父节点,不需要替换
+ const parentName = node.parentId !== null ? idToName[node.parentId] : null;
+ console.log(parentName);
+ return {
+ ...node,
+ parentIds: parentName
+ };
+ });
+ this.categoryList = this.handleTree(updatedTreeData, "id", "parentId");
this.loading = false;
});
},
diff --git a/src/views/product/rule/index.vue b/src/views/product/rule/index.vue
index 6d23546..81de9ea 100644
--- a/src/views/product/rule/index.vue
+++ b/src/views/product/rule/index.vue
@@ -65,6 +65,7 @@
+
{{ruleAttr.name}}
@@ -74,14 +75,30 @@
{{ruleAttr.valueList.toString()}}
-
-
+
+
+
+
+
+ >
+
+
+