feat(): 檀树岗综合监视开发

master
李神峰 2025-04-15 17:48:27 +08:00
parent cb88decb64
commit 670f8f7a33
26 changed files with 1190 additions and 729 deletions

View File

@ -26,13 +26,14 @@ $http.afterRequest = function (options) {
}
// uni.hideLoading()
}
uni.$showMsg = function (title = '数据请求失败了', duration = 1500) {
uni.$showMsg = function (title = '', duration = 1500) {
return uni.showToast({
title,
duration,
icon: 'none'
})
}
uni.$stcd = '10196'
Vue.config.productionTip = false
App.mpType = 'app'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -70,6 +70,14 @@
minute: 0,
second: 0
}).format("YYYY-MM-DD HH:mm");
const typeName = {
'ZB0+130': '1',
'ZB0+132': '2',
'ZB0+250': '3',
'ZB0+252': '4',
'ZB0+370': '5',
'ZB0+372': '6',
}
export default {
data() {
@ -83,6 +91,7 @@
array: [],
profileCode: '',
dbType: '',
type1:'',
trData: [],
dataSources: [],
chartData: {
@ -143,9 +152,10 @@
handler(newVal, oldVal) {
if (newVal) {
let name = this.array.find(item => item.profileCode == newVal).profileName;
this.dbType = name == "大坝B0+060" ? "1" :
name == "大坝B0+090" ? "2" :
name == "大坝B0+120" ? "2" : '1'
this.dbType =(name == "ZB0+130" || name == "ZB0+132") ? "1" :
(name == "ZB0+250" || name == "ZB0+252") ? "2" :
(name == "ZB0+370" || name == "ZB0+372") ? "3" : '';
this.type1 = typeName[name];
this.getDmTree();
}
},
@ -163,7 +173,7 @@
handler(newVal, oldVal) {
if (newVal) {
this.chartData = {
...drpOption(newVal[0], this.dbType)
...drpOption(newVal[0], this.dbType,this.type1)
}
}
},
@ -187,7 +197,7 @@
console.log("data", data[index % data.length]);
this.chartData = {
...drpOption(data[index % data.length], this.dbType)
...drpOption(data[index % data.length], this.dbType,this.type1)
}
index++;
}, 1000)
@ -240,14 +250,22 @@
},
//
async getMonthData() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const {
data
} = await uni.$http.post(
`/gunshiApp/tsg/attDamProfile/list`, )
if (data.code == 200) {
this.array = data.data
this.profileCode = data.data[0].profileCode;
uni.hideLoading();
const filterData = data.data.filter(item => item?.profileName?.split('+')[0] == 'ZB0')
console.log("filterData",filterData);
this.array = filterData
this.profileCode = filterData[0].profileCode;
}
} catch (e) {
uni.$showMsg();
@ -256,6 +274,10 @@
//
async getTableData() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const {
data
@ -269,6 +291,7 @@
}
)
if (data.code == 200) {
uni.hideLoading();
let newArr = [];
let newData = data.data.map((s, i) => {
newArr.push(s.list.map(c => ({

View File

@ -75,6 +75,7 @@
flex: 1;
padding-top: 0px;
overflow-x: scroll;
overflow-y: auto;
}
/*table样式*/
.table_cur {

View File

@ -1,75 +1,191 @@
import { imageUrl060,imageUrl090,rule } from './dataUrl'
import imageUrl130 from './dataUrl1/zb130';
import imageUrl250 from './dataUrl1/zb250';
import imageUrl370 from './dataUrl1/zb370';
export default function jrxOptions(data = {}, type = "1") {
const yMin = type == "1" ? 70 : type == "2" ? 70 : 70;
const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
const type1 = ["SY05", "SY06", "SY07", "SY08"]
const type2 = ["SY09","SY10","SY11","SY12"]
const alltype = type == "1" ? type1 : type == "2" ? type2 : type2;
// 字体颜色
export default function jrxOptions(data = {}, type = "1",typeName='1') {
// const yMin = type == "1" ? 70 : type == "2" ? 70 : 70;
// const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
// const type1 = ["SY05", "SY06", "SY07", "SY08"]
// const type2 = ["SY09","SY10","SY11","SY12"]
// const alltype = type == "1" ? type1 : type == "2" ? type2 : type2;
// // 字体颜色
// const textColor = '#666'
// const imageUrl = type == "1" ? imageUrl060:
// type == "2" ? imageUrl090 : imageUrl090;
// const xValue = type == "1" ? (((data?.rz - 99) + 1.1 * 13) / 1.1):
// type == "2" ? (((data?.rz - 99) + 1 * 14) / 1) : (((data?.rz - 99) + 1 * 14) / 1)
// const rz = data?.rz ?
// [[xValue, data?.rz], [0, data?.rz], ] :
// []
// const rz1 = data?.rz ?
// type == "1" ?
// [[0, 99], [13, 99], [xValue, data?.rz]]:
// type == "2" ?
// [[0, 99], [14, 99], [xValue, data?.rz]]
// : [[0, 99], [14, 99], [xValue, data?.rz]]
// :
// []
// const gz1 = data[alltype[0]] ?
// type == "1" ? [[51.6, 85], [51.6, data[alltype[0]]]] :
// type == "2" ? [[47.5, 85], [47.5, data[alltype[0]]]] :
// [[47.5, 158], [85, data[alltype[0]]]]
// : [];
// const gz2 = data[alltype[1]] ?
// type == "1" ? [[53.6, 85], [53.6, data[alltype[1]]]] :
// type == "2" ? [[49.5, 85], [49.5, data[alltype[1]]]] :
// [[53.6, 158], [53.6, data[alltype[1]]]] :
// [];
// const gz3 = data[alltype[2]] ?
// type == "1" ? [[72.5, 90], [72.5, data[alltype[2]]]] :
// type == "2" ? [[66.5, 90], [66.5, data[alltype[2]]]] :
// [[73, 161], [73, data[alltype[2]]]] : [];
// const gz4 = data[alltype[3]] ?
// type == "1" ? [[84.5, 96], [84.5, data[alltype[3]]]] :
// type == "2" ? [[77, 96], [77, data[alltype[3]]]] :
// [[85, 166], [85, data[alltype[3]]]] : [];
// const line = data?.rz ?
// type == "1" ?
// [
// [xValue, data?.rz],
// [51.6, data[alltype[0]]],
// [53.6, data[alltype[1]]],
// [72.5, data[alltype[2]]],
// [84.5, data[alltype[3]]]
// ] :
// type == "2" ?
// [
// [xValue, data?.rz],
// [47.5, data[alltype[0]]],
// [49.5, data[alltype[1]]],
// [66.5, data[alltype[2]]],
// [77, data[alltype[3]]]
// ] :
// [
// [xValue, data?.rz],
// [51.6, data[alltype[0]]],
// [53.6, data[alltype[1]]],
// [73, data[alltype[2]]],
// [85, data[alltype[3]]]
// ]
// : []
const yMin = type == "3" ? 70 : type == "2" ? 67 :
type == '1' ? 58 : 70;
const yMax = type == "3" ? 129 : type == "2" ? 117
: type == "1" ? 118 : 150;
const type1 = ["SY01", "SY04", "SY07", "SY16"];
const type2 = ["SY10", "SY13"];
const type3 = ["SY02", "SY05", "SY08", "SY17"];
const type4 = ["SY11", "SY14"];
const type5 = ["SY03", "SY06", "SY09"];
const type6 = ["SY12", "SY15"];
const alltype = typeName == "1" ? type1 :
typeName == "2" ? type2 :
typeName == "3" ? type3 :
typeName == "4" ? type4 :
typeName == "5" ? type5 :
typeName == "6" ? type6 :[]
;
// 字体颜色
const textColor = '#666'
const imageUrl = type == "1" ? imageUrl060:
type == "2" ? imageUrl090 : imageUrl090;
const xValue = type == "1" ? (((data?.rz - 99) + 1.1 * 13) / 1.1):
type == "2" ? (((data?.rz - 99) + 1 * 14) / 1) : (((data?.rz - 99) + 1 * 14) / 1)
// const imageUrl370 = `${process.env.PUBLIC_URL}/assets/images/zb370.png `
// const imageUrl250 = `${process.env.PUBLIC_URL}/assets/images/zb250.png `
// const imageUrl130 = `${process.env.PUBLIC_URL}/assets/images/zb130.png `
const imageUrl = type == "1" ? imageUrl130 :
type == "2" ? imageUrl250 :
type == "3" ? imageUrl370 : imageUrl370
;
// const rule = `${process.env.PUBLIC_URL}/assets/images/ruler.png `
// rz 是最上面那条线 rz1是那条贴近坝面的线 xValue求解的是最上面那条线的末尾横坐标
const xValue = type == "3" ? (((data?.rz - 86) + 0.6 * 5) / 0.6) :
type == "2" ? (((data?.rz - 87) + 0.63 * 7) / 0.63) :
type == "1" ? (((data?.rz - 87) + 0.67 * 10) / 0.67) :
(((data?.rz - 99) + 1 * 14) / 1)
const rz = data?.rz ?
[[xValue, data?.rz], [0, data?.rz], ] :
[[xValue, data?.rz], [0, data?.rz],] :
[]
const rz1 = data?.rz ?
type == "1" ?
[[0, 99], [13, 99], [xValue, data?.rz]]:
type == "3" ?
[[0, 86], [4, 86], [xValue, data?.rz]] :
type == "2" ?
[[0, 99], [14, 99], [xValue, data?.rz]]
: [[0, 99], [14, 99], [xValue, data?.rz]]
:
[[0, 87], [6, 87], [xValue, data?.rz]]
:
type == "1" ?
[[0, 87], [8, 87], [xValue, data?.rz]]
:
[[0, 99], [14, 99], [xValue, data?.rz]]
:
[]
// gz1、gz2、gz3、gz4分别为渗压管
const gz1 = data[alltype[0]] ?
type == "1" ? [[51.6, 85], [51.6, data[alltype[0]]]] :
type == "2" ? [[47.5, 85], [47.5, data[alltype[0]]]] :
type == "3" ? [[47, 101], [47, data[alltype[0]]]] :
type == "2" ? [[45.5, 98], [45.5, data[alltype[0]]]] :
type == "1" ? [[44, 83], [44, data[alltype[0]]]] :
[[47.5, 158], [85, data[alltype[0]]]]
: [];
const gz2 = data[alltype[1]] ?
type == "1" ? [[53.6, 85], [53.6, data[alltype[1]]]] :
type == "2" ? [[49.5, 85], [49.5, data[alltype[1]]]] :
[[53.6, 158], [53.6, data[alltype[1]]]] :
type == "3" ? [[51, 101], [51, data[alltype[1]]]] :
type == "2" ? [[50, 98], [50, data[alltype[1]]]] :
type == "1" ? [[51.5, 82], [51.5, data[alltype[1]]]] :
[[53.6, 158], [53.6, data[alltype[1]]]] :
[];
const gz3 = data[alltype[2]] ?
type == "1" ? [[72.5, 90], [72.5, data[alltype[2]]]] :
type == "2" ? [[66.5, 90], [66.5, data[alltype[2]]]] :
type == "3" ? [[58.5, 95], [58.5, data[alltype[2]]]] :
type == "2" ? [[58, 92], [58, data[alltype[2]]]] :
type == "1" ? [[58, 81], [58, data[alltype[2]]]] :
[[73, 161], [73, data[alltype[2]]]] : [];
const gz4 = data[alltype[3]] ?
type == "1" ? [[84.5, 96], [84.5, data[alltype[3]]]] :
type == "2" ? [[77, 96], [77, data[alltype[3]]]] :
type == "3" ? [] :
type == "2" ? [[77, 82], [77, data[alltype[3]]]] :
type == "1" ? [[79, 78], [79, data[alltype[3]]]] :
[[85, 166], [85, data[alltype[3]]]] : [];
// 将渗压管连起来的线
const line = data?.rz ?
type == "1" ?
[
[xValue, data?.rz],
[51.6, data[alltype[0]]],
[53.6, data[alltype[1]]],
[72.5, data[alltype[2]]],
[84.5, data[alltype[3]]]
type == "3" ?
[
[xValue, data?.rz],
[47, data[alltype[0]]],
[51, data[alltype[1]]],
[58.5, data[alltype[2]]],
] :
type == "2" ?
[
[xValue, data?.rz],
[47.5, data[alltype[0]]],
[49.5, data[alltype[1]]],
[66.5, data[alltype[2]]],
[77, data[alltype[3]]]
[
[xValue, data?.rz],
[45.5, data[alltype[0]]],
[50, data[alltype[1]]],
[58, data[alltype[2]]],
[77, data[alltype[3]]]
] :
type == "1"?
[
[xValue, data?.rz],
[44, data[alltype[0]]],
[51.5, data[alltype[1]]],
[58, data[alltype[2]]],
[79, data[alltype[3]]]
]:
[
[xValue, data?.rz],
[51.6, data[alltype[0]]],
[53.6, data[alltype[1]]],
[73, data[alltype[2]]],
[85, data[alltype[3]]]
]
: []
]
: []
let eopts = {
toolbox: {
show: true,

View File

@ -29,7 +29,8 @@
<div class="navIcon">
<image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image>
<div class="readStatus" v-show="
(warnStatus && item.key == 2) || (xcStatus && item.key == 5)
(warnStatus && item.key == 2) ||
(handleStatus && item.key ==6) ||(xcStatus && item.key == 5)
"></div>
</div>
<div class="navTxt">{{ item.value }}</div>
@ -79,11 +80,13 @@
ylzList: [],
swzList:[],
warnStatus: false, //
handleStatus: false, //
}
},
onPullDownRefresh() {
this.getYjData();
this.getXcrwData();
this.getHandleData();
uni.$showMsg("刷新成功");
setTimeout(function () {
uni.stopPullDownRefresh();
@ -122,6 +125,12 @@
icon: '../../static/tabs/xcrw.png',
url: '/pages/xcrw/index'
},
{
value: '问题处理',
key: 6,
icon: '../../static/tabs/wtcl.png',
url: '/pages/wtcl/index'
}
]
}
},
@ -144,7 +153,7 @@
})
},
getSwList(){
uni.$http.post('/gunshiApp/tsg/reservoir/water/list').then(res=>{
uni.$http.post('/gunshiApp/tsg/reservoir/water/listV2',{sources:['SW','SK']}).then(res=>{
this.swzList=res.data.data
})
},
@ -173,6 +182,30 @@
})
this.setInsert(menu2)
},
//
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/tsg/inspect/detail/page", params)
if (res.data.data.records.length > 0) {
this.handleStatus = true
}
} catch (error) {
uni.$showMsg();
}
},
//
async getYjData() {
const params = {
@ -230,7 +263,7 @@
timer = setInterval(function () {
that.getList();
}, 10000);
this.getHandleData();
this.setInsert()
this.getYjData();
this.getSwList()

View File

@ -10,8 +10,9 @@
<ZwyTable :tableData="zwyData" v-else-if="name == ''"></ZwyTable>
<ZwyTable :tableData="zwyData" v-else-if="name == ''"></ZwyTable>
<ZsyTable :tableData="zsyData" v-else-if="name == ''"></ZsyTable>
<ZsyTable :tableData="zsyData" v-else-if="name == ''"></ZsyTable>
<ZwyTable :tableData="zwyData" v-else-if="name == ''"></ZwyTable>
<ZsyTable :tableData="sdData" v-else-if="name == ''"></ZsyTable>
<ZsyTable :tableData="fbData" v-else-if="name == ''"></ZsyTable>
<ZwyTable :tableData="zwyData" v-else-if="name == ''"></ZwyTable>
</view>
</view>
</template>
@ -30,6 +31,8 @@ export default {
slData:[], //
zwyData:[],//
zsyData:[],//
sdData:[],//
fbData:[],//
name:'',
}
},
@ -58,7 +61,13 @@ export default {
try {
const {data} = await uni.$http.get('/gunshiApp/tsg/osmoticPressR/list/value?type=1')
if(data.code == 200){
this.zsyData = data.data;
const zb = data.data.filter(item => item?.profileName?.split('+')[0] == 'ZB0')
const fb = data.data.filter(item => item?.profileName?.split('+')[0] == 'FB0')
const sd = data.data.filter(item => item?.profileName?.split('+')[0] == 'SD0')
this.zsyData = zb;
this.fbData = fb;
this.sdData = sd;
}
} catch (error) {
uni.$showMsg();

View File

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

View File

@ -20,10 +20,10 @@
<!-- style="max-height: 500px; overflow-y: auto" -->
<view >
<tr>
<td style="width: 50px">{{info.personName}}</td>
<td style="width: 130px;">{{info.orgName}}</td>
<td style="width: 80px">{{info.position}}</td>
<td style="width: 100px;color: #62bafa;" @click="show = true">{{info.tel}}</td>
<td style="width: 50px">{{info.name}}</td>
<td style="width: 130px;">{{info.unit}}</td>
<td style="width: 80px">{{info.duty}}</td>
<td style="width: 100px;color: #62bafa;" @click="show = true">{{info.contactInfo}}</td>
</tr>
</view>

View File

@ -1,59 +1,76 @@
<template>
<view>
<view class="scroll-table" v-if="list.length != 0">
<view v-for="(item,index) in list" :key="index" style="margin:5px 20px 5px 10px">
<view
v-for="(item, index) in list"
:key="index"
style="margin: 5px 20px 5px 10px"
>
<Card :info="item" />
</view>
<view style="height:50px"></view>
<view style="height: 50px"></view>
</view>
<view
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
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>
</view>
</template>
<script>
import Card from "./card.vue"
export default {
components: {
Card
},
data() {
return {
list: []
import Card from "./card.vue";
export default {
components: {
Card,
},
data() {
return {
list: [],
};
},
methods: {
async getData() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const { data } = await uni.$http.post("/gunshiApp/tsg/resPerson/page", {
pageSo: {
pageSize: 999,
pageNumber: 1,
},
});
if (data.code == 200) {
uni.hideLoading();
this.list = [...data.data.records];
}
} catch (e) {
uni.$showMsg();
}
},
methods: {
async getData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/resSafePersonB/list", {
resCode: "42120250085"
})
if (data.code == 200) {
this.list = [...data.data];
}
} catch (e) {
uni.$showMsg();
}
},
},
mounted() {
this.getData()
}
}
},
mounted() {
this.getData();
},
};
</script>
<style lang="scss" scoped>
.scroll-table {
height: calc(100vh - 100px);
overflow-y: auto;
width: 100%;
padding: 10px 5px;
}
.scroll-table {
height: calc(100vh - 100px);
overflow-y: auto;
width: 100%;
padding: 10px 5px;
}
</style>

View File

@ -152,7 +152,7 @@
data
} = await uni.$http.post(
"/gunshiApp/tsg/reservoir/water/real/img", {
resCode: "42120250085"
resCode: "42112230001"
})
if (data.code == 200) {
const newArr = data.data.map(item => ({
@ -175,9 +175,10 @@
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/reservoir/water/list")
"/gunshiApp/tsg/reservoir/water/listV2",{sources:['SW','SK']})
if (data.code == 200) {
this.info = data.data[0]
const filterObj = data.data.filter(item => item.stcd == '10196')
this.info = filterObj[0]
}
} catch (error) {
uni.$showMsg();
@ -189,7 +190,7 @@
const {
data
} = await uni.$http.get(
"/gunshiApp/tsg/reservoir/water/detail?stcd=716164061")
`/gunshiApp/tsg/reservoir/water/detail?stcd=${uni.$stcd}`)
if (data.code == 200) {
this.rainInfo = data.data;
}
@ -200,16 +201,21 @@
//
async getJcsjData() {
uni.showLoading({
title: '加载中...',
mask: true
})
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/reservoir/water/monitor/data", {
stcd: "716164061",
stcd: uni.$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) {
uni.hideLoading()
this.jcTableData = [...data.data];
}
} catch (e) {

View File

@ -1,68 +1,77 @@
<template>
<view>
<view v-if="tableData.length != 0">
<view style="height: 250px; ">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
<view style="margin-top: 20px;">
<Table :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>
<view>
<view v-if="tableData.length != 0">
<view style="height: 250px">
<qiun-data-charts
:chartData="chartData.chartData"
:echartsApp="true"
:eopts="chartData.eopts"
/>
</view>
<view style="margin-top: 20px">
<Table :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>
</view>
</template>
<script>
import drpOptions from "./chartOptions.js"
import Table from "./jcsjTable.vue"
export default {
components: {
Table
},
data() {
return {
show: false,
chartData: {},
tableData: []
}
},
methods: {
async getKrData() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/stZvarlB/list", {
stcd: "716164061"
})
if (data.code == 200) {
this.tableData = [...data.data];
}
} catch (error) {
uni.$showMsg();
}
}
},
watch: {
tableData(n, o) {
if (n.length > 0) {
this.chartData = {
...drpOptions(n)
}
this.show = true
}
}
},
mounted() {
this.getKrData()
},
}
import drpOptions from "./chartOptions.js";
import Table from "./jcsjTable.vue";
export default {
components: {
Table,
},
data() {
return {
show: false,
chartData: {},
tableData: [],
};
},
methods: {
async getKrData() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const { data } = await uni.$http.post("/gunshiApp/tsg/stZvarlB/list");
if (data.code == 200) {
this.tableData = [...data.data];
}
} catch (error) {
uni.$showMsg();
}
},
},
watch: {
tableData(n, o) {
if (n.length > 0) {
uni.hideLoading();
this.chartData = {
...drpOptions(n),
};
this.show = true;
}
},
},
mounted() {
this.getKrData();
},
};
</script>
<style lang="scss">
</style>

