Commit 19fd264f by qinjianhui

fix: 问题修改

parent 91661084
......@@ -301,6 +301,14 @@ export default {
icon: 'el-icon-box',
index: '/saas/import-template',
children: []
},
{
id: 12,
path: '',
label: '亚马逊属性分类',
icon: 'el-icon-s-check',
index: '/operation/amazonAttributeGrouping',
children: []
}
// {
// id: 11,
......@@ -344,14 +352,6 @@ export default {
children: []
},
{
id: 6_3,
path: '',
label: 'Amazon attribute grouping',
icon: 'el-icon-s-check',
index: '/operation/amazonAttributeGrouping',
children: []
},
{
id: 9,
path: '',
label: 'sql执行工具',
......
......@@ -47,7 +47,7 @@
v-for="item in shopList"
:key="item.id"
:label="item.shopName"
:value="item.marketplaceId"></el-option>
:value="item.id"></el-option>
</el-select>
</div>
<div class="category-title">
......@@ -315,13 +315,14 @@ export default {
currentGroupPropertiesMap() {
const groupedProperties = {}
const result = {}
Object.keys(this.dataGroupForm).forEach((key) => {
for (const key of Object.keys(this.dataGroupForm)) {
if (!this.dataGroupForm[key]) continue
result[this.dataGroupForm[key]] = {
...result[this.dataGroupForm[key]],
[key]: true
}
groupedProperties[key] = true
})
}
if (this.jsonSchema?.properties) {
const notGroupedProperties = Object.keys(this.jsonSchema.properties)
.filter((key) => !groupedProperties[key])
......@@ -436,12 +437,12 @@ export default {
lock: true
})
try {
// const find = this.shopList.find(
// (item) => item.marketplaceId === this.shopId
// )
const find = this.shopList.find(
(item) => item.id === this.shopId
)
const res = await get('amazon/category/getChildListByKeywords', {
keywords: this.keyWord,
marketplaceId: this.shopId
marketplaceId: find.marketplaceId
})
if (res.code !== 200) return
this.productTypeList = res.data.map((item) => {
......@@ -477,15 +478,12 @@ export default {
getCateAttrs(id, categoryFullPath, callback) {
if (!id || id.length === 0) return
if (Array.isArray(id)) id = id[id.length - 1]
const find = this.shopList.find(
(item) => item.marketplaceId === this.shopId
)
const loading = this.$loading({
lock: true
})
get('amazon/category/getAttributeByProductType', {
productType: id,
shopId: find.id
shopId: this.shopId
})
.then(async (res) => {
if (res.code !== 200) return
......@@ -562,19 +560,22 @@ export default {
})
},
async initCate(ids, callback) {
const shopId = this.shopList.find(
(item) => item.id === this.shopId
)?.marketplaceId
const loading = this.$loading({
lock: true
})
const arr = [
get('amazon/category/getChildListByBrowseNodeId', {
marketplaceId: this.shopId
marketplaceId: shopId
})
]
for (let i = 0; i < ids.length - 1; i++) {
arr.push(
get('amazon/category/getChildListByBrowseNodeId', {
browseNodeId: ids[i],
marketplaceId: this.shopId
marketplaceId: shopId
})
)
}
......@@ -609,12 +610,15 @@ export default {
},
lazyLoad(node, resolve) {
if (node.level === 0) return
const shopId = this.shopList.find(
(item) => item.id === this.shopId
)?.marketplaceId
if (node.children && node.children.length > 0) {
resolve([])
} else {
get('amazon/category/getChildListByBrowseNodeId', {
browseNodeId: node.value,
marketplaceId: this.shopId
marketplaceId: shopId
})
.then((res) => {
res.data.forEach((e) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment