新加消息列表页

test
zhangdi 1 year ago
parent e45691ea2d
commit f1e9b656aa
  1. 7
      pages.json
  2. 3
      pages/home/components/swiper.vue
  3. 149
      pages/home/index.vue
  4. 1
      pages/login/authInfo.vue
  5. 1
      pages/my/feedback.vue
  6. 1
      pages/my/my.vue
  7. 1
      pages/my/records.vue
  8. 187
      pages/notice/index.vue
  9. 1
      pages/submission/index.vue
  10. 20
      static/images/home/left.svg
  11. 22
      static/images/home/notice.svg
  12. 16
      static/images/home/right.svg
  13. 2
      static/scss/sp-components/index.scss

@ -9,6 +9,13 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/notice/index",
"style": {
"navigationBarTitleText": "消息中心",
"enablePullDownRefresh": false
}
}
],
"subPackages": [

@ -1,8 +1,7 @@
<template>
<view v-if="list.length>0">
<view class="work-title">实验室巡检</view>
<view class="notice_bg">
<view class="line"></view>
<swiper
autoplay="true"

@ -1,32 +1,41 @@
<template>
<view class="page-css">
<u-navbar :is-back="false" title="工作台">
<view slot="right" @click="goPage('/pages/notice/index')">
<u-badge size="mini" type="error" count="7"></u-badge>
<u-icon name="chat" size="60" color="#3a62d7" :is-center="true" style="padding-right: 20rpx;">
</u-icon>
</view>
</u-navbar>
<view class="">
<view class="banner-swiper" v-if="swiperList.length > 0">
<view class="logo-txt">科研医疗建筑运维平台</view>
<!-- <u-icon class="logo-scan" style="padding-right:12rpx" @click="scanCode" size="45" name="scan"></u-icon> -->
<!-- <u-swiper height="444" :list="swiperList" mode="none"></u-swiper> -->
<image :src="swiperList[0]" style="padding-right:12rpx;height:444rpx;width:100%"></image>
</view>
<view class="work-title">工作台</view>
<view class="workbench">
<view v-for="(item, index) in workList" :key="index" class="workbench-slider">
<view class="workbench-item" @click="goPage(item)">
<view class="workbench-item-icon">
<image :src="item.img" mode="aspectFit" />
<view class="menu_box">
<view class="menu_title">工作台</view>
<view class="menu_list clearfix">
<view class="item_box" @click="goPage('/pages/inspection/plan')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<view class="item_txt">巡检计划</view>
</view>
<view class="item_box" @click="goPage('/pages/submission/records?type=submission')">
<view class="item_img">
<image src="@/static/images/home/left.svg" mode="aspectFit" />
</view>
<u-badge class="badge" type="error" :count="item.num" :offset="[0, 0]"></u-badge>
<view class="item_txt">报送记录</view>
</view>
<view class="workbench-name">{{ item.name }}</view>
</view>
</view>
<view class="work-title">通知公告</view>
<view class="work-title">实验室巡检</view>
<swiperSlider></swiperSlider>
<view class="work-title">设备统计</view>
<view class="work-title">检修单状态</view>
<view>
<swiperSlider></swiperSlider>
</view>
<!-- <view class="work-title">设备报警</view> -->
<view>
<alarm></alarm>
</view>
<view class="work-title">维修统计</view>
<view class="statistics">
<eacharts :type="'maintenanceStatistics'"></eacharts>
@ -111,13 +120,13 @@ export default {
})
},
goPage(item) {
if (item.pagePath == '') {
uni.showToast({ title: "功能正在完善中,敬请期待!", icon: "none" });
} else {
uni.navigateTo({
url: item.pagePath,
});
}
// if (item.pagePath == '') {
// uni.showToast({ title: "", icon: "none" });
// } else {
uni.navigateTo({
url: item,
});
// }
},
scanCode() {
@ -140,7 +149,6 @@ export default {
width: 100%;
// min-height: 100%;
padding: 0;
background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height);
.banner-swiper {
@ -169,6 +177,7 @@ export default {
color: rgba(16, 16, 16, 1);
font-size: 32rpx;
padding: 0 0 32rpx 36rpx;
margin-top: 32rpx;
}
.workbench {
@ -219,5 +228,93 @@ export default {
.statistics_pie {
width: 100%;
}
.menu_box {
width: 100%;
background: #fff;
position: relative;
&::after {
content: '';
position: absolute;
height: 4rpx;
width: 100%;
background: #38D79F;
position: absolute;
top: 0;
left: 0;
}
.menu_title {
height: 100rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 100rpx;
text-align: left;
font-style: normal;
margin: 0 32rpx;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
height: 2rpx;
background: #f5f5f5;
width: 100%;
}
}
.menu_list {
padding-bottom: 32rpx;
margin-left: 32rpx;
margin-right: 32rpx;
margin-top: 24rpx;
.item_box {
width: 50%;
float: left;
&:nth-child(1) {
position: relative;
&::after {
content: '';
position: absolute;
width: 4rpx;
height: 100%;
background: #f5f5f5;
right: 20rpx;
top: 0;
}
}
.item_img {
width: 64rpx;
height: 64rpx;
float: left;
image {
width: 100%;
height: 100%;
}
}
.item_txt {
font-weight: 400;
font-size: 32rpx;
color: #333333;
line-height: 64rpx;
text-align: left;
font-style: normal;
padding-left: 20rpx;
float: left;
}
}
}
}
}
</style>

@ -110,7 +110,6 @@
width: 100%;
// min-height: 100%;
padding: 0;
background: rgba(239, 239, 239, 1);
padding-top: var(--status-bar-height);
.banner-swiper {
margin-bottom: 64rpx;

@ -135,7 +135,6 @@ export default {
</script>
<style lang="scss" scoped>
.page-css {
background: #efefef;
display: flex;
flex-direction: column;
.content {

@ -121,7 +121,6 @@ export default {
</script>
<style lang="scss" scoped>
.page-css {
background: #efefef;
padding: 0 0 32rpx 0;
height: 100vh;
.sp-my-new {

@ -138,7 +138,6 @@ export default {
<style lang="scss" scoped>
.page-css {
background: #efefef;
padding: 0 0 0 0;
display: flex;
flex-direction: column;

@ -0,0 +1,187 @@
<template>
<view class="notice-list">
<view @click="markReadAll" class="mark-read-btn">
<image src="@/static/images/home/notice.svg" alt="" />
一键标记为已读
</view>
<scroll-view scroll-y="true" style="height:calc(100vh - 140rpx);width: 100%;background: #F5F5F5;"
:refresher-triggered="triggered" :refresher-enabled="true" @refresherrefresh="refresherrefresh"
refresher-background="#f1f1f1" @scrolltolower="onListBottom">
<ul class="card">
<li v-for="(item, index) in dataList" :key="index" @click="jump(item)">
<view class="title">
<view class="text">
<view>{{ item.title }}</view>
<view class="mark" v-if="!item.readStatus"></view>
</view>
<view style="flex-shrink: 0;color: #999999;">{{ item.createdAt }}</view>
</view>
<view>
{{ item.content }}
</view>
</li>
</ul>
<view style=" line-height: 100rpx;">
<uni-load-more :status="scrollType"></uni-load-more>
</view>
</scroll-view>
</view>
</template>
<script>
// import requestName from '@/common/requestName'
export default {
name: 'NoticeList',
data() {
return {
dataList: [],
current: 0,
style: {
borderRadius: '100px',
background: '#fff',
padding: '0 32rpx'
},
search: {
pageNo: 1,
pageSize: 20,
readStatus: ''
},
scrollType: '',
triggered: false,
refreshNeed: false
}
},
onLoad(data) {
this.getList()
},
onShow() {
console.log(this.refreshNeed);
if (this.refreshNeed) {
this.reSearch()
}
},
methods: {
/**
* @description 全部设为已读
*/
markReadAll() {
// this.$wx_http.post(requestName['updateReadStatus'], [-1]).then(res => {
// if (res.code == 0) {
// this.reSearch()
// }
// })
},
getList() {
// this.$wx_http.get(requestName['pageNotice'], this.search).then(res => {
// let data = res.data.records
// this.scrollType = ''
// this.triggered = false
// if (data.length >= this.search.pageSize) {
// this.scrollType = 'more'
// }
// this.dataList = this.dataList.concat(data)
// })
},
reSearch() {
this.search.pageNo = 1
this.dataList = []
this.getList()
},
onListBottom() {
if (this.scrollType == 'more') {
this.search.pageNo += 1
this.getList()
}
},
onreachBottom() {
this.getDevicePage()
},
refresherrefresh() {
this.triggered = true
this.reSearch()
}
},
}
</script>
<style lang="scss" scoped>
.notice-list {
height: calc(100vh - 0px);
background: #F5F5F5;
overflow: hidden;
.mark-read-btn {
background: #FFFFFF;
border-radius: 8rpx;
border: 1px solid rgba(255, 255, 255, 0.43);
padding: 0;
margin: 24rpx 30rpx;
text-align: center;
height: 88rpx;
line-height: 88rpx;
font-size: 30rpx;
color: #FF8800;
display: flex;
justify-content: center;
align-items: center;
image {
width: 34rpx;
height: 32rpx;
display: block;
margin-right: 20rpx;
fill:#004BAA
}
}
.card {
margin: 0 16px;
list-style: none;
padding: 0;
li {
background: #FFFFFF;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.43);
padding: 12px 14px;
margin-bottom: 24rpx;
font-size: 28rpx;
.title {
border-bottom: 1px solid #F0F0F0;
display: flex;
justify-content: space-between;
padding-bottom: 10rpx;
margin-bottom: 15rpx;
.text {
font-size: 30rpx;
flex-grow: 1;
display: flex;
margin-right: 20rpx;
font-weight: 400;
color: #333333;
}
.mark {
width: 16rpx;
height: 16rpx;
background: #D9362D;
border-radius: 50%;
margin-left: 12rpx;
margin-top: 5rpx;
flex-shrink: 0;
}
}
}
}
}
</style>

@ -35,7 +35,6 @@ export default {
<style lang="scss" scoped>
.page-css {
background: #efefef;
display: flex;
flex-direction: column;

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon-点检任务@3x</title>
<g id="3.1.8移动端" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="工作台首页" transform="translate(-198.000000, -485.000000)">
<g id="设备点检任务卡片" transform="translate(15.000000, 422.000000)">
<g id="icon-点检任务" transform="translate(183.000000, 63.000000)">
<path d="M10.2555408,-4.14336123e-16 L21.7444592,4.14336123e-16 C25.3105342,-2.4074122e-16 26.6036791,0.371302445 27.9073828,1.06853082 C29.2110865,1.76575919 30.2342408,2.78891348 30.9314692,4.09261719 C31.6286976,5.39632089 32,6.68946584 32,10.2555408 L32,21.7444592 C32,25.3105342 31.6286976,26.6036791 30.9314692,27.9073828 C30.2342408,29.2110865 29.2110865,30.2342408 27.9073828,30.9314692 C26.6036791,31.6286976 25.3105342,32 21.7444592,32 L10.2555408,32 C6.68946584,32 5.39632089,31.6286976 4.09261719,30.9314692 C2.78891348,30.2342408 1.76575919,29.2110865 1.06853082,27.9073828 C0.371302445,26.6036791 1.60494146e-16,25.3105342 -2.76224082e-16,21.7444592 L2.76224082e-16,10.2555408 C-1.60494146e-16,6.68946584 0.371302445,5.39632089 1.06853082,4.09261719 C1.76575919,2.78891348 2.78891348,1.76575919 4.09261719,1.06853082 C5.39632089,0.371302445 6.68946584,2.4074122e-16 10.2555408,-4.14336123e-16 Z" id="矩形" fill="#38D79F"></path>
<g id="编组" transform="translate(6.000000, 6.000000)" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.833333333">
<line x1="14.1666667" y1="4.16666667" x2="17.5" y2="7.5" id="路径"></line>
<line x1="17.5" y1="4.16666667" x2="14.1666667" y2="7.5" id="路径"></line>
<polyline id="路径" points="18.3333333 12.5 15.4166667 15.8333333 13.75 14.1666667"></polyline>
<rect id="矩形" fill="#FFFFFF" fill-rule="nonzero" x="1.66666667" y="4.16666667" width="9.16666667" height="3.33333333"></rect>
<rect id="矩形" fill="#FFFFFF" fill-rule="nonzero" x="1.66666667" y="12.5" width="9.16666667" height="3.33333333"></rect>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="17px" height="16px" viewBox="0 0 17 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>标记已读 (1)</title>
<defs>
<filter id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 0.533333 0 0 0 0 0.000000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
<filter id="filter-2">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.400000 0 0 0 0 0.400000 0 0 0 0 0.400000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="3.1.8移动端" stroke="none" stroke-width="1" fill-rule="evenodd">
<g id="编组" transform="translate(-122.000000, -133.000000)" filter="url(#filter-1)">
<g transform="translate(122.000000, 131.000000)" filter="url(#filter-2)" id="标记已读-(1)">
<g transform="translate(-0.000000, 2.000000)">
<path d="M8.37696335,10.4081424 C7.82912206,10.4084688 7.29851125,10.2166781 6.87748691,9.86615183 L2.90596859,6.56730366 C2.71359171,6.41703784 2.61813778,6.17405323 2.65679946,5.93302635 C2.69546114,5.69199947 2.86212241,5.49105919 3.09184538,5.40849988 C3.32156834,5.32594057 3.57801234,5.37482256 3.76125654,5.53609948 L7.73445026,8.83578534 C8.10648647,9.14551369 8.64660253,9.14551369 9.01863874,8.83578534 L12.9926702,5.53609948 C13.2784317,5.31879802 13.6846744,5.36527799 13.9139688,5.64150922 C14.1432632,5.91774045 14.114156,6.32559616 13.8479581,6.56646597 L9.8747644,9.86698953 C9.45424568,10.217158 8.92418695,10.4086669 8.37696335,10.4081424 L8.37696335,10.4081424 Z" id="路径" fill-rule="nonzero"></path>
<path d="M14.408377,15.9260473 L2.34554974,15.9260473 C1.05256061,15.9265131 0.00323354393,14.8801841 0,13.587199 L0,5.61232984 C0.000279573081,4.75408428 0.471590841,3.96524112 1.22722513,3.55829843 L7.25863874,0.293795812 C7.95622534,-0.0844047244 8.79770137,-0.0844047244 9.49528796,0.293795812 L15.5275393,3.55829843 C16.2829822,3.96574443 16.7539267,4.7548516 16.7539267,5.61316754 L16.7539267,13.5880366 C16.7502321,14.8806945 15.70104,15.9265142 14.408377,15.9260473 Z M8.37696335,1.35013074 C8.20900955,1.35029585 8.04374673,1.39233134 7.89612565,1.47243455 L1.86471204,4.73693717 C1.54222712,4.91051135 1.34088584,5.24693783 1.34031414,5.61316754 L1.34031414,13.5880366 C1.34354237,14.1406504 1.7929273,14.586665 2.34554974,14.5857344 L14.408377,14.5857344 C14.96165,14.5866615 15.4113042,14.1396302 15.4136126,13.5863613 L15.4136126,5.61149215 C15.4127335,5.24556311 15.2114357,4.90953083 14.8892147,4.73609948 L8.85780105,1.47159686 C8.71010389,1.3917851 8.54484533,1.35013074 8.37696335,1.35013074 Z" id="形状" fill-rule="nonzero"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon-点检计划@3x</title>
<g id="3.1.8移动端" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="工作台首页" transform="translate(-31.000000, -485.000000)">
<g id="设备点检任务卡片" transform="translate(15.000000, 422.000000)">
<g id="icon-点检计划" transform="translate(16.000000, 63.000000)">
<path d="M10.2555408,-4.14336123e-16 L21.7444592,4.14336123e-16 C25.3105342,-2.4074122e-16 26.6036791,0.371302445 27.9073828,1.06853082 C29.2110865,1.76575919 30.2342408,2.78891348 30.9314692,4.09261719 C31.6286976,5.39632089 32,6.68946584 32,10.2555408 L32,21.7444592 C32,25.3105342 31.6286976,26.6036791 30.9314692,27.9073828 C30.2342408,29.2110865 29.2110865,30.2342408 27.9073828,30.9314692 C26.6036791,31.6286976 25.3105342,32 21.7444592,32 L10.2555408,32 C6.68946584,32 5.39632089,31.6286976 4.09261719,30.9314692 C2.78891348,30.2342408 1.76575919,29.2110865 1.06853082,27.9073828 C0.371302445,26.6036791 1.60494146e-16,25.3105342 -2.76224082e-16,21.7444592 L2.76224082e-16,10.2555408 C-1.60494146e-16,6.68946584 0.371302445,5.39632089 1.06853082,4.09261719 C1.76575919,2.78891348 2.78891348,1.76575919 4.09261719,1.06853082 C5.39632089,0.371302445 6.68946584,2.4074122e-16 10.2555408,-4.14336123e-16 Z" id="矩形" fill="#38D79F"></path>
<g id="编组" transform="translate(7.000000, 8.000000)" fill="#FFFFFF" fill-rule="nonzero">
<path d="M14,0 C14.5522847,-1.01453063e-16 15,0.44771525 15,1 L15,3 L17.1666667,3 C17.626904,3 18,3.37309604 18,3.83333333 L18,15.1666667 C18,15.626904 17.626904,16 17.1666667,16 L0.833333333,16 C0.373096042,16 2.47152384e-12,15.626904 2.47268872e-12,15.1666667 L2.47268872e-12,3.83333333 C2.47263236e-12,3.37309604 0.373096042,3 0.833333333,3 L3,3 L3,3 L3,1 C3,0.44771525 3.44771525,1.01453063e-16 4,0 C4.55228475,-1.01453063e-16 5,0.44771525 5,1 L5,3 L13,3 L13,3 L13,1 C13,0.44771525 13.4477153,1.01453063e-16 14,0 Z M14,10.3333333 L4,10.3333333 C3.44771525,10.3333333 3,10.7810486 3,11.3333333 C3,11.8461692 3.38604019,12.2688405 3.88337887,12.3266056 L4,12.3333333 L14,12.3333333 C14.5522847,12.3333333 15,11.8856181 15,11.3333333 C15,10.7810486 14.5522847,10.3333333 14,10.3333333 Z M8,6.33333333 L4,6.33333333 C3.44771525,6.33333333 3,6.78104858 3,7.33333333 C3,7.84616917 3.38604019,8.26884049 3.88337887,8.3266056 L4,8.33333333 L8,8.33333333 C8.55228475,8.33333333 9,7.88561808 9,7.33333333 C9,6.78104858 8.55228475,6.33333333 8,6.33333333 Z" id="形状结合"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -8,7 +8,7 @@
width: 750rpx;
margin: 0 auto;
z-index: 2;
background: #EFEFEF;
background: #f5f5f5;
box-sizing: border-box;
padding: 16rpx;
min-height: 100vh;

Loading…
Cancel
Save