Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d05a8137
authored
May 23, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改平板配置门店搜索
1 parent
dd3a6b16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
72 deletions
src/views/contentManager/packageConfig/EquityUpgrade.vue
src/views/contentManager/packageConfig/components/storeDialog.vue
src/views/contentManager/packageConfig/EquityUpgrade.vue
View file @
d05a813
...
...
@@ -69,7 +69,7 @@
</template>
<
script
>
import
{
deepClone
}
from
"@/common/util"
import
{
getConfigList
,
getCarbrandTree
,
getListShop4sByRef
,
deleteConfig
,
getMateralDetail
}
from
"@api/contentManager"
import
{
getConfigList
,
getCarbrandTree
,
deleteConfig
,
getMateralDetail
}
from
"@api/contentManager"
export
default
{
data
()
{
return
{
...
...
@@ -82,13 +82,13 @@ export default {
},
{
label
:
"门店"
,
name
:
"merchant
Id
"
,
type
:
"
selec
t"
,
isClear
:
true
,
optionList
:
[],
optionId
:
"merchantId"
,
optionLabel
:
"merchantName"
,
optionsName
:
"shopList"
name
:
"merchant
Name
"
,
type
:
"
inpu
t"
,
//
isClear: true,
//
optionList: [],
//
optionId: "merchantId",
//
optionLabel: "merchantName",
//
optionsName: "shopList"
},
],
searchFormSearch
:
{},
...
...
@@ -96,7 +96,6 @@ export default {
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
"list"
,
// tableOption: { width: '200px' },
tableOption
:
true
,
tableColumns
:
[
{
...
...
@@ -104,11 +103,6 @@ export default {
prop
:
"brandName"
,
addHtml
:
"brandName"
},
// {
// label: "子品牌",
// prop: "subBrandName",
// addHtml: "subBrandName"
// },
{
label
:
"关联门店"
,
prop
:
"merchantName"
,
...
...
@@ -128,7 +122,6 @@ export default {
}
},
mounted
()
{
this
.
initSelect
()
this
.
getCarbrandTree
()
},
methods
:
{
...
...
@@ -139,7 +132,6 @@ export default {
if
(
brandId
)
{
this
.
searchFormSearch
.
brandId
=
brandId
[
brandId
.
length
-
1
]
}
console
.
log
(
this
.
searchFormSearch
,
'=-==='
)
resolve
()
})
},
...
...
@@ -152,66 +144,11 @@ export default {
console
.
log
(
"this.searchForm"
,
this
.
searchForm
)
this
.
handleSearch
()
},
initSelect
()
{
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise
.
allSettled
([
this
.
getShopList
()])
.
then
((
results
)
=>
{
// 检查每个任务的结果
results
.
forEach
((
result
,
index
)
=>
{
if
(
result
.
status
===
"rejected"
)
{
console
.
error
(
`Task
${
index
}
failed:`
,
result
.
reason
)
}
})
// 统一调用 getOptionsList
this
.
getOptionsList
()
})
.
catch
((
err
)
=>
{
console
.
error
(
"Unexpected error in initSelect:"
,
err
)
this
.
getOptionsList
()
// 确保即使有意外错误也调用 getOptionsList
})
},
// 获取品牌树
async
getCarbrandTree
()
{
const
res
=
await
getCarbrandTree
()
this
.
options
=
res
},
getShopList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getListShop4sByRef
({})
.
then
((
res
)
=>
{
this
.
baseData
.
shopList
=
res
resolve
(
res
)
// 返回结果以便主流程感知
})
.
catch
((
err
)
=>
{
console
.
error
(
"Error in getListShop4sByRef:"
,
err
)
reject
(
err
)
// 捕获并传递错误
})
})
},
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
"select"
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
"全部"
)
{
// if (item.optionsName != "brandList") {
const
temp
=
{}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
""
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
"全部"
this
.
baseData
[
item
.
optionsName
].
unshift
(
temp
)
// }
}
this
.
$set
(
this
.
showFormData
[
index
],
"optionList"
,
this
.
baseData
[
item
.
optionsName
]
)
}
})
},
handleDialog
()
{
this
.
$router
.
push
({
name
:
"addEquity"
})
},
...
...
src/views/contentManager/packageConfig/components/storeDialog.vue
View file @
d05a813
...
...
@@ -131,7 +131,8 @@ export default {
const
_second
=
this
.
brandData
.
filter
(
item
=>
!
item
.
children
).
map
(
item
=>
item
.
id
)
const
params
=
{
// firstBrandIdList: _first,
secBrandIdList
:
_second
secBrandIdList
:
_second
,
scene
:
0
}
getCarBrandIds
(
params
).
then
((
res
)
=>
{
this
.
allData
=
deepClone
(
res
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment