feat(): 新增汛情简报
parent
f41bf1d1e0
commit
60b3e4449a
3
main.js
3
main.js
|
|
@ -8,7 +8,8 @@ import {
|
|||
} from '@escook/request-miniprogram'
|
||||
Vue.config.productionTip = false
|
||||
uni.$http = $http
|
||||
$http.baseUrl = 'http://223.75.53.141:83'
|
||||
// $http.baseUrl = 'http://223.75.53.141:83'
|
||||
$http.baseUrl = 'http://local.gunshiiot.com:18083'
|
||||
// 请求拦截器
|
||||
$http.beforeRequest = function (options) {
|
||||
if (options.url.indexOf('/doLogin') == -1) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name" : "檀树岗水库",
|
||||
"appid" : "__UNI__33ED56F",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 1,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
|
|
|
|||
12
pages.json
12
pages.json
|
|
@ -201,6 +201,18 @@
|
|||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/briefList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/briefList/detail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/messageList/detail/index",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,204 @@
|
|||
<template>
|
||||
<view
|
||||
:style="{ height: '100vh', overflow: 'hidden', backgroundColor: '#f0f0f0' }"
|
||||
>
|
||||
<u-navbar
|
||||
title="汛情简报"
|
||||
:autoBack="true"
|
||||
:titleStyle="{
|
||||
fontSize: '18px',
|
||||
}"
|
||||
:height="44"
|
||||
:safeAreaInsetTop="true"
|
||||
leftIconSize="20"
|
||||
leftIconColor="rgb(153, 153, 153)"
|
||||
>
|
||||
</u-navbar>
|
||||
<view
|
||||
class=""
|
||||
style="
|
||||
margin-top: 44px;
|
||||
background-color: #f0f0f0;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
"
|
||||
>
|
||||
<view
|
||||
class=""
|
||||
v-for="item in list"
|
||||
style="margin: 10px; background-color: #fff; padding: 10px"
|
||||
>
|
||||
<view class="contentItem">
|
||||
<view class="itemC">
|
||||
<text>标题</text>
|
||||
<text>{{ getTitleDate(item.date) }}汛情简报</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>发布时间</text>
|
||||
<text>{{ item.date }}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<view class="itemNo" style="flex-direction: column">
|
||||
<text>消息内容</text>
|
||||
<view class="textContent">
|
||||
<span style="margin-left: 15px">{{ briefTime(item.date) }}</span
|
||||
>8时,过去24小时最大累计降雨量
|
||||
<span class="xqjb-redColor">{{ item.drp24Sum }}mm</span>(<span
|
||||
class="xqjb-redColor"
|
||||
>{{ item.sumStnm }}</span
|
||||
>),最大点雨量
|
||||
<span class="xqjb-redColor">{{ item.drp24Max }}mm/h</span>(<span
|
||||
class="xqjb-redColor"
|
||||
>{{ item.maxStnm }},{{ raimTime(item.maxTm) }}</span
|
||||
>)。当前水库水位
|
||||
<span class="xqjb-redColor">{{ item.rz8 }}m</span
|
||||
>,汛限水位(<span>{{ item.flLowLimLev }}m</span>),较昨日
|
||||
<span class="xqjb-redColor"
|
||||
>{{ increaseWater(item.rz8, item.rzYesterday8) }}m</span
|
||||
>,库容达
|
||||
<span class="xqjb-redColor">{{ item.w }}万m³</span>。--
|
||||
<span>{{ endDataString(item.date) }}</span>
|
||||
</view>
|
||||
<!-- <u--textarea
|
||||
v-model="item.content"
|
||||
placeholder="请输入内容"
|
||||
disabled
|
||||
></u--textarea> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-calendar
|
||||
:show="show"
|
||||
mode="range"
|
||||
@confirm="confirm"
|
||||
@cancel="cancel"
|
||||
></u-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
model: {
|
||||
stm: "",
|
||||
etm: "",
|
||||
},
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log("JSON.parse(options.item)", JSON.parse(options.item));
|
||||
|
||||
this.list.push(JSON.parse(options.item));
|
||||
},
|
||||
methods: {
|
||||
endDataString(date) {
|
||||
return moment(date).subtract(1, "days").format("YYYY-MM-DD 08:00");
|
||||
},
|
||||
increaseWater(rz8, rzYesterday8) {
|
||||
let values = "";
|
||||
if (rz8 && rzYesterday8) {
|
||||
let dob = (rz8 - rzYesterday8).toFixed(2);
|
||||
values = dob > 0 ? `上涨${Math.abs(dob)}` : `下降${Math.abs(dob)}`;
|
||||
}
|
||||
return values;
|
||||
},
|
||||
raimTime(maxTm) {
|
||||
return maxTm ? moment(maxTm).format("D日H时") : "";
|
||||
},
|
||||
briefTime(date) {
|
||||
return date ? moment(date).format("YYYY年M月D日") : "";
|
||||
},
|
||||
getTitleDate(date) {
|
||||
return date ? moment(date).subtract(1, "days").format("YYYY-MM-DD") : "";
|
||||
},
|
||||
confirm(e) {
|
||||
console.log(e);
|
||||
this.model.stm = e[0];
|
||||
this.model.etm = e[1];
|
||||
this.show = false;
|
||||
},
|
||||
cancel() {
|
||||
this.show = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xqjb-redColor {
|
||||
color: #db001b;
|
||||
}
|
||||
.myTitleStyle {
|
||||
font-size: 30px;
|
||||
background-color: red;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.tabsClass {
|
||||
margin-top: 44px;
|
||||
height: 44px;
|
||||
padding: 0 40px;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// justify-content: space-between;
|
||||
.blueTiao {
|
||||
background-color: #007aff;
|
||||
width: 5px;
|
||||
height: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.title {
|
||||
border-width: 0px;
|
||||
font-family: "微软雅黑 Bold", "微软雅黑 Regular", "微软雅黑", sans-serif;
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 15px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.titleRight {
|
||||
display: flex;
|
||||
.border {
|
||||
border-width: 0px;
|
||||
background-color: rgba(236, 245, 255, 1);
|
||||
box-sizing: border-box;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: rgba(187, 220, 255, 1);
|
||||
border-radius: 5px;
|
||||
box-shadow: none;
|
||||
width: 58px;
|
||||
height: 25px;
|
||||
color: #689fff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.contentItem {
|
||||
margin-top: 15px;
|
||||
.itemC {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
color: #666666;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
.itemNo {
|
||||
color: #666666;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,259 @@
|
|||
<template>
|
||||
<view
|
||||
:style="{ height: '100vh', overflow: 'hidden', backgroundColor: '#f0f0f0' }"
|
||||
>
|
||||
<u-status-bar></u-status-bar>
|
||||
<u-navbar
|
||||
title="汛情简报"
|
||||
:autoBack="true"
|
||||
:titleStyle="{
|
||||
fontSize: '18px',
|
||||
}"
|
||||
:height="44"
|
||||
:safeAreaInsetTop="true"
|
||||
leftIconSize="20"
|
||||
leftIconColor="rgb(153, 153, 153)"
|
||||
>
|
||||
</u-navbar>
|
||||
<view
|
||||
class=""
|
||||
style="
|
||||
margin-top: 44px;
|
||||
background-color: #f0f0f0;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
"
|
||||
>
|
||||
<view style="padding:0 10px,backgroundColor:#fff">
|
||||
<view
|
||||
class="time-ranger"
|
||||
style="padding: 10px; margin-bottom: 0; background-color: #fff"
|
||||
>
|
||||
<view class="start-time">
|
||||
<text>开始时间</text>
|
||||
<text
|
||||
@click="showTime = true"
|
||||
style="margin-left: 10%; color: #3399ef"
|
||||
>{{ startTime }}</text
|
||||
>
|
||||
</view>
|
||||
<view class="end-time">
|
||||
<text>结束时间</text>
|
||||
<text
|
||||
@click="showTime1 = true"
|
||||
style="margin: 0 10%; color: #3399ef"
|
||||
>{{ endTime }}</text
|
||||
>
|
||||
<view class="search-btn" @click="searchTm"> 搜索 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="height: calc(100vh - 180px); overflow-y: auto"
|
||||
v-if="list.length !== 0"
|
||||
>
|
||||
<view
|
||||
class=""
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
style="margin: 10px; background-color: #fff; padding: 10px"
|
||||
@click="toDetail(item)"
|
||||
>
|
||||
<view class="item">
|
||||
<view class="align-center">
|
||||
<view class="title">
|
||||
{{ getTitleDate(item.date) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentItem">
|
||||
<view class="itemC">
|
||||
<span style="margin-left: 30px">{{
|
||||
getBriefTime(item.date)
|
||||
}}</span
|
||||
>8时,过去24小时最大累计降雨量
|
||||
<span class="xqjb-redColor">{{ item.drp24Sum }}mm</span>(<span
|
||||
class="xqjb-redColor"
|
||||
>{{ item.sumStnm }}</span
|
||||
>),最大点雨量
|
||||
<span class="xqjb-redColor">{{ item.drp24Max }}mm/h</span>(...
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="
|
||||
height: calc(100vh - 150px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
"
|
||||
v-else
|
||||
>
|
||||
<image src="../../static/empty.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:show="showTime"
|
||||
v-model="stm"
|
||||
mode="datetime"
|
||||
@confirm="showTime = false"
|
||||
@cancel="showTime = false"
|
||||
></u-datetime-picker>
|
||||
<u-datetime-picker
|
||||
:show="showTime1"
|
||||
v-model="etm"
|
||||
mode="datetime"
|
||||
@confirm="showTime1 = false"
|
||||
@cancel="showTime1 = false"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment";
|
||||
const startData = moment().subtract(7, "days").format("YYYY-MM-DD");
|
||||
const endData = moment().format("YYYY-MM-DD");
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
minDate: moment().startOf("year").valueOf(),
|
||||
maxDate: moment().valueOf(),
|
||||
show: false,
|
||||
showTime: false,
|
||||
showTime1: false,
|
||||
start: startData,
|
||||
end: endData,
|
||||
stm: startData,
|
||||
etm: endData,
|
||||
userList: uni.getStorageSync("value").data,
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
onShow(options) {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
computed: {
|
||||
startTime: function () {
|
||||
return this.stm ? moment(this.stm).format("YYYY-MM-DD") : this.start;
|
||||
},
|
||||
endTime: function () {
|
||||
return this.etm ? moment(this.etm).format("YYYY-MM-DD") : this.end;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getTitleDate(date) {
|
||||
return date ? moment(date).subtract(1, "days").format("YYYY-MM-DD") : "";
|
||||
},
|
||||
getBriefTime(date) {
|
||||
return date ? moment(date).format("YYYY年M月D日") : "";
|
||||
},
|
||||
searchTm() {
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
const startDate1 = moment(this.stm).format("YYYY-MM-DD");
|
||||
const endDate1 = moment(this.etm).format("YYYY-MM-DD");
|
||||
uni.$http
|
||||
.get(
|
||||
`/gunshiApp/tsg/resBrief/getResBriefList?startDate=${startDate1}&endDate=${endDate1}`
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.list = res.data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm(e) {
|
||||
console.log(e);
|
||||
this.model.start = e[0];
|
||||
this.model.end = e[1];
|
||||
this.show = false;
|
||||
},
|
||||
cancel() {
|
||||
this.show = false;
|
||||
},
|
||||
toDetail(item) {
|
||||
console.log(item);
|
||||
uni.navigateTo({
|
||||
url: "/pages/briefList/detail/index?item=" + JSON.stringify(item),
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.uni-input-placeholder {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.myTitleStyle {
|
||||
font-size: 30px;
|
||||
background-color: red;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.tabsClass {
|
||||
margin-top: 44px;
|
||||
height: 44px;
|
||||
padding: 0 40px;
|
||||
border-top: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.item {
|
||||
// border-bottom: 1px solid #f0f0f0;
|
||||
padding-bottom: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.blueTiao {
|
||||
background-color: #2a7efa;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
border-width: 0px;
|
||||
font-family: "微软雅黑 Bold", "微软雅黑 Regular", "微软雅黑", sans-serif;
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 15px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.titleRight {
|
||||
display: flex;
|
||||
|
||||
.border {
|
||||
border-width: 0px;
|
||||
background-color: rgba(236, 245, 255, 1);
|
||||
box-sizing: border-box;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: rgba(187, 220, 255, 1);
|
||||
border-radius: 5px;
|
||||
box-shadow: none;
|
||||
width: 58px;
|
||||
height: 25px;
|
||||
color: #689fff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentItem {
|
||||
.itemC {
|
||||
color: #666666;
|
||||
padding: 10px;
|
||||
}
|
||||
.xqjb-redColor {
|
||||
color: #db001b;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -58,7 +58,7 @@
|
|||
} = await uni.$http.get("/gunshiApp/tsg/appVersionRecord/latest");
|
||||
if (data.code == 200) {
|
||||
const selfVersionCode = uni.getSystemInfoSync().appWgtVersion //当前App版本号
|
||||
const newVersionCode = data.data.version; //线上最新版本号
|
||||
const newVersionCode = data.data.version; //线上最新版本号
|
||||
if (selfVersionCode != newVersionCode) {
|
||||
let platform = uni.getSystemInfoSync().platform //手机平台
|
||||
//安卓手机弹窗升级
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
</image>
|
||||
</div>
|
||||
<div class="user">
|
||||
<div class="username">{{this.userList.nickName}}</div>
|
||||
<div class="userresponse">{{this.userList.dept.deptName}}</div>
|
||||
<div class="username">{{userList.nickName}}</div>
|
||||
<div class="userresponse">{{userList.dept.deptName}}</div>
|
||||
</div>
|
||||
</view>
|
||||
<view class="funcBar">
|
||||
|
|
@ -48,6 +48,7 @@
|
|||
url: '/pages/modifyPassword/modifyPassword'
|
||||
},
|
||||
]
|
||||
console.log(uni.getStorageSync('value'));
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@
|
|||
stStcd:'',
|
||||
shStcd:'',
|
||||
imageList:[],
|
||||
baseUrl:'http://223.75.53.141:9102/test.by-lyf.tmp',
|
||||
showImg:'../../static/empty.png'
|
||||
baseUrl:'http://223.75.53.141:83',
|
||||
showImg:'../../static/nopic.png'
|
||||
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@
|
|||
if (this.info.url) {
|
||||
this.isStartDownload = true
|
||||
//开始下载App
|
||||
const baseUrl = `http://223.75.53.141:83/gunshiApp/tsg/common/download/resource?resource=${this.info.url}`
|
||||
// const baseUrl = `http://223.75.53.141:83/gunshiApp/tsg/${this.info.url}`
|
||||
const baseUrl = `http://local.gunshiiot.com:18083/gunshiApp/tsg/${this.info.url}`
|
||||
downloadApp(baseUrl, current => {
|
||||
//下载进度监听
|
||||
this.hasProgress = true
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue