627合并

master
wang@DESKTOP-VRHIPTL 2024-06-27 10:00:59 +08:00
commit cfe7fbba6c
79 changed files with 28840 additions and 4920 deletions

View File

@ -2,12 +2,17 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
var coverSupport =
'CSS' in window &&
typeof CSS.supports === 'function' &&
(CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
(coverSupport ? ', viewport-fit=cover' : '') +
'" />'
)
</script>
<title></title>
<!--preload-links-->

View File

@ -17,7 +17,9 @@
"delay" : 0
},
"modules" : {
"VideoPlayer" : {}
"VideoPlayer" : {},
"Contacts" : {},
"Messaging" : {}
},
/* */
"distribute" : {
@ -39,7 +41,8 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>"
]
},
"ios" : {
@ -67,6 +70,15 @@
},
"vueVersion" : "2",
"h5" : {
"template" : "template.html"
"template" : "template.html",
"sdkConfigs" : {
"maps" : {
"amap" : {
"key" : "4799ff37874e604a22b910b44ca948e5",
"securityJsCode" : "",
"serviceHost" : ""
}
}
}
}
}

11
package-lock.json generated
View File

@ -6,6 +6,7 @@
"packages": {
"": {
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@escook/request-miniprogram": "^0.2.1",
"crypto-js": "^4.2.0",
"echarts": "^4.9.0",
@ -14,6 +15,11 @@
"moment": "^2.30.1"
}
},
"node_modules/@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"node_modules/@escook/request-miniprogram": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/@escook/request-miniprogram/-/request-miniprogram-0.2.1.tgz",
@ -66,6 +72,11 @@
}
},
"dependencies": {
"@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@escook/request-miniprogram": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/@escook/request-miniprogram/-/request-miniprogram-0.2.1.tgz",

View File

@ -1,5 +1,6 @@
{
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@escook/request-miniprogram": "^0.2.1",
"crypto-js": "^4.2.0",
"echarts": "^4.9.0",

View File

@ -4,16 +4,16 @@
},
"pages": [
{
"path" : "pages/login/login",
"style" : {
"navigationBarTitleText" : ""
"path": "pages/login/login",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/rain/rain",
"style" : {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"path": "pages/rain/rain",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
@ -34,6 +34,24 @@
"navigationBarTitleText": ""
}
},
{
"path": "pages/xxsb/fromSeverity",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/xxsb/dsfrom",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/xxsb/map",
"style": {
"navigationBarTitleText": "地图示例"
}
},
{
"path": "pages/gqzq/index",
"style": {
@ -65,118 +83,169 @@
}
},
{
"path" : "pages/personInfo/personInfo",
"path": "pages/personInfo/personInfo",
"style": {
"navigationBarTitleText" : ""
"navigationBarTitleText": ""
}
},
{
"path" : "pages/modifyPassword/modifyPassword",
"style" : {
"navigationBarTitleText" : ""
"path": "pages/modifyPassword/modifyPassword",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/forewarning/forewarning",
"style" : {
"navigationBarTitleText" : ""
}
"path": "pages/forewarning/forewarning",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/forewarning/sh",
"style" : {
"navigationBarTitleText" : ""
}
"path": "pages/forewarning/sh",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/forewarning/shInformation/shInformation",
"style" : {
"navigationBarTitleText" : ""
}
"path": "pages/forewarning/shInformation/shInformation",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/addressBook/addressBook",
"style" : {
"navigationBarTitleText" : ""
}
"path": "pages/addressBook/addressBook",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/water/water",
"style" : {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"path": "pages/water/water",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
},
"onMessage": "handleMessage"
},
{
"path" : "pages/rainDetail/rainDetail",
"style" : {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"path": "pages/rainDetail/rainDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/hdDetail/hdDetail",
"style" : {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"path": "pages/hdDetail/hdDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/skDetail/skDetail",
"style" : {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"path": "pages/skDetail/skDetail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/addressBook/follow",
"style" : {
"navigationBarTitleText" : ""
"path": "pages/addressBook/follow",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/addressBook/myDept",
"style" : {
"navigationBarTitleText" : ""
"path": "pages/addressBook/myDept",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/orderFeedback/orderFeedback",
"style" : {
"navigationBarTitleText" : ""
"path": "pages/orderFeedback/orderFeedback",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/orderFeedback/orderInformation",
"style" : {
"navigationBarTitleText" : ""
"path": "pages/orderFeedback/orderInformation",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/gqxx/gqxx",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/gqxx/qk",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/gqxx/xq",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/gqxx/qkForm",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/gqxx/xqForm",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/zqxx/zqxx",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/zqxx/table",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/gqzq/zqxx/form",
"style": {
"navigationBarTitleText": ""
}
}
],
"usingComponents": {
"map": "/uni_modules/@dcloudio/uni-map/components/uni-map/uni-map"
},
"tabBar": {
"color": "#333333",
"selectedColor": "#eb4450",
"selectedColor": "#59A7FF",
"list": [
{
"pagePath": "pages/homeIndex/index",
"iconPath": "/static/tabs/home.png",
"selectedIconPath": "static/tabs/home1.png",
"text": "首页"
},
{
"pagePath": "pages/addressBook/addressBook",
"iconPath": "/static/tabs/my2_icon@2x.png",
"selectedIconPath": "static/tabs/my2_icon@2x.png",
"text": "通讯录"
},
{
"pagePath": "pages/mypage/mypage",
"iconPath": "/static/images/my1.png",
"selectedIconPath": "static/images/my.png",
"text": "我的"
}
{
"pagePath": "pages/homeIndex/index",
"iconPath": "/static/tabs/home.png",
"selectedIconPath": "static/tabs/home2.png",
"text": "首页"
},
{
"pagePath": "pages/addressBook/addressBook",
"iconPath": "/static/tabs/phone_icon@2x.png",
"selectedIconPath": "static/tabs/phone_icon@2x2.png",
"text": "通讯录"
},
{
"pagePath": "pages/mypage/mypage",
"iconPath": "/static/images/my2_icon@2x.png",
"selectedIconPath": "static/images/my2_icon@2x2.png",
"text": "我的"
}
]
},
"globalStyle": {
@ -190,21 +259,25 @@
"background": "#efeff4"
}
},
"subPackages":[{
"root": "subpkg",
"pages": [{
"path": "rainDetail/rainDetail"
}]
}],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"backgroundColorTop":"transparent",
"navigationStyle": "custom",
"app-plus": {
"background": "#efeff4"
}
}
"subPackages": [
{
"root": "subpkg",
"pages": [
{
"path": "rainDetail/rainDetail"
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"backgroundColorTop": "transparent",
"navigationStyle": "custom",
"app-plus": {
"background": "#efeff4"
}
}
}

View File

@ -22,7 +22,7 @@
</div>
</div>
<div class="mybody">
<div class="breadcrumb" v-if="!keyword">
<div class="breadcrumb">
<text
v-for="(item,index) in treePath"
class="breadcrumb_item"
@ -30,6 +30,7 @@
@click="breadcrumbClick(item,index)"
>
{{item.name}}
<text v-if="(treePath.length-1)!==index" :style="{marginLeft:'8px',color:'#000000'}">></text>
</text>
</div>
<div :style="{height:'calc( 100vh - 280px)',overflow:'scroll'}">
@ -44,14 +45,14 @@
</div>
</div>
</div>
<div v-if="personList.length>0">
<div v-if="treeData==null || keyword">
<div :style="{display:'flex',alignItems:'center',height:'60px'}" v-for="(item,index) in personList">
<!-- <u--image :style="{margin:'0 30px'}" :src="'../../static/images/filter.png'" width="22px" height="22px"></u--image> -->
<div class="personItemIcon"><text>{{item.userName.slice(0, 1)}}</text></div>
<div class="personItemRow_right">
<div class="personItemRow_right_top">
<div :style="{width:'100px'}"><text>{{item.userName}}</text></div>
<div :style="{flex:'1'}"><text>{{item.phone}}</text></div>
<rich-text :style="{width:'100px'}" :nodes="highlightKeyword(item.userName, keyword)"></rich-text>
<rich-text :style="{flex:'1'}" :nodes="highlightKeyword(item.phone, keyword)"></rich-text>
</div>
<div class="personItemRow_right_bottom">
<text :style="{fontSize:'12px',color:'rgba(0, 0, 0, 0.4)'}">{{item.duty}}</text>
@ -90,22 +91,47 @@
watch: {
treePath(newData,oldData){
const last = this.treePath[this.treePath.length-1]
if(last.data.children === null){
this.getPerson({code:last.code})
if(this.keyword){
this.getPerson({code:last.code, name:this.keyword})
}else{
this.personList = []
if(last.data.children === null){
this.getPerson({code:last.code})
}else{
this.personList = []
}
}
}
},
onShow() {
this.getSearch(this.keyword)
},
methods: {
getHighlight(val) {
const keyword = this.keyword
if (keyword && val.indexOf(keyword) !== -1) {
const text = val.replace(keyword, `<text :style="{color:'#42cccc'}">${keyword}</text>`)
console.log(text)
return text
} else {
return val
}
},
highlightKeyword(text, keyword) {
const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => {
return `<span style="color: red;">${match}</span>`;
});
return highlightedText;
},
getSearch(e) {
if(e){
this.getPerson({name:e})
const last = this.treePath[this.treePath.length-1]
this.getPerson({name:e, code:last.code})
}else{
const last = this.treePath[this.treePath.length-1]
if(last.data.children === null){
this.getPerson({code:last.code})
}else{
// this.getPerson({code:last.code,name:''})
this.personList = []
}
}
@ -116,14 +142,15 @@
let url = '/gunshiApp/xfflood/addressbook/list/query'
if(name){
//
url = '/gunshiApp/xfflood/addressbook/list/query?args='+name
url = '/gunshiApp/xfflood/addressbook/list/query?args='+name+'&departmentCode='+code
}else{
//code
url = '/gunshiApp/xfflood/addressbook/list/query?departmentCode='+code
}
console.log('查询的url',url)
const res = await uni.$http.get(url)
this.personList = res.data.data
console.log('查询的人员',res.data.data)
console.log('查询的人员',res)
}catch(e){
this.personList = []
//TODO handle the exception
@ -235,6 +262,7 @@
}
.breadcrumb_item{
padding: 8px;
padding-right: 0px;
font-size: 14px;
}
.deptItem{

View File

@ -29,8 +29,8 @@
<div class="personItemIcon"><text>{{item.userName.slice(0, 1)}}</text></div>
<div class="personItemRow_right">
<div class="personItemRow_right_top">
<div :style="{width:'100px'}"><text>{{item.userName}}</text></div>
<div :style="{flex:'1'}"><text>{{item.phone}}</text></div>
<rich-text :style="{width:'100px'}" :nodes="highlightKeyword(item.userName, keyword)"></rich-text>
<rich-text :style="{flex:'1'}" :nodes="highlightKeyword(item.phone, keyword)"></rich-text>
</div>
<div class="personItemRow_right_bottom">
<text :style="{fontSize:'12px',color:'rgba(0, 0, 0, 0.4)'}">{{item.duty}}</text>
@ -67,6 +67,12 @@
}
},
methods: {
highlightKeyword(text, keyword) {
const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => {
return `<span style="color: red;">${match}</span>`;
});
return highlightedText;
},
async getData () {
try {
const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/attendee')
@ -90,6 +96,11 @@
uni.$showMsg()
}
},
callNum(num) {
uni.makePhoneCall({
phoneNumber: num //
});
}
},
created() {

View File

@ -22,15 +22,23 @@
v-model="keyword"
></u-search>
</div>
<div class="breadcrumb" v-if="deptList.length>0">
<text
v-for="(item,index) in deptList"
class="breadcrumb_item"
>
{{item.departmentName}}
<text v-if="(deptList.length-1)!==index" :style="{marginLeft:'8px',color:'#000000'}">></text>
</text>
</div>
<div class="mybody">
<div :style="{display:'flex',alignItems:'center',height:'60px'}" v-for="(item,index) in getList">
<!-- <u--image :style="{margin:'0 30px'}" :src="'../../static/images/filter.png'" width="22px" height="22px"></u--image> -->
<div class="personItemIcon"><text>{{item.userName.slice(0, 1)}}</text></div>
<div class="personItemRow_right">
<div class="personItemRow_right_top">
<div :style="{width:'100px'}"><text>{{item.userName}}</text></div>
<div :style="{flex:'1'}"><text>{{item.phone}}</text></div>
<rich-text :style="{width:'100px'}" :nodes="highlightKeyword(item.userName, keyword)"></rich-text>
<rich-text :style="{flex:'1'}" :nodes="highlightKeyword(item.phone, keyword)"></rich-text>
</div>
<div class="personItemRow_right_bottom">
<text :style="{fontSize:'12px',color:'rgba(0, 0, 0, 0.4)'}">{{item.duty}}</text>
@ -54,23 +62,40 @@
data() {
return {
keyword:'',
list:[]
list:[],
deptList:[]
};
},
computed: {
getList() {
if(this.keyword){
return [...this.list].filter(o=>o.userName.indexOf(this.keyword)!==-1)
return [...this.list].filter(o=>o.userName.indexOf(this.keyword)!==-1||o.phone.indexOf(this.keyword)!==-1)
}else{
return [...this.list]
}
}
},
methods: {
highlightKeyword(text, keyword) {
const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => {
return `<span style="color: red;">${match}</span>`;
});
return highlightedText;
},
async getData () {
try {
const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/department')
this.list = res.data.data
console.log('人员信息',res)
this.list = [...res.data.data,...res.data.data,...res.data.data,...res.data.data]
} catch (e) {
uni.$showMsg()
}
},
async getDept () {
try {
const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/department/super')
console.log('部门信息',res)
this.deptList = res.data.data
} catch (e) {
uni.$showMsg()
}
@ -90,10 +115,16 @@
uni.$showMsg()
}
}
},
callNum(num) {
uni.makePhoneCall({
phoneNumber: num //
});
},
},
created() {
this.getData()
this.getDept()
}
}
</script>
@ -110,7 +141,7 @@
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
// margin: 5px 5px;
padding: 5px 0px;
height: calc( 100vh - 100px );
overflow: scroll;
@ -145,4 +176,14 @@
display: flex;
justify-content: flex-start
}
.breadcrumb{
padding: 10px;
background-color: #ffffff;
border-bottom: 1px solid #eee;
}
.breadcrumb_item{
padding: 8px;
padding-right: 0px;
font-size: 14px;
}
</style>

View File

@ -24,7 +24,9 @@
itemStyle="height: 44px"
>
</u-tabs>
<component :is="tabsVal"></component>
<uniSh v-if="tabsVal==='uniSh'"></uniSh>
<uniSk v-if="tabsVal==='uniSk'"></uniSk>
<uniHd v-if="tabsVal==='uniHd'"></uniHd>
</view>
</template>
@ -41,18 +43,18 @@
tabsOptions:[
{
name:'水库预警',
components:uniSk
components:'uniSk'
},
{
name:'河道预警',
components:uniHd
components:'uniHd'
},
{
name:'山洪预警',
components:uniSh
components:'uniSh'
},
],
tabsVal:uniSk
tabsVal:'uniSk'
};
},
methods: {

View File

@ -149,7 +149,7 @@ const warngrade = {
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
stm:Number(moment(new Date()).add(-1,'days')),
etm:Number(new Date()),
check1:['0','30'],
check2:['6','5'],
@ -179,7 +179,7 @@ const warngrade = {
this.show = false
},
reSet() {
this.stm = Number(moment(new Date()).add(-7,'days'))
this.stm = Number(moment(new Date()).add(-1,'days'))
this.etm = Number(new Date())
this.check1 = ['0','30']
this.check2 = ['6','5']

87
pages/gqzq/gqxx/gqxx.vue Normal file
View File

@ -0,0 +1,87 @@
<template>
<view :style="{height:'100vh',overflow:'hidden'}">
<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>
<u-tabs
:list="tabsOptions"
@click="tabsChange"
:scrollable=false
class="tabsClass"
:activeStyle="{color: 'rgb(37, 157, 255)',fontSize: '16px'}"
:inactiveStyle="{color: '#606266',fontSize: '16px'}"
lineColor="transparent"
itemStyle="height: 44px"
>
</u-tabs>
<uniQk v-if="tabsVal==='uniQk'" ref="childRef1"></uniQk>
<uniXq v-if="tabsVal==='uniXq'" ref="childRef2"></uniXq>
</view>
</template>
<script>
import moment from 'moment'
import uniQk from './qk.vue';
import uniXq from './xq.vue';
export default {
components: { uniQk, uniXq },
data() {
return {
tabsOptions:[
{
name:'运行情况',
components:'uniQk'
},
{
name:'工程险情',
components:'uniXq'
}
],
tabsVal:'uniQk'
};
},
methods: {
tabsChange(item) {
this.tabsVal = item.components
console.log(this.tabsVal);
},
refresh(fun) {
console.log('执行刷新')
fun()
}
},
onShow() {
if(this.tabsVal==='uniQk'){
this.$refs.childRef1.submit();
}else{
this.$refs.childRef2.submit();
}
},
}
</script>
<style lang="scss" scoped>
.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;
}
</style>

316
pages/gqzq/gqxx/qk.vue Normal file
View File

@ -0,0 +1,316 @@
<template>
<view class="tabBody">
<div class="searchBox">
<div class="searchBox_left">
<u-search
shape="square"
:clearabled="true"
:showAction=false
v-model="searchVal"
placeholder='请输入工程名称/上报人'
height=40
>
</u-search>
</div>
<div class="searchBox_right">
<view
hover-class="is-hover"
class="searchBox_right_btn"
hover-stay-time=100
@click="myShow"
>
<u--image :src="'../../../static/images/filter.png'" width="22px" height="22px"></u--image>
</view>
</div>
</div>
<div class="mybody">
<div class="countNum"><text>{{getSearchVal.length}}条信息</text></div>
<div v-for="(item,index) in getSearchVal" class="listItem" @click="toForm(index)">
<div>
<div class="row1"><text>{{item.projectName}}</text></div>
<div class="row2">
<div>
<text :style="{marginRight:'5px'}">{{item.reporter}}</text>
<text>{{item.reportTime}}</text>
</div>
</div>
</div>
<div class="icon" v-show="item.isRead===0"></div>
</div>
<div :style="{height:'100px'}"></div>
</div>
<u-popup
:show="show"
mode="right"
:safeAreaInsetTop='true'
:closeOnClickOverlay='false'
@close="close"
@open="myShow">
<view :style="{padding:'10px',width:'250px'}">
<u-toast ref="uToast"></u-toast>
<text class="title">按工程类型</text>
<u-checkbox-group
placement="row"
v-model="check1"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="水库" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="水电站" class="checkItem"></u-checkbox>
</u-checkbox-group>
<div :style="{display:'flex',alignItems:'center'}">
<text class="title">按上报时间</text>
<u-switch v-model="isTime" size="20" :style="{margin:'2px 0 0 10px'}"></u-switch>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showStmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getStmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showEtmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getEtmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%'}"></text>
</div>
<div :style="{position:'absolute',bottom:'20px',right:'20px',display:'flex'}">
<u-button
:style="{width:'80px',marginRight:'10px'}"
text="重置"
@click="reSet"
></u-button>
<u-button
:style="{width:'80px'}"
color="rgba(217, 0, 27, 1)"
type="primary"
text="确定"
@click="submit"
></u-button>
</div>
</view>
<u-datetime-picker
:show="showStmPicker"
v-model="stm"
mode="datetime"
closeOnClickOverlay
@confirm="showStmPicker = false"
@cancel="showStmPicker = false"
@close="showStmPicker = false"
>
</u-datetime-picker>
<u-datetime-picker
:show="showEtmPicker"
v-model="etm"
mode="datetime"
closeOnClickOverlay
@confirm="showEtmPicker = false"
@cancel="showEtmPicker = false"
@close="showEtmPicker = false"
>
</u-datetime-picker>
</u-popup>
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
show:false,
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
check1:['1','2'],
list:[]
}
},
computed: {
getStmStr() {
return moment(this.stm).format('YYYY-MM-DD HH:mm:ss')
},
getEtmStr() {
return moment(this.etm).format('YYYY-MM-DD HH:mm:ss')
},
getSearchVal() {
if(this.searchVal){
return this.list.filter(o => (o.projectName?.indexOf(this.searchVal)>-1 || o.reporter?.indexOf(this.searchVal)>-1))
}else{
return this.list
}
},
},
methods: {
myShow() {
this.show = true
},
close() {
this.show = false
},
reSet() {
this.isTime = false
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check1 = ['1','2']
},
async submit() {
if(!moment(this.stm).isBefore(this.etm)){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "开始时间需小于结束时间",
})
return
}
try{
const params = {
projectTypes:this.check1.length===0?['999']:this.check1,
}
if(this.isTime){
params.timeSo = {
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
}
}
console.log('params',this.check1==[])
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectRun/list',params)
console.log('res',res)
this.list = res.data.data
this.close()
}catch(e){
//TODO handle the exception
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
setTimeout(()=>{
this.close()
},1000)
}
},
toForm(myIndex) {
uni.navigateTo({
url: '/pages/gqzq/gqxx/qkForm?obj='+JSON.stringify({list:this.getSearchVal,myIndex:myIndex}) //
});
},
},
created() {
this.submit()
},
}
</script>
<style lang="scss" scoped>
.tabBody{
background-color: rgba(247, 247, 247, 1);
height: 100%;
// display: flex;
// flex-direction: column;
// align-items: center;
}
.searchBox{
height: 62px;
width: 100%;
background-color: #ffffff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
padding: 5px 20px;
height: calc( 100vh - 100px );
overflow: scroll;
}
.countNum{
width: 100%;
text-align: right;
font-size: 13px;
}
.listItem{
width: 100%;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.row1{
font-size: 14px;
font-weight: 700;
color: #333333;
width: 100%;
height: 30px;
line-height: 30px;
}
.row2{
font-size: 12px;
color: #999999;
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
width: 10px;
height: 10px;
border-radius: 5px;
background-color: red;
}
.searchBox_left{
width: 82%;
padding-left: 15px;
}
.searchBox_right{
width: 18%;
display: flex;
align-items: center;
justify-content: center;
}
.searchBox_right_btn{
width: 40px;
height: 40px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.is-hover{
background-color: #eee;
}
.title{
display: inline-block;
font-size: 16px;
}
.checkItem{
margin-right: 10px;
}
.tmPicker{
width: 100%;
height: 30px;
border: 1px solid rgba(240, 240, 240, 1);
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
display: flex;
justify-content: space-around;
align-items: center;
// padding-left: 10px;
}
</style>

282
pages/gqzq/gqxx/qkForm.vue Normal file
View File

@ -0,0 +1,282 @@
<template>
<view :style="{backgroundColor: 'rgba(247, 247, 247, 1)',height:'100vh',overflow:'hidden'}">
<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>
<div class="bodyBg">
<div class="mybody">
<div class="myHead" v-if="list.length>1">
<div class="paging">
<view
class="paging_left"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(false)"
>{{index===0?'返回':'上一条'}}</view>
<view
class="paging_right"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(true)"
>{{index===list.length-1?'返回':'下一条'}}</view>
</div>
</div>
<div class="myscroll">
<div :style="{height:'10px'}"></div>
<div class="row">
<text class="lf">工程类型:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'水库','2':'水电站'}[getRecord.projectType]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf"><text :style="{color:'red'}">*</text>工程名称:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.projectName"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">是否发电:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'0':'否','1':'是'}[getRecord.isPowerGeneration]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">是否泄洪:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'0':'否','1':'是'}[getRecord.isFloodRelease]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">水位(m):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.waterLevel"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">入库流量(/s):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.inflowVolume"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">出库流量(/s):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.outflowVolume"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">其他运行情况:</text>
<div class="rf">
<u--textarea
v-model="getRecord.remark"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">上报人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reporter"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报单位:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportUnit"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportTime"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">附件:</text>
<div class="rf">
<text>{{getRecord.fileIds || '暂无数据'}}</text>
</div>
</div>
<div :style="{height:'20vh'}"></div>
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
record:{},
list:[],
index:0,
cs:''
}
},
created() {
this.getState()
},
computed: {
getRecord() {
return this.list[this.index] || {}
},
},
methods: {
async getState() {
try{
const id = this.getRecord.id
console.log('id',id)
const res = await uni.$http.get('/gunshiApp/xfflood/xfProjectRun/detail?id='+id)
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
},
changePage(flag) {
if(flag){
if(this.index===this.list.length-1){
uni.navigateBack()
}else{
this.index = this.index+1
this.getState()
}
}else{
if(this.index===0){
uni.navigateBack()
}else{
this.index = this.index-1
this.getState()
}
}
}
},
onLoad(props){
const record = JSON.parse(props.obj)
this.index = record.myIndex
this.list= record.list
}
}
</script>
<style lang="scss" scoped>
.bodyBg{
display: flex;
flex-direction: column;
align-items: center;
}
.mybody{
margin-top: 50px;
padding-top: 10px;
width: 97%;
background-color: #ffffff;
}
.row{
display: flex;
margin-top: 5px;
}
.lf{
width: 25%;
min-height: 40px;
text-align: right;
line-height: 38px;
padding-right: 10px;
}
.rf{
width: 75%;
min-height: 40px;
line-height: 36px;
padding-right: 20px;
padding-top: 1px;
}
.paging{
position: relative;
height: 30px;
line-height: 30px;
margin: 5px 50px 15px 50px;
display: flex;
text-align: center;
}
.paging_left{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
border-right: 0;
background: rgb(245, 247, 250);
border-radius: 8px 0 0 8px;
}
.paging_right{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
background: rgb(245, 247, 250);
border-radius: 0 8px 8px 0;
}
.is-hover{
background-color: #eee;
}
.myHead{
margin-bottom: 0px;
border-bottom: 1px solid #eee;
}
.myscroll{
height: 90vh;
overflow-y: scroll;
}
</style>

