From 2cb26124675883fa1e2742ae7899c9fc791ed6a2 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期四, 27 七月 2023 14:27:43 +0800 Subject: [PATCH] 修改 --- pages/tabBar/notice/detail.vue | 6 +++--- pages/tabBar/firstPage/firstPage.vue | 4 +++- pages/tabBar/notice/notice.vue | 33 +++++++++++++++++---------------- pages/index/index.vue | 1 - 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 8946186..302c190 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -65,7 +65,6 @@ uni.setStorageSync("uid",res.data.uid); uni.setStorageSync('user', res.data); uni.setStorageSync('roleName', res.data.role.roleName); - console.log("登录--------",res.data.tk) if(res.data.role.roleName == '工作人员'){ this.$store.commit('setRoleId', 'user_other'); uni.switchTab({ diff --git a/pages/tabBar/firstPage/firstPage.vue b/pages/tabBar/firstPage/firstPage.vue index 4087820..2d7b90d 100644 --- a/pages/tabBar/firstPage/firstPage.vue +++ b/pages/tabBar/firstPage/firstPage.vue @@ -10,7 +10,7 @@ </view> </view> <view class="list"> - <view class="first" @click="goExamine"> + <view class="first" @click="goExamine" v-if="role == '审核领导'"> 预警审核 </view> <view class="first" @@ -55,6 +55,8 @@ //获取手机状态栏高度 this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; uni.hideTabBar(); + this.role = uni.getStorageSync('roleName'); + console.log("role",this.role) }, methods: { goExamine() { diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue index e7fdced..5be604a 100644 --- a/pages/tabBar/notice/detail.vue +++ b/pages/tabBar/notice/detail.vue @@ -29,7 +29,7 @@ <text class="textTop"><b>短信内容:</b><i style="background-color: rgb(240, 248, 255);">{{detailData.content}}发布单位:{{detailData.publishingUnit}}</i></text> <view style="display: flex;"> <text class="textTop" style="width: 76px;" ><b>附件内容:</b></text> - <view class="attache" v-if="isAllImg == 'no'"> + <!-- <view class="attache" v-if="isAllImg == 'no'"> <view v-for="(item, index) in detailData.attachments" :key="index" > <view style="display: flex;margin-top: 10px;" v-if="item.suffix == 'jpg'|| item.suffix =='jpeg' || item.suffix =='png'"> <image @click="previewSqs(item,index)" :src="item.attachment" style="width: 100rpx; height: 100rpx;margin-left: 5rpx;border: 3px solid #ccc;margin-right: 3px;"></image> @@ -49,10 +49,10 @@ <u-icon name="attach" color="#2979ff" size="20"></u-icon> {{item.attachementName}} </view> </view> - </view> + </view> --> <!-- <view style="width: 100%; height: 100px;"> - <web-view src="http://192.168.0.38:8086/uploadtest/2023/naturalDisaster/Warninginfo/0619/79e33942cb9548788f1f3196a2058c37.doc"></web-view> + <iframe :src="" width="100%" height="100%"> </iframe> </view> --> </view> diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue index 926f19c..0114ab8 100644 --- a/pages/tabBar/notice/notice.vue +++ b/pages/tabBar/notice/notice.vue @@ -30,12 +30,12 @@ </view> </view> <view class="listHead"> - <view class="switchBtn"> +<!-- <view class="switchBtn"> <u-checkbox-group> <u-checkbox v-model="isReadOnly" @change="chooseRead"></u-checkbox> </u-checkbox-group> <text>只显示未读</text> - </view> + </view> --> <view class="switchBtn"> <u-switch v-model="checked" size="20" @change="clickSwitch" style="margin-right: 6px"></u-switch> <text>仅紧临</text> @@ -46,11 +46,11 @@ <view class="noticeList"> <view class="listContent" v-if="noticeList.length > 0" > <view v-for="(item, index) in noticeList" :key="index" class="itemContent" > - <view class="content" v-if="item.isRead" > + <view class="content" v-if="item.isResponse" > <text style="color:rgb(17, 204, 33);" @click="toDetail(item)">[已叫应]</text> <text @click="toDetail(item)">[{{item.colorContent}}]</text> <text @click="toDetail(item)">{{item.title}},{{item.content}}</text> - <view v-if="item.isRead" style="float: right; width: 80px;margin-top: 3px;"> + <!-- <view v-if="item.isResponse" style="float: right; width: 80px;margin-top: 3px;"> --> <!-- <u-button @click="toDetail(item)"v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> {{item.buttonContent}} </u-button> @@ -60,14 +60,14 @@ <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> {{item.buttonContent}} </u-button> --> - </view> + <!-- </view> --> </view> <view class="contentNoRead" v-else> <u-badge :is-dot="true" type="error" style="position: absolute;"></u-badge> <text style="color: red;margin-left:10px;" @click="toDetail(item)">[未叫应]</text> <text @click="toDetail(item)">[{{item.colorContent}}]</text> <text @click="toDetail(item)">{{item.title}},{{item.content}}</text> - <view style="float: right; width: 80px;margin-top: 3px;"> + <!-- <view style="float: right; width: 80px;margin-top: 3px;"> --> <!-- <u-button @click="toDetail(item)" v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> {{item.buttonContent}} </u-button> @@ -77,7 +77,7 @@ <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> {{item.buttonContent}} </u-button> --> - </view> + <!-- </view> --> </view> </view> </view> @@ -93,7 +93,7 @@ </template> <script> - import { getNotice, update } from '../../../api/notice'; + import { getNotice, update,confirm } from '../../../api/notice'; import dia from './dialog.vue'; import tabBar from '../tabBarIndex.vue' export default { @@ -163,7 +163,8 @@ methods: { getNoticeList() { this.noSpeak = 0; - this.data.searchParams.readStatus = this.isReadOnly ? 0 : null; + // this.data.searchParams.readStatus = this.isReadOnly ? 0 : null; + this.data.searchParams.readStatus = null; this.data.searchParams.emergType = this.checked ? 1 : null ; this.data.searchParams.warningLevel = this.selectedSaleAnalysis =='all' ? null : this.selectedSaleAnalysis =='red' ? 1 : this.selectedSaleAnalysis =='orange' ? 2: this.selectedSaleAnalysis =='yellow'? 3 : 4; getNotice(this.data).then(res => { @@ -172,10 +173,10 @@ this.noticeListCopy = this.noticeList; if (this.noticeList.length > 0) { this.noticeList.forEach((item, index) => { - if(item.readStatus == 0){ + if(item.responseStatus == 1){ this.noSpeak++; } - this.noticeList[index].isRead = item.readStatus == 1 ? true : false; + this.noticeList[index].isResponse = item.responseStatus == 2 ? true : false; this.noticeList[index].colorContent = item.warningLevel == 1 ? '红色预警': item.warningLevel == 2 ? '橙色预警': item.warningLevel == 3 ? '黄色预警':'蓝色预警'; this.noticeList[index].buttonContent = item.responseStatus == 1 ? '待叫应': item.responseStatus == 2 ? '已叫应' : '超时未叫应'; }); @@ -199,15 +200,15 @@ toDetail(item) { console.log("item",item) //改为修改叫应状态 - if (item.readStatus === 0) { - this.updateReadStatus(item); + if (item.responseStatus === 1) { + this.updateResponseStatus(item); } uni.navigateTo({ url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item)) }) }, - updateReadStatus(item) { - update({id: item.id}).then(res => {}); + updateResponseStatus(item) { + confirm({id: item.id}).then(res => {}); }, openDialog(item){ this.$refs.showDialog.id = item.id; @@ -305,7 +306,7 @@ .listHead{ display: flex; align-items: center; - justify-content: space-between; + justify-content: flex-end; } } -- Gitblit v1.9.2