feat(): 雨量站模块开发
parent
33ace27692
commit
9f310280c2
17
App.vue
17
App.vue
|
|
@ -89,4 +89,21 @@
|
|||
display: flex;
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name" : "小玉潭水库",
|
||||
"appid" : "__UNI__7573222",
|
||||
"name" : "檀树岗水库",
|
||||
"appid" : "__UNI__33ED56F",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 1,
|
||||
|
|
|
|||
|
|
@ -198,8 +198,13 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sws/detail/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"usingComponents": {
|
||||
"map": "/uni_modules/@dcloudio/uni-map/components/uni-map/uni-map"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<u-button @click="sx" class="aqjc-custom-style">-</u-button>
|
||||
</view>
|
||||
<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 class="jcsj-charts">
|
||||
|
|
@ -244,7 +244,7 @@
|
|||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
`/gunshiApp/xyt/attDamProfile/list`, )
|
||||
`/gunshiApp/tsg/attDamProfile/list`, )
|
||||
if (data.code == 200) {
|
||||
this.array = data.data
|
||||
this.profileCode = data.data[0].profileCode;
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/osmoticPressR/infiltra/line", {
|
||||
"/gunshiApp/tsg/osmoticPressR/infiltra/line", {
|
||||
stationCodes: this.trData,
|
||||
dateTimeRangeSo: {
|
||||
start: moment(this.stm).format("YYYY-MM-DD HH:mm:00"),
|
||||
|
|
@ -301,11 +301,7 @@
|
|||
...obj,
|
||||
}
|
||||
})
|
||||
let res1 = result.map(item => ({
|
||||
...item,
|
||||
rz: (item.rz - 100).toFixed(2)
|
||||
})) //为了测试 最后需要删除
|
||||
this.dataSources = [...res1];
|
||||
this.dataSources = [...result];
|
||||
}
|
||||
} catch (error) {
|
||||
uni.$showMsg();
|
||||
|
|
@ -316,7 +312,7 @@
|
|||
try {
|
||||
const {
|
||||
data
|
||||
} = await uni.$http.post("/gunshiApp/xyt/attDamProfile/tree")
|
||||
} = await uni.$http.post("/gunshiApp/tsg/attDamProfile/tree")
|
||||
if (data.code == 200) {
|
||||
console.log("data", data);
|
||||
|
||||
|
|
@ -365,25 +361,6 @@
|
|||
.jcsj-box {
|
||||
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 {
|
||||
max-height: 100vh;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@
|
|||
<div class="navIcon">
|
||||
<image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image>
|
||||
<div class="readStatus" v-show="
|
||||
(xcStatus && item.key == 1) || (handleStatus && item.key ==3) ||
|
||||
(warnStatus && item.key == 4)
|
||||
(warnStatus && item.key == 2)
|
||||
"></div>
|
||||
</div>
|
||||
<div class="navTxt">{{ item.value }}</div>
|
||||
|
|
@ -43,6 +42,9 @@
|
|||
<view class="warn1" v-for="item in Ylzlist" :key="item.stnm">
|
||||
<ylz-list :item='item' />
|
||||
</view>
|
||||
<view class="warn1" v-for="item in swzList" :key="item.stcd">
|
||||
<SwzList :item='item'/>
|
||||
</view>
|
||||
<view class="info_24"
|
||||
: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>
|
||||
|
|
@ -53,17 +55,17 @@
|
|||
|
||||
<script>
|
||||
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 warnetm = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||
import SkInfo from '../skInfo/index.vue'
|
||||
import YlzList from '../ylzList/index.vue'
|
||||
import SwzList from "../sws/index.vue"
|
||||
let timer = null;
|
||||
export default {
|
||||
components: {
|
||||
SkInfo,
|
||||
YlzList
|
||||
YlzList,
|
||||
SwzList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -72,14 +74,11 @@
|
|||
default_src: uni.getStorageSync('avatar'),
|
||||
messagelist: [],
|
||||
ylzList: [],
|
||||
xcStatus: false, //巡查任务状态
|
||||
handleStatus: false, //问题处理
|
||||
swzList:[],
|
||||
warnStatus: false, //预警
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getXcrwData();
|
||||
this.getHandleData();
|
||||
this.getYjData();
|
||||
uni.$showMsg("刷新成功");
|
||||
setTimeout(function () {
|
||||
|
|
@ -88,45 +87,22 @@
|
|||
},
|
||||
computed: {
|
||||
getNavList() {
|
||||
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'
|
||||
},
|
||||
return [
|
||||
{
|
||||
value: '预警',
|
||||
key: 4,
|
||||
key: 2,
|
||||
icon: '../../static/tabs/yujing_icon@2x2.png',
|
||||
url: '/pages/yj/index'
|
||||
},
|
||||
{
|
||||
value: '视频监控',
|
||||
key: 5,
|
||||
key: 3,
|
||||
icon: '../../static/tabs/spjk.png',
|
||||
url: '/pages/spjk/index'
|
||||
},
|
||||
{
|
||||
value: '生态流量监控',
|
||||
key: 6,
|
||||
icon: '../../static/tabs/stlljk.png',
|
||||
url: '/pages/stlljk/index'
|
||||
},
|
||||
{
|
||||
value: '安全监测',
|
||||
key: 7,
|
||||
key: 4,
|
||||
icon: '../../static/tabs/aqjc.png',
|
||||
url: '/pages/aqjc/index'
|
||||
},
|
||||
|
|
@ -134,16 +110,15 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
getYlzList() {
|
||||
uni.$http.post('/gunshiApp/xyt/stPptnRReal/list').then(res => {
|
||||
uni.$http.post('/gunshiApp/tsg/stPptnRReal/list').then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.Ylzlist = res.data.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
uni.$http.post('/gunshiApp/xyt/messageCenter/list', {
|
||||
uni.$http.post('/gunshiApp/tsg/messageCenter/list', {
|
||||
start: '',
|
||||
end: ''
|
||||
}).then(res => {
|
||||
|
|
@ -151,6 +126,11 @@
|
|||
this.messagelist = res.data.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getSwList(){
|
||||
uni.$http.post('/gunshiApp/tsg/reservoir/water/list').then(res=>{
|
||||
this.swzList=res.data.data
|
||||
})
|
||||
},
|
||||
todetailmessgae() {
|
||||
uni.navigateTo({
|
||||
|
|
@ -168,7 +148,7 @@
|
|||
}
|
||||
const {
|
||||
data
|
||||
} = await uni.$http.post('/gunshiApp/xyt/visitMenuLog/insert', params)
|
||||
} = await uni.$http.post('/gunshiApp/tsg/visitMenuLog/insert', params)
|
||||
} catch (error) {}
|
||||
},
|
||||
myNavigateTo(url, menu2) {
|
||||
|
|
@ -177,51 +157,6 @@
|
|||
})
|
||||
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() {
|
||||
const params = {
|
||||
|
|
@ -229,7 +164,7 @@
|
|||
end: warnetm
|
||||
}
|
||||
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 {
|
||||
flowWarn,
|
||||
pressWarn,
|
||||
|
|
@ -258,9 +193,8 @@
|
|||
}, 10000);
|
||||
|
||||
this.setInsert()
|
||||
this.getXcrwData();
|
||||
this.getHandleData();
|
||||
this.getYjData();
|
||||
this.getSwList()
|
||||
},
|
||||
onHide() {
|
||||
clearInterval(timer)
|
||||
|
|
@ -357,7 +291,7 @@
|
|||
.warn1 {
|
||||
padding: 18rpx 20rpx;
|
||||
text-align: left;
|
||||
// margin-bottom: 12rpx;
|
||||
margin-bottom: 5px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,38 +47,40 @@
|
|||
},
|
||||
methods: {
|
||||
// 更新版本
|
||||
init(){
|
||||
init() {
|
||||
this.checkVersion();
|
||||
},
|
||||
// 检查版本更新情况
|
||||
async checkVersion(){
|
||||
async checkVersion() {
|
||||
try {
|
||||
const {data} = await uni.$http.get("/gunshiApp/xyt/appVersionRecord/latest");
|
||||
if(data.code == 200){
|
||||
const selfVersionCode = uni.getSystemInfoSync().appWgtVersion//当前App版本号
|
||||
const newVersionCode = data.data.version; //线上最新版本号
|
||||
if (selfVersionCode != newVersionCode) {
|
||||
let platform = uni.getSystemInfoSync().platform //手机平台
|
||||
//安卓手机弹窗升级
|
||||
if (platform === 'android') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/upgrade/index?info=${encodeURIComponent(JSON.stringify(data.data))}`
|
||||
})
|
||||
}
|
||||
//IOS无法在线升级提示到商店下载
|
||||
else {
|
||||
uni.showModal({
|
||||
title: '发现新版本 ' +'V' + newVersionCode,
|
||||
content: '请到App store进行升级',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
}
|
||||
const {
|
||||
data
|
||||
} = await uni.$http.get("/gunshiApp/tsg/appVersionRecord/latest");
|
||||
if (data.code == 200) {
|
||||
const selfVersionCode = uni.getSystemInfoSync().appWgtVersion //当前App版本号
|
||||
const newVersionCode = data.data.version; //线上最新版本号
|
||||
if (selfVersionCode != newVersionCode) {
|
||||
let platform = uni.getSystemInfoSync().platform //手机平台
|
||||
//安卓手机弹窗升级
|
||||
if (platform === 'android') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/upgrade/index?info=${encodeURIComponent(JSON.stringify(data.data))}`
|
||||
})
|
||||
}
|
||||
//IOS无法在线升级提示到商店下载
|
||||
else {
|
||||
uni.showModal({
|
||||
title: '发现新版本 ' + 'V' + newVersionCode,
|
||||
content: '请到App store进行升级',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
uni.$showMsg()
|
||||
// uni.$showMsg()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
handleChange(formData) {
|
||||
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({
|
||||
title: '努力登录中...',
|
||||
mask: true
|
||||
|
|
@ -128,7 +130,7 @@
|
|||
|
||||
if (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)
|
||||
uni.setStorageSync('value', res.data.user)
|
||||
setTimeout(function () {
|
||||
|
|
@ -156,7 +158,7 @@
|
|||
if (imgUrl) {
|
||||
uni.request({
|
||||
url: 'http://local.gunshiiot.com:18083' +
|
||||
`/gunshiApp/xyt/common/download/resource?resource=${imgUrl}`,
|
||||
`/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`,
|
||||
responseType: 'arraybuffer',
|
||||
success: (res) => {
|
||||
// 将arraybuffer转换为Base64编码
|
||||
|
|
@ -171,7 +173,7 @@
|
|||
|
||||
},
|
||||
},
|
||||
onLoad(){
|
||||
onLoad() {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
},
|
||||
methods: {
|
||||
yd(item){
|
||||
uni.$http.post('/gunshiApp/xyt/messageCenter/update',{...item,status:1})
|
||||
uni.$http.post('/gunshiApp/tsg/messageCenter/update',{...item,status:1})
|
||||
},
|
||||
confirm(e) {
|
||||
console.log(e);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</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="item">
|
||||
<view class="align-center">
|
||||
|
|
@ -48,7 +48,11 @@
|
|||
</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>
|
||||
<u-datetime-picker :show="showTime" v-model="stm" mode="datetime" @confirm="showTime=false"
|
||||
:minDate="minDate"
|
||||
|
|
@ -93,7 +97,7 @@
|
|||
},
|
||||
methods: {
|
||||
rightClick() {
|
||||
uni.$http.get('/gunshiApp/xyt/messageCenter/all/read', {
|
||||
uni.$http.get('/gunshiApp/tsg/messageCenter/all/read', {
|
||||
receiveUserId: uni.getStorageSync('value').userId
|
||||
}).then(res => {
|
||||
|
||||
|
|
@ -108,7 +112,7 @@
|
|||
},
|
||||
getList() {
|
||||
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'):'',
|
||||
end:this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):''
|
||||
}).then(res => {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
// new_params.userId = uni.getStorageSync('value').userId
|
||||
// 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);
|
||||
if (res.data.code === 200) {
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
"isHandle": 1,
|
||||
"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
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default {
|
|||
submitForm(params) {
|
||||
//
|
||||
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){
|
||||
uni.$u.toast('新增成功')
|
||||
uni.navigateBack()
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
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
|
||||
})
|
||||
},
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
...params,
|
||||
...this.formData
|
||||
});
|
||||
uni.$http.post('/gunshiApp/xyt/maintain/service/insert', {
|
||||
uni.$http.post('/gunshiApp/tsg/maintain/service/insert', {
|
||||
...params,
|
||||
...this.formData
|
||||
}).then(res => {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ export default {
|
|||
uploadFilePromise(url,name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
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,
|
||||
name: 'file',
|
||||
formData: {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
try {
|
||||
const {
|
||||
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) {
|
||||
this.xjItem = data.data
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
statusList:[2]
|
||||
}
|
||||
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];
|
||||
} catch (error) {
|
||||
uni.$showMsg();
|
||||
|
|
|
|||
|
|
@ -21,27 +21,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</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">
|
||||
<div class="content">
|
||||
<div class="left" style="display:flex">
|
||||
|
|
@ -69,11 +48,6 @@
|
|||
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 {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -82,7 +56,6 @@
|
|||
userresponse: '防汛办',
|
||||
version: uni.getSystemInfoSync().appWgtVersion,
|
||||
func: func,
|
||||
xjxList:xjxList,
|
||||
default_src: uni.getStorageSync('avatar'),
|
||||
}
|
||||
},
|
||||
|
|
@ -253,11 +226,5 @@
|
|||
background-color: #007afd;
|
||||
margin-bottom: 55px;
|
||||
}
|
||||
.xjxList{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
justify-content: start;
|
||||
height: 20vh;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
console.log('--------拍照上传照片--------', res);
|
||||
this.default_src = tempFilePaths[0]
|
||||
uni.uploadFile({
|
||||
url: uni.$http.baseUrl + '/gunshiApp/xyt/system/user/profile/avatar',
|
||||
url: uni.$http.baseUrl + '/gunshiApp/tsg/system/user/profile/avatar',
|
||||
fileType: 'image',
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'avatarfile',
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
getImgFlow(imgUrl) {
|
||||
uni.request({
|
||||
url: 'http://local.gunshiiot.com:18083' +
|
||||
`/gunshiApp/xyt/common/download/resource?resource=${imgUrl}`,
|
||||
`/gunshiApp/tsg/common/download/resource?resource=${imgUrl}`,
|
||||
responseType: 'arraybuffer',
|
||||
success: (res) => {
|
||||
// 将arraybuffer转换为Base64编码
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
new_userList.phonenumber = this.phone;
|
||||
const
|
||||
{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) {
|
||||
uni.setStorageSync('value', new_userList)
|
||||
uni.reLaunch({
|
||||
|
|
|
|||
|
|
@ -1,62 +1,73 @@
|
|||
<template>
|
||||
<div class="table_div">
|
||||
<div class="table_cur">
|
||||
<table style="width:100%;display:block">
|
||||
<tr>
|
||||
<th style="width: 40px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 80px">时间</th>
|
||||
<th style="width: 80px;">
|
||||
雨量(mm)
|
||||
</th>
|
||||
<th style="width: 90px;">
|
||||
水位(m)
|
||||
</th>
|
||||
<th style="width: 90px; position: relative;">
|
||||
<view>
|
||||
库容(万m³)
|
||||
<!-- <text style="position: absolute; bottom:-10px; left: 20px;">(m³/s)</text> -->
|
||||
</view>
|
||||
</th>
|
||||
</tr>
|
||||
<!-- style="max-height: 480px; overflow-y: auto" -->
|
||||
<div class="scroll-table">
|
||||
<tr v-for="(item, index) in newList" :key="index">
|
||||
<td style="width: 30px">{{ index + 1 }}</td>
|
||||
<td style="width: 80px;">{{ item.tm }}</td>
|
||||
<td style="width: 80px">{{ item.drp }}</td>
|
||||
<td style="width: 100px">{{ item.rz ? item.rz.toFixed(2) : "-" }}</td>
|
||||
<td style="width: 80px">{{ item.w ? item.w : "-" }}</td>
|
||||
</tr>
|
||||
<div style="height:180px"></div>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<view>
|
||||
|
||||
<div class="table_div" v-if="tableData.length !=0">
|
||||
<div class="table_cur">
|
||||
<table style="width:100%;display:block">
|
||||
<tr>
|
||||
<th style="width: 40px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 80px">时间</th>
|
||||
<th style="width: 80px;">
|
||||
雨量(mm)
|
||||
</th>
|
||||
<th style="width: 90px;">
|
||||
水位(m)
|
||||
</th>
|
||||
<th style="width: 90px; position: relative;">
|
||||
<view>
|
||||
库容(万m³)
|
||||
<!-- <text style="position: absolute; bottom:-10px; left: 20px;">(m³/s)</text> -->
|
||||
</view>
|
||||
</th>
|
||||
</tr>
|
||||
<!-- style="max-height: 480px; overflow-y: auto" -->
|
||||
<div class="scroll-table">
|
||||
<tr v-for="(item, index) in newList" :key="index">
|
||||
<td style="width: 30px">{{ index + 1 }}</td>
|
||||
<td style="width: 80px;">{{ item.tm }}</td>
|
||||
<td style="width: 80px">{{ item.drp }}</td>
|
||||
<td style="width: 100px">{{ item.rz ? item.rz.toFixed(2) : "-" }}</td>
|
||||
<td style="width: 80px">{{ item.w ? item.w : "-" }}</td>
|
||||
</tr>
|
||||
<div style="height:180px"></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>
|
||||
|
||||
<script>
|
||||
import moment from "moment"
|
||||
export default {
|
||||
props:{
|
||||
tableData:{
|
||||
type:Array,
|
||||
default:[],
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
newList(){
|
||||
if(this.tableData.length){
|
||||
return this.tableData.map(item => ({...item,tm:moment(item.tm).format("MM-DD HH:mm")}))
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
}
|
||||
export default {
|
||||
props: {
|
||||
tableData: {
|
||||
type: Array,
|
||||
default: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
newList() {
|
||||
if (this.tableData.length) {
|
||||
return this.tableData.map(item => ({
|
||||
...item,
|
||||
tm: moment(item.tm).format("MM-DD HH:mm")
|
||||
}))
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -68,6 +79,7 @@
|
|||
padding-top: 0px;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
/*table样式*/
|
||||
.table_cur {
|
||||
width: 100%;
|
||||
|
|
@ -75,15 +87,18 @@
|
|||
border-collapse: collapse;
|
||||
font-size: 14px;
|
||||
}
|
||||
.scroll-table{
|
||||
|
||||
.scroll-table {
|
||||
height: calc(100vh - 180px);
|
||||
overflow-y: auto;
|
||||
width:'100%'
|
||||
width: '100%'
|
||||
}
|
||||
|
||||
.table_cur tr {
|
||||
display: flex;
|
||||
line-height: 75rpx;
|
||||
}
|
||||
|
||||
.table_cur th {
|
||||
height: 85rpx;
|
||||
color: #3399ef;
|
||||
|
|
@ -95,7 +110,7 @@
|
|||
white-space: nowrap;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
|
||||
.table_cur td {
|
||||
height: 65rpx;
|
||||
// border-bottom: 1px solid #d8ddeb;
|
||||
|
|
@ -106,5 +121,6 @@
|
|||
white-space: nowrap;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
/*table样式 end*/
|
||||
</style>
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
async getTableData(){
|
||||
try{
|
||||
const {data} = await uni.$http.get(
|
||||
"/gunshiApp/xyt/reservoir/water/detail?stcd=716164061")
|
||||
"/gunshiApp/tsg/reservoir/water/detail?stcd=716164061")
|
||||
if(data.code == 200){
|
||||
this.tableData = {...data.data};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
.zrtx-box{
|
||||
border: 1px solid #c1f2ce;
|
||||
border-radius: 2px;
|
||||
padding:10px 10px 5px 10px;
|
||||
padding:10px 5px 12px 5px;
|
||||
background-color: #ebfbef;
|
||||
margin-bottom: 10px;
|
||||
.table_div {
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
}
|
||||
.table_cur tr {
|
||||
display: flex;
|
||||
line-height: 65rpx;
|
||||
// line-height: 65rpx;
|
||||
}
|
||||
.table_cur th {
|
||||
height: 65rpx;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
async getData(){
|
||||
try{
|
||||
const {data} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/resSafePersonB/list",
|
||||
"/gunshiApp/tsg/resSafePersonB/list",
|
||||
{
|
||||
resCode:"42120250085"
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<view class="project-cotent">
|
||||
|
||||
<view class="project-basic">
|
||||
<!-- <view class="project-basic">
|
||||
<view class="project-loc">
|
||||
<text style="opacity:0.5">工程位置:{{skInfo.resLoc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="project-des" >
|
||||
</view> -->
|
||||
<!-- <view class="project-des" >
|
||||
<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 class="circle-dot"></view>
|
||||
|
|
@ -16,11 +16,22 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="total-des">
|
||||
<view style="opacity:0.5">工程概况:</view>
|
||||
<view>{{skInfo.projOverview}}</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>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -116,7 +127,7 @@ export default {
|
|||
.project-basic{
|
||||
background-color: #ffffff;
|
||||
padding: 5px;
|
||||
margin: 5px 0;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.project-des{
|
||||
display: flex;
|
||||
|
|
@ -145,4 +156,15 @@ export default {
|
|||
background-color: #ffffff;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.sk-location{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.sk-map{
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -5,8 +5,9 @@
|
|||
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
||||
</u-navbar>
|
||||
<u-tabs :list="list1" @click="click" :current="tabs" style="background-color: #fff;margin-top: 60px;"></u-tabs>
|
||||
<Jcxx v-if="tabs == 0"></Jcxx>
|
||||
<BasicInfo v-if="tabs == 1" :skInfo="skInfo"></BasicInfo>
|
||||
<Skjj v-if="tabs == 0" :skInfo="skInfo"></Skjj>
|
||||
<Jcxx v-if="tabs == 1"></Jcxx>
|
||||
<!-- 基础信息 -->
|
||||
<Tzcs v-if="tabs == 2" :skInfo="skInfo"></Tzcs>
|
||||
<Krqx v-if="tabs == 3"></Krqx>
|
||||
<Zrtx v-if="tabs == 4"></Zrtx>
|
||||
|
|
@ -19,7 +20,7 @@
|
|||
import Jcxx from "./jcxx.vue"
|
||||
import Zrtx from "../../skDetail/zrtx/zrtx.vue"
|
||||
import Krqx from "./krqx/index.vue"
|
||||
import BasicInfo from "./basicInfo.vue"
|
||||
import Skjj from "./basicInfo.vue"
|
||||
import Tzcs from "./tzcs.vue"
|
||||
export default {
|
||||
|
||||
|
|
@ -31,7 +32,10 @@
|
|||
etm: ''
|
||||
},
|
||||
|
||||
list1: [{
|
||||
list1: [ {
|
||||
name: '水库简介',
|
||||
},
|
||||
{
|
||||
name: '监测信息',
|
||||
}, {
|
||||
name: '基础信息',
|
||||
|
|
@ -49,7 +53,7 @@
|
|||
Jcxx,
|
||||
Zrtx,
|
||||
Krqx,
|
||||
BasicInfo,
|
||||
Skjj,
|
||||
Tzcs
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -60,7 +64,7 @@
|
|||
this.tabs = item.index;
|
||||
},
|
||||
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');
|
||||
this.skInfo = res.data.data[0];
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,330 +1,358 @@
|
|||
<template>
|
||||
<view class="" style="padding: 5px;">
|
||||
<view class="swiper-content">
|
||||
<text class="num">{{nowNum}}/{{totalNum}}</text>
|
||||
<u-swiper :list="imgList" height='230px' @change="change" imgMode="scaleToFill" keyName="imgPath"></u-swiper>
|
||||
<text class="time">{{imgTime}}</text>
|
||||
<view class="" style="padding: 5px;">
|
||||
<view class="swiper-content" v-if="imgList.length != 0">
|
||||
<text class="num">{{nowNum}}/{{totalNum}}</text>
|
||||
<u-swiper :list="imgList" height='230px' @change="change" imgMode="scaleToFill" keyName="imgPath"></u-swiper>
|
||||
<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 class="update-time">
|
||||
<text>更新时间</text>
|
||||
<text>{{info.tm}}</text>
|
||||
</view>
|
||||
<view class="sk-info">
|
||||
<view class="sk-first-row">
|
||||
<view class="first-item">
|
||||
<text>{{info.rz}}米</text>
|
||||
<text>水位</text>
|
||||
</view>
|
||||
<view class="first-item">
|
||||
<text>{{info.nowCap}}米</text>
|
||||
<text>蓄水量</text>
|
||||
</view>
|
||||
<view class="first-line"></view>
|
||||
<image
|
||||
style="width: 20px; height: 20px;"
|
||||
src="../../../static/images/first.jpg"
|
||||
></image>
|
||||
</view>
|
||||
<view class="first-extra-row">
|
||||
<text>坝顶高程{{info.crestElev}}米</text>
|
||||
<text>汛限水位{{info.flLowLimLev}}米</text>
|
||||
<text>总库容{{info.totCap}}米</text>
|
||||
</view>
|
||||
<view class="sk-second-row">
|
||||
<view class="first-item">
|
||||
<text>{{rainInfo.today}}毫米</text>
|
||||
<text>今日降雨</text>
|
||||
</view>
|
||||
<view class="first-item">
|
||||
<text>{{rainInfo.yesterdayDrp}}毫米</text>
|
||||
<text>昨日降雨</text>
|
||||
</view>
|
||||
<view class="first-line" style="margin-right:17px"></view>
|
||||
<image
|
||||
style="width: 20px; height: 20px;"
|
||||
src="../../../static/images/second.jpg"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rain-box">
|
||||
<view class="rain-title">
|
||||
<view class="line-icon"></view>
|
||||
<view >水雨情过程线</view>
|
||||
</view>
|
||||
<view class="time-select">
|
||||
<view class="time-ranger" >
|
||||
<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 class="update-time">
|
||||
<text>更新时间</text>
|
||||
<text>{{info.tm}}</text>
|
||||
</view>
|
||||
<view class="sk-info">
|
||||
<view class="sk-first-row">
|
||||
<view class="first-item">
|
||||
<text>{{info.rz}}米</text>
|
||||
<text>水位</text>
|
||||
</view>
|
||||
<view class="first-item">
|
||||
<text>{{info.nowCap}}万m³</text>
|
||||
<text>蓄水量</text>
|
||||
</view>
|
||||
<view class="first-line"></view>
|
||||
<image style="width: 20px; height: 20px;" src="../../../static/images/first.jpg"></image>
|
||||
</view>
|
||||
<view class="first-extra-row">
|
||||
<text>坝顶高程{{info.crestElev}}米</text>
|
||||
<text>汛限水位{{info.flLowLimLev}}米</text>
|
||||
<text>总库容{{info.totCap}}万m³</text>
|
||||
</view>
|
||||
<view class="sk-second-row">
|
||||
<view class="first-item">
|
||||
<text>{{rainInfo.today}}毫米</text>
|
||||
<text>今日降雨</text>
|
||||
</view>
|
||||
<view class="first-item">
|
||||
<text>{{rainInfo.yesterdayDrp}}毫米</text>
|
||||
<text>昨日降雨</text>
|
||||
</view>
|
||||
<view class="first-line" style="margin-right:17px"></view>
|
||||
<image style="width: 20px; height: 20px;" src="../../../static/images/second.jpg"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rain-box">
|
||||
<view class="rain-title">
|
||||
<view class="line-icon"></view>
|
||||
<view>水雨情过程线</view>
|
||||
</view>
|
||||
<view class="time-select">
|
||||
<view class="time-ranger">
|
||||
<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>
|
||||
</view>
|
||||
<view class="switch-btn">
|
||||
<u-subsection :list="subsectionList" :current="curNow" mode="subsection" @change="subsectionChange"></u-subsection>
|
||||
</view>
|
||||
<view class="show-content">
|
||||
<view style=" height: 500px; overflow-y: auto; padding:0" v-if="curNow == 0">
|
||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
||||
</view>
|
||||
<JcTable v-if="curNow == 1" :tableData='jcTableData'/>
|
||||
<Tjsj v-if="curNow == 2" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="switch-btn">
|
||||
<u-subsection :list="subsectionList" :current="curNow" mode="subsection" @change="subsectionChange">
|
||||
</u-subsection>
|
||||
</view>
|
||||
<view class="show-content">
|
||||
<view style=" height: 500px; overflow-y: auto; padding:0" v-if="curNow == 0 && jcTableData.length !=0">
|
||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;justify-content: center;background-color: #fff;" v-if="curNow == 0 &&jcTableData.length ==0">
|
||||
<image src="../../../static/empty.png" mode=""></image>
|
||||
</view>
|
||||
<JcTable v-if="curNow == 1" :tableData='jcTableData' />
|
||||
<Tjsj v-if="curNow == 2" />
|
||||
</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>
|
||||
|
||||
<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 Tjsj from "../../skDetail/tjsj/tjsj.vue"
|
||||
import JcTable from "../../skDetail/jcsj/jcsjTable.vue"
|
||||
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 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"
|
||||
import moment from 'moment'
|
||||
import Tjsj from "../../skDetail/tjsj/tjsj.vue"
|
||||
import JcTable from "../../skDetail/jcsj/jcsjTable.vue"
|
||||
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 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 {
|
||||
components:{
|
||||
Tjsj,
|
||||
JcTable
|
||||
components: {
|
||||
Tjsj,
|
||||
JcTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
startTime:stm,
|
||||
endTime:etm,
|
||||
imgList:[],
|
||||
nowNum:1,
|
||||
totalNum:0,
|
||||
imgTime:'2024-08-12 11:00',
|
||||
info:'',
|
||||
rainInfo:{},
|
||||
stm,
|
||||
etm,
|
||||
showTime:false,
|
||||
showTime1:false,
|
||||
subsectionList: ['图', '表', '统计值'],
|
||||
curNow:0,
|
||||
jcTableData:[],
|
||||
chartData: {},
|
||||
}
|
||||
return {
|
||||
startTime: stm,
|
||||
endTime: etm,
|
||||
imgList: [],
|
||||
nowNum: 1,
|
||||
totalNum: 0,
|
||||
imgTime: '2024-08-12 11:00',
|
||||
info: '',
|
||||
rainInfo: {},
|
||||
stm,
|
||||
etm,
|
||||
showTime: false,
|
||||
showTime1: false,
|
||||
subsectionList: ['图', '表', '统计值'],
|
||||
curNow: 0,
|
||||
jcTableData: [],
|
||||
chartData: {},
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取监测图像
|
||||
async getImgList () {
|
||||
try {
|
||||
const {data} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/reservoir/water/real/img",
|
||||
{
|
||||
resCode: "42120250085"
|
||||
})
|
||||
if(data.code == 200){
|
||||
const newArr = data.data.map(item => ({...item,imgPath: url + item.imgPath }))
|
||||
// 获取监测图像
|
||||
async getImgList() {
|
||||
try {
|
||||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
"/gunshiApp/tsg/reservoir/water/real/img", {
|
||||
resCode: "42120250085"
|
||||
})
|
||||
if (data.code == 200) {
|
||||
const newArr = data.data.map(item => ({
|
||||
...item,
|
||||
imgPath: url + item.imgPath
|
||||
}))
|
||||
this.totalNum = newArr.length;
|
||||
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;
|
||||
}
|
||||
} catch (error) {
|
||||
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();
|
||||
}
|
||||
},
|
||||
} 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()
|
||||
},
|
||||
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
|
||||
}
|
||||
// 获取水库水情基本信息
|
||||
async getSkinfo() {
|
||||
try {
|
||||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
"/gunshiApp/tsg/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/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:{
|
||||
jcTableData(newV, oldV){
|
||||
if(this.info){
|
||||
this.chartData = {...drpOption(newV,this.info.afsltdz,this.info.flLowLimLev,this.info.desFloodLev,this.info.calFloodLev)}
|
||||
watch: {
|
||||
jcTableData(newV, oldV) {
|
||||
if (this.info) {
|
||||
this.chartData = {
|
||||
...drpOption(newV, this.info.afsltdz, this.info.flLowLimLev, this.info.desFloodLev, this.info.calFloodLev)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.getImgList();
|
||||
this.getSkinfo();
|
||||
this.getrainInfo();
|
||||
this.getJcsjData();
|
||||
mounted() {
|
||||
this.getImgList();
|
||||
this.getSkinfo();
|
||||
this.getrainInfo();
|
||||
this.getJcsjData();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.swiper-content{
|
||||
position: relative;
|
||||
.num{
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
z-index: 1;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
padding: 0 4px;
|
||||
border-radius: 6px;
|
||||
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;
|
||||
.swiper-content {
|
||||
position: relative;
|
||||
|
||||
.num {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
z-index: 1;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
padding: 0 4px;
|
||||
border-radius: 6px;
|
||||
opacity: .4;
|
||||
font-size: 12px;
|
||||
}
|
||||
.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;
|
||||
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;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.sk-second-row{
|
||||
margin: 5px 0;
|
||||
background-color: #f2f8ff;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.first-extra-row{
|
||||
display: flex;
|
||||
padding: 5px;
|
||||
justify-content: space-between;
|
||||
background-color: #f2fafc;
|
||||
|
||||
.sk-second-row {
|
||||
margin: 5px 0;
|
||||
background-color: #f2f8ff;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.rain-box{
|
||||
padding: 5px 0px;
|
||||
.rain-title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.line-icon{
|
||||
width: 3px;
|
||||
height: 15px;
|
||||
background-color: #0079fe;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.time-ranger{
|
||||
margin-bottom: 10px;
|
||||
.start-time, .end-time{
|
||||
}
|
||||
|
||||
.first-extra-row {
|
||||
display: flex;
|
||||
padding: 5px;
|
||||
justify-content: space-between;
|
||||
background-color: #f2fafc;
|
||||
}
|
||||
|
||||
.rain-box {
|
||||
padding: 5px 0px;
|
||||
|
||||
.rain-title {
|
||||
display: flex;
|
||||
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%;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
.show-content{
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
|
||||
.switch-btn {
|
||||
width: 50%;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.show-content {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -28,7 +28,9 @@ export default {
|
|||
async getKrData(){
|
||||
try {
|
||||
const {data} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/stZvarlB/list")
|
||||
"/gunshiApp/tsg/stZvarlB/list",{
|
||||
stcd:"716164061"
|
||||
})
|
||||
if(data.code == 200){
|
||||
this.tableData = [...data.data];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,119 +1,128 @@
|
|||
<template >
|
||||
<view class="project-des" >
|
||||
<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 class="circle-dot"></view>
|
||||
<view class="label-name">
|
||||
<text style="opacity:0.5">{{item.name}}</text>
|
||||
<text>{{item.value||"-"}}</text>
|
||||
<template>
|
||||
<view class="basic-box">
|
||||
<view class="basic-data-select">
|
||||
<uni-data-select v-model="selectValue" :localdata="range" @change="selectChage" :clear="false"></uni-data-select>
|
||||
</view>
|
||||
<view class="project-des">
|
||||
<view v-for="(item,index) in tableData" :key="index"
|
||||
: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>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
skInfo:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
|
||||
},
|
||||
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]
|
||||
}
|
||||
})
|
||||
}
|
||||
import selectData from "../../staticData"
|
||||
export default {
|
||||
props: {
|
||||
skInfo: {
|
||||
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]
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.project-des{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
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-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
|
||||
.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>
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
shStcd:'',
|
||||
imageList:[],
|
||||
baseUrl:'http://223.75.53.141:9102/test.by-lyf.tmp',
|
||||
showImg:''
|
||||
showImg:'../../static/empty.png'
|
||||
|
||||
}
|
||||
},
|
||||
|
|
@ -87,16 +87,16 @@
|
|||
});
|
||||
},
|
||||
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}
|
||||
|
||||
})
|
||||
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.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=>{
|
||||
if(item.sttp == 'QQ'){
|
||||
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=>{
|
||||
if(item.projType == 1){
|
||||
this.imageList = item.files.map((item,index)=>
|
||||
{item.url = this.baseUrl + item.filePath
|
||||
{
|
||||
item.url = this.baseUrl + item.filePath
|
||||
if(index == 0){
|
||||
|
||||
this.showImg = item.url
|
||||
|
|
@ -134,7 +135,7 @@
|
|||
})
|
||||
},
|
||||
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]
|
||||
})
|
||||
},
|
||||
|
|
@ -167,6 +168,7 @@
|
|||
height: 22px;
|
||||
.item-text{
|
||||
width: 50%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -180,5 +182,8 @@
|
|||
.withd-2{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
background-color: #caf982;
|
||||
margin-right: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/stWaterR/list", {
|
||||
"/gunshiApp/tsg/stWaterR/list", {
|
||||
stcd: this.stcd,
|
||||
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
||||
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
},
|
||||
async getVideoList(){
|
||||
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){
|
||||
this.videoList = data.data
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ export default {
|
|||
async getVideoSrc(id){
|
||||
try{
|
||||
const {data} = await uni.$http.get(
|
||||
`/gunshiApp/xyt/attCctvBase/preview/${id}`)
|
||||
`/gunshiApp/tsg/attCctvBase/preview/${id}`)
|
||||
if(data.code == 200){
|
||||
this.webURL="./static/h5Player/webplayer.html?cameraIndexCode="+id+"&cameraUrl="+data.data
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ export default {
|
|||
speed:30
|
||||
}
|
||||
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)
|
||||
this.timer = setTimeout(() => {
|
||||
this.onOperation1(type)
|
||||
|
|
@ -107,7 +107,7 @@ export default {
|
|||
speed:30
|
||||
}
|
||||
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){
|
||||
uni.$showMsg()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
// },
|
||||
]
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ export default function drpOption (obj) {
|
|||
{
|
||||
type: 'category',
|
||||
data: data.map(o => o.tm),
|
||||
// inverse: true,
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</view>
|
||||
|
||||
|
||||
<view class="jcsj-content">
|
||||
<view class="jcsj-content" v-if="tableData.length != 0">
|
||||
<view class="jcsj-charts" >
|
||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
||||
</view>
|
||||
|
|
@ -39,6 +39,11 @@
|
|||
<JcsjTable :tableData="tableData" />
|
||||
</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
|
||||
:show="showTime"
|
||||
v-model="startTime"
|
||||
|
|
@ -122,7 +127,7 @@
|
|||
const endTime = moment(this.etm).format("YYYY-MM-DD HH:mm:ss");
|
||||
try{
|
||||
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){
|
||||
this.stData = {
|
||||
...this.stData,
|
||||
|
|
@ -138,7 +143,7 @@
|
|||
async getJcsjData(){
|
||||
try{
|
||||
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"),
|
||||
endTime:moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
if (this.info.url) {
|
||||
this.isStartDownload = true
|
||||
//开始下载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 => {
|
||||
//下载进度监听
|
||||
this.hasProgress = true
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@
|
|||
return;
|
||||
}else{
|
||||
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);
|
||||
if(res.data.code == 200){
|
||||
uni.navigateBack()
|
||||
|
|
@ -195,7 +195,7 @@
|
|||
uploadFilePromise(url, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
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,
|
||||
name: 'file',
|
||||
formData: {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
"handleUserId": uni.getStorageSync('value').userId
|
||||
}
|
||||
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
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
uploadFilePromise(url,name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
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,
|
||||
name: 'file',
|
||||
formData: {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default {
|
|||
submitForm(params) {
|
||||
//
|
||||
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){
|
||||
// uni.$u.toast('新增成功')
|
||||
uni.$u.toast('新增成功')
|
||||
|
|
|
|||
|
|
@ -206,8 +206,8 @@
|
|||
return treelist
|
||||
},
|
||||
async getTreeList (){
|
||||
const res = await uni.$http.get('/gunshiApp/xyt/system/dept/list')
|
||||
const resUser = await uni.$http.get('/gunshiApp/xyt/system/user/list?pageNum=1&pageSize=9999')
|
||||
const res = await uni.$http.get('/gunshiApp/tsg/system/dept/list')
|
||||
const resUser = await uni.$http.get('/gunshiApp/tsg/system/user/list?pageNum=1&pageSize=9999')
|
||||
this.deptUserList = resUser.data.rows
|
||||
if (res.data.data?.length > 0 && resUser.data.rows?.length > 0) {
|
||||
// return this.handleTreeList(res.data.data,res.data.rows)
|
||||
|
|
@ -261,7 +261,7 @@
|
|||
console.log(params);
|
||||
const {
|
||||
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');
|
||||
if(data.code==200){
|
||||
uni.$showMsg('提交成功');
|
||||
|
|
@ -370,7 +370,7 @@
|
|||
uploadFilePromise(url, name, index, index1) {
|
||||
return new Promise((resolve, reject) => {
|
||||
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,
|
||||
name: 'file',
|
||||
formData: {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ export default {
|
|||
uploadFilePromise(url,name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
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,
|
||||
name: 'file',
|
||||
formData: {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
if (this.status == 0) {
|
||||
const {
|
||||
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) {
|
||||
this.btnStatus = 1;
|
||||
this.getXjItem(this.id)
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
try {
|
||||
const {
|
||||
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) {
|
||||
this.xjItem = data.data
|
||||
}
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
try {
|
||||
const {
|
||||
data
|
||||
} = await uni.$http.post(`/gunshiApp/xyt/inspectTaskTrack/insert`, {
|
||||
} = await uni.$http.post(`/gunshiApp/tsg/inspectTaskTrack/insert`, {
|
||||
taskId: this.id,
|
||||
lttd: latitude,
|
||||
lgtd: longitude
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
statusList: [0, 1]
|
||||
}
|
||||
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];
|
||||
} catch (error) {
|
||||
uni.$showMsg();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
}
|
||||
},
|
||||
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
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -33,10 +33,27 @@
|
|||
<view class="ylz-table-area">
|
||||
<YlzTable :tableData="ylzData"></YlzTable>
|
||||
</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 v-if="activeOne == 1" style="padding:10px">
|
||||
<Table></Table>
|
||||
</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"
|
||||
|
|
@ -48,6 +65,7 @@
|
|||
import Table from "./tjsjTable.vue"
|
||||
import YlzTable from "./jcTable.vue"
|
||||
import drpOptions from './jcOptions'
|
||||
import projectOptions from './barOptions'
|
||||
const stm = moment().subtract(7, 'days').set({
|
||||
minute: 0,
|
||||
second: 0
|
||||
|
|
@ -56,6 +74,10 @@
|
|||
minute: 0,
|
||||
second: 0
|
||||
}).format("YYYY-MM-DD HH:mm");
|
||||
const projectTime = moment().set({
|
||||
minute: 0,
|
||||
second: 0
|
||||
}).format("YYYY-MM-DD HH:mm")
|
||||
export default {
|
||||
components: {
|
||||
Table,
|
||||
|
|
@ -74,6 +96,9 @@
|
|||
chartData1: {},
|
||||
chartData: {},
|
||||
stnm:'',
|
||||
projectTime,
|
||||
projectData:[],
|
||||
projectBarData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -84,8 +109,8 @@
|
|||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", {
|
||||
stcd: "716164061",
|
||||
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", {
|
||||
stcd: "61610700",
|
||||
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
||||
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
|
|
@ -103,8 +128,8 @@
|
|||
const {
|
||||
data
|
||||
} = await uni.$http.post(
|
||||
"/gunshiApp/xyt/attResBase/rainBasinDivision/queryStStbprpPerHourChart/StcdAndStartTimeAndEndTime", {
|
||||
stcd: "716164061",
|
||||
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHourChart/StcdAndStartTimeAndEndTime", {
|
||||
stcd: "61610700",
|
||||
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
||||
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss")
|
||||
})
|
||||
|
|
@ -132,6 +157,28 @@
|
|||
searchHandle() {
|
||||
this.getrainInfo();
|
||||
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: {
|
||||
|
|
@ -139,7 +186,7 @@
|
|||
this.chartData = {
|
||||
...drpOptions(n)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad(options){
|
||||
this.stnm = options.stnm
|
||||
|
|
@ -147,6 +194,8 @@
|
|||
mounted() {
|
||||
this.getrainInfo();
|
||||
this.getrainChartInfo();
|
||||
this.getPreReportData();
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -173,4 +222,20 @@
|
|||
.ylz-table-area{
|
||||
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>
|
||||
|
|
@ -1,22 +1,20 @@
|
|||
|
||||
import echarts from 'echarts/lib/echarts';
|
||||
export default function DrpOption(echartData) {
|
||||
console.log("echartData",echartData);
|
||||
|
||||
let totalDrp = 0;
|
||||
export default function DrpOption(echartData) {
|
||||
|
||||
let totalDrp = 0;
|
||||
const DRPLEVEL = [10, 20, 50, 100, 250];
|
||||
const maxVal = DRPLEVEL.find(o => o > totalDrp);
|
||||
const xMaxVal = echartData?.actual ? DRPLEVEL.find(o => {
|
||||
let max = Math.max(...echartData?.actual || [])
|
||||
const xMaxVal = echartData ?.actual ? DRPLEVEL.find(o => {
|
||||
let max = Math.max(...echartData ?.actual || [])
|
||||
return o > max
|
||||
}):maxVal
|
||||
}) : maxVal
|
||||
// const xMaxVal = Math.ceil(Math.max(...echartData.actual)) + 2
|
||||
const yMaxVal = echartData?.actual ? DRPLEVEL.find(o => {
|
||||
let max = Math.max(...echartData?.total)
|
||||
return o > max
|
||||
}): maxVal
|
||||
let eopts = {
|
||||
tooltip: {
|
||||
const yMaxVal = echartData ?.actual ? DRPLEVEL.find(o => {
|
||||
let max = Math.max(...echartData ?.total)
|
||||
return o > max
|
||||
}) : maxVal
|
||||
let eopts = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
},
|
||||
grid: {
|
||||
|
|
@ -33,34 +31,31 @@ export default function DrpOption(echartData) {
|
|||
data: ['实测', '累计']
|
||||
},
|
||||
calculable: true,
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: echartData.time,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
format:"jcDataFormat"
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#07a6ff',
|
||||
width: 0.5,
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
data: echartData.time,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
format: "jcDataFormat"
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#07a6ff',
|
||||
width: 0.5,
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
position: 'left',
|
||||
name:"雨量mm",
|
||||
name: "雨量mm",
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -85,7 +80,7 @@ export default function DrpOption(echartData) {
|
|||
{
|
||||
type: 'value',
|
||||
position: 'right',
|
||||
name:"累计mm",
|
||||
name: "累计mm",
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -108,10 +103,9 @@ export default function DrpOption(echartData) {
|
|||
max: yMaxVal
|
||||
}
|
||||
],
|
||||
};
|
||||
let chartData = {
|
||||
series: [
|
||||
{
|
||||
};
|
||||
let chartData = {
|
||||
series: [{
|
||||
name: '实测',
|
||||
type: 'bar',
|
||||
barWidth: '60%',
|
||||
|
|
@ -121,10 +115,18 @@ export default function DrpOption(echartData) {
|
|||
barBorderRadius: [3, 3, 0, 0],
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0, 0, 0, 1,
|
||||
[
|
||||
{ offset: 0, color: '#3876cd' },
|
||||
{ offset: 0.5, color: '#45b4e7' },
|
||||
{ offset: 1, color: '#54ffff' }
|
||||
[{
|
||||
offset: 0,
|
||||
color: '#3876cd'
|
||||
},
|
||||
{
|
||||
offset: 0.5,
|
||||
color: '#45b4e7'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#54ffff'
|
||||
}
|
||||
]
|
||||
),
|
||||
},
|
||||
|
|
@ -133,9 +135,13 @@ export default function DrpOption(echartData) {
|
|||
show: false,
|
||||
},
|
||||
markPoint: {
|
||||
data: [
|
||||
{ type: 'max', name: '最大值', symbol: 'circle', symbolSize: 1, symbolOffset: [0, -12] },
|
||||
]
|
||||
data: [{
|
||||
type: 'max',
|
||||
name: '最大值',
|
||||
symbol: 'circle',
|
||||
symbolSize: 1,
|
||||
symbolOffset: [0, -12]
|
||||
}, ]
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -160,8 +166,7 @@ export default function DrpOption(echartData) {
|
|||
}, {
|
||||
offset: 0.8,
|
||||
color: 'rgba(3, 194, 236, 0)'
|
||||
}
|
||||
], false),
|
||||
}], false),
|
||||
shadowColor: 'rgba(0, 0, 0, 0.1)',
|
||||
shadowBlur: 10
|
||||
}
|
||||
|
|
@ -173,9 +178,9 @@ export default function DrpOption(echartData) {
|
|||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
return {
|
||||
eopts,
|
||||
chartData
|
||||
}
|
||||
};
|
||||
return {
|
||||
eopts,
|
||||
chartData
|
||||
}
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
async getTableData(){
|
||||
try{
|
||||
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){
|
||||
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 |
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
|
|
@ -57,6 +57,9 @@ const cfe = {
|
|||
"xAxisFormat": function (value) {
|
||||
return value.substr('2020--'.length, 11)
|
||||
},
|
||||
"projectFormat":function (value) {
|
||||
return value + 'mm';
|
||||
},
|
||||
"stList": function (val)
|
||||
{
|
||||
let value = val.substr('2020-'.length, 11)
|
||||
|
|
|
|||
Loading…
Reference in New Issue