Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
42a17a38
Commit
42a17a38
authored
Jul 06, 2022
by
dcy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
站内信
parent
32825519
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
4 deletions
+99
-4
internalMessage.js
src/api/system/internalMessage.js
+7
-0
index.vue
src/views/system/myInternalMessage/index.vue
+92
-4
No files found.
src/api/system/internalMessage.js
View file @
42a17a38
...
...
@@ -72,3 +72,10 @@ export function getNotReadInternalMessageTotal(){
}
)
}
export
function
getRedInternalMessage
(
query
){
return
request
({
url
:
'
/ecw/internal-message/redInternalMessage
'
,
method
:
'
get
'
,
params
:
query
,
})
}
src/views/system/myInternalMessage/index.vue
View file @
42a17a38
...
...
@@ -66,18 +66,50 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"viewMessage(scope.row)"
>
查看
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"deleteFn(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<el-dialog
title=
"站内信"
:visible.sync=
"dialogVisible"
width=
"50%"
>
<div
class=
"from"
>
<div
class=
"from-item"
>
<div
class=
"label"
>
标题:
</div>
<div
class=
"content"
>
{{publicObj.title}}
</div>
</div>
<div
class=
"from-item"
>
<div
class=
"label"
>
消息分类:
</div>
<div
class=
"content"
>
{{type[publicObj.type]}}
</div>
</div>
<div
class=
"from-item"
>
<div
class=
"label"
>
创建时间
</div>
<div
class=
"content"
>
{{parseTime(publicObj.createTime)}}
</div>
</div>
<div
class=
"from-item"
>
<div
class=
"label"
>
消息内容:
</div>
<div
class=
"content"
>
{{publicObj.content}}
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
关 闭
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getMyInternalMessagePage
}
from
"
@/api/system/internalMessage
"
;
import
{
getMyInternalMessagePage
,
getRedInternalMessage
,
deleteInternalMessage
}
from
"
@/api/system/internalMessage
"
;
let
type
=
{
1
:
'
订单消息
'
,
2
:
'
出货消息
'
,
3
:
'
提醒消息
'
,
}
export
default
{
name
:
"
MyInternalMessage
"
,
data
()
{
...
...
@@ -110,8 +142,16 @@ export default {
},
// 表单参数
form
:
{},
dialogVisible
:
false
,
publicObj
:{},
type
,
};
},
computed
:{
notMessage
()
{
return
this
.
$store
.
state
.
user
.
notMessage
;
}
},
created
()
{
this
.
getList
();
},
...
...
@@ -154,9 +194,57 @@ export default {
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
viewMessage
(
e
){
viewMessage
(
row
){
this
.
publicObj
=
row
;
this
.
dialogVisible
=
true
;
if
(
row
.
status
==
0
)
this
.
setNotMessage
(
row
.
id
)
},
setNotMessage
(
id
){
getRedInternalMessage
({
messageId
:
id
}).
then
(
r
=>
{
console
.
log
(
r
)
if
(
r
.
code
===
0
){
this
.
getList
()
let
num
=
Number
(
this
.
notMessage
);
this
.
$store
.
commit
(
'
NOt_MESSAGE
'
,
--
num
);
}
})
},
deleteFn
(
row
){
this
.
$confirm
(
`是否要删除id:[
${
row
.
id
}
]的站内信?`
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
deleteInternalMessage
(
row
.
id
).
then
(
r
=>
{
if
(
r
.
code
===
0
){
this
.
$message
({
type
:
'
success
'
,
message
:
'
删除成功!
'
});
this
.
getList
();
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'
已取消删除
'
});
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.from
{
.from-item
{
display
:
flex
;
margin
:
10px
0
;
.label
{
width
:
80px
;
}
.content
{
flex
:
1
;
}
}
}
</
style
>
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