332
pages/gqzq/gqxx/xq.vue Normal file
View File

@ -0,0 +1,332 @@
<template>
<view class="tabBody">
<div class="searchBox">
<div class="searchBox_left">
<u-search
shape="square"
:clearabled="true"
:showAction=false
v-model="searchVal"
placeholder='请输入工程名称/上报人'
height=40
>
</u-search>
</div>
<div class="searchBox_right">
<view
hover-class="is-hover"
class="searchBox_right_btn"
hover-stay-time=100
@click="myShow"
>
<u--image :src="'../../../static/images/filter.png'" width="22px" height="22px"></u--image>
</view>
</div>
</div>
<div class="mybody">
<div class="countNum"><text>{{getSearchVal.length}}条信息</text></div>
<div v-for="(item,index) in getSearchVal" class="listItem" @click="toForm(index)">
<div>
<div class="row1"><text>{{item.projectName}}</text></div>
<div class="row2">
<div>
<text :style="{marginRight:'5px'}">{{item.reporter}}</text>
<text>{{item.reportTime}}</text>
</div>
</div>
</div>
<div class="icon" v-show="item.isRead===0"></div>
</div>
<div :style="{height:'100px'}"></div>
</div>
<u-popup
:show="show"
mode="right"
:safeAreaInsetTop='true'
:closeOnClickOverlay='false'
@close="close"
@open="myShow">
<view :style="{padding:'10px',width:'250px'}">
<u-toast ref="uToast"></u-toast>
<text class="title">按严重程度</text>
<u-checkbox-group
placement="col"
v-model="check1"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="一般险情" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="较大险情" class="checkItem"></u-checkbox>
<u-checkbox name="3" label="重大险情" class="checkItem"></u-checkbox>
<u-checkbox name="4" label="特别重大险情" class="checkItem"></u-checkbox>
</u-checkbox-group>
<text class="title">按工程类型</text>
<u-checkbox-group
placement="row"
v-model="check2"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="水库" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="水电站" class="checkItem"></u-checkbox>
</u-checkbox-group>
<div :style="{display:'flex',alignItems:'center'}">
<text class="title">按上报时间</text>
<u-switch v-model="isTime" size="20" :style="{margin:'2px 0 0 10px'}"></u-switch>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showStmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getStmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showEtmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getEtmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%'}"></text>
</div>
<div :style="{position:'absolute',bottom:'20px',right:'20px',display:'flex'}">
<u-button
:style="{width:'80px',marginRight:'10px'}"
text="重置"
@click="reSet"
></u-button>
<u-button
:style="{width:'80px'}"
color="rgba(217, 0, 27, 1)"
type="primary"
text="确定"
@click="submit"
></u-button>
</div>
</view>
<u-datetime-picker
:show="showStmPicker"
v-model="stm"
mode="datetime"
closeOnClickOverlay
@confirm="showStmPicker = false"
@cancel="showStmPicker = false"
@close="showStmPicker = false"
>
</u-datetime-picker>
<u-datetime-picker
:show="showEtmPicker"
v-model="etm"
mode="datetime"
closeOnClickOverlay
@confirm="showEtmPicker = false"
@cancel="showEtmPicker = false"
@close="showEtmPicker = false"
>
</u-datetime-picker>
</u-popup>
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
show:false,
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
check1:['1','2','3','4'],
check2:['1','2'],
list:[]
}
},
computed: {
getStmStr() {
return moment(this.stm).format('YYYY-MM-DD HH:mm:ss')
},
getEtmStr() {
return moment(this.etm).format('YYYY-MM-DD HH:mm:ss')
},
getSearchVal() {
if(this.searchVal){
return this.list.filter(o => (o.projectName?.indexOf(this.searchVal)>-1 || o.reporter?.indexOf(this.searchVal)>-1))
}else{
return this.list
}
},
},
methods: {
myShow() {
this.show = true
},
close() {
this.show = false
},
reSet() {
this.isTime = false
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check1 = ['1','2','3','4']
this.check2 = ['1','2']
},
async submit() {
if(!moment(this.stm).isBefore(this.etm)){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "开始时间需小于结束时间",
})
return
}
try{
const params = {
severitys:this.check1.length===0?['999']:this.check1,
projectTypes:this.check2.length===0?['999']:this.check2,
}
if(this.isTime){
params.timeSo = {
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
}
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectIncident/list',params)
console.log('res',res)
this.list = res.data.data
this.close()
}catch(e){
//TODO handle the exception
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
setTimeout(()=>{
this.close()
},1000)
}
},
toForm(myIndex) {
uni.navigateTo({
url: '/pages/gqzq/gqxx/xqForm?obj='+JSON.stringify({list:this.getSearchVal,myIndex:myIndex}) //
});
},
},
created() {
this.submit()
}
}
</script>
<style lang="scss" scoped>
.tabBody{
background-color: rgba(247, 247, 247, 1);
height: 100%;
// display: flex;
// flex-direction: column;
// align-items: center;
}
.searchBox{
height: 62px;
width: 100%;
background-color: #ffffff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
padding: 5px 20px;
height: calc( 100vh - 100px );
overflow: scroll;
}
.countNum{
width: 100%;
text-align: right;
font-size: 13px;
}
.listItem{
width: 100%;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.row1{
font-size: 14px;
font-weight: 700;
color: #333333;
width: 100%;
height: 30px;
line-height: 30px;
}
.row2{
font-size: 12px;
color: #999999;
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
width: 10px;
height: 10px;
border-radius: 5px;
background-color: red;
}
.searchBox_left{
width: 82%;
padding-left: 15px;
}
.searchBox_right{
width: 18%;
display: flex;
align-items: center;
justify-content: center;
}
.searchBox_right_btn{
width: 40px;
height: 40px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.is-hover{
background-color: #eee;
}
.title{
display: inline-block;
font-size: 16px;
}
.checkItem{
margin-right: 10px;
margin-bottom: 10px;
}
.tmPicker{
width: 100%;
height: 30px;
border: 1px solid rgba(240, 240, 240, 1);
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
display: flex;
justify-content: space-around;
align-items: center;
// padding-left: 10px;
}
</style>

282
pages/gqzq/gqxx/xqForm.vue Normal file
View File

@ -0,0 +1,282 @@
<template>
<view :style="{backgroundColor: 'rgba(247, 247, 247, 1)',height:'100vh',overflow:'hidden'}">
<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>
<div class="bodyBg">
<div class="mybody">
<div class="myHead" v-if="list.length>1">
<div class="paging">
<view
class="paging_left"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(false)"
>{{index===0?'返回':'上一条'}}</view>
<view
class="paging_right"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(true)"
>{{index===list.length-1?'返回':'下一条'}}</view>
</div>
</div>
<div class="myscroll">
<div :style="{height:'10px'}"></div>
<div class="row">
<text class="lf">工程类型:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'水库','2':'水电站'}[getRecord.projectType]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf"><text :style="{color:'red'}">*</text>工程名称:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.projectName"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">严重程度:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'一般险情','2':'较大险情','3':'重大险情','4':'特别重大险情'}[getRecord.severity]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">是否已管控:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'0':'否','1':'是'}[getRecord.isControlled]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">险情描述:</text>
<div class="rf">
<u--textarea
v-model="getRecord.incidentDescription"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">管控责任人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.controlResponsiblePerson"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">联系电话:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.responsiblePersonPhone"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">其他运行情况:</text>
<div class="rf">
<u--textarea
v-model="getRecord.remark"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">上报人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reporter"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报单位:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportUnit"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportTime"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">附件:</text>
<div class="rf">
<text>{{getRecord.fileIds || '暂无数据'}}</text>
</div>
</div>
<div :style="{height:'20vh'}"></div>
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
record:{},
list:[],
index:0,
cs:''
}
},
created() {
this.getState()
},
computed: {
getRecord() {
return this.list[this.index] || {}
},
},
methods: {
async getState() {
try{
const id = this.getRecord.id
console.log('id',id)
const res = await uni.$http.get('/gunshiApp/xfflood/xfProjectIncident/detail?id='+id)
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
},
changePage(flag) {
if(flag){
if(this.index===this.list.length-1){
uni.navigateBack()
}else{
this.index = this.index+1
this.getState()
}
}else{
if(this.index===0){
uni.navigateBack()
}else{
this.index = this.index-1
this.getState()
}
}
}
},
onLoad(props){
const record = JSON.parse(props.obj)
this.index = record.myIndex
this.list= record.list
}
}
</script>
<style lang="scss" scoped>
.bodyBg{
display: flex;
flex-direction: column;
align-items: center;
}
.mybody{
margin-top: 50px;
padding-top: 10px;
width: 97%;
background-color: #ffffff;
}
.row{
display: flex;
margin-top: 5px;
}
.lf{
width: 25%;
min-height: 40px;
text-align: right;
line-height: 38px;
padding-right: 10px;
}
.rf{
width: 75%;
min-height: 40px;
line-height: 36px;
padding-right: 20px;
padding-top: 1px;
}
.paging{
position: relative;
height: 30px;
line-height: 30px;
margin: 5px 50px 15px 50px;
display: flex;
text-align: center;
}
.paging_left{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
border-right: 0;
background: rgb(245, 247, 250);
border-radius: 8px 0 0 8px;
}
.paging_right{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
background: rgb(245, 247, 250);
border-radius: 0 8px 8px 0;
}
.is-hover{
background-color: #eee;
}
.myHead{
margin-bottom: 0px;
border-bottom: 1px solid #eee;
}
.myscroll{
height: 90vh;
overflow-y: scroll;
}
</style>

View File

@ -1,18 +1,32 @@
<template>
<view class="container">
<view class="nav_bar">
<!-- <u-icon name="arrow_left" color="#000" size="28"></u-icon> -->
<view class="nav_bar_tit"> 工情灾情 </view>
</view>
<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="info">
<div class="ul_list" @click="todetail(1)">
<div class="left">工情信息</div>
<div class="left">></div>
<div class="left" :style="{display:'flex',alignItems:'center'}">
<div class="redDot" v-show="gq"></div>
<text>></text>
</div>
</div>
<div class="ul_list" @click="todetail(2)">
<div class="left">灾情信息</div>
<div class="left">></div>
<div class="left" :style="{display:'flex',alignItems:'center'}">
<div class="redDot" v-show="zq"></div>
<text>></text>
</div>
</div>
</view>
</view>
@ -20,22 +34,46 @@
<script>
export default {
data () {
return {}
return {
gq:false,
zq:false
}
},
onShow() {
this.getData()
},
methods: {
todetail (val) {
console.log('val', val)
if (val == 1) {
uni.navigateTo({
url: '/pages/gqzq/gqxx'
url: '/pages/gqzq/gqxx/gqxx'
})
}
if (val == 2) {
uni.navigateTo({
url: '/pages/gqzq/zqxx'
url: '/pages/gqzq/zqxx/zqxx'
})
}
}
},
async getData() {
try{
const res = await uni.$http.get("/gunshiApp/xfflood/xfProjectRun/has/read")
const data = res.data.data
if(data){
console.log(data['1'],data['2'],data['3'])
this.gq = (data['1']||data['2'])?true:false
this.zq = data['3']?true:false
}
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
}
}
}
</script>
@ -61,8 +99,10 @@ export default {
text-align: center;
}
.info {
padding: 20px;
background-color: #fff;
padding: 20px;
padding-top: 0;
background-color: #fff;
margin-top: 44px;
margin-bottom: 12rpx;
}
.ul_list {
@ -71,5 +111,12 @@ export default {
align-items: center;
height: 48px;
border-bottom: 1px solid #dfdfdf;
}
.redDot{
margin-right: 10px;
width: 8px;
height: 8px;
border-radius: 4px;
background-color: red;
}
</style>

333
pages/gqzq/zqxx/form.vue Normal file
View File

@ -0,0 +1,333 @@
<template>
<view :style="{backgroundColor: 'rgba(247, 247, 247, 1)',height:'100vh',overflow:'hidden'}">
<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>
<div class="bodyBg">
<div class="mybody">
<div class="myHead" v-if="list.length>1">
<div class="paging">
<view
class="paging_left"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(false)"
>{{index===0?'返回':'上一条'}}</view>
<view
class="paging_right"
hover-class="is-hover"
hover-stay-time=100
@click="changePage(true)"
>{{index===list.length-1?'返回':'下一条'}}</view>
</div>
</div>
<div class="myscroll">
<div :style="{height:'10px'}"></div>
<div class="row">
<text class="lf"><text :style="{color:'red'}">*</text>灾害发生时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.otime"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf"><text :style="{color:'red'}">*</text>严重程度:</text>
<div class="rf">
<u--input
border="surround"
v-model="{'1':'一般险情','2':'较大险情','3':'重大险情','4':'特别重大险情'}[getRecord.severity]"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf"><text :style="{color:'red'}">*</text>灾害发生地点:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.address"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">经度:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.lgtd"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">纬度:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.lttd"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf"><text :style="{color:'red'}">*</text>灾情描述:</text>
<div class="rf">
<u--textarea
v-model="getRecord.ddscrib"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">伤亡人数:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.dpcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">失踪人数:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.mpcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">转移人数:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.spcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">损毁房屋():</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.chcount"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">直接经济损失(万元):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.elose"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">过程降雨量(mm):</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.pfrain"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">其他运行情况:</text>
<div class="rf">
<u--textarea
v-model="getRecord.remark"
:disabled='true'
height=300
></u--textarea>
</div>
</div>
<div class="row">
<text class="lf">上报人:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reporter"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报单位:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportUnit"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">上报时间:</text>
<div class="rf">
<u--input
border="surround"
v-model="getRecord.reportTime"
:disabled='true'
></u--input>
</div>
</div>
<div class="row">
<text class="lf">附件:</text>
<div class="rf">
<text>{{getRecord.fileIds || '暂无数据'}}</text>
</div>
</div>
<div :style="{height:'20vh'}"></div>
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
record:{},
list:[],
index:0,
cs:''
}
},
created() {
this.getState()
},
computed: {
getRecord() {
return this.list[this.index] || {}
},
},
methods: {
async getState() {
try{
const mtcd = this.getRecord.mtcd
console.log('mtcd',mtcd)
const res = await uni.$http.get('/gunshiApp/xfflood/iaCHsfwater/detail?mtcd='+mtcd)
console.log('res',res)
}catch(e){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
}
},
changePage(flag) {
if(flag){
if(this.index===this.list.length-1){
uni.navigateBack()
}else{
this.index = this.index+1
this.getState()
}
}else{
if(this.index===0){
uni.navigateBack()
}else{
this.index = this.index-1
this.getState()
}
}
}
},
onLoad(props){
const record = JSON.parse(props.obj)
this.index = record.myIndex
this.list= record.list
}
}
</script>
<style lang="scss" scoped>
.bodyBg{
display: flex;
flex-direction: column;
align-items: center;
}
.mybody{
margin-top: 50px;
padding-top: 10px;
width: 97%;
background-color: #ffffff;
}
.row{
display: flex;
margin-top: 5px;
}
.lf{
width: 25%;
min-height: 40px;
text-align: right;
line-height: 38px;
padding-right: 10px;
}
.rf{
width: 75%;
min-height: 40px;
line-height: 36px;
padding-right: 20px;
padding-top: 1px;
}
.paging{
position: relative;
height: 30px;
line-height: 30px;
margin: 5px 50px 15px 50px;
display: flex;
text-align: center;
}
.paging_left{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
border-right: 0;
background: rgb(245, 247, 250);
border-radius: 8px 0 0 8px;
}
.paging_right{
width: 50%;
height: 100%;
border: 1px solid #dadbde;
background: rgb(245, 247, 250);
border-radius: 0 8px 8px 0;
}
.is-hover{
background-color: #eee;
}
.myHead{
margin-bottom: 0px;
border-bottom: 1px solid #eee;
}
.myscroll{
height: 90vh;
overflow-y: scroll;
}
</style>

320
pages/gqzq/zqxx/table.vue Normal file
View File

