Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
a9c0f871
Commit
a9c0f871
authored
Nov 22, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(src\views\root\msg\index.vue): 修复消息管理查看消息弹出框样式问题
fix #200
parent
1cb0d6cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
36 deletions
+24
-36
index.vue
src/views/Root/Msg/index.vue
+24
-36
No files found.
src/views/Root/Msg/index.vue
View file @
a9c0f871
<
template
>
<div>
<p
class=
"
text-2xl font-bold mb-5"
>
消息管理
</p>
<p
class=
"text-2xl font-bold mb-5"
>
消息管理
</p>
<!-- 消息分类 -->
<span
class=
"
mr-3"
>
消息分类
</span>
<a-select
:default-value=
"1"
style=
"width: 120px; margin-right:
10px;
"
v-model=
"types"
>
<span
class=
"mr-3"
>
消息分类
</span>
<a-select
:default-value=
"1"
style=
"width: 120px; margin-right:
10px
"
v-model=
"types"
>
<a-select-option
v-for=
"type in msgType"
:key=
"type.value"
>
{{
type
.
label
}}
</a-select-option>
</a-select>
<!-- 操作 -->
<a-button
type=
"primary"
style=
"
margin-right:10px;
"
@
click=
"query"
>
查询
</a-button>
<a-button
type=
"primary"
style=
"
margin-right:10px;
"
@
click=
"publish"
>
新增
</a-button>
<a-button
type=
"primary"
style=
"
margin-right: 10px
"
@
click=
"query"
>
查询
</a-button>
<a-button
type=
"primary"
style=
"
margin-right: 10px
"
@
click=
"publish"
>
新增
</a-button>
<!-- 新增弹窗 -->
<a-modal
v-model=
"show"
title=
"新增消息"
:centered=
"true"
footer=
""
>
<a-form-model
...
...
@@ -36,14 +36,13 @@
</a-form-model-item>
<a-form-model-item
:wrapper-col=
"
{ span: 14, offset: 4 }">
<a-button
type=
"primary"
@
click=
"onSubmit"
>
确认
</a-button>
<a-button
style=
"margin-left: 10px
;
"
@
click=
"resetForm"
>
重置
</a-button>
<a-button
style=
"margin-left: 10px"
@
click=
"resetForm"
>
重置
</a-button>
</a-form-model-item>
</a-form-model>
</a-modal>
<!-- 内容弹窗 -->
<a-modal
v-model=
"visible"
title=
"查看内容"
@
ok=
"handleOk"
footer=
""
:centered=
"true"
>
<p
class=
" text-center text-lg"
>
{{
current
.
title
}}
</p>
<p
class=
" text-base"
>
{{
current
.
content
}}
</p>
<a-modal
v-model=
"visible"
:title=
"current.title"
@
ok=
"handleOk"
footer=
""
:centered=
"true"
>
<p
class=
"text-base text-center"
>
{{
current
.
content
}}
</p>
</a-modal>
<!-- 消息列表 -->
<a-table
...
...
@@ -51,7 +50,7 @@
:data-source=
"list"
rowKey=
"uuid"
:loading=
"tableLoading"
style=
"
text-align: center; margin-top:40px;
"
style=
"
text-align: center; margin-top: 40px
"
bordered
:pagination=
"pagination"
@
change=
"tableChange"
...
...
@@ -74,20 +73,12 @@
</span>
<!-- 操作 -->
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
v-if=
"record.notify_status == 1"
@
click=
"add(record)"
>
上架
</a>
<a
v-else
@
click=
"remove(record)"
>
下架
</a>
<a
v-if=
"record.notify_status == 1"
@
click=
"add(record)"
>
上架
</a>
<a
v-else
@
click=
"remove(record)"
>
下架
</a>
<a-divider
v-show=
"record.notify_status === 1"
type=
"vertical"
/>
<a
v-show=
"record.notify_status === 1"
@
click=
"onEdit(record)"
>
编辑
</a>
<a
v-show=
"record.notify_status === 1"
@
click=
"onEdit(record)"
>
编辑
</a>
<a-divider
v-show=
"record.notify_status === 1"
type=
"vertical"
/>
<a
v-if=
"record.notify_status == 1"
@
click=
"onDelete(record)"
>
删除
</a>
<a
v-if=
"record.notify_status == 1"
@
click=
"onDelete(record)"
>
删除
</a>
</span>
</a-table>
<!-- 操作Modal -->
...
...
@@ -99,7 +90,7 @@
@
ok=
"onOk"
@
cancle=
"show = false"
>
<p
class=
"
text-center"
>
{{
text
}}
</p>
<p
class=
"text-center"
>
{{
text
}}
</p>
</a-modal>
</div>
</
template
>
...
...
@@ -158,7 +149,7 @@ export default Vue.extend({
notify_status
:
0
,
notify_type
:
this
.
types
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
list
=
res
.
data
.
items
this
.
pagination
.
total
=
res
.
data
.
total
this
.
tableLoading
=
false
...
...
@@ -211,7 +202,7 @@ export default Vue.extend({
notify_status
:
status
,
uuid
:
this
.
uuid
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
message
.
success
(
msg
)
this
.
getList
()
...
...
@@ -219,7 +210,7 @@ export default Vue.extend({
})
},
removeNotify
()
{
notify
.
removeNotify
(
this
.
uuid
).
then
(
res
=>
{
notify
.
removeNotify
(
this
.
uuid
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
message
.
success
(
'删除成功'
)
this
.
getList
()
...
...
@@ -264,7 +255,7 @@ export default Vue.extend({
notify_type
:
this
.
form
.
type
,
title
:
this
.
form
.
title
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
message
.
success
(
'新增成功'
)
this
.
show
=
false
...
...
@@ -280,7 +271,7 @@ export default Vue.extend({
title
:
this
.
form
.
title
,
uuid
:
this
.
uuid
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
message
.
success
(
'编辑成功'
)
this
.
show
=
false
...
...
@@ -289,7 +280,7 @@ export default Vue.extend({
})
},
onSubmit
()
{
;(
this
.
$refs
.
ruleForm
as
FormModel
).
validate
(
valid
=>
{
;(
this
.
$refs
.
ruleForm
as
FormModel
).
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
btnType
===
'add'
)
{
this
.
addNotice
()
...
...
@@ -306,7 +297,7 @@ export default Vue.extend({
let
form
=
this
.
form
;(
form
.
title
=
''
),
(
form
.
content
=
''
)
type
formtype
=
keyof
typeof
form
Object
.
keys
(
this
.
form
).
forEach
(
m
=>
{
Object
.
keys
(
this
.
form
).
forEach
(
(
m
)
=>
{
// this.form[m as formtype] = ''
})
this
.
form
[
'type'
]
=
1
...
...
@@ -314,12 +305,9 @@ export default Vue.extend({
},
data
()
{
const
rules
=
{
// module: [
// { required: true, message: '请输入模板名称', trigger: 'blur' },
// ],
type
:
[{
required
:
true
,
message
:
'请选择消息分类'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'请输入消息标题'
,
trigger
:
'blur'
}],
content
:
[{
required
:
true
,
message
:
'请输入消息内容'
,
trigger
:
'blur'
}],
type
:
[{
required
:
true
,
message
:
'请选择消息分类'
}],
title
:
[{
required
:
true
,
message
:
'请输入消息标题'
}],
content
:
[{
required
:
true
,
message
:
'请输入消息内容'
}],
}
return
{
visible
:
false
,
...
...
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