View File

@ -22,12 +22,12 @@
</view>
<view class="bottom">
<view class="bottomItem">
<view class="withd-2" @click="toWaterDetail('生活供水',shStcd)">
<text>生活供水m³/s</text>:
<view class="withd-2" @click="toWaterDetail('灌溉供水',shStcd)">
<text>灌溉供水m³/s</text>:
<text>{{shgs}}</text>
</view>
<view class="withd-2" @click="toWaterDetail('生态供水',stStcd)">
<text>生态供水m³/s</text>:
<view class="withd-2" @click="toWaterDetail('水厂取水',stStcd)">
<text>水厂取水m³/s</text>:
<text>{{stgs}}</text>
</view>
</view>
@ -86,14 +86,13 @@
});
},
getDrp(){
uni.$http.get('/gunshiApp/tsg/reservoir/water/detail?stcd=716164061&_=1731028927554').then(res=>{
uni.$http.get(`/gunshiApp/tsg/reservoir/water/detail?stcd=${uni.$stcd}&_=1731028927554`).then(res=>{
this.dataform={...this.dataform,...res.data.data}
})
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/tsg/reservoir/water/listV2',{sources:['SW','SK']}).then(res=>{
const filterObj = res.data.data.filter(item => item.stcd == uni.$stcd)
this.dataform={...this.dataform,...filterObj[0]}
this.tm = filterObj[0].tm
})
uni.$http.post('/gunshiApp/tsg/stWaterRReal/list').then(res=>{
res.data.data.forEach(item=>{
@ -107,7 +106,7 @@
}
})
})
uni.$http.post('/gunshiApp/tsg/resProjectImg/list',{resCode:42120250085}).then(res=>{
uni.$http.post('/gunshiApp/tsg/resProjectImg/list',{resCode:"42112230001"}).then(res=>{
res.data.data.forEach(item=>{
if(item.projType == 1){
this.imageList = item.files.map((item,index)=>

View File

@ -1,138 +1,180 @@
<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:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 10%;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 :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: 10%; color: #3399ef"
>{{ stm }}</text
>
</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 class="end-time">
<text>结束时间</text>
<text
@click="showTime1 = true"
style="margin: 0 10%; 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 {
numberFormat
} from '../../utils/tool'
import drpOptions from './jcOptions'
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: '',
stcd: '',
startTime: stm,
endTime: etm,
stm,
etm,
showTime: false,
showTime1: false,
tableData: [],
chartData: {}
}
},
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/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"),
isAsc: false,
orderField: "tm"
})
import moment from "moment";
import Table from "./jcTable.vue";
import { numberFormat } from "../../utils/tool";
import drpOptions from "./jcOptions";
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: "",
stcd: "",
startTime: stm,
endTime: etm,
stm,
etm,
showTime: false,
showTime1: false,
tableData: [],
chartData: {},
};
},
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() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const { data } = await uni.$http.post("/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"),
isAsc: false,
orderField: "tm",
});
if (data.code == 200) {
this.tableData = [...data.data]
}
} catch (error) {
uni.$showMsg();
}
},
searchHandle() {
this.geTableData()
}
},
watch: {
tableData(n, o) {
let num = 0;
if (n.length > 0) {
n.forEach(s => {
num += Number(s.v)
})
this.chartData = {
...drpOptions(n, numberFormat(num))
}
}
if (data.code == 200) {
uni.hideLoading();
}
},
mounted() {
this.geTableData()
},
onLoad(options) {
this.stcd = options.stcd;
this.name = options.name;
this.tableData = [...data.data];
}
}
} catch (error) {
uni.$showMsg();
}
},
searchHandle() {
this.geTableData();
},
},
watch: {
tableData(n, o) {
let num = 0;
if (n.length > 0) {
n.forEach((s) => {
num += Number(s.v);
});
this.chartData = {
...drpOptions(n, numberFormat(num)),
};
}
},
},
mounted() {
this.geTableData();
},
onLoad(options) {
this.stcd = options.stcd;
this.name = options.name;
},
};
</script>
<style lang="scss" scoped>
.water-chart-area {
width: 100%;
height: 250px;
}
.water-table-area{
margin-top: 10px;
}
.water-chart-area {
width: 100%;
height: 250px;
}
.water-table-area {
margin-top: 10px;
}
</style>

