Merge branch 'qzc-dev'

master
秦子超 2024-06-13 17:17:21 +08:00
commit 25c2616e7e
4 changed files with 85 additions and 150 deletions

View File

@ -57,8 +57,11 @@
<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>
<div :style="{display:'flex',marginTop:'10px'}">
<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"
@ -68,7 +71,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"
@ -129,6 +132,7 @@ import moment from 'moment'
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
check1:['1','2'],
list:[]
}
@ -156,6 +160,7 @@ import moment from 'moment'
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']
@ -171,69 +176,18 @@ import moment from 'moment'
}
try{
const params = {
timeSo:{
projectTypes: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'),
},
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.list = res.data.data
this.close()
}catch(e){
//TODO handle the exception

View File

@ -68,8 +68,11 @@
<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>
<div :style="{display:'flex',marginTop:'10px'}">
<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"
@ -79,7 +82,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"
@ -140,6 +143,7 @@ import moment from 'moment'
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
check1:['1','2','3','4'],
check2:['1','2'],
list:[]
@ -168,6 +172,7 @@ import moment from 'moment'
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']
@ -184,36 +189,20 @@ import moment from 'moment'
}
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,
}
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
// ,
// {
// 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.list = res.data.data
this.close()
}catch(e){
//TODO handle the exception

View File

@ -16,11 +16,17 @@
<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>
@ -28,7 +34,13 @@
<script>
export default {
data () {
return {}
return {
gq:false,
zq:false
}
},
onShow() {
this.getData()
},
methods: {
todetail (val) {
@ -43,6 +55,24 @@ export default {
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: "请求失败",
})
}
}
}
}
@ -82,4 +112,11 @@ export default {
height: 48px;
border-bottom: 1px solid #dfdfdf;
}
.redDot{
margin-right: 10px;
width: 8px;
height: 8px;
border-radius: 4px;
background-color: red;
}
</style>

View File

@ -59,8 +59,11 @@
<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>
<div :style="{display:'flex',marginTop:'10px'}">
<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"
@ -70,7 +73,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"
@ -131,6 +134,7 @@ import moment from 'moment'
searchVal:'',
stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()),
isTime:false,
check1:['1','2','3','4'],
list:[]
}
@ -158,6 +162,7 @@ import moment from 'moment'
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']
@ -173,68 +178,18 @@ import moment from 'moment'
}
try{
const params = {
timeSo:{
severitys: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'),
},
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.list = res.data.data
this.close()
}catch(e){
//TODO handle the exception