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 e20d2c27
authored
Aug 30, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
内容管理添加展业助手相关功能
1 parent
82fa94b7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
184 additions
and
19 deletions
src/api/contentManager.js
src/views/contentManager/components/uploadPdf/index.vue
src/views/contentManager/contentAdd.vue
src/views/contentManager/contentDetail.vue
src/views/contentManager/contentManagerList.vue
src/api/contentManager.js
View file @
e20d2c2
...
@@ -40,12 +40,12 @@ export function exportStatisticsList(data) {
...
@@ -40,12 +40,12 @@ export function exportStatisticsList(data) {
// 新增内容
// 新增内容
export
function
addContent
(
data
)
{
export
function
addContent
(
data
)
{
data
.
method
=
`
${
path
}
material.record.add`
data
.
method
=
`
${
path
}
material.record.add`
return
request
(
data
)
return
request
(
data
,
"post"
)
}
}
// 编辑内容
// 编辑内容
export
function
updateContent
(
data
)
{
export
function
updateContent
(
data
)
{
data
.
method
=
`
${
path
}
material.record.update`
data
.
method
=
`
${
path
}
material.record.update`
return
request
(
data
)
return
request
(
data
,
"post"
)
}
}
// 获取会员权益/升级和积分商城 门店
// 获取会员权益/升级和积分商城 门店
...
@@ -101,3 +101,33 @@ export function contentManagerTaskById(data) {
...
@@ -101,3 +101,33 @@ export function contentManagerTaskById(data) {
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.getById`
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.getById`
return
request
(
data
,
"POST"
)
return
request
(
data
,
"POST"
)
}
}
// 获取接待场景
export
function
receptionSceneList
(
data
)
{
data
.
method
=
'dj.api.material.reception.scene.list'
return
request
(
data
,
"POST"
)
}
// 获取客户标签树
export
function
getLabelList
(
data
)
{
data
.
method
=
'dj.api.material.customer.label.list'
return
request
(
data
,
"POST"
)
}
// 单一商品
export
function
listAllInWithPage
(
data
)
{
data
.
method
=
'dj.api.smartcarlife.upgradeGoods.listAllInWithPage'
return
request
(
data
,
"POST"
)
}
// 套餐商品
export
function
allInPage
(
data
)
{
data
.
method
=
'dj.api.smartcarlife.merchantPackageGoodsInfo.allInPage'
return
request
(
data
,
"POST"
)
}
// 获取产品词条列表
export
function
productTextPage
(
data
)
{
data
.
method
=
'dj.api.material.product.text.page'
return
request
(
data
,
"POST"
)
}
src/views/contentManager/components/uploadPdf/index.vue
View file @
e20d2c2
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
size=
"small"
size=
"small"
icon=
"el-icon-puls"
icon=
"el-icon-puls"
key=
"btn-i"
key=
"btn-i"
:disabled=
"imageUrlArr.length"
:disabled=
"
!!
imageUrlArr.length"
@
click=
"selectFile()"
@
click=
"selectFile()"
>
上传文件
</el-button
>
上传文件
</el-button
>
>
...
...
src/views/contentManager/contentAdd.vue
View file @
e20d2c2
This diff is collapsed.
Click to expand it.
src/views/contentManager/contentDetail.vue
View file @
e20d2c2
This diff is collapsed.
Click to expand it.
src/views/contentManager/contentManagerList.vue
View file @
e20d2c2
...
@@ -6,8 +6,32 @@
...
@@ -6,8 +6,32 @@
ref=
"showSearch"
ref=
"showSearch"
class=
"show-search"
class=
"show-search"
:search-form=
"searchForm"
:search-form=
"searchForm"
:form-data=
"showFormData"
:form-data=
"showFormData"
>
>
<div
slot=
"customerLabel"
>
<el-select
v-model=
"searchForm.customerLabel"
clearable
value-key=
"labelId"
@
focus=
"focus('tag')"
placeholder=
"请选择"
>
<el-option-group
v-for=
"group in tagList"
:key=
"group.labelId"
:label=
"group.labelName"
>
<el-option
v-for=
"item in group.nextList"
:key=
"item.labelId"
:label=
"item.labelName"
:value=
"item"
>
</el-option>
</el-option-group>
</el-select>
</div>
<div
slot=
"receptionScene"
>
<el-select
v-model=
"searchForm.receptionScene"
clearable
value-key=
"id"
@
focus=
"focus('reception')"
placeholder=
"请选择"
>
<el-option
v-for=
"item in receptionSceneList"
:key=
"item.id"
:label=
"item.receptionSceneName"
:value=
"item"
>
</el-option>
</el-select>
</div>
</d2-search>
</d2-search>
<div
class=
"up-btns"
>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
handle
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
handle
>
...
@@ -34,11 +58,10 @@
...
@@ -34,11 +58,10 @@
</d2-table-header>
</d2-table-header>
<d2-table
<d2-table
ref=
"contentTable"
ref=
"contentTable"
:search-form=
"searchForm"
:search-form=
"searchForm
Search
"
:table-params=
"tableParams"
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
:before-search-fn=
"beforeSearchFn"
>
>
<div
slot=
"merchantSlot"
slot-scope=
"scope"
>
<div
slot=
"merchantSlot"
slot-scope=
"scope"
>
<div
v-if=
"scope.scope.showMerchant == 0"
>
全部门店
</div>
<div
v-if=
"scope.scope.showMerchant == 0"
>
全部门店
</div>
<el-popover
v-else
placement=
"top"
width=
"245"
trigger=
"hover"
>
<el-popover
v-else
placement=
"top"
width=
"245"
trigger=
"hover"
>
...
@@ -46,8 +69,7 @@
...
@@ -46,8 +69,7 @@
<div
<div
class=
"merchant-name"
class=
"merchant-name"
v-for=
"(item, index) in scope.scope.assignInfos || []"
v-for=
"(item, index) in scope.scope.assignInfos || []"
:key=
"index"
:key=
"index"
>
>
{{
item
.
assignName
}}
{{
item
.
assignName
}}
</div>
</div>
</div>
</div>
...
@@ -63,8 +85,7 @@
...
@@ -63,8 +85,7 @@
:style=
"
{
:style=
"
{
'background-color': statusEnum[scope.scope.status].color
'background-color': statusEnum[scope.scope.status].color
}"
}"
class="circle"
class="circle">
</span>
>
</span>
<span>
{{
statusEnum
[
scope
.
scope
.
status
].
name
}}
</span>
<span>
{{
statusEnum
[
scope
.
scope
.
status
].
name
}}
</span>
</div>
</div>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
...
@@ -128,7 +149,7 @@
...
@@ -128,7 +149,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
Util
,
deepClone
}
from
"@/common/util"
import
{
deepClone
}
from
"@/common/util"
import
{
import
{
CONTENT_TYPE_OPTIONS
,
CONTENT_TYPE_OPTIONS
,
SCENE_OPTIONS
,
SCENE_OPTIONS
,
...
@@ -140,7 +161,9 @@ import {
...
@@ -140,7 +161,9 @@ import {
getMerchantList
,
getMerchantList
,
getContenttList
,
getContenttList
,
batchOperaterContent
,
batchOperaterContent
,
delContent
delContentm
,
getLabelList
,
receptionSceneList
}
from
"@api/contentManager"
}
from
"@api/contentManager"
export
default
{
export
default
{
name
:
"ContentManagerList"
,
name
:
"ContentManagerList"
,
...
@@ -153,7 +176,8 @@ export default {
...
@@ -153,7 +176,8 @@ export default {
scene
:
""
,
scene
:
""
,
showChannel
:
""
,
showChannel
:
""
,
merchantId
:
""
,
merchantId
:
""
,
status
:
""
status
:
""
,
meal
:
''
},
},
showFormData
:
[
showFormData
:
[
{
{
...
@@ -179,7 +203,17 @@ export default {
...
@@ -179,7 +203,17 @@ export default {
optionList
:
[],
optionList
:
[],
optionId
:
"id"
,
optionId
:
"id"
,
optionLabel
:
"label"
,
optionLabel
:
"label"
,
optionsName
:
"sceneOptions"
optionsName
:
"sceneOptions"
,
changeAttr
:
(
value
,
targetItem
)
=>
{
console
.
log
(
value
)
if
(
value
!==
''
)
{
this
.
getLabelList
(
value
)
this
.
receptionList
(
value
)
}
else
{
this
.
tagList
=
[]
this
.
receptionSceneList
=
[]
}
}
},
},
{
{
label
:
"可见渠道"
,
label
:
"可见渠道"
,
...
@@ -206,6 +240,20 @@ export default {
...
@@ -206,6 +240,20 @@ export default {
optionId
:
"id"
,
optionId
:
"id"
,
optionLabel
:
"label"
,
optionLabel
:
"label"
,
optionsName
:
"statuslOptions"
optionsName
:
"statuslOptions"
},
{
label
:
"客户标签"
,
name
:
"customerLabel"
,
addHtml
:
"customerLabel"
},
{
label
:
"接待场景"
,
name
:
"receptionScene"
,
addHtml
:
"receptionScene"
// optionList: [],
// optionId: "id",
// optionLabel: "label",
// optionsName: "receptionSceneOptions"
}
}
],
],
// 基本数据
// 基本数据
...
@@ -217,6 +265,7 @@ export default {
...
@@ -217,6 +265,7 @@ export default {
},
},
tableSearchForm
:
{},
tableSearchForm
:
{},
getListApi
:
getContenttList
,
getListApi
:
getContenttList
,
searchFormSearch
:
{},
tableParams
:
{
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
"list"
,
listName
:
"list"
,
...
@@ -238,7 +287,8 @@ export default {
...
@@ -238,7 +287,8 @@ export default {
return
{
return
{
0
:
"图片"
,
0
:
"图片"
,
1
:
"视频"
,
1
:
"视频"
,
2
:
"PDF"
2
:
"PDF"
,
3
:
"富文本"
}[
cellValue
.
type
]
}[
cellValue
.
type
]
}
}
},
},
...
@@ -263,11 +313,36 @@ export default {
...
@@ -263,11 +313,36 @@ export default {
formatter
:
(
cellValue
)
=>
{
formatter
:
(
cellValue
)
=>
{
return
{
return
{
0
:
"培训资料"
,
0
:
"培训资料"
,
1
:
"营销素材"
1
:
"营销素材"
,
2
:
"展业助手"
}[
cellValue
.
showChannel
]
}[
cellValue
.
showChannel
]
}
}
},
},
{
{
label
:
"客户标签"
,
prop
:
"customerLabelInfoList"
,
width
:
"120px"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
customerLabelInfoList
&&
cellValue
.
customerLabelInfoList
.
length
>
0
?
cellValue
.
customerLabelInfoList
.
map
(
item
=>
item
.
labelName
).
join
(
","
)
:
'-'
}
},
{
label
:
"关联商品"
,
prop
:
"productPackageInfoList"
,
width
:
"200px"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
productPackageInfoList
&&
cellValue
.
productPackageInfoList
.
length
>
0
?
cellValue
.
productPackageInfoList
.
map
(
item
=>
item
.
upgradeGoodsName
).
join
(
","
)
:
'-'
}
},
{
label
:
'接待场景'
,
prop
:
"receptionSceneInfoList"
,
width
:
'120px'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
receptionSceneInfoList
&&
cellValue
.
receptionSceneInfoList
.
length
>
0
?
cellValue
.
receptionSceneInfoList
.
map
(
item
=>
item
.
receptionSceneName
).
join
(
","
)
:
'-'
}
},
{
label
:
"可见门店"
,
label
:
"可见门店"
,
prop
:
"showMerchant"
,
prop
:
"showMerchant"
,
width
:
"120px"
,
width
:
"120px"
,
...
@@ -295,10 +370,24 @@ export default {
...
@@ -295,10 +370,24 @@ export default {
prop
:
"createdDate"
prop
:
"createdDate"
}
}
]
]
},
// 客户档案相关内容
loading
:
false
,
mealList
:
[
{
upgradeGoodsName
:
'test1'
,
id
:
1
}
}
],
mealPage
:
{
pageSize
:
10
,
currentPage
:
1
},
mealTotal
:
0
,
tagList
:
[],
receptionSceneList
:
[]
}
}
},
},
mounted
()
{
mounted
()
{
var
params
=
{
currentPage
:
1
,
pageSize
:
2000
,
merchantIdName
:
""
}
var
params
=
{
currentPage
:
1
,
pageSize
:
2000
,
merchantIdName
:
""
}
this
.
getBaseData
()
this
.
getBaseData
()
...
@@ -345,13 +434,40 @@ export default {
...
@@ -345,13 +434,40 @@ export default {
for
(
const
key
in
this
.
searchForm
)
{
for
(
const
key
in
this
.
searchForm
)
{
this
.
searchForm
[
key
]
=
""
this
.
searchForm
[
key
]
=
""
}
}
this
.
tagList
=
[]
this
.
receptionSceneList
=
[]
this
.
$refs
.
contentTable
.
refreshTable
(
true
,
true
)
this
.
$refs
.
contentTable
.
refreshTable
(
true
,
true
)
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
this
.
searchFormSearch
=
this
.
getParams
()
resolve
()
resolve
()
})
})
},
},
getParams
()
{
console
.
log
(
this
.
searchForm
)
var
params
=
deepClone
(
this
.
searchForm
)
// if (params.meal) {
// params.meal = params.meal.join(',')
// }
if
(
params
.
customerLabel
)
{
params
.
customerLabelInfoList
=
[{
labelId
:
params
.
customerLabel
.
labelId
,
labelName
:
params
.
customerLabel
.
labelName
,
level
:
2
,
parentId
:
params
.
customerLabel
.
parentId
}]
delete
params
.
customerLabel
}
if
(
params
.
receptionScene
)
{
params
.
receptionSceneInfoList
=
[{
receptionSceneId
:
params
.
receptionScene
.
id
,
receptionSceneName
:
params
.
receptionScene
.
receptionSceneName
}]
delete
params
.
receptionScene
}
return
params
},
handleAdd
(
row
)
{
handleAdd
(
row
)
{
const
query
=
{}
const
query
=
{}
if
(
row
?.
id
)
{
if
(
row
?.
id
)
{
...
@@ -462,6 +578,25 @@ export default {
...
@@ -462,6 +578,25 @@ export default {
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
})
})
},
focus
(
name
)
{
console
.
log
(
this
.
searchForm
.
scene
)
if
(
this
.
searchForm
.
scene
===
''
)
{
return
this
.
$message
.
error
(
`请先选择业务场景`
)
}
// if (name == 'tag') {
// this.getLabelList(this.searchForm.scene)
// } else if (name == 'reception') {
// this.receptionList(this.searchForm.scene)
// }
},
// 获取接待场景
async
receptionList
(
scene
)
{
this
.
receptionSceneList
=
await
receptionSceneList
({
scene
})
},
// 获取客户标签
async
getLabelList
(
scene
)
{
this
.
tagList
=
await
getLabelList
({
scene
})
}
}
}
}
}
}
...
...
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