View File

@ -1,140 +1,181 @@
<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:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 10%;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 :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: 10%; color: #3399ef"
>{{ stm }}</text
>
</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 class="end-time">
<text>结束时间</text>
<text
@click="showTime1 = true"
style="margin: 0 10%; 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"),
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() {
uni.showLoading({
title: "加载中...",
mask: true,
});
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;
if (data.code == 200) {
uni.hideLoading();
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-chart-area {
width: 100%;
height: 270px;
}
.water-table-area {
margin-top: 10px;
}
.water-table-area {
margin-top: 10px;
}
</style>

View File

@ -99,6 +99,10 @@
this.getList()
},
getList() {
uni.showLoading({
title: "加载中...",
mask: true,
});
console.log(uni.getStorageSync('value'));
let params = {
"pageSo": {
@ -110,10 +114,11 @@
end:this.etm?moment(this.etm).format('YYYY-MM-DD 23:59:59'):''
},
"isHandle": 0,
"handleUserId": uni.getStorageSync('value').userId
"inspectUserId": uni.getStorageSync('value').userId
}
console.log(params,'dsd');
uni.$http.post('/gunshiApp/tsg/inspect/detail/page', params).then(res => {
uni.hideLoading();
this.list=res.data.data.records
})
},

View File

@ -156,6 +156,7 @@
lttd: latitude,
lgtd: longitude
})
console.log("data",data);
if (data.code == 200) {
console.log('Location sent successfully')
}

View File

@ -61,7 +61,7 @@
<script>
import moment from 'moment'
const stm = moment().subtract(7, 'months').add(1, 'hour').set({
const stm = moment().subtract(1, 'years').add(1, 'hour').set({
minute: 0,
second: 0
}).format("YYYY-MM-DD");
@ -77,10 +77,10 @@
1: '继续任务',
2: '已完成'
},
startTime: stm,
endTime: etm,
stm,
etm,
startTime: '',
endTime: '',
stm:'请选择开始时间',
etm:'请选择结束时间',
showTime: false,
showTime1: false,
list: []
@ -97,26 +97,33 @@
handleStartTime(e) {
let time = moment(e.value).format("YYYY-MM-DD")
this.stm = time
this.startTime =time
this.showTime = false
},
handleEndTime(e) {
let time = moment(e.value).format("YYYY-MM-DD")
this.etm = time;
this.endTime = time
this.showTime1 = false
},
async getData() {
uni.showLoading({
title: "加载中...",
mask: true,
});
const userId = uni.getStorageSync('value')?.userId
const params = {
dateRangeSo: {
start: moment(this.stm).format("YYYY-MM-DD 00:00:00"),
end: moment(this.etm).format("YYYY-MM-DD 23:59:59"),
start: this.startTime ?moment(this.startTime).format("YYYY-MM-DD 00:00:00"):"",
end: this.endTime ? moment(this.endTime).format("YYYY-MM-DD 23:59:59"):'',
},
inspectUserId: userId,
statusList: [0, 1]
}
try {
const res = await uni.$http.post("/gunshiApp/tsg/inspect/task/list", params)
uni.hideLoading();
this.list = [...res.data.data];
} catch (error) {
uni.$showMsg();

View File

@ -43,12 +43,18 @@
mapType:{
aiWarnCount:'AI告警',
rzWarn:"水位告警",
qxWarn:'气象告警',
// qxWarn:'',
pressWarn:'渗流告警',
flowWarn:'渗压告警',
shiftWarn:'位移告警'
},
list: {rzWarn:"正常(-4.031)",flowWarn:[],pressWarn:[],qxWarn:[],shiftWarn:[],aiWarnCount: 0,}
list: {
rzWarn:"正常(-4.031)",
flowWarn:[],
pressWarn:[],
// qxWarn:[],
shiftWarn:[],
aiWarnCount: 0,}
};
},
onLoad() {
@ -106,6 +112,7 @@
},
getList(){
uni.$http.post('/gunshiApp/tsg/stQxWarnR/home/warn',this.model).then(res=>{
delete res.data.data.qxWarn;
this.list = res.data.data
})
},
@ -117,7 +124,8 @@
.itemYj{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
// justify-content: space-between;
// column-gap: 8px;
padding: 10px;
.itemYjCont{
border-width: 0px;
@ -135,6 +143,7 @@
align-items: center;
justify-content: center;
margin-bottom: 10px;
margin-right: 1px;
.item{
text-align: center;
}

View File

@ -1,274 +1,346 @@
<template>
<view :style="{height:'100vh',overflow:'auto',backgroundColor:'#fff'}">
<u-navbar :title="stnm" :autoBack="true" :titleStyle="{
fontSize:'18px'
}" :height='40' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar>
<view class="tab-bar" style="margin-top:70px">
<view class="jcsj" @click="activeOne = 0" :class="{'active':activeOne == 0}">
监测数据
</view>
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}">
统计数据
</view>
</view>
<view style="padding:10px" v-if="activeOne == 0">
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
<view class="search-btn" @click="searchHandle">
搜索
</view>
</view>
</view>
<view class="ylz-chart-area">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
<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">
<view class="real-sw">
<text class="sw-name">1h</text>
<text style="font-size:22px;margin-right:5px;">{{projectData}}</text>
<text>mm</text>
</view>
<!-- <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"
@cancel="showTime1=false"></u-datetime-picker>
<view :style="{ height: '100vh', overflow: 'auto', backgroundColor: '#fff' }">
<u-navbar
:title="stnm"
:autoBack="true"
:titleStyle="{
fontSize: '18px',
}"
:height="40"
:safeAreaInsetTop="true"
leftIconSize="20"
leftIconColor="rgb(153, 153, 153)"
>
</u-navbar>
<view class="tab-bar" style="margin-top: 70px">
<view
class="jcsj"
@click="activeOne = 0"
:class="{ active: activeOne == 0 }"
>
监测数据
</view>
<view
class="tjsj"
@click="activeOne = 1"
:class="{ active: activeOne == 1 }"
>
统计数据
</view>
</view>
<view style="padding: 10px" v-if="activeOne == 0">
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text
@click="showTime = true"
style="margin-left: 10%; color: #3399ef"
>{{ stm }}</text
>
</view>
<view class="end-time">
<text>结束时间</text>
<text
@click="showTime1 = true"
style="margin: 0 10%; color: #3399ef"
>{{ etm }}</text
>
<view class="search-btn" @click="searchHandle"> </view>
</view>
</view>
<view class="ylz-chart-area">
<qiun-data-charts
:chartData="chartData.chartData"
:echartsApp="true"
:eopts="chartData.eopts"
/>
</view>
<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">
<view class="real-sw">
<text class="sw-name">1h</text>
<text style="font-size: 22px; margin-right: 5px">{{
projectData
}}</text>
<text>mm</text>
</view>
<!-- <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 :tableData="totalTableData"></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"
@cancel="showTime1 = false"
></u-datetime-picker>
</view>
</template>
<script>
import moment from 'moment';
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
}).format("YYYY-MM-DD HH:mm");
const etm = moment().set({
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,
YlzTable
},
data() {
return {
startTime: stm,
endTime: etm,
stm,
etm,
showTime: false,
showTime1: false,
activeOne: 0,
ylzData: [],
chartData1: {},
chartData: {},
stnm: '',
stcd:'',
projectTime,
projectData: '',
projectBarData: {}
}
},
methods: {
//
async getrainInfo() {
try {
const {
data
} = await uni.$http.post(
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", {
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")
})
if (data.code == 200) {
this.ylzData = data.data;
}
} catch (error) {
uni.$showMsg();
}
},
//
async getrainChartInfo() {
try {
const {
data
} = await uni.$http.post(
"/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")
})
if (data.code == 200) {
this.chartData1 = {
...data.data
}
}
} catch (error) {
uni.$showMsg();
}
},
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
},
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')
})
if (data.code == 200) {
// this.projectBarData = {
// ...projectOptions(data.data)
// }
this.projectData = data.data.find(item => item.stcd == this.stcd).h2;
}
} catch (error) {
uni.$showMsg();
}
}
},
watch: {
chartData1(n, o) {
this.chartData = {
...drpOptions(n)
}
},
},
onLoad(options) {
this.stnm = options.stnm
this.stcd = options.stcd
},
mounted() {
this.getrainInfo();
this.getrainChartInfo();
this.getPreReportData();
import moment from "moment";
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,
})
.format("YYYY-MM-DD HH:mm");
const etm = moment()
.set({
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,
YlzTable,
},
data() {
return {
startTime: stm,
endTime: etm,
stm,
etm,
showTime: false,
showTime1: false,
activeOne: 0,
ylzData: [],
chartData1: {},
chartData: {},
stnm: "",
stcd: "",
projectTime,
projectData: "",
projectBarData: {},
totalTableData: {},
};
},
methods: {
//
async getrainInfo() {
uni.showLoading({
title: "加载中...",
mask: true,
});
try {
const { data } = await uni.$http.post(
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime",
{
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"),
}
);
if (data.code == 200) {
uni.hideLoading();
this.ylzData = data.data;
}
}
} catch (error) {
uni.$showMsg();
}
},
//
async getrainChartInfo() {
try {
const { data } = await uni.$http.post(
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHourChart/StcdAndStartTimeAndEndTime",
{
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"),
}
);
if (data.code == 200) {
this.chartData1 = {
...data.data,
};
}
} catch (error) {
uni.$showMsg();
}
},
async getTotalTableData() {
try {
const { data } = await uni.$http.get(
`/gunshiApp/tsg/attResBase/rainBasinDivision/queryStPptnDetails/stcd?stcd=${this.stcd}`
);
if (data.code == 200) {
this.totalTableData = { ...data.data };
}
} catch (e) {
uni.$showMsg();
}
},
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;
},
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"),
}
);
if (data.code == 200) {
// this.projectBarData = {
// ...projectOptions(data.data)
// }
this.projectData = data.data.find(
(item) => item.stcd == this.stcd
).h2;
}
} catch (error) {
uni.$showMsg();
}
},
},
watch: {
chartData1(n, o) {
this.chartData = {
...drpOptions(n),
};
},
},
onLoad(options) {
this.stnm = options.stnm;
this.stcd = options.stcd;
},
mounted() {
this.getrainInfo();
this.getrainChartInfo();
this.getPreReportData();
this.getTotalTableData();
},
};
</script>
<style lang="scss" scoped>
.tab-bar {
display: flex;
justify-content: space-around;
padding: 10px 40px;
border-bottom: 1px solid #dfdfdf;
background-color: #fff;
}
.tab-bar {
display: flex;
justify-content: space-around;
padding: 10px 40px;
border-bottom: 1px solid #dfdfdf;
background-color: #fff;
}
.active {
color: #39a6ff;
}
.active {
color: #39a6ff;
}
.ylz-chart-area {
width: 100%;
height: 230px;
background-color: #fff;
}
.ylz-chart-area {
width: 100%;
height: 230px;
background-color: #fff;
}
.ylz-table-area {
background-color: #fff;
}
.ylz-table-area {
background-color: #fff;
}
.yl-dl-yb {
display: flex;
align-items: center;
margin-top: 20px;
}
.yl-dl-yb {
display: flex;
align-items: center;
margin-top: 20px;
}
.yl-bluetiao {
width: 5px;
height: 15px;
background-color: #02a7f0;
margin-right: 10px;
}
.yl-bluetiao {
width: 5px;
height: 15px;
background-color: #02a7f0;
margin-right: 10px;
}
.ylzpro-chart-area {
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
background-color: #fff;
}
.ylzpro-chart-area {
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
background-color: #fff;
}
.real-sw {
.real-sw {
width: 50%;
position: relative;
border: 1px solid #efefef;
height: 60px;
text-align: center;
line-height: 75px;
margin-right: 10px;
width: 50%;
position: relative;
border: 1px solid #efefef;
height: 60px;
text-align: center;
line-height: 75px;
margin-right: 10px;
.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;
}
}
.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;
}
}
</style>

