feat(): 雨量站模块开发

master
李神峰 2024-11-15 10:03:41 +08:00
parent 33ace27692
commit 9f310280c2
56 changed files with 1473 additions and 768 deletions

17
App.vue
View File

@ -89,4 +89,21 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.time-ranger {
margin-bottom: 10px;
.start-time,
.end-time {
display: flex;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf;
}
.search-btn {
margin: 3px 0 0 5px;
// color: #3399ef;
}
}
</style> </style>

View File

@ -1,6 +1,6 @@
{ {
"name" : "小玉潭水库", "name" : "檀树岗水库",
"appid" : "__UNI__7573222", "appid" : "__UNI__33ED56F",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : 1, "versionCode" : 1,

View File

@ -198,8 +198,13 @@
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "pages/sws/detail/index",
"style": {
"navigationBarTitleText": ""
}
} }
], ],
"usingComponents": { "usingComponents": {
"map": "/uni_modules/@dcloudio/uni-map/components/uni-map/uni-map" "map": "/uni_modules/@dcloudio/uni-map/components/uni-map/uni-map"

View File

@ -34,7 +34,7 @@
<u-button @click="sx" class="aqjc-custom-style">-</u-button> <u-button @click="sx" class="aqjc-custom-style">-</u-button>
</view> </view>
<view class="play-btn"> <view class="play-btn">
<uni-icons type="videocam" size="40" @click="play"></uni-icons> <uni-icons type="videocam" size="40" :color="swiper ? '#2979ff':'#909399' " @click="play"></uni-icons>
</view> </view>
</view> </view>
<view class="jcsj-charts"> <view class="jcsj-charts">
@ -244,7 +244,7 @@
const { const {
data data
} = await uni.$http.post( } = await uni.$http.post(
`/gunshiApp/xyt/attDamProfile/list`, ) `/gunshiApp/tsg/attDamProfile/list`, )
if (data.code == 200) { if (data.code == 200) {
this.array = data.data this.array = data.data
this.profileCode = data.data[0].profileCode; this.profileCode = data.data[0].profileCode;
@ -260,7 +260,7 @@
const { const {
data data
} = await uni.$http.post( } = await uni.$http.post(
"/gunshiApp/xyt/osmoticPressR/infiltra/line", { "/gunshiApp/tsg/osmoticPressR/infiltra/line", {
stationCodes: this.trData, stationCodes: this.trData,
dateTimeRangeSo: { dateTimeRangeSo: {
start: moment(this.stm).format("YYYY-MM-DD HH:mm:00"), start: moment(this.stm).format("YYYY-MM-DD HH:mm:00"),
@ -301,11 +301,7 @@
...obj, ...obj,
} }
}) })
let res1 = result.map(item => ({ this.dataSources = [...result];
...item,
rz: (item.rz - 100).toFixed(2)
})) //
this.dataSources = [...res1];
} }
} catch (error) { } catch (error) {
uni.$showMsg(); uni.$showMsg();
@ -316,7 +312,7 @@
try { try {
const { const {
data data
} = await uni.$http.post("/gunshiApp/xyt/attDamProfile/tree") } = await uni.$http.post("/gunshiApp/tsg/attDamProfile/tree")
if (data.code == 200) { if (data.code == 200) {
console.log("data", data); console.log("data", data);
@ -365,25 +361,6 @@
.jcsj-box { .jcsj-box {
padding: 0 10px; padding: 0 10px;
.time-ranger {
// display: flex;
// align-items: center;
margin-bottom: 10px;
.start-time,
.end-time {
display: flex;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf;
}
.search-btn {
margin: 3px 0 0 5px;
// color: #3399ef;
}
}
.jcsj-content { .jcsj-content {
max-height: 100vh; max-height: 100vh;
width: 100%; width: 100%;

View File

@ -29,8 +29,7 @@
<div class="navIcon"> <div class="navIcon">
<image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image> <image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image>
<div class="readStatus" v-show=" <div class="readStatus" v-show="
(xcStatus && item.key == 1) || (handleStatus && item.key ==3) || (warnStatus && item.key == 2)
(warnStatus && item.key == 4)
"></div> "></div>
</div> </div>
<div class="navTxt">{{ item.value }}</div> <div class="navTxt">{{ item.value }}</div>
@ -43,6 +42,9 @@
<view class="warn1" v-for="item in Ylzlist" :key="item.stnm"> <view class="warn1" v-for="item in Ylzlist" :key="item.stnm">
<ylz-list :item='item' /> <ylz-list :item='item' />
</view> </view>
<view class="warn1" v-for="item in swzList" :key="item.stcd">
<SwzList :item='item'/>
</view>
<view class="info_24" <view class="info_24"
:style="{display:'flex',justifyContent:'center',alignItems:'center',padding:'5px 0',margin:'0'}"> :style="{display:'flex',justifyContent:'center',alignItems:'center',padding:'5px 0',margin:'0'}">
<image :style="{width:'20px',height:'20px',marginRight:'10px'}" src="../../static/logoc.png"></image> <image :style="{width:'20px',height:'20px',marginRight:'10px'}" src="../../static/logoc.png"></image>
@ -53,17 +55,17 @@
<script> <script>
import moment from 'moment' import moment from 'moment'
const stm = moment().startOf('year').format("YYYY-MM-DD HH:mm:ss");
const etm = moment().format("YYYY-MM-DD HH:mm:ss");
const warnStm = moment().subtract(1, "days").format("YYYY-MM-DD HH:mm:ss") const warnStm = moment().subtract(1, "days").format("YYYY-MM-DD HH:mm:ss")
const warnetm = moment().format("YYYY-MM-DD HH:mm:ss") const warnetm = moment().format("YYYY-MM-DD HH:mm:ss")
import SkInfo from '../skInfo/index.vue' import SkInfo from '../skInfo/index.vue'
import YlzList from '../ylzList/index.vue' import YlzList from '../ylzList/index.vue'
import SwzList from "../sws/index.vue"
let timer = null; let timer = null;
export default { export default {
components: { components: {
SkInfo, SkInfo,
YlzList YlzList,
SwzList
}, },
data() { data() {
return { return {
@ -72,14 +74,11 @@
default_src: uni.getStorageSync('avatar'), default_src: uni.getStorageSync('avatar'),
messagelist: [], messagelist: [],
ylzList: [], ylzList: [],
xcStatus: false, // swzList:[],
handleStatus: false, //
warnStatus: false, // warnStatus: false, //
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getXcrwData();
this.getHandleData();
this.getYjData(); this.getYjData();
uni.$showMsg("刷新成功"); uni.$showMsg("刷新成功");
setTimeout(function () { setTimeout(function () {
@ -88,45 +87,22 @@
}, },
computed: { computed: {
getNavList() { getNavList() {
return [{ return [
value: '巡查任务',
key: 1,
icon: '../../static/tabs/xcrw.png',
url: '/pages/xcrw/index'
},
{
value: '维修养护',
key: 2,
icon: '../../static/tabs/wxyh.png',
url: '/pages/wxyh/index'
},
{
value: '问题处理',
key: 3,
icon: '../../static/tabs/wtcl.png',
url: '/pages/wtcl/index'
},
{ {
value: '预警', value: '预警',
key: 4, key: 2,
icon: '../../static/tabs/yujing_icon@2x2.png', icon: '../../static/tabs/yujing_icon@2x2.png',
url: '/pages/yj/index' url: '/pages/yj/index'
}, },
{ {
value: '视频监控', value: '视频监控',
key: 5, key: 3,
icon: '../../static/tabs/spjk.png', icon: '../../static/tabs/spjk.png',
url: '/pages/spjk/index' url: '/pages/spjk/index'
}, },
{
value: '生态流量监控',
key: 6,
icon: '../../static/tabs/stlljk.png',
url: '/pages/stlljk/index'
},
{ {
value: '安全监测', value: '安全监测',
key: 7, key: 4,
icon: '../../static/tabs/aqjc.png', icon: '../../static/tabs/aqjc.png',
url: '/pages/aqjc/index' url: '/pages/aqjc/index'
}, },
@ -134,16 +110,15 @@
} }
}, },
methods: { methods: {
getYlzList() { getYlzList() {
uni.$http.post('/gunshiApp/xyt/stPptnRReal/list').then(res => { uni.$http.post('/gunshiApp/tsg/stPptnRReal/list').then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.Ylzlist = res.data.data this.Ylzlist = res.data.data
} }
}) })
}, },
getList() { getList() {
uni.$http.post('/gunshiApp/xyt/messageCenter/list', { uni.$http.post('/gunshiApp/tsg/messageCenter/list', {
start: '', start: '',
end: '' end: ''
}).then(res => { }).then(res => {
@ -151,6 +126,11 @@
this.messagelist = res.data.data this.messagelist = res.data.data
} }
}) })
},
getSwList(){
uni.$http.post('/gunshiApp/tsg/reservoir/water/list').then(res=>{
this.swzList=res.data.data
})
}, },
todetailmessgae() { todetailmessgae() {
uni.navigateTo({ uni.navigateTo({
@ -168,7 +148,7 @@
} }
const { const {
data data
} = await uni.$http.post('/gunshiApp/xyt/visitMenuLog/insert', params) } = await uni.$http.post('/gunshiApp/tsg/visitMenuLog/insert', params)
} catch (error) {} } catch (error) {}
}, },
myNavigateTo(url, menu2) { myNavigateTo(url, menu2) {
@ -177,51 +157,6 @@
}) })
this.setInsert(menu2) this.setInsert(menu2)
}, },
//
async getXcrwData() {
const userId = uni.getStorageSync('value').userId
const params = {
dateRangeSo: {
start: stm,
end: etm,
},
inspectUserId: userId,
statusList: [0, 1]
}
try {
const res = await uni.$http.post("/gunshiApp/xyt/inspect/task/list", params)
if (res.data.data.length > 0) {
this.xcStatus = true
}
} catch (error) {
uni.$showMsg();
}
},
//
async getHandleData() {
let params = {
"pageSo": {
"pageSize": 10,
"pageNumber": 1
},
"dateTimeRangeSo": {
start: stm,
end: etm
},
"isHandle": 0,
"inspectUserId": uni.getStorageSync('value').userId
}
try {
const res = await uni.$http.post("/gunshiApp/xyt/inspect/detail/page", params)
if (res.data.data.records.length > 0) {
this.handleStatus = true
}
} catch (error) {
uni.$showMsg();
}
},
// //
async getYjData() { async getYjData() {
const params = { const params = {
@ -229,7 +164,7 @@
end: warnetm end: warnetm
} }
try { try {
const res = await uni.$http.post("/gunshiApp/xyt/stQxWarnR/home/warn", params) const res = await uni.$http.post("/gunshiApp/tsg/stQxWarnR/home/warn", params)
const { const {
flowWarn, flowWarn,
pressWarn, pressWarn,
@ -258,9 +193,8 @@
}, 10000); }, 10000);
this.setInsert() this.setInsert()
this.getXcrwData();
this.getHandleData();
this.getYjData(); this.getYjData();
this.getSwList()
}, },
onHide() { onHide() {
clearInterval(timer) clearInterval(timer)
@ -357,7 +291,7 @@
.warn1 { .warn1 {
padding: 18rpx 20rpx; padding: 18rpx 20rpx;
text-align: left; text-align: left;
// margin-bottom: 12rpx; margin-bottom: 5px;
background: #fff; background: #fff;
} }

View File

@ -47,38 +47,40 @@
}, },
methods: { methods: {
// //
init(){ init() {
this.checkVersion(); this.checkVersion();
}, },
// //
async checkVersion(){ async checkVersion() {
try { try {
const {data} = await uni.$http.get("/gunshiApp/xyt/appVersionRecord/latest"); const {
if(data.code == 200){ data
const selfVersionCode = uni.getSystemInfoSync().appWgtVersion//App } = await uni.$http.get("/gunshiApp/tsg/appVersionRecord/latest");
if (data.code == 200) {
const selfVersionCode = uni.getSystemInfoSync().appWgtVersion //App
const newVersionCode = data.data.version; //线 const newVersionCode = data.data.version; //线
if (selfVersionCode != newVersionCode) { if (selfVersionCode != newVersionCode) {
let platform = uni.getSystemInfoSync().platform // let platform = uni.getSystemInfoSync().platform //
// //
if (platform === 'android') { if (platform === 'android') {
uni.navigateTo({ uni.navigateTo({
url: `/pages/upgrade/index?info=${encodeURIComponent(JSON.stringify(data.data))}` url: `/pages/upgrade/index?info=${encodeURIComponent(JSON.stringify(data.data))}`
}) })
} }
//IOS线 //IOS线
else { else {
uni.showModal({ uni.showModal({
title: '发现新版本 ' +'V' + newVersionCode, title: '发现新版本 ' + 'V' + newVersionCode,
content: '请到App store进行升级', content: '请到App store进行升级',
showCancel: false showCancel: false
}) })
} }
} }
} }
} catch (error) { } catch (error) {
uni.$showMsg() // uni.$showMsg()
} }
}, },
handleChange(formData) { handleChange(formData) {
formData.checked = !formData.checked formData.checked = !formData.checked
@ -118,7 +120,7 @@
} }
// //
uni.$http.post('/gunshiApp/xyt/login', postForm).then(res => { uni.$http.post('/gunshiApp/tsg/login', postForm).then(res => {
uni.showLoading({ uni.showLoading({
title: '努力登录中...', title: '努力登录中...',
mask: true mask: true
@ -128,7 +130,7 @@
if (res.data.token) { if (res.data.token) {
uni.setStorageSync('Gs-Token', res.data.token) uni.setStorageSync('Gs-Token', res.data.token)
uni.$http.get('/gunshiApp/xyt/getInfo').then(res => { uni.$http.get('/gunshiApp/tsg/getInfo').then(res => {
this.getImgFlow(res.data.user.avatar) this.getImgFlow(res.data.user.avatar)
uni.setStorageSync('value', res.data.user) uni.setStorageSync('value', res.data.user)
setTimeout(function () { setTimeout(function () {
@ -156,7 +158,7 @@
if (imgUrl) { if (imgUrl) {
uni.request({ uni.request({
url: 'http://local.gunshiiot.com:18083' + url: 'http://local.gunshiiot.com:18083' +
`/gunshiApp/xyt/common/download/resource?resource=${imgUrl}`, `/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`,
responseType: 'arraybuffer', responseType: 'arraybuffer',
success: (res) => { success: (res) => {
// arraybufferBase64 // arraybufferBase64
@ -171,7 +173,7 @@
}, },
}, },
onLoad(){ onLoad() {
this.init(); this.init();
} }
} }

View File

@ -59,7 +59,7 @@
}, },
methods: { methods: {
yd(item){ yd(item){
uni.$http.post('/gunshiApp/xyt/messageCenter/update',{...item,status:1}) uni.$http.post('/gunshiApp/tsg/messageCenter/update',{...item,status:1})
}, },
confirm(e) { confirm(e) {
console.log(e); console.log(e);

View File

@ -23,7 +23,7 @@
</view> </view>
</view> </view>
</view> </view>
<view style="max-height:calc(100vh - 160px); overflow-y:auto;"> <view style="height:calc(100vh - 180px); overflow-y:auto;" v-if="list.length !== 0">
<view class="" v-for="(item,index) in list" :key="index" style="margin: 10px;background-color: #fff;padding: 10px;" @click="toDetail(item)"> <view class="" v-for="(item,index) in list" :key="index" style="margin: 10px;background-color: #fff;padding: 10px;" @click="toDetail(item)">
<view class="item"> <view class="item">
<view class="align-center"> <view class="align-center">
@ -48,7 +48,11 @@
</view> </view>
</view> </view>
</view> </view>
<view
style="height:calc(100vh - 150px);display: flex;align-items: center;justify-content: center;background-color: #fff;"
v-else>
<image src="../../static/empty.png" mode=""></image>
</view>
</view> </view>
<u-datetime-picker :show="showTime" v-model="stm" mode="datetime" @confirm="showTime=false" <u-datetime-picker :show="showTime" v-model="stm" mode="datetime" @confirm="showTime=false"
:minDate="minDate" :minDate="minDate"
@ -93,7 +97,7 @@
}, },
methods: { methods: {
rightClick() { rightClick() {
uni.$http.get('/gunshiApp/xyt/messageCenter/all/read', { uni.$http.get('/gunshiApp/tsg/messageCenter/all/read', {
receiveUserId: uni.getStorageSync('value').userId receiveUserId: uni.getStorageSync('value').userId
}).then(res => { }).then(res => {
@ -108,7 +112,7 @@
}, },
getList() { getList() {
console.log(111); console.log(111);
uni.$http.post('/gunshiApp/xyt/messageCenter/list', { uni.$http.post('/gunshiApp/tsg/messageCenter/list', {
start:this.stm?moment(this.stm).format('YYYY-MM-DD HH:mm:ss'):'', start:this.stm?moment(this.stm).format('YYYY-MM-DD HH:mm:ss'):'',
end:this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):'' end:this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):''
}).then(res => { }).then(res => {

View File

@ -64,7 +64,7 @@
// new_params.userId = uni.getStorageSync('value').userId // new_params.userId = uni.getStorageSync('value').userId
// console.log(formData) // console.log(formData)
uni.$http.put(`/gunshiApp/xyt/system/user/profile/updatePwd?oldPassword=${formData.oldPassword}&newPassword=${formData.newPassword}`).then(res=>{ uni.$http.put(`/gunshiApp/tsg/system/user/profile/updatePwd?oldPassword=${formData.oldPassword}&newPassword=${formData.newPassword}`).then(res=>{
console.log(res); console.log(res);
if (res.data.code === 200) { if (res.data.code === 200) {
uni.showToast({ uni.showToast({

View File

@ -116,7 +116,7 @@
"isHandle": 1, "isHandle": 1,
"handleUserId": uni.getStorageSync('value').userId "handleUserId": uni.getStorageSync('value').userId
} }
uni.$http.post('/gunshiApp/xyt/inspect/detail/page', params).then(res => { uni.$http.post('/gunshiApp/tsg/inspect/detail/page', params).then(res => {
this.list = res.data.data.records this.list = res.data.data.records
}) })
}, },

View File

@ -49,7 +49,7 @@ export default {
submitForm(params) { submitForm(params) {
// //
console.log({...params,...this.formData}); console.log({...params,...this.formData});
uni.$http.post('/gunshiApp/xyt/maintain/service/insert',{...params,...this.formData}).then(res=>{ uni.$http.post('/gunshiApp/tsg/maintain/service/insert',{...params,...this.formData}).then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
uni.$u.toast('新增成功') uni.$u.toast('新增成功')
uni.navigateBack() uni.navigateBack()

View File

@ -116,7 +116,7 @@
end:this.etm?moment(this.etm).format('YYYY-MM-DD 23:59:59'):'' end:this.etm?moment(this.etm).format('YYYY-MM-DD 23:59:59'):''
} }
} }
uni.$http.post('/gunshiApp/xyt/maintain/service/page', params).then(res => { uni.$http.post('/gunshiApp/tsg/maintain/service/page', params).then(res => {
this.dataList = res.data.data.records this.dataList = res.data.data.records
}) })
}, },
@ -126,7 +126,7 @@
...params, ...params,
...this.formData ...this.formData
}); });
uni.$http.post('/gunshiApp/xyt/maintain/service/insert', { uni.$http.post('/gunshiApp/tsg/maintain/service/insert', {
...params, ...params,
...this.formData ...this.formData
}).then(res => { }).then(res => {

View File

@ -107,7 +107,7 @@ export default {
uploadFilePromise(url,name) { uploadFilePromise(url,name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/maintain/service/file/upload/singleSimple', // url: 'http://local.gunshiiot.com:18083/gunshiApp/tsg/maintain/service/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -94,7 +94,7 @@
try { try {
const { const {
data data
} = await uni.$http.get(`/gunshiApp/xyt/inspect/detail/info?taskId=${this.id}`) } = await uni.$http.get(`/gunshiApp/tsg/inspect/detail/info?taskId=${this.id}`)
if (data.code == 200) { if (data.code == 200) {
this.xjItem = data.data this.xjItem = data.data
} }

View File

@ -123,7 +123,7 @@
statusList:[2] statusList:[2]
} }
try { try {
const res = await uni.$http.post("/gunshiApp/xyt/inspect/task/list",params) const res = await uni.$http.post("/gunshiApp/tsg/inspect/task/list",params)
this.list = [...res.data.data]; this.list = [...res.data.data];
} catch (error) { } catch (error) {
uni.$showMsg(); uni.$showMsg();

View File

@ -21,27 +21,6 @@
</div> </div>
</div> </div>
</view> </view>
<view class="funcBar xjxList">
<view class="" style="padding: 5px 0 0 5px;">
历史记录
</view>
<view class="" style="display: flex;width: 100%;justify-content: space-around;">
<div class="funcList" v-for="(item, index) in xjxList" :key="index" >
<div @click="navigateToSubPage(xjxList,index)">
<div class="funcIcon" style="width:30px:;height:30px">
<image
class="icon-left"
style="width: 100%; height: 100%"
:src="item.img"
mode="aspectFit"
></image>
</div>
<div class="funcTxt">{{ item.name }}</div>
</div>
</div>
</view>
</view>
<view class="version"> <view class="version">
<div class="content"> <div class="content">
<div class="left" style="display:flex"> <div class="left" style="display:flex">
@ -69,11 +48,6 @@
url: '/pages/modifyPassword/modifyPassword' url: '/pages/modifyPassword/modifyPassword'
}, },
] ]
const xjxList = [
{img: '../../static/images/xcrw1.png', name: '巡查任务', url:'/pages/mypage/compents/xcrw/index'},
{img: '../../static/images/wxyh1.png', name: '维修养护', url:'/pages/mypage/compents/wxyh/index'},
{img: '../../static/images/wtcl1.png', name: '问题处理', url:'/pages/mypage/compents/wtcl/index'},
]
export default { export default {
data() { data() {
return { return {
@ -82,7 +56,6 @@
userresponse: '防汛办', userresponse: '防汛办',
version: uni.getSystemInfoSync().appWgtVersion, version: uni.getSystemInfoSync().appWgtVersion,
func: func, func: func,
xjxList:xjxList,
default_src: uni.getStorageSync('avatar'), default_src: uni.getStorageSync('avatar'),
} }
}, },
@ -253,11 +226,5 @@
background-color: #007afd; background-color: #007afd;
margin-bottom: 55px; margin-bottom: 55px;
} }
.xjxList{
display: flex;
flex-direction: column;
align-items: start;
justify-content: start;
height: 20vh;
}
</style> </style>

View File

@ -72,7 +72,7 @@
console.log('--------拍照上传照片--------', res); console.log('--------拍照上传照片--------', res);
this.default_src = tempFilePaths[0] this.default_src = tempFilePaths[0]
uni.uploadFile({ uni.uploadFile({
url: uni.$http.baseUrl + '/gunshiApp/xyt/system/user/profile/avatar', url: uni.$http.baseUrl + '/gunshiApp/tsg/system/user/profile/avatar',
fileType: 'image', fileType: 'image',
filePath: tempFilePaths[0], filePath: tempFilePaths[0],
name: 'avatarfile', name: 'avatarfile',
@ -100,7 +100,7 @@
getImgFlow(imgUrl) { getImgFlow(imgUrl) {
uni.request({ uni.request({
url: 'http://local.gunshiiot.com:18083' + url: 'http://local.gunshiiot.com:18083' +
`/gunshiApp/xyt/common/download/resource?resource=${imgUrl}`, `/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`,
responseType: 'arraybuffer', responseType: 'arraybuffer',
success: (res) => { success: (res) => {
// arraybufferBase64 // arraybufferBase64
@ -153,7 +153,7 @@
new_userList.phonenumber = this.phone; new_userList.phonenumber = this.phone;
const const
{data} {data}
=await uni.$http.put('/gunshiApp/xyt/system/user/profile', new_userList); =await uni.$http.put('/gunshiApp/tsg/system/user/profile', new_userList);
if (data.code == 200) { if (data.code == 200) {
uni.setStorageSync('value', new_userList) uni.setStorageSync('value', new_userList)
uni.reLaunch({ uni.reLaunch({

View File

@ -1,62 +1,73 @@
<template> <template>
<div class="table_div"> <view>
<div class="table_cur">
<table style="width:100%;display:block"> <div class="table_div" v-if="tableData.length !=0">
<tr> <div class="table_cur">
<th style="width: 40px;"> <table style="width:100%;display:block">
序号 <tr>
</th> <th style="width: 40px;">
<th style="width: 80px">时间</th> 序号
<th style="width: 80px;"> </th>
雨量(mm) <th style="width: 80px">时间</th>
</th> <th style="width: 80px;">
<th style="width: 90px;"> 雨量(mm)
水位(m) </th>
</th> <th style="width: 90px;">
<th style="width: 90px; position: relative;"> 水位(m)
<view> </th>
库容(万m³) <th style="width: 90px; position: relative;">
<!-- <text style="position: absolute; bottom:-10px; left: 20px;">(/s)</text> --> <view>
</view> 库容(万m³)
</th> <!-- <text style="position: absolute; bottom:-10px; left: 20px;">(/s)</text> -->
</tr> </view>
<!-- style="max-height: 480px; overflow-y: auto" --> </th>
<div class="scroll-table"> </tr>
<tr v-for="(item, index) in newList" :key="index"> <!-- style="max-height: 480px; overflow-y: auto" -->
<td style="width: 30px">{{ index + 1 }}</td> <div class="scroll-table">
<td style="width: 80px;">{{ item.tm }}</td> <tr v-for="(item, index) in newList" :key="index">
<td style="width: 80px">{{ item.drp }}</td> <td style="width: 30px">{{ index + 1 }}</td>
<td style="width: 100px">{{ item.rz ? item.rz.toFixed(2) : "-" }}</td> <td style="width: 80px;">{{ item.tm }}</td>
<td style="width: 80px">{{ item.w ? item.w : "-" }}</td> <td style="width: 80px">{{ item.drp }}</td>
</tr> <td style="width: 100px">{{ item.rz ? item.rz.toFixed(2) : "-" }}</td>
<div style="height:180px"></div> <td style="width: 80px">{{ item.w ? item.w : "-" }}</td>
</div> </tr>
</table> <div style="height:180px"></div>
</div> </div>
</div> </table>
</div>
</div>
<view
style="display: flex;align-items: center;justify-content: center;background-color: #fff;"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view>
</view>
</template> </template>
<script> <script>
import moment from "moment" import moment from "moment"
export default { export default {
props:{ props: {
tableData:{ tableData: {
type:Array, type: Array,
default:[], default: [],
} }
}, },
computed:{ computed: {
newList(){ newList() {
if(this.tableData.length){ if (this.tableData.length) {
return this.tableData.map(item => ({...item,tm:moment(item.tm).format("MM-DD HH:mm")})) return this.tableData.map(item => ({
} ...item,
} tm: moment(item.tm).format("MM-DD HH:mm")
}, }))
methods:{ }
}
},
methods: {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -68,6 +79,7 @@
padding-top: 0px; padding-top: 0px;
overflow-x: scroll; overflow-x: scroll;
} }
/*table样式*/ /*table样式*/
.table_cur { .table_cur {
width: 100%; width: 100%;
@ -75,15 +87,18 @@
border-collapse: collapse; border-collapse: collapse;
font-size: 14px; font-size: 14px;
} }
.scroll-table{
.scroll-table {
height: calc(100vh - 180px); height: calc(100vh - 180px);
overflow-y: auto; overflow-y: auto;
width:'100%' width: '100%'
} }
.table_cur tr { .table_cur tr {
display: flex; display: flex;
line-height: 75rpx; line-height: 75rpx;
} }
.table_cur th { .table_cur th {
height: 85rpx; height: 85rpx;
color: #3399ef; color: #3399ef;
@ -106,5 +121,6 @@
white-space: nowrap; white-space: nowrap;
text-align: center !important; text-align: center !important;
} }
/*table样式 end*/ /*table样式 end*/
</style> </style>

View File

@ -112,7 +112,7 @@
async getTableData(){ async getTableData(){
try{ try{
const {data} = await uni.$http.get( const {data} = await uni.$http.get(
"/gunshiApp/xyt/reservoir/water/detail?stcd=716164061") "/gunshiApp/tsg/reservoir/water/detail?stcd=716164061")
if(data.code == 200){ if(data.code == 200){
this.tableData = {...data.data}; this.tableData = {...data.data};
} }

View File

@ -102,7 +102,7 @@
.zrtx-box{ .zrtx-box{
border: 1px solid #c1f2ce; border: 1px solid #c1f2ce;
border-radius: 2px; border-radius: 2px;
padding:10px 10px 5px 10px; padding:10px 5px 12px 5px;
background-color: #ebfbef; background-color: #ebfbef;
margin-bottom: 10px; margin-bottom: 10px;
.table_div { .table_div {
@ -128,7 +128,7 @@
} }
.table_cur tr { .table_cur tr {
display: flex; display: flex;
line-height: 65rpx; // line-height: 65rpx;
} }
.table_cur th { .table_cur th {
height: 65rpx; height: 65rpx;

View File

@ -23,7 +23,7 @@
async getData(){ async getData(){
try{ try{
const {data} = await uni.$http.post( const {data} = await uni.$http.post(
"/gunshiApp/xyt/resSafePersonB/list", "/gunshiApp/tsg/resSafePersonB/list",
{ {
resCode:"42120250085" resCode:"42120250085"
}) })

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="project-cotent"> <view class="project-cotent">
<view class="project-basic"> <!-- <view class="project-basic">
<view class="project-loc"> <view class="project-loc">
<text style="opacity:0.5">工程位置{{skInfo.resLoc}}</text> <text style="opacity:0.5">工程位置{{skInfo.resLoc}}</text>
</view> </view>
</view> </view> -->
<view class="project-des" > <!-- <view class="project-des" >
<view v-for="(item,index) in tableData" :key="index" :style="index % 2 == 0 ? 'width:150px;':'width:197px;'"> <view v-for="(item,index) in tableData" :key="index" :style="index % 2 == 0 ? 'width:150px;':'width:197px;'">
<view style="display:flex;align-items:center;margin:15px 0px;"> <view style="display:flex;align-items:center;margin:15px 0px;">
<view class="circle-dot"></view> <view class="circle-dot"></view>
@ -16,11 +16,22 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<view class="total-des"> <view class="total-des">
<view style="opacity:0.5">工程概况</view> <view style="opacity:0.5">工程概况</view>
<view>{{skInfo.projOverview}}</view> <view>{{skInfo.projOverview}}</view>
</view> </view>
<view class="project-basic">
<view class="project-loc">
<text style="opacity:0.5">水库水位定位信息</text>
<view class="sk-location">
<image src='../../../static/images/loc.png' style="width:20px;height:20px"></image>
<text style="margin-left:10px">{{skInfo.resLoc}}</text>
</view>
</view>
</view>
<view class="sk-map"></view>
</view> </view>
</template> </template>
<script> <script>
@ -116,7 +127,7 @@ export default {
.project-basic{ .project-basic{
background-color: #ffffff; background-color: #ffffff;
padding: 5px; padding: 5px;
margin: 5px 0; margin-top: 5px;
} }
.project-des{ .project-des{
display: flex; display: flex;
@ -145,4 +156,15 @@ export default {
background-color: #ffffff; background-color: #ffffff;
padding: 10px; padding: 10px;
} }
.sk-location{
display: flex;
align-items: center;
}
.sk-map{
width: 100%;
height: 400px;
background-color: #ffffff;
}
</style> </style>

View File

@ -5,8 +5,9 @@
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'> }" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar> </u-navbar>
<u-tabs :list="list1" @click="click" :current="tabs" style="background-color: #fff;margin-top: 60px;"></u-tabs> <u-tabs :list="list1" @click="click" :current="tabs" style="background-color: #fff;margin-top: 60px;"></u-tabs>
<Jcxx v-if="tabs == 0"></Jcxx> <Skjj v-if="tabs == 0" :skInfo="skInfo"></Skjj>
<BasicInfo v-if="tabs == 1" :skInfo="skInfo"></BasicInfo> <Jcxx v-if="tabs == 1"></Jcxx>
<!-- 基础信息 -->
<Tzcs v-if="tabs == 2" :skInfo="skInfo"></Tzcs> <Tzcs v-if="tabs == 2" :skInfo="skInfo"></Tzcs>
<Krqx v-if="tabs == 3"></Krqx> <Krqx v-if="tabs == 3"></Krqx>
<Zrtx v-if="tabs == 4"></Zrtx> <Zrtx v-if="tabs == 4"></Zrtx>
@ -19,7 +20,7 @@
import Jcxx from "./jcxx.vue" import Jcxx from "./jcxx.vue"
import Zrtx from "../../skDetail/zrtx/zrtx.vue" import Zrtx from "../../skDetail/zrtx/zrtx.vue"
import Krqx from "./krqx/index.vue" import Krqx from "./krqx/index.vue"
import BasicInfo from "./basicInfo.vue" import Skjj from "./basicInfo.vue"
import Tzcs from "./tzcs.vue" import Tzcs from "./tzcs.vue"
export default { export default {
@ -31,7 +32,10 @@
etm: '' etm: ''
}, },
list1: [{ list1: [ {
name: '水库简介',
},
{
name: '监测信息', name: '监测信息',
}, { }, {
name: '基础信息', name: '基础信息',
@ -49,7 +53,7 @@
Jcxx, Jcxx,
Zrtx, Zrtx,
Krqx, Krqx,
BasicInfo, Skjj,
Tzcs Tzcs
}, },
onLoad() { onLoad() {
@ -60,7 +64,7 @@
this.tabs = item.index; this.tabs = item.index;
}, },
getList(){ getList(){
uni.$http.post('/gunshiApp/xyt/attResBase/list',this.model).then(res=>{ uni.$http.post('/gunshiApp/tsg/attResBase/list',this.model).then(res=>{
console.log(res,'res'); console.log(res,'res');
this.skInfo = res.data.data[0]; this.skInfo = res.data.data[0];
}) })

View File

@ -1,330 +1,358 @@
<template> <template>
<view class="" style="padding: 5px;"> <view class="" style="padding: 5px;">
<view class="swiper-content"> <view class="swiper-content" v-if="imgList.length != 0">
<text class="num">{{nowNum}}/{{totalNum}}</text> <text class="num">{{nowNum}}/{{totalNum}}</text>
<u-swiper :list="imgList" height='230px' @change="change" imgMode="scaleToFill" keyName="imgPath"></u-swiper> <u-swiper :list="imgList" height='230px' @change="change" imgMode="scaleToFill" keyName="imgPath"></u-swiper>
<text class="time">{{imgTime}}</text> <text class="time">{{imgTime}}</text>
</view>
<view
style="display: flex;align-items: center;justify-content: center;background-color: #fff;"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view> </view>
<view class="update-time"> <view class="update-time">
<text>更新时间</text> <text>更新时间</text>
<text>{{info.tm}}</text> <text>{{info.tm}}</text>
</view> </view>
<view class="sk-info"> <view class="sk-info">
<view class="sk-first-row"> <view class="sk-first-row">
<view class="first-item"> <view class="first-item">
<text>{{info.rz}}</text> <text>{{info.rz}}</text>
<text>水位</text> <text>水位</text>
</view> </view>
<view class="first-item"> <view class="first-item">
<text>{{info.nowCap}}</text> <text>{{info.nowCap}}万m³</text>
<text>蓄水量</text> <text>蓄水量</text>
</view> </view>
<view class="first-line"></view> <view class="first-line"></view>
<image <image style="width: 20px; height: 20px;" src="../../../static/images/first.jpg"></image>
style="width: 20px; height: 20px;" </view>
src="../../../static/images/first.jpg" <view class="first-extra-row">
></image> <text>坝顶高程{{info.crestElev}}</text>
</view> <text>汛限水位{{info.flLowLimLev}}</text>
<view class="first-extra-row"> <text>总库容{{info.totCap}}万m³</text>
<text>坝顶高程{{info.crestElev}}</text> </view>
<text>汛限水位{{info.flLowLimLev}}</text> <view class="sk-second-row">
<text>总库容{{info.totCap}}</text> <view class="first-item">
</view> <text>{{rainInfo.today}}毫米</text>
<view class="sk-second-row"> <text>今日降雨</text>
<view class="first-item"> </view>
<text>{{rainInfo.today}}毫米</text> <view class="first-item">
<text>今日降雨</text> <text>{{rainInfo.yesterdayDrp}}毫米</text>
</view> <text>昨日降雨</text>
<view class="first-item"> </view>
<text>{{rainInfo.yesterdayDrp}}毫米</text> <view class="first-line" style="margin-right:17px"></view>
<text>昨日降雨</text> <image style="width: 20px; height: 20px;" src="../../../static/images/second.jpg"></image>
</view> </view>
<view class="first-line" style="margin-right:17px"></view> </view>
<image <view class="rain-box">
style="width: 20px; height: 20px;" <view class="rain-title">
src="../../../static/images/second.jpg" <view class="line-icon"></view>
></image> <view>水雨情过程线</view>
</view> </view>
</view> <view class="time-select">
<view class="rain-box"> <view class="time-ranger">
<view class="rain-title"> <view class="start-time">
<view class="line-icon"></view> <text>开始时间</text>
<view >水雨情过程线</view> <text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
</view> </view>
<view class="time-select"> <view class="end-time">
<view class="time-ranger" > <text>结束时间</text>
<view class="start-time"> <text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<text>开始时间</text> <view class="search-btn" @click="searchHandle">
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text> 搜索
</view> </view>
<view class="end-time"> </view>
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view>
</view> </view>
</view> </view>
<view class="switch-btn"> <view class="switch-btn">
<u-subsection :list="subsectionList" :current="curNow" mode="subsection" @change="subsectionChange"></u-subsection> <u-subsection :list="subsectionList" :current="curNow" mode="subsection" @change="subsectionChange">
</view> </u-subsection>
<view class="show-content"> </view>
<view style=" height: 500px; overflow-y: auto; padding:0" v-if="curNow == 0"> <view class="show-content">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" /> <view style=" height: 500px; overflow-y: auto; padding:0" v-if="curNow == 0 && jcTableData.length !=0">
</view> <qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
<JcTable v-if="curNow == 1" :tableData='jcTableData'/> </view>
<Tjsj v-if="curNow == 2" /> <view style="display: flex;align-items: center;justify-content: center;background-color: #fff;" v-if="curNow == 0 &&jcTableData.length ==0">
</view> <image src="../../../static/empty.png" mode=""></image>
</view> </view>
<JcTable v-if="curNow == 1" :tableData='jcTableData' />
<Tjsj v-if="curNow == 2" />
</view>
</view>
<u-datetime-picker <u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
:show="showTime" @cancel="showTime=false"></u-datetime-picker>
v-model="startTime" <u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
mode="datetime" @cancel="showTime1=false"></u-datetime-picker>
@confirm="handleStartTime" </view>
@cancel="showTime=false"
></u-datetime-picker>
<u-datetime-picker
:show="showTime1"
v-model="endTime"
mode="datetime"
@confirm="handleEndTime"
@cancel="showTime1=false"
></u-datetime-picker>
</view>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
import Tjsj from "../../skDetail/tjsj/tjsj.vue" import Tjsj from "../../skDetail/tjsj/tjsj.vue"
import JcTable from "../../skDetail/jcsj/jcsjTable.vue" import JcTable from "../../skDetail/jcsj/jcsjTable.vue"
import drpOption from "../../skDetail/jcsj/chartOption.js" import drpOption from "../../skDetail/jcsj/chartOption.js"
const stm = moment().subtract(7, 'days').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"); const stm = moment().subtract(7, 'days').set({
const etm = moment().set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"); minute: 0,
const url = "http://223.75.53.141:9102/test.by-lyf.tmp" second: 0
}).format("YYYY-MM-DD HH:mm");
const etm = moment().set({
minute: 0,
second: 0
}).format("YYYY-MM-DD HH:mm");
const url = "http://223.75.53.141:9102/test.by-lyf.tmp"
export default { export default {
components:{ components: {
Tjsj, Tjsj,
JcTable JcTable
}, },
data() { data() {
return { return {
startTime:stm, startTime: stm,
endTime:etm, endTime: etm,
imgList:[], imgList: [],
nowNum:1, nowNum: 1,
totalNum:0, totalNum: 0,
imgTime:'2024-08-12 11:00', imgTime: '2024-08-12 11:00',
info:'', info: '',
rainInfo:{}, rainInfo: {},
stm, stm,
etm, etm,
showTime:false, showTime: false,
showTime1:false, showTime1: false,
subsectionList: ['图', '表', '统计值'], subsectionList: ['图', '表', '统计值'],
curNow:0, curNow: 0,
jcTableData:[], jcTableData: [],
chartData: {}, chartData: {},
} }
}, },
methods: { methods: {
// //
async getImgList () { async getImgList() {
try { try {
const {data} = await uni.$http.post( const {
"/gunshiApp/xyt/reservoir/water/real/img", data
{ } = await uni.$http.post(
resCode: "42120250085" "/gunshiApp/tsg/reservoir/water/real/img", {
}) resCode: "42120250085"
if(data.code == 200){ })
const newArr = data.data.map(item => ({...item,imgPath: url + item.imgPath })) if (data.code == 200) {
const newArr = data.data.map(item => ({
...item,
imgPath: url + item.imgPath
}))
this.totalNum = newArr.length; this.totalNum = newArr.length;
this.imgList = [...newArr]; this.imgList = [...newArr];
this.imgTime = this.imgList[0]?.tm || "2024-08-12 11:00"; this.imgTime = this.imgList[0] ?.tm || "2024-08-12 11:00";
this.nowNum = !newArr.length ? 0 : 1; this.nowNum = !newArr.length ? 0 : 1;
} }
} catch (error) { } catch (error) {
uni.$showMsg(); uni.$showMsg();
}
},
//
async getSkinfo(){
try {
const {data} = await uni.$http.post(
"/gunshiApp/xyt/reservoir/water/list")
if(data.code == 200){
this.info = data.data[0]
}
} catch (error) {
uni.$showMsg();
}
},
//
async getrainInfo(){
try {
const {data} = await uni.$http.get(
"/gunshiApp/xyt/reservoir/water/detail?stcd=716164061")
if(data.code == 200){
this.rainInfo = data.data;
}
} catch (error) {
uni.$showMsg();
}
},
//
async getJcsjData(){
try{
const {data} = await uni.$http.post(
"/gunshiApp/xyt/reservoir/water/monitor/data",
{
stcd:"716164061",
stm:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
etm:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
})
if(data.code == 200){
this.jcTableData = [...data.data];
}
}catch(e){
uni.$showMsg();
} }
}, },
searchHandle(){ //
this.getJcsjData() async getSkinfo() {
}, try {
change(e){ const {
this.nowNum = e.current+1; data
this.imgTime = this.imgList[e.current].tm } = await uni.$http.post(
}, "/gunshiApp/tsg/reservoir/water/list")
handleStartTime(e){ if (data.code == 200) {
let time = moment(e.value).format("YYYY-MM-DD HH:mm") this.info = data.data[0]
this.stm = time }
this.showTime = false } catch (error) {
}, uni.$showMsg();
handleEndTime(e){
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.etm = time;
this.showTime1 = false
},
subsectionChange(e){
this.curNow = e
} }
},
//
async getrainInfo() {
try {
const {
data
} = await uni.$http.get(
"/gunshiApp/tsg/reservoir/water/detail?stcd=716164061")
if (data.code == 200) {
this.rainInfo = data.data;
}
} catch (error) {
uni.$showMsg();
}
},
//
async getJcsjData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/reservoir/water/monitor/data", {
stcd: "716164061",
stm: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
etm: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
})
if (data.code == 200) {
this.jcTableData = [...data.data];
}
} catch (e) {
uni.$showMsg();
}
},
searchHandle() {
this.getJcsjData()
},
change(e) {
this.nowNum = e.current + 1;
this.imgTime = this.imgList[e.current].tm
},
handleStartTime(e) {
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.stm = time
this.showTime = false
},
handleEndTime(e) {
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.etm = time;
this.showTime1 = false
},
subsectionChange(e) {
this.curNow = e
}
}, },
watch:{ watch: {
jcTableData(newV, oldV){ jcTableData(newV, oldV) {
if(this.info){ if (this.info) {
this.chartData = {...drpOption(newV,this.info.afsltdz,this.info.flLowLimLev,this.info.desFloodLev,this.info.calFloodLev)} this.chartData = {
...drpOption(newV, this.info.afsltdz, this.info.flLowLimLev, this.info.desFloodLev, this.info.calFloodLev)
}
} }
} }
}, },
mounted(){ mounted() {
this.getImgList(); this.getImgList();
this.getSkinfo(); this.getSkinfo();
this.getrainInfo(); this.getrainInfo();
this.getJcsjData(); this.getJcsjData();
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.swiper-content{ .swiper-content {
position: relative; position: relative;
.num{
position: absolute; .num {
top: 10px; position: absolute;
left: 10px; top: 10px;
z-index: 1; left: 10px;
background-color: #000; z-index: 1;
color: #fff; background-color: #000;
padding: 0 4px; color: #fff;
border-radius: 6px; padding: 0 4px;
opacity: .4; border-radius: 6px;
font-size: 12px; opacity: .4;
} font-size: 12px;
.time{
position: absolute;
background-color: #000;
opacity: .4;
color: #fff;
bottom: 0;
width:100%;
padding: 4px;
}
}
.update-time{
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 5px;
border-bottom: 1px solid #dfdfdf;
} }
.sk-info{
.time {
position: absolute;
background-color: #000;
opacity: .4;
color: #fff;
bottom: 0;
width: 100%;
padding: 4px;
}
}
.update-time {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 5px;
border-bottom: 1px solid #dfdfdf;
}
.sk-info {
display: flex;
flex-direction: column;
padding: 2px 5px;
margin: 5px 0;
.sk-first-row,
.sk-second-row {
display: flex;
padding: 5px 10px;
align-items: center;
justify-content: space-around;
background-color: #f2fafc;
.first-line {
width: 3px;
height: 20px;
background-color: #c6eae6;
}
.first-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 2px 5px; justify-content: center;
margin: 5px 0; align-items: center;
.sk-first-row,.sk-second-row{ }
display: flex;
padding: 5px 10px;
align-items: center;
justify-content: space-around;
background-color: #f2fafc;
.first-line{
width: 3px;
height: 20px;
background-color: #c6eae6;
}
.first-item{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
}
.sk-second-row{
margin: 5px 0;
background-color: #f2f8ff;
padding: 5px 10px;
}
} }
.first-extra-row{
display: flex; .sk-second-row {
padding: 5px; margin: 5px 0;
justify-content: space-between; background-color: #f2f8ff;
background-color: #f2fafc; padding: 5px 10px;
} }
.rain-box{ }
padding: 5px 0px;
.rain-title{ .first-extra-row {
display: flex; display: flex;
align-items: center; padding: 5px;
.line-icon{ justify-content: space-between;
width: 3px; background-color: #f2fafc;
height: 15px; }
background-color: #0079fe;
margin-right: 10px; .rain-box {
} padding: 5px 0px;
}
.time-ranger{ .rain-title {
margin-bottom: 10px;
.start-time, .end-time{
display: flex; display: flex;
align-items: center; align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf; .line-icon {
width: 3px;
height: 15px;
background-color: #0079fe;
margin-right: 10px;
}
} }
.time-ranger {
margin-bottom: 10px;
.start-time,
.end-time {
display: flex;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #dfdfdf;
}
} }
.switch-btn{
width: 50%; .switch-btn {
margin-left: auto; width: 50%;
} margin-left: auto;
}
.show-content{
width: 100%;
padding: 0;
margin-top: 10px;
} }
}
.show-content {
width: 100%;
padding: 0;
margin-top: 10px;
}
</style> </style>

View File

@ -28,7 +28,9 @@ export default {
async getKrData(){ async getKrData(){
try { try {
const {data} = await uni.$http.post( const {data} = await uni.$http.post(
"/gunshiApp/xyt/stZvarlB/list") "/gunshiApp/tsg/stZvarlB/list",{
stcd:"716164061"
})
if(data.code == 200){ if(data.code == 200){
this.tableData = [...data.data]; this.tableData = [...data.data];

View File

@ -1,119 +1,128 @@
<template > <template>
<view class="project-des" > <view class="basic-box">
<view v-for="(item,index) in tableData" :key="index" :style="index % 2 != 0 ? 'width:150px;':'width:197px;'"> <view class="basic-data-select">
<view style="display:flex;align-items:center;margin:15px 0px;"> <uni-data-select v-model="selectValue" :localdata="range" @change="selectChage" :clear="false"></uni-data-select>
<view class="circle-dot"></view> </view>
<view class="label-name"> <view class="project-des">
<text style="opacity:0.5">{{item.name}}</text> <view v-for="(item,index) in tableData" :key="index"
<text>{{item.value||"-"}}</text> :style="index % 2 == 0 ? 'width:50%;':'width:50%;'">
<view style="display:flex;align-items:center;margin:15px 0px;">
<view class="circle-dot"></view>
<view class="label-name">
<text style="opacity:0.5;text-align: center;">{{item.name}}</text>
<text>{{item.value||"-"}}</text>
</view>
</view> </view>
</view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { import selectData from "../../staticData"
props:{ export default {
skInfo:{ props: {
type:Object, skInfo: {
default:{} type: Object,
} default: {}
}
},
data() {
return {
list: selectData[0],
range: [{
value: 0,
text: "水库"
},
{
value: 1,
text: "主坝"
},
{
value: 2,
text: "副坝"
},
{
value: 3,
text: "溢洪道"
},
{
value: 4,
text: "灌溉发电洞"
},
{
value: 5,
text: "放空洞"
},
{
value: 6,
text: "拦洪坝"
},
{
value: 7,
text: "防汛道路"
}
],
selectValue: 0
}
},
methods: {
selectChage(e) {
this.selectChage = e
this.list = selectData[e]
}
},
computed: {
tableData() {
return this.list.map(item => {
return {
name: item.name,
value: this.skInfo[item.key]
}
})
}
},
},
data() {
return {
list:[
{
name:"坝址以上流域面积(km²)",
key:"watShedArea"
},
{
name:"坝顶高程(m)",
key:"crestElev"
},
{
name:"校核洪水位(m)",
key:"calFloodLev"
},
{
name:"总库容(万m³)",
key:"totCap"
},
{
name:"设计洪水位(m)",
key:"desFloodLev"
},
{
name:"调洪库容(万m³)",
key:"storFlCap"
},
{
name:"正常蓄水位(m)",
key:"normWatLev"
},
{
name:"兴利库容(万m³)",
key:"benResCap"
},
{
name:"防洪高水位(m)",
key:"uppLevFlco"
},
{
name:"防洪库容(万m³)",
key:"flcoCap"
},
{
name:"汛限水位(m)",
key:"flLowLimLev"
},
{
name:"死水位(m)",
key:"deadLev"
},
{
name:"死库容(万m³)",
key:"deadCap"
},
{
name:"堰顶高程(m)",
key:"wcrstel"
},
]
}
},
computed:{
tableData(){
return this.list.map(item=>{
return {
name:item.name,
value:this.skInfo[item.key]
}
})
}
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
.project-des{ .basic-box {
display: flex; display: flex;
flex-wrap: wrap; flex-direction: column;
border: 1px solid #f2f2f2;
background-color: #ffffff;
padding: 0 10px;
.circle-dot{
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #409eff;
margin-left: 10px;
}
.label-name{
display: flex;
flex-direction: column;
align-items: center;
flex:1 }
}
.basic-data-select {
width: 40%;
margin-top: 10px;
margin-left: auto;
margin-bottom: 10px;
margin-right: 10px;
}
.project-des {
display: flex;
flex-wrap: wrap;
border: 1px solid #f2f2f2;
background-color: #ffffff;
padding: 0 10px;
max-height: calc(100vh - 190px);
overflow: auto;
.circle-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #409eff;
margin-left: 10px;
} }
.label-name {
display: flex;
flex-direction: column;
align-items: center;
flex: 1
}
}
</style> </style>

View File

@ -63,7 +63,7 @@
shStcd:'', shStcd:'',
imageList:[], imageList:[],
baseUrl:'http://223.75.53.141:9102/test.by-lyf.tmp', baseUrl:'http://223.75.53.141:9102/test.by-lyf.tmp',
showImg:'' showImg:'../../static/empty.png'
} }
}, },
@ -87,16 +87,16 @@
}); });
}, },
getDrp(){ getDrp(){
uni.$http.get('/gunshiApp/xyt/reservoir/water/detail?stcd=716164061&_=1731028927554').then(res=>{ uni.$http.get('/gunshiApp/tsg/reservoir/water/detail?stcd=716164061&_=1731028927554').then(res=>{
this.dataform={...this.dataform,...res.data.data} this.dataform={...this.dataform,...res.data.data}
}) })
uni.$http.post('/gunshiApp/xyt/reservoir/water/list').then(res=>{ uni.$http.post('/gunshiApp/tsg/reservoir/water/list').then(res=>{
this.dataform={...this.dataform,...res.data.data[0]} this.dataform={...this.dataform,...res.data.data[0]}
this.tm = res.data.data[0].tm this.tm = res.data.data[0].tm
}) })
uni.$http.post('/gunshiApp/xyt/stWaterRReal/list').then(res=>{ uni.$http.post('/gunshiApp/tsg/stWaterRReal/list').then(res=>{
res.data.data.forEach(item=>{ res.data.data.forEach(item=>{
if(item.sttp == 'QQ'){ if(item.sttp == 'QQ'){
this.stgs=item.q this.stgs=item.q
@ -108,11 +108,12 @@
} }
}) })
}) })
uni.$http.post('/gunshiApp/xyt/resProjectImg/list',{resCode:42120250085}).then(res=>{ uni.$http.post('/gunshiApp/tsg/resProjectImg/list',{resCode:42120250085}).then(res=>{
res.data.data.forEach(item=>{ res.data.data.forEach(item=>{
if(item.projType == 1){ if(item.projType == 1){
this.imageList = item.files.map((item,index)=> this.imageList = item.files.map((item,index)=>
{item.url = this.baseUrl + item.filePath {
item.url = this.baseUrl + item.filePath
if(index == 0){ if(index == 0){
this.showImg = item.url this.showImg = item.url
@ -134,7 +135,7 @@
}) })
}, },
getList(){ getList(){
uni.$http.post('/gunshiApp/xyt/attResBase/list').then(res=>{ uni.$http.post('/gunshiApp/tsg/attResBase/list').then(res=>{
this.dataform=res.data.data[0] this.dataform=res.data.data[0]
}) })
}, },
@ -167,6 +168,7 @@
height: 22px; height: 22px;
.item-text{ .item-text{
width: 50%; width: 50%;
white-space: nowrap;
} }
} }
} }
@ -180,5 +182,8 @@
.withd-2{ .withd-2{
width: 50%; width: 50%;
text-align: center; text-align: center;
background-color: #caf982;
margin-right: 5px;
padding: 5px;
} }
</style> </style>

View File

@ -85,7 +85,7 @@
const { const {
data data
} = await uni.$http.post( } = await uni.$http.post(
"/gunshiApp/xyt/stWaterR/list", { "/gunshiApp/tsg/stWaterR/list", {
stcd: this.stcd, stcd: this.stcd,
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"), startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"), endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),

View File

@ -58,7 +58,7 @@
}, },
async getVideoList(){ async getVideoList(){
try { try {
const {data} = await uni.$http.post("/gunshiApp/xyt/attCctvBase/list") const {data} = await uni.$http.post("/gunshiApp/tsg/attCctvBase/list")
if(data.code == 200){ if(data.code == 200){
this.videoList = data.data this.videoList = data.data
} }

View File

@ -74,7 +74,7 @@ export default {
async getVideoSrc(id){ async getVideoSrc(id){
try{ try{
const {data} = await uni.$http.get( const {data} = await uni.$http.get(
`/gunshiApp/xyt/attCctvBase/preview/${id}`) `/gunshiApp/tsg/attCctvBase/preview/${id}`)
if(data.code == 200){ if(data.code == 200){
this.webURL="./static/h5Player/webplayer.html?cameraIndexCode="+id+"&cameraUrl="+data.data this.webURL="./static/h5Player/webplayer.html?cameraIndexCode="+id+"&cameraUrl="+data.data
} }
@ -90,7 +90,7 @@ export default {
speed:30 speed:30
} }
try{ try{
const {data} = await uni.$http.post("/gunshiApp/xyt/attCctvBase/control",params) const {data} = await uni.$http.post("/gunshiApp/tsg/attCctvBase/control",params)
if(this.timer) clearTimeout(this.timer) if(this.timer) clearTimeout(this.timer)
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.onOperation1(type) this.onOperation1(type)
@ -107,7 +107,7 @@ export default {
speed:30 speed:30
} }
try{ try{
const {data} = await uni.$http.post("/gunshiApp/xyt/attCctvBase/control",params) const {data} = await uni.$http.post("/gunshiApp/tsg/attCctvBase/control",params)
}catch(error){ }catch(error){
uni.$showMsg() uni.$showMsg()
} }

115
pages/staticData.js Normal file
View File

@ -0,0 +1,115 @@
export default {
0:[{
name: "所在河流(水系)名称",
key: "rvName"
},
{
name: "倒水全流域面积(km²)",
key: "rvName"
},
{
name: "坝址以上流域面积(km²)",
key: "watShedArea"
},
{
name: "坝址以上主河床长度(km)",
key: "watShedArea"
},
{
name: "坝址以上主河床长度(‰)",
key: "watShedArea"
},
{
name: "多处平均降雨量(mm)",
key: "watShedArea"
},
{
name: "设计洪水标准及洪峰流量(m³/s)",
key: "watShedArea"
},
{
name: "校核洪水标准及洪峰流量(m³/s)",
key: "watShedArea"
},
{
name: "校核洪水位(m)",
key: "calFloodLev"
},
{
name: "设计洪水位(m)",
key: "desFloodLev"
},
{
name: "正常蓄水位(m)",
key: "normWatLev"
},
{
name: "死水位(m)",
key: "deadLev"
},
{
name: "汛期限制水位(m)",
key: "flLowLimLev"
},
{
name: "总库容(万m³)",
key: "totCap"
},
{
name: "调洪库容(万m³)",
key: "storFlCap"
},
{
name: "兴利库容(万m³)",
key: "benResCap"
},
// {
// name: "防洪高水位(m)",
// key: "uppLevFlco"
// },
// {
// name: "防洪库容(万m³)",
// key: "flcoCap"
// },
{
name: "死库容(万m³)",
key: "deadCap"
},
{
name: "工程规模",
key: "engScal"
},
{
name: "设计灌溉面积(万亩)",
key: 'designIrrArea'
},
{
name: "保护人口(万)",
key: 'designIrrArea'
},
{
name: "保护农田(万亩)",
key: 'designIrrArea'
},
{
name: "地震基本烈度",
key: 'designIrrArea'
},
{
name: "地震动参数设计值",
key: 'designIrrArea'
},
// {
// name: "堰顶高程(m)",
// key: "wcrstel"
// },
]
}

View File

@ -70,7 +70,7 @@ export default function drpOption (obj) {
{ {
type: 'category', type: 'category',
data: data.map(o => o.tm), data: data.map(o => o.tm),
// inverse: true, inverse: true,
splitLine: { splitLine: {
show: false show: false
}, },

View File

@ -31,7 +31,7 @@
</view> </view>
<view class="jcsj-content"> <view class="jcsj-content" v-if="tableData.length != 0">
<view class="jcsj-charts" > <view class="jcsj-charts" >
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" /> <qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view> </view>
@ -39,6 +39,11 @@
<JcsjTable :tableData="tableData" /> <JcsjTable :tableData="tableData" />
</view> </view>
</view> </view>
<view
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../static/empty.png" mode=""></image>
</view>
<u-datetime-picker <u-datetime-picker
:show="showTime" :show="showTime"
v-model="startTime" v-model="startTime"
@ -122,7 +127,7 @@
const endTime = moment(this.etm).format("YYYY-MM-DD HH:mm:ss"); const endTime = moment(this.etm).format("YYYY-MM-DD HH:mm:ss");
try{ try{
const {data} = await uni.$http.get( const {data} = await uni.$http.get(
`/gunshiApp/xyt/stWaterR/getResMonthEcoFlow?startTime=${startTime}&endTime=${endTime}`,) `/gunshiApp/tsg/stWaterR/getResMonthEcoFlow?startTime=${startTime}&endTime=${endTime}`,)
if(data.code == 200){ if(data.code == 200){
this.stData = { this.stData = {
...this.stData, ...this.stData,
@ -138,7 +143,7 @@
async getJcsjData(){ async getJcsjData(){
try{ try{
const {data} = await uni.$http.post( const {data} = await uni.$http.post(
"/gunshiApp/xyt/stWaterR/ecologyFlowList", "/gunshiApp/tsg/stWaterR/ecologyFlowList",
{ {
startTime:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"), startTime:moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"), endTime:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),

View File

@ -0,0 +1,139 @@
import echarts from 'echarts/lib/echarts';
export default function DrpOption(
data,
) {
const maxVal = Math.max(...data.map(obj => obj.drp))
const maxSw = Math.ceil(Math.max(...data.map(obj => obj.rz)))
const minSw = Math.floor(Math.min(...data.map(obj => obj.rz)))
const maxKr = Math.max(...data.map(obj => obj.w))
const minKr = Math.min(...data.map(obj => obj.w))
let eopts = {
tooltip: {
trigger: 'axis',
},
grid: {
bottom: "8%",
left: "10%",
right: "8%",
width: '80%',
height: '80%'
},
legend: {
// 显示图例
show: false,
},
xAxis: [
{
type: 'category',
data: data.map(o => o.tm.substr("2020-".length,11)),
inverse: true,
splitLine: {
show: false
},
axisLabel: {
color: '#333',
fontSize: 12,
formatter: val => val.substr('2020-'.length, 11)
},
axisLine: {
lineStyle: {
color: '#07a6ff',
width: 0.5
}
},
axisTick: {
show: false
}
}
]
,
yAxis: [
{
type: 'value',
position: 'left',
name: '水位(m)',
splitLine: {
show: true,
lineStyle: {
color: '#07a6ff',
width: 0.25,
type: 'dotted'
}
},
axisLabel: {
color: '#333',
fontSize: 12
},
axisLine: {
show: false
},
axisTick: {
show: false
},
min: minSw,
max: maxSw
},
{
type: 'value',
position: 'right',
name: '库容(万m³)',
splitLine: {
show: false,
lineStyle: {
color: '#07a6ff',
width: 0.25,
type: 'dotted'
}
},
axisLabel: {
color: '#333',
fontSize: 12
},
axisLine: {
show: false
},
axisTick: {
show: false
},
min: minKr,
max: maxKr
}
],
}
let chartData = {
series: [
{
// yAxisIndex: 0,
name: '水位',
type: 'line',
symbol: 'none',
color: '#0AE0B5',
label: {
show: false
},
data: data.map(o => o.rz ? o.rz.toFixed(2):null )
},
{
yAxisIndex: 1,
name: '库容',
type: 'line',
color: '#007AFD',
symbol: 'none',
showSymbol: false,
label: {
show: false
},
data: data.map(o => o.w)
}
],
}
return {
eopts,
chartData
}
}

140
pages/sws/detail/index.vue Normal file
View File

@ -0,0 +1,140 @@
<template>
<view :style="{height:'100vh',overflow:'auto',backgroundColor:'#fff'}">
<u-navbar :title="name" :autoBack="true" :titleStyle="{
fontSize:'18px'
}" :height='40' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar>
<view style="padding:10px">
<view class="time-ranger" style="margin-top:70px">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view>
<view v-if="tableData.length != 0">
<view class="water-chart-area">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true"
:eopts="chartData.eopts" />
</view>
<view class="water-table-area">
<Table :tableData="tableData"></Table>
</view>
</view>
<view
style="height:calc(100vh - 150px);display: flex;align-items: center;justify-content: center;background-color: #fff;"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view>
</view>
</view>
<u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
@cancel="showTime=false"></u-datetime-picker>
<u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
@cancel="showTime1=false"></u-datetime-picker>
</view>
</template>
<script>
import moment from 'moment';
import Table from "./jcTable.vue"
import drpOptions from './chartOption'
const stm = moment().subtract(7, 'days').set({
minute: 0,
second: 0
}).format("YYYY-MM-DD HH:mm");
const etm = moment().set({
minute: 0,
second: 0
}).format("YYYY-MM-DD HH:mm");
export default {
components: {
Table
},
data() {
return {
name: '',
startTime: stm,
endTime: etm,
stm,
etm,
showTime: false,
showTime1: false,
tableData: [],
chartData: {},
stcd: ''
}
},
methods: {
handleStartTime(e) {
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.stm = time
this.showTime = false
},
handleEndTime(e) {
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
this.etm = time;
this.showTime1 = false
},
async geTableData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/reservoir/water/monitor/data", {
stcd: this.stcd,
stm: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
etm: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
})
if (data.code == 200) {
this.tableData = [...data.data]
}
} catch (error) {
uni.$showMsg();
}
},
searchHandle() {
this.geTableData()
}
},
watch: {
tableData(n, o) {
if (n.length > 0) {
this.chartData = {
...drpOptions(n)
}
console.log({
...drpOptions(n)
});
}
}
},
mounted() {
this.geTableData()
},
onLoad(options) {
this.name = options.stnm;
this.stcd = options.stcd;
}
}
</script>
<style lang="scss" scoped>
.water-chart-area {
width: 100%;
height: 270px;
}
.water-table-area {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,97 @@
<template>
<div class="table_div">
<div class="table_cur">
<table style="width:100%;display:block">
<tr>
<th style="width: 12%;">
序号
</th>
<th style="width: 38%;">
时间
</th>
<th style="width: 25%;">水位(m)</th>
<th style="width: 25%;">库容(万m³)</th>
</tr>
<!-- style="max-height: 480px; overflow-y: auto" -->
<div class="scroll-table">
<tr v-for="(item, index) in tableData" :key="index">
<td style="width: 12%;">{{index + 1}}</td>
<td style="width: 38%;">{{item.tm}}</td>
<td style="width: 25%;">{{ item.rz}}</td>
<td style="width:25%;">{{ item.w }}</td>
</tr>
<div style="height:180px"></div>
</div>
</table>
</div>
</div>
</template>
<script>
import moment from "moment"
export default {
props:{
tableData:{
type:Array,
default:[],
}
},
methods: {
simpleData(tm){
return moment(tm).format("MM-DD HH:mm")
}
},
}
</script>
<style lang="scss" scoped>
.table_div {
height: 100%;
max-width: calc(100% - 0px);
// max-height: calc(80vh);
flex: 1;
padding-top: 0px;
// overflow-x: scroll;
}
/*table样式*/
.table_cur {
width: 100%;
empty-cells: show;
border-collapse: collapse;
font-size: 14px;
}
.scroll-table{
height: calc(55vh - 180px);
overflow-y: auto;
width:'100%'
}
.table_cur tr {
display: flex;
line-height: 75rpx;
}
.table_cur th {
height: 85rpx;
color: #3399ef;
background: #e1f3ff;
font-size: 14px;
// font-weight: bold;
padding: 0px 10px;
box-sizing: border-box;
white-space: nowrap;
text-align: center !important;
}
.table_cur td {
height: 65rpx;
// border-bottom: 1px solid #d8ddeb;
font-size: 14px;
color: #2f4056;
padding: 0 10px;
box-sizing: border-box;
white-space: nowrap;
text-align: center !important;
}
/*table样式 end*/
</style>

96
pages/sws/index.vue Normal file
View File

@ -0,0 +1,96 @@
<template>
<view class="swinfo" @click="toDetail()">
<view class="title">
<view class="left">
<text>{{item.stnm}}水位站</text>
</view>
<view class="right">
{{item.tm}}
</view>
</view>
<view class="content">
<view class="real-sw">
<text class="sw-name">实时水位</text>
<text style="font-size:22px;margin-right:5px;">{{item.rz}} </text>
<text>m</text>
</view>
<view class="limit-sw">
<text class="sw-name">汛限水位</text>
<text style="font-size:22px;margin-right:5px">{{item.flLowLimLev}}</text>
<text>m</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
type: Object,
required: true,
},
},
data() {
return {}
},
methods: {
toDetail() {
uni.navigateTo({
url: `/pages/sws/detail/index?stnm=${this.item.stnm}&stcd=${this.item.stcd}`
})
},
},
}
</script>
<style lang="scss" scoped>
.swinfo {
.title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
}
.content {
display: flex;
justify-content: space-between;
.real-sw,
.limit-sw {
flex: 1;
position: relative;
border: 1px solid #efefef;
height: 60px;
text-align: center;
line-height: 75px;
.sw-name {
position: absolute;
top: 0;
left: 0;
// padding: 0 5px;
color: #49a7f0;
background-color: #cbecfd;
font-size: 12px;
line-height: 20px;
padding: 0 5px;
}
}
.real-sw {
margin-right: 10px;
}
}
}
.withd-2 {
width: 50%;
text-align: center;
}
</style>

View File

@ -86,7 +86,7 @@
if (this.info.url) { if (this.info.url) {
this.isStartDownload = true this.isStartDownload = true
//App //App
const baseUrl = `http://local.gunshiiot.com:18083/gunshiApp/xyt/common/download/resource?resource=${this.info.url}` const baseUrl = `http://local.gunshiiot.com:18083/gunshiApp/tsg/common/download/resource?resource=${this.info.url}`
downloadApp(baseUrl, current => { downloadApp(baseUrl, current => {
// //
this.hasProgress = true this.hasProgress = true

View File

@ -149,7 +149,7 @@
return; return;
}else{ }else{
console.log(this.queItem); console.log(this.queItem);
uni.$http.post('/gunshiApp/xyt/inspect/detail/handle', this.queItem).then(res => { uni.$http.post('/gunshiApp/tsg/inspect/detail/handle', this.queItem).then(res => {
uni.$showMsg(res.data.description); uni.$showMsg(res.data.description);
if(res.data.code == 200){ if(res.data.code == 200){
uni.navigateBack() uni.navigateBack()
@ -195,7 +195,7 @@
uploadFilePromise(url, name) { uploadFilePromise(url, name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/inspect/task/file/upload/singleSimple', // url: 'http://local.gunshiiot.com:18083/gunshiApp/tsg/inspect/task/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -113,7 +113,7 @@
"handleUserId": uni.getStorageSync('value').userId "handleUserId": uni.getStorageSync('value').userId
} }
console.log(params,'dsd'); console.log(params,'dsd');
uni.$http.post('/gunshiApp/xyt/inspect/detail/page', params).then(res => { uni.$http.post('/gunshiApp/tsg/inspect/detail/page', params).then(res => {
this.list=res.data.data.records this.list=res.data.data.records
}) })
}, },

View File

@ -142,7 +142,7 @@
uploadFilePromise(url,name) { uploadFilePromise(url,name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/maintain/service/file/upload/singleSimple', // url: 'http://local.gunshiiot.com:18083/gunshiApp/tsg/maintain/service/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -50,7 +50,7 @@ export default {
submitForm(params) { submitForm(params) {
// //
console.log({...params,...this.formData}); console.log({...params,...this.formData});
uni.$http.post('/gunshiApp/xyt/maintain/service/insert',{...params,...this.formData}).then(res=>{ uni.$http.post('/gunshiApp/tsg/maintain/service/insert',{...params,...this.formData}).then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
// uni.$u.toast('') // uni.$u.toast('')
uni.$u.toast('新增成功') uni.$u.toast('新增成功')

View File

@ -206,8 +206,8 @@
return treelist return treelist
}, },
async getTreeList (){ async getTreeList (){
const res = await uni.$http.get('/gunshiApp/xyt/system/dept/list') const res = await uni.$http.get('/gunshiApp/tsg/system/dept/list')
const resUser = await uni.$http.get('/gunshiApp/xyt/system/user/list?pageNum=1&pageSize=9999') const resUser = await uni.$http.get('/gunshiApp/tsg/system/user/list?pageNum=1&pageSize=9999')
this.deptUserList = resUser.data.rows this.deptUserList = resUser.data.rows
if (res.data.data?.length > 0 && resUser.data.rows?.length > 0) { if (res.data.data?.length > 0 && resUser.data.rows?.length > 0) {
// return this.handleTreeList(res.data.data,res.data.rows) // return this.handleTreeList(res.data.data,res.data.rows)
@ -261,7 +261,7 @@
console.log(params); console.log(params);
const { const {
data data
} = await uni.$http.post(`/gunshiApp/xyt/inspect/task/finish`, params) } = await uni.$http.post(`/gunshiApp/tsg/inspect/task/finish`, params)
console.log(data,'2121'); console.log(data,'2121');
if(data.code==200){ if(data.code==200){
uni.$showMsg('提交成功'); uni.$showMsg('提交成功');
@ -370,7 +370,7 @@
uploadFilePromise(url, name, index, index1) { uploadFilePromise(url, name, index, index1) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/inspect/task/file/upload/singleSimple', // url: 'http://local.gunshiiot.com:18083/gunshiApp/tsg/inspect/task/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -107,7 +107,7 @@ export default {
uploadFilePromise(url,name) { uploadFilePromise(url,name) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/maintain/service/file/upload/singleSimple', // url: 'http://local.gunshiiot.com:18083/gunshiApp/tsg/maintain/service/file/upload/singleSimple', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {

View File

@ -95,7 +95,7 @@
if (this.status == 0) { if (this.status == 0) {
const { const {
data data
} = await uni.$http.get(`/gunshiApp/xyt/inspect/task/startInspect/${this.id}`) } = await uni.$http.get(`/gunshiApp/tsg/inspect/task/startInspect/${this.id}`)
if (data.code == 200) { if (data.code == 200) {
this.btnStatus = 1; this.btnStatus = 1;
this.getXjItem(this.id) this.getXjItem(this.id)
@ -115,7 +115,7 @@
try { try {
const { const {
data data
} = await uni.$http.get(`/gunshiApp/xyt/inspect/detail/info?taskId=${id}`) } = await uni.$http.get(`/gunshiApp/tsg/inspect/detail/info?taskId=${id}`)
if (data.code == 200) { if (data.code == 200) {
this.xjItem = data.data this.xjItem = data.data
} }
@ -151,7 +151,7 @@
try { try {
const { const {
data data
} = await uni.$http.post(`/gunshiApp/xyt/inspectTaskTrack/insert`, { } = await uni.$http.post(`/gunshiApp/tsg/inspectTaskTrack/insert`, {
taskId: this.id, taskId: this.id,
lttd: latitude, lttd: latitude,
lgtd: longitude lgtd: longitude

View File

@ -116,7 +116,7 @@
statusList: [0, 1] statusList: [0, 1]
} }
try { try {
const res = await uni.$http.post("/gunshiApp/xyt/inspect/task/list", params) const res = await uni.$http.post("/gunshiApp/tsg/inspect/task/list", params)
this.list = [...res.data.data]; this.list = [...res.data.data];
} catch (error) { } catch (error) {
uni.$showMsg(); uni.$showMsg();

View File

@ -105,7 +105,7 @@
} }
}, },
getList(){ getList(){
uni.$http.post('/gunshiApp/xyt/stQxWarnR/home/warn',this.model).then(res=>{ uni.$http.post('/gunshiApp/tsg/stQxWarnR/home/warn',this.model).then(res=>{
this.list = res.data.data this.list = res.data.data
}) })
}, },

View File

@ -0,0 +1,48 @@
import echarts from 'echarts/lib/echarts';
export default function DrpOption(data) {
let eopts = {
tooltip: {
trigger: 'axis',
},
grid: {
x: 40,
y: 30,
x2: 30,
y2: 28,
// borderWidth: 0
},
legend: {
// 显示图例
show: true,
},
xAxis: [
{
type: 'category',
data: ["1h","2h"],
}
],
yAxis: {
type: 'value',
axisLabel: {
// format: 'projectFormat'
formatter:'{value} mm'
}
},
};
let chartData = {
series: [{
name: '降雨量',
type: 'bar',
barWidth: '60%',
data: [6, 8],
itemStyle: {
color:"#6395fa"
}
}, ]
};
return {
eopts,
chartData
}
}

View File

@ -33,10 +33,27 @@
<view class="ylz-table-area"> <view class="ylz-table-area">
<YlzTable :tableData="ylzData"></YlzTable> <YlzTable :tableData="ylzData"></YlzTable>
</view> </view>
<view>
<view class="yl-dl-yb">
<text class="yl-bluetiao"></text>
<text>短临预报</text>
</view>
<view style="margin-top:5px;margin-left:10px">预报时间{{projectTime}}</view>
<view class="ylzpro-chart-area" v-if="projectData.length != 0">
<qiun-data-charts :chartData="projectBarData.chartData" :echartsApp="true" :eopts="projectBarData.eopts" />
</view>
<view
style="height:250px;display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../static/empty.png" mode=""></image>
</view>
</view>
</view> </view>
<view v-if="activeOne == 1" style="padding:10px"> <view v-if="activeOne == 1" style="padding:10px">
<Table></Table> <Table></Table>
</view> </view>
<u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime" <u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
@cancel="showTime=false"></u-datetime-picker> @cancel="showTime=false"></u-datetime-picker>
<u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime" <u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
@ -48,6 +65,7 @@
import Table from "./tjsjTable.vue" import Table from "./tjsjTable.vue"
import YlzTable from "./jcTable.vue" import YlzTable from "./jcTable.vue"
import drpOptions from './jcOptions' import drpOptions from './jcOptions'
import projectOptions from './barOptions'
const stm = moment().subtract(7, 'days').set({ const stm = moment().subtract(7, 'days').set({
minute: 0, minute: 0,
second: 0 second: 0
@ -56,6 +74,10 @@
minute: 0, minute: 0,
second: 0 second: 0
}).format("YYYY-MM-DD HH:mm"); }).format("YYYY-MM-DD HH:mm");
const projectTime = moment().set({
minute: 0,
second: 0
}).format("YYYY-MM-DD HH:mm")
export default { export default {
components: { components: {
Table, Table,
@ -74,6 +96,9 @@
chartData1: {}, chartData1: {},
chartData: {}, chartData: {},
stnm:'', stnm:'',
projectTime,
projectData:[],
projectBarData:{}
} }
}, },
methods: { methods: {
@ -84,8 +109,8 @@
const { const {
data data
} = await uni.$http.post( } = await uni.$http.post(
"/gunshiApp/xyt/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", { "/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", {
stcd: "716164061", stcd: "61610700",
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"), startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss") endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss")
}) })
@ -103,8 +128,8 @@
const { const {
data data
} = await uni.$http.post( } = await uni.$http.post(
"/gunshiApp/xyt/attResBase/rainBasinDivision/queryStStbprpPerHourChart/StcdAndStartTimeAndEndTime", { "/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHourChart/StcdAndStartTimeAndEndTime", {
stcd: "716164061", stcd: "61610700",
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"), startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss") endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss")
}) })
@ -132,6 +157,28 @@
searchHandle() { searchHandle() {
this.getrainInfo(); this.getrainInfo();
this.getrainChartInfo(); this.getrainChartInfo();
},
//
async getPreReportData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/weather/short/fore", {
tm:moment(this.projectTime).format('YYYYMMDDHHmm')
})
this.projectBarData = {
...projectOptions(data.data)
}
if (data.code == 200) {
// this.projectBarData = {
// ...projectOptions(data.data)
// }
}
} catch (error) {
uni.$showMsg();
}
} }
}, },
watch: { watch: {
@ -139,7 +186,7 @@
this.chartData = { this.chartData = {
...drpOptions(n) ...drpOptions(n)
} }
} },
}, },
onLoad(options){ onLoad(options){
this.stnm = options.stnm this.stnm = options.stnm
@ -147,6 +194,8 @@
mounted() { mounted() {
this.getrainInfo(); this.getrainInfo();
this.getrainChartInfo(); this.getrainChartInfo();
this.getPreReportData();
} }
} }
</script> </script>
@ -173,4 +222,20 @@
.ylz-table-area{ .ylz-table-area{
background-color: #fff; background-color: #fff;
} }
.yl-dl-yb{
display: flex;
align-items: center;
margin-top: 20px;
}
.yl-bluetiao{
width: 5px;
height: 15px;
background-color: #02a7f0;
margin-right: 10px;
}
.ylzpro-chart-area{
width: 100%;
height: 250px;
background-color: #fff;
}
</style> </style>

View File

@ -1,22 +1,20 @@
import echarts from 'echarts/lib/echarts'; import echarts from 'echarts/lib/echarts';
export default function DrpOption(echartData) { export default function DrpOption(echartData) {
console.log("echartData",echartData);
let totalDrp = 0; let totalDrp = 0;
const DRPLEVEL = [10, 20, 50, 100, 250]; const DRPLEVEL = [10, 20, 50, 100, 250];
const maxVal = DRPLEVEL.find(o => o > totalDrp); const maxVal = DRPLEVEL.find(o => o > totalDrp);
const xMaxVal = echartData?.actual ? DRPLEVEL.find(o => { const xMaxVal = echartData ?.actual ? DRPLEVEL.find(o => {
let max = Math.max(...echartData?.actual || []) let max = Math.max(...echartData ?.actual || [])
return o > max return o > max
}):maxVal }) : maxVal
// const xMaxVal = Math.ceil(Math.max(...echartData.actual)) + 2 // const xMaxVal = Math.ceil(Math.max(...echartData.actual)) + 2
const yMaxVal = echartData?.actual ? DRPLEVEL.find(o => { const yMaxVal = echartData ?.actual ? DRPLEVEL.find(o => {
let max = Math.max(...echartData?.total) let max = Math.max(...echartData ?.total)
return o > max return o > max
}): maxVal }) : maxVal
let eopts = { let eopts = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
}, },
grid: { grid: {
@ -33,34 +31,31 @@ export default function DrpOption(echartData) {
data: ['实测', '累计'] data: ['实测', '累计']
}, },
calculable: true, calculable: true,
xAxis: [ xAxis: [{
{ type: 'category',
type: 'category', data: echartData.time,
data: echartData.time, splitLine: {
splitLine: { show: false
show: false },
}, axisLabel: {
axisLabel: { color: '#333',
color: '#333', fontSize: 12,
fontSize: 12, format: "jcDataFormat"
format:"jcDataFormat" },
}, axisLine: {
axisLine: { lineStyle: {
lineStyle: { color: '#07a6ff',
color: '#07a6ff', width: 0.5,
width: 0.5, }
} },
}, axisTick: {
axisTick: { show: false,
show: false, },
}, }],
} yAxis: [{
],
yAxis: [
{
type: 'value', type: 'value',
position: 'left', position: 'left',
name:"雨量mm", name: "雨量mm",
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
@ -85,7 +80,7 @@ export default function DrpOption(echartData) {
{ {
type: 'value', type: 'value',
position: 'right', position: 'right',
name:"累计mm", name: "累计mm",
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
@ -108,10 +103,9 @@ export default function DrpOption(echartData) {
max: yMaxVal max: yMaxVal
} }
], ],
}; };
let chartData = { let chartData = {
series: [ series: [{
{
name: '实测', name: '实测',
type: 'bar', type: 'bar',
barWidth: '60%', barWidth: '60%',
@ -121,10 +115,18 @@ export default function DrpOption(echartData) {
barBorderRadius: [3, 3, 0, 0], barBorderRadius: [3, 3, 0, 0],
color: new echarts.graphic.LinearGradient( color: new echarts.graphic.LinearGradient(
0, 0, 0, 1, 0, 0, 0, 1,
[ [{
{ offset: 0, color: '#3876cd' }, offset: 0,
{ offset: 0.5, color: '#45b4e7' }, color: '#3876cd'
{ offset: 1, color: '#54ffff' } },
{
offset: 0.5,
color: '#45b4e7'
},
{
offset: 1,
color: '#54ffff'
}
] ]
), ),
}, },
@ -133,9 +135,13 @@ export default function DrpOption(echartData) {
show: false, show: false,
}, },
markPoint: { markPoint: {
data: [ data: [{
{ type: 'max', name: '最大值', symbol: 'circle', symbolSize: 1, symbolOffset: [0, -12] }, type: 'max',
] name: '最大值',
symbol: 'circle',
symbolSize: 1,
symbolOffset: [0, -12]
}, ]
}, },
}, },
{ {
@ -160,8 +166,7 @@ export default function DrpOption(echartData) {
}, { }, {
offset: 0.8, offset: 0.8,
color: 'rgba(3, 194, 236, 0)' color: 'rgba(3, 194, 236, 0)'
} }], false),
], false),
shadowColor: 'rgba(0, 0, 0, 0.1)', shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10 shadowBlur: 10
} }
@ -173,9 +178,9 @@ export default function DrpOption(echartData) {
}, },
} }
] ]
}; };
return { return {
eopts, eopts,
chartData chartData
} }
} }

View File

@ -102,7 +102,7 @@
async getTableData(){ async getTableData(){
try{ try{
const {data} = await uni.$http.get( const {data} = await uni.$http.get(
"/gunshiApp/xyt/attResBase/rainBasinDivision/queryStPptnDetails/stcd?stcd=716164061") "/gunshiApp/tsg/attResBase/rainBasinDivision/queryStPptnDetails/stcd?stcd=716164061")
if(data.code == 200){ if(data.code == 200){
this.tableData = {...data.data}; this.tableData = {...data.data};
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 179 KiB

BIN
static/images/092.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
static/images/loc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -57,6 +57,9 @@ const cfe = {
"xAxisFormat": function (value) { "xAxisFormat": function (value) {
return value.substr('2020--'.length, 11) return value.substr('2020--'.length, 11)
}, },
"projectFormat":function (value) {
return value + 'mm';
},
"stList": function (val) "stList": function (val)
{ {
let value = val.substr('2020-'.length, 11) let value = val.substr('2020-'.length, 11)