Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 17606c52
authored
Mar 31, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第三轮bug修复
1 parent
9fb865eb
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
206 deletions
src/views/material/addMaterial.vue
src/views/material/components/addMaterialGroupDia.vue
src/views/material/components/functionIntroduc.vue
src/views/material/components/materialGroup.vue
src/views/material/components/staffSendDetail.vue
src/views/material/components/textBox.vue
src/views/material/index.vue
src/views/material/addMaterial.vue
View file @
17606c5
...
@@ -207,17 +207,17 @@ export default {
...
@@ -207,17 +207,17 @@ export default {
pdfUrl
:
''
,
pdfUrl
:
''
,
textBoxContent
:
''
,
textBoxContent
:
''
,
materialAddForm
:
{
materialAddForm
:
{
groupId
:
''
,
groupId
:
''
,
// 素材组id
groupName
:
''
,
groupName
:
''
,
materialName
:
''
,
materialName
:
''
,
// 素材名称
materialType
:
''
,
materialType
:
''
,
// 素材类型
materialUrl
:
''
,
materialUrl
:
''
,
// 素材链接
businessType
:
[],
businessType
:
[],
// 业务类型
isNotifySender
:
false
,
isNotifySender
:
false
,
// 是否通知发送人 0 是 -1 否
tagJson
:
[],
tagJson
:
[],
// 行为标签
materialTitle
:
''
,
materialTitle
:
''
,
// 分享标题
description
:
''
,
description
:
''
,
// 描述
titleUrl
:
''
titleUrl
:
''
// 封面
},
},
groupCounter
:
[],
groupCounter
:
[],
// 分享设置显示
// 分享设置显示
...
@@ -455,6 +455,7 @@ export default {
...
@@ -455,6 +455,7 @@ export default {
// }
// }
// })
// })
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
// status 状态 0 启用 -1 禁用 1 存草稿
params
.
status
=
0
params
.
status
=
0
// params.isNotifySender = -1
// params.isNotifySender = -1
// params.tagJson = JSON.stringify(tagging)
// params.tagJson = JSON.stringify(tagging)
...
...
src/views/material/components/addMaterialGroupDia.vue
View file @
17606c5
<
template
>
<
template
>
<div>
<div>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"720px"
:before-close=
"!dialogVisible"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
width=
"720px"
:before-close=
"!dialogVisible"
>
<el-form
ref=
"materialGroupAddForm"
:model=
"materialGroupAddForm"
label-width=
"110px"
:rules=
"materialGroupAddRules"
>
<el-form
ref=
"materialGroupAddForm"
:model=
"materialGroupAddForm"
@
submit
.
native
.
prevent
label-width=
"110px"
:rules=
"materialGroupAddRules"
>
<el-form-item
label=
"分组名称:"
prop=
"materialGroupName"
>
<el-form-item
label=
"分组名称:"
prop=
"materialGroupName"
>
<el-input
v-model=
"materialGroupAddForm.materialGroupName"
maxlength=
"8"
show-word-limit
:size=
"size"
placeholder=
"请输入分组名称"
style=
"width: 567px"
></el-input>
<el-input
v-model=
"materialGroupAddForm.materialGroupName"
maxlength=
"8"
show-word-limit
:size=
"size"
placeholder=
"请输入分组名称"
style=
"width: 567px"
@
keyup
.
enter
.
native=
"submitForm"
></el-input>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"业务类型:"
prop=
"businessType"
>
<!--
<el-form-item
label=
"业务类型:"
prop=
"businessType"
>
<el-checkbox-group
class=
"checkbox-group"
:max=
"3"
v-model=
"materialGroupAddForm.businessType"
>
<el-checkbox-group
class=
"checkbox-group"
:max=
"3"
v-model=
"materialGroupAddForm.businessType"
>
...
@@ -92,7 +92,7 @@ export default {
...
@@ -92,7 +92,7 @@ export default {
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialGroupAddForm
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialGroupAddForm
))
return
params
return
params
},
},
//
创建
//
提交创建素材组
submitForm
()
{
submitForm
()
{
this
.
$refs
.
materialGroupAddForm
.
validate
(
valid
=>
{
this
.
$refs
.
materialGroupAddForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
src/views/material/components/functionIntroduc.vue
View file @
17606c5
<
template
>
<
template
>
<div
class=
"introduct"
>
<div
class=
"introduct"
>
<el-dialog
title=
"功能介绍"
:visible
.
sync=
"introductionDialog"
width=
"1080px"
:before-close=
"handleClose"
>
<el-dialog
title=
"功能介绍"
:visible
.
sync=
"introductionDialog"
width=
"1080px"
:before-close=
"handleClose"
>
<p
class=
"note"
>
营销素材——将业务资料、经典案例、活动等以
链接、PDF形式上传在营销素材库中,企业成员可在企业微信聊天侧边栏或者嘀加企微管家工作台中,一键发给客户,支持雷达追踪,并将客户的阅读等关键行为记录到客户动态中,并给客户打上指定标签
。
</p>
<p
class=
"note"
>
营销素材——将业务资料、经典案例、活动等以
图文、PDF形式上传在营销素材中,企业成员可在企业微信聊天侧边栏或者嘀加企微管家工作台中一键发给客户。发送给客户的营销素材支持雷达追踪,将客户阅读行为记录到客户动态中,同时给客户打上指定标签并通知其对应的跟进员工
。
</p>
<h3>
我的优势
</h3>
<h3>
我的优势
</h3>
<p
class=
"list"
>
1、门店可以为不同的业务部门提供不同的营销素材,规范营销内容;
</p>
<p
class=
"list"
>
1、门店可以为不同的业务部门提供不同的营销素材,规范营销内容;
</p>
<p
class=
"list"
>
2、员工能便捷的在企业微信聊天侧边栏及嘀加企微管家工作台上直接使用营销素材,避免自己设计素材的烦恼;
</p>
<p
class=
"list"
>
2、员工能便捷的在企业微信聊天侧边栏及嘀加企微管家工作台上直接使用营销素材,避免自己设计素材的烦恼;
</p>
...
...
src/views/material/components/materialGroup.vue
View file @
17606c5
...
@@ -47,11 +47,12 @@ export default {
...
@@ -47,11 +47,12 @@ export default {
id
:
''
,
id
:
''
,
materialGroupName
:
''
,
materialGroupName
:
''
,
orderValue
:
''
,
orderValue
:
''
,
isDefault
:
''
isDefault
:
''
// 默认素材组 0 是 -1 否(进入页面如果素材组数量为0,就会创建默认素材组,默认素材组不可删除)
}
}
}
}
},
},
mounted
()
{
mounted
()
{
// 新建素材组
this
.
eventBus
.
$on
(
'addMaterialGroup'
,
data
=>
{
this
.
eventBus
.
$on
(
'addMaterialGroup'
,
data
=>
{
// data.businessType = data.businessType.toString()
// data.businessType = data.businessType.toString()
this
.
$apis
.
material
.
addMaterialGroup
(
data
).
then
(
res
=>
{
this
.
$apis
.
material
.
addMaterialGroup
(
data
).
then
(
res
=>
{
...
@@ -60,6 +61,7 @@ export default {
...
@@ -60,6 +61,7 @@ export default {
}
}
})
})
})
})
// 编辑素材组
this
.
eventBus
.
$on
(
'editMaterialGroup'
,
data
=>
{
this
.
eventBus
.
$on
(
'editMaterialGroup'
,
data
=>
{
// data.businessType = data.businessType.toString()
// data.businessType = data.businessType.toString()
this
.
$apis
.
material
.
editMaterialGroup
(
data
).
then
(
res
=>
{
this
.
$apis
.
material
.
editMaterialGroup
(
data
).
then
(
res
=>
{
...
@@ -109,9 +111,8 @@ export default {
...
@@ -109,9 +111,8 @@ export default {
if
(
!
row
.
orderTime
)
{
if
(
!
row
.
orderTime
)
{
var
date
=
new
Date
()
var
date
=
new
Date
()
var
stickDate
=
dayjs
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
var
stickDate
=
dayjs
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
params
.
orderTime
=
stickDate
params
.
orderTime
=
stickDate
// orderTime 排序时间
params
.
orderFlag
=
true
params
.
orderFlag
=
true
// orderFlag置顶标识 false 取消置顶 true 置顶或修改名称
console
.
log
(
params
)
this
.
secondConfirm
(
'提示'
,
'确定置顶该素材组吗?'
,
'material'
,
'editMaterialGroup'
,
params
)
this
.
secondConfirm
(
'提示'
,
'确定置顶该素材组吗?'
,
'material'
,
'editMaterialGroup'
,
params
)
return
return
}
}
...
@@ -133,6 +134,7 @@ export default {
...
@@ -133,6 +134,7 @@ export default {
})
})
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
this
.
getMaterialList
()
this
.
getMaterialList
()
// 素材组删除后素材列表刷新
this
.
$emit
(
'getListApi'
)
this
.
$emit
(
'getListApi'
)
}
}
})
})
...
...
src/views/material/components/staffSendDetail.vue
View file @
17606c5
<
template
>
<
template
>
<div>
<div>
<glsx-combi-form
ref=
"staffSendFormRef"
:formObj=
"searchForm"
:formData=
"staffSendFormData"
:inline=
"true"
>
<glsx-combi-form
ref=
"staffSendFormRef"
:formObj=
"searchForm"
:formData=
"staffSendFormData"
:inline=
"true"
>
<span
slot=
"footer"
slot-scope=
"scope"
class=
"select-pro"
>
<span
slot=
"footer"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"getListApi"
>
查询
</el-button>
<el-button
type=
"primary"
:size=
"size"
@
click=
"getListApi"
>
查询
</el-button>
<el-button
type=
"default"
:size=
"size"
@
click=
"handleReset(scope)"
>
重置
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<GLTable
ref=
"staffSendDetailRef"
:hasPage=
"false"
:tableData=
"sendStaffTableData"
@
sortChange=
"sortChange"
@
setTableFinishFun=
"setTableFinishFun"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
></GLTable>
<GLTable
ref=
"staffSendDetailRef"
:hasPage=
"false"
:tableData=
"sendStaffTableData"
@
sortChange=
"sortChange"
:beforeSearchFn=
"beforeSearchFn"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
></GLTable>
</div>
</div>
</
template
>
</
template
>
...
@@ -30,157 +29,13 @@ export default {
...
@@ -30,157 +29,13 @@ export default {
name
:
'employeeName'
,
name
:
'employeeName'
,
type
:
'input'
,
type
:
'input'
,
placeholder
:
'请输入姓名'
,
placeholder
:
'请输入姓名'
,
prefixIcon
:
'el-icon-search'
prefixIcon
:
'el-icon-search'
,
isClear
:
true
}
}
],
],
// getListApi: this.$apis.material.sendDetailPage,
// getListApi: this.$apis.material.sendDetailPage,
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
sendStaffTableData
:
[
sendStaffTableData
:
[],
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
3
,
readNumber
:
8
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
5
,
readNumber
:
5
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
},
{
id
:
'2'
,
employeeName
:
'kyd'
,
sendNumber
:
9
,
readNumber
:
6
,
readPeopleNumber
:
8
,
openRate
:
10
}
],
tableParams
:
{
tableParams
:
{
listName
:
'data'
,
listName
:
'data'
,
tableOption
:
false
,
tableOption
:
false
,
...
@@ -227,10 +82,7 @@ export default {
...
@@ -227,10 +82,7 @@ export default {
}
}
this
.
getListApi
()
this
.
getListApi
()
},
},
setTableFinishFun
()
{
// 排序
//接收到的数据为空
this
.
$refs
.
staffSendDetailRef
.
data
.
length
?
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
staffSendDetailRef
.
setTableHeightFun
()
},
sortChange
({
column
,
prop
,
order
})
{
sortChange
({
column
,
prop
,
order
})
{
order
===
'ascending'
?
(
this
.
searchForm
.
sort
=
2
)
:
(
this
.
searchForm
.
sort
=
1
)
order
===
'ascending'
?
(
this
.
searchForm
.
sort
=
2
)
:
(
this
.
searchForm
.
sort
=
1
)
prop
===
'sendNumber'
?
(
this
.
searchForm
.
sortValue
=
2
)
:
(
this
.
searchForm
.
sortValue
=
1
)
prop
===
'sendNumber'
?
(
this
.
searchForm
.
sortValue
=
2
)
:
(
this
.
searchForm
.
sortValue
=
1
)
...
@@ -242,12 +94,11 @@ export default {
...
@@ -242,12 +94,11 @@ export default {
},
},
getListApi
()
{
getListApi
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
this
.
$apis
.
material
.
sendDetailPage
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
sendDetailPage
(
params
).
then
(
res
=>
{
this
.
sendStaffTableData
=
res
this
.
sendStaffTableData
=
res
res
.
length
?
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
'230px'
)
:
this
.
$refs
.
staffSendDetailRef
.
setTableHeightFun
()
// 计算表格高度,数据10条以下自适应,10条以上固定高度,表格内滚动,无数据调用方法计算高度
// this.$refs.staffSendDetailRef.tableHeightValues = '100px'
res
.
length
?
(
res
.
length
>
10
?
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
'425px'
)
:
(
this
.
$refs
.
staffSendDetailRef
.
tableHeightValues
=
''
))
:
this
.
$refs
.
staffSendDetailRef
.
setTableHeightFun
()
//
this.$refs.staffSendDetailRef.tableHeightValues = '230px'
//
res.length > 10 ? (this.$refs.staffSendDetailRef.tableHeightValues = '425px') : (this.$refs.staffSendDetailRef.tableHeightValues = '')
})
})
}
}
}
}
...
...
src/views/material/components/textBox.vue
View file @
17606c5
...
@@ -28,7 +28,7 @@ export default {
...
@@ -28,7 +28,7 @@ export default {
this
.
editor
.
config
.
height
=
400
this
.
editor
.
config
.
height
=
400
this
.
editor
.
config
.
width
=
500
this
.
editor
.
config
.
width
=
500
this
.
editor
.
config
.
uploadVideoServer
=
'/api/upload-video'
this
.
editor
.
config
.
uploadVideoServer
=
'/api/upload-video'
this
.
editor
.
config
.
excludeMenus
=
[
'code'
]
this
.
editor
.
config
.
excludeMenus
=
[
'code'
,
'video'
]
this
.
editor
.
config
.
onchange
=
html
=>
{
this
.
editor
.
config
.
onchange
=
html
=>
{
// console.log(html);
// console.log(html);
this
.
content
=
html
// 绑定当前逐渐地值
this
.
content
=
html
// 绑定当前逐渐地值
...
@@ -56,7 +56,6 @@ export default {
...
@@ -56,7 +56,6 @@ export default {
})
})
// resultFiles 是 input 中选中的文件列表
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
// 上传图片,返回结果,将图片插入到编辑器中
}
}
}
}
...
...
src/views/material/index.vue
View file @
17606c5
...
@@ -14,10 +14,12 @@
...
@@ -14,10 +14,12 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"search-form"
>
<div
class=
"search-form"
>
<glsx-combi-form
ref=
"materialFormRef1"
:isEdit=
"isEdit"
:formObj=
"searchForm"
:formData=
"materialFormData"
:inline=
"true"
>
<glsx-combi-form
ref=
"materialFormRef1"
:isEdit=
"isEdit"
:formObj=
"searchForm"
:formData=
"materialFormData"
:inline=
"true"
>
<span
slot=
"footer"
slot-scope=
"scope"
class=
"select-pro"
>
<span
slot=
"footer"
slot-scope=
"scope"
>
<span
class=
"select-pro"
>
<el-button
type=
"primary"
:size=
"size"
@
click=
"getListApi"
>
查询
</el-button>
<el-button
type=
"primary"
:size=
"size"
@
click=
"getListApi"
>
查询
</el-button>
<el-button
type=
"default"
:size=
"size"
@
click=
"handleReset(scope)"
>
重置
</el-button>
<el-button
type=
"default"
:size=
"size"
@
click=
"handleReset(scope)"
>
重置
</el-button>
</span>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
</div>
</div>
<div
class=
"tabelList"
>
<div
class=
"tabelList"
>
...
@@ -119,20 +121,26 @@ export default {
...
@@ -119,20 +121,26 @@ export default {
url
,
url
,
eventBus
:
new
Vue
(),
eventBus
:
new
Vue
(),
searchForm
:
{
searchForm
:
{
groupId
:
''
,
groupId
:
''
,
// 素材组id
materialType
:
''
,
materialType
:
''
,
// 素材类型
businessType
:
''
,
businessType
:
''
,
// 业务类型
status
:
''
,
status
:
''
,
// 状态
materialName
:
''
materialName
:
''
// 素材名称
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
layout
:
'sizes, prev, pager, next, jumper, ->, total'
,
// 表格数据
materialTableData
:
[],
materialTableData
:
[],
// 创建&编辑素材组弹框
materialGroupDialog
:
false
,
materialGroupDialog
:
false
,
// 功能介绍弹框
introductionDialog
:
false
,
introductionDialog
:
false
,
boxHeight
:
''
,
boxHeight
:
''
,
// 表格高度
tableHeight
:
''
,
tableHeight
:
''
,
// 业务类型
businessTypes
:
[],
businessTypes
:
[],
// 素材组名称
materialGroupName
:
''
,
materialGroupName
:
''
,
materialFormData
:
[
materialFormData
:
[
{
{
...
@@ -335,14 +343,16 @@ export default {
...
@@ -335,14 +343,16 @@ export default {
}
}
]
]
},
},
// 获取素材总条数
tableTotal
:
0
tableTotal
:
0
}
}
},
},
mounted
()
{
mounted
()
{
// 计算素材组&素材展示表格容器高度
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
offTop
=
document
.
querySelector
(
'.tabelList'
).
offsetTop
let
offTop
=
document
.
querySelector
(
'.tabelList'
).
offsetTop
this
.
boxHeight
=
clientHeight
-
offTop
-
80
+
'px'
this
.
boxHeight
=
clientHeight
-
offTop
-
80
+
'px'
this
.
tableHeight
=
clientHeight
-
offTop
-
13
0
+
'px'
this
.
tableHeight
=
clientHeight
-
offTop
-
13
2
+
'px'
this
.
findAllDictData
(
'business_type'
)
this
.
findAllDictData
(
'business_type'
)
this
.
firstCome
()
this
.
firstCome
()
this
.
getListApi
()
this
.
getListApi
()
...
@@ -419,26 +429,6 @@ export default {
...
@@ -419,26 +429,6 @@ export default {
query
:
params
query
:
params
})
})
},
},
// 排序
// sortChange(sort) {
// // 获取字段名称和排序类型
// var fieldName = sort.prop
// var sortingType = sort.order
// //如果字段名称为“创建时间”,将“创建时间”转换为时间戳,才能进行大小比较
// if (fieldName == 'updatedTime') {
// this.materialTableData.map(item => {
// item.updatedTime = this.$moment(item.updatedTime).valueOf()
// })
// }
// //按照降序排序
// if (sortingType == 'descending') {
// this.materialTableData = this.materialTableData.sort((a, b) => b[fieldName] - a[fieldName])
// }
// //按照升序排序
// else {
// this.materialTableData = this.materialTableData.sort((a, b) => a[fieldName] - b[fieldName])
// }
// },
getParams
()
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
return
params
return
params
...
@@ -446,10 +436,10 @@ export default {
...
@@ -446,10 +436,10 @@ export default {
// 获取素材列表
// 获取素材列表
getTableList
(
params
)
{
getTableList
(
params
)
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'------------'
);
let
data
=
res
let
data
=
res
let
tableData
=
[]
let
tableData
=
[]
data
.
forEach
(
item
=>
{
data
.
forEach
(
item
=>
{
// 根据素材类型是图文还是pdf处理数据
if
(
item
.
materialType
!=
3
)
{
if
(
item
.
materialType
!=
3
)
{
item
.
materialContentRpcResponse
.
materialUrl
=
''
item
.
materialContentRpcResponse
.
materialUrl
=
''
}
}
...
@@ -471,6 +461,7 @@ export default {
...
@@ -471,6 +461,7 @@ export default {
// res.length ? (this.$refs.materialRef.tableHeightValues = this.tableHeight) : (this.$refs.materialRef.tableHeightValues = '230px')
// res.length ? (this.$refs.materialRef.tableHeightValues = this.tableHeight) : (this.$refs.materialRef.tableHeightValues = '230px')
})
})
},
},
// 获取所有素材
getListApi
()
{
getListApi
()
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
// params.pageSize = this.$refs.materialRef.page.pageSize
// params.pageSize = this.$refs.materialRef.page.pageSize
...
@@ -614,4 +605,8 @@ ul {
...
@@ -614,4 +605,8 @@ ul {
/
deep
/
.el-table
.descending
.sort-caret.descending
{
/
deep
/
.el-table
.descending
.sort-caret.descending
{
border-top-color
:
#5850ff
;
border-top-color
:
#5850ff
;
}
}
.select-pro
{
display
:
inline-block
;
padding-bottom
:
20px
;
}
</
style
>
</
style
>
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