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 d4a6443a
authored
Apr 01, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增菜单
1 parent
af59fbf7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
421 additions
and
4 deletions
src/api/scene.js
src/router/modules/912_residentManage.js
src/views/residentManage/sceneClueManagement/detailView.vue
src/views/residentManage/sceneClueManagement/index.vue
src/views/residentManage/verbalTrickManagement/detailView.vue
src/views/residentManage/verbalTrickManagement/index.vue
src/api/scene.js
0 → 100644
View file @
d4a6443
import
request
from
"./request"
import
RequestMethods
from
"./request.methods"
// 主营品牌(旧接口)
export
function
getBrandList
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.common.car.brand.list`
return
request
(
data
,
RequestMethods
.
POST
)
}
// 业务列表
export
function
findAllLevelList
(
data
)
{
data
.
method
=
`dj.api.material.scenemarket.findAllLevel`
return
request
(
data
,
RequestMethods
.
POST
)
}
// 分页列表查询
export
function
getSceneData
(
data
)
{
data
.
method
=
`dj.api.material.scenemarket.sceneMarketLeadsPage`
return
request
(
data
,
RequestMethods
.
POST
)
}
// 列表导出
export
function
sceneExport
(
data
)
{
data
.
method
=
`dj.api.material.scenemarket.sceneMarketLeadsListExport`
return
request
(
data
,
RequestMethods
.
POST
)
}
// 详情
export
function
findSceneMarketLeadsById
(
data
)
{
data
.
method
=
`dj.api.material.scenemarket.findSceneMarketLeadsById`
return
request
(
data
,
RequestMethods
.
POST
)
}
src/router/modules/912_residentManage.js
View file @
d4a6443
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* @Description:
* @Description:
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-01 15:03:31
* @Date: 2024-04-01 15:03:31
* @LastEditors:
huyue
* @LastEditors:
'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 202
4-08-13 14:42:56
* @LastEditTime: 202
5-04-01 10:42:02
*/
*/
const
_import
=
require
(
"@/libs/util.import."
+
process
.
env
.
NODE_ENV
)
const
_import
=
require
(
"@/libs/util.import."
+
process
.
env
.
NODE_ENV
)
export
const
routerName
=
{
export
const
routerName
=
{
...
@@ -657,7 +657,7 @@ export const routerName = {
...
@@ -657,7 +657,7 @@ export const routerName = {
ruleObj
:
{
ruleObj
:
{
attr
:
"minPerformConfigStatus"
,
attr
:
"minPerformConfigStatus"
,
rule
:
{
rule
:
{
null
:
'启用'
,
null
:
"启用"
,
2
:
"启用"
,
2
:
"启用"
,
1
:
"禁用"
1
:
"禁用"
},
},
...
@@ -858,7 +858,7 @@ export const routerName = {
...
@@ -858,7 +858,7 @@ export const routerName = {
parentId
:
"91214"
,
parentId
:
"91214"
,
label
:
"删除"
,
label
:
"删除"
,
handle
:
"handleDelete"
handle
:
"handleDelete"
}
,
}
],
],
component
:
_import
(
"residentManage/growUpGrade/indexControl"
)
component
:
_import
(
"residentManage/growUpGrade/indexControl"
)
},
},
...
@@ -894,5 +894,79 @@ export const routerName = {
...
@@ -894,5 +894,79 @@ export const routerName = {
cache
:
false
cache
:
false
},
},
component
:
_import
(
"residentManage/promotionAndDmotion/index"
)
component
:
_import
(
"residentManage/promotionAndDmotion/index"
)
},
91218
:
{
path
:
"/sceneClueManagement"
,
name
:
"sceneClueManagement"
,
meta
:
{
title
:
"场景线索管理"
,
authId
:
"91218"
,
parentId
:
"912"
,
cache
:
false
},
auth
:
[
{
authId
:
"9121801"
,
parentId
:
"91218"
,
label
:
"详情"
,
handle
:
"handleDetail"
,
addRoutePath
:
[
{
authId
:
"912180101"
,
name
:
"详情"
,
parentId
:
"91218"
}
]
}
],
component
:
_import
(
"residentManage/sceneClueManagement/index"
)
},
912180101
:
{
path
:
"/inSceneConfigView"
,
name
:
"inSceneConfigView"
,
meta
:
{
title
:
"详情"
,
authId
:
"912180101"
,
parentId
:
"91218"
,
activePath
:
"/inSceneConfigView"
},
component
:
_import
(
"residentManage/sceneClueManagement/detailView"
)
},
91219
:
{
path
:
"/verbalTrickManagement"
,
name
:
"verbalTrickManagement"
,
meta
:
{
title
:
"话术管理"
,
authId
:
"91219"
,
parentId
:
"912"
,
cache
:
false
},
auth
:
[
{
authId
:
"9121901"
,
parentId
:
"91219"
,
label
:
"明细"
,
handle
:
"handleDetail"
,
addRoutePath
:
[
{
authId
:
"912190101"
,
name
:
"详情"
,
parentId
:
"91219"
}
]
}
],
component
:
_import
(
"residentManage/verbalTrickManagement/index"
)
},
912190101
:
{
path
:
"/inVerbalConfigView"
,
name
:
"inVerbalConfigView"
,
meta
:
{
title
:
"明细"
,
authId
:
"912190101"
,
parentId
:
"91219"
,
activePath
:
"/inVerbalConfigView"
},
component
:
_import
(
"residentManage/verbalTrickManagement/detailView"
)
}
}
}
}
src/views/residentManage/sceneClueManagement/detailView.vue
0 → 100644
View file @
d4a6443
<
template
>
<div>
详情
</div>
</
template
>
<
script
>
import
{
findSceneMarketLeadsById
}
from
"@/api/scene.js"
export
default
{
data
()
{
return
{
isFlag
:
false
,
id
:
this
.
$route
.
query
.
id
}
},
mounted
()
{
this
.
getDetail
()
},
methods
:
{
getDetail
()
{
findSceneMarketLeadsById
({
id
:
this
.
id
})
.
then
((
data
)
=>
{
this
.
isFlag
=
true
console
.
log
(
data
)
})
.
catch
((
err
)
=>
{
if
(
error
)
this
.
$message
.
error
(
error
)
})
}
}
}
</
script
>
<
style
></
style
>
\ No newline at end of file
\ No newline at end of file
src/views/residentManage/sceneClueManagement/index.vue
0 → 100644
View file @
d4a6443
<
template
>
<d2-container
class=
"customer-tags"
>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:label-width=
"'100px'"
:form-data=
"showFormData"
>
<template
slot=
"businessCode"
>
<el-cascader
v-model=
"searchForm.businessCode"
:options=
"baseData.businessTypeList"
:props=
"props"
@
change=
"handleChange"
></el-cascader>
</
template
>
</d2-search>
<div
class=
"up-btns"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<div
class=
"d2-container-content"
>
<d2-table-header
title=
"场景线索列表"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"exportTable"
>
导出
</el-button>
</d2-table-header>
<d2-table
ref=
"table"
:get-list-api=
"getListApi"
:search-form=
"searchFormSearch"
:table-params=
"tableParams"
:before-search-fn=
"beforeSearchFn"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<span
style=
"margin-right: 10px"
>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9121801']"
/>
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<
script
>
import
{
getBrandList
,
findAllLevelList
,
getSceneData
,
sceneExport
}
from
"@/api/scene.js"
import
{
Util
,
deepClone
}
from
"@/common/util"
export
default
{
data
()
{
return
{
getListApi
:
getSceneData
,
tableParams
:
{
listName
:
"list"
,
tableOption
:
{
width
:
"100"
},
tableColumns
:
[
{
label
:
"门店名称"
,
prop
:
"storeName"
},
{
label
:
"主营品牌"
,
prop
:
"storeBrand"
},
{
label
:
"业务分类"
,
prop
:
"businessCodeName"
},
{
label
:
"员工姓名"
,
prop
:
"createdBy"
},
{
label
:
"提报时间"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
createdDate
?
Util
.
dateFormate
(
cellValue
.
createdDate
,
"YYYY-MM-DD HH:mm:ss"
)
:
"-"
}
}
]
},
props
:
{
value
:
"code"
,
label
:
"directoryName"
,
children
:
"sceneMarketLevelTwoList"
},
searchFormSearch
:
{},
searchForm
:
{
storeName
:
""
,
businessCode
:
""
,
reportDate
:
[],
storeBrandId
:
""
,
createdBy
:
""
},
showFormData
:
[
{
label
:
"门店名称"
,
name
:
"storeName"
,
type
:
"input"
,
isClear
:
true
},
{
label
:
"主营品牌"
,
name
:
"storeBrandId"
,
type
:
"select"
,
// multiple: true,
isClear
:
true
,
optionList
:
[],
optionId
:
"id"
,
optionLabel
:
"label"
,
optionsName
:
"brandList"
},
{
label
:
"业务类型"
,
name
:
"businessCode"
,
type
:
"slot"
,
addHtml
:
"businessCode"
},
{
label
:
"员工姓名"
,
name
:
"createdBy"
,
type
:
"input"
,
isClear
:
true
},
{
label
:
"提报日期"
,
name
:
"reportDate"
,
type
:
"datePicker"
,
isClear
:
false
,
pickerOptions
:
"rangePickerOptions"
}
],
baseData
:
{
businessTypeList
:
[],
brandList
:
[]
}
}
},
mounted
()
{
this
.
initSelect
()
},
methods
:
{
handleDetail
(
data
)
{
console
.
log
(
"row"
,
data
)
this
.
$router
.
push
({
path
:
"/inSceneConfigView"
,
query
:
{
id
:
data
.
id
}
})
},
beforeSearchFn
(
type
=
1
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
if
(
this
.
searchForm
?.
reportDate
?.
length
)
{
let
[
startDate
,
endDate
]
=
this
.
searchForm
.
reportDate
this
.
searchFormSearch
.
startDate
=
Util
.
dateFormate
(
startDate
,
"YYYY-MM-DD"
)
this
.
searchFormSearch
.
endDate
=
Util
.
dateFormate
(
endDate
,
"YYYY-MM-DD"
)
}
delete
this
.
searchFormSearch
.
reportDate
resolve
()
})
},
handleSearch
()
{
this
.
page
=
this
.
$options
.
data
.
call
(
this
).
page
this
.
$refs
.
table
.
refreshTable
(
true
,
true
)
},
handleReset
()
{
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
this
.
handleSearch
()
},
async
exportTable
()
{
try
{
await
this
.
beforeSearchFn
()
const
res
=
await
sceneExport
({
...
this
.
searchFormSearch
})
if
(
res
)
window
.
open
(
res
)
}
catch
(
error
)
{
if
(
error
)
this
.
$message
.
error
(
error
)
}
},
initSelect
()
{
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise
.
allSettled
([
this
.
getBusinessTypeList
(),
this
.
getBrandList
()])
.
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
})
},
getBusinessTypeList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
findAllLevelList
({})
.
then
((
res
)
=>
{
this
.
baseData
.
businessTypeList
=
res
resolve
(
res
)
// 返回结果以便主流程感知
})
.
catch
((
err
)
=>
{
console
.
error
(
"Error in getBusinessTypeList:"
,
err
)
reject
(
err
)
// 捕获并传递错误
})
})
},
getBrandList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getBrandList
({})
.
then
((
res
)
=>
{
this
.
baseData
.
brandList
=
res
resolve
(
res
)
// 返回结果以便主流程感知
})
.
catch
((
err
)
=>
{
console
.
error
(
"Error in getBrandList:"
,
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
]
)
}
})
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/residentManage/verbalTrickManagement/detailView.vue
0 → 100644
View file @
d4a6443
File mode changed
src/views/residentManage/verbalTrickManagement/index.vue
0 → 100644
View file @
d4a6443
File mode changed
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