From 9655b129a296b4a5cc5e39d60fc022cf5ac06879 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 04 八月 2023 13:43:55 +0800
Subject: [PATCH] 提交样式
---
pages/tabBar/current/current.vue | 70 ++++++++-----
pages/tabBar/information/information.vue | 73 ++++++++------
pages/tabBar/notice/detail.vue | 5
pages/tabBar/notice/notice.vue | 24 +++-
common/request.js | 32 ++++-
pages/tabBar/response/response.vue | 67 +++++++-----
6 files changed, 166 insertions(+), 105 deletions(-)
diff --git a/common/request.js b/common/request.js
index c243a1d..ae6e571 100644
--- a/common/request.js
+++ b/common/request.js
@@ -21,20 +21,36 @@
return new Promise((resolved, rejected) => {
//成功
options.success = (res) => {
- if (Number(res.data.code) == 100) {
- resolved(res.data);
- } else {
+ // if (Number(res.data.code) == 100) {
+ if(Number(res.data.code) == 405){
uni.showToast({
icon: 'none',
- duration: 3000,
+ duration: 2000,
position: 'top',
title: `${res.data.msg}`
});
- rejected(res.data.msg);
- uni.navigateTo({
- url: '/pages/index/index'
- })
+ rejected(res.data.msg);
+ setTimeout(()=>{
+ uni.navigateTo({
+ url: '/pages/index/index'
+ })
+ },2000)
}
+ resolved(res.data);
+ // } else {
+ // uni.showToast({
+ // icon: 'none',
+ // duration: 3000,
+ // position: 'top',
+ // title: `${res.data.msg}`
+ // });
+ // rejected(res.data.msg);
+ // setTimeout(()=>{
+ // uni.navigateTo({
+ // url: '/pages/index/index'
+ // })
+ // },2000)
+ // }
}
options.fail = (err) => {
uni.showToast({
diff --git a/pages/tabBar/current/current.vue b/pages/tabBar/current/current.vue
index 89a9100..89b25b7 100644
--- a/pages/tabBar/current/current.vue
+++ b/pages/tabBar/current/current.vue
@@ -45,21 +45,21 @@
<!-- <view class="listContent" v-if="InfoList.length > 0">-->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="listContent" @scrolltoupper="upper" v-if="InfoList.length > 0"
@scrolltolower="lower" @scroll="scroll" lower-threshold="50">
- <view v-for="(item, index) in InfoList" :key="index" class="itemContent">
+ <view v-for="(item, index) in InfoList" :key="index" class="itemContent" @click="toDetail(item)">
<view class="content">
- <text>[{{item.colorContent}}]</text>
- <text>{{item.title}},{{item.content}}</text>
- <view class="btnGroup" style="float: right;">
- <u-button
- size="mini"
- style="background-color:rgb(255, 223, 37);color: white;width: 100px;margin: 3px 8px;"
- @click="toDetail(item)"
- >
- 信息详情
- </u-button>
+ <text class="tit">[{{item.colorContent}}]{{item.title}}</text><br>
+ <text class="cont">{{item.content}}</text>
+ <view class="btnGroup">
+<!-- <u-button -->
+<!-- size="mini" -->
+<!-- style="background-color:rgb(255, 223, 37);color: white;width: 100px;margin: 3px 8px;"-->
+<!-- @click="toDetail(item)"-->
+<!-- >-->
+<!-- 信息详情-->
+<!-- </u-button>-->
<u-button
size="mini"
- style="background-color:rgb(17, 204, 33);color: white;width: 100px;"
+ style="background-color:rgb(17, 204, 33);color: white;width: 100px;margin: 0;font-size: 13px"
@click="toResponsivity(item)"
>
查看叫应率
@@ -376,6 +376,12 @@
display: flex;
align-items: center;
}
+.examineList{
+ margin-top: 12px;
+ height: calc(100vh - 226px);
+ overflow: hidden;
+ overflow-y: scroll;
+}
.listContent{
display: flex;
flex-direction: column;
@@ -387,31 +393,39 @@
height: 100%;
}
.itemContent{
- font-size: 16px;
color: #333;
+ font-size: 16px;
margin-top: 15px;
padding: 0 12px 10px;
border-bottom: 1px solid #ebebeb;
-
}
.content{
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
+ .tit{
+ width: 100%;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ .cont{
+ width: 100%;
+ font-size: 14px;
+ color: #666;
+ display: block;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ margin-bottom: 6px;
+ }
+ .btnGroup{
+ width: 100%;
+ display: flex;
+ justify-content: left;
+ }
}
.buttonCo{
margin-top: 5px;
margin-bottom: 10px;
}
-.examineList{
- margin-top: 12px;
- height: calc(100vh - 266px);
- overflow: hidden;
- overflow-y: scroll;
-}
-.btnGroup{
- display: flex;
- align-items: center;
- justify-content: flex-end;
-}
+
+
</style>
\ No newline at end of file
diff --git a/pages/tabBar/information/information.vue b/pages/tabBar/information/information.vue
index b8b43a7..3c3e937 100644
--- a/pages/tabBar/information/information.vue
+++ b/pages/tabBar/information/information.vue
@@ -19,28 +19,32 @@
<u-checkbox-group >
<u-checkbox v-model="isReadOnly" :checked="isReadOnly" @change="chooseRead"></u-checkbox>只显示审核通过
</u-checkbox-group>
-
</view>
<!-- <view class="listContent" v-if="informationList.length > 0">-->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="listContent" @scrolltoupper="upper" v-if="informationList.length > 0"
@scrolltolower="lower" @scroll="scroll" lower-threshold="50">
<view v-for="(item, index) in informationList" :key="index" class="itemContent">
<view class="content" @click="toDetail(item)">
- <view class="textContent">
- <text>[{{item.colorContent}}]</text>
- <text>{{item.title}},{{item.content}}</text>
+ <view class="top">
+ <view class="textContent">
+ <text>[{{item.colorContent}}]</text>
+ <text>{{item.title}}</text>
+ </view>
+ <view class="buttonContent">
+ <u-button v-if="item.buttonContent == '审核通过'" size="mini" class="buttonCo" style="background-color:rgb(17, 204, 33);color: white">
+ {{item.buttonContent}}
+ </u-button>
+ <u-button v-else-if="item.buttonContent == '已驳回'" size="mini" class="buttonCo" style="background-color:rgb(153, 148, 143);color: white">
+ {{item.buttonContent}}
+ </u-button>
+ <u-button v-else type="error" size="mini" class="buttonCo">
+ {{item.buttonContent}}
+ </u-button>
+ </view>
</view>
- <view class="buttonContent">
- <u-button v-if="item.buttonContent == '审核通过'" size="mini" class="buttonCo" style="background-color:rgb(17, 204, 33);color: white">
- {{item.buttonContent}}
- </u-button>
- <u-button v-else-if="item.buttonContent == '已驳回'" size="mini" class="buttonCo" style="background-color:rgb(153, 148, 143);color: white">
- {{item.buttonContent}}
- </u-button>
- <u-button v-else type="error" size="mini" class="buttonCo">
- {{item.buttonContent}}
- </u-button>
- </view>
+ <view class="bottom">
+ {{item.content}}
+ </view>
</view>
</view>
</scroll-view>
@@ -129,7 +133,6 @@
},
//下拉刷新
onPullDownRefresh() {
- console.log('refresh');
setTimeout(() => {
uni.stopPullDownRefresh();
this.getInformationList();
@@ -280,28 +283,36 @@
padding: 0 12px 15px;
border-bottom: 1px solid #ebebeb;
- &:last-of-type{
- border-bottom: none;
- }
+ //&:last-of-type{
+ // border-bottom: none;
+ //}
}
.content{
width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- .textContent{
- width: calc(100% - 90px);
+ .top{
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .textContent{
+ width: calc(100% - 90px);
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+
+ .buttonContent{
+ width: 80px;
+ }
+ }
+ .bottom{
+ width: 100%;
+ font-size: 14px;
+ color: #666;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
- }
-
- .buttonContent{
- width: 80px;
}
}
.buttonCo{
diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue
index 88939ec..f4d8cbf 100644
--- a/pages/tabBar/notice/detail.vue
+++ b/pages/tabBar/notice/detail.vue
@@ -194,13 +194,14 @@
getMeasureDetail({id: this.detailData.id}).then(res => {
if(res.code == 100){
if(res.data.baseMeasures && res.data.baseMeasures.length>0 ){
- console.log('111111')
this.cityMessage = '查看措施反馈';
this.measureData = res.data;
}else {
this.cityMessage = '响应措施反馈';
}
- }
+ }else{
+ uni.$u.toast(res.msg)
+ }
})
},
goMeasures() {
diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue
index e2111ae..bf78dc1 100644
--- a/pages/tabBar/notice/notice.vue
+++ b/pages/tabBar/notice/notice.vue
@@ -50,11 +50,14 @@
<!-- <view class="listContent" v-if="noticeList.length > 0" >-->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="listContent" @scrolltoupper="upper" v-if="noticeList.length > 0"
@scrolltolower="lower" @scroll="scroll" lower-threshold="50">
- <view v-for="(item, index) in noticeList" :key="index" class="itemContent" >
+ <view v-for="(item, index) in noticeList" :key="index" class="itemContent" @click="toDetail(item)">
<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>
+ <text style="color:rgb(17, 204, 33);" >[已叫应]</text>
+ <text>[{{item.colorContent}}]</text>
+ <text>{{item.title}}</text>
+ <view>
+ {{item.content}}
+ </view>
<!-- <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}}
@@ -441,15 +444,22 @@
padding: 0 12px 15px;
border-bottom: 1px solid #ebebeb;
- &:last-of-type{
- border-bottom: none;
- }
+ //&:last-of-type{
+ // border-bottom: none;
+ //}
}
.content{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
+ view{
+ font-size: 14px;
+ color: #666;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
}
.contentNoRead{
font-size: 14px;
diff --git a/pages/tabBar/response/response.vue b/pages/tabBar/response/response.vue
index 76b1f6a..cd8a87f 100644
--- a/pages/tabBar/response/response.vue
+++ b/pages/tabBar/response/response.vue
@@ -16,15 +16,15 @@
<!-- <view class="responseList" v-if="responseList.length > 0">-->
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="responseList" @scrolltoupper="upper" v-if="responseList.length > 0"
@scrolltolower="lower" @scroll="scroll" lower-threshold="50">
- <view v-for="(item, index) in responseList" :key="index" class="itemContent">
- <view class="timeLeft">
- <text>{{item.time}}</text>
- <text>{{item.timeMin}}</text>
- </view>
+ <view v-for="(item, index) in responseList" :key="index" class="itemContent" @click="toDetail(item)">
<view class="contentRight">
- <text>{{item.content}}</text>
- <text style="color: rgb(76, 197, 248);" @click="toDetail(item)">[查看信息详情]</text>
+ <view style="font-size: 14px">{{item.receiveUnit}}</view>
+ <text><span style="margin-right: 4px">{{item.recipienterName}}</span>对<span style="margin:0 4px">[{{ item.title }}]</span>进行了“已安排部署”叫应。</text>
</view>
+ <view class="timeLeft">
+ <text style="margin-right: 10px">{{item.time}}</text>
+ <text>{{item.timeMin}}</text>
+ </view>
</view>
</scroll-view>
<!-- </view>-->
@@ -87,7 +87,7 @@
this.responseList.forEach((item, index) => {
this.responseList[index].time = item.responseTime.substring(0,10);
this.responseList[index].timeMin = item.responseTime.substring(10,19);
- this.responseList[index].content = item.receiveUnit + " " + item.recipienterName + " " + "在" + item.title + ' 进行了“已安排部署”叫应。';
+ // this.responseList[index].content = item.receiveUnit + " " + item.recipienterName + " " + "在" + item.title + ' 进行了“已安排部署”叫应。';
})
}
}else {
@@ -137,7 +137,7 @@
}
</script>
-<style>
+<style lang="scss" scoped>
.navBarBox .navBar {
background-color:#fff;
height: 50px;
@@ -177,31 +177,40 @@
box-shadow: 0 3px 12px rgba(0,0,0,0.05);
}
.itemContent{
- display: flex;
- align-items: center;
- font-size: 16px;
color: #333;
margin-top: 15px;
padding: 0 12px;
border-bottom: 1px solid #ebebeb;
- &:last-of-type{
- border-bottom: none;
+ .timeLeft{
+ display: flex;
+ align-items: center;
+ justify-content: left;
+ margin-bottom: 15px;
+ color: #11cc21;
}
-}
-.timeLeft{
- border-radius: 5px;
- padding: 15px 15px;
- background-color: rgb(174, 228, 255) ;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- margin-bottom: 15px;
-}
-.contentRight{
- flex: 1;
- font-size: 18px;
- margin: 0 5px 15px 8px;
+ .contentRight{
+ width: 100%;
+ flex: 1;
+ font-size: 16px;
+ margin-bottom: 6px;
+ view{
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ text{
+ overflow: hidden; //溢出内容隐藏
+ text-overflow: ellipsis; //文本溢出部分用省略号表示
+ display: -webkit-box; //特别显示模式
+ -webkit-line-clamp: 2; //行数
+ line-clamp: 2;
+ -webkit-box-orient: vertical; //盒子中内容竖直排列
+ }
+ }
+
+ // &:last-of-type{
+ // border-bottom: none;
+ // }
}
</style>
--
Gitblit v1.9.2