View File

@ -85,9 +85,15 @@
<script>
import moment from "moment"
export default {
props: {
tableData: {
type: Object,
default: {}
}
},
data() {
return {
tableData:{},
stcd:'',
days:moment().diff(moment().startOf('year'),'days')+1
}
},
@ -98,22 +104,7 @@
}
}
},
methods: {
async getTableData(){
try{
const {data} = await uni.$http.get(
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStPptnDetails/stcd?stcd=716164061")
if(data.code == 200){
this.tableData = {...data.data};
}
}catch(e){
uni.$showMsg()
}
}
},
mounted() {
this.getTableData()
}
}
</script>

View File

@ -52,6 +52,7 @@
</template>
<script>
import moment from 'moment';
import {wgs84ToGcj02} from '../../../utils/tools.js'
const iconObj = {
"溢洪道":{
1: '/static/tabs/yhd1.png',
@ -96,6 +97,10 @@
"发电洞渗压": {
1: '/static/tabs/zshenya1.png',
2: "/static/tabs/zshenya2.png"
},
"副坝渗压": {
1: '/static/tabs/zshenya1.png',
2: "/static/tabs/zshenya2.png"
},
"发电洞位移": {
1: '/static/tabs/zweiyi1.png',
@ -215,7 +220,7 @@
width: 15,
height: 15,
id: 106,
title: "灌溉发电洞变监测",
title: "灌溉发电洞变监测",
pointType: "发电洞位移",
name: "安全监测"
},
@ -229,6 +234,17 @@
title: "副坝",
pointType: "副坝",
name: "水库工程"
},
{
latitude: 31.491300,
longitude: 114.7642000,
iconPath: '/static/tabs/zshenya1.png',
width: 15,
height: 15,
id: 97,
title: "副坝渗压监测",
pointType: "副坝渗压",
name: "安全监测"
},
{
latitude: 31.491200,
@ -334,8 +350,11 @@
url='/pages/skInfo/detail/index?value=2&key=4'
}else if(type == "发电洞渗压"){
url=`/pages/sjc/index?name=灌溉发电洞渗压监测`
}else if(type == "发电洞位移"){
url=`/pages/sjc/index?name=灌溉发电洞变型监测`
}else if(type == "副坝渗压"){
url=`/pages/sjc/index?name=副坝渗压监测`
}
else if(type == "发电洞位移"){
url=`/pages/sjc/index?name=灌溉发电洞变形监测`
}else if(type == "副坝"){
url='/pages/skInfo/detail/index?value=2&key=2'
}else if(type == "副坝位移"){
@ -393,8 +412,8 @@
if (data.code == 200) {
const videoList = data.data.map(item => ({
...item,
latitude: item.lttd - 0,
longitude: item.lgtd - 0,
latitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[1],
longitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[0] - 0.0007,
iconPath: '/static/tabs/sxt1.png',
width: 15,
height: 15,
@ -421,8 +440,8 @@
if (data.code == 200) {
const rainList = data.data.map(item => ({
...item,
latitude: item.lttd - 0,
longitude: item.lgtd - 0,
latitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[1],
longitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[0] - 0.0007,
iconPath: '/static/tabs/sl1.png',
width: 15,
height: 15,
@ -443,12 +462,12 @@
try {
const {
data
} = await uni.$http.post("/gunshiApp/tsg/reservoir/water/list", )
} = await uni.$http.post("/gunshiApp/tsg/reservoir/water/listV2", )
if (data.code == 200) {
const waterList = data.data.map(item => ({
...item,
latitude: item.lttd - 0.0001,
longitude: item.lgtd - 0.0001,
latitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[1] - 0.0001,
longitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[0] - 0.0007 - 0.0001,
iconPath: '/static/tabs/yl1.png',
width: 15,
height: 15,
@ -478,6 +497,7 @@
this.getVideoList();
this.getRainList();
this.getWaterList();
console.log(wgs84ToGcj02(114.7632670,31.4934740))
}
}
</script>

6
static/tabs/rain.svg Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -12 -326 )">
<path d="M 19.9468331825658 8.36520964226974 C 19.9464763569079 11.0771632606908 17.7151650287829 13.2835861019737 14.9727029399671 13.2835860814145 C 14.0970053224076 13.2851112035255 13.2363623472056 13.055889474165 12.477430859375 12.6190008840461 C 11.5903657483553 13.1049955386513 10.8181980263158 13.2835860814145 9.68189115953947 13.2835860814145 C 8.47992861842105 13.2835860814145 7.36556644736842 12.9506690378289 6.28974130345394 12.2687778782895 C 5.60896741745871 12.8044394251887 4.76603767892972 13.0922330245052 3.89982158717105 13.0847457648026 C 1.77885816200658 13.0848349712171 0.0535236430921053 11.3784121299342 0.0535236430921052 9.28135594161184 C 0.0629834673770326 7.49482504214983 1.31005020308773 5.95372478638771 3.05530775082237 5.57181087582237 C 3.50454950657895 2.36806422697368 6.27011595394737 0.0083853618421061 9.68189115953947 0.008385361842106 C 12.134277503496 0.0119836230547273 14.3927080039934 1.34239953813957 15.5846565583882 3.48563782894737 C 18.0393398848684 3.78528100328947 19.9468331825658 5.85851918174342 19.9468331825658 8.36520964226974 Z M 4.37716324013158 14.5438893914474 C 4.48233719161184 15.4363960731908 6.00446030016447 17.0875111636513 6.00446030016447 18.3817127467105 C 5.99511880472045 19.2737968724194 5.26929628470534 19.9920587054803 4.37716325041118 19.9920587054803 C 3.48503021611703 19.9920587054803 2.75920769610192 19.2737968724194 2.74986620065789 18.3817127467105 C 2.74986620065789 17.1427296875 4.25842997532895 15.4156110608553 4.37716324013158 14.5438893914474 Z M 9.98242639802632 14.5438893914474 C 10.0872435238487 15.4363960731908 11.6097234580592 17.0875111636513 11.6097234580592 18.3817127467105 C 11.6003819626152 19.2737968724194 10.8745594426001 19.9920587054803 9.98242640830592 19.9920587054803 C 9.09029337401178 19.9920587054803 8.36447085399668 19.2737968724194 8.35512935855263 18.3817127467105 C 8.35512935855263 17.1427296875 9.86333630756579 15.4156110608553 9.98242639802632 14.5438893914474 Z M 15.5873327302632 14.5438893914474 C 15.6925066817434 15.4363960731908 17.2147189967105 17.0875111636513 17.2147189967105 18.3817127467105 C 17.2032977941148 19.2722315992518 16.4781478464832 19.9881408931108 15.5875557565789 19.9881408931108 C 14.6969636666747 19.9881408931108 13.9718137190431 19.2722315992518 13.9603925164474 18.3817127467105 C 13.9603925164474 17.1427296875 15.4679750411184 15.4156110608553 15.5873327302632 14.5438893914474 Z " fill-rule="nonzero" fill="#208fee" stroke="none" transform="matrix(1 0 0 1 12 326 )" />
</g>
</svg>

View File

@ -9,4 +9,48 @@ export const GetInterval=(min,max,step=10)=>{
}else{
return Math.ceil(s)
}
}
// WGS84 转 GCJ-02
export function wgs84ToGcj02(lng, lat) {
if (outOfChina(lng, lat)) {
return [lng, lat];
}
let dlat = transformLat(lng - 105.0, lat - 35.0);
let dlng = transformLng(lng - 105.0, lat - 35.0);
const radlat = lat / 180.0 * Math.PI;
let magic = Math.sin(radlat);
magic = 1 - 0.00669342162296594323 * magic * magic;
const sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / ((6378245.0 * (1 - 0.00669342162296594323)) / (magic * sqrtmagic) * Math.PI);
dlng = (dlng * 180.0) / (6378245.0 / sqrtmagic * Math.cos(radlat) * Math.PI);
const mglat = lat + dlat;
const mglng = lng + dlng;
return [mglng, mglat];
}
// 判断是否在中国境内
function outOfChina(lng, lat) {
return (lng < 72.004 || lng > 137.8347) || (lat < 0.8293 || lat > 55.8271);
}
function transformLat(x, y) {
let ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(y * Math.PI) + 40.0 * Math.sin(y / 3.0 * Math.PI)) * 2.0 / 3.0;
ret += (160.0 * Math.sin(y / 12.0 * Math.PI) + 320 * Math.sin(y * Math.PI / 30.0)) * 2.0 / 3.0;
return ret;
}
function transformLng(x, y) {
let ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(x * Math.PI) + 40.0 * Math.sin(x / 3.0 * Math.PI)) * 2.0 / 3.0;
ret += (150.0 * Math.sin(x / 12.0 * Math.PI) + 300.0 * Math.sin(x / 30.0 * Math.PI)) * 2.0 / 3.0;
return ret;
}