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 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(this.keyword){
this.getPerson({code:last.code, name:this.keyword})
}else{
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')

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()
}
@ -99,6 +124,7 @@
},
created() {
this.getData()
this.getDept()
}
}
</script>
@ -115,7 +141,7 @@
}
.mybody{
background-color: #ffffff;
margin: 5px 5px;
// margin: 5px 5px;
padding: 5px 0px;
height: calc( 100vh - 100px );
overflow: scroll;
@ -150,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

@ -5,9 +5,9 @@
<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 || default_img"
mode="aspectFill"
></image>
</div>
<div class="info_name">
@ -286,6 +286,7 @@ import moment from 'moment'
import {level} from "../../pages/utils/dicType"
import {disType} from "../utils/dicType.js"
import drpOption from "./chartOption.js"
import default_img from "../../static/tabs/touxiang.png"
export default {
data () {
return {
@ -332,7 +333,9 @@ export default {
hdList:[],
skList:[],
readStatus:false,
readYjStatus:false
readYjStatus:false,
default_src: uni.getStorageSync('avatar'),
default_img
}
},
computed: {

View File

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

View File

@ -1,5 +1,5 @@
<template>
<view class="rain-box">
<view class="rain-box" style="overflow:hidden">
<view class="nav-bar">
<u-icon name="arrow-left" color="#000" size="28" @click="backTo"></u-icon>
<view>
@ -51,12 +51,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>
@ -72,24 +72,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="{'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="{'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="{'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="{'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="{'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>
@ -105,7 +105,7 @@
统计时段{{tm.stm}}{{tm.etm}}
</view>
<view style="margin: 0 10px;">
<Table :list="rainList"/>
<Table :list="rainList" :height='tableHeight'/>
</view>
<u-picker
:show="show"
@ -158,7 +158,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>
@ -229,7 +229,8 @@
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
}
},
components:{
@ -421,6 +422,15 @@
this.adnmList();
this.basNameList()
this.getRainList()
},
onReady(){
let that = this
uni.getSystemInfo({
success: (res) => {
that.tableHeight = res.windowHeight - 300;
console.log("this.tableHeight", that.tableHeight);
}
})
}
}
</script>
@ -467,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;
}
}
}

View File

@ -18,10 +18,10 @@
</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
@ -38,7 +38,7 @@
</u-checkbox>
</u-checkbox-group>
</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,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -56,6 +56,7 @@
export default {
props:{
stcd:String,
height:Number,
default:''
},
components:{
@ -81,7 +82,8 @@
adcd:type == 1 ? undefined :adcd,
},
list:[], //
saveList:[] //
saveList:[], //
tableHeight:0
}
},
@ -118,7 +120,8 @@
},
mounted() {
this.getList()
}
},
}
</script>

View File

@ -15,7 +15,7 @@
实时水位(m)
</th>
</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">
<td style="width: 50px">{{ index + 1 }}</td>
<td style="width: 130px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
@ -42,6 +42,10 @@
list:{
type:Array,
default:[],
},
height:{
type:Number,
default:0
}
},
computed:{

View File

@ -18,10 +18,10 @@
</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
@ -38,7 +38,7 @@
</u-checkbox>
</u-checkbox-group>
</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,sources}"></u-button>
<u-button text="确认" color="#d9001b" class="bottom-btn2" @click="popConfirm"></u-button>
@ -55,6 +55,7 @@
const type = disType(adcd)
export default {
props:{
height:Number,
stcd:String,
default:''
},

View File

@ -18,7 +18,7 @@
超汛限(m)
</th>
</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">
<td style="width: 40px">{{ index + 1 }}</td>
<td style="width: 90px;color: #3399ef;" @click="jumpDetail(item)">{{ item.stnm }}</td>
@ -46,6 +46,10 @@
list:{
type:Array,
default:[],
},
height:{
type:Number,
default:0,
}
},
computed:{

View File

@ -15,8 +15,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,17 +27,29 @@
export default {
data() {
return {
activeOne:0
activeOne:0,
tableHeight:0
}
},
components:{
HdWater,
SkWater
},
methods: {
backTo(){
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>