Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
longhui_web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨硕
longhui_web
Commits
15c92254
Commit
15c92254
authored
Jun 28, 2023
by
杨硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改公告编辑回显问题
parent
5b0e15ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
24 deletions
+30
-24
index.vue
src/components/quilleditor/index.vue
+2
-2
activityadd.vue
src/views/activity/activityadd.vue
+2
-0
annoceaddorupdate.vue
src/views/announcements/annoceaddorupdate.vue
+3
-3
index.vue
src/views/announcements/index.vue
+23
-19
No files found.
src/components/quilleditor/index.vue
View file @
15c92254
...
@@ -74,7 +74,7 @@ export default {
...
@@ -74,7 +74,7 @@ export default {
toolbar
:
{
toolbar
:
{
container
:
toolbarOptions
,
container
:
toolbarOptions
,
handlers
:
{
handlers
:
{
image
:
function
(
value
)
{
image
:
function
(
value
)
{
if
(
value
)
{
if
(
value
)
{
// 调用element的图片上传组件
// 调用element的图片上传组件
document
.
querySelector
(
'.avatar-uploader input'
).
click
()
document
.
querySelector
(
'.avatar-uploader input'
).
click
()
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
created
()
{
created
()
{
// TODO: clear this log
// TODO: clear this log
console
.
log
(
`this.value`
,
this
.
value
)
console
.
log
(
`this.value`
,
this
.
value
,
this
.
type
)
// this.content = ''
// this.content = ''
if
(
this
.
type
===
'1'
||
this
.
type
===
'2'
)
{
if
(
this
.
type
===
'1'
||
this
.
type
===
'2'
)
{
this
.
content
=
this
.
value
this
.
content
=
this
.
value
...
...
src/views/activity/activityadd.vue
View file @
15c92254
...
@@ -271,6 +271,7 @@ export default {
...
@@ -271,6 +271,7 @@ export default {
}
else
if
(
this
.
type
===
1
)
{
}
else
if
(
this
.
type
===
1
)
{
this
.
form
=
this
.
$route
.
query
.
data
this
.
form
=
this
.
$route
.
query
.
data
this
.
style
=
this
.
$route
.
query
.
data
.
style
this
.
style
=
this
.
$route
.
query
.
data
.
style
this
.
isRestrictions
=
Number
(
this
.
$route
.
query
.
data
.
isRestrictions
)
this
.
imageUrl
=
baseURL
+
this
.
form
.
imgUrl
this
.
imageUrl
=
baseURL
+
this
.
form
.
imgUrl
this
.
richtexttype
=
'1'
this
.
richtexttype
=
'1'
this
.
formdisable
=
false
this
.
formdisable
=
false
...
@@ -278,6 +279,7 @@ export default {
...
@@ -278,6 +279,7 @@ export default {
}
else
if
(
this
.
type
===
2
)
{
}
else
if
(
this
.
type
===
2
)
{
this
.
form
=
this
.
$route
.
query
.
data
this
.
form
=
this
.
$route
.
query
.
data
this
.
style
=
this
.
$route
.
query
.
data
.
style
this
.
style
=
this
.
$route
.
query
.
data
.
style
this
.
isRestrictions
=
Number
(
this
.
$route
.
query
.
data
.
isRestrictions
)
this
.
imageUrl
=
baseURL
+
this
.
form
.
imgUrl
this
.
imageUrl
=
baseURL
+
this
.
form
.
imgUrl
this
.
richtexttype
=
'2'
this
.
richtexttype
=
'2'
this
.
formdisable
=
true
this
.
formdisable
=
true
...
...
src/views/announcements/annoceaddorupdate.vue
View file @
15c92254
<
template
>
<
template
>
<div
style=
"padding: 0 20px"
>
<div
style=
"padding: 0 20px"
>
<div
v-if=
"type === 0"
class=
"add-title"
>
新增
活动
</div>
<div
v-if=
"type === 0"
class=
"add-title"
>
新增
公告
</div>
<div
v-if=
"type === 1"
class=
"add-title"
>
编辑
活动
</div>
<div
v-if=
"type === 1"
class=
"add-title"
>
编辑
公告
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"公告标题"
prop=
"title"
>
<el-form-item
label=
"公告标题"
prop=
"title"
>
<el-input
v-model
.
trim=
"form.title"
:maxlength=
"30"
placeholder=
"请输入公告标题"
/>
<el-input
v-model
.
trim=
"form.title"
:maxlength=
"30"
placeholder=
"请输入公告标题"
/>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
announcementadd
,
announcementupdate
}
from
'@/api/announcement'
import
{
announcementadd
,
announcementupdate
,
queryannounceDetailById
}
from
'@/api/announcement'
import
quilleditor
from
'@/components/quilleditor'
import
quilleditor
from
'@/components/quilleditor'
export
default
{
export
default
{
name
:
'Annoceaddorupdate'
,
name
:
'Annoceaddorupdate'
,
...
...
src/views/announcements/index.vue
View file @
15c92254
...
@@ -68,8 +68,8 @@
...
@@ -68,8 +68,8 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"公告状态"
align=
"center"
prop=
"status"
>
<el-table-column
label=
"公告状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!--
<span
v-if=
"scope.row.status === 0"
style=
"color: #D84848 "
>
未发布
</span>
-->
<!--
<span
v-if=
"scope.row.status === 0"
style=
"color: #D84848 "
>
未发布
</span>
-->
<!--
<span
v-if=
"scope.row.status === 1"
style=
"color: #42AE5B"
>
已发布
</span>
-->
<!--
<span
v-if=
"scope.row.status === 1"
style=
"color: #42AE5B"
>
已发布
</span>
-->
<el-switch
<el-switch
:value=
"scope.row.status"
:value=
"scope.row.status"
class=
"switchDisabledStyle"
class=
"switchDisabledStyle"
...
@@ -104,15 +104,15 @@
...
@@ -104,15 +104,15 @@
type=
"text"
type=
"text"
@
click=
"handleDelete(scope.row)"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
>
删除
</el-button>
<!--
<el-switch-->
<!--
<el-switch-->
<!-- :value="scope.row.status"-->
<!-- :value="scope.row.status"-->
<!-- class="switchDisabledStyle"-->
<!-- class="switchDisabledStyle"-->
<!-- :active-value="1"-->
<!-- :active-value="1"-->
<!-- :inactive-value="0"-->
<!-- :inactive-value="0"-->
<!-- active-text="发布"-->
<!-- active-text="发布"-->
<!-- style="margin-left: 10px"-->
<!-- style="margin-left: 10px"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- />-->
<!-- />-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -170,7 +170,7 @@ import {
...
@@ -170,7 +170,7 @@ import {
announcementdel
,
announcementdel
,
announcementList
,
announcementList
,
announcementpublish
,
announcementpublish
,
announcementupdate
announcementupdate
,
queryannounceDetailById
}
from
'@/api/announcement'
}
from
'@/api/announcement'
export
default
{
export
default
{
...
@@ -219,8 +219,9 @@ export default {
...
@@ -219,8 +219,9 @@ export default {
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
page
:
1
,
page
:
1
,
rows
:
10
rows
:
10
},
},
data
:
{},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
// 表单校验
// 表单校验
...
@@ -332,12 +333,15 @@ export default {
...
@@ -332,12 +333,15 @@ export default {
// this.form = row
// this.form = row
// this.open = true
// this.open = true
// this.type = '1'
// this.type = '1'
this
.
$router
.
push
({
const
id
=
row
.
businessId
path
:
'/announcements/annoceaddorupdate'
,
queryannounceDetailById
(
id
).
then
(
res
=>
{
query
:
{
this
.
$router
.
push
({
type
:
1
,
path
:
'/announcements/annoceaddorupdate'
,
data
:
row
query
:
{
}
type
:
1
,
data
:
res
.
data
}
})
})
})
},
},
/** 提交按钮 */
/** 提交按钮 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment