Merge branch 'master' into zl-dev

master
张林 2024-06-13 16:04:52 +08:00
commit 1bc85306a7
11 changed files with 213 additions and 83 deletions

View File

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

View File

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

View File

@ -22,15 +22,23 @@
v-model="keyword" v-model="keyword"
></u-search> ></u-search>
</div> </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 class="mybody">
<div :style="{display:'flex',alignItems:'center',height:'60px'}" v-for="(item,index) in getList"> <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> --> <!-- <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="personItemIcon"><text>{{item.userName.slice(0, 1)}}</text></div>
<div class="personItemRow_right"> <div class="personItemRow_right">
<div class="personItemRow_right_top"> <div class="personItemRow_right_top">
<div :style="{width:'100px'}"><text>{{item.userName}}</text></div> <rich-text :style="{width:'100px'}" :nodes="highlightKeyword(item.userName, keyword)"></rich-text>
<div :style="{flex:'1'}"><text>{{item.phone}}</text></div> <rich-text :style="{flex:'1'}" :nodes="highlightKeyword(item.phone, keyword)"></rich-text>
</div> </div>
<div class="personItemRow_right_bottom"> <div class="personItemRow_right_bottom">
<text :style="{fontSize:'12px',color:'rgba(0, 0, 0, 0.4)'}">{{item.duty}}</text> <text :style="{fontSize:'12px',color:'rgba(0, 0, 0, 0.4)'}">{{item.duty}}</text>
@ -54,23 +62,40 @@
data() { data() {
return { return {
keyword:'', keyword:'',
list:[] list:[],
deptList:[]
}; };
}, },
computed: { computed: {
getList() { getList() {
if(this.keyword){ 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{ }else{
return [...this.list] return [...this.list]
} }
} }
}, },
methods: { methods: {
highlightKeyword(text, keyword) {
const highlightedText = text.replace(new RegExp(keyword, 'gi'), match => {
return `<span style="color: red;">${match}</span>`;
});
return highlightedText;
},
async getData () { async getData () {
try { try {
const res = await uni.$http.get('/gunshiApp/xfflood/addressbook/my/department') 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) { } catch (e) {
uni.$showMsg() uni.$showMsg()
} }
@ -99,6 +124,7 @@
}, },
created() { created() {
this.getData() this.getData()
this.getDept()
} }
} }
</script> </script>
@ -115,7 +141,7 @@
} }
.mybody{ .mybody{
background-color: #ffffff; background-color: #ffffff;
margin: 5px 5px; // margin: 5px 5px;
padding: 5px 0px; padding: 5px 0px;
height: calc( 100vh - 100px ); height: calc( 100vh - 100px );
overflow: scroll; overflow: scroll;
@ -150,4 +176,14 @@
display: flex; display: flex;
justify-content: flex-start 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> </style>

View File

@ -5,9 +5,9 @@
<div class="left"> <div class="left">
<div class="icon"> <div class="icon">
<image <image
style="width: 100%; height: 100%" style="width: 100%; height: 100%;border-radius: 50%;"
src="../../static/tabs/touxiang.png" :src="default_src || default_img"
mode="aspectFit" mode="aspectFill"
></image> ></image>
</div> </div>
<div class="info_name"> <div class="info_name">
@ -286,6 +286,7 @@ import moment from 'moment'
import {level} from "../../pages/utils/dicType" import {level} from "../../pages/utils/dicType"
import {disType} from "../utils/dicType.js" import {disType} from "../utils/dicType.js"
import drpOption from "./chartOption.js" import drpOption from "./chartOption.js"
import default_img from "../../static/tabs/touxiang.png"
export default { export default {
data () { data () {
return { return {
@ -332,7 +333,9 @@ export default {
hdList:[], hdList:[],
skList:[], skList:[],
readStatus:false, readStatus:false,
readYjStatus:false readYjStatus:false,
default_src: uni.getStorageSync('avatar'),
default_img
} }
}, },
computed: { computed: {

View File

@ -1,32 +1,32 @@
<template> <template>
<div class="table_div"> <div class="table_div">
<div class="table_cur"> <div class="table_cur">
<table> <table style="width:100%">
<tr> <tr>
<th style="width: 50px;"> <th style="width: 10%;">
<div style="margin-top: 6px;">序号</div> <div style="margin-top: 6px;">序号</div>
</th> </th>
<th style="width: 100px"> <th style="width: 28%">
<div style="margin-top: 6px;">站名</div></th> <div style="margin-top: 6px;">站名</div></th>
<th style="width: 70px;"> <th style="width: 20%;">
<div>时段雨量</div> <div>时段雨量</div>
<div style="margin-top: -12px;">(mm)</div> <div style="margin-top: -12px;">(mm)</div>
</th> </th>
<th style="width: 70px;" > <th style="width: 20%;" >
<div>昨日降雨</div> <div>昨日降雨</div>
<div style="margin-top: -12px;">(mm)</div> <div style="margin-top: -12px;">(mm)</div>
</th> </th>
<th style="width: 100px"> <th style="width: 22%">
<div style="margin-top: 6px;">所属政区</div></th> <div style="margin-top: 6px;">所属政区</div></th>
</tr> </tr>
<div style="max-height: 460px; overflow-y: auto"> <div :style="{'max-height':height + 'px', 'overflow-y': 'auto',width:'100%'}">
<tr v-for="(item, index) in list" :key="index"> <tr v-for="(item, index) in list" :key="index" style="width:100%">
<td style="width: 50px;">{{ index + 1 }}</td> <td style="width: 10%;">{{ index + 1 }}</td>
<td style="width: 100px;color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)"> <td style="width: 28%; color: #3399ef; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="jumpDetail(item)">
{{ item.stnm }}</td> {{ item.stnm }}</td>
<td style="width: 70px">{{ item.drp || 0 }}</td> <td style="width: 20%">{{ item.drp || 0 }}</td>
<td style="width: 70px">{{ item.yesDrp || 0 }}</td> <td style="width: 20%">{{ item.yesDrp || 0 }}</td>
<td style="width: 100px;">{{ item.adnm }}</td> <td style="width:23%;">{{ item.adnm }}</td>
</tr> </tr>
</div> </div>
</table> </table>
@ -41,8 +41,13 @@
list:{ list:{
type:Array, type:Array,
default:[], default:[],
},
height:{
type:Number,
default:0,
} }
}, },
methods:{ methods:{
jumpDetail(params){ jumpDetail(params){
console.log(123) console.log(123)
@ -50,7 +55,8 @@
url:`/pages/rainDetail/rainDetail?stcd=${params.stcd}&stnm=${params.stnm}` url:`/pages/rainDetail/rainDetail?stcd=${params.stcd}&stnm=${params.stnm}`
}) })
} }
} },
} }
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="rain-box"> <view class="rain-box" style="overflow:hidden">
<view class="nav-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="28" @click="backTo"></u-icon>
<view> <view>
@ -51,12 +51,12 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!jiangyu"></u-icon> <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> <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="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;"> <view :class="{'active': formData.orderType == 0,'no_f':true}" @click="rainsort(0)" style="border-top: 1px solid #dfdfdf;">
<text style="margin-right: 220px;">按时段降雨降序</text> <text >按时段降雨降序</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 0"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 0"></u-icon>
</view> </view>
<view :class="{'active':formData.orderType == 1}" @click="rainsort(1)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active':formData.orderType == 1,'no_f':true}" @click="rainsort(1)" >
<text style="margin-right: 220px;">按昨日降雨降序</text> <text>按昨日降雨降序</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 1"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.orderType == 1"></u-icon>
</view> </view>
</view> </view>
@ -72,24 +72,24 @@
<u-icon name="arrow-down-fill" color="#000" size="20" v-show="!rainTime"></u-icon> <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> <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="rain-time-dropdown" v-show="rainTime">
<view :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;"> <view :class="{'active': formData.timeType == 1,'no_f':true}" @click="timesort(1)" style="border-top: 1px solid #dfdfdf;">
<text style="margin-right: 300px;">1h</text> <text >1h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 1"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 1"></u-icon>
</view> </view>
<view :class="{'active': formData.timeType == 3}" @click="timesort(3)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 3,'no_f':true}" @click="timesort(3)" >
<text style="margin-right: 300px;">3h</text> <text >3h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 3"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 3"></u-icon>
</view> </view>
<view :class="{'active': formData.timeType == 6}" @click="timesort(6)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 6,'no_f':true}" @click="timesort(6)" >
<text style="margin-right: 300px;">6h</text> <text >6h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 6"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 6"></u-icon>
</view> </view>
<view :class="{'active': formData.timeType == 12}" @click="timesort(12)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 12,'no_f':true}" @click="timesort(12)" >
<text style="margin-right: 300px;">12h</text> <text >12h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 12"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 12"></u-icon>
</view> </view>
<view :class="{'active': formData.timeType == 24}" @click="timesort(24)" style="border-bottom: 1px solid #dfdfdf; padding-bottom: 10px; display: flex; align-items: center;"> <view :class="{'active': formData.timeType == 24,'no_f':true}" @click="timesort(24)" >
<text style="margin-right: 300px;">24h</text> <text>24h</text>
<u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 24"></u-icon> <u-icon name="checkmark" color="#02a7f0" size="20" v-show="formData.timeType == 24"></u-icon>
</view> </view>
</view> </view>
@ -105,7 +105,7 @@
统计时段{{tm.stm}}{{tm.etm}} 统计时段{{tm.stm}}{{tm.etm}}
</view> </view>
<view style="margin: 0 10px;"> <view style="margin: 0 10px;">
<Table :list="rainList"/> <Table :list="rainList" :height='tableHeight'/>
</view> </view>
<u-picker <u-picker
:show="show" :show="show"
@ -127,7 +127,7 @@
> >
</u-picker> </u-picker>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" > <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> <text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;"> <view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group <u-checkbox-group
@ -158,7 +158,7 @@
<u-button class="first-btn" text="昨日08:00~当前时间"></u-button> <u-button class="first-btn" text="昨日08:00~当前时间"></u-button>
<u-button class="second-btn" text="今天08:00~当前时间"></u-button> <u-button class="second-btn" text="今天08:00~当前时间"></u-button>
</view> --> </view> -->
<view style="display: flex; margin-top: 240%;"> <view style="display: flex; position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,source}"></u-button> @click="formData = {...formData,source}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popupOpen = false"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popupOpen = false"></u-button>
@ -229,7 +229,8 @@
stm:moment().subtract(1, 'day').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"), // 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") // stm:moment().subtract(1, 'day').set({ hour: 8, minute: 0, second: 0, millisecond: 0 }).format("YYYY-MM-DD HH:mm")
} },
tableHeight:0
} }
}, },
components:{ components:{
@ -421,6 +422,15 @@
this.adnmList(); this.adnmList();
this.basNameList() this.basNameList()
this.getRainList() this.getRainList()
},
onReady(){
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 300;
console.log("this.tableHeight", that.tableHeight);
}
})
} }
} }
</script> </script>
@ -467,37 +477,54 @@
display: flex; display: flex;
column-gap: 5px; column-gap: 5px;
margin-right: 20px; margin-right: 20px;
} }
.jiangyu{ .jiangyu{
position: relative; // position: relative;
.jiangyu-dropdown{ .jiangyu-dropdown{
position: absolute; position: absolute;
background-color: #fff; background-color: #fff;
width: 100vw; width: 100vw;
left: -72px; left: 0;
top: 35px; top: 35px;
.active{ .active{
color:#02a7f0 color:#02a7f0
} }
view{ text{
margin-top: 10px; 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{ .rain-time{
position: relative; // position: relative;
.rain-time-dropdown{ .rain-time-dropdown{
position: absolute; position: absolute;
background-color: #fff; background-color: #fff;
width: 100vw; width: 100vw;
left: -230px; // left: -10%;
left: 0;
top: 35px; top: 35px;
.active{ .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;
} }
} }
} }

View File

@ -18,10 +18,10 @@
</image> </image>
</view> </view>
<view class="content"> <view class="content">
<Table :list="list" /> <Table :list="list" :height="height" />
</view> </view>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" > <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> <text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;"> <view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group <u-checkbox-group
@ -38,7 +38,7 @@
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<view style="display: flex; margin-top: 240%;"> <view style="display: flex;position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button> @click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -56,6 +56,7 @@
export default { export default {
props:{ props:{
stcd:String, stcd:String,
height:Number,
default:'' default:''
}, },
components:{ components:{
@ -81,7 +82,8 @@
adcd:type == 1 ? undefined :adcd, adcd:type == 1 ? undefined :adcd,
}, },
list:[], // list:[], //
saveList:[] // saveList:[], //
tableHeight:0
} }
}, },
@ -118,7 +120,8 @@
}, },
mounted() { mounted() {
this.getList() this.getList()
} },
} }
</script> </script>

