From e3172de7866b5d04e4d3a4d5eea400c7b3eea227 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期三, 14 八月 2024 09:56:40 +0800 Subject: [PATCH] 提交 --- /dev/null | 0 pages.json | 152 -------------------------------------- pages/tabBar/tabBarIndex.vue | 2 common/constant.js | 6 + pages/index/index.vue | 4 pages/tabBar/utils/tabBar.js | 18 ---- 6 files changed, 9 insertions(+), 173 deletions(-) diff --git a/common/constant.js b/common/constant.js index b51f7f0..aeb496f 100644 --- a/common/constant.js +++ b/common/constant.js @@ -2,10 +2,14 @@ let VUE_APP_BASE_URL= null; if (process.env.NODE_ENV == 'development') { VUE_APP_BASE_URL = 'http://192.168.2.15:8082' + // VUE_APP_BASE_URL = 'http://117.190.40.54:6622/edu' // VUE_APP_BASE_URL = 'http://47.108.222.15:8000' }else { - VUE_APP_BASE_URL = 'http://192.168.2.15:8082' + // VUE_APP_BASE_URL = 'http://192.168.2.15:8082' + // 正式环境 // VUE_APP_BASE_URL = 'http://47.108.222.15:8000' + // 国泰 + VUE_APP_BASE_URL = 'http://117.190.40.54:6622/edu' } export default VUE_APP_BASE_URL \ No newline at end of file diff --git a/pages.json b/pages.json index 2aa764f..bd37345 100644 --- a/pages.json +++ b/pages.json @@ -12,95 +12,6 @@ "enablePullDownRefresh": false } }, - { - "path" : "pages/tabBar/notice/notice", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": true, - "app-plus": { - "scrollIndicator": "none", - "pullToRefresh": { - "support": true, - "color": "#000000", - "style": "circle" - } - } - } - }, - { - "path" : "pages/tabBar/notice/detail", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "app-plus": { - "scrollIndicator": "none" - } - } - }, - { - "path" : "pages/tabBar/responsivity/countyResponsivity", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "app-plus": { - "scrollIndicator": "none" - } - } - }, - { - "path" : "pages/tabBar/responsivity/cityResponsivity", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "app-plus": { - "scrollIndicator": "none" - } - } - }, - { - "path" : "pages/tabBar/responsivity/villageResponsivity", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "app-plus": { - "scrollIndicator": "none" - } - } - }, - { - "path" : "pages/tabBar/notice/measures", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "app-plus": { - "scrollIndicator": "none" - } - } - }, - { - "path" : "pages/tabBar/responsivity/showMeasures", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "app-plus": { - "scrollIndicator": "none" - } - } - }, { "path" : "pages/tabBar/firstPage/firstPage", "style" : @@ -122,57 +33,6 @@ "enablePullDownRefresh": false, "app-plus": { "scrollIndicator": "none" - } - } - }, - { - "path" : "pages/tabBar/response/response", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": true, - "app-plus": { - "scrollIndicator": "none", - "pullToRefresh": { - "support": true, - "color": "#000000", - "style": "circle" - } - } - } - }, - { - "path" : "pages/tabBar/information/information", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": true, - "app-plus": { - "scrollIndicator": "none", - "pullToRefresh": { - "support": true, - "color": "#000000", - "style": "circle" - } - } - } - }, - { - "path" : "pages/tabBar/examine/examine", - "style" : - { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "enablePullDownRefresh": true, - "app-plus": { - "scrollIndicator": "none", - "pullToRefresh": { - "support": true, - "color": "#000000", - "style": "circle" - } } } }, @@ -276,18 +136,6 @@ "list": [ { "pagePath": "pages/tabBar/firstPage/firstPage" - }, - { - "pagePath": "pages/tabBar/notice/notice" - }, - { - "pagePath": "pages/tabBar/response/response" - }, - { - "pagePath": "pages/tabBar/information/information" - }, - { - "pagePath": "pages/tabBar/examine/examine" }, { "pagePath": "pages/tabBar/count/count" diff --git a/pages/index/index.vue b/pages/index/index.vue index 0baf6e3..b2c3f32 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -263,7 +263,7 @@ transition: box-shadow .1s ease !important; &:active{ - box-shadow: 0px -6px 10px rgba(255, 255, 255, 1), 0px 4px 12px rgba(0, 0, 0, 0.1),inset 0 3px 6px rgba(50, 50, 50, .05) !important; + box-shadow: 0px -6px 10px rgba(255, 255, 255, 1), 0px 4px 15px rgba(0, 0, 0, 0.1),0px 3px 6px rgba(0, 0, 0, 0.1) inset !important; } } @@ -271,7 +271,7 @@ background: #fff; border-width: 1.5px !important; border-color: #e6e6e6 !important; - box-shadow: 0px -6px 10px rgba(255, 255, 255, 0), 0px 4px 12px rgba(0, 0, 0, 0),inset 0 3px 6px rgba(50, 50, 50, .05) !important; + box-shadow: 0px -6px 10px rgba(255, 255, 255, 1), 0px 4px 15px rgba(0, 0, 0, 0.1),0px 3px 6px rgba(0, 0, 0, 0.1) inset !important; } .loginPsw{ diff --git a/pages/tabBar/examine/examine.vue b/pages/tabBar/examine/examine.vue deleted file mode 100644 index 840758d..0000000 --- a/pages/tabBar/examine/examine.vue +++ /dev/null @@ -1,436 +0,0 @@ -<template> - <view class="box"> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view style="display: flex; flex-direction: column;" > - <view class="navBar"> - <u-icon style=" margin-left: 13px;" name="arrow-left" color="black" size="17" @click="goBack" /> - <view class="barText">工作通知审核</view> - <view > - <u-button type="text" @click="loginOut" style="color: #1890ff;margin-right: 5px;width: 65px;">退出</u-button> - </view> - </view> - </view> - </view> - <div v-if="loading" style='display: flex;justify-content: center;position: absolute;width:100%;top: 40%;left: 0'> - <u-loading-icon></u-loading-icon> - </div> - <!-- 页面内容 --> - <view class="controlBar"> - <view class="buttonGroup"> - <view class="buttonItem all" - :class="{ 'active': selectedSaleAnalysis === 'all'}" - @click="handleButtonClick({label: 'all',name: '全部'})"> - 全部 - </view> - <view v-for="(button, index) in buttons" :key="index" class="buttonItem" - :class="{ 'active': selectedSaleAnalysis === button.label, - 'all': button.label === 'all', - 'red': button.label === 'red', - 'orange':button.label === 'orange', - 'yellow':button.label === 'yellow', - 'blue': button.label === 'blue'}" - @click="handleButtonClick(button)"> - {{ button.name }} - </view> - </view> - <view class="listHead"> - <view class="switchBtn"> - <u-checkbox-group> - <u-checkbox v-model="isReadOnly" :checked="isReadOnly" @change="chooseRead"></u-checkbox> - </u-checkbox-group> - <text>只显示待审核</text> - </view> - <view class="switchBtn"> - <u-switch v-model="checked" size="20" @change="clickSwitch" style="margin-right: 6px"></u-switch> - <text>仅紧临</text> - </view> - </view> - </view> - <view style="display: flex;flex-direction: column;margin-bottom: 55px;"> - <view class="examineList"> - <scroll-view :scroll-top="scrollTop" scroll-y="true" class="listContent" @scrolltoupper="upper" v-if="examineList.length > 0" - @scrolltolower="lower" @scroll="scroll" lower-threshold="50"> - <view v-for="(item, index) in examineList" :key="index" class="itemContent" @click="toDetail(item)"> - <view class="content"> - <text class="tit">[{{item.colorContent}}]{{item.title}}</text> - <view class="btnGroup"> - <text class="cont">{{item.content}}</text> - <u-button v-if="item.buttonContent == '已审核通过'" size="mini" style="background-color:rgb(17, 204, 33);color: white;width: 100px;"> - {{item.buttonContent}} - </u-button> - <u-button v-else-if="item.buttonContent == '已驳回'" size="mini" style="background-color:rgb(153, 148, 143);color: white;width: 100px;"> - {{item.buttonContent}} - </u-button> - <u-button v-else type="error" size="mini" style="width: 100px;"> - {{item.buttonContent}} - </u-button> - </view> - </view> - </view> - </scroll-view> - <view v-else> - <u-empty margin-top="40%" text="数据为空" mode="data"></u-empty> - </view> - </view> - </view> - <!-- <tabBar :currentPagePath="page"></tabBar> --> - </view> -</template> - -<script> - import tabBar from '../tabBarIndex.vue' - import {getExamine} from '../../../api/examine.js' - export default { - components:{ - // tabBar - }, - data() { - return { - loading:false, - scrollTop: 0, - data: { - pageIndex: 1, - pageSize: 10, - searchParams: { - emergType: null,//1-紧急;2-常规 - warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警 - reviewStatus: null//1:未审核,2:已审核,3:审核已驳回 - } - }, - page: 'pages/tabBar/examine/examine', - checked: false, - isReadOnly: false, - statusBarHeight: 0, - buttons: [ - { - label: 'red', - name: '红' - }, - { - label: 'orange', - name: '橙' - }, - { - label: 'yellow', - name: '黄' - }, - { - label: 'blue', - name: '蓝' - }, - ], - selectedSaleAnalysis: 'all', - examineList: [], - } - }, - onLoad() { - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - onShow() { - this.data.pageIndex = 1 - this.getExanineList(); - }, - methods: { - loginOut() { - uni.clearStorageSync(); - uni.clearStorage(); - uni.navigateTo({ - url: '/pages/index/index' - }) - }, - goBack() { - console.log("1111") - uni.switchTab({ - url:'/pages/tabBar/firstPage/firstPage' - }); - this.selectedSaleAnalysis = 'all'; - this.checked = false; - this.isReadOnly = false; - }, - getExanineList() { - this.loading = true - this.data.searchParams.reviewStatus = this.isReadOnly ? 1 : 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; - getExamine(this.data).then(res => { - if(res.code == 100) { - let list = res.data?res.data: []; - if (res.pageIndex != 1) { - this.examineList = this.examineList.concat(list) - } else { - this.examineList = list; - } - this.total = res.total - // this.examineList = res.data ? res.data : []; - console.log("res111111",this.examineList); - this.examineCopy = this.examineList; - if(this.examineList.length > 0) { - this.examineList.forEach((item, index) => { - this.examineList[index].colorContent = item.warningLevel == 1 ? '红色预警': item.warningLevel == 2 ? '橙色预警': item.warningLevel == 3 ? '黄色预警':'蓝色预警'; - this.examineList[index].buttonContent = item.reviewStatus == 1 ? '待审核': item.reviewStatus == 2 ? '已审核通过' : '已驳回'; - this.examineList[index].role = 'leader'; - this.examineList[index].warningLevel = item.warningLevel; - }); - } - }else{ - uni.$u.toast(res.msg) - } - this.loading = false - }) - }, - handleButtonClick(button) { - this.data.pageIndex = 1 - this.selectedSaleAnalysis = button.label; - this.getExanineList(); - }, - chooseRead(e) { - this.data.pageIndex = 1 - this.isReadOnly = e; - this.getExanineList(); - }, - toDetail(item) { - console.log("item",item) - uni.setStorageSync('backFlag','examine'); - console.log("uunget",uni.getStorageSync('backFlag')) - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item)) - }) - }, - //下拉刷新 - onPullDownRefresh() { - console.log('refresh'); - setTimeout(() => { - uni.stopPullDownRefresh(); - this.getExanineList(); - }, 2000); - }, - clickSwitch(e) { - this.getExanineList(); - this.data.pageIndex = 1 - }, - upper: function(e) { - // console.log(e) - }, - lower: function(e) { - console.log("111") - if (this.data.pageIndex * this.data.pageSize >= this.total){ - // uni.$u.toast('已加载全部数据') - return - } - //并且让页码+1,调用获取数据的方法获取第二页数据 - this.data.pageIndex++ - //此处调用自己获取数据列表的方法 - this.getExanineList() - }, - scroll: function(e) { - // console.log(e) - }, - } - } - -</script> - -<style lang="scss" scoped> -.box { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - margin-left: 20px; - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.statusBar{ - background-color:lightgrey; -} -/* .contentList{ - display: flex; - flex-direction: column; -} -.buttonGroup{ - margin: 18px 12px; - display: flex; - align-items: center; - justify-content: space-between; -} -.buttonAll{ - margin-left:5px; - color: white; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 35px; - height: 30px; - border-radius: 5px; - font-size: 12px; - font-weight: 700; -} */ -.controlBar{ - margin: 12px 12px 0; - padding: 12px; - height: 90px; - box-sizing: border-box; - display: flex; - flex-direction: column; - justify-content: space-between; - width: calc(100% - 24px); - background: #fff; - border-radius: 5px; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - - .buttonGroup{ - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 12px; - } - - .listHead{ - display: flex; - align-items: center; - justify-content: space-between; - } -} -.buttonItem{ - width: calc(20% - 4px); - color: white; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - height: 30px; - border-radius: 5px; - &.active{ - border: 1px solid rgba(0,0,0,.4); - box-shadow: 0 1px 3px rgba(0,0,0,0.1); - } -} -.all { - background-color: rgb(17,204,33); - &.active{ - background-image: linear-gradient(#22992d,#12da23); - } -} -.active { - border: 1.5px solid #8d8d8d; -} -.red { - background-color: #ff5555; - &.active{ - background:linear-gradient(#dc2f2f, #ff5b5b); - } -} -.orange { - background-color: rgb(251, 158, 13); - &.active{ - background: linear-gradient(#e28e0c,#ffa90e); - } -} -.yellow { - background-color: rgb(255, 223, 37); - &.active{ - background: linear-gradient(#e6c921,#ffef28); - } -} -.blue { - background-color: #409EFF; - &.active{ - background: linear-gradient(#3a8ee6,#44a9ff); - } -} -.switchBtn{ - display: flex; - align-items: center; -} -// .listHead{ -// display: flex; -// align-items: center; -// background-color:lightgrey; -// height: 35px; -// } -.listContent{ - display: flex; - flex-direction: column; - width: calc(100% - 24px); - margin: 0 12px; - background: #fff; - border-radius: 5px; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - height: 100%; -} -.itemContent{ - color: #333; - font-size: 16px; - margin-top: 15px; - padding: 0 12px 10px; - border-bottom: 1px solid #ebebeb; - -} -.content{ - display: flex; - flex-direction: column; - // align-items: flex-end; - .tit{ - width: 100%; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - - .btnGroup{ - // float: right; - display: flex; - align-items: center; - justify-content: space-between; - .cont{ - width: 100%; - font-size: 14px; - color: #666; - display: block; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - margin-bottom: 6px; - } - } -} -.buttonCo{ - margin-top: 5px; - margin-bottom: 10px; -} -.examineList{ - margin-top: 12px; - height: calc(100vh - 266px); - overflow: hidden; - overflow-y: scroll; -} -</style> \ No newline at end of file diff --git a/pages/tabBar/information/information.vue b/pages/tabBar/information/information.vue deleted file mode 100644 index 484ccfb..0000000 --- a/pages/tabBar/information/information.vue +++ /dev/null @@ -1,347 +0,0 @@ -<template> - <view class="box"> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view class="navBar" > - <view class="barText">信息发布</view> - <view > - <u-button type="text" @click="loginOut" style="color: #1890ff;margin-right: 5px;width: 65px;">退出</u-button> - </view> - </view> - </view> - <div v-if="loading" style='display: flex;justify-content: center;position: absolute;width:100%;top: 40%;left: 0'> - <u-loading-icon></u-loading-icon> - </div> - <!-- 页面内容 --> - <view class="contentList"> - <view class="listHead"> - <u-checkbox-group > - <u-checkbox v-model="isReadOnly" :checked="isReadOnly" @change="chooseRead"></u-checkbox>只显示审核通过 - </u-checkbox-group> - </view> - <view style="display: flex;flex-direction: column;margin-bottom: 55px;"> - <view class="examineList"> - <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}}</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="bottom"> - {{item.content}} - </view> - </view> - </view> - </scroll-view> - <view v-else> - <u-empty margin-top="40%" text="数据为空" mode="data"></u-empty> - </view> - </view> - </view> - </view> - <tabBar :currentPagePath="page"></tabBar> - </view> -</template> - -<script> - import tabBar from '../tabBarIndex.vue' - import { getInfo } from '../../../api/information.js' - export default { - components:{ - tabBar - }, - data() { - return { - data: { - pageIndex: 1, - pageSize: 12, - searchParams: { - reviewStatus: null//2:已审核,null:全部 - } - }, - total: 0, - scrollTop: 0, - loading: false, - checked: false, - isReadOnly: false, - statusBarHeight: 0, - informationList: [], - page:'pages/tabBar/information/information' - } - }, - onLoad() { - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - onShow() { - this.data.pageIndex = 1 - this.getInformationList(); - }, - methods: { - loginOut() { - uni.clearStorageSync(); - uni.clearStorage(); - uni.navigateTo({ - url: '/pages/index/index' - }) - }, - getInformationList() { - this.loading = true - this.data.searchParams.reviewStatus = this.isReadOnly ? 2 : null; - getInfo(this.data).then(res => { - if (res.code == 100){ - let list = res.data?res.data: []; - if (res.pageIndex != 1) { - this.informationList = this.informationList.concat(list) - } else { - this.informationList = list; - } - this.total = res.total - if(this.informationList.length > 0) { - this.informationList.forEach((item, index) => { - this.informationList[index].colorContent = item.warningLevel == 1 ? '红色预警': item.warningLevel == 2 ? '橙色预警': item.warningLevel == 3 ? '黄色预警':'蓝色预警'; - this.informationList[index].buttonContent = item.reviewStatus == 1 ? '待审核': item.reviewStatus == 2 ? '审核通过' : '已驳回'; - this.informationList[index].role = 'infoPeople'; - this.informationList[index].warningLevel = item.warningLevel; - }) - } - }else{ - uni.$u.toast(res.msg) - } - this.loading = false - }) - }, - chooseRead(e) { - this.isReadOnly = e; - this.data.pageIndex = 1 - this.getInformationList(); - }, - toDetail(item) { - console.log("item",item) - uni.setStorageSync('fdetailData', item); - uni.setStorageSync('backFlag','info'); - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item)) - }) - }, - //下拉刷新 - onPullDownRefresh() { - setTimeout(() => { - uni.stopPullDownRefresh(); - this.getInformationList(); - }, 2000); - }, - - - upper: function(e) { - // console.log(e) - }, - lower: function(e) { - if (this.data.pageIndex * this.data.pageSize >= this.total){ - // uni.$u.toast('已加载全部数据') - return - } - //并且让页码+1,调用获取数据的方法获取第二页数据 - this.data.pageIndex++ - //此处调用自己获取数据列表的方法 - this.getInformationList() - }, - scroll: function(e) { - // console.log(e) - }, - - clickSwitch(e) { - this.getInformationList(); - } - } - } - -</script> - -<style lang="scss" scoped> -.box { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - margin-left: 55px; - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.statusBar{ - background-color:lightgrey; -} -// .contentList{ -// display: flex; -// flex-direction: column; -// padding-bottom: 65px; -// } - -.buttonGroup{ - margin: 18px 12px; - display: flex; - align-items: center; - justify-content: space-between; -} -.buttonItem{ - margin-left:5px; - color: white; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 47px; - height: 30px; - border-radius: 5px; -} -.buttonAll{ - margin-left:5px; - color: white; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 35px; - height: 30px; - border-radius: 5px; - font-size: 12px; - font-weight: 700; -} -.all { - background-color: rgb(17,204,33); -} -.active { - border: 1.5px solid #8d8d8d; -} -.red { - background-color: red; -} -.orange { - background-color: rgb(251, 158, 13); -} -.yellow { - background-color: rgb(255, 223, 37); -} -.blue { - background-color: rgb(2, 167, 240); -} -.switchBtn{ - display: flex; - align-items: center; -} -.listHead{ - padding: 12px; - height: 26px; - display: flex; - align-items: center; - justify-content: space-between; -} -.listContent{ - display: flex; - flex-direction: column; - width: calc(100% - 24px); - margin: 0 12px; - background: #fff; - border-radius: 5px; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - height: calc(100vh - 162px); -} -.examineList{ - // margin-top: 12px; - height: calc(100vh - 200px); - overflow: hidden; - overflow-y: scroll; -} - -.itemContent{ - font-size: 16px; - color: #333; - margin-top: 15px; - padding: 0 12px 15px; - border-bottom: 1px solid #ebebeb; - - //&:last-of-type{ - // border-bottom: none; - //} -} -.content{ - width: 100%; - - .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; - } -} -.buttonCo{ - font-size: 13px; -} - -/* .divider{ - height: 1px; - background-color: gray; - margin-left: 10px; - margin-right: 10px; - -} */ -</style> \ No newline at end of file diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue deleted file mode 100644 index b12c732..0000000 --- a/pages/tabBar/notice/detail.vue +++ /dev/null @@ -1,482 +0,0 @@ -<template> - <view style="display: flex;flex-direction: column;height: 100%;"> - <!-- 自定义导航栏 --> - <view class="navBarBox"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view style="display: flex; flex-direction: column;"> - <view class="navBar"> - <u-icon name="arrow-left" color="black" size="17" style="margin-left: 8px;" @click="goBack" /> - <view class="barText">信息详情</view> -<!-- <view > - <u-button type="text" @click="loginOut" style="color: blue;margin-right: 5px;">退出</u-button> - </view> --> - </view> - </view> - </view> - <!-- 页面内容 --> - <view class="detailCard" > - <text style="font-size: 18px;"><b>标题:</b>{{detailData.title}}</text> - <view class="levelDisaster"> - <text class="textTop"><b>类别:</b>{{detailData.disaster}}</text> - <view style="display: flex;align-items: center;margin-left: 10%" class="textTop"> - <text><b>级别:</b></text> - <u-tag - :color="detailData.warningLevel === 3 ? 'rgb(211, 211, 0)' :detailData.warningLevel === 2 ? 'orange':detailData.warningLevel === 1 ?'red':'blue'" - :text="detailData.warningLevel === 3 ? '黄色' : detailData.warningLevel === 2 ? '橙色': detailData.warningLevel === 1 ?'红色':'蓝色'" - :bg-color="detailData.warningLevel === 3 ? 'rgb(254, 255, 230)' :detailData.warningLevel === 2 ? 'rgb(255, 210, 179)':detailData.warningLevel === 1 ?'rgb(255, 128, 128)':'rgb(121, 150, 255)'" - border-color="white"> - </u-tag> - </view> - </view> - <text class="textTop"><b>发布时间:</b>{{detailData.publishingTime}}</text> - <text class="textTop" v-if="detailData.forwardPath" style="display: flex;"><b>发布单位:</b> - <text v-for="(item,index) in detailData.forwardPath"> - <text v-if="index !=detailData.forwardPath.length-1"> - {{item}}> - </text> - <text v-else>{{item}}</text> - </text> - </text> - <text class="textTop" v-else><b>发布单位:</b>{{detailData.publishingUnit}}</text> - <text class="textTop"><b>短信内容:</b><i style="background-color: rgb(240, 248, 255);">{{detailData.content}}发布单位:{{detailData.publishingUnit}}</i></text> - <view :style="{ height: directViewUrl ? '560px' : '' }" style="margin-top: 20px;"> - <text class="textTop" style="width: 76px;" ><b>附件内容:</b></text> - <view style="width: 100%; height: 550px;" v-if="directViewUrl"> - <iframe :src="directViewUrl" class="frameStyle"></iframe> - </view> - <view style="width: 100%; height: auto" v-if="urls.length > 0"> - <view v-for="(item, index) in urls" :key="index" > - <view style="display: flex;margin-top: 10px;" @click="openFile(item)" > - <u-icon name="attach" color="#2979ff" size="20"></u-icon> <span>{{item.name}}</span> - </view> - </view> - </view> - <span v-if="!(directViewUrl || urls.length > 0)"> - 无 - </span> - -<!-- <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> - </view> - <view style="display: flex;margin-top: 10px;" @click="openFile(item)" v-else> - <u-icon name="attach" color="#2979ff" size="20"></u-icon> {{item.attachementName}} - </view> - </view> - </view> - - <view class="attache_img" v-else> - <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> - </view> - <view style="display: flex;margin-top: 10px;" @click="openFile(item)" v-else> - <u-icon name="attach" color="#2979ff" size="20"></u-icon> {{item.attachementName}} - </view> - </view> - </view> --> - </view> - <text class="textTop" style="margin-top: 30px;" v-if="detailData.role == 'leader'"><b>信息提交人:</b>{{detailData.infoSubmitterRealName}}</text> - <view class="textTop" v-if="detailData.role == 'leader'"> - <text ><b>审核状态:</b></text> - <text v-if="detailData.reviewStatus == 1" class="responseStatus" - style='color: red;'>待审核</text> - <text v-else-if="detailData.reviewStatus == 2" class="responseStatus" - style='color: rgb(17, 204, 33);'>审核通过</text> - <text v-else class="responseStatus" - style='color: rgb(153, 148, 143);'>已驳回</text> - </view> - <view class="textTop" v-else-if="detailData.role == 'infoPeople'"> - <text ><b>审核状态:</b></text> - <text v-if="detailData.reviewStatus == 1" class="responseStatus" - style='color: red;'>待审核</text> - <text v-else-if="detailData.reviewStatus == 2" class="responseStatus" - style='color: rgb(17, 204, 33);'>审核通过</text> - <text v-else class="responseStatus" - style='color: rgb(153, 148, 143);'>已驳回</text> - </view> -<!-- <view class="textTop" v-else> - <text ><b>响应状态:</b></text> - <text v-if="detailData.responseStatus == 1" class="responseStatus" - style='background-color:rgb(247, 108, 125);color: white;'>待叫应</text> - <text v-else-if="detailData.responseStatus == 2" class="responseStatus" - style='background-color:limegreen'>已叫应</text> - <text v-else class="responseStatus" - style='background-color:rgb(247, 108, 125); color: white;'>超时未叫应</text> - </view> --> - <view v-if="detailData.role == 'leader' && detailData.reviewStatus == 1" class="btn"> - <u-button - style="background-color:rgb(6, 202, 23);color: white;width: 180px;" - @click="$noMoreClicks(approved)" - >审核通过</u-button> - <u-button - style="background-color:rgb(247, 108, 125);color: white;width: 180px;" - @click="$noMoreClicks(reject)" - >审核驳回</u-button> - </view> - <view v-if="detailData.role == 'infoPeople' && detailData.reviewStatus == 2" class="btn"> - <u-button - style="background-color:rgb(6, 202, 23);color: white;width: 180px;" - @click="$noMoreClicks(infoSend)" - >确认发布</u-button> - </view> - <!-- //村级显示 --> - </view> - <view class="measures" v-if="unitType == 4"> - <u-button class="resBtn" type="primary" @click="goMeasures" v-if="role == '工作人员'">{{cityMessage}}</u-button> - </view> - </view> -</template> - -<script> - import VUE_APP_BASE_URL from '../../../common/constant.js' - import { submit } from '../../../api/examine.js' - import { publishInfo } from '../../../api/information.js' - import { getMeasureDetail } from '../../../api/notice.js' - export default { - data() { - return { - // 状态栏高度 - statusBarHeight: 0, - key: 1, - isAllImg: '', - detailData: { - id: null, - warnInfoId: null, - disasterType: null, - warningLevel: null, - title: "", - content: "", - publishingUnit: "", - attachments: [], - responseStatus: null - }, - submitData: { - id: null, - reviewStatus: null - }, - role: '', - unitType: '', - directViewUrl: '', - cityMessage: '响应措施反馈', - measureData: {}, - urls: [], - backFlag: '', - noClick:true, - } - }, - onLoad:function(options){ - // #ifdef APP-PLUS - const currentWebview = this.$scope.$getAppWebview();//获取当前web-view 此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效 - setTimeout(function() { - const wv = currentWebview.children()[0]; - console.log(wv); - wv.setStyle({//设置web-view距离顶部的距离以及自己的高度,单位为px - top: 68, - height:300 - }) - }, 1000);//如页面初始化调用需要写延迟 - // #endif - this.role = uni.getStorageSync('roleName'); - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - let test = options.data && JSON.parse(decodeURIComponent(options.data)); - this.detailData = test; - - this.directViewUrl = this.detailData.directViewUrl; - if(this.detailData.attachments && this.detailData.attachments.length >0){ - this.urls = this.detailData.attachments.map(item => { - return { - url: VUE_APP_BASE_URL + item.attachement, - name: item.attachementName - } - }) - }else if(this.detailData.attachment && this.detailData.attachment.length >0){ - this.urls = this.detailData.attachment.map(item => { - return { - url: VUE_APP_BASE_URL + item.attachment, - name: item.attachmentName - } - }) - } - console.log("urls",this.urls) - - - - // this.directViewUrl = 'https://huaban.com/' - this.unitType = uni.getStorageSync('unittype'); - if(this.detailData.role == 'leader' || this.detailData.role == 'infoPeople' ) { - this.detailData.attachments = this.detailData.attachment; - if (this.detailData.attachments){ - this.detailData.attachments.forEach((item,index) => { - item.attachementName = this.detailData.attachment[index].attachmentName; - }) - } - } - if (this.detailData.attachments){ - this.detailData.attachments.forEach((item,index) => { - item.suffix = item.attachementName.substring(item.attachementName.lastIndexOf(".") + 1); - if(item.suffix == 'jpg'|| item.suffix =='jpeg' || item.suffix =='png' ){ - if(this.detailData.role == 'leader' || this.detailData.role == 'infoPeople' ){ - item.attachment = VUE_APP_BASE_URL + item.attachment; - }else { - item.attachment = VUE_APP_BASE_URL + item.attachement; - } - - }else { - this.isAllImg = 'no'; - } - }) - } - console.log("this.isAllImg",this.isAllImg) - console.log("detailData",this.detailData) - this.detailData.disaster = test.disasterType == 1 ? '地震': test.disasterType == 2 ? '洪涝' : test.disasterType == 3 ? '气象' : test.disasterType == 4 ? '地质灾害': test.disasterType == 5 ? '水旱': '森林草原火灾'; - if(this.unitType == 4 && this.role == '工作人员'){ - this.getMeasures(); - } - // this.backFlag = uni.getStorageSync('backFlag') - // console.log(this.backFlag,'1111') - }, - methods: { - goBack() { - console.log(uni.getStorageSync('backFlag'),'1111') - if(uni.getStorageSync('backFlag') == 'notice'){ - uni.switchTab({ - url: '/pages/tabBar/notice/notice' - }) - }else if (uni.getStorageSync('backFlag') == 'info') { - uni.switchTab({ - url: '/pages/tabBar/information/information' - }) - }else if (uni.getStorageSync('backFlag') == 'examine') { - uni.switchTab({ - url: '/pages/tabBar/examine/examine' - }) - }else if (uni.getStorageSync('backFlag') == 'current') { - uni.switchTab({ - url: '/pages/tabBar/current/current' - }) - }else if ( uni.getStorageSync('backFlag') == 'response'){ - uni.switchTab({ - url: '/pages/tabBar/response/response' - }) - } - }, - loginOut() { - uni.clearStorageSync(); - uni.clearStorage(); - uni.navigateTo({ - url: '/pages/index/index' - }) - }, - getMeasures(){ - getMeasureDetail({id: this.detailData.id}).then(res => { - if(res.code == 100){ - if(res.data.baseMeasures && res.data.baseMeasures.length>0 ){ - this.cityMessage = '查看措施反馈'; - this.measureData = res.data; - }else { - this.cityMessage = '响应措施反馈'; - } - }else{ - uni.$u.toast(res.msg) - } - }) - }, - goMeasures() { - if(this.cityMessage == '查看措施反馈' ){ - uni.setStorageSync('backMeasures','detail') - this.measureData.id = this.detailData.id - uni.navigateTo({ - url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(this.measureData)) - }) - }else { - uni.navigateTo({ - url: `/pages/tabBar/notice/measures?data=` + encodeURIComponent(JSON.stringify(this.detailData)) - }) - } - }, - //审核通过 - approved() { - this.submitData.id = this.detailData.id; - this.submitData.reviewStatus = 2; - submit(this.submitData).then(res => { - if(res.code==100) { - this.goBack(); - } - }); - }, - //审核驳回 - reject() { - this.submitData.id = this.detailData.id; - this.submitData.reviewStatus = 3; - submit(this.submitData).then(res => { - if(res.code==100) { - this.goBack(); - } - }) - }, - //信息发布 - infoSend() { - publishInfo({id: this.detailData.id}).then(res => { - if(res.code==100) { - this.goBack(); - } - }) - console.log("信息发布") - }, - //预览图片 - previewSqs(item,index) { - - let imgs = []; - for (let i = 0; i < this.detailData.attachments.length; i++) { - imgs.push(this.detailData.attachments[i].attachment) - } - console.log("预览",imgs) - uni.previewImage({ - urls: imgs, - current: index, - indicator: 'number', - loop: true - }) - }, - //预览文件 - openFile(item) { - let fileUrl = ''; - console.log("iiii",item) - // if(this.detailData.role == 'leader' || this.detailData.role == 'infoPeople' ){ - // fileUrl = VUE_APP_BASE_URL + item.attachment; - // }else { - // fileUrl = VUE_APP_BASE_URL + item.attachement; - // } - fileUrl = item.url - console.log("urlllllllll",fileUrl) - uni.downloadFile({ - url: fileUrl, - header: {}, - success:function(res){ - console.log("下载res",res); - var filePath = res.tempFilePath; - const sidx = filePath.lastIndexOf('('); - const eidx = filePath.lastIndexOf(')'); - // 用于处理文档打开问题(ps:第一次打开 第二次无法打开问题) - if (sidx > -1 && eidx > -1) { - const restr = filePath.substr(sidx, eidx - sidx + 1); - filePath = filePath.replace(restr, ''); - } - // plus.runtime.openFile(filePath) - uni.openDocument({ - filePath: filePath, - success:function(){ - console.log('成功') - }, - fail:function(){ - uni.showToast({ - icon: 'none', - title: '暂不支持此类型', - duration: 2000 - }) - } - }) - } - }) - } - } - } -</script> - -<style lang="scss" scoped> -a{ - text-decoration: none; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: space-around; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - margin-left: -20px; - flex: 1; - /* margin-left: 20px; */ - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.navBarBox .navBar .logo { - width: 82rpx; - height: 82rpx; - margin-right: 10rpx; -} -.textTop{ - margin-top: 20px; - font-size: 15px; - -} -.attache{ - margin-top: 10px; - flex: 1; - display: flex; - flex-direction: column; -} -.attache_img { - flex: 1; - display: flex; - flex-wrap: wrap; -} -.responseStatus{ - padding:5px; - color:#2a2a2a; - border-radius: 5px; -} -.divider{ - height: 1px; - width: 93%; - background-color: lightgray; - margin-left: 15px; -} -.detailCard{ - // flex-grow: 1; - // height: 65%; - display: flex; - flex-direction: column; - background: #fff; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - margin: 12px 12px 20px; - border-radius: 5px; - padding: 30px 12px; -} -.btn{ - margin-top: 80px; - display: flex; - align-items: center; - justify-content: space-around; - width: 100%; -} -.measures{ - display: flex; - justify-content: flex-end; - padding: 0 12px; - margin-bottom: 20px ; - -} -.frameStyle{ - width: 100%; - height: 550px; - border: 1px solid #dddddc; - margin-top: 5px; -} -.levelDisaster{ - display: flex; - align-items: center; -} - -</style> diff --git a/pages/tabBar/notice/dialog.vue b/pages/tabBar/notice/dialog.vue deleted file mode 100644 index 689efc1..0000000 --- a/pages/tabBar/notice/dialog.vue +++ /dev/null @@ -1,77 +0,0 @@ -<template> - <view> - <u-popup :show="show" @open="open" mode="center" customStyle="border-radius: 16rpx"> - <view class="dialog"> - <view class="head"> - <text><b>回执</b></text> - <u-icon name="close" color="#black" size="18" @click="close" ></u-icon> - </view> - <text class="content">确认已经安排部署?</text> - <view class="bottom"> - <u-button @click="close" style="width: 70px; margin-left: 40px;">取消</u-button> - <u-button style="width: 130px" type="primary" @click="$noMoreClicks(confirm)">确认已安全部署</u-button> - </view> - </view> - </u-popup> - </view> -</template> - -<script> - import { confirm } from '../../../api/notice'; - export default { - data() { - return { - show:false, - id: '', - noClick:true, - } - }, - - methods: { - open() { - this.show = true; - console.log("id",this.id); - }, - close(){ - this.$emit('close'); - this.show = false; - }, - confirm() { - //确认调接口 - confirm({id: this.id}).then(res => { - if(res.code == 100) { - uni.showToast({ - icon: "none", - title: '部署成功' - }); - this.$emit('close'); - this.show = false; - } - }); - } - } - } -</script> - -<style> -.dialog{ - display: flex; - flex-direction: column; - width: 250px; - height: 170px; -} -.head{ - font-size: 16px; - display: flex; - align-items: center; - justify-content: space-between; - padding: 10px 10px; -} -.content{ - padding: 20px 10px; -} -.bottom{ - margin-top: 10px; - display: flex; -} -</style> \ No newline at end of file diff --git a/pages/tabBar/notice/measures.vue b/pages/tabBar/notice/measures.vue deleted file mode 100644 index d168f4b..0000000 --- a/pages/tabBar/notice/measures.vue +++ /dev/null @@ -1,296 +0,0 @@ -<template> - <view> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view class="navBar"> - <u-icon name="arrow-left" color="black" size="17" style="margin-left: 10px;" @click="goBack" /> - <view class="barText">响应措施反馈</view> - </view> - </view> - <view class="measureCard"> - <view class="first"> - <text style="font-size: 16px;margin-bottom: 20px;"><text style="color: red;">*</text>基础措施</text> - <u-checkbox-group - v-model="checkboxValue1" - placement="column" - @change="checkboxChange" - > - <u-checkbox - :customStyle="{marginBottom: '8px'}" - v-for="(item, index) in list" - :key="index" - :label="item.measure" - :name="item.id" - > - </u-checkbox> - </u-checkbox-group> - </view> - <view class="second"> - <text style="font-size: 16px;margin-bottom: 20px;">响应反馈</text> - <u--textarea style="margin-top: -5px;" v-model="measures" placeholder="请输入内容" ></u--textarea> - </view> - <view class="third"> - <text style="font-size: 16px;margin-bottom: 20px;">图片上传</text> - <u-upload - :fileList="fileList1" - @afterRead="afterRead" - @delete="deletePic" - name="1" - multiple - :maxCount="10" - style="margin-top: -10px;" - ></u-upload> - <!-- <view :class="{pic: nameList.length>0}"> - <view class="picItem" v-for="(item,index) in nameList" :key="index"> - <image src="../../../static/pic.png"> - {{item.name}} - </view> - </view> --> - </view> - </view> - <view class="measures"> - <u-button class="measureBtn" type="primary" @click="$noMoreClicks(submit)">提交</u-button> - </view> - </view> -</template> - -<script> - import { measureList, submitMeasures, getMeasureDetail } from '@/api/notice.js' - import VUE_APP_BASE_URL from '../../../common/constant.js' - export default { - components:{ - - }, - data() { - return { - statusBarHeight: [], - fileList1: [], - nameList: [], - checkboxValue1: [], - measures: "", - type: 'textarea', - border: true, - height: 100, - autoHeight: true, - detailData : {}, - measureIds : [], - baseUrl: VUE_APP_BASE_URL, - list: [], - showBtn: false, - noClick:true, - } - }, - onLoad(options) { - let test = options.data && JSON.parse(decodeURIComponent(options.data)); - console.log("test",test) - this.detailData = test; - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - this.getMeasureList(); - }, - methods: { - getMeasureList() { - const param = { - pageIndex: 1, - pageSize: 10000, - } - measureList(param).then(res => { - if(res.code == 100){ - this.list = res.data; - } - }).catch(err=>{}) - }, - goBack() { - console.log("fdetailData",uni.getStorageSync("fdetailData")) - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(uni.getStorageSync("fdetailData"))) - }) - }, - - checkboxChange(n) { - let finalArr = this.list.filter(item => !(n.indexOf(item.id) < 0)); - this.measureIds = finalArr.map((item) => { - return {id: item.id, baseMeasureContent: item.measure}; - }); - console.log('change', this.measureIds); - }, - submit() { - if(this.measureIds.length <= 0) { - uni.showToast({ - icon: "none", - title: '请勾选基础措施' - }); - return; - } - const param = { - id: this.detailData.id, - baseMeasures: this.measureIds, - responseMeasure: this.measures - } - submitMeasures(param).then(res => { - if(res.code == 100){ - uni.showToast({ - icon: "none", - title: '提交成功' - }); - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(this.detailData)) - }) - }else{ - uni.$u.toast(res.msg) - } - }) - }, - // 删除图片 - deletePic(event) { - this[`fileList${event.name}`].splice(event.index, 1) - this.nameList.splice(event.index,1) - console.log("name",this.nameList) - }, - // 新增图片 - async afterRead(event) { - // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 - let lists = [].concat(event.file) - let fileListLen = this[`fileList${event.name}`].length - console.log("list",lists) - lists.map((item) => { - this.nameList.push({name: item.name}); - this[`fileList${event.name}`].push({ - ...item, - status: 'uploading', - message: '上传中' - }) - }) - console.log("nameList",this.nameList) - for (let i = 0; i < lists.length; i++) { - const result = await this.uploadFilePromise(lists[i].url) - let item = this[`fileList${event.name}`][fileListLen] - this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { - status: 'success', - message: '', - url: result - })) - fileListLen++ - } - }, - uploadFilePromise(url) { - return new Promise((resolve, reject) => { - let a = uni.uploadFile({ - url: VUE_APP_BASE_URL + '/attachment/uploadMeasureImage/key', - filePath: url, - name: 'file', - header: { - 'tk':uni.getStorageSync('tk'), - 'uid': uni.getStorageSync('uid') - }, - formData: { - id: this.detailData.id, - module: 'naturalDisasterPath' - }, - success: (res) => { - setTimeout(() => { - resolve(res.data.data) - }, 1000) - } - }); - }) - }, - } - } - -</script> - -<style lang='scss' scoped> -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - /* justify-content: center; */ - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - /* margin-left: 20px; */ - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} - -.measureCard{ - display: flex; - flex-direction: column; - background: #fff; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - margin: 12px 12px 20px; - border-radius: 5px; - padding: 30px 12px; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.statusBar{ - background-color:lightgrey; -} -.first{ - display: flex; - flex-direction: column; -} -.second{ - display: flex; - flex-direction: column; - margin-top: 30px; -} -.third{ - display: flex; - flex-direction: column; - margin-top: 30px; - margin-bottom: 50px; -} -/deep/ .u-upload__button{ - background-color: white; -} -.pic{ - display: flex; - flex-direction: column; - background-color: rgb(242,242,242); - padding: 5px 8px; -} -.picItem{ - font-weight: 500; - margin-top: 5px; - font-size: 14px; - display: flex; - image{ - width: 20px; - height: 20px; - margin-right:3px; - } -} -.measures{ - margin-top: 50px 12px 0; - padding: 0 12px; - - .measureBtn{ - border-radius: 5px; - box-shadow: 0 3px 12px rgba(33,239,102,0.4); - } -} - -/* .btn{ - position: fixed; - bottom: var(--window-bottom, 1); - z-index: 99; -} */ -</style> \ No newline at end of file diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue deleted file mode 100644 index effb756..0000000 --- a/pages/tabBar/notice/notice.vue +++ /dev/null @@ -1,497 +0,0 @@ -<template> - <view class="box" > - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view class="navBar" > - <view class="barText">{{user.name}}收到的工作通知</view> - <view > - <u-button type="text" @click="loginOut" style="color: #1890ff;margin-right: 5px;width: 65px;">退出</u-button> - </view> - <!-- <view class="barText">{{registerID}}</view> --> - <!-- <view style="flex: 1;" @click="loginOut">退出</view> --> - </view> - </view> - <div v-if="loading" style='display: flex;justify-content: center;position: absolute;width:100%;top: 40%;left: 0'> - <u-loading-icon></u-loading-icon> - </div> - <!-- 页面内容 --> - <view class="controlBar"> - <view class="buttonGroup"> - <view class="buttonItem all" - :class="{ 'active': selectedSaleAnalysis === 'all'}" - @click="handleButtonClick({label: 'all',name: '全部'})"> - 全部 - </view> - <view v-for="(button, index) in buttons" :key="index" class="buttonItem" - :class="{ 'active': selectedSaleAnalysis === button.label, - 'red': button.label === 'red', - 'orange':button.label === 'orange', - 'yellow':button.label === 'yellow', - 'blue': button.label === 'blue'}" - @click="handleButtonClick(button)"> - {{ button.name }} - </view> - </view> - <view class="listHead"> -<!-- <view class="switchBtn"> - <u-checkbox-group> - <u-checkbox v-model="isReadOnly" @change="chooseRead"></u-checkbox> - </u-checkbox-group> - <text>只显示未读</text> - </view> --> - <view class="switchBtn"> - <u-switch v-model="checked" size="20" @change="clickSwitch" style="margin-right: 6px"></u-switch> - <text>仅紧临</text> - </view> - </view> - </view> - <view style="display: flex;flex-direction: column;margin-bottom: 55px;"> - <view class="noticeList"> -<!-- <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" @click="toDetail(item)"> - <view class="content" v-if="item.isResponse" > - <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}} - </u-button> - <u-button v-else-if="item.buttonContent == '待叫应'" type="error" size="mini" style="margin-bottom: 10px;" @click="openDialog(item)"> - {{item.buttonContent}} - </u-button> - <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> - {{item.buttonContent}} - </u-button> --> - <!-- </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;"> --> - <!-- <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> - <u-button v-else-if="item.buttonContent == '未叫应'" type="error" size="mini" style="margin-bottom: 10px;" @click="openDialog(item)"> - {{item.buttonContent}} - </u-button> - <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> - {{item.buttonContent}} - </u-button> --> - <!-- </view> --> - </view> - </view> - </scroll-view> -<!-- </view>--> - <view v-else> - <u-empty margin-top="40%" text="数据为空" mode="data"></u-empty> - </view> - </view> - </view> - <view class="lastbottom">共<span style="font-weight: 600;"> {{noticeList.length}} </span>条 未叫应<span style="font-weight: 600;">{{noSpeak}}</span> 条</view> - <dia ref="showDialog" @close="close"></dia> - <tabBar :currentPagePath="page" :tabBarList="tabBarLists"></tabBar> - </view> -</template> - -<script> - import { getNotice, update,confirm } from '../../../api/notice'; - import dia from './dialog.vue'; - import tabBar from '../tabBarIndex.vue' - export default { - components:{ - dia, - tabBar - }, - data() { - return { - noSpeak: 0, - tabBarLists: [], - // 状态栏高度 - statusBarHeight: 0, - checked: false, - isReadOnly: false, - showDialog: false, - data: { - pageIndex: 1, - pageSize: 10, - searchParams: { - emergType: null,//1-紧急;2-常规 - warningLevel: null,//1-红色预警;2-橙色预警;3-黄色预警;4-蓝色预警 - readStatus: null//0-未读,1-已读 - } - }, - total: 0, - scrollTop: 0, - loading: false, - buttons: [{ - label: 'red', - name: '红' - }, - { - label: 'orange', - name: '橙' - }, - { - label: 'yellow', - name: '黄' - }, - { - label: 'blue', - name: '蓝' - }, - ], - selectedSaleAnalysis: 'all', - noticeListCopy: [], - noticeListCopyRead:[], - noticeList: [], - user: { - name: '' - }, - page: 'pages/tabBar/notice/notice', - registerID: '', - } - }, - onShow () { - this.data.pageIndex = 1 - this.tabBarLists = uni.getStorageSync('tabBarList'); - this.user.name = uni.getStorageSync('user').realName; - this.getNoticeList(); - // this.registerID = uni.getStorageSync('registrationID'); - // this.page = this.$route.meta.pagePath; - }, - onLoad() { - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - // uni.startPullDownRefresh(); - }, - methods: { - loginOut() { - uni.clearStorageSync(); - uni.clearStorage(); - uni.navigateTo({ - url: '/pages/index/index' - }) - }, - getNoticeList() { - this.loading = true - this.noSpeak = 0; - // 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 => { - if (res.code == 100) { - // this.noticeList = res.data ? res.data : []; - let list = res.data?res.data: []; - if (res.pageIndex != 1) { - this.noticeList = this.noticeList.concat(list) - } else { - this.noticeList = list; - } - this.total = res.total - this.noticeListCopy = this.noticeList; - if (this.noticeList.length > 0) { - this.noticeList.forEach((item, index) => { - if(item.responseStatus == 1){ - this.noSpeak++; - } - 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 ? '已叫应' : '超时未叫应'; - }); - } - }else{ - uni.$u.toast(res.msg) - } - this.loading = false - }).catch(err=>{ - }) - }, - handleButtonClick(button) { - this.data.pageIndex = 1 - this.selectedSaleAnalysis = button.label; - this.getNoticeList(); - }, - chooseRead(e) { - this.isReadOnly = e; - this.getNoticeList(); - // if(e) { - // this.noticeList = this.noticeList.filter(item => item.isRead == false); - // }else { - // this.getNoticeList(); - // } - }, - toDetail(item) { - console.log("item",item) - //改为修改叫应状态 - if (item.responseStatus === 1) { - this.updateResponseStatus(item); - } - uni.setStorageSync('fdetailData', item); - uni.setStorageSync('backFlag','notice'); - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item)) - }) - }, - updateResponseStatus(item) { - confirm({id: item.id}).then(res => {}); - }, - openDialog(item){ - this.$refs.showDialog.id = item.id; - this.$refs.showDialog.open(); - console.log("点击",this.showDialog) - }, - close(){ - console.log("触发close") - this.getNoticeList(); - }, - // loginOut() { - // uni.removeStorageSync('tk'); - // uni.removeStorageSync('uid'); - // uni.removeStorageSync('user'); - // uni.navigateTo({ - // url: `/pages/index/index` - // }) - // }, - //下拉刷新 - onPullDownRefresh() { - console.log('refresh'); - setTimeout(() => { - uni.stopPullDownRefresh(); - this.getNoticeList(); - }, 2000); - }, - - upper: function(e) { - // console.log(e) - }, - lower: function(e) { - if (this.data.pageIndex * this.data.pageSize >= this.total){ - // uni.$u.toast('已加载全部数据') - return - } - //并且让页码+1,调用获取数据的方法获取第二页数据 - this.data.pageIndex++ - //此处调用自己获取数据列表的方法 - this.getNoticeList() - }, - scroll: function(e) { - // console.log(e) - }, - - clickSwitch(e) { - this.data.pageIndex = 1 - this.getNoticeList(); - }, - } - } -</script> - -<style lang="scss" scoped> -.box { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - margin-left: 35px; - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.statusBar{ - background-color:lightgrey; -} -/* .navBarBox .navBar .logo { - width: 82rpx; - height: 82rpx; - margin-right: 10rpx; -} */ - -.controlBar{ - margin: 12px 12px 0; - padding: 12px; - height: 90px; - box-sizing: border-box; - display: flex; - flex-direction: column; - justify-content: space-between; - width: calc(100% - 24px); - background: #fff; - border-radius: 5px; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - - .buttonGroup{ - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 12px; - } - - .listHead{ - display: flex; - align-items: center; - justify-content: flex-end; - } -} - -.buttonItem{ - width: calc(20% - 4px); - color: white; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - height: 30px; - border-radius: 5px; - &.active{ - border: 1px solid rgba(0,0,0,.4); - box-shadow: 0 1px 3px rgba(0,0,0,0.1); - } -} -.buttonAll{ - margin-left:5px; - color: white; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 35px; - height: 30px; - border-radius: 5px; - font-size: 12px; - font-weight: 700; -} -.all { - background-color: rgb(17,204,33); - &.active{ - background-image: linear-gradient(#22992d,#12da23); - } -} -.active { - border: 1.5px solid #8d8d8d; -} -.red { - background-color: #ff5555; - &.active{ - background:linear-gradient(#dc2f2f, #ff5b5b); - } -} -.orange { - background-color: rgb(251, 158, 13); - &.active{ - background: linear-gradient(#e28e0c,#ffa90e); - } -} -.yellow { - background-color: rgb(255, 223, 37); - &.active{ - background: linear-gradient(#e6c921,#ffef28); - } -} -.blue { - background-color: #409EFF; - &.active{ - background: linear-gradient(#3a8ee6,#44a9ff); - } -} -.switchBtn{ - display: flex; - align-items: center; -} - -.noticeList{ - margin-top: 12px; - height: calc(100vh - 286px); - overflow: hidden; - overflow-y: scroll; -} - -.listContent{ - display: flex; - flex-direction: column; - width: calc(100% - 24px); - margin: 0 12px; - background: #fff; - border-radius: 5px; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - height: 100%; - // margin-bottom: 30px; -} -.itemContent{ - font-size: 16px; - color: #333; - margin-top: 15px; - padding: 0 12px 15px; - border-bottom: 1px solid #ebebeb; - - //&: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; - margin-bottom: 10px; -} -.lastbottom{ - width: 100%; - height: 40px; - background-color: white; - text-align: center; - line-height: 40px; - position: fixed; - bottom: 50px; - z-index: 99; - font-size: 16px; - box-shadow: 0 -3px 12px rgba(0,0,0,0.04); - border-radius: 5px 5px 0 0; - span{ - margin: 0 2px; - } -} -</style> diff --git a/pages/tabBar/response/response.vue b/pages/tabBar/response/response.vue deleted file mode 100644 index 35d8554..0000000 --- a/pages/tabBar/response/response.vue +++ /dev/null @@ -1,229 +0,0 @@ -<template> - <view> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view class="navBar"> - <view class="barText">叫应记录</view> - <view > - <u-button type="text" @click="loginOut" style="color: #1890ff;margin-right: 5px;width: 65px;">退出</u-button> - </view> - </view> - </view> - <div v-if="loading" style='display: flex;justify-content: center;position: absolute;width:100%;top: 40%;left: 0'> - <u-loading-icon></u-loading-icon> - </div> - <!-- 页面内容 --> - - <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" @click="toDetail(item)"> - <view class="contentRight"> - <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 v-else> - <u-empty - mode="data" - icon="http://cdn.uviewui.com/uview/empty/data.png" - margin-top="50%"> - </u-empty> - </view> - <tabBar :currentPagePath="page"></tabBar> - </view> -</template> - -<script> - import { getResponse, getDetail } from '../../../api/response.js' - import tabBar from '../tabBarIndex.vue' - export default { - components:{ - tabBar - }, - data() { - return { - data: { - pageIndex: 1, - pageSize: 10 - }, - total: 0, - scrollTop: 0, - loading: false, - // 状态栏高度 - statusBarHeight: 0, - responseList: [], - page: 'pages/tabBar/response/response' - } - }, - onShow () { - this.data.pageIndex = 1 - this.getResponseList(); - }, - onLoad() { - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - methods: { - loginOut() { - uni.clearStorageSync(); - uni.clearStorage(); - uni.navigateTo({ - url: '/pages/index/index' - }) - }, - getResponseList() { - this.loading = true - - - getResponse(this.data).then(res => { - if (res.code === 100) { - let list = res.data ? res.data : []; - if (res.pageIndex != 1) { - this.responseList = this.responseList.concat(list) - } else { - this.responseList = list; - } - this.total = res.total - if (this.responseList.length > 0) { - 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 + ' 进行了“已安排部署”叫应。'; - }) - } - }else { - uni.$u.toast(res.msg) - this.responseList = []; - } - this.loading = false - }).catch(err=>{}) - }, - toDetail(item) { - console.log("de",item) - getDetail({id: item.id}).then(res => { - console.log("response",res) - if(res.code == 100) { - uni.setStorageSync('fdetailData', res.data); - uni.setStorageSync('backFlag','response'); - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(res.data)) - }) - } - }); - }, - //下拉刷新 - onPullDownRefresh() { - console.log('refresh'); - setTimeout(() => { - uni.stopPullDownRefresh(); - this.getResponseList(); - }, 2000); - }, - - upper: function(e) { - // console.log(e) - }, - lower: function(e) { - if (this.data.pageIndex * this.data.pageSize >= this.total){ - // uni.$u.toast('已加载全部数据') - return - } - //并且让页码+1,调用获取数据的方法获取第二页数据 - this.data.pageIndex++ - //此处调用自己获取数据列表的方法 - this.getResponseList() - }, - scroll: function(e) { - // console.log(e) - }, - } - } -</script> - -<style lang="scss" scoped> -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - margin-left: 55px; - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.statusBar{ - background-color:lightgrey; -} -.responseList{ - display: flex; - flex-direction: column; - width: calc(100% - 24px); - height: calc(100vh - 124px); - margin: 12px 12px 0; - background: #fff; - border-radius: 5px; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - -} -.itemContent{ - color: #333; - margin-top: 15px; - padding: 0 12px; - border-bottom: 1px solid #ebebeb; - - .timeLeft{ - display: flex; - align-items: center; - justify-content: left; - margin-bottom: 15px; - color: #11cc21; - } - .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> diff --git a/pages/tabBar/responsivity/cityResponsivity.vue b/pages/tabBar/responsivity/cityResponsivity.vue deleted file mode 100644 index 919e07d..0000000 --- a/pages/tabBar/responsivity/cityResponsivity.vue +++ /dev/null @@ -1,159 +0,0 @@ -<template> - <view class="box"> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view style="display: flex; flex-direction: column;"> - <view class="navBar"> - <u-icon style=" margin-left: -25px;" name="arrow-left" color="black" size="17" @click="goBack" /> - <view class="barText">叫应率统计</view> - </view> - </view> - </view> - <view class="responseCard"> - <table class="table"> - <thead class="head"> - <tr> - <th></th> - <th>叫应情况</th> - <th>乡镇叫应率</th> - <th>详情</th> - </tr> - </thead> - <tbody class="tableBody"> - <tr v-for="(item, index) in tableData" :key="index" > - <td align="center" width="90px">{{ item.unit }}</td> - <td align="center">{{ item.response }}</td> - <td align="center">{{ item.responsivity }}</td> - <td> - <u-button - size="mini" - type="text" - style="color: sandybrown" - @click="toVillage(item)" - >叫应详情 - </u-button></td> - </tr> - </tbody> - </table> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - page: 'pages/tabBar/count/count', - statusBarHeight: '', - tableData: [ - { - unit:'伊犁州', - response: '1', - responsivity: '88.9%' - }, - { - unit:'伊犁州', - response: '1', - responsivity: '88.9%' - }, - { - unit:'伊犁州', - response: '1', - responsivity: '88.9%' - }, - { - unit:'伊犁州', - response: '1', - responsivity: '88.9%' - } - ] - } - - }, - onLoad() { - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - methods: { - goBack() { - console.log("1111") - uni.navigateTo({ - url:'/pages/tabBar/responsivity/countyResponsivity' - }); - }, - toVillage(item) { - uni.navigateTo({ - url: `/pages/tabBar/responsivity/villageResponsivity?data=` + encodeURIComponent(JSON.stringify(item)) - }) - } - } - } - -</script> - -<style lang='scss' scoped> -.box { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.statusBar{ - background-color:lightgrey; -} -.responseCard{ - display: flex; - flex-direction: column; - background: #fff; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - margin: 12px 12px 20px; - border-radius: 5px; - padding: 30px 12px; -} -.table{ - .head{ - color: white; - line-height: 35px; - background-color: rgb(66, 157, 218); - } - .tableBody{ - color: black; - background-color: rgb(207, 223, 241); - line-height: 35px; - } - tr:nth-child(odd+1) { - background-color: rgb(207, 223, 241); /* 设置奇数行颜色 */ - } - tr:nth-child(even) { - background-color: rgb(233, 239, 248); /* 设置偶数行颜色 */ - } -} -</style> \ No newline at end of file diff --git a/pages/tabBar/responsivity/countyResponsivity.vue b/pages/tabBar/responsivity/countyResponsivity.vue deleted file mode 100644 index 45f1c73..0000000 --- a/pages/tabBar/responsivity/countyResponsivity.vue +++ /dev/null @@ -1,217 +0,0 @@ -<template> - <view class="box"> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view style="display: flex; flex-direction: column;"> - <view class="navBar"> - <u-icon style=" margin-left: -25px;" name="arrow-left" color="black" size="17" @click="goBack" /> - <view class="barText">叫应率统计</view> - </view> - </view> - </view> - <view class="responseCard"> - <view class='title'>{{title}}</view> - <table class="table"> - <thead class="head"> - <tr> - <th></th> - <th>处理情况</th> - <th v-if="unittype == 4">叫应时间</th> - <th v-else>转发叫应率</th> - <th v-if="unittype == 4">反馈</th> - <th v-else>详情</th> - </tr> - </thead> - <tbody class="tableBody"> - <tr v-for="(item, index) in tableData" :key="index" > - <td align="center" width="90px">{{ item.receiveUnit }}</td> - <td align="center">{{ item.response }}</td> - <td align="center" v-if="unittype == 4" width="85px">{{ item.responseTime }}</td> - <td align="center" v-else>{{ item.responsivity }}</td> - <td> - <u-button - v-if="unittype == 4" - size="medium" - type="text" - style="color: blue" - @click="toDetail(item)" - >查看 - </u-button> - <u-button - v-else - size="medium" - type="text" - style="color: sandybrown" - @click="toNext(item)" - >叫应详情 - </u-button> - </td> - </tr> - </tbody> - </table> - </view> - </view> -</template> - -<script> - import { getResponseDetail,getMeasureDetail } from '../../../api/notice.js' - export default { - data() { - return { - page: 'pages/tabBar/count/count', - statusBarHeight: '', - tableData: [], - unittype: null, - title: '' - } - - }, - onLoad(options) { - let test = options.data && JSON.parse(decodeURIComponent(options.data)); - console.log("data",test) - this.title = test.title; - this.tableData = test.appPageResponseByIdRespDTOS; - this.unittype = this.tableData[0].unittype; - console.log("unittype",this.tableData) - this.tableData.forEach((item,index) => { - this.tableData[index].response = item.responseStatus ==1 ? '待叫应' :item.responseStatus == 2 ? '已叫应' :'超时未叫应' - this.tableData[index].responsivity = item.forwardRate ? item.forwardRate :'--'; - this.tableData[index].responseTime = item.responseTime ? item.responseTime :'--'; - }) - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - methods: { - goBack() { - uni.switchTab({ - url:'/pages/tabBar/current/current' - }); - }, - toNext(item) { - if(item.forwardWarnInfoId != null){ - const param = { - pageIndex: 1, - pageSize: 100, - searchParams: { - warnInfoId: item.forwardWarnInfoId - } - } - getResponseDetail(param).then(res => { - if(res.code == 100){ - this.tableData = res.data.appPageResponseByIdRespDTOS; - this.unittype = this.tableData[0].unittype; - this.tableData.forEach((item,index) => { - this.tableData[index].response = item.responseStatus ==1 ? '待叫应' :item.responseStatus == 2 ? '已叫应' :'超时未叫应' - this.tableData[index].responsivity = item.forwardRate ? item.forwardRate :'--' - }) - } - }) - }else { - uni.showToast({ - icon: 'none', - title: '暂无下级转发数据', - duration: 3000 - }) - } - }, - toDetail(item){ - console.log("d",item) - getMeasureDetail({id: item.id}).then(res => { - if(res.code == 100){ - if(res.data.baseMeasures && res.data.baseMeasures.length>0 ){ - uni.setStorageSync('backMeasures','county') - let obj = { - title: this.title, - appPageResponseByIdRespDTOS: this.tableData //this.tableDate - } - console.log("obj",obj) - uni.setStorageSync('countyDetail', obj) - uni.navigateTo({ - url: `/pages/tabBar/responsivity/showMeasures?data=` + encodeURIComponent(JSON.stringify(res.data)) - }) - }else{ - uni.showToast({ - icon: 'none', - title: '该记录暂无响应措施', - duration: 3000 - }) - } - } - }) - } - } - } - -</script> - -<style lang='scss' scoped> -.box { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.statusBar{ - background-color:lightgrey; -} -.responseCard{ - display: flex; - flex-direction: column; - background: #fff; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - margin: 12px 12px 20px; - border-radius: 5px; - padding: 20px 12px; -} -.table{ - .head{ - color: white; - line-height: 35px; - background-color: rgb(66, 157, 218); - } - .tableBody{ - color: black; - background-color: rgb(207, 223, 241); - line-height: 35px; - } - tr:nth-child(odd+1) { - background-color: rgb(207, 223, 241); /* 设置奇数行颜色 */ - } - tr:nth-child(even) { - background-color: rgb(233, 239, 248); /* 设置偶数行颜色 */ - } -} -.title{ - text-align: center; - font-size: 16px; - font-weight: 600; - margin-bottom: 20px; -} -</style> \ No newline at end of file diff --git a/pages/tabBar/responsivity/showMeasures.vue b/pages/tabBar/responsivity/showMeasures.vue deleted file mode 100644 index 59211e8..0000000 --- a/pages/tabBar/responsivity/showMeasures.vue +++ /dev/null @@ -1,194 +0,0 @@ -<template> - <view> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view class="navBar"> - <u-icon name="arrow-left" color="black" style="margin-left: 10px;" size="17" @click="goBack" /> - <view class="barText">响应措施反馈</view> - </view> - </view> - <view class="measureCard"> - <view class="head"> - <u-form :model="form" ref="uForm" label-width="80px"> - <u-form-item label="信息标题 :" >{{form.title}}</u-form-item> - <u-form-item label="发布单位 :">{{form.publishingUnit}}</u-form-item> - <u-form-item label="发布时间 :">{{form.publishingTime}}</u-form-item> - <u-form-item label="反馈时间 :">{{form.measureSubmitTime}}</u-form-item> - </u-form> - </view> - <view class="first" v-if="measureList"> - <text style="font-size: 18px;margin-bottom: 20px;font-weight: 600;">基础措施</text> - <view v-for="(item, index) in measureList" :key="index" style="margin-left: 18px;margin-bottom:10px; font-size:15px;"> - <text style="margin-top: 15px;">{{item}}</text> - </view> - </view> - <view class="second" v-if="measures" > - <text style="font-size: 18px;margin-bottom: 20px;font-weight: 600;">补充措施</text> - <u--textarea style="margin-top: -5px;" v-model="measures" disabled placeholder="请输入内容" ></u--textarea> - </view> - <view class="third"> - <view v-for="(item, index) in images" :key="index"> - <u-image @click="previewSqs(item,index)" style="margin: 5px; 5px" width="180rpx" height="180rpx" :src="item.url"></u-image> - </view> - </view> - </view> - </view> -</template> - -<script> - import VUE_APP_BASE_URL from '../../../common/constant.js' - export default { - components:{ - - }, - data() { - return { - statusBarHeight: [], - fileList1: [], - nameList: [], - checkboxValue1: '', - measures: "", - type: 'textarea', - border: true, - height: 100, - autoHeight: true, - form: { - }, - measureList: [], - images: [] - } - }, - onLoad(options) { - let test = options.data && JSON.parse(decodeURIComponent(options.data)); - console.log("tes111t",test) - this.form = test; - this.measures = this.form.responseMeasure; - this.measureList = this.form.baseMeasures; - if(this.form.attachments && this.form.attachments.length>0){ - this.images = this.form.attachments.map((item) => { - return {url: VUE_APP_BASE_URL + item.attachment}; - }); - }else { - this.images = []; - } - console.log("img",this.images) - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - methods: { - goBack() { - console.log(uni.getStorageSync('backMeasures'),'222222') - if(uni.getStorageSync('backMeasures') == 'detail'){ - uni.navigateTo({ - url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(uni.getStorageSync("fdetailData"))) - }) - }else if (uni.getStorageSync('backMeasures') == 'county'){ - console.log("countyDetail",uni.getStorageSync('countyDetail')) - uni.navigateTo({ - url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(uni.getStorageSync("countyDetail"))) - }) - } - - }, - //预览图片 - previewSqs(item,index) { - let imgs = []; - for (let i = 0; i < this.images.length; i++) { - imgs.push(this.images[i].url) - } - console.log("预览",imgs) - uni.previewImage({ - urls: imgs, - current: index, - indicator: 'number', - loop: true - }) - }, - } - } - -</script> - -<style lang='scss' scoped> -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - /* justify-content: center; */ - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - /* margin-left: 20px; */ - text-align: center; - width: 90%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} - -.measureCard{ - display: flex; - flex-direction: column; - background: #fff; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - margin: 12px 12px 20px; - border-radius: 5px; - padding: 30px 12px; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.statusBar{ - background-color:lightgrey; -} -.first{ - display: flex; - flex-direction: column; -} -.second{ - display: flex; - flex-direction: column; - margin-top: 30px; -} -.third{ - display: flex; - flex-wrap: wrap; - margin-top: 30px; - margin-bottom: 50px; -} -/deep/ .u-upload__button{ - background-color: white; -} -.pic{ - display: flex; - flex-direction: column; - background-color: rgb(242,242,242); - margin-top: 5px; - font-size: 14px; -} - -.measures{ - margin-top: 50px 12px 0; - padding: 0 12px; - - .measureBtn{ - border-radius: 5px; - box-shadow: 0 3px 12px rgba(33,239,102,0.4); - } -} -.head{ - margin-top: -20px; - margin-bottom: 20px; - line-height: 15px; -} -</style> \ No newline at end of file diff --git a/pages/tabBar/responsivity/villageResponsivity.vue b/pages/tabBar/responsivity/villageResponsivity.vue deleted file mode 100644 index 0ee4a02..0000000 --- a/pages/tabBar/responsivity/villageResponsivity.vue +++ /dev/null @@ -1,159 +0,0 @@ -<template> - <view class="box"> - <!-- 自定义导航栏 --> - <view class="navBarBox fix"> - <!-- 状态栏占位 --> - <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view> - <!-- 真正的导航栏内容 --> - <view style="display: flex; flex-direction: column;"> - <view class="navBar"> - <u-icon style=" margin-left: -25px;" name="arrow-left" color="black" size="17" @click="goBack" /> - <view class="barText">叫应率统计</view> - </view> - </view> - </view> - <view class="responseCard"> - <table class="table"> - <thead class="head"> - <tr> - <th></th> - <th>叫应情况</th> - <th>叫应时间</th> - <th>反馈</th> - </tr> - </thead> - <tbody class="tableBody"> - <tr v-for="(item, index) in tableData" :key="index" > - <td align="center" width="90px">{{ item.unit }}</td> - <td align="center">{{ item.response }}</td> - <td align="center" width="90px">{{ item.responseTime }}</td> - <td><u-button - size="mini" - style="color:blue" - type="text" - @click="review(item)" - >查看 - </u-button> - </td> - </tr> - </tbody> - </table> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - page: 'pages/tabBar/count/count', - statusBarHeight: '', - tableData: [ - { - unit:'萨依布依街道', - response: '1', - responseTime: '6.19 13:00' - }, - { - unit:'伊犁州', - response: '1', - responseTime: '6.19 13:00' - }, - { - unit:'伊犁州', - response: '1', - responseTime: '6.19 13:00' - }, - { - unit:'伊犁州', - response: '1', - responseTime: '6.19 13:00' - } - ] - } - - }, - onLoad() { - //获取手机状态栏高度 - this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; - uni.hideTabBar(); - }, - methods: { - goBack() { - console.log("1111") - uni.switchTab({ - url:'/pages/tabBar/current/current' - }); - }, - review(item){ - uni.navigateTo({ - url:'/pages/tabBar/responsivity/showMeasures' - }); - } - } - } - -</script> - -<style lang='scss' scoped> -.box { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} -.fix{ - position: sticky; - top: 0; - left: 0; - right: 0; - width: 100%; - z-index: 1; -} -.navBarBox .navBar { - background-color:#fff; - height: 50px; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); -} -.barText{ - text-align: center; - width: 85%; - font-size: 16px; - /* text-align: center; */ - font-weight: 600; -} -.statusBar{ - background-color:lightgrey; -} -.responseCard{ - display: flex; - flex-direction: column; - background: #fff; - box-shadow: 0 3px 12px rgba(0,0,0,0.05); - margin: 12px 12px 20px; - border-radius: 5px; - padding: 30px 12px; -} -.table{ - .head{ - color: white; - line-height: 35px; - background-color: rgb(66, 157, 218); - } - .tableBody{ - color: black; - background-color: rgb(207, 223, 241); - line-height: 35px; - } - tr:nth-child(odd+1) { - background-color: rgb(207, 223, 241); /* 设置奇数行颜色 */ - } - tr:nth-child(even) { - background-color: rgb(233, 239, 248); /* 设置偶数行颜色 */ - } -} -</style> \ No newline at end of file diff --git a/pages/tabBar/tabBarIndex.vue b/pages/tabBar/tabBarIndex.vue index 41b04ae..fba257b 100644 --- a/pages/tabBar/tabBarIndex.vue +++ b/pages/tabBar/tabBarIndex.vue @@ -65,6 +65,8 @@ border-radius: 99px; overflow: hidden; box-shadow: 0 -6px 10px rgba(150, 150, 150, 0.1), 0 6px 10px rgba(150, 150, 150, 0.1); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); /deep/ .u-tabbar .u-border-top{ border-color: rgba(0,0,0,0) !important; diff --git a/pages/tabBar/utils/tabBar.js b/pages/tabBar/utils/tabBar.js index a01d8d9..194fc09 100644 --- a/pages/tabBar/utils/tabBar.js +++ b/pages/tabBar/utils/tabBar.js @@ -27,28 +27,10 @@ const user_other = [ { - "pagePath": "pages/tabBar/notice/notice", - "iconPath": "/static/notice.png", - "selectedIconPath": "/static/notice-sel.png", - "text": "工作通知" - }, - { - "pagePath": "pages/tabBar/response/response", - "iconPath": "/static/mine1.png", - "selectedIconPath": "/static/mine1-selected.png", - "text": "我的叫应" - }, - { "pagePath": "pages/tabBar/current/current", "iconPath": "/static/send.png", "selectedIconPath": "/static/send_selected.png", "text": "我发布的" - }, - { - "pagePath": "pages/tabBar/information/information", - "iconPath": "/static/send.png", - "selectedIconPath": "/static/send_selected.png", - "text": "信息发布" } ] diff --git a/static/c1.png b/static/c1.png deleted file mode 100644 index 9d38fdc..0000000 --- a/static/c1.png +++ /dev/null Binary files differ diff --git a/static/c2.png b/static/c2.png deleted file mode 100644 index ce956d7..0000000 --- a/static/c2.png +++ /dev/null Binary files differ diff --git a/static/c3.png b/static/c3.png deleted file mode 100644 index 216202a..0000000 --- a/static/c3.png +++ /dev/null Binary files differ diff --git a/static/c4.png b/static/c4.png deleted file mode 100644 index fb8b477..0000000 --- a/static/c4.png +++ /dev/null Binary files differ diff --git a/static/c5.png b/static/c5.png deleted file mode 100644 index 310bfb1..0000000 --- a/static/c5.png +++ /dev/null Binary files differ diff --git a/static/c6.png b/static/c6.png deleted file mode 100644 index c3c45d8..0000000 --- a/static/c6.png +++ /dev/null Binary files differ diff --git a/static/c7.png b/static/c7.png deleted file mode 100644 index a1e7390..0000000 --- a/static/c7.png +++ /dev/null Binary files differ diff --git a/static/c8.png b/static/c8.png deleted file mode 100644 index c32633c..0000000 --- a/static/c8.png +++ /dev/null Binary files differ diff --git a/static/c9.png b/static/c9.png deleted file mode 100644 index 51bcf6a..0000000 --- a/static/c9.png +++ /dev/null Binary files differ diff --git a/static/count.png b/static/count.png deleted file mode 100644 index afea2f9..0000000 --- a/static/count.png +++ /dev/null Binary files differ diff --git a/static/count1.png b/static/count1.png deleted file mode 100644 index bef55a4..0000000 --- a/static/count1.png +++ /dev/null Binary files differ diff --git a/static/count_sel.png b/static/count_sel.png deleted file mode 100644 index 418734f..0000000 --- a/static/count_sel.png +++ /dev/null Binary files differ diff --git a/static/data.png b/static/data.png deleted file mode 100644 index 67353e7..0000000 --- a/static/data.png +++ /dev/null Binary files differ diff --git a/static/login.jpg b/static/login.jpg deleted file mode 100644 index 9948ebd..0000000 --- a/static/login.jpg +++ /dev/null Binary files differ diff --git a/static/login1.jpg b/static/login1.jpg deleted file mode 100644 index 9e7ffb2..0000000 --- a/static/login1.jpg +++ /dev/null Binary files differ diff --git a/static/loginTop.png b/static/loginTop.png deleted file mode 100644 index 33474eb..0000000 --- a/static/loginTop.png +++ /dev/null Binary files differ diff --git a/static/notice1-selected.png b/static/notice1-selected.png deleted file mode 100644 index cbc14af..0000000 --- a/static/notice1-selected.png +++ /dev/null Binary files differ diff --git a/static/notice1.png b/static/notice1.png deleted file mode 100644 index 772c8f4..0000000 --- a/static/notice1.png +++ /dev/null Binary files differ diff --git a/static/shu.jpg b/static/shu.jpg deleted file mode 100644 index ef8a790..0000000 --- a/static/shu.jpg +++ /dev/null Binary files differ diff --git a/static/we.png b/static/we.png deleted file mode 100644 index 9972d4e..0000000 --- a/static/we.png +++ /dev/null Binary files differ diff --git a/static/weather.png b/static/weather.png deleted file mode 100644 index 5ba0669..0000000 --- a/static/weather.png +++ /dev/null Binary files differ diff --git a/static/weather_sel.png b/static/weather_sel.png deleted file mode 100644 index d584878..0000000 --- a/static/weather_sel.png +++ /dev/null Binary files differ -- Gitblit v1.9.2