@ -0,0 +1,320 @@
<template>
<view class="tabBody">
<div class="searchBox">
<div class="searchBox_left">
<u-search
shape="square"
:clearabled="true"
:showAction=false
v-model="searchVal"
placeholder='请输入灾害发生地点/上报人'
height=40
>
</u-search>
</div>
<div class="searchBox_right">
<view
hover-class="is-hover"
class="searchBox_right_btn"
hover-stay-time=100
@click="myShow"
>
<u--image :src="'../../../static/images/filter.png'" width="22px" height="22px"></u--image>
</view>
</div>
</div>
<div class="mybody">
<div class="countNum"><text>{{getSearchVal.length}}条信息</text></div>
<div v-for="(item,index) in getSearchVal" class="listItem" @click="toForm(index)">
<div>
<div class="row1"><text>{{item.address+'('+{'1':'一般险情','2':'较大险情','3':'重大险情','4':'特别重大险情'}[item.severity]+')'}}</text></div>
<div class="row2">
<div>
<text :style="{marginRight:'5px'}">{{item.reporter}}</text>
<text>{{item.reportTime}}</text>
</div>
</div>
</div>
<div class="icon" v-show="item.isRead===0"></div>
</div>
<div :style="{height:'100px'}"></div>
</div>
<u-popup
:show="show"
mode="right"
:safeAreaInsetTop='true'
:closeOnClickOverlay='false'
@close="close"
@open="myShow">
<view :style="{padding:'10px',width:'250px'}">
<u-toast ref="uToast"></u-toast>
<text class="title">按严重程度</text>
<u-checkbox-group
placement="col"
v-model="check1"
:style="{padding:'10px 0px 20px 0px'}"
>
<u-checkbox name="1" label="一般险情" class="checkItem"></u-checkbox>
<u-checkbox name="2" label="较大险情" class="checkItem"></u-checkbox>
<u-checkbox name="3" label="重大险情" class="checkItem"></u-checkbox>
<u-checkbox name="4" label="特别重大险情" class="checkItem"></u-checkbox>
</u-checkbox-group>
<div :style="{display:'flex',alignItems:'center'}">
<text class="title">按上报时间</text>
<u-switch v-model="isTime" size="20" :style="{margin:'2px 0 0 10px'}"></u-switch>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showStmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getStmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showEtmPicker = true"
hover-class="is-hover"
hover-stay-time=100
>{{getEtmStr}}<u-icon name="calendar" size="18" color="#909399"></u-icon>
</view>
<text :style="{width:'20%'}"></text>
</div>
<div :style="{position:'absolute',bottom:'20px',right:'20px',display:'flex'}">
<u-button
:style="{width:'80px',marginRight:'10px'}"
text="重置"
@click="reSet"
></u-button>
<u-button
:style="{width:'80px'}"
color="rgba(217, 0, 27, 1)"
type="primary"
text="确定"
@click="submit"
></u-button>
</div>
</view>
<u-datetime-picker
:show="showStmPicker"
v-model="stm"
mode="datetime"
closeOnClickOverlay
@confirm="showStmPicker = false"
@cancel="showStmPicker = false"
@close="showStmPicker = false"
>
</u-datetime-picker>
<u-datetime-picker
:show="showEtmPicker"
v-model="etm"
mode="datetime"
closeOnClickOverlay
@confirm="showEtmPicker = false"
@cancel="showEtmPicker = false"
@close="showEtmPicker = false"
>
</u-datetime-picker>
</u-popup>
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
show:false,
showStmPicker:false,
showEtmPicker:false,
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
check1:['1','2','3','4'],
list:[]
}
},
computed: {
getStmStr() {
return moment(this.stm).format('YYYY-MM-DD HH:mm:ss')
},
getEtmStr() {
return moment(this.etm).format('YYYY-MM-DD HH:mm:ss')
},
getSearchVal() {
if(this.searchVal){
return this.list.filter(o => (o.reporter?.indexOf(this.searchVal)>-1 || o.address?.indexOf(this.searchVal)>-1))
}else{
return this.list
}
},
},
methods: {
myShow() {
this.show = true
},
close() {
this.show = false
},
reSet() {
this.isTime = false
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check1 = ['1','2','3','4']
},
async submit() {
if(!moment(this.stm).isBefore(this.etm)){
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "开始时间需小于结束时间",
})
return
}
try{
const params = {
severitys:this.check1.length===0?['999']:this.check1,
}
if(this.isTime){
params.timeSo = {
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
}
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/iaCHsfwater/queryList',params)
console.log('res',res)
this.list = res.data.data
this.close()
}catch(e){
//TODO handle the exception
this.$refs.uToast.show({
type: 'error',
title: '失败主题',
message: "请求失败",
})
setTimeout(()=>{
this.close()
},1000)
}
},
toForm(myIndex) {
uni.navigateTo({
url: '/pages/gqzq/zqxx/form?obj='+JSON.stringify({list:this.getSearchVal,myIndex:myIndex}) //
});
},
},
created() {
this.submit()
}
}
</script>
<style lang="scss" scoped>
.tabBody{
margin-top: 44px;
background-color: rgba(247, 247, 247, 1);
height: 100%;
// display: flex;
// flex-direction: column;
// align-items: center;
}
.searchBox{
height: 62px;
width: 100%;
background-color: #ffffff;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
padding: 5px 20px;
height: calc( 100vh - 100px );
overflow: scroll;
}
.countNum{
width: 100%;
text-align: right;
font-size: 13px;
}
.listItem{
width: 100%;
border-bottom: 1px solid #eee;
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.row1{
font-size: 14px;
font-weight: 700;
color: #333333;
width: 100%;
height: 30px;
line-height: 30px;
}
.row2{
font-size: 12px;
color: #999999;
width: 100%;
height: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.icon{
width: 10px;
height: 10px;
border-radius: 5px;
background-color: red;
}
.searchBox_left{
width: 82%;
padding-left: 15px;
}
.searchBox_right{
width: 18%;
display: flex;
align-items: center;
justify-content: center;
}
.searchBox_right_btn{
width: 40px;
height: 40px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.is-hover{
background-color: #eee;
}
.title{
display: inline-block;
font-size: 16px;
}
.checkItem{
margin-right: 10px;
margin-bottom: 10px;
}
.tmPicker{
width: 100%;
height: 30px;
border: 1px solid rgba(240, 240, 240, 1);
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
display: flex;
justify-content: space-around;
align-items: center;
// padding-left: 10px;
}
</style>

51
pages/gqzq/zqxx/zqxx.vue Normal file
View File

@ -0,0 +1,51 @@
<template>
<view :style="{height:'100vh',overflow:'hidden'}">
<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>
<uniTable ref="childRef"></uniTable>
</view>
</template>
<script>
import moment from 'moment'
import uniTable from './table.vue';
export default {
components: { uniTable },
data() {
return {
};
},
methods: {
},
onShow() {
this.$refs.childRef.submit();
},
}
</script>
<style lang="scss" scoped>
.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;
}
</style>

View File

@ -1,7 +1,8 @@
<template>
<view class="rain-detail-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
{{stnm}}
</view>
@ -68,22 +69,26 @@
<style lang="scss" scoped>
.rain-detail-box{
height: 100vh;
overflow: hidden;
position: relative;
.nav-bar{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
margin-right: 18px;
font-size: 18px;
}
.tab-bar{
display: flex;

View File

@ -1,10 +1,21 @@
<template>
<view class="jcsj-box">
<view class="time-ranger">
<uni-datetime-picker type="datetimerange" v-model="tm" @change="handleRanger"></uni-datetime-picker>
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view>
<!-- <uni-datetime-picker type="datetimerange" v-model="tm" @change="handleRanger"></uni-datetime-picker>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view> -->
</view>
<!-- <view class="" style="width: 100%; height: 3px; background-color: #dfdfdf; margin-bottom: 2px;">
@ -13,12 +24,28 @@
<text :class="{'active':selactOne == 0}" @click="selactOne = 0" style="display: inline-block; padding: 2px 20px; text-align: center; border: 1px solid #dfdfdf;"></text>
<text :class="{'active':selactOne == 1}" @click="selactOne = 1" style="display: inline-block; padding: 2px 20px; text-align: center; border: 1px solid #dfdfdf;"></text>
</view>
<view class="jcsj-content">
<view class="jcsj-charts" v-if="selactOne == 0">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
</view>
<view style="margin-top: 20px;" v-if="selactOne == 1">
<JcsjTable :tableData="tableData" />
</view>
<u-datetime-picker
:show="showTime"
v-model="startTime"
mode="datetime"
@confirm="handleStartTime"
@cancel="showTime=false"
></u-datetime-picker>
<u-datetime-picker
:show="showTime1"
v-model="endTime"
mode="datetime"
@confirm="handleEndTime"
@cancel="showTime1=false"
></u-datetime-picker>
</view>
</template>
@ -37,8 +64,13 @@
default:''
},
data() {
return {
tm:[stm,etm],
return {
startTime:stm,
endTime:etm,
stm,
etm,
showTime:false,
showTime1:false,
tableData:[],
chartData: {},
rainChartData:[],
@ -55,6 +87,16 @@
}
},
methods: {
handleStartTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.stm = time
this.showTime = false
},
handleEndTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.etm = time;
this.showTime1 = false
},
handleRanger(e){
console.log(e);
this.tm = [...e]
@ -66,8 +108,8 @@
"/gunshiApp/xfflood/river/water/monitor/data",
{
stcd:this.stcd,
stm:moment(this.tm[0]).format("YYYY-MM-DD HH:mm:ss"),
etm:moment(this.tm[1]).format("YYYY-MM-DD HH:mm:ss"),
stm:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
etm:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
source:this.source
})
if(data.code == 200){
@ -91,18 +133,29 @@
<style lang="scss" scoped>
.jcsj-box{
.time-ranger{
display: flex;
align-items: center;
// display: flex;
// align-items: center;
margin-bottom: 10px;
.start-time, .end-time{
display: flex;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf;
}
.search-btn{
margin: 3px 0 0 5px;
color: #3399ef;
// color: #3399ef;
}
}
.jcsj-content{
max-height:calc(100vh - 89px - 43px - 45px);
overflow-y:auto
}
.jcsj-charts{
width:100%;
height: 530px;
height: 500px;
margin-top: 20px;
overflow-y: auto;
}
.active{
border-color: #68bbff !important;

View File

@ -1,7 +1,7 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 40px;">
序号
@ -20,7 +20,8 @@
</view>
</th>
</tr>
<div style="max-height: 480px; overflow-y: auto">
<!-- style="max-height: 480px; overflow-y: auto" -->
<div class="scroll-table">
<tr v-for="(item, index) in newList" :key="index">
<td style="width: 30px">{{ index + 1 }}</td>
<td style="width: 80px;">{{ item.tm }}</td>
@ -28,6 +29,7 @@
<td style="width: 100px">{{ item.z ? item.z.toFixed(2) : "-" }}</td>
<td style="width: 80px">{{ item.tq ? item.tq : "-" }}</td>
</tr>
<div style="height:180px"></div>
</div>
</table>
</div>
@ -72,6 +74,11 @@
empty-cells: show;
border-collapse: collapse;
font-size: 14px;
}
.scroll-table{
height: calc(100vh - 180px);
overflow-y: auto;
width:'100%'
}
.table_cur tr {
display: flex;

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;"
@click="popupOpen = true"
v-show="!popupOpen"
>
</image>
</view>
@ -42,14 +41,17 @@
</u-checkbox-group>
</view>
<text style="font-weight: bold; margin-bottom: 5px;">按距离</text>
<view style="display: flex; align-items: center;">
<u--input
placeholder="请输入"
border="surround"
type="number"
v-model="formData.distance"
style="width: 50%; margin-top: 5px;"
style="width: 50%; margin-top: 5px; margin-right: 10px;"
></u--input>
<view style="display: flex; margin-top: 170%;">
<text>(km)</text>
</view>
<view style="display: flex; position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources,distance:1}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -152,7 +154,7 @@
.bottom-btn1{
width: 100px;
margin-left: 130px;
margin-left: 70px;
}
.bottom-btn2{
width: 100px;

View File

@ -0,0 +1,100 @@
import echarts from 'echarts/lib/echarts';
import moment from 'moment';
export default function DrpOption(data=[]) {
const maxY = Math.max(...data.map(item => item.sumDrp))
let eopts = {
tooltip: {
trigger: 'axis',
},
grid: {
x: 18,
y: 24,
x2: 28,
y2: 36,
borderWidth: 0,
bottom: '10%',
left: '8%',
width: '90%',
},
calculable: true,
xAxis: [
{
type: 'category',
data: data.map(o => moment(o.time).format("HH:mm")),
splitLine: {
show: false
},
axisLabel: {
color: '#bbb',
fontSize: 14,
overflow: 'truncate',
},
axisLine: {
lineStyle: {
color: '#dfdfdf',
width: 0.5
}
},
axisTick: {
show: false
}
}
],
yAxis: [
{
type: 'value',
position: 'left',
splitLine: {
show: true,
lineStyle: {
color: '#07a6ff',
width: 0.25,
type: 'dashed'
}
},
axisLabel: {
color: '#bbb',
fontSize: 10,
},
axisLine: {
show: false
},
axisTick: {
show: false
},
min: 0,
max:maxY
}
],
// dataZoom: [
// {
// type: 'slider', // 设置为滑动条类型
// xAxisIndex: 0, // 指定控制第一个 x 轴
// start: 0, // 初始窗口的起始位置(百分比)
// end: 100, // 初始窗口的结束位置(百分比)
// }
// ],
}
let chartData = {
series: [
{
name: '面雨量(mm)',
type: 'bar',
barWidth: '60%',
data: data.map(o => o.sumDrp),
itemStyle: {
normal: {
color: "#6395f9"
}
}
}
]
}
return {
eopts,
chartData
}
}

View File

@ -5,15 +5,15 @@
<div class="left">
<div class="icon">
<image
style="width: 100%; height: 100%"
src="../../static/tabs/touxiang.png"
mode="aspectFit"
style="width: 100%; height: 100%; border-radius: 50%"
:src="default_src"
mode="aspectFill"
></image>
</div>
<div class="info_name">
<div v-if="userList.data">{{ userList.data.userName }}</div>
<div v-if="userList.data">
{{ userList.data.orgList[0].positionList[0].orgName || '' }}
{{ userList.data.orgList[0].orgName || '' }}
</div>
</div>
</div>
@ -25,16 +25,23 @@
<!-- nav -->
<view class="navBar">
<div class="navList" v-for="(item, index) in getNavList" :key="index">
<div @click="myNavigateTo(item.url)">
<div class="navIcon">
<image
style="width: 100%; height: 100%"
:src="item.icon"
mode="aspectFit"
></image>
</div>
<div class="navTxt">{{ item.value }}</div>
</div>
<div @click="myNavigateTo(item.url)">
<div class="navIcon">
<image
style="width: 100%; height: 100%"
:src="item.icon"
mode="aspectFit"
></image>
<div
class="readStatus"
v-show="
(readStatus && item.key == 3) ||
(limit == 1 && readYjStatus && item.key == 5)
"
></div>
</div>
<div class="navTxt">{{ item.value }}</div>
</div>
</div>
</view>
<view class="warn">
@ -48,157 +55,253 @@
src="../../static/tabs/ld.png"
mode="aspectFit"
></image
><span>当前防汛应急响应IV级</span>
><span style="color: #000">当前防汛应急响应</span>
<span style="color: #59a7ff">{{ level }}</span>
</view>
<!-- 24小时综述 -->
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时综述</span>
</p>
<div class="time">{{ ydate }}{{ date }}</div>
</div>
<div class="info_con" v-if="list.data">
<span class="g1">{{ list.data.yesterday }}</span
><span class="g1">{{ list.data.today }}</span
>24小时中共有<span class="ye">{{ list.data.stationNum }}</span
>个降雨测站(山洪测站<span class="ye">{{ list.data.shStationNum }}</span
>)其中最大降雨测站为<span class="ye">{{
list.data.maxRain.stnm || '-'
}}</span
>降雨量<span class="ye">{{ list.data.maxRain.drp || '-' }}</span
>mm
<template v-if="list.data.cntDrp10 != 0"
><span class="b1">10mm</span>以下测站数为<apan class="ye">{{
list.data.cntDrp10
}}</apan
></template
><template v-if="list.data.cntDrp25 != 0"
><span class="b1">10mm至25mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp25
<view v-show="limit == 1">
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时综述</span>
</p>
<div class="time">{{ ydate }}{{ date }}</div>
</div>
<div class="info_con" v-if="list.data">
<span class="g1">{{ list.data.yesterday }}</span
><span class="g1">{{ list.data.today }}</span
>24小时中共有<span class="ye">{{ list.data.stationNum }}</span
>个降雨测站(山洪测站<span class="ye">{{
list.data.shStationNum
}}</span
></template
>
<template v-if="list.data.cntDrp50 != 0">
<span class="b1">25mm至50mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp50
>)其中最大降雨测站为<span class="ye">{{
list.data.maxRain ? list.data.maxRain.stnm : '-'
}}</span
>
</template>
<template v-if="list.data.cntDrp100 != 0">
<span class="b1">50mm至100mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp100
>降雨量<span class="ye">{{
list.data.maxRain ? list.data.maxRain.drp : '-'
}}</span
>
</template>
<template v-if="list.data.cntDrp250 != 0">
<span class="b1">100mm至250mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp250
}}</span
>
</template>
<template v-if="list.data.cntDrpg250 != 0"
><span class="b1">250mm以上</span>以下测站数为<span class="ye">{{
list.data.cntDrpg250
}}</span
></template
>
</div>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时天气预报</span>
</p>
<div>
<span class="time">{{ ydate }}{{ date }}</span>
<!-- <image
>mm
<template v-if="list.data.cntDrp10 != 0"
><span class="b1">10mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp10
}}</span
></template
><template v-if="list.data.cntDrp25 != 0"
><span class="b1">10mm至25mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp25
}}</span
></template
>
<template v-if="list.data.cntDrp50 != 0">
<span class="b1">25mm至50mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp50
}}</span
>
</template>
<template v-if="list.data.cntDrp100 != 0">
<span class="b1">50mm至100mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp100
}}</span
>
</template>
<template v-if="list.data.cntDrp250 != 0">
<span class="b1">100mm至250mm</span>以下测站数为<span class="ye">{{
list.data.cntDrp250
}}</span
>
</template>
<template v-if="list.data.cntDrpg250 != 0"
><span class="b1">250mm以上</span>以下测站数为<span class="ye">{{
list.data.cntDrpg250
}}</span
></template
>
</div>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">24小时天气预报</span>
</p>
<div>
<span class="time">{{ imgData[0] }}{{ imgData[1] }}</span>
<!-- <image
style="width: 16px; height: 16px; vertical-align: middle"
src="../../static/tabs/panelTitle.png"
mode="aspectFit"
@click="changeTable"
></image> -->
</div>
</div>
</div>
<div class="chartChange fl">
<div class="chart_tit" @click="changeTable">
<div class="chartChange fl">
<div class="chart_tit" @click="changeTable">
<image
style="vertical-align: middle"
src="../../static/tabs/chartcolumn@2x.png"
mode="aspectFit"
></image>
<span>图表</span>
</div>
<div v-if="changeBool" class="table_h">
<div
class="leftTab"
:class="{ activetextTypeTab: showTextTypeTab == 1 }"
@click="tabChange(1)"
>
水库降雨
</div>
<div
class="rightTab"
:class="{ activetextTypeTab: showTextTypeTab == 2 }"
@click="tabChange(2)"
>
区域降雨
</div>
</div>
</div>
<div class="imgs" style="height: 100%; text-align: center">
<!-- 24h天气预报图像-->
<image
style="vertical-align: middle"
src="../../static/tabs/chartcolumn@2x.png"
v-if="!changeBool && imgList.img24h"
:src="imgList.img24h.url"
mode="aspectFit"
></image>
<span>图表</span>
</div>
<div v-if="changeBool" class="table_h">
<div
class="leftTab"
:class="{ activetextTypeTab: showTextTypeTab == 1 }"
@click="tabChange(1)"
>
水库降雨
</div>
<div
class="rightTab"
:class="{ activetextTypeTab: showTextTypeTab == 2 }"
@click="tabChange(2)"
>
区域降雨
</div>
</div>
</div>
<!-- 表格-->
<div v-else class="tableBox">
<div class="table_div">
<div class="table_cur">
<table style="width: 100%; margin-top: -10%">
<tr>
<th style="width: 50px; color: #59a7ff">序号</th>
<div class="imgs" style="height: 100%; text-align: center">
<!-- 24h天气预报图像-->
<image
v-if="!changeBool"
src="../../static/tabs/bigImg.png"
mode="aspectFit"
></image>
<!-- 表格-->
<div v-else class="tableBox">
<div class="table_div">
<div class="table_cur">
<table>
<tr>
<th style="width: 50px">序号</th>
<th
v-if="showTextTypeTab == 1"
style="width: 70%; color: #59a7ff"
>
水库
</th>
<th v-else style="width: 70%; color: #59a7ff">区域</th>
<th v-if="showTextTypeTab == 1" style="width: 70%"></th>
<th v-else style="width: 70%">区域</th>
<th style="width: 50%">降雨量(mm)</th>
</tr>
<div style="max-height: 260px; overflow-y: auto">
<tr v-for="(item, index) in tableData.data.data" :key="index">
<td style="width: 62px">{{ index + 1 }}</td>
<td style="width: 70%">{{ item.name }}</td>
<td style="width: 50%">{{ item.drp }}</td>
<th style="width: 50%; color: #59a7ff">降雨量(mm)</th>
</tr>
</div>
<div style="max-height: 260px; overflow-y: auto">
<tr
v-for="(item, index) in tableData.data.data"
:key="index"
>
<td style="width: 62px">{{ index + 1 }}</td>
<td style="width: 70%">
{{ item.name }}
</td>
<td style="width: 50%">{{ item.drp }}</td>
</tr>
</div>
<!-- <tr>
<!-- <tr>
<td style="width: 62px">1</td>
<td style="width: 70%">水库水库</td>
<td style="width: 50%">11</td>
</tr> -->
</table>
</table>
</div>
</div>
</div>
</div>
</div>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">短时天气预报</span>
</p>
<div class="time">{{ imgHourstm[0] }} {{ imgHourstm[1] }}</div>
</div>
<div class="imgs" style="height: 100%; text-align: center">
<image :src="imgHoursList.url" mode="aspectFit"></image>
</div>
</view>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">短时天气预报</span>
</p>
<div class="time">04月25日08时 04月25日10时</div>
</div>
<div class="imgs" style="height: 100%; text-align: center">
<image src="../../static/tabs/bigImg.png" mode="aspectFit"></image>
</div>
<view v-show="limit == 0">
<view class="info_24">
<div class="heart">
<p class="title">
<span class="line"></span><span class="h4">雨情</span>
</p>
<div class="time" style="width:50%; color: #000" v-if="timeList">
<uni-data-select
v-model="value1"
:localdata="timeList"
@change="changeTime"
:clear="false"
>
</uni-data-select>
</div>
</div>
<div class="info_icon" style="height: 260px; width: 100%" v-if="chartData.chartData">
<qiun-data-charts
:chartData="chartData.chartData"
:echartsApp="true"
:eopts="chartData.eopts"
/>
</div>
</view>
<view class="info_24">
<div class="heart" style="margin-bottom: 10px">
<p class="title">
<span class="line"></span><span class="h4">水情</span>
</p>
<div class="time" style="width:50%; color: #000">
<u-subsection
:list="subList"
:current="current"
@change="subChange"
mode="subsection"
></u-subsection>
</div>
</div>
<div class="info_icon" v-if="current == 0">
<div
v-for="(item, i) in hdList"
:key="i"
@click="jumpHdDetail(item)"
style="
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
"
>
<div>
<div style="font-size: 32rpx">{{ item.stnm }}</div>
<div style="font-size: 24rpx">实时水位{{ item.z }}m</div>
</div>
<div style="color: #91939b">监测时间{{ item.tm }}</div>
</div>
</div>
<div class="info_icon" v-else>
<div
v-for="(item, i) in skList"
:key="i"
style="
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
"
@click="jumpSkDetail(item)"
>
<div>
<div style="font-size: 32rpx">{{ item.stnm }}</div>
<div style="font-size: 24rpx">
实时水位{{ item.normWatLev }}m
</div>
</div>
<div style="color: #91939b">监测时间{{ item.tm }}</div>
</div>
</div>
</view>
</view>
</view>
</template>
@ -215,6 +318,10 @@ const dataType = {
}
import moment from 'moment'
import { level } from '../../pages/utils/dicType'
import { disType } from '../utils/dicType.js'
import drpOption from './chartOption.js'
import { restm } from '../utils/tool'
export default {
data () {
@ -231,85 +338,331 @@ export default {
ydate: '',
showTextTypeTab: 1,
tableData: {},
tm: ''
tm: '',
level: '',
limit: disType(uni.getStorageSync('value').adcd),
timeList: [
{ text: '昨天08:00~当前时间', value: 1 },
{ text: '今天08:00~当前时间', value: 2 },
{ text: '昨天08:00~今天08:00', value: 3 },
{ text: '最近1小时', value: 4 },
{ text: '最近3小时', value: 5 },
{ text: '最近6小时', value: 6 },
{ text: '最近12小时', value: 7 },
{ text: '最近24小时', value: 8 }
],
value1: 3,
rainChartData: [],
formData: {
stm: moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
etm: moment().startOf('day').set({ hour: 8, minute: 0 })
},
rainChartData: [],
chartData: {},
subList: ['河道水情', '水库水情'],
current: 0,
hdList: [],
skList: [],
readStatus: false,
readYjStatus: false,
default_src: uni.getStorageSync('avatar'),
imgList: {},
imgtm: moment().format('YYYYMMDD'),
imgData: [],
imgHours: '',
imgHourstm: [],
imgHoursList: {},
interval: null
}
},
computed: {
getNavList() {
const adcd = uni.getStorageSync('value').adcd
let lever = 0
if (adcd.endsWith('000000000')) {
//
return [
{
value: '雨情',
key: 1,
icon: '../../static/tabs/xingzhuang.png',
url:"/pages/rain/rain"
},
{
value: '水情',
key: 2,
icon: '../../static/tabs/water.png',
url:"/pages/water/water"
},
{
value: '工情灾情',
key: 3,
icon: '../../static/tabs/gongqing.png',
url:'/pages/gqzq/index'
},
{
value: '信息上报',
key: 4,
icon: '../../static/tabs/xinxi_icon@2x.png',
url:'/pages/xxsb/index'
},
{
value: '预警',
key: 5,
icon: '../../static/tabs/yujing_icon@2x.png',
url:'/pages/forewarning/forewarning'
}
]
} else {
//
return [
{
value: '雨情',
key: 1,
icon: '../../static/tabs/xingzhuang.png',
url:"/pages/rain/rain"
},
{
value: '水情',
key: 2,
icon: '../../static/tabs/water.png',
url:"/pages/water/water"
},
{
value: '工情灾情',
key: 3,
icon: '../../static/tabs/gongqing.png',
url:'/pages/gqzq/index'
},
{
value: '调令反馈',
key: 5,
icon: '../../static/tabs/yujing_icon@2x.png',
url:'/pages/orderFeedback/orderFeedback'
},
{
value: '信息上报',
key: 4,
icon: '../../static/tabs/xinxi_icon@2x.png',
url:'/pages/xxsb/index'
}
]
}
}
getNavList () {
const adcd = uni.getStorageSync('value').adcd
let lever = 0
if (adcd.endsWith('000000000')) {
//
return [
{
value: '雨情',
key: 1,
icon: '../../static/tabs/xingzhuang2.png',
url: '/pages/rain/rain'
},
{
value: '水情',
key: 2,
icon: '../../static/tabs/water2.png',
url: '/pages/water/water'
},
{
value: '工情灾情',
key: 3,
icon: '../../static/tabs/gongqing2.png',
url: '/pages/gqzq/index'
},
{
value: '信息上报',
key: 4,
icon: '../../static/tabs/xinxi_icon@2x2.png',
url: '/pages/xxsb/index'
},
{
value: '预警',
key: 5,
icon: '../../static/tabs/yujing_icon@2x2.png',
url: '/pages/forewarning/forewarning'
}
]
} else {
//
return [
{
value: '雨情',
key: 1,
icon: '../../static/tabs/xingzhuang2.png',
url: '/pages/rain/rain'
},
{
value: '水情',
key: 2,
icon: '../../static/tabs/water2.png',
url: '/pages/water/water'
},
// {
// value: '',
// key: 3,
// icon: '../../static/tabs/gongqing2.png',
// url: '/pages/gqzq/index'
// },
{
value: '调令反馈',
key: 5,
icon: '../../static/tabs/yujing_icon@2x2.png',
url: '/pages/orderFeedback/orderFeedback'
},
{
value: '信息上报',
key: 4,
icon: '../../static/tabs/xinxi_icon@2x2.png',
url: '/pages/xxsb/index'
}
]
}
}
},
watch: {
rainChartData (newValue) {
this.chartData = { ...drpOption(newValue) }
},
limit: {
handler (newValue) {
if (!newValue) {
this.getRainList()
}
},
immediate: true
},
current: {
handler (newValue) {
if (newValue == 0) {
this.getHdList()
} else {
this.getSkList()
}
},
immediate: true
}
},
methods: {
async getImgs () {
let h = moment().format('HH')
let m = moment().format('mm')
await uni.request({
url: 'http://223.75.53.124:8005/grb/rainimglist',
data: {
tm: `${this.imgtm}08`
},
success: res => {
console.log(res.data.data)
this.imgList = res.data.data
// let inx = restm(h)
// this.imgHours = res.data.data.imgHours[inx]
let tm = moment().add(1, 'days').format('MM月DD日')
let tm2 = moment().format('MM月DD日')
this.imgData = [`${tm2}08时`, `${tm}08时`]
// this.imgHourstm = [`${tm2}${h + 1}`, `${tm2}${h + 2}`]
}
})
},
async getHoursImg () {
let h = moment().format('HH')
let m = moment().format('mm')
console.log('hhh--', h, m)
let tms = null,
mm = null
let h1 = Number(h) - 1
if (m > 30) {
tms = `${this.imgtm}${h1}30`
mm = '30'
} else if (m < 10) {
tms = `${this.imgtm}${h1}00`
mm = '00'
} else {
tms = `${this.imgtm}${h1}30`
mm = '30'
}
uni.request({
url: 'https://shqxjs.cloudowr.cn/service/radar/rainimg',
data: {
tm: tms
},
success: res => {
console.log('000000', tms, res.data.data)
this.imgHoursList = res.data.data.img
let m = moment().format('MM月DD日')
console.log('am222', this.imgHoursList)
this.imgHourstm = [`${m}${h1}${mm}`, `${m}${h1 + 2}${mm}`]
}
})
},
async getInterval () {
this.interval = setInterval(() => {
this.getHoursImg()
}, 60 * 1000)
},
async getYjRead () {
try {
const { data } = await uni.$http.get(
'/gunshiApp/xfflood/current/situation/flag'
)
if (data.code == 200) {
this.readYjStatus = data.data
}
} catch (error) {
uni.$showMsg()
}
},
async getReadStatus () {
try {
const { data } = await uni.$http.get(
'/gunshiApp/xfflood/xfProjectRun/has/read'
)
if (data.code == 200) {
this.readStatus = Object.values(data.data).some(item => item == true)
}
} catch (error) {
uni.$showMsg()
}
},
jumpHdDetail (params) {
uni.navigateTo({
url: `/pages/hdDetail/hdDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&wrz=${params.wrz}&grz=${params.grz}`
})
},
jumpSkDetail (params) {
uni.navigateTo({
url: `/pages/skDetail/skDetail?stcd=${params.stcd}&stnm=${params.stnm}&source=${params.source}&afsltdz=${params.afsltdz}&flLowLimLev=${params.flLowLimLev}&desFloodLev=${params.desFloodLev}&calFloodLev=${params.calFloodLev}&resCode=${params.resCode}`
})
},
async getSkList () {
try {
const { data } = await uni.$http.post(
'/gunshiApp/xfflood/reservoir/water/list',
{
sources: ['SW', 'SK'],
adcd: uni.getStorageSync('value').adcd
}
)
if (data.code == 200) {
this.skList = data.data
}
} catch (error) {
uni.$showMsg()
}
},
async getHdList () {
try {
const { data } = await uni.$http.post(
'/gunshiApp/xfflood/river/water/list',
{
sources: ['SH', 'SW'],
adcd: uni.getStorageSync('value').adcd
}
)
if (data.code == 200) {
this.hdList = data.data
}
} catch (error) {
uni.$showMsg()
}
},
subChange (e) {
this.current = e
},
async getRainList () {
try {
const { data } = await uni.$http.post(
'/gunshiApp/xfflood/real/rain/home/list',
{
start: this.formData.stm.format('YYYY-MM-DD HH:mm:ss'),
end: this.formData.etm.format('YYYY-MM-DD HH:mm:ss')
}
)
if (data.code == 200) {
console.log('rainChartData0,', data)
this.rainChartData = data.data
}
} catch (error) {
uni.$showMsg()
}
},
changeTime (params) {
let tmValue = []
if (params === 1) {
tmValue = [
moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
moment()
]
} else if (params === 2) {
tmValue = [
moment().startOf('day').set({ hour: 8, minute: 0 }),
moment()
]
} else if (params === 3) {
tmValue = [
moment()
.subtract(1, 'days')
.startOf('day')
.set({ hour: 8, minute: 0 }),
moment().startOf('day').set({ hour: 8, minute: 0 })
]
} else if (params === 4) {
tmValue = [moment().subtract(1, 'hours'), moment()]
} else if (params === 5) {
tmValue = [moment().subtract(3, 'hours'), moment()]
} else if (params === 6) {
tmValue = [moment().subtract(6, 'hours'), moment()]
} else if (params === 7) {
tmValue = [moment().subtract(12, 'hours'), moment()]
} else if (params === 8) {
tmValue = [moment().subtract(24, 'hours'), moment()]
}
this.formData.stm = tmValue[0]
this.formData.etm = tmValue[1]
this.getRainList()
},
todetail (val) {
console.log('val', val)
if (val == 1) {
@ -402,17 +755,52 @@ export default {
this.tm = d1 + h1
},
myNavigateTo (url) {
uni.navigateTo({
url: url //
});
}
async getResponseLevel () {
try {
const { data } = await uni.$http.post(
'/gunshiApp/xfflood/xfEmerRespR/page',
{
pageSo: { pageSize: 10, pageNumber: 1 },
year: moment().format('YYYY')
}
)
if (data.code == 200) {
if (data.data.records.length > 0) {
this.level = level(data.data.records[0].level)
} else {
this.level = '无'
}
}
} catch (e) {
uni.$showMsg()
}
},
myNavigateTo (url) {
uni.navigateTo({
url: url //
})
}
//
},
onLoad () {
this.getSwiperList()
this.getOverview()
this.getDataTime()
this.getResponseLevel()
this.getImgs()
this.getHoursImg()
this.getInterval()
},
onShow () {
this.getReadStatus()
if (this.limit == 1) {
this.getYjRead()
}
},
onUnload () {
clearInterval(this.interval)
this.interval = null
}
}
</script>
@ -469,6 +857,7 @@ export default {
text-align: center;
}
.navIcon {
position: relative;
width: 50px;
height: 50px;
/* border-radius: 10px;
@ -477,6 +866,15 @@ export default {
justify-content: center;
align-items: center;
}
.readStatus {
position: absolute;
top: 0;
right: 0;
width: 10px;
height: 10px;
border-radius: 50%;
background: #de2433;
}
.warn {
background-color: #fff;
color: #de2433;
@ -515,7 +913,7 @@ export default {
/* info_24 */
.info_24 {
padding: 20px;
padding: 15px;
background-color: #fff;
margin-bottom: 12rpx;
}
@ -565,6 +963,7 @@ export default {
/* 表格 */
.tableBox {
width: 100%;
position: relative;
}
@ -584,6 +983,7 @@ export default {
color: #026be0;
}
.table_div {
widows: 100%;
height: 100%;
max-width: calc(100% - 0px);
max-height: calc(100vh - 24px);
@ -616,7 +1016,7 @@ export default {
.table_cur td {
height: 56rpx;
border-bottom: 1px solid #d8ddeb;
border-bottom: 1px solid #e5e9f2;
font-size: 14px;
color: #2f4056;
padding: 0 10px;

View File

@ -13,6 +13,8 @@
<uni-forms-item>
<checkbox :checked="formData.checked" @click="handleChange(formData)" /><text>记住用户名和密码</text>
</uni-forms-item>
<!-- <button type="primary" class="button" @click="xian"></button> -->
<!-- <button type="primary" class="button" @click="xiang"></button> -->
<button type="primary" class="button" @click="login(formData)"></button>
</uni-forms>
</view>
@ -54,7 +56,20 @@ import { onMounted } from "vue"
checked = !checked
formData.checked = !formData.checked
},
xian() {
this.formData = {
username: 'cwz',
password: '12345678a',
checked: false,
}
},
xiang() {
this.formData = {
username: 'mdx',
password: '1234567a',
checked: false,
}
},
login(formData){
//loading

View File

@ -21,15 +21,42 @@
type="primary"
text="反馈"
customStyle="margin-top: 20px"
@click="submit1"
@click="show1 = true"
></u-button>
<u-button
type="primary"
text="反馈并结束"
customStyle="margin-top: 10px"
@click="submit2"
@click="show2 = true"
></u-button>
</div>
<u-modal
width="250"
:show="show1"
showCancelButton
closeOnClickOverlay
@confirm="submit1"
@cancel="() => show1 = false"
@close="() => show1 = false"
>
<view class="slot-content">
<rich-text :nodes="'确认反馈?'" :style="{fontSize:'16px'}"></rich-text>
</view>
</u-modal>
<u-modal
width="250"
:show="show2"
showCancelButton
closeOnClickOverlay
@confirm="submit2"
@cancel="() => show2 = false"
@close="() => show2 = false"
>
<view class="slot-content">
<rich-text :nodes="'确认反馈并结束?'" :style="{fontSize:'16px'}"></rich-text>
</view>
</u-modal>
</view>
</template>
@ -46,7 +73,9 @@
data() {
return {
value:'',
list:[]
list:[],
show1:false,
show2:false
};
},
created() {
@ -65,6 +94,7 @@
}
},
async submit1() {
this.show1 = false
try{
if(!this.value){
this.$refs.uToast.show({
@ -88,6 +118,7 @@
}
},
async submit2() {
this.show2 = false
try{
if(!this.value){
this.$refs.uToast.show({

View File

@ -66,8 +66,11 @@
<u-checkbox name="0" label="水库调洪" class="checkItem"></u-checkbox>
<u-checkbox name="1" label="人员转移" class="checkItem"></u-checkbox>
</u-checkbox-group>
<text class="title">按时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<div :style="{display:'flex',alignItems:'center'}">
<text class="title">按时间</text>
<u-switch v-model="isTime" size="20" :style="{margin:'2px 0 0 10px'}"></u-switch>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showStmPicker = true"
@ -77,7 +80,7 @@
</view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div>
<div :style="{display:'flex',marginTop:'10px'}">
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view
class="tmPicker"
@click="showEtmPicker = true"
@ -150,25 +153,8 @@
showEtmPicker:false,
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
list:[],
// {
// serial:'10',//
// year:'2023',//
// executeOrgCode:'',//
// executeOrgName:'',//
// dispatchType:'',//
// forwardOrgName:'',//
// startTm:'',//
// endTm:'',//
// content:'',//
// createTm:'',//
// createUserId:'id',//id
// createUserName:'',//
// status:'1',//0=1=2=
// createTm:'2023-10-10 12:12:10',
// dispatchId: '14'
// }
};
},
computed: {
@ -191,6 +177,7 @@
this.show = false
},
reSet() {
this.isTime = false
this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date())
this.check = ['0','1']
@ -200,7 +187,9 @@
const params = {
status:this.tabVal,
dispatchTypeList:this.check,
dateTimeRangeSo:{
}
if(this.isTime){
params.dateTimeRangeSo = {
start:moment(this.stm).format('YYYY-MM-DD HH:mm:sss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:sss')
}

View File

@ -2,7 +2,7 @@
<view :style="{height:'100vh',overflow:'hidden',background:'#f7f7f7'}">
<u-status-bar></u-status-bar>
<u-navbar
title="2024年调度令05号"
:title="record.year+'年度调令第'+record.serial+'号'"
:autoBack="true"
:titleStyle="{
fontSize:'18px'
@ -25,7 +25,8 @@
>
</u-tabs>
<div class="mybody">
<component :is="tabsVal" :record="record"></component>
<uniZl v-if="tabsVal==='uniZl'" :record="record"></uniZl>
<uniFk v-if="tabsVal==='uniFk'" :record="record"></uniFk>
</div>
</view>
</template>
@ -37,11 +38,11 @@
const tabsOptions = [
{
name:'调度指令',
components:uniZl
components:'uniZl'
},
{
name:'执行反馈',
components:uniFk
components:'uniFk'
},
]
@ -50,7 +51,7 @@
data() {
return {
tabsOptions:tabsOptions,
tabsVal:uniZl,
tabsVal:'uniZl',
record:{}
};
},

View File

@ -1,33 +1,37 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 50px;">
<th style="width: 11%;">
<div style="margin-top: 6px;">序号</div>
</th>
<th style="width: 100px">
<th style="width: 27%">
<div style="margin-top: 6px;">站名</div></th>
<th style="width: 70px;">
<th style="width: 20%;">
<div>时段雨量</div>
<div style="margin-top: -12px;">(mm)</div>
</th>
<th style="width: 70px;" >
<th style="width: 20%;" >
<div>昨日降雨</div>
<div style="margin-top: -12px;">(mm)</div>
</th>
<th style="width: 100px">
<th style="width: 22%">
<div style="margin-top: 6px;">所属政区</div></th>
</tr>
<div style="max-height: 460px; overflow-y: auto">
<tr v-for="(item, index) in list" :key="index">
<td style="width: 50px">{{ index + 1 }}</td>
<td style="width: 100px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 70px">{{ item.drp }}</td>
<td style="width: 70px">{{ item.yesDrp || 0 }}</td>
<td style="width: 100px">{{ item.adnm }}</td>
<!-- :style="{'max-height':height + 'px', 'overflow-y': 'auto',width:'100%'}" -->
<div class="scroll-table">
<tr v-for="(item, index) in list" :key="index" style="width:100%">
<td style="width: 11%;">{{ index + 1 }}</td>
<td style="width: 27%; color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">
{{ item.stnm }}</td>
<td style="width: 20%">{{ item.drp || 0 }}</td>
<td style="width: 20%">{{ item.yesDrp || 0 }}</td>
<td style="width:23%;">{{ item.adnm }}</td>
</tr>
<div style="height:125px"></div>
</div>
</table>
</div>
</div>
@ -40,16 +44,22 @@
list:{
type:Array,
default:[],
},
height:{
type:Number,
default:0,
}
},
methods:{
jumpDetail(params){
console.log(123)
uni.navigateTo({
url:`/pages/rainDetail/rainDetail?stcd=${params.stcd}`
url:`/pages/rainDetail/rainDetail?stcd=${params.stcd}&stnm=${params.stnm}`
})
}
}
},
}
</script>
@ -61,6 +71,7 @@
flex: 1;
padding-top: 0px;
overflow-x: scroll;
padding: 0 10px;
}
/*table样式*/
.table_cur {
@ -84,7 +95,11 @@
white-space: nowrap;
text-align: center !important;
}
.scroll-table{
height: calc(100vh - 125px);
overflow-y: auto;
width:'100%'
}
.table_cur td {
height: 65rpx;
// border-bottom: 1px solid #d8ddeb;

View File

@ -1,18 +1,22 @@
<template>
<view class="rain-box">
<view class="rain-box" style="overflow:hidden;height:100vh">
<u-status-bar ></u-status-bar>
<!-- <view style="height: var(--status-bar-height); width: 100%;"></view> -->
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<view class="">
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view style="font-size:18px">
雨情
</view>
<!-- <u-icon name="arrow-right" color="#000" size="28"></u-icon> -->
<cover-image
<view @click="popupOpen = true" style="margin-right:10px">
<image
src="../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px;"
@click="popupOpen = true"
v-show="!popupOpen"
style="width: 20px; height: 20px; "
>
</cover-image>
</image>
</view>
</view>
<!-- 搜索以及多级下拉 -->
<view class="search-box">
@ -25,13 +29,13 @@
<u-icon name="arrow-up-fill" color="#000" size="20" v-show="!switchIcon"></u-icon>
</view>
<view class="rain-input" style="width: 50%;">
<u--input
<u-input
placeholder="请输入站点"
prefixIcon="search"
prefixIconStyle="font-size: 22px;color: #909399"
@change="formData = {...formData,stArg:e}"
@change="changeForm"
:value="formData.stArg"
></u--input>
></u-input>
</view>
<view style="display:flex" v-show="limit == 1">
<view class="" @click="handleClick1" >
@ -49,12 +53,12 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!jiangyu"></u-icon>
<u-icon name="arrow-up-fill" color="#000" size="20" v-show="jiangyu"></u-icon>
<view class="jiangyu-dropdown" v-show="this.jiangyu">
<view :class="{'active': formData.orderType == 0}" @click="rainsort(0)" style="border-bottom: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; padding: 10px 0; display: flex; align-items: center;">
<text style="margin-right: 220px;">按时段降雨降序</text>
<view :class="{'active': formData.orderType == 0,'no_f':true}" @click="rainsort(0)" style="border-top: 1px solid #dfdfdf;">
<text >按时段降雨降序</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 0"></u-icon>
</view>
<view :class="{'active':formData.orderType == 1}" @click="rainsort(1)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 220px;">按昨日降雨降序</text>
<view :class="{'active':formData.orderType == 1,'no_f':true}" @click="rainsort(1)" >
<text>按昨日降雨降序</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 1"></u-icon>
</view>
</view>
@ -70,24 +74,24 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!rainTime"></u-icon>
<u-icon name="arrow-up-fill" color="#000" size="20" v-show="rainTime"></u-icon>
<view class="rain-time-dropdown" v-show="rainTime">
<view class="" :class="{'active': formData.timeType == 1}" @click="timesort(1)" style="border-bottom: 1px solid #dfdfdf; border-top: 1px solid #dfdfdf; padding: 10px 0; display: flex; align-items: center;">
<text style="margin-right: 300px;">1h</text>
<view :class="{'active': formData.timeType == 1,'no_f':true}" @click="timesort(1)" style="border-top: 1px solid #dfdfdf;">
<text >1h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 1"></u-icon>
</view>
<view class="" :class="{'active': formData.timeType == 3}" @click="timesort(3)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">3h</text>
<view :class="{'active': formData.timeType == 3,'no_f':true}" @click="timesort(3)" >
<text >3h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 3"></u-icon>
</view>
<view class="" :class="{'active': formData.timeType == 6}" @click="timesort(6)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">6h</text>
<view :class="{'active': formData.timeType == 6,'no_f':true}" @click="timesort(6)" >
<text >6h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 6"></u-icon>
</view>
<view class="" :class="{'active': formData.timeType == 12}" @click="timesort(12)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">12h</text>
<view :class="{'active': formData.timeType == 12,'no_f':true}" @click="timesort(12)" >
<text >12h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 12"></u-icon>
</view>
<view class="" :class="{'active': formData.timeType == 24}" @click="timesort(24)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;">
<text style="margin-right: 300px;">24h</text>
<view :class="{'active': formData.timeType == 24,'no_f':true}" @click="timesort(24)" >
<text>24h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 24"></u-icon>
</view>
</view>
@ -99,11 +103,11 @@
</view>
<!-- 时间段 -->
<view style="padding: 5px 10px; text-align: center; color: #f7b156;">
统计时段{{tm.stm}}{{tm.etm}}
<view style="padding: 1% 0%;width:100vw; text-align: center; color: #f7b156;">
统计时段:{{tm.stm}}{{tm.etm}}
</view>
<view style="margin: 0 10px;">
<Table :list="rainList"/>
<view style="width:100%">
<Table :list="rainList" :height='tableHeight'/>
</view>
<u-picker
:show="show"
@ -125,7 +129,7 @@
>
</u-picker>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" >
<view style="padding: 30px 20px;">
<view style="padding: 30px 20px; ">
<text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group
@ -156,7 +160,7 @@
<u-button class="first-btn" text="昨日08:00~当前时间"></u-button>
<u-button class="second-btn" text="今天08:00~当前时间"></u-button>
</view> -->
<view style="display: flex; margin-top: 240%;">
<view style="display: flex; position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,source}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popupOpen = false"></u-button>
@ -172,7 +176,6 @@
import moment from "moment"
import {disType} from "../utils/dicType.js"
const adcd = uni.getStorageSync('value').adcd
const type = disType(adcd)
export default {
data() {
return {
@ -222,10 +225,14 @@
basCode:'',
source:["SH","SW","QX","SK"],
stArg:'',
adcd:type == 1 ? undefined :adcd,
etm:moment().set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm"),
stm:moment().subtract(1, 'day').set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm")
}
adcd:disType(uni.getStorageSync('value').adcd) == 1 ? undefined :uni.getStorageSync('value').adcd,
etm:moment().format("YYYY-MM-DD HH:mm"),
stm:moment().subtract(1, 'day').format("YYYY-MM-DD HH:mm")
// etm:moment().set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm"),
// stm:moment().subtract(1, 'day').set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm")
},
tableHeight:0,
limit:disType(uni.getStorageSync('value').adcd)
}
},
components:{
@ -238,9 +245,6 @@
etm:moment().format("YYYY-MM-DD HH:mm")
}
},
limit(){
return disType(adcd)
}
},
watch:{
formData(newV, oldV){
@ -249,6 +253,9 @@
}
},
methods: {
changeForm(e){
this.formData = {...this.formData,stArg:e}
},
handleJiangyu(e){
if(this.rainTime){
e.stopPropagation();
@ -391,9 +398,13 @@
},
//
async getRainList(){
let obj = {
...this.formData,
timeType:undefined
}
try{
const {data} = await uni.$http.post(
"/gunshiApp/xfflood/real/rain/list",{...this.formData,timeType:undefined}
"/gunshiApp/xfflood/real/rain/app/list",obj
)
if(data.code == 200){
this.rainList = [...data.data];
@ -410,6 +421,15 @@
this.adnmList();
this.basNameList()
this.getRainList()
},
onReady(){
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 280;
console.log("this.tableHeight", that.tableHeight);
}
})
}
}
</script>
@ -420,11 +440,12 @@
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 40px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.search-box{
width: 100%;
@ -456,37 +477,54 @@
display: flex;
column-gap: 5px;
margin-right: 20px;
}
.jiangyu{
position: relative;
// position: relative;
.jiangyu-dropdown{
position: absolute;
background-color: #fff;
width: 100vw;
left: -72px;
left: 0;
top: 35px;
.active{
color:#02a7f0
}
view{
margin-top: 10px;
}
text{
margin-right: 58%;
}
.no_f{
border-bottom: 1px solid #dfdfdf;
// border-top: 1px solid #dfdfdf;
padding: 10px 15px;
display: flex;
align-items: center;
// justify-content: space-around;
}
}
}
.rain-time{
position: relative;
// position: relative;
.rain-time-dropdown{
position: absolute;
background-color: #fff;
width: 100vw;
left: -230px;
// left: -10%;
left: 0;
top: 35px;
.active{
color:#02a7f0
color:#02a7f0;
text{
margin-right: 80%;
}
}
view{
margin-top: 10px;
.no_f{
border-bottom: 1px solid #dfdfdf;
// border-top: 1px solid #dfdfdf;
padding: 10px 15px;
display: flex;
align-items: center;
// justify-content: space-around;
}
}
}
@ -499,12 +537,14 @@
background-color: #f2f2f2;
}
.bottom-btn1,.bottom-btn2{
width: 30%;
width: 100px;
}
.bottom-btn1{
margin-left: 130px;
margin-left: 70px;
}
.bottom-btn2{
margin-right: -12px;
margin-left: 10px;
}
</style>

View File

@ -35,14 +35,15 @@ export default function DrpOption(echartData) {
xAxis: [
{
type: 'category',
data: echartData?.time.map(item => item.substr('2020--'.length)),
// data: echartData?.time.map(item => item.substr('2020--'.length)),
data: echartData?.time,
splitLine: {
show: false
},
axisLabel: {
color: '#333',
fontSize: 12,
formatter: val => val.substr('2020-'.length, 11)
format: 'xAxisFormat'
},
axisLine: {
lineStyle: {

View File

@ -1,20 +1,47 @@
<template>
<view class="jcsj-box">
<view class="time-ranger">
<uni-datetime-picker type="datetimerange" v-model="tm" @change="handleRanger"></uni-datetime-picker>
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view>
<!-- <uni-datetime-picker type="datetimerange" v-model="tm" @change="handleRanger"></uni-datetime-picker>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view> -->
</view>
<!-- <view class="" style="width: 100%; height: 3px; background-color: #dfdfdf; margin-bottom: 2px;">
</view> -->
<view class="jcsj-content">
<view class="jcsj-charts">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts"/>
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
<view class="jcsj-table">
<JcsjTable :tableData="tableData" />
</view>
</view>
<u-datetime-picker
:show="showTime"
v-model="startTime"
mode="datetime"
@confirm="handleStartTime"
@cancel="showTime=false"
></u-datetime-picker>
<u-datetime-picker
:show="showTime1"
v-model="endTime"
mode="datetime"
@confirm="handleEndTime"
@cancel="showTime1=false"
></u-datetime-picker>
</view>
</template>
@ -23,7 +50,7 @@
import JcsjTable from "./jcsjTable"
import drpOption from "./chartOption.js"
const stm = moment().subtract(7, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm");
const etm = moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm");
const etm = moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm");
export default {
props:{
stcd:String,
@ -31,21 +58,39 @@
},
data() {
return {
tm:[stm,etm],
startTime:stm,
endTime:etm,
stm,
etm,
tableData:[],
chartData: {},
chartData: {chartData:{},eopts:{}},
rainChartData:{},
showTime:false,
showTime1:false
}
},
components:{
JcsjTable
},
watch:{
rainChartData(newV, oldV){
rainChartData:{
handler(newV){
this.chartData = {...drpOption(newV)}
},
deep:true
}
},
methods: {
handleStartTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.stm = time
this.showTime = false
},
handleEndTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.etm = time;
this.showTime1 = false
},
handleRanger(e){
console.log(e);
this.tm = [...e]
@ -57,8 +102,8 @@
"/gunshiApp/xfflood/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime",
{
stcd:this.stcd,
startTime:moment(this.tm[0]).format("YYYY-MM-DD HH:mm:ss"),
endTime:moment(this.tm[1]).format("YYYY-MM-DD HH:mm:ss"),
startTime:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
})
if(data.code == 200){
this.tableData = [...data.data]
@ -74,10 +119,9 @@
"/gunshiApp/xfflood/attResBase/rainBasinDivision/queryStStbprpPerHourChart/StcdAndStartTimeAndEndTime",
{
stcd:this.stcd,
startTime:moment(this.tm[0]).format("YYYY-MM-DD HH:mm:ss"),
endTime:moment(this.tm[1]).format("YYYY-MM-DD HH:mm:ss"),
startTime:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
})
console.log("data",data);
if(data.code == 200){
this.rainChartData = {...data.data}
}
@ -101,14 +145,24 @@
<style lang="scss" scoped>
.jcsj-box{
.time-ranger{
display: flex;
align-items: center;
// display: flex;
// align-items: center;
margin-bottom: 10px;
.start-time, .end-time{
display: flex;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf;
}
.search-btn{
margin: 3px 0 0 5px;
color: #3399ef;
// color: #3399ef;
}
}
.jcsj-content{
max-height:calc(100vh - 89px - 43px - 45px);
overflow-y:auto
}
.jcsj-charts{
width:100%;
height: 300px;

View File

@ -1,7 +1,7 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 50px;">
序号
@ -11,12 +11,14 @@
小时雨量(mm)
</th>
</tr>
<div style="max-height: 320px; overflow-y: auto">
<tr v-for="(item, index) in tableData" :key="index">
<!-- style="max-height: 320px; overflow-y: auto" -->
<div style="max-height: 250px; overflow-y: auto">
<tr v-for="(item, index) in tableData" :key="index">
<td style="width: 50px">{{ index + 1 }}</td>
<td style="width: 200px;">{{ item.time }}</td>
<td style="width: 150px">{{ item.sumDrp }}</td>
</tr>
<div style="height:155px"></div>
</div>
</table>
</div>
@ -69,6 +71,11 @@
white-space: nowrap;
text-align: center !important;
}
.scroll-table{
height: calc(100vh - 145px);
overflow-y: auto;
width:'100%'
}
.table_cur td {
height: 65rpx;

View File

@ -1,19 +1,20 @@
<template>
<view class="rain-detail-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
雨情
{{stnm}}
</view>
</view>
<view class="tab-bar" >
<view class="jcsj" @click="()=>this.activeOne = 0" :class="{'active':this.activeOne == 0}">
<view class="jcsj" @click="activeOne = 0" :class="{'active':activeOne == 0}">
监测数据
</view>
<view class="tjsj" @click="()=>this.activeOne = 1" :class="{'active':this.activeOne == 1}">
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}">
统计数据
</view>
<view class="zbyq" @click="()=>this.activeOne = 2" :class="{'active':this.activeOne == 2}">
<view class="zbyq" @click="activeOne = 2" :class="{'active':activeOne == 2}">
周边雨情
</view>
</view>
@ -33,7 +34,8 @@
data(){
return {
activeOne:0,
stcd:''
stcd:'',
stnm:''
}
},
components:{
@ -47,27 +49,32 @@
}
},
onLoad(option) {
this.stcd = option.stcd
this.stcd = option.stcd;
this.stnm = option.stnm;
}
}
</script>
<style lang="scss" scoped>
.rain-detail-box{
height: 100vh;
overflow: hidden;
.nav-bar{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
font-size: 18px;
}
.tab-bar{
display: flex;

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;"
@click="popupOpen = true"
v-show="!popupOpen"
>
</image>
</view>
@ -42,14 +41,17 @@
</u-checkbox-group>
</view>
<text style="font-weight: bold; margin-bottom: 5px;">按距离</text>
<view style="display: flex; align-items: center;">
<u--input
placeholder="请输入"
border="surround"
type="number"
v-model="formData.distance"
style="width: 50%; margin-top: 5px;"
style="width: 50%; margin-top: 5px; margin-right: 10px;"
></u--input>
<view style="display: flex; margin-top: 170%;">
<text>(km)</text>
</view>
<view style="display: flex; position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources,distance:1}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -152,7 +154,7 @@
.bottom-btn1{
width: 100px;
margin-left: 130px;
margin-left: 70px;
}
.bottom-btn2{
width: 100px;

View File

@ -1,10 +1,21 @@
<template>
<view class="jcsj-box">
<view class="time-ranger">
<uni-datetime-picker type="datetimerange" v-model="tm" @change="handleRanger"></uni-datetime-picker>
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view>
<!-- <uni-datetime-picker type="datetimerange" v-model="tm" @change="handleRanger"></uni-datetime-picker>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view> -->
</view>
<!-- <view class="" style="width: 100%; height: 3px; background-color: #dfdfdf; margin-bottom: 2px;">
@ -13,12 +24,28 @@
<text :class="{'active':selactOne == 0}" @click="selactOne = 0" style="display: inline-block; padding: 2px 20px; text-align: center; border: 1px solid #dfdfdf;"></text>
<text :class="{'active':selactOne == 1}" @click="selactOne = 1" style="display: inline-block; padding: 2px 20px; text-align: center; border: 1px solid #dfdfdf;"></text>
</view>
<view class="jcsj-content">
<view class="jcsj-charts" v-if="selactOne == 0">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
<view style="margin-top: 20px;" v-if="selactOne == 1">
</view>
<view style="margin-top: 20px;" v-if="selactOne == 1">
<JcsjTable :tableData="tableData" />
</view>
<u-datetime-picker
:show="showTime"
v-model="startTime"
mode="datetime"
@confirm="handleStartTime"
@cancel="showTime=false"
></u-datetime-picker>
<u-datetime-picker
:show="showTime1"
v-model="endTime"
mode="datetime"
@confirm="handleEndTime"
@cancel="showTime1=false"
></u-datetime-picker>
</view>
</template>
@ -38,7 +65,12 @@
},
data() {
return {
tm:[stm,etm],
startTime:stm,
endTime:etm,
stm,
etm,
showTime:false,
showTime1:false,
tableData:[],
chartData: {},
rainChartData:[],
@ -55,6 +87,16 @@
}
},
methods: {
handleStartTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.stm = time
this.showTime = false
},
handleEndTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.etm = time;
this.showTime1 = false
},
handleRanger(e){
console.log(e);
this.tm = [...e]
@ -66,8 +108,8 @@
"/gunshiApp/xfflood/reservoir/water/monitor/data",
{
stcd:this.stcd,
stm:moment(this.tm[0]).format("YYYY-MM-DD HH:mm:ss"),
etm:moment(this.tm[1]).format("YYYY-MM-DD HH:mm:ss"),
stm:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
etm:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
source:this.source
})
if(data.code == 200){
@ -91,17 +133,28 @@
<style lang="scss" scoped>
.jcsj-box{
.time-ranger{
display: flex;
align-items: center;
// display: flex;
// align-items: center;
margin-bottom: 10px;
.start-time, .end-time{
display: flex;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf;
}
.search-btn{
margin: 3px 0 0 5px;
color: #3399ef;
// color: #3399ef;
}
}
.jcsj-content{
max-height:calc(100vh - 89px - 43px - 45px);
overflow-y:auto
}
.jcsj-charts{
width:100%;
height: 530px;
height: 500px;
overflow-y: auto;
margin-top: 20px;
}
.active{

View File

@ -1,7 +1,7 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 40px;">
序号
@ -13,14 +13,15 @@
<th style="width: 90px;">
水位(m)
</th>
<th style="width: 80px; position: relative;">
<th style="width: 90px; position: relative;">
<view>
库容(万m³)
<!-- <text style="position: absolute; bottom:-10px; left: 20px;">(/s)</text> -->
</view>
</th>
</tr>
<div style="max-height: 480px; overflow-y: auto">
<!-- style="max-height: 480px; overflow-y: auto" -->
<div class="scroll-table">
<tr v-for="(item, index) in newList" :key="index">
<td style="width: 30px">{{ index + 1 }}</td>
<td style="width: 80px;">{{ item.tm }}</td>
@ -28,6 +29,7 @@
<td style="width: 100px">{{ item.rz ? item.rz.toFixed(2) : "-" }}</td>
<td style="width: 80px">{{ item.w ? item.w : "-" }}</td>
</tr>
<div style="height:180px"></div>
</div>
</table>
</div>
@ -72,6 +74,11 @@
empty-cells: show;
border-collapse: collapse;
font-size: 14px;
}
.scroll-table{
height: calc(100vh - 180px);
overflow-y: auto;
width:'100%'
}
.table_cur tr {
display: flex;

View File

@ -1,7 +1,8 @@
<template>
<view class="rain-detail-box">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
{{stnm}}
</view>
@ -10,27 +11,29 @@
<uni-swiper-dot :info="Array(2).fill(0)" :current="current" field="content" :dotsStyles="dotsStyles">
<swiper class="swiper-box" style="height: 30px;" @change="change">
<swiper-item >
<view style="display: flex;">
<view style="display: flex;justify-content: space-between;">
<view class="jcsj" @click="activeOne = 0" :class="{'active':activeOne == 0}">
监测数据
</view>
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}" style="margin: 0 25px;">
<!-- style="margin: 0 25px;" -->
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}" style="margin: 0 4%">
统计数据
</view>
<view class="tjsj" @click="activeOne = 2" :class="{'active':activeOne == 2}" style="margin: 0 25px 0 0;">
<!-- style="margin: 0 25px 0 0;" -->
<view class="zrtx" @click="activeOne = 2" :class="{'active':activeOne == 2}" >
责任体系
</view>
<view class="tjsj" @click="activeOne = 3" :class="{'active':activeOne == 3}" >
<view class="txjc" @click="activeOne = 3" :class="{'active':activeOne == 3}" style="margin-left:4%">
图像监测
</view>
</view>
</swiper-item>
<swiper-item >
<view style="display: flex;">
<view class="spjk" @click="activeOne = 4" :class="{'active':activeOne == 4}">
<view class="spjk" @click="activeOne = 4" :class="{'active':activeOne == 4}" style="margin:0 4%">
视频监控
</view>
<view class="zbyq" @click="activeOne = 5" :class="{'active':activeOne == 5}" style="margin-left: 25px;">
<view class="zbyq" @click="activeOne = 5" :class="{'active':activeOne == 5}" >
周边雨情
</view>
</view>
@ -112,22 +115,26 @@
<style lang="scss" scoped>
.rain-detail-box{
height: 100vh;
overflow: hidden;
position: relative;
.nav-bar{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 20px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
margin-right: 18px;
font-size: 18px;
}
.tab-bar{
// width: 100%;

View File

@ -14,7 +14,6 @@
src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-right: 10px; margin-left: 10px;"
@click="popupOpen = true"
v-show="!popupOpen"
>
</image>
</view>
@ -42,14 +41,17 @@
</u-checkbox-group>
</view>
<text style="font-weight: bold; margin-bottom: 5px;">按距离</text>
<view style="display: flex; align-items: center;">
<u--input
placeholder="请输入"
border="surround"
type="number"
v-model="formData.distance"
style="width: 50%; margin-top: 5px;"
style="width: 50%; margin-top: 5px; margin-right: 10px;"
></u--input>
<view style="display: flex; margin-top: 170%;">
<text>(km)</text>
</view>
<view style="display: flex; position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources,distance:1}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -152,7 +154,7 @@
.bottom-btn1{
width: 100px;
margin-left: 130px;
margin-left: 70px;
}
.bottom-btn2{
width: 100px;

View File

@ -4,7 +4,7 @@
{{dic}}
</view>
<view class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 50px;">
姓名
@ -17,13 +17,15 @@
联系方式
</th>
</tr>
<view style="max-height: 500px; overflow-y: auto">
<!-- style="max-height: 500px; overflow-y: auto" -->
<view >
<tr>
<td style="width: 50px">{{info.personName}}</td>
<td style="width: 130px;">{{info.orgName}}</td>
<td style="width: 80px">{{info.position}}</td>
<td style="width: 100px;color: #62bafa;" @click="show = true">{{info.tel}}</td>
</tr>
</view>
</table>
@ -119,6 +121,11 @@
border-collapse: collapse;
font-size: 14px;
}
.scroll-table{
height: calc(100vh - 125px);
overflow-y: auto;
width:'100%'
}
.table_cur tr {
display: flex;
line-height: 65rpx;

View File

@ -1,8 +1,9 @@
<template>
<view style="max-height: 620px; overflow-y: auto;">
<view v-for="(item,index) in list" :key="index">
<view class="scroll-table">
<view v-for="(item,index) in list" :key="index" >
<Card :info="item" />
</view>
<view style="height:50px"></view>
</view>
</template>
@ -45,6 +46,10 @@
}
</script>
<style>
<style lang="scss" scoped>
.scroll-table{
height: calc(100vh - 100px);
overflow-y: auto;
width:100%;
}
</style>

View File

@ -24,4 +24,20 @@ export function disType(e) {
type = 0;
}
return type;
}
}
// 响应等级判断
// 县,乡镇判断
export function level(e) {
let name;
if (e == 1) {
name = "Ⅰ级";
} else if (e == 2) {
name = "Ⅱ级";
} else if (e == 3) {
name = "Ⅲ级";
} else if (e == 4) {
name = "Ⅳ级";
}
return name
}

64
pages/utils/tool.js Normal file
View File

@ -0,0 +1,64 @@
export function restm (e) {
let index = ''
if (e == '8') {
index = 0
} else if (e == '9') {
index = 1
} else if (e == '10') {
index = 2
} else if (e == '11') {
index = 3
} else if (e == '12') {
index = 4
} else if (e == '13') {
index = 5
} else if (e == '14') {
index = 6
} else if (e == '15') {
index = 7
} else if (e == '16') {
index = 8
} else if (e == '17') {
index = 9
} else if (e == '18') {
index = 10
} else if (e == '19') {
index = 11
} else if (e == '20') {
index = 12
} else if (e == '21') {
index = 13
} else if (e == '22') {
index = 14
} else if (e == '23') {
index = 15
} else if (e == '0') {
index = 16
} else if (e == '1') {
index = 17
} else if (e == '2') {
index = 18
} else if (e == '3') {
index = 19
} else if (e == '4') {
index = 20
} else if (e == '5') {
index = 21
} else if (e == '6') {
index = 22
} else if (e == '7') {
index = 23
}
return index
}
export const adnmZhen = adcd => {
if (!adcd || !nameMap) {
return undefined
}
if (adcd.endsWith('000000000')) {
return undefined
} else if (adcd.endsWith('000000')) {
return nameMap[adcd]
}
return nameMap[`${adcd.substr(0, 9)}000000`]
}

View File

@ -14,15 +14,14 @@
src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-left: 20px;"
@click="popupOpen = true"
v-show="!popupOpen"
>
</image>
</view>
<view class="content">
<Table :list="list" />
<Table :list="list" :height="height" />
</view>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" >
<view style="padding: 30px 20px;">
<view style="padding: 30px 20px; width:250px">
<text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group
@ -39,7 +38,7 @@
</u-checkbox>
</u-checkbox-group>
</view>
<view style="display: flex; margin-top: 195%;">
<view style="display: flex;position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -57,6 +56,7 @@
export default {
props:{
stcd:String,
height:Number,
default:''
},
components:{
@ -82,7 +82,8 @@
adcd:type == 1 ? undefined :adcd,
},
list:[], //
saveList:[] //
saveList:[], //
tableHeight:0
}
},
@ -119,7 +120,8 @@
},
mounted() {
this.getList()
}
},
}
</script>
@ -132,14 +134,15 @@
padding: 0 20px;
}
.content{
width: 100%;
margin-top: 10px;
max-height: 580px;
// max-height: 580px;
overflow-y: auto;
}
.bottom-btn1{
width: 100px;
margin-left: 130px;
margin-left: 70px;
}
.bottom-btn2{
width: 100px;

View File

@ -1,26 +1,26 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<div class="table_cur" >
<table style="width:100%;display:block">
<tr>
<th style="width: 50px;">
<th style="width: 11%;">
序号
</th>
<th style="width: 130px">
<th style="width: 32%">
站名
<th style="width: 110px;">
<th style="width: 31%;">
监测时间
</th>
<th style="width: 100px;" >
<th style="width: 26%;" >
实时水位(m)
</th>
</tr>
<div style="max-height: 500px; overflow-y: auto">
<div class="scroll-table">
<tr v-for="(item, index) in newList" :key="index">
<td style="width: 50px">{{ index + 1 }}</td>
<td style="width: 130px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 110px">{{item.tm}}</td>
<td style="width: 100px; position: relative;" >
<td style="width: 11%">{{ index + 1 }}</td>
<td style="width: 30%;color: #3399ef;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 32%">{{item.tm}}</td>
<td style="width: 25%; position: relative;" >
<text :class="{'active1':item.gstate == 1,'active2':item.wstate == 1}">{{ item.z.toFixed(2) }}</text>
<text v-if="item.state == 1"
style="position: absolute; top: 0px; right: 0; color: #FF7D7D;font-size:18px;"></text>
@ -28,6 +28,7 @@
top:0px;right: 0; color: #32E48E; font-size: 18px;"></text>
</td>
</tr>
<div style="height:125px"></div>
</div>
</table>
</div>
@ -42,7 +43,11 @@
list:{
type:Array,
default:[],
}
},
height:{
type:Number,
default:0
}
},
computed:{
newList(){
@ -70,6 +75,7 @@
flex: 1;
padding-top: 0px;
overflow-x: scroll;
padding: 0 10px;
}
/*table样式*/
.table_cur {
@ -80,10 +86,15 @@
}
.table_cur tr {
display: flex;
line-height: 56rpx;
line-height: 80rpx;
}
.scroll-table{
height: calc(100vh - 125px);
overflow-y: auto;
width:'100%'
}
.table_cur th {
height: 56rpx;
height: 80rpx;
color: #3399ef;
background: #e1f3ff;
font-size: 14px;

View File

@ -14,15 +14,14 @@
src="../../../static/images/filter.png"
style="width: 20px; height: 20px; margin-left: 20px;"
@click="popupOpen = true"
v-show="!popupOpen"
>
</image>
</view>
<view class="content">
<Table :list="list" />
<Table :list="list" :height="height"/>
</view>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" >
<view style="padding: 30px 20px;">
<view style="padding: 30px 20px; width:250px">
<text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group
@ -39,7 +38,7 @@
</u-checkbox>
</u-checkbox-group>
</view>
<view style="display: flex; margin-top: 195%;">
<view style="display: flex;position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -56,6 +55,7 @@
const type = disType(adcd)
export default {
props:{
height:Number,
stcd:String,
default:''
},
@ -133,14 +133,15 @@
padding: 0 20px;
}
.content{
width: 100%;
margin-top: 10px;
max-height: 580px;
// max-height: 580px;
overflow-y: auto;
}
.bottom-btn1{
width: 100px;
margin-left: 130px;
margin-left: 70px;
}
.bottom-btn2{
width: 100px;

View File

@ -1,37 +1,38 @@
<template>
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;display:block">
<tr>
<th style="width: 40px;">
<th style="width: 11%;">
序号
</th>
<th style="width: 90px">
<th style="width: 22%">
站名
<th style="width: 80px;">
<th style="width: 22%;">
监测时间
</th>
<th style="width: 100px;" >
<th style="width: 25%;" >
实时水位(m)
</th>
<th style="width: 90px;" >
<th style="width: 22%;" >
超汛限(m)
</th>
</tr>
<div style="max-height: 500px; overflow-y: auto">
<div class="scroll-table">
<tr v-for="(item, index) in newList" :key="index">
<td style="width: 40px">{{ index + 1 }}</td>
<td style="width: 90px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 80px">{{item.tm}}</td>
<td style="width: 100px; position: relative;" >
<td style="width: 10%">{{ index + 1 }}</td>
<td style="width: 23%;color: #3399ef;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">{{ item.stnm }}</td>
<td style="width: 22%">{{item.tm}}</td>
<td style="width: 25%; position: relative;" >
<text :class="{'active1':item.flState == 1,'active2':item.desState == 1,'active3':item.calState}">{{ item.rz.toFixed(2) }}</text>
<text v-if="item.state == 1"
style="position: absolute; top: 0px; right: 0; color: #FF7D7D;font-size:18px;"></text>
<text v-else-if="item.state == 2" style="position: absolute;
top:0px;right: 0; color: #32E48E; font-size: 18px;"></text>
</td>
<td style="width: 90px">{{item.afsltdz ? item.afsltdz.toFixed(2):'-'}}</td>
<td style="width: 22%">{{item.afsltdz ? item.afsltdz.toFixed(2):'-'}}</td>
</tr>
<div style="height:125px"></div>
</div>
</table>
</div>
@ -46,6 +47,10 @@
list:{
type:Array,
default:[],
},
height:{
type:Number,
default:0,
}
},
computed:{
@ -75,6 +80,8 @@
flex: 1;
padding-top: 0px;
overflow-x: scroll;
padding: 0 10px;
}
/*table样式*/
.table_cur {
@ -85,10 +92,15 @@
}
.table_cur tr {
display: flex;
line-height: 56rpx;
line-height: 80rpx;
}
.scroll-table{
height: calc(100vh - 125px);
overflow-y: auto;
width:'100%'
}
.table_cur th {
height: 56rpx;
height: 80rpx;
color: #3399ef;
background: #e1f3ff;
font-size: 14px;

View File

@ -1,7 +1,8 @@
<template>
<view class="water-box">
<view class="water-box" style="overflow:hidden;height:100vh">
<u-status-bar></u-status-bar>
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<u-icon name="arrow-left" color="#000" size="20" @click="backTo" style="margin-left:10px"></u-icon>
<view class="title">
水情
</view>
@ -15,8 +16,8 @@
</view>
</view>
<view class="water-detail-content">
<HdWater v-if="activeOne == 0"/>
<SkWater v-if="activeOne == 1"/>
<HdWater v-if="activeOne == 0" :height="tableHeight"/>
<SkWater v-if="activeOne == 1" :height="tableHeight"/>
</view>
</view>
</template>
@ -27,18 +28,29 @@
export default {
data() {
return {
activeOne:0
activeOne:0,
tableHeight:0
}
},
components:{
HdWater,
SkWater
},
methods: {
backTo(){
uni.navigateBack({delta:1})
}
}
},
onReady(){
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 220;
console.log("that.tableHeight",that.tableHeight);
}
})
}
}
</script>
@ -49,16 +61,18 @@
justify-content: center;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
height: 44px;
// margin-top: 30px;
// padding-top: 40px;
// padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
// box-shadow: 0 5px 10px -8px #dfdfdf inset;
}
.title{
flex:1;
text-align: center;
margin-right: 15px;
font-size: 18px;
}
.tab-bar{
display: flex;

762
pages/xxsb/dsfrom.vue Normal file
View File

@ -0,0 +1,762 @@
<template>
<view class="u-page">
<view v-if="!isMap">
<u-navbar
title="实时灾情上报"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
placeholder
></u-navbar>
<view class="info">
<view class="u-demo-block__content">
<!-- 注意如果需要兼容微信小程序最好通过setRules方法设置rules规则 -->
<!-- 工程详情上报 -->
<u--form
labelPosition="left"
:model="formList"
ref="form2"
labelWidth="100"
v-if="key == 3"
>
<u-form-item
label="灾害发生时间"
prop="otime"
@click="
isTime2 = true
hideKeyboard()
"
:borderBottom="false"
ref="item1"
>
<u--input
placeholder="请选择"
v-model="formList.otime"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<u-form-item
label="严重程度"
prop="severity"
:borderBottom="false"
@click="
isseverity = true
hideKeyboard()
"
ref="item1"
>
<u--input
placeholder="请选择"
v-model="formList.severity"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<!-- @click="toMap" -->
<u-form-item
label="灾害发生地点"
prop="address"
@click="toMap"
:borderBottom="false"
ref="item1"
>
<u--input
placeholder="请输入"
v-model="formList.address"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<u-form-item label="经度:" :borderBottom="false" ref="item1">
<u--input
placeholder="请选择"
v-model="formList.lgtd"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<u-form-item label="纬度" :borderBottom="false" ref="item1">
<u--input
placeholder="请选择"
v-model="formList.lttd"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<!-- 水位(m) -->
<u-form-item
label="灾情描述"
prop="ddscrib"
:borderBottom="false"
ref="item3"
>
<u--textarea
placeholder="请输入"
v-model="formList.ddscrib"
count
></u--textarea>
</u-form-item>
<!-- 管控责任人 -->
<u-form-item label="伤亡人数" prop="dpcount" ref="item3">
<u--input
v-model="formList.dpcount"
placeholder="请输入"
border="surround"
clearable
></u--input>
</u-form-item>
<!-- 出库流量 (/s) -->
<u-form-item
label="失踪人数"
prop="mpcount"
:borderBottom="false"
ref="item3"
>
<u--input
v-model="formList.mpcount"
placeholder="请输入"
type="number"
clearable
border="surround"
></u--input>
</u-form-item>
<u-form-item
label="转移人数"
prop="spcount"
:borderBottom="false"
ref="item3"
>
<u--input
v-model="formList.spcount"
placeholder="请输入"
type="number"
clearable
border="surround"
></u--input>
</u-form-item>
<u-form-item
label="损毁房屋(间)"
prop="chcount"
:borderBottom="false"
ref="item3"
>
<u--input
v-model="formList.chcount"
placeholder="请输入"
type="number"
clearable
border="surround"
@blur="BlurText($event)"
></u--input>
</u-form-item>
<u-form-item
label="直接经济损失 (万元)"
prop="elose"
:borderBottom="false"
ref="item3"
>
<u--input
v-model="formList.elose"
placeholder="请输入"
type="number"
clearable
border="surround"
@blur="BlurText($event)"
></u--input>
</u-form-item>
<u-form-item
label="过程降雨量(mm)"
prop="pfrain"
:borderBottom="false"
ref="item3"
>
<u--input
v-model="formList.pfrain"
placeholder="请输入"
type="number"
clearable
border="surround"
@blur="BlurText($event)"
></u--input>
</u-form-item>
<!-- 其他运行情况 -->
<u-form-item
label="其他情况说明"
prop="remark"
:borderBottom="false"
ref="item3"
>
<u--textarea
placeholder="请输入"
v-model="formList.remark"
count
></u--textarea>
</u-form-item>
<u-form-item
label="附件"
prop="fileList"
:borderBottom="false"
ref="item3"
>
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
multiple
:maxCount="10"
:previewFullImage="true"
></u-upload>
</u-form-item>
</u--form>
<u-button
type="primary"
text="提交"
customStyle="margin-top: 50px"
@click="submit"
></u-button>
<!-- 下拉选择 -->
<u-datetime-picker
:show="isTime2"
v-model="valueTime2"
mode="datetime"
@confirm="confirm2"
@cancel="cancel2"
></u-datetime-picker>
<!-- mode="top" -->
<view v-if="isName">
<u-popup
:show="isName"
@close="isName = false"
mode="right"
@open="open"
>
<view style="padding: 30px 20px">
<view class="tabs_h">
<div
class="leftTab"
:class="{ activetextTypeTab: showTextTypeTab == 1 }"
@click="tabChange(1)"
>
{{ namelabel }}
</div>
<div
class="rightTab"
:class="{ activetextTypeTab: showTextTypeTab == 2 }"
@click="tabChange(2)"
>
{{ gclabel }}
</div>
</view>
<!-- 水电站和水库 -->
<view class="" v-if="isSk">
<div
class="ul_list"
:class="{ activeTypeClass: activeType == 1 }"
@click="todetail(1, '水库')"
>
<div class="left">水库</div>
<u-icon
v-if="activeType == 1"
name="checkmark"
color="#2286f6"
size="20"
></u-icon>
</div>
<div
class="ul_list"
:class="{ activeTypeClass: activeType == 2 }"
@click="todetail(2, '水电站')"
>
<div class="left">水电站</div>
<u-icon
v-if="activeType == 2"
name="checkmark"
color="#2286f6"
size="20"
></u-icon>
</div>
</view>
<!-- 具体水库或者水电站 -->
<view v-else style="height: 300px; overflow-y: auto">
<div v-for="(item, index) in resList" :key="index">
<div
class="ul_list"
:class="{ activeTypeClass: item.isShow }"
@click="infoClick(item)"
>
<div class="left">{{ item.resName }}</div>
<u-icon
v-if="item.isShow"
name="checkmark"
color="#2286f6"
size="20"
></u-icon>
</div>
</div>
</view>
</view>
</u-popup>
</view>
<!-- 严重程度 -->
<u-action-sheet
:show="isseverity"
:actions="severityList"
title="请选择"
@close="isseverity = false"
@select="severitySelect"
>
</u-action-sheet>
<!-- 是否已管控 -->
<u-action-sheet
:show="isControlled"
:actions="actions"
title="请选择"
@close="isControlled = false"
@select="controlledSelect"
>
</u-action-sheet>
</view> </view
></view>
<view v-if="isMap">
<newmap @back="back"></newmap>
</view>
</view>
</template>
<script>
import moment from 'moment'
import newmap from './map.vue'
const adcd = uni.getStorageSync('value').adcd
export default {
name: 'dsfrom',
components: {
newmap
},
data () {
return {
isMap: false,
adcd,
showTextTypeTab: 1,
activeType: '',
valueTime2: Number(moment()),
isSk: true,
isTime2: false,
resList: [],
key: '',
title: {
1: '运行情况上报',
2: '工程险情上报',
3: '实时灾情上报'
},
namelabel: '请选择',
gclabel: '工程',
fileList1: [],
disabled1: false,
tips: '',
value: '',
showCalendar: false,
showBirthday: false,
formList: {
otime: '',
severity: '', // 1 2 3 4
address: '',
lgtd: '',
lttd: '',
ddscrib: '',
dpcount: '',
mpcount: '',
chcount: '',
spcount: '',
elose: '',
remark: ''
},
fileIds: [],
isControlled: false,
isseverity: false, //
showSex: false,
isRelease: false,
isName: false,
severityList: [
{
name: '一般险情'
},
{
name: '较大险情'
},
{
name: '重大险情'
},
{
name: '特别重大险情'
}
],
actions: [
{
name: '是'
},
{
name: '否'
}
],
rules: {
otime: [
{
type: 'string',
required: true,
message: '请选择时间',
trigger: ['blur', 'change']
}
],
severity: [
{
type: 'string',
required: true,
message: '请选择严重程度',
trigger: ['blur', 'change']
}
],
address: [
{
type: 'string',
required: true,
message: '请选择灾害发生点',
trigger: ['blur', 'change']
}
]
},
projectType: 1
}
},
onLoad (options) {
this.key = options.key
console.log('搜索框22', options.key)
console.log('adcd', this.adcd)
this.getresList()
},
onReady () {
console.log('搜索框22key', this.key)
// setRules
this.$refs.form2.setRules(this.rules)
},
methods: {
back (lnglat, address) {
console.log('搜索框22key', lnglat, address)
this.isMap = false
this.formList.lgtd = lnglat[0]
this.formList.lttd = lnglat[1]
this.formList.address = address
},
toMap () {
// uni.navigateTo({
// url: `./map`
// })
this.isMap = true
},
async getresList () {
let res = null
this.resList = []
res = await uni.$http.get('/gunshiApp/xfflood/webi/resList')
this.resList = res.data.data.map(item => {
item.isShow = false
return item
})
},
async gethystList () {
this.resList = []
let res = await uni.$http.get('/gunshiApp/xfflood/webi/hystList')
console.log('res', res.data.data)
this.resList = res.data.data.map(item => {
item.isShow = false
item.resName = item.hystName
return item
})
},
tabChange (val) {
this.showTextTypeTab = val
if (val == 1) {
this.isSk = true
} else {
this.isSk = false
}
},
todetail (val, title) {
this.activeType = val
this.showTextTypeTab = 2
this.isSk = false
this.namelabel = title
this.projectType = val
if (val == 1) {
this.getresList()
} else {
this.gethystList()
}
},
infoClick (obj) {
if (this.activeType == 1) {
this.resList = this.resList.map(item => {
if (item.resCode == obj.resCode) {
item.isShow = true
this.gclabel = item.resName
this.formList.projectName = item.resName
} else {
item.isShow = false
}
return item
})
} else {
this.resList = this.resList.map(item => {
if (item.hystCode == obj.hystCode) {
item.isShow = true
this.gclabel = item.resName
this.formList.projectName = item.resName
} else {
item.isShow = false
}
return item
})
}
},
//
deletePic (event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead (event) {
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map(item => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
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: `${uni.$http.baseUrl}/gunshiApp/xfflood/iaCHsfwater/file/upload/singleSimple`,
filePath: url,
name: 'file',
success: res => {
setTimeout(() => {
resolve(res.data)
}, 1000)
}
})
})
},
open () {},
navigateBack () {
uni.navigateBack()
},
severitySelect (e) {
console.log('severitySelect0', e)
this.formList.severity = e.name
this.$refs.form2.validateField('severity')
},
controlledSelect (e) {
this.formList.isControlled = e.name
this.$refs.form2.validateField('isControlled')
},
submit () {
this.$refs.form2
.validate()
.then(res => {
uni.$u.toast('校验通过', res)
debugger
let params = Object.assign(this.formList)
// 1 2 3 4
if (this.formList.severity == '一般险情') {
params.severity = 1
} else if (this.formList.severity == '较大险情') {
params.severity = 2
} else if (this.formList.severity == '重大险情') {
params.severity = 3
} else if (this.formList.severity == '特别重大险情') {
params.severity = 4
}
// params.adcd = ''
if (this.fileList1.length > 0) {
params.fileId = this.fileList1.map(item => {
return JSON.parse(item.url).data.fileId
})
}
uni.$http
.post('/gunshiApp/xfflood/iaCHsfwater/insert', params)
.then(res => {
console.log('this.---', res)
if (res.data.code == 200) {
console.log('this.model122', res.data)
uni.reLaunch({
url: '/pages/xxsb/index'
})
}
})
})
.catch(errors => {
uni.$u.toast('校验失败', errors)
console.log('校验失败')
})
// catchthentrue
},
reset () {
const validateList = ['projectName', 'radiovalue1']
this.$refs.form1.resetFields()
this.$refs.form1.clearValidate()
setTimeout(() => {
this.$refs.form1.clearValidate(validateList)
// 使 this.$refs.form1.clearValidate()
}, 10)
},
hideKeyboard () {
uni.hideKeyboard()
},
confirm2 (val) {
console.log(
'点击确定按钮时触发',
val.value,
moment(val.value).format('YYYY-MM-DD HH:mm:ss')
)
this.valueTime2 = Number(val)
this.formList.otime = moment(val.value).format('YYYY-MM-DD HH:mm:ss')
this.isTime2 = false
},
cancel2 () {
console.log('取消')
this.isTime2 = false
},
//
BlurText (e) {
console.log('e', e)
let reg = /^\d+$/.test(e)
if (!reg) {
// this.
console.log('22e', e)
}
}
}
}
</script>
<style lang="scss" scoped>
.container {
font-size: 14px;
background-color: #f3f5f8;
}
.tabs_h {
display: flex;
// justify-content: center;
align-items: center;
height: 56rpx;
line-height: 88rpx;
background-color: #fff;
margin-bottom: 12rpx;
text-align: center;
}
.leftTab {
// width: 80px;
margin-right: 20px;
}
.rightTab {
// width: 80px;
}
.activetextTypeTab,
.activetextTypeTab:hover {
border-bottom: 3rpx solid #2286f6;
color: #026be0;
}
.activeTypeClass,
.activeTypeClass:hover {
color: #026be0;
}
.nav_bar {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
background-color: #fff;
margin-bottom: 12rpx;
}
.nav_bar_tit {
text-align: center;
}
.info {
background-color: #fff;
margin-bottom: 12rpx;
padding: 20px;
}
.fl {
display: flex;
justify-content: start;
align-items: left;
}
.flsb {
display: flex;
justify-content: space-between;
align-items: center;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
}
.u-image {
width: 100%; /* 或者其他尺寸 */
transition: transform 0.3s; /* 平滑的放大效果 */
}
.ul_list {
display: flex;
justify-content: space-between;
align-items: center;
height: 48px;
// border-bottom: 1px solid #dfdfdf;
}
</style>

View File

@ -1,271 +0,0 @@
<template>
<view class="container">
<view class="nav_bar">
<u-icon name="arrow-left" @click="rightClick" size="28"></u-icon>
<view class="nav_bar_tit"> {{ title[key] }}</view>
<view></view>
</view>
<!-- form__info -->
<view class="info">
<u-form
labelPosition="left"
:model="infoForm"
ref="infoForm"
labelWidth="100"
>
<template v-if="key == 1">
<!-- 工程名称 -->
<u-form-item
label="工程名称"
prop="projectName"
borderBottom
ref="item3"
>
<u--input
v-model="infoForm.projectName"
placeholder="请输入内容"
border="surround"
disabled
></u--input>
</u-form-item>
<!-- 是否发电 -->
<u-form-item
label="是否发电"
prop="isPowerGeneration"
borderBottom
ref="item3"
>
<u--input
v-model="infoForm.isPowerGeneration"
placeholder="请输入内容"
border="surround"
disabled
></u--input>
</u-form-item>
<!-- 是否泄洪 -->
<u-form-item
label="是否泄洪"
prop="isFloodRelease"
borderBottom
ref="item3"
>
<u--input
v-model="infoForm.isFloodRelease"
placeholder="请输入内容"
border="surround"
disabled
></u--input>
</u-form-item>
<!-- 水位(m) -->
<u-form-item
label="水位(m)"
prop="waterLevel"
borderBottom
ref="item3"
>
<u--input
v-model="infoForm.waterLevel"
placeholder="请输入内容"
border="surround"
disabled
></u--input>
</u-form-item>
<!-- 入库流量 (/s) -->
<u-form-item
label="入库流量(m³/s)"
prop="inflowVolume"
borderBottom
ref="item3"
>
<u--input
v-model="infoForm.inflowVolume"
placeholder="请输入内容"
border="surround"
disabled
></u--input>
</u-form-item>
<!-- 出库流量 (/s) -->
<u-form-item
label="出库流量(m³/s)"
prop="outflowVolume"
borderBottom
ref="item3"
>
<u--input
v-model="infoForm.outflowVolume"
placeholder="请输入内容"
border="surround"
disabled
></u--input>
</u-form-item>
<!-- 其他运行情况 -->
<u-form-item
label="其他运行情况"
prop="remark"
borderBottom
ref="item3"
>
<u--textarea
v-model="infoForm.remark"
placeholder="请输入内容"
disabled
></u--textarea>
</u-form-item>
<!-- 附件 -->
<u-form-item
label="附件"
prop="checkboxValue1"
borderBottom
ref="item3"
>
</u-form-item>
</template>
<template v-if="key == 2"></template>
<template v-if="key == 3"></template>
</u-form>
<view>
<u-button
type="primary"
text="上报"
customStyle="margin: 10px"
@click="submit"
></u-button>
</view>
</view>
</view>
</template>
<script>
import moment from 'moment'
export default {
props: ['info'],
data () {
return {
infoForm: {
projectName: '',
isPowerGeneration: '',
isFloodRelease: '',
waterLevel: '',
inflowVolume: '',
outflowVolume: '',
remark: '',
reportUnit: '',
reportTime: '',
projectType: '',
checkboxValue1: '水库',
reporter: '' //
},
key: '',
title: {
1: '运行情况上报',
2: '工程险情上报',
3: '实时灾情上报'
}
}
},
onLoad (options) {
this.key = options.key
console.log('搜索框', options.key)
},
mounted () {
console.log('info', this.info)
},
methods: {
submit () {},
reset () {
const validateList = [
'userInfo.start',
'userInfo.end',
'userInfo.checkboxValue1'
]
this.$refs.uForm.resetFields()
this.$refs.uForm.clearValidate()
setTimeout(() => {
this.$refs.uForm.clearValidate(validateList)
// 使 this.$refs.uForm.clearValidate()
}, 10)
},
//
rightClick () {
console.log('rightClick')
uni.navigateTo({
url: '/pages/xxsb/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.container {
font-size: 14px;
background-color: #f3f5f8;
}
.tabs_h {
display: flex;
justify-content: center;
align-items: center;
height: 56rpx;
line-height: 88rpx;
background-color: #fff;
margin-bottom: 12rpx;
text-align: center;
}
.leftTab {
width: 80px;
}
.rightTab {
width: 80px;
}
.activetextTypeTab,
.activetextTypeTab:hover {
// border-bottom: 3rpx solid #2286f6;
color: #026be0;
}
.nav_bar {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
background-color: #fff;
margin-bottom: 12rpx;
}
.nav_bar_tit {
text-align: center;
}
.info {
background-color: #fff;
margin-bottom: 12rpx;
// text-align: right;
padding: 20px;
}
.fl {
display: flex;
justify-content: start;
align-items: left;
}
.flsb {
display: flex;
justify-content: space-between;
align-items: center;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
}
.u-image {
width: 100%; /* 或者其他尺寸 */
transition: transform 0.3s; /* 平滑的放大效果 */
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view class="u-page">
<u-navbar
title="表单"
:title="title[key]"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
@ -15,10 +15,11 @@
:model="model1"
ref="form1"
labelWidth="100"
v-if="key == 1"
>
<u-form-item
label="工程名称"
prop="userInfo.name"
prop="projectName"
@click="
isName = true
hideKeyboard()
@ -28,14 +29,14 @@
>
<u--input
placeholder="请选择"
v-model="model1.userInfo.name"
v-model="model1.projectName"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<u-form-item
label="是否发电"
prop="userInfo.sex"
prop="isPowerGeneration"
:borderBottom="false"
@click="
showSex = true
@ -45,7 +46,7 @@
>
<u--input
placeholder="请选择"
v-model="model1.userInfo.sex"
v-model="model1.isPowerGeneration"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
@ -134,15 +135,19 @@
name="1"
multiple
:maxCount="10"
:previewFullImage="true"
></u-upload>
</u-form-item>
</u--form>
<u-button
type="primary"
text="提交"
customStyle="margin-top: 50px"
@click="submit"
></u-button>
<!-- 下拉选择 -->
<!-- isRelease -->
<u-action-sheet
:show="isRelease"
@ -161,9 +166,14 @@
@select="sexSelect"
>
</u-action-sheet>
<!-- -->
<!-- mode="top" -->
<view v-if="isName">
<u-popup :show="isName" @close="isName = false" @open="open">
<u-popup
:show="isName"
@close="isName = false"
mode="bottom"
@open="open"
>
<view style="padding: 30px 20px">
<view class="tabs_h">
<div
@ -232,12 +242,35 @@
</view>
</u-popup>
</view>
<!-- 严重程度 -->
<u-action-sheet
:show="isseverity"
:actions="severityList"
title="请选择"
@close="isseverity = false"
@select="severitySelect"
>
</u-action-sheet>
<!-- 是否已管控 -->
<u-action-sheet
:show="isControlled"
:actions="actions"
title="请选择"
@close="isControlled = false"
@select="controlledSelect"
>
</u-action-sheet>
</view>
</view>
</view>
</template>
<script>
import { adnmZhen } from '../utils/tool'
import { disType } from '../utils/dicType.js'
const adcd = uni.getStorageSync('value').adcd
export default {
data () {
return {
@ -246,6 +279,7 @@ export default {
isSk: true,
resList: [],
key: '',
adcd,
title: {
1: '运行情况上报',
2: '工程险情上报',
@ -259,21 +293,46 @@ export default {
value: '',
showCalendar: false,
showBirthday: false,
formList: {
projectName: '', //
projectType: '', //
severity: '', // 1 2 3 4
isControlled: '', // 0 1
incidentDescription: '',
controlResponsiblePerson: '', //
responsiblePersonPhone: '' //
},
model1: {
userInfo: {
name: '',
sex: ''
},
projectName: '',
isPowerGeneration: '',
isFloodRelease: '',
waterLevel: '',
inflowVolume: '',
outflowVolume: '',
remark: ''
},
fileIds: [],
isControlled: false,
isseverity: false, //
showSex: false,
isRelease: false,
isName: false,
severityList: [
{
name: '一般险情'
},
{
name: '较大险情'
},
{
name: '重大险情'
},
{
name: '特别重大险情'
}
],
actions: [
{
name: '是'
@ -283,7 +342,7 @@ export default {
}
],
rules: {
'userInfo.name': [
projectName: [
{
type: 'string',
required: true,
@ -291,15 +350,18 @@ export default {
trigger: ['blur', 'change']
}
]
}
},
projectType: 1
}
},
onLoad (options) {
this.key = options.key
console.log('搜索框', options.key)
console.log('搜索框22', options.key)
this.getresList()
},
onReady () {
console.log('搜索框22key', this.key)
// setRules
this.$refs.form1.setRules(this.rules)
},
@ -308,7 +370,18 @@ export default {
let res = null
this.resList = []
res = await uni.$http.get('/gunshiApp/xfflood/webi/resList')
this.resList = res.data.data.map(item => {
// console.log('res', adcd.endsWith('000000000'))
console.log('res---', this.adcd)
let list = res.data.data.filter(item => {
if (this.adcd.endsWith('000000000')) {
return item
} else {
return item.adcd == this.adcd
}
})
console.log('listlist---', list)
this.resList = list.map(item => {
item.isShow = false
return item
@ -318,8 +391,14 @@ export default {
async gethystList () {
this.resList = []
let res = await uni.$http.get('/gunshiApp/xfflood/webi/hystList')
console.log('res', res.data.data)
this.resList = res.data.data.map(item => {
let list = res.data.data.filter(item => {
if (this.adcd.endsWith('000000000')) {
return item
} else {
return item.adcd == this.adcd
}
})
this.resList = list.map(item => {
item.isShow = false
item.resName = item.hystName
@ -340,6 +419,7 @@ export default {
this.showTextTypeTab = 2
this.isSk = false
this.namelabel = title
this.projectType = val
if (val == 1) {
this.getresList()
} else {
@ -352,8 +432,8 @@ export default {
if (item.resCode == obj.resCode) {
item.isShow = true
this.gclabel = item.resName
this.model1.userInfo.name = item.resName
this.$refs.form1.validateField('userInfo.sex')
this.model1.projectName = item.resName
this.$refs.form1.validateField('isPowerGeneration')
} else {
item.isShow = false
}
@ -364,7 +444,7 @@ export default {
if (item.hystCode == obj.hystCode) {
item.isShow = true
this.gclabel = item.resName
this.model1.userInfo.name = item.resName
this.model1.projectName = item.resName
} else {
item.isShow = false
}
@ -390,6 +470,8 @@ export default {
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log('result', JSON.parse(result))
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(
fileListLen,
@ -406,66 +488,91 @@ export default {
uploadFilePromise (url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: 'http://192.168.2.21:7001/upload', //
url: `${uni.$http.baseUrl}/gunshiApp/xfflood/xfProjectRun/file/upload/singleSimple`,
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: res => {
console.log('res888', JSON.parse(res.data))
setTimeout(() => {
resolve(res.data.data)
resolve(res.data)
this.fileId = JSON.parse(res.data).data.fileId
}, 1000)
}
})
})
},
afterRead (event) {
this.fileList1.push({
url: event.file,
status: 'uploading',
message: '上传中'
})
},
open () {},
groupChange (n) {
// console.log('groupChange', n);
},
radioChange (n) {
// console.log('radioChange', n);
},
navigateBack () {
uni.navigateBack()
},
//
sexSelect (e) {
this.model1.userInfo.sex = e.name
this.$refs.form1.validateField('userInfo.sex')
this.model1.isPowerGeneration = e.name
this.$refs.form1.validateField('isPowerGeneration')
},
//
releaseSelect (e) {
this.model1.isFloodRelease = e.name
this.$refs.form1.validateField('isFloodRelease')
},
change (e) {
console.log(e)
severitySelect (e) {
console.log('severitySelect0', e)
this.formList.severity = e.name
this.$refs.form2.validateField('severity')
},
controlledSelect (e) {
this.formList.isControlled = e.name
this.$refs.form2.validateField('isControlled')
},
submit () {
// catchthentrue
this.$refs.form1
.validate()
.then(res => {
uni.$u.toast('校验通过')
console.log('this.model1', this.model1)
console.log('文件', this.fileId)
let params = this.model1
params.projectType = this.projectType
params.isPowerGeneration = params.isPowerGeneration == '是' ? 1 : 0
params.isFloodRelease = params.isFloodRelease == '是' ? 1 : 0
console.log('参数', params)
if (this.fileList1.length > 0) {
params.fileId = this.fileList1.map(item => {
return JSON.parse(item.url).data.fileId
})
}
uni.$http
.post('/gunshiApp/xfflood/xfProjectRun/insert', params)
.then(res => {
console.log('this.model1---', res)
if (res.data.code == 200) {
console.log('this.model122', res.data)
uni.navigateTo({
url: `./index`
})
}
})
.catch(e => {
this.model1.isPowerGeneration =
params.isPowerGeneration == 1 ? '是' : '否'
this.model1.isFloodRelease =
params.isPowerGeneration == 1 ? '是' : '否'
})
})
.catch(errors => {
uni.$u.toast('校验失败')
uni.$u.toast('校验失败', errors)
})
// catchthentrue
},
reset () {
const validateList = ['userInfo.name', 'userInfo.sex', 'radiovalue1']
const validateList = ['projectName', 'isPowerGeneration', 'radiovalue1']
this.$refs.form1.resetFields()
this.$refs.form1.clearValidate()
setTimeout(() => {

654
pages/xxsb/fromSeverity.vue Normal file
View File

@ -0,0 +1,654 @@
<template>
<view class="u-page">
<u-navbar
:title="title[key]"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
placeholder
></u-navbar>
<view class="info">
<view class="u-demo-block__content">
<!-- 注意如果需要兼容微信小程序最好通过setRules方法设置rules规则 -->
<!-- 工程详情上报 -->
<u--form
labelPosition="left"
:model="formList"
ref="form2"
labelWidth="100"
>
<u-form-item
label="工程名称"
prop="projectName"
@click="
isName = true
hideKeyboard()
"
:borderBottom="false"
ref="item1"
>
<u--input
placeholder="请选择"
v-model="formList.projectName"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<u-form-item
label="严重程度"
prop="severity"
:borderBottom="false"
@click="
isseverity = true
hideKeyboard()
"
ref="item1"
>
<u--input
placeholder="请选择"
v-model="formList.severity"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<u-form-item
label="是否已管控"
prop="isControlled"
:borderBottom="false"
@click="
isControlled = true
hideKeyboard()
"
ref="item1"
>
<u--input
placeholder="请选择"
v-model="formList.isControlled"
suffixIcon="arrow-right"
suffixIconStyle="color: #909399"
></u--input>
</u-form-item>
<!-- 水位(m) -->
<u-form-item
label="险情描述"
prop="incidentDescription"
:borderBottom="false"
ref="item3"
>
<u--textarea
placeholder="请输入"
v-model="formList.incidentDescription"
count
></u--textarea>
</u-form-item>
<!-- 管控责任人 -->
<u-form-item
label="管控责任人"
prop="controlResponsiblePerson"
ref="item3"
>
<u--input
v-model="formList.controlResponsiblePerson"
placeholder="请输入"
border="surround"
clearable
></u--input>
</u-form-item>
<!-- 出库流量 (/s) -->
<u-form-item
label="联系电话"
prop="responsiblePersonPhone"
:borderBottom="false"
ref="item3"
>
<u--input
v-model="formList.responsiblePersonPhone"
placeholder="请输入"
type="number"
clearable
border="surround"
@blur="BlurText($event)"
></u--input>
</u-form-item>
<!-- 其他运行情况 -->
<u-form-item
label="其他情况说明"
prop="remark"
:borderBottom="false"
ref="item3"
>
<u--textarea
placeholder="请输入"
v-model="formList.remark"
count
></u--textarea>
</u-form-item>
<u-form-item
label="附件"
prop="fileList"
:borderBottom="false"
ref="item3"
>
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
multiple
:maxCount="10"
:previewFullImage="true"
></u-upload>
</u-form-item>
</u--form>
<u-button
type="primary"
text="提交"
customStyle="margin-top: 50px"
@click="submit"
></u-button>
<!-- 下拉选择 -->
<!-- mode="top" -->
<view v-if="isName">
<u-popup
:show="isName"
@close="isName = false"
mode="bottom"
@open="open"
>
<view style="padding: 30px 20px">
<view class="tabs_h">
<div
class="leftTab"
:class="{ activetextTypeTab: showTextTypeTab == 1 }"
@click="tabChange(1)"
>
{{ namelabel }}
</div>
<div
class="rightTab"
:class="{ activetextTypeTab: showTextTypeTab == 2 }"
@click="tabChange(2)"
>
{{ gclabel }}
</div>
</view>
<!-- 水电站和水库 -->
<view class="" v-if="isSk">
<div
class="ul_list"
:class="{ activeTypeClass: activeType == 1 }"
@click="todetail(1, '水库')"
>
<div class="left">水库</div>
<u-icon
v-if="activeType == 1"
name="checkmark"
color="#2286f6"
size="20"
></u-icon>
</div>
<div
class="ul_list"
:class="{ activeTypeClass: activeType == 2 }"
@click="todetail(2, '水电站')"
>
<div class="left">水电站</div>
<u-icon
v-if="activeType == 2"
name="checkmark"
color="#2286f6"
size="20"
></u-icon>
</div>
</view>
<!-- 具体水库或者水电站 -->
<view v-else style="height: 300px; overflow-y: auto">
<div v-for="(item, index) in resList" :key="index">
<div
class="ul_list"
:class="{ activeTypeClass: item.isShow }"
@click="infoClick(item)"
>
<div class="left">{{ item.resName }}</div>
<u-icon
v-if="item.isShow"
name="checkmark"
color="#2286f6"
size="20"
></u-icon>
</div>
</div>
</view>
</view>
</u-popup>
</view>
<!-- 严重程度 -->
<u-action-sheet
:show="isseverity"
:actions="severityList"
title="请选择"
@close="isseverity = false"
@select="severitySelect"
>
</u-action-sheet>
<!-- 是否已管控 -->
<u-action-sheet
:show="isControlled"
:actions="actions"
title="请选择"
@close="isControlled = false"
@select="controlledSelect"
>
</u-action-sheet>
</view>
</view>
</view>
</template>
<script>
const adcd = uni.getStorageSync('value').adcd
export default {
data () {
return {
adcd,
showTextTypeTab: 1,
activeType: '',
isSk: true,
resList: [],
key: '',
title: {
1: '运行情况上报',
2: '工程险情上报',
3: '实时灾情上报'
},
namelabel: '请选择',
gclabel: '工程',
fileList1: [],
disabled1: false,
tips: '',
value: '',
showCalendar: false,
showBirthday: false,
formList: {
projectName: '', //
projectType: '', //
severity: '', // 1 2 3 4
isControlled: '', // 0 1
incidentDescription: '',
controlResponsiblePerson: '', //
responsiblePersonPhone: '', //
remark: ''
},
isControlled: false,
isseverity: false, //
showSex: false,
isRelease: false,
isName: false,
severityList: [
{
name: '一般险情'
},
{
name: '较大险情'
},
{
name: '重大险情'
},
{
name: '特别重大险情'
}
],
actions: [
{
name: '是'
},
{
name: '否'
}
],
rules: {
projectName: [
{
type: 'string',
required: true,
message: '请选择工程名称',
trigger: ['blur', 'change']
}
],
severity: [
{
type: 'string',
required: true,
message: '请选择严重程度',
trigger: ['blur', 'change']
}
]
},
projectType: 1,
fileId: []
}
},
onLoad (options) {
this.key = options.key
console.log('搜索框22', options.key)
this.getresList()
},
onReady () {
console.log('搜索框22key', this.key)
// setRules
this.$refs.form2.setRules(this.rules)
},
methods: {
async getresList () {
let res = null
this.resList = []
res = await uni.$http.get('/gunshiApp/xfflood/webi/resList')
let list = res.data.data.filter(item => {
if (this.adcd.endsWith('000000000')) {
return item
} else {
return item.adcd == this.adcd
}
})
this.resList = list.map(item => {
item.isShow = false
return item
})
},
async gethystList () {
this.resList = []
let res = await uni.$http.get('/gunshiApp/xfflood/webi/hystList')
let list = res.data.data.filter(item => {
if (this.adcd.endsWith('000000000')) {
return item
} else {
return item.adcd == this.adcd
}
})
console.log('res', res.data.data)
this.resList = list.map(item => {
item.isShow = false
item.resName = item.hystName
return item
})
},
tabChange (val) {
this.showTextTypeTab = val
if (val == 1) {
this.isSk = true
} else {
this.isSk = false
}
},
todetail (val, title) {
this.activeType = val
this.showTextTypeTab = 2
this.isSk = false
this.namelabel = title
this.projectType = val
if (val == 1) {
this.getresList()
} else {
this.gethystList()
}
},
infoClick (obj) {
if (this.activeType == 1) {
this.resList = this.resList.map(item => {
if (item.resCode == obj.resCode) {
item.isShow = true
this.gclabel = item.resName
this.formList.projectName = item.resName
} else {
item.isShow = false
}
return item
})
} else {
this.resList = this.resList.map(item => {
if (item.hystCode == obj.hystCode) {
item.isShow = true
this.gclabel = item.resName
this.formList.projectName = item.resName
} else {
item.isShow = false
}
return item
})
}
},
//
deletePic (event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead (event) {
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map(item => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
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++
}
console.log('fileList1111', this.fileList1)
},
uploadFilePromise (url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: `${uni.$http.baseUrl}/gunshiApp/xfflood/xfProjectIncident/file/upload/singleSimple`,
filePath: url,
name: 'file',
success: res => {
setTimeout(() => {
resolve(res.data)
}, 1000)
}
})
})
},
open () {},
groupChange (n) {
// console.log('groupChange', n);
},
radioChange (n) {
// console.log('radioChange', n);
},
navigateBack () {
uni.reLaunch({
url: '/pages/xxsb/index'
})
},
severitySelect (e) {
console.log('severitySelect0', e)
this.formList.severity = e.name
this.$refs.form2.validateField('severity')
},
controlledSelect (e) {
this.formList.isControlled = e.name
this.$refs.form2.validateField('isControlled')
},
submit () {
this.$refs.form2
.validate()
.then(res => {
uni.$u.toast('校验通过', res)
let params = Object.assign(this.formList)
// 1 2 3 4
if (this.formList.severity == '一般险情') {
params.severity = 1
} else if (this.formList.severity == '较大险情') {
params.severity = 2
} else if (this.formList.severity == '重大险情') {
params.severity = 3
} else if (this.formList.severity == '特别重大险情') {
params.severity = 4
}
params.projectType = this.projectType
params.isControlled = params.isControlled == '是' ? 1 : 0
if (this.fileList1.length > 0) {
params.fileId = this.fileList1.map(item => {
return JSON.parse(item.url).data.fileId
})
}
uni.$http
.post('/gunshiApp/xfflood/xfProjectIncident/insert', params)
.then(res => {
console.log('this.---', res)
if (res.data.code == 200) {
console.log('this.model122', res.data)
uni.reLaunch({
url: '/pages/xxsb/index'
})
}
})
})
.catch(errors => {
uni.$u.toast('校验失败', errors)
})
},
reset () {
const validateList = ['projectName', 'radiovalue1']
this.$refs.form1.resetFields()
this.$refs.form1.clearValidate()
setTimeout(() => {
this.$refs.form1.clearValidate(validateList)
// 使 this.$refs.form1.clearValidate()
}, 10)
},
hideKeyboard () {
uni.hideKeyboard()
},
//
BlurText (e) {
console.log('e', e)
let reg = /^\d+$/.test(e)
if (!reg) {
// this.
console.log('22e', e)
}
}
}
}
</script>
<style lang="scss" scoped>
.container {
font-size: 14px;
background-color: #f3f5f8;
}
.tabs_h {
display: flex;
// justify-content: center;
align-items: center;
height: 56rpx;
line-height: 88rpx;
background-color: #fff;
margin-bottom: 12rpx;
text-align: center;
}
.leftTab {
// width: 80px;
margin-right: 20px;
}
.rightTab {
// width: 80px;
}
.activetextTypeTab,
.activetextTypeTab:hover {
border-bottom: 3rpx solid #2286f6;
color: #026be0;
}
.activeTypeClass,
.activeTypeClass:hover {
color: #026be0;
}
.nav_bar {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-top: 30px;
padding-top: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #dfdfdf;
box-shadow: 0 5px 10px -8px #dfdfdf inset;
background-color: #fff;
margin-bottom: 12rpx;
}
.nav_bar_tit {
text-align: center;
}
.info {
background-color: #fff;
margin-bottom: 12rpx;
padding: 20px;
}
.fl {
display: flex;
justify-content: start;
align-items: left;
}
.flsb {
display: flex;
justify-content: space-between;
align-items: center;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
}
.u-image {
width: 100%; /* 或者其他尺寸 */
transition: transform 0.3s; /* 平滑的放大效果 */
}
.ul_list {
display: flex;
justify-content: space-between;
align-items: center;
height: 48px;
// border-bottom: 1px solid #dfdfdf;
}
</style>

View File

@ -1,9 +1,12 @@
<template>
<view class="container">
<view class="nav_bar">
<u-icon name="arrow-left" color="#000" size="28"></u-icon>
<view class="nav_bar_tit"> 工情灾情 </view>
</view>
<u-navbar
title="信息上报"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
placeholder
></u-navbar>
<view class="info">
<div class="ul_list" @click="todetail(1)">
@ -28,11 +31,24 @@ export default {
},
onLoad () {},
methods: {
navigateBack () {
uni.navigateBack()
},
todetail (val) {
console.log('val', val)
uni.navigateTo({
url: `./from?key=${val}`
})
if (val == 2) {
uni.navigateTo({
url: `./fromSeverity?key=${val}`
})
} else if (val == 1) {
uni.navigateTo({
url: `./from?key=${val}`
})
} else {
uni.navigateTo({
url: `./dsfrom?key=${val}`
})
}
}
}
}

112
pages/xxsb/map.vue Normal file
View File

@ -0,0 +1,112 @@
<template>
<view>
<!-- <map id="container" latitude="39.9" longitude="116.4"></map> -->
<map
id="container"
:latitude="lnglat[1]"
:longitude="lnglat[0]"
enable-scroll
enable-rotate
></map>
<view class="text">
<text class="tit">当前位置</text>
<view id="adds">{{ address }}</view>
</view>
<view class="text">
<p class="tit">/纬度</p>
<view
><span id="lng">{{ lnglat[0] }} {{ lnglat[1] }}</span></view
>
</view>
<u-button
type="primary"
text="确定"
customStyle="margin-top: 50px"
@click="backclick"
></u-button>
</view>
</template>
<script>
// import AMapLoader from '@amap/amap-jsapi-loader'
export default {
name: 'map-view',
data () {
return {
lnglat: [109.139726, 29.665203],
geocoder: null,
marker: null,
geocoder: null,
address: null,
markers: [
{
latitude: 29.665203,
longitude: 109.139726,
iconPath: '../../static/tabs/add.png'
}
]
}
},
mounted () {},
onShow () {},
onLoad () {
this.initAMap()
},
methods: {
backclick () {
this.$emit('back', this.lnglat, this.address)
},
mapClick (val) {
console.log('val', val)
},
initAMap () {
const self = this
console.log('erreee')
uni.getLocation({
type: 'gcj02',
isHighAccuracy: 'true',
geocode: 'true',
success: function (res) {
console.log('res', res)
const latitude = res.latitude
const longitude = res.longitude
// this.lnglat = [109.139726, 29.665203]
self.lnglat = [longitude, latitude]
// this.lnglat = [res.longitude, res.latitude]
console.log('lnglatlnglat', self.lnglat, res)
console.log('地址', res.address)
if (res.address) {
console.log('地址', res.address)
self.address = res.address.city
? res.address.city
: '' + res.address.district
? res.address.district
: '' + res.address.street
? res.address.street
: ''
console.log('地址', self.address)
}
}
})
}
}
}
</script>
<style scoped>
#container {
width: 100%;
height: 450px;
}
.text {
margin: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.text .tit {
font-size: 14px;
font-weight: bold;
}
</style>

BIN
static/images/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
static/images/home1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
static/images/home2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/tabs/add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/tabs/dw-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

BIN
static/tabs/gongqing2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
static/tabs/home2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/tabs/water2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
static/tabs/xingzhuang2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -53,7 +53,10 @@ const cfe = {
},
legendFormat:function(name){
return "自定义图例+"+name;
},
},
"xAxisFormat": function (value) {
return value.substr('2020--'.length, 11)
},
yAxisFormatDemo:function (value, index) {
return value + '元';
},

View File

@ -1,8 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/login/login","pages/rain/rain","pages/homeIndex/index","pages/xxsb/index","pages/xxsb/from","pages/gqzq/index","pages/gqzq/gqxx","pages/gqzq/zqxx","pages/gqzq/detail/index","pages/mypage/mypage","pages/personInfo/personInfo","pages/modifyPassword/modifyPassword","pages/forewarning/forewarning","pages/forewarning/sh","pages/forewarning/shInformation/shInformation","pages/addressBook/addressBook","pages/water/water","pages/rainDetail/rainDetail","pages/hdDetail/hdDetail","pages/skDetail/skDetail","pages/addressBook/follow","pages/addressBook/myDept","pages/orderFeedback/orderFeedback","pages/orderFeedback/orderInformation","subpkg/rainDetail/rainDetail"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","backgroundColorTop":"transparent","navigationStyle":"custom","background":"#efeff4"},"tabBar":{"color":"#333333","selectedColor":"#eb4450","list":[{"pagePath":"pages/homeIndex/index","iconPath":"/static/tabs/home.png","selectedIconPath":"static/tabs/home1.png","text":"首页"},{"pagePath":"pages/addressBook/addressBook","iconPath":"/static/tabs/my2_icon@2x.png","selectedIconPath":"static/tabs/my2_icon@2x.png","text":"通讯录"},{"pagePath":"pages/mypage/mypage","iconPath":"/static/images/my1.png","selectedIconPath":"static/images/my.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"xffxkh-app","compilerVersion":"4.15","entryPagePath":"pages/login/login","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/login/login","meta":{"isQuit":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/rain/rain","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/homeIndex/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/xxsb/index","meta":{},"window":{"navigationBarTitleText":"信息上报"}},{"path":"/pages/xxsb/from","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/index","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx","meta":{},"window":{"navigationBarTitleText":"工情信息"}},{"path":"/pages/gqzq/zqxx","meta":{},"window":{"navigationBarTitleText":"灾情信息"}},{"path":"/pages/gqzq/detail/index","meta":{},"window":{"navigationBarTitleText":"查看"}},{"path":"/pages/mypage/mypage","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/personInfo/personInfo","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/modifyPassword/modifyPassword","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/forewarning/forewarning","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/forewarning/sh","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/forewarning/shInformation/shInformation","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/addressBook/addressBook","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/water/water","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/rainDetail/rainDetail","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/hdDetail/hdDetail","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/skDetail/skDetail","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/addressBook/follow","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/addressBook/myDept","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/orderFeedback/orderFeedback","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/orderFeedback/orderInformation","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/subpkg/rainDetail/rainDetail","meta":{},"window":{}}];
var __uniConfig = {"pages":["pages/login/login","pages/rain/rain","pages/homeIndex/index","pages/xxsb/index","pages/xxsb/from","pages/xxsb/fromSeverity","pages/xxsb/dsfrom","pages/xxsb/map","pages/gqzq/index","pages/gqzq/gqxx","pages/gqzq/zqxx","pages/gqzq/detail/index","pages/mypage/mypage","pages/personInfo/personInfo","pages/modifyPassword/modifyPassword","pages/forewarning/forewarning","pages/forewarning/sh","pages/forewarning/shInformation/shInformation","pages/addressBook/addressBook","pages/water/water","pages/rainDetail/rainDetail","pages/hdDetail/hdDetail","pages/skDetail/skDetail","pages/addressBook/follow","pages/addressBook/myDept","pages/orderFeedback/orderFeedback","pages/orderFeedback/orderInformation","pages/gqzq/gqxx/gqxx","pages/gqzq/gqxx/qk","pages/gqzq/gqxx/xq","pages/gqzq/gqxx/qkForm","pages/gqzq/gqxx/xqForm","pages/gqzq/zqxx/zqxx","pages/gqzq/zqxx/table","pages/gqzq/zqxx/form","subpkg/rainDetail/rainDetail"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","backgroundColorTop":"transparent","navigationStyle":"custom","background":"#efeff4"},"tabBar":{"color":"#333333","selectedColor":"#59A7FF","list":[{"pagePath":"pages/homeIndex/index","iconPath":"/static/tabs/home.png","selectedIconPath":"static/tabs/home2.png","text":"首页"},{"pagePath":"pages/addressBook/addressBook","iconPath":"/static/tabs/phone_icon@2x.png","selectedIconPath":"static/tabs/phone_icon@2x2.png","text":"通讯录"},{"pagePath":"pages/mypage/mypage","iconPath":"/static/images/my2_icon@2x.png","selectedIconPath":"static/images/my2_icon@2x2.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"xffxkh-app","compilerVersion":"4.15","entryPagePath":"pages/login/login","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/login/login","meta":{"isQuit":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/rain/rain","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/homeIndex/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/xxsb/index","meta":{},"window":{"navigationBarTitleText":"信息上报"}},{"path":"/pages/xxsb/from","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/xxsb/fromSeverity","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/xxsb/dsfrom","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/xxsb/map","meta":{},"window":{"navigationBarTitleText":"地图示例"}},{"path":"/pages/gqzq/index","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx","meta":{},"window":{"navigationBarTitleText":"工情信息"}},{"path":"/pages/gqzq/zqxx","meta":{},"window":{"navigationBarTitleText":"灾情信息"}},{"path":"/pages/gqzq/detail/index","meta":{},"window":{"navigationBarTitleText":"查看"}},{"path":"/pages/mypage/mypage","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/personInfo/personInfo","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/modifyPassword/modifyPassword","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/forewarning/forewarning","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/forewarning/sh","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/forewarning/shInformation/shInformation","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/addressBook/addressBook","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":""}},{"path":"/pages/water/water","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/rainDetail/rainDetail","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/hdDetail/hdDetail","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/skDetail/skDetail","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/addressBook/follow","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/addressBook/myDept","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/orderFeedback/orderFeedback","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/orderFeedback/orderInformation","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx/gqxx","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx/qk","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx/xq","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx/qkForm","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/gqxx/xqForm","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/zqxx/zqxx","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/zqxx/table","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/gqzq/zqxx/form","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/subpkg/rainDetail/rainDetail","meta":{},"window":{}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CB311EF","name":"xffxkh-app","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","distribute":{"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.15","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333333","selectedColor":"#eb4450","list":[{"pagePath":"pages/homeIndex/index","iconPath":"/static/tabs/home.png","selectedIconPath":"static/tabs/home1.png","text":"首页"},{"pagePath":"pages/addressBook/addressBook","iconPath":"/static/tabs/my2_icon@2x.png","selectedIconPath":"static/tabs/my2_icon@2x.png","text":"通讯录"},{"pagePath":"pages/mypage/mypage","iconPath":"/static/images/my1.png","selectedIconPath":"static/images/my.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px"},"launch_path":"__uniappview.html"}}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__CB311EF","name":"xffxkh-app","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"VideoPlayer":{},"Contacts":{},"Messaging":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","distribute":{"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#FFFFFF","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.15","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333333","selectedColor":"#59A7FF","list":[{"pagePath":"pages/homeIndex/index","iconPath":"/static/tabs/home.png","selectedIconPath":"static/tabs/home2.png","text":"首页"},{"pagePath":"pages/addressBook/addressBook","iconPath":"/static/tabs/phone_icon@2x.png","selectedIconPath":"static/tabs/phone_icon@2x2.png","text":"通讯录"},{"pagePath":"pages/mypage/mypage","iconPath":"/static/images/my2_icon@2x.png","selectedIconPath":"static/images/my2_icon@2x2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px"},"launch_path":"__uniappview.html"}}