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 4318dffb
authored
Mar 15, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增页面修改
1 parent
4f674987
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
17 deletions
src/api/modules/material.js
src/views/material/addMaterial.vue
src/views/material/components/materialGroup.vue
src/views/material/index.vue
src/api/modules/material.js
View file @
4318dff
...
@@ -110,7 +110,8 @@ const materialEdit = params => {
...
@@ -110,7 +110,8 @@ const materialEdit = params => {
url
:
'rop-scrm-marketing/router'
,
url
:
'rop-scrm-marketing/router'
,
method
:
'post'
,
method
:
'post'
,
data
:
params
,
data
:
params
,
sign
:
true
sign
:
true
,
returnAll
:
true
})
})
}
}
...
...
src/views/material/addMaterial.vue
View file @
4318dff
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-divider></el-divider>
<el-divider></el-divider>
<el-form-item
v-if=
"routeInfo.addOrEdit == 1"
label=
"选择素材组:"
prop=
"selectMaterialGroup"
>
<el-form-item
v-if=
"routeInfo.addOrEdit == 1"
label=
"选择素材组:"
prop=
"selectMaterialGroup"
>
<el-select
v-model=
"materialAddForm.groupId"
placeholder=
"请选择"
:size=
"size"
>
<el-select
v-model=
"materialAddForm.groupId"
placeholder=
"请选择"
:size=
"size"
>
<el-option
v-for=
"item in groupCounter"
:key=
"item"
label=
"item.materialGroupName"
value=
"item.id"
></el-option>
<el-option
v-for=
"item in groupCounter"
:key=
"item"
:label=
"item.materialGroupName"
:
value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
v-else
label=
"选择素材组:"
>
<el-form-item
v-else
label=
"选择素材组:"
>
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
<div
class=
"mask"
>
<div
class=
"mask"
>
<h3>
<h3>
<img
src=
"@/assets/material/view.png"
alt=
""
>
<img
src=
"@/assets/material/view.png"
alt=
""
>
<img
src=
"@/assets/material/dele.png"
alt=
""
>
<img
src=
"@/assets/material/dele.png"
alt=
""
@
click=
"deleteImg"
>
</h3>
</h3>
</div>
</div>
</div>
</div>
...
@@ -206,6 +206,7 @@ export default {
...
@@ -206,6 +206,7 @@ export default {
groupId
:
''
,
groupId
:
''
,
materialName
:
''
,
materialName
:
''
,
materialType
:
''
,
materialType
:
''
,
materialUrl
:
''
,
businessType
:
[],
businessType
:
[],
isNotifySender
:
''
,
isNotifySender
:
''
,
tagJson
:
[],
tagJson
:
[],
...
@@ -219,8 +220,6 @@ export default {
...
@@ -219,8 +220,6 @@ export default {
link
:
''
link
:
''
},
},
fileList
:
[],
fileList
:
[],
// 富文本框内容
editInfo
:
''
,
// 分享设置显示
// 分享设置显示
descVisible
:
false
,
descVisible
:
false
,
// 手机显示
// 手机显示
...
@@ -245,7 +244,8 @@ export default {
...
@@ -245,7 +244,8 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
console
.
log
(
this
.
routeInfo
),
'1111'
;
console
.
log
(
this
.
routeInfo
,
'1111'
);
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getMaterialInfo
()
:
''
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
materialInsert
()
this
.
materialInsert
()
this
.
getMaterialList
()
this
.
getMaterialList
()
...
@@ -256,10 +256,18 @@ export default {
...
@@ -256,10 +256,18 @@ export default {
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialAddForm
))
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialAddForm
))
return
params
return
params
},
},
// 获取素材详情
getMaterialInfo
()
{
var
params
=
{}
params
.
id
=
this
.
routeInfo
.
id
this
.
$apis
.
material
.
materialDetail
(
params
).
then
(
res
=>
{
// console.log(res,'1212121212');
this
.
materialAddForm
=
res
})
},
// 获取全部素材组
// 获取全部素材组
getMaterialList
()
{
getMaterialList
()
{
this
.
$apis
.
material
.
getMaterialList
({}).
then
(
res
=>
{
this
.
$apis
.
material
.
getMaterialList
({}).
then
(
res
=>
{
console
.
log
(
res
);
this
.
groupCounter
=
res
this
.
groupCounter
=
res
})
})
},
},
...
@@ -267,7 +275,7 @@ export default {
...
@@ -267,7 +275,7 @@ export default {
materialInsert
()
{
materialInsert
()
{
var
params
=
{}
var
params
=
{}
params
.
isDefault
=
0
params
.
isDefault
=
0
this
.
$apis
.
material
.
materialInsert
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
addMaterialGroup
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
this
.
groupCounter
=
res
this
.
groupCounter
=
res
})
})
...
@@ -347,6 +355,7 @@ export default {
...
@@ -347,6 +355,7 @@ export default {
this
.
$refs
.
materialAddForm
.
validate
(
valid
=>
{
this
.
$refs
.
materialAddForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
console
.
log
(
params
,
'paramsw2wwww'
);
this
.
$apis
.
material
.
materialInsert
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
materialInsert
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
})
})
...
@@ -367,7 +376,7 @@ export default {
...
@@ -367,7 +376,7 @@ export default {
// 获取富文本框内容
// 获取富文本框内容
writeChange
(
val
)
{
writeChange
(
val
)
{
// console.log(val, '--content--');
// console.log(val, '--content--');
this
.
editInfo
=
val
this
.
materialAddForm
.
materialUrl
=
val
},
},
// 打开标签
// 打开标签
openLabel
()
{
openLabel
()
{
...
@@ -418,6 +427,10 @@ export default {
...
@@ -418,6 +427,10 @@ export default {
this
.
taggingList
=
arr
this
.
taggingList
=
arr
this
.
isUpdate
=
true
this
.
isUpdate
=
true
// this.$refs.selectLabel.init(this.tagging)
// this.$refs.selectLabel.init(this.tagging)
},
// 删除上传图片
deleteImg
()
{
this
.
materialAddForm
.
imageUrl
=
''
}
}
}
}
}
}
...
@@ -539,8 +552,9 @@ export default {
...
@@ -539,8 +552,9 @@ export default {
h3
{
h3
{
text-align
:
center
;
text-align
:
center
;
margin-top
:
30%
;
margin-top
:
30%
;
i
{
margin-left
:
2px
;
padding-left
:
10px
;
:last-child
{
padding-left
:
12px
}
}
}
}
}
}
...
...
src/views/material/components/materialGroup.vue
View file @
4318dff
...
@@ -86,7 +86,7 @@ export default {
...
@@ -86,7 +86,7 @@ export default {
params
.
groupId
=
item
.
id
params
.
groupId
=
item
.
id
params
.
pageNum
=
1
params
.
pageNum
=
1
params
.
pageSize
=
10
params
.
pageSize
=
10
this
.
$emit
(
'getList'
,
params
)
this
.
$emit
(
'getList'
,
params
,
item
.
materialGroupName
)
},
},
// 打开1-新增, 2-编辑 素材组弹框
// 打开1-新增, 2-编辑 素材组弹框
handleAddGroup
(
addOrEdit
,
value
)
{
handleAddGroup
(
addOrEdit
,
value
)
{
...
...
src/views/material/index.vue
View file @
4318dff
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</el-col>
</el-col>
<el-col
:span=
"19"
>
<el-col
:span=
"19"
>
<div
class=
"right"
:style=
"
{height: boxHeight}">
<div
class=
"right"
:style=
"
{height: boxHeight}">
<div
class=
"groupTitle"
>
{{
material
TableData
.
groupName
?
'materialTableData.groupName'
:
'新车素材组'
}}
(共
{{
materialTableData
.
length
}}
条数据)
</div>
<div
class=
"groupTitle"
>
{{
material
GroupName
?
materialGroupName
:
'新车素材组'
}}
(共
{{
materialTableData
.
length
}}
条数据)
</div>
<GLTable
ref=
"materialRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableData=
"materialTableData"
:pageConf=
"pageConf"
:tableTotal=
"tableTotal"
@
sortChange=
"sortChange"
:isCustomHead=
"true"
:customHeadShowList=
"customHeadShowList"
>
<GLTable
ref=
"materialRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableData=
"materialTableData"
:pageConf=
"pageConf"
:tableTotal=
"tableTotal"
@
sortChange=
"sortChange"
:isCustomHead=
"true"
:customHeadShowList=
"customHeadShowList"
>
<!-- 素材内容 -->
<!-- 素材内容 -->
<div
slot=
"materialContentRpcResponse"
slot-scope=
"scope"
>
<div
slot=
"materialContentRpcResponse"
slot-scope=
"scope"
>
...
@@ -105,6 +105,7 @@ export default {
...
@@ -105,6 +105,7 @@ export default {
boxHeight
:
''
,
boxHeight
:
''
,
businessTypes
:
[],
businessTypes
:
[],
getListApi
:
this
.
$apis
.
material
.
materialList
,
getListApi
:
this
.
$apis
.
material
.
materialList
,
materialGroupName
:
''
,
materialFormData1
:
[
materialFormData1
:
[
{
{
label
:
'业务类型:'
,
label
:
'业务类型:'
,
...
@@ -330,7 +331,6 @@ export default {
...
@@ -330,7 +331,6 @@ export default {
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
+
'px'
this
.
boxHeight
=
clientHeight
-
offTop
+
'px'
this
.
getMaterial
()
},
},
methods
:
{
methods
:
{
// 搜索
// 搜索
...
@@ -423,9 +423,9 @@ export default {
...
@@ -423,9 +423,9 @@ export default {
}
}
},
},
// 点击素材组获取素材组素材
// 点击素材组获取素材组素材
getList
(
params
)
{
getList
(
params
,
materialGroupName
)
{
this
.
materialGroupName
=
materialGroupName
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
this
.
$apis
.
material
.
materialList
(
params
).
then
(
res
=>
{
// console.log(res, '232424');
this
.
materialTableData
=
res
.
data
this
.
materialTableData
=
res
.
data
})
})
},
},
...
@@ -446,7 +446,7 @@ export default {
...
@@ -446,7 +446,7 @@ export default {
if
(
action
==
'confirm'
)
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
})
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
...
...
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