Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 ca73f0cd
authored
Jan 10, 2021
by
shenpeng1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
dev: 修改编辑/保存后逻辑处理
1 parent
7139c4a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
linkwe-ui/src/views/material/poster.vue
linkwe-ui/src/views/material/poster.vue
View file @
ca73f0c
...
@@ -154,6 +154,7 @@ export default {
...
@@ -154,6 +154,7 @@ export default {
this
.
srcList
=
data
.
map
((
item
)
=>
item
.
materialUrl
)
this
.
srcList
=
data
.
map
((
item
)
=>
item
.
materialUrl
)
},
},
preview
(
url
)
{
preview
(
url
)
{
console
.
log
(
url
)
console
.
log
(
'preview'
,
url
)
console
.
log
(
'preview'
,
url
)
this
.
previewImg
=
url
||
''
this
.
previewImg
=
url
||
''
this
.
dialog
.
preview
=
true
this
.
dialog
.
preview
=
true
...
@@ -265,19 +266,25 @@ export default {
...
@@ -265,19 +266,25 @@ export default {
try
{
try
{
const
posterForm
=
this
.
posterForm
const
posterForm
=
this
.
posterForm
console
.
log
(
'save'
,
posterForm
.
id
)
console
.
log
(
'save'
,
posterForm
.
id
)
let
res
=
{}
if
(
posterForm
.
id
)
{
if
(
posterForm
.
id
)
{
// 编辑海报
// 编辑海报
const
res
=
await
updatePoster
(
Object
.
assign
({},
{
res
=
await
updatePoster
(
Object
.
assign
({},
{
backgroundImgPath
:
''
,
backgroundImgPath
:
'
http://106.13.236.58:8080/profile/2020/12/31/5ca3fa0b-55d7-433c-ba02-61d4502e45e1.jpg
'
,
posterSubassemblyList
:
[]
posterSubassemblyList
:
[]
},
this
.
posterForm
))
},
this
.
posterForm
))
}
else
{
}
else
{
// 新建海报
// 新建海报
const
res
=
await
addPoster
(
Object
.
assign
({},
{
res
=
await
addPoster
(
Object
.
assign
({},
{
backgroundImgPath
:
''
,
backgroundImgPath
:
'
http://106.13.236.58:8080/profile/2020/12/31/5ca3fa0b-55d7-433c-ba02-61d4502e45e1.jpg
'
,
posterSubassemblyList
:
[]
posterSubassemblyList
:
[]
},
this
.
posterForm
))
},
this
.
posterForm
))
}
}
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
res
.
msg
)
this
.
$refs
.
page
.
getList
(
1
)
this
.
beforeCloseDialog
()
}
// let res = {};
// let res = {};
// var list =[];
// var list =[];
// this.$refs.tuiImageEditor.editorInstance._invoker._undoStack.forEach(element => {
// this.$refs.tuiImageEditor.editorInstance._invoker._undoStack.forEach(element => {
...
@@ -379,7 +386,7 @@ export default {
...
@@ -379,7 +386,7 @@ export default {
</el-row>
</el-row>
<el-dialog
title=
"海报预览"
width=
"30%"
:visible
.
sync=
"dialog.preview"
>
<el-dialog
title=
"海报预览"
width=
"30%"
:visible
.
sync=
"dialog.preview"
>
<
el-image
class=
"preview-img"
:src=
"previewImg"
fit=
"contain"
></el-image
>
<
img
class=
"preview-img"
:src=
"previewImg"
/
>
</el-dialog>
</el-dialog>
<el-dialog
title=
"海报编辑"
width=
"80%"
:visible
.
sync=
"dialog.edit"
:before-close=
"beforeCloseDialog"
>
<el-dialog
title=
"海报编辑"
width=
"80%"
:visible
.
sync=
"dialog.edit"
:before-close=
"beforeCloseDialog"
>
<div
class=
"poster-edit-dialog"
>
<div
class=
"poster-edit-dialog"
>
...
...
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