|
@@ -41,15 +41,23 @@
|
|
|
<view class="notice">
|
|
|
<view class="notice-name">
|
|
|
<image class="icon" src="/static/index/notice.png" mode="widthFix"></image>
|
|
|
- <text>最近动态</text>
|
|
|
+ <text>预警通知</text>
|
|
|
</view>
|
|
|
<view class="notice-cont" v-if="showNotice">
|
|
|
- <uni-notice-bar
|
|
|
+<!-- <uni-notice-bar
|
|
|
scrollable :text="notice"
|
|
|
background-color="#fff0"
|
|
|
- :speed="50"
|
|
|
+ :speed="30"
|
|
|
ref="uni-notice-bar"
|
|
|
- color="#333" />
|
|
|
+ color="#333" /> -->
|
|
|
+ <uni-notice-bar
|
|
|
+ @getmore="linkTo('alert','预警事件')"
|
|
|
+ scrollable :text="notice"
|
|
|
+ background-color="#fff0"
|
|
|
+ :speed="30"
|
|
|
+ ref="uni-notice-bar"
|
|
|
+ show-get-more
|
|
|
+ color="#333" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="tab">
|
|
@@ -389,17 +397,17 @@
|
|
|
getData(){
|
|
|
let user=uni.getStorageSync('accountInfo');
|
|
|
if(user){this.user=user}
|
|
|
- let notice=""
|
|
|
- getArtByList(3).then((res)=>{
|
|
|
- for(let i=0;i<res.data.length;i++){
|
|
|
- notice+=`${res.data[i].artTitle} 发布时间:${res.data[i].issuedAt};`
|
|
|
- }
|
|
|
- this.notice=notice
|
|
|
- this.showNotice=true
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.$refs['uni-notice-bar'].initSize()
|
|
|
- })
|
|
|
- })
|
|
|
+ // let notice=""
|
|
|
+ // getArtByList(3).then((res)=>{
|
|
|
+ // for(let i=0;i<res.data.length;i++){
|
|
|
+ // notice+=`${res.data[i].artTitle} 发布时间:${res.data[i].issuedAt};`
|
|
|
+ // }
|
|
|
+ // this.notice=notice
|
|
|
+ // this.showNotice=true
|
|
|
+ // this.$nextTick(()=>{
|
|
|
+ // this.$refs['uni-notice-bar'].initSize()
|
|
|
+ // })
|
|
|
+ // })
|
|
|
this.getMyWaitingTask();
|
|
|
this.getMyActiveRiskPoint()
|
|
|
},
|
|
@@ -417,6 +425,15 @@
|
|
|
getAlertByPage(params).then((res)=>{
|
|
|
this.alertList=res.data
|
|
|
this.alertTotal=res.total
|
|
|
+ let notice="";
|
|
|
+ for(let i=0;i<5;i++){
|
|
|
+ notice+=`${res.data[i].alertContent}; `
|
|
|
+ }
|
|
|
+ this.notice=notice
|
|
|
+ this.showNotice=true
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$refs['uni-notice-bar'].initSize()
|
|
|
+ })
|
|
|
})
|
|
|
getDangerByPage({
|
|
|
page: 1,
|
|
@@ -639,7 +656,7 @@
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
box-shadow: 0px 10px 10px -4px rgba(45, 54, 67, 0.2);
|
|
|
- padding: 0 32rpx;
|
|
|
+ padding: 0 0 0 16rpx;
|
|
|
.notice-name{
|
|
|
font-weight: 600;
|
|
|
font-size: 24rpx;
|