马宇豪
2023-08-04 9655b129a296b4a5cc5e39d60fc022cf5ac06879
提交样式
已修改6个文件
203 ■■■■■ 文件已修改
common/request.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabBar/current/current.vue 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabBar/information/information.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabBar/notice/detail.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabBar/notice/notice.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabBar/response/response.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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); 
                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({
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;">
                            <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(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{
  .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>
pages/tabBar/information/information.vue
@@ -19,16 +19,16 @@
                    <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="top">
              <view class="textContent">
                <text>[{{item.colorContent}}]</text>
                <text>{{item.title}},{{item.content}}</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">
@@ -40,6 +40,10 @@
                                <u-button v-else type="error" size="mini" class="buttonCo">
                                    {{item.buttonContent}}
                                </u-button>
                </view>
              </view>
              <view class="bottom">
                {{item.content}}
                            </view>
                        </view>
                    </view>
@@ -129,7 +133,6 @@
            },
            //下拉刷新
            onPullDownRefresh() {
                console.log('refresh');
                setTimeout(() => {
                    uni.stopPullDownRefresh();
                    this.getInformationList();
@@ -280,19 +283,18 @@
  padding: 0 12px 15px;
  border-bottom: 1px solid #ebebeb;
  &:last-of-type{
    border-bottom: none;
  }
  //&:last-of-type{
  //  border-bottom: none;
  //}
}
.content{
  width: 100%;
  .top{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  .textContent{
    width: calc(100% - 90px);
    text-overflow: ellipsis;
@@ -304,6 +306,15 @@
    width: 80px;
  }
}
  .bottom{
    width: 100%;
    font-size: 14px;
    color: #666;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
}
.buttonCo{
    font-size: 13px;
}
pages/tabBar/notice/detail.vue
@@ -194,12 +194,13 @@
                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)
                    }
                })
            },
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;
pages/tabBar/response/response.vue
@@ -16,14 +16,14 @@
<!--        <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>
@@ -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{
    border-radius: 5px;
    padding: 15px 15px;
    background-color: rgb(174, 228, 255) ;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    align-items: center;
    justify-content: left;
    margin-bottom: 15px;
    color: #11cc21;
}
.contentRight{
    width: 100%;
    flex: 1;
    font-size: 18px;
    margin: 0 5px 15px 8px;
      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>