Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db_qms_wx
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
刘怀志
db_qms_wx
Commits
7fe1b9f8
Commit
7fe1b9f8
authored
Mar 18, 2025
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(消息): 消息模块-1
parent
3dd01d04
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
364 deletions
+63
-364
petmNotice.js
api/system/petmNotice.js
+7
-1
manifest.json
manifest.json
+1
-1
index.vue
pages/message/index.vue
+52
-71
index.vue
pages/mine/index.vue
+3
-291
No files found.
api/system/petmNotice.js
View file @
7fe1b9f8
...
...
@@ -8,7 +8,13 @@ export function listPetmNotice(query) {
params
:
query
})
}
export
function
sysMail
(
params
)
{
return
request
({
url
:
'/sysMail/queryByPagination'
,
method
:
'get'
,
params
})
}
// 查询消息详细
export
function
getPetmNotice
(
id
)
{
return
request
({
...
...
manifest.json
View file @
7fe1b9f8
{
"name"
:
"若依移动端"
,
"appid"
:
"__UNI__
25A9D80
"
,
"appid"
:
"__UNI__
A3D4D74
"
,
"description"
:
""
,
"versionName"
:
"1.1.0"
,
"versionCode"
:
"100"
,
...
...
pages/message/index.vue
View file @
7fe1b9f8
<
template
>
<view
style=
"background-color: #fff;height: 100vh"
>
<
ya-navbar
title=
"消息中心"
:left-icon=
"null"
bg-style=
"#fff"
:fixed=
"true"
:title-style=
"titleStyle
"
/>
<
mine-navbar
title=
"DHEC QMS
"
/>
<view
class=
"notice-container"
>
<!--顶部提示-->
<view
v-if=
"tipsShow"
class=
"topTips"
>
暂无可选消息
</view>
<!--顶部选择-->
<view
v-if=
"!checkShow && !delShow"
class=
"topContent"
>
<view
class=
"topSelect"
>
<u-subsection
:list=
"topSelectList"
:current=
"queryNotice.isRead"
mode=
"subsection"
inactive-color=
"#343744"
@
change=
"sectionChange"
/>
</view>
<view
class=
"topButton"
>
<span
v-if=
"queryNotice.isRead === 0"
@
click=
"toMark"
>
选择
</span>
<span
v-else
@
click=
"toDelete"
>
选择
</span>
</view>
</view>
<view
v-if=
"checkShow"
class=
"topContent_read"
>
<view
style=
"width: 20%;"
class=
"fontColor"
@
click=
"cancelMark"
>
取消
</view>
<view
style=
"text-align: right;width: 80%"
class=
"fontColor"
@
click=
"setRead"
>
标记已读
</view>
</view>
<view
v-if=
"delShow"
class=
"topContent_read"
>
<view
style=
"width: 20%"
class=
"fontColor"
@
click=
"cancelDel"
>
取消
</view>
<view
style=
"text-align: right;width: 80%"
class=
"fontColor"
@
click=
"setDel"
>
删除
</view>
<!--顶部选择-->
<view
class=
"top-tabs"
>
<u-tabs
:list=
"list1"
lineWidth=
"90"
lineColor=
"#333399"
:activeStyle=
"
{
color: '#333399',
}"
:inactiveStyle="{
color: '#111111'}"
@click="clickTabs"
>
</u-tabs>
</view>
<!--消息卡片-->
<view
v-for=
"(item,key) in noticeList"
:key=
"key"
style=
"display: flex;background-color: #ffffff"
>
<!--
<view
class=
"checkView"
v-show=
"checkShow"
>
-->
<view
v-if=
"checkShow"
class=
"checkView"
@
click=
"selectRead(item)"
>
<u-checkbox-group
v-model=
"item.checkStatus"
@
change=
"selectRead(item)"
>
<u-checkbox
...
...
@@ -68,11 +42,11 @@
<view
style=
"display: flex"
>
<u-icon
v-if=
"item.isPlatform === '1'"
size=
"24"
:name=
"imageUrl + '/tmt-pic/pet-app/xiaoxi_icon_tuisong@2x.png'"
/>
<u-icon
v-else
size=
"24"
:name=
"imageUrl + '/tmt-pic/pet-app/xiaoxi_icon_xitong@2x.png'"
/>
<view
class=
"titleClass"
>
{{
item
.
title
}}
</view>
<view
class=
"titleClass"
>
{{
queryNotice
.
mesType
===
'1'
?
'生产信息审批'
:
'基础数据审批'
}}
</view>
</view>
<view
class=
"subTitleClass"
>
{{
item
.
subtitl
e
}}
</view>
<view
class=
"subTitleClass"
>
{{
item
.
messag
e
}}
</view>
<view
class=
"timeClass"
>
{{
item
.
createTime
!==
undefined
&&
item
.
createTime
!==
null
?
parseTime
(
item
.
createTime
,
'{y
}
/{m
}
/{d
}
{h
}
:{i
}
'
)
:
'暂无数据'
}}
{{
item
.
updateDate
!==
undefined
&&
item
.
updateDate
!==
null
?
parseTime
(
item
.
updateDate
,
'{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
:
'暂无数据'
}}
<
/view
>
<
/view
>
<
/view
>
...
...
@@ -84,7 +58,7 @@
<
/view
>
<
view
style
=
"font-size: 26rpx;font-weight: 400;color: #666666;line-height: 30rpx;margin-top: 36rpx"
>
<
text
>
{{
queryNotice
.
isRead
===
0
?
'暂无未读消息'
:
'暂无已读
消息'
}}
{{
'暂无
消息'
}}
<
/text
>
<
/view
>
<
/view
>
...
...
@@ -109,14 +83,20 @@
<
/template
>
<
script
>
import
{
delPetmNotice
,
listPetmNotice
,
readPetmNotice
,
updatePetmNotice
}
from
'../../api/system/petmNotice'
import
{
delPetmNotice
,
listPetmNotice
,
readPetmNotice
,
sysMail
,
updatePetmNotice
}
from
'../../api/system/petmNotice'
import
{
parseTime
}
from
'../../api/utils/ruoyi'
import
{
imageUrl
}
from
'../../config'
import
MineNavbar
from
"../../components/mine-navbar/mineNavbar"
;
export
default
{
name
:
'Index'
,
components
:
{
MineNavbar
}
,
data
()
{
return
{
list1
:
[{
name
:
'基础数据审批'
,
}
,
{
name
:
'生产信息审批'
,
}
,
],
tipsShow
:
false
,
loading
:
true
,
checkShow
:
false
,
...
...
@@ -140,10 +120,10 @@ export default {
topSelectValue
:
0
,
defaultPageSize
:
10
,
queryNotice
:
{
page
Num
:
1
,
pageSize
:
10
,
page
:
1
,
rows
:
10
,
receiverId
:
undefined
,
isRead
:
0
mesType
:
'1'
}
,
noticeList
:
[],
total
:
0
,
...
...
@@ -160,31 +140,25 @@ export default {
readArrayId
:
[]
}
}
,
onShow
()
{
const
user
=
JSON
.
parse
(
uni
.
getStorageSync
(
'user'
))
console
.
log
(
'user'
,
user
)
this
.
queryNotice
.
receiverId
=
user
.
userId
created
()
{
this
.
getPetmNoticeList
()
// this.getUserOpenId()
}
,
methods
:
{
parseTime
,
sectionChange
(
index
)
{
this
.
queryNotice
.
isRead
=
index
clickTabs
(
item
)
{
this
.
queryNotice
.
mesType
=
item
===
'基础数据审批'
?
'1'
:
'2'
this
.
getPetmNoticeList
()
}
,
parseTime
,
getPetmNoticeList
()
{
this
.
loading
=
true
listPetmNotice
(
this
.
queryNotice
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
sysMail
(
this
.
queryNotice
).
then
(
res
=>
{
console
.
log
(
'消息列表'
,
res
)
this
.
noticeList
=
res
.
rows
this
.
total
=
res
.
total
if
(
this
.
queryNotice
.
pageSize
*
this
.
queryNotice
.
pageNum
>=
this
.
total
)
{
if
(
this
.
queryNotice
.
rows
*
this
.
queryNotice
.
page
>=
this
.
total
)
{
this
.
loadStatus
=
'nomore'
}
this
.
loading
=
false
}
}
)
}
,
toMark
()
{
...
...
@@ -234,10 +208,10 @@ export default {
}
,
onReachBottom
()
{
this
.
loadStatus
=
'loading'
if
(
this
.
queryNotice
.
pageSize
*
this
.
queryNotice
.
pageNum
>=
this
.
total
)
{
if
(
this
.
queryNotice
.
rows
*
this
.
queryNotice
.
page
>=
this
.
total
)
{
this
.
loadStatus
=
'nomore'
}
else
{
this
.
queryNotice
.
pageSize
+=
this
.
defaultPageSize
this
.
queryNotice
.
rows
+=
this
.
defaultPageSize
this
.
getPetmNoticeList
()
this
.
loadStatus
=
'loadmore'
}
...
...
@@ -383,8 +357,9 @@ export default {
}
.
notice
-
container
{
width
:
100
%
;
margin
-
top
:
542
rpx
;
background
-
color
:
#
fff
;
min
-
height
:
calc
(
100
vh
-
160
rpx
)
;
overflow
-
y
:
hidden
;
}
.
topContent
{
display
:
flex
;
...
...
@@ -511,20 +486,26 @@ export default {
margin
-
right
:
0
!
important
;
}
::
v
-
deep
.
u
-
line
-
1
{
font
-
size
:
24
rpx
!
important
;
font
-
family
:
Source
Han
Sans
CN
-
Regular
,
Source
Han
Sans
CN
;
font
-
weight
:
400
!
important
;
color
:
#
999
BA1
!
important
;
line
-
height
:
28
rpx
!
important
;
}
::
v
-
deep
.
u
-
loading
-
page__warpper__loading
-
icon__img
{
width
:
90
rpx
!
important
;
height
:
90
rpx
!
important
;
}
::
v
-
deep
.
u
-
navbar
--
fixed
{
background
-
color
:
#
fff
!
important
;
::
v
-
deep
.
u
-
tabs__wrapper__nav__item__text
{
font
-
family
:
PingFangSC
,
PingFang
SC
;
font
-
weight
:
500
;
font
-
size
:
28
rpx
;
}
.
top
-
tabs
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
margin
-
top
:
20
rpx
;
border
-
bottom
:
2
rpx
solid
#
F2F2F2
;
::
v
-
deep
.
u
-
tabs
{
width
:
60
%
;
}
}
//::v-deep .u-subsection
{
// background: black;
...
...
pages/mine/index.vue
View file @
7fe1b9f8
This diff is collapsed.
Click to expand it.
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