View File

@ -15,7 +15,7 @@
实时水位(m) 实时水位(m)
</th> </th>
</tr> </tr>
<div style="max-height: 500px; overflow-y: auto"> <div :style="{'max-height':height + 'px', 'overflow-y': 'auto'}">
<tr v-for="(item, index) in newList" :key="index"> <tr v-for="(item, index) in newList" :key="index">
<td style="width: 50px">{{ index + 1 }}</td> <td style="width: 50px">{{ index + 1 }}</td>
<td style="width: 130px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td> <td style="width: 130px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
@ -42,6 +42,10 @@
list:{ list:{
type:Array, type:Array,
default:[], default:[],
},
height:{
type:Number,
default:0
} }
}, },
computed:{ computed:{

View File

@ -18,10 +18,10 @@
</image> </image>
</view> </view>
<view class="content"> <view class="content">
<Table :list="list" /> <Table :list="list" :height="height"/>
</view> </view>
<u-popup :show="popupOpen" mode="right" @close="popupOpen=false" > <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> <text style="font-weight: bold;">按类型</text>
<view style="margin-bottom: 10px; margin-left: -5px;"> <view style="margin-bottom: 10px; margin-left: -5px;">
<u-checkbox-group <u-checkbox-group
@ -38,7 +38,7 @@
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<view style="display: flex; margin-top: 240%;"> <view style="display: flex;position:absolute;bottom:20px;right:20px">
<u-button text="重置" class="bottom-btn1" <u-button text="重置" class="bottom-btn1"
@click="formData = {...formData,sources}"></u-button> @click="formData = {...formData,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button> <u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -55,6 +55,7 @@
const type = disType(adcd) const type = disType(adcd)
export default { export default {
props:{ props:{
height:Number,
stcd:String, stcd:String,
default:'' default:''
}, },

View File

@ -18,7 +18,7 @@
超汛限(m) 超汛限(m)
</th> </th>
</tr> </tr>
<div style="max-height: 500px; overflow-y: auto"> <div :style="{'max-height':height + 'px', 'overflow-y': 'auto'}">
<tr v-for="(item, index) in newList" :key="index"> <tr v-for="(item, index) in newList" :key="index">
<td style="width: 40px">{{ index + 1 }}</td> <td style="width: 40px">{{ index + 1 }}</td>
<td style="width: 90px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td> <td style="width: 90px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
@ -46,6 +46,10 @@
list:{ list:{
type:Array, type:Array,
default:[], default:[],
},
height:{
type:Number,
default:0,
} }
}, },
computed:{ computed:{

View File

@ -15,8 +15,8 @@
</view> </view>
</view> </view>
<view class="water-detail-content"> <view class="water-detail-content">
<HdWater v-if="activeOne == 0"/> <HdWater v-if="activeOne == 0" :height="tableHeight"/>
<SkWater v-if="activeOne == 1"/> <SkWater v-if="activeOne == 1" :height="tableHeight"/>
</view> </view>
</view> </view>
</template> </template>
@ -27,17 +27,29 @@
export default { export default {
data() { data() {
return { return {
activeOne:0 activeOne:0,
tableHeight:0
} }
}, },
components:{ components:{
HdWater, HdWater,
SkWater SkWater
}, },
methods: { methods: {
backTo(){ backTo(){
uni.navigateBack({delta:1}) uni.navigateBack({delta:1})
} }
},
onReady(){
console.log(123333);
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 240;
console.log("that.tableHeight",that.tableHeight);
}
})
} }
} }
</script> </script>