Merge branch 'master' into zl-dev

master
张林 2024-06-13 13:51:37 +08:00
commit 62e0a66a3e
16 changed files with 2620 additions and 31 deletions

View File

@ -170,6 +170,62 @@
"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": {

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>

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

@ -0,0 +1,362 @@
<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>
<text class="title">按上报时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<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'}">
<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()),
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.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 = {
timeSo:{
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
},
projectTypes:this.check1,
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectRun/list',params)
console.log('res',res)
this.list = [...res.data.data
// ,
// {
// id:'1',
// projectName:'',
// projectType:'1',//(1 2)
// reportType:'',
// isPowerGeneration:'1',//0 1
// isFloodRelease:'0',//0 1
// waterLevel:'10',//(m)
// inflowVolume:'21',//(m³/s)
// outflowVolume:'11',//(m³/s)
// reporter:'',
// reportTime:'2011-12-12 11:11:22',//
// reportUnit:'',
// moditime:'',
// remark:'',
// isRead:0,//0 1
// },
// {
// id:'2',
// projectName:'33',
// projectType:'2',//(1 2)
// reportType:'',
// isPowerGeneration:'0',//0 1
// isFloodRelease:'0',//0 1
// waterLevel:'3',//(m)
// inflowVolume:'1',//(m³/s)
// outflowVolume:'6',//(m³/s)
// reporter:'2',
// reportTime:'2011-12-12 11:11:22',//
// reportUnit:'2',
// moditime:'',
// remark:'2',
// isRead:0,//0 1
// },
// {
// id:'3',
// projectName:'3',
// projectType:'2',//(1 2)
// reportType:'',
// isPowerGeneration:'0',//0 1
// isFloodRelease:'0',//0 1
// waterLevel:'3',//(m)
// inflowVolume:'1',//(m³/s)
// outflowVolume:'6',//(m³/s)
// reporter:'2',
// reportTime:'2011-12-12 11:11:22',//
// reportUnit:'2',
// moditime:'',
// remark:'2',
// isRead:0,//0 1
// },
]
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>

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

@ -0,0 +1,343 @@
<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>
<text class="title">按上报时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<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'}">
<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()),
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.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 = {
timeSo:{
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
},
severitys:this.check1,
projectTypes:this.check2,
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectIncident/list',params)
console.log('res',res)
this.list = [
...res.data.data
// ,
// {
// id:'1',
// projectName:'',
// projectType:'1',//(1 2)
// severity:'1',//1 2 3 4
// incidentDescription:'',
// isControlled:'1',//0 1
// controlResponsiblePerson:'',
// responsiblePersonPhone:'12328281728',//
// reporter:'',//
// reportTime:'2022-11-21 10:21:11',//
// reportUnit:'',
// moditime:'',
// remark:'',
// isRead:0,//0 1
// },
]
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,10 +1,18 @@
<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>
@ -27,12 +35,12 @@ export default {
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'
})
}
}
@ -61,8 +69,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 {

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>

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

@ -0,0 +1,365 @@
<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>
<text class="title">按上报时间</text>
<div :style="{display:'flex',marginTop:'10px'}">
<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'}">
<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()),
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.projectName?.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.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 = {
timeSo:{
start:moment(this.stm).format('YYYY-MM-DD HH:mm:ss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
},
severitys:this.check1,
}
console.log('params',params)
const res = await uni.$http.post('/gunshiApp/xfflood/iaCHsfwater/queryList',params)
console.log('res',res)
this.list = [
...res.data.data
// ,{
// // id:'1',
// mtcd:'12121',//
// wscd:'22222',//
// otime:'2022-12-12 10:22:22',//
// severity:'22222',//
// wscd:'3',//1 2 3 4
// address:'',//
// lgtd:'111.21',//
// lttd:'32.12',//
// ddscrib:'',//
// dpcount:'2',//
// mpcount:'12',//
// spcount:'2211',//
// chcount:'41',//
// elose:'6623',//
// pfrain:'41',//mm
// reporter:'',//
// reportTime:'2022-11-21 10:21:11',//
// reportUnit:'',
// moditime:'',
// remark:'',
// isRead:0,//0 1
// severity:'1',//1 2 3 4
// },
// {
// // id:'1',
// mtcd:'12121',//
// wscd:'22222',//
// otime:'2022-12-12 10:22:22',//
// severity:'22222',//
// wscd:'3',//1 2 3 4
// address:'2',//
// lgtd:'111.21',//
// lttd:'32.12',//
// ddscrib:'',//
// dpcount:'2',//
// mpcount:'12',//
// spcount:'2211',//
// chcount:'41',//
// elose:'6623',//
// pfrain:'41',//mm
// reporter:'',//
// reportTime:'2022-11-21 10:21:11',//
// reportUnit:'',
// moditime:'',
// remark:'',
// isRead:1,//0 1
// severity:'1',//1 2 3 4
// },
]
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

@ -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

@ -13,7 +13,7 @@
<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>
@ -32,6 +32,8 @@
: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>
@ -48,10 +50,12 @@
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 v-show="limit == 1">
<view class="info_24">
<div class="heart">
<p class="title">
@ -162,19 +166,21 @@
<div v-else class="tableBox">
<div class="table_div">
<div class="table_cur">
<table>
<table style="width:100%;margin-top:-10%">
<tr>
<th style="width: 50px">序号</th>
<th style="width: 50px;color:#59A7FF">序号</th>
<th v-if="showTextTypeTab == 1" style="width: 70%"></th>
<th v-else style="width: 70%">区域</th>
<th v-if="showTextTypeTab == 1" style="width: 70%;color:#59A7FF"></th>
<th v-else style="width: 70%;color:#59A7FF">区域</th>
<th style="width: 50%">降雨量(mm)</th>
<th style="width: 50%;color:#59A7FF">降雨量(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: 70%;">
{{ item.name }}
</td>
<td style="width: 50%">{{ item.drp }}</td>
</tr>
</div>
@ -190,7 +196,6 @@
</div>
</div>
</view>
<view class="info_24">
<div class="heart">
<p class="title">
@ -202,6 +207,67 @@
<image src="../../static/tabs/bigImg.png" mode="aspectFit"></image>
</div>
</view>
</view>
<view v-show="limit != 1" >
<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">
<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%">
<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>
@ -217,7 +283,9 @@ const dataType = {
}
import moment from 'moment'
import {level} from "../../pages/utils/dicType"
import {disType} from "../utils/dicType.js"
import drpOption from "./chartOption.js"
export default {
data () {
return {
@ -233,7 +301,38 @@ 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
}
},
computed: {
@ -309,9 +408,156 @@ export default {
}
]
}
},
},
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 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){
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) {
@ -404,17 +650,43 @@ export default {
this.tm = d1 + h1
},
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()
},
onShow(){
this.getReadStatus()
if(this.limit == 1){
this.getYjRead()
}
}
}
</script>
@ -471,6 +743,7 @@ export default {
text-align: center;
}
.navIcon {
position: relative;
width: 50px;
height: 50px;
/* border-radius: 10px;
@ -479,6 +752,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;
@ -517,7 +799,7 @@ export default {
/* info_24 */
.info_24 {
padding: 20px;
padding: 15px;
background-color: #fff;
margin-bottom: 12rpx;
}
@ -567,6 +849,7 @@ export default {
/* 表格 */
.tableBox {
width: 100%;
position: relative;
}
@ -586,6 +869,7 @@ export default {
color: #026be0;
}
.table_div {
widows: 100%;
height: 100%;
max-width: calc(100% - 0px);
max-height: calc(100vh - 24px);
@ -618,7 +902,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="false" @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>
@ -40,7 +42,20 @@
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

@ -27,13 +27,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" >
@ -253,6 +253,9 @@
}
},
methods: {
changeForm(e){
this.formData = {...this.formData,stArg:e}
},
handleJiangyu(e){
if(this.rainTime){
e.stopPropagation();

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
}