feat(): 檀树岗综合监视开发
parent
cb88decb64
commit
670f8f7a33
3
main.js
3
main.js
|
|
@ -26,13 +26,14 @@ $http.afterRequest = function (options) {
|
||||||
}
|
}
|
||||||
// uni.hideLoading()
|
// uni.hideLoading()
|
||||||
}
|
}
|
||||||
uni.$showMsg = function (title = '数据请求失败了', duration = 1500) {
|
uni.$showMsg = function (title = '', duration = 1500) {
|
||||||
return uni.showToast({
|
return uni.showToast({
|
||||||
title,
|
title,
|
||||||
duration,
|
duration,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
uni.$stcd = '10196'
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
App.mpType = 'app'
|
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
|
|
@ -70,6 +70,14 @@
|
||||||
minute: 0,
|
minute: 0,
|
||||||
second: 0
|
second: 0
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
}).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 {
|
export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -83,6 +91,7 @@
|
||||||
array: [],
|
array: [],
|
||||||
profileCode: '',
|
profileCode: '',
|
||||||
dbType: '',
|
dbType: '',
|
||||||
|
type1:'',
|
||||||
trData: [],
|
trData: [],
|
||||||
dataSources: [],
|
dataSources: [],
|
||||||
chartData: {
|
chartData: {
|
||||||
|
|
@ -143,9 +152,10 @@
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
let name = this.array.find(item => item.profileCode == newVal).profileName;
|
let name = this.array.find(item => item.profileCode == newVal).profileName;
|
||||||
this.dbType = name == "大坝B0+060" ? "1" :
|
this.dbType =(name == "ZB0+130" || name == "ZB0+132") ? "1" :
|
||||||
name == "大坝B0+090" ? "2" :
|
(name == "ZB0+250" || name == "ZB0+252") ? "2" :
|
||||||
name == "大坝B0+120" ? "2" : '1'
|
(name == "ZB0+370" || name == "ZB0+372") ? "3" : '';
|
||||||
|
this.type1 = typeName[name];
|
||||||
this.getDmTree();
|
this.getDmTree();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -163,7 +173,7 @@
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.chartData = {
|
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]);
|
console.log("data", data[index % data.length]);
|
||||||
|
|
||||||
this.chartData = {
|
this.chartData = {
|
||||||
...drpOption(data[index % data.length], this.dbType)
|
...drpOption(data[index % data.length], this.dbType,this.type1)
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
@ -240,14 +250,22 @@
|
||||||
},
|
},
|
||||||
// 获取监测点数据
|
// 获取监测点数据
|
||||||
async getMonthData() {
|
async getMonthData() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "加载中...",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
} = await uni.$http.post(
|
} = await uni.$http.post(
|
||||||
`/gunshiApp/tsg/attDamProfile/list`, )
|
`/gunshiApp/tsg/attDamProfile/list`, )
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
this.array = data.data
|
uni.hideLoading();
|
||||||
this.profileCode = data.data[0].profileCode;
|
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) {
|
} catch (e) {
|
||||||
uni.$showMsg();
|
uni.$showMsg();
|
||||||
|
|
@ -256,6 +274,10 @@
|
||||||
|
|
||||||
// 获取坝面上点位数据
|
// 获取坝面上点位数据
|
||||||
async getTableData() {
|
async getTableData() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "加载中...",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
|
|
@ -269,6 +291,7 @@
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
|
uni.hideLoading();
|
||||||
let newArr = [];
|
let newArr = [];
|
||||||
let newData = data.data.map((s, i) => {
|
let newData = data.data.map((s, i) => {
|
||||||
newArr.push(s.list.map(c => ({
|
newArr.push(s.list.map(c => ({
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
/*table样式*/
|
/*table样式*/
|
||||||
.table_cur {
|
.table_cur {
|
||||||
|
|
|
||||||
|
|
@ -1,75 +1,191 @@
|
||||||
|
|
||||||
import { imageUrl060,imageUrl090,rule } from './dataUrl'
|
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;
|
export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
|
// const yMin = type == "1" ? 70 : type == "2" ? 70 : 70;
|
||||||
const type1 = ["SY05", "SY06", "SY07", "SY08"]
|
// const yMax = type == "1" ? 154 : type == "2" ? 150 : 150;
|
||||||
const type2 = ["SY09","SY10","SY11","SY12"]
|
// const type1 = ["SY05", "SY06", "SY07", "SY08"]
|
||||||
const alltype = type == "1" ? type1 : type == "2" ? type2 : type2;
|
// 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 textColor = '#666'
|
||||||
const imageUrl = type == "1" ? imageUrl060:
|
// const imageUrl370 = `${process.env.PUBLIC_URL}/assets/images/zb370.png `
|
||||||
type == "2" ? imageUrl090 : imageUrl090;
|
// const imageUrl250 = `${process.env.PUBLIC_URL}/assets/images/zb250.png `
|
||||||
const xValue = type == "1" ? (((data?.rz - 99) + 1.1 * 13) / 1.1):
|
// const imageUrl130 = `${process.env.PUBLIC_URL}/assets/images/zb130.png `
|
||||||
type == "2" ? (((data?.rz - 99) + 1 * 14) / 1) : (((data?.rz - 99) + 1 * 14) / 1)
|
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 ?
|
const rz = data?.rz ?
|
||||||
[[xValue, data?.rz], [0, data?.rz], ] :
|
[[xValue, data?.rz], [0, data?.rz],] :
|
||||||
[]
|
[]
|
||||||
const rz1 = data?.rz ?
|
const rz1 = data?.rz ?
|
||||||
type == "1" ?
|
type == "3" ?
|
||||||
[[0, 99], [13, 99], [xValue, data?.rz]]:
|
[[0, 86], [4, 86], [xValue, data?.rz]] :
|
||||||
type == "2" ?
|
type == "2" ?
|
||||||
[[0, 99], [14, 99], [xValue, data?.rz]]
|
[[0, 87], [6, 87], [xValue, data?.rz]]
|
||||||
: [[0, 99], [14, 99], [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]] ?
|
const gz1 = data[alltype[0]] ?
|
||||||
type == "1" ? [[51.6, 85], [51.6, data[alltype[0]]]] :
|
type == "3" ? [[47, 101], [47, data[alltype[0]]]] :
|
||||||
type == "2" ? [[47.5, 85], [47.5, 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]]]]
|
[[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 gz2 = 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]] ?
|
const gz3 = data[alltype[2]] ?
|
||||||
type == "1" ? [[72.5, 90], [72.5, data[alltype[2]]]] :
|
type == "3" ? [[58.5, 95], [58.5, data[alltype[2]]]] :
|
||||||
type == "2" ? [[66.5, 90], [66.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]]]] : [];
|
[[73, 161], [73, data[alltype[2]]]] : [];
|
||||||
|
|
||||||
|
|
||||||
const gz4 = data[alltype[3]] ?
|
const gz4 = data[alltype[3]] ?
|
||||||
type == "1" ? [[84.5, 96], [84.5, data[alltype[3]]]] :
|
type == "3" ? [] :
|
||||||
type == "2" ? [[77, 96], [77, data[alltype[3]]]] :
|
type == "2" ? [[77, 82], [77, data[alltype[3]]]] :
|
||||||
|
type == "1" ? [[79, 78], [79, data[alltype[3]]]] :
|
||||||
[[85, 166], [85, data[alltype[3]]]] : [];
|
[[85, 166], [85, data[alltype[3]]]] : [];
|
||||||
|
|
||||||
|
// 将渗压管连起来的线
|
||||||
const line = data?.rz ?
|
const line = data?.rz ?
|
||||||
type == "1" ?
|
type == "3" ?
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[51.6, data[alltype[0]]],
|
[47, data[alltype[0]]],
|
||||||
[53.6, data[alltype[1]]],
|
[51, data[alltype[1]]],
|
||||||
[72.5, data[alltype[2]]],
|
[58.5, data[alltype[2]]],
|
||||||
[84.5, data[alltype[3]]]
|
|
||||||
] :
|
] :
|
||||||
type == "2" ?
|
type == "2" ?
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[47.5, data[alltype[0]]],
|
[45.5, data[alltype[0]]],
|
||||||
[49.5, data[alltype[1]]],
|
[50, data[alltype[1]]],
|
||||||
[66.5, data[alltype[2]]],
|
[58, data[alltype[2]]],
|
||||||
[77, data[alltype[3]]]
|
[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],
|
[xValue, data?.rz],
|
||||||
[51.6, data[alltype[0]]],
|
[51.6, data[alltype[0]]],
|
||||||
[53.6, data[alltype[1]]],
|
[53.6, data[alltype[1]]],
|
||||||
[73, data[alltype[2]]],
|
[73, data[alltype[2]]],
|
||||||
[85, data[alltype[3]]]
|
[85, data[alltype[3]]]
|
||||||
]
|
]
|
||||||
: []
|
: []
|
||||||
let eopts = {
|
let eopts = {
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@
|
||||||
<div class="navIcon">
|
<div class="navIcon">
|
||||||
<image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image>
|
<image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image>
|
||||||
<div class="readStatus" v-show="
|
<div class="readStatus" v-show="
|
||||||
(warnStatus && item.key == 2) || (xcStatus && item.key == 5)
|
(warnStatus && item.key == 2) ||
|
||||||
|
(handleStatus && item.key ==6) ||(xcStatus && item.key == 5)
|
||||||
"></div>
|
"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="navTxt">{{ item.value }}</div>
|
<div class="navTxt">{{ item.value }}</div>
|
||||||
|
|
@ -79,11 +80,13 @@
|
||||||
ylzList: [],
|
ylzList: [],
|
||||||
swzList:[],
|
swzList:[],
|
||||||
warnStatus: false, //预警
|
warnStatus: false, //预警
|
||||||
|
handleStatus: false, //问题处理
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getYjData();
|
this.getYjData();
|
||||||
this.getXcrwData();
|
this.getXcrwData();
|
||||||
|
this.getHandleData();
|
||||||
uni.$showMsg("刷新成功");
|
uni.$showMsg("刷新成功");
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
|
|
@ -122,6 +125,12 @@
|
||||||
icon: '../../static/tabs/xcrw.png',
|
icon: '../../static/tabs/xcrw.png',
|
||||||
url: '/pages/xcrw/index'
|
url: '/pages/xcrw/index'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: '问题处理',
|
||||||
|
key: 6,
|
||||||
|
icon: '../../static/tabs/wtcl.png',
|
||||||
|
url: '/pages/wtcl/index'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -144,7 +153,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSwList(){
|
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
|
this.swzList=res.data.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -173,6 +182,30 @@
|
||||||
})
|
})
|
||||||
this.setInsert(menu2)
|
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() {
|
async getYjData() {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -230,7 +263,7 @@
|
||||||
timer = setInterval(function () {
|
timer = setInterval(function () {
|
||||||
that.getList();
|
that.getList();
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
this.getHandleData();
|
||||||
this.setInsert()
|
this.setInsert()
|
||||||
this.getYjData();
|
this.getYjData();
|
||||||
this.getSwList()
|
this.getSwList()
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,9 @@
|
||||||
<ZwyTable :tableData="zwyData" v-else-if="name == '溢洪道位移监测'"></ZwyTable>
|
<ZwyTable :tableData="zwyData" v-else-if="name == '溢洪道位移监测'"></ZwyTable>
|
||||||
<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>
|
||||||
<ZsyTable :tableData="zsyData" v-else-if="name == '灌溉发电洞渗压监测'"></ZsyTable>
|
<ZsyTable :tableData="sdData" v-else-if="name == '灌溉发电洞渗压监测'"></ZsyTable>
|
||||||
<ZwyTable :tableData="zwyData" v-else-if="name == '灌溉发电洞变型监测'"></ZwyTable>
|
<ZsyTable :tableData="fbData" v-else-if="name == '副坝渗压监测'"></ZsyTable>
|
||||||
|
<ZwyTable :tableData="zwyData" v-else-if="name == '灌溉发电洞变形监测'"></ZwyTable>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -30,6 +31,8 @@ export default {
|
||||||
slData:[], //渗流监测
|
slData:[], //渗流监测
|
||||||
zwyData:[],//主坝位移监测
|
zwyData:[],//主坝位移监测
|
||||||
zsyData:[],//主坝渗压监测
|
zsyData:[],//主坝渗压监测
|
||||||
|
sdData:[],//发电洞渗压监测
|
||||||
|
fbData:[],//副坝渗压监测
|
||||||
name:'',
|
name:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -58,7 +61,13 @@ export default {
|
||||||
try {
|
try {
|
||||||
const {data} = await uni.$http.get('/gunshiApp/tsg/osmoticPressR/list/value?type=1')
|
const {data} = await uni.$http.get('/gunshiApp/tsg/osmoticPressR/list/value?type=1')
|
||||||
if(data.code == 200){
|
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) {
|
} catch (error) {
|
||||||
uni.$showMsg();
|
uni.$showMsg();
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
async getTableData(){
|
async getTableData(){
|
||||||
try{
|
try{
|
||||||
const {data} = await uni.$http.get(
|
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){
|
if(data.code == 200){
|
||||||
this.tableData = {...data.data};
|
this.tableData = {...data.data};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@
|
||||||
<!-- style="max-height: 500px; overflow-y: auto" -->
|
<!-- style="max-height: 500px; overflow-y: auto" -->
|
||||||
<view >
|
<view >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 50px">{{info.personName}}</td>
|
<td style="width: 50px">{{info.name}}</td>
|
||||||
<td style="width: 130px;">{{info.orgName}}</td>
|
<td style="width: 130px;">{{info.unit}}</td>
|
||||||
<td style="width: 80px">{{info.position}}</td>
|
<td style="width: 80px">{{info.duty}}</td>
|
||||||
<td style="width: 100px;color: #62bafa;" @click="show = true">{{info.tel}}</td>
|
<td style="width: 100px;color: #62bafa;" @click="show = true">{{info.contactInfo}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,76 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="scroll-table" v-if="list.length != 0">
|
<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" />
|
<Card :info="item" />
|
||||||
</view>
|
</view>
|
||||||
<view style="height:50px"></view>
|
<view style="height: 50px"></view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
|
style="
|
||||||
v-else>
|
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>
|
<image src="../../../static/empty.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Card from "./card.vue"
|
import Card from "./card.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Card
|
Card,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: []
|
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: {
|
mounted() {
|
||||||
async getData() {
|
this.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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.scroll-table {
|
.scroll-table {
|
||||||
height: calc(100vh - 100px);
|
height: calc(100vh - 100px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -152,7 +152,7 @@
|
||||||
data
|
data
|
||||||
} = await uni.$http.post(
|
} = await uni.$http.post(
|
||||||
"/gunshiApp/tsg/reservoir/water/real/img", {
|
"/gunshiApp/tsg/reservoir/water/real/img", {
|
||||||
resCode: "42120250085"
|
resCode: "42112230001"
|
||||||
})
|
})
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
const newArr = data.data.map(item => ({
|
const newArr = data.data.map(item => ({
|
||||||
|
|
@ -175,9 +175,10 @@
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
} = await uni.$http.post(
|
} = await uni.$http.post(
|
||||||
"/gunshiApp/tsg/reservoir/water/list")
|
"/gunshiApp/tsg/reservoir/water/listV2",{sources:['SW','SK']})
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
this.info = data.data[0]
|
const filterObj = data.data.filter(item => item.stcd == '10196')
|
||||||
|
this.info = filterObj[0]
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.$showMsg();
|
uni.$showMsg();
|
||||||
|
|
@ -189,7 +190,7 @@
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
} = await uni.$http.get(
|
} = await uni.$http.get(
|
||||||
"/gunshiApp/tsg/reservoir/water/detail?stcd=716164061")
|
`/gunshiApp/tsg/reservoir/water/detail?stcd=${uni.$stcd}`)
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
this.rainInfo = data.data;
|
this.rainInfo = data.data;
|
||||||
}
|
}
|
||||||
|
|
@ -200,16 +201,21 @@
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
async getJcsjData() {
|
async getJcsjData() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
} = await uni.$http.post(
|
} = await uni.$http.post(
|
||||||
"/gunshiApp/tsg/reservoir/water/monitor/data", {
|
"/gunshiApp/tsg/reservoir/water/monitor/data", {
|
||||||
stcd: "716164061",
|
stcd: uni.$stcd,
|
||||||
stm: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
stm: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
etm: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
|
etm: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
})
|
})
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
|
uni.hideLoading()
|
||||||
this.jcTableData = [...data.data];
|
this.jcTableData = [...data.data];
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -1,68 +1,77 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view v-if="tableData.length != 0">
|
<view v-if="tableData.length != 0">
|
||||||
<view style="height: 250px; ">
|
<view style="height: 250px">
|
||||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
<qiun-data-charts
|
||||||
</view>
|
:chartData="chartData.chartData"
|
||||||
<view style="margin-top: 20px;">
|
:echartsApp="true"
|
||||||
<Table :tableData="tableData" />
|
:eopts="chartData.eopts"
|
||||||
</view>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view style="margin-top: 20px">
|
||||||
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
|
<Table :tableData="tableData" />
|
||||||
v-else>
|
</view>
|
||||||
<image src="../../../../static/empty.png" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
style="
|
||||||
|
height: calc(100vh - 160px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-top: 10px;
|
||||||
|
"
|
||||||
|
v-else
|
||||||
|
>
|
||||||
|
<image src="../../../../static/empty.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import drpOptions from "./chartOptions.js"
|
import drpOptions from "./chartOptions.js";
|
||||||
import Table from "./jcsjTable.vue"
|
import Table from "./jcsjTable.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Table
|
Table,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
chartData: {},
|
chartData: {},
|
||||||
tableData: []
|
tableData: [],
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getKrData() {
|
async getKrData() {
|
||||||
try {
|
uni.showLoading({
|
||||||
const {
|
title: "加载中...",
|
||||||
data
|
mask: true,
|
||||||
} = await uni.$http.post(
|
});
|
||||||
"/gunshiApp/tsg/stZvarlB/list", {
|
try {
|
||||||
stcd: "716164061"
|
const { data } = await uni.$http.post("/gunshiApp/tsg/stZvarlB/list");
|
||||||
})
|
if (data.code == 200) {
|
||||||
if (data.code == 200) {
|
this.tableData = [...data.data];
|
||||||
this.tableData = [...data.data];
|
}
|
||||||
}
|
} catch (error) {
|
||||||
} catch (error) {
|
uni.$showMsg();
|
||||||
uni.$showMsg();
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
watch: {
|
||||||
watch: {
|
tableData(n, o) {
|
||||||
tableData(n, o) {
|
if (n.length > 0) {
|
||||||
if (n.length > 0) {
|
uni.hideLoading();
|
||||||
this.chartData = {
|
this.chartData = {
|
||||||
...drpOptions(n)
|
...drpOptions(n),
|
||||||
}
|
};
|
||||||
this.show = true
|
this.show = true;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getKrData()
|
this.getKrData();
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -22,12 +22,12 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="bottomItem">
|
<view class="bottomItem">
|
||||||
<view class="withd-2" @click="toWaterDetail('生活供水',shStcd)">
|
<view class="withd-2" @click="toWaterDetail('灌溉供水',shStcd)">
|
||||||
<text>生活供水m³/s</text>:
|
<text>灌溉供水m³/s</text>:
|
||||||
<text>{{shgs}}</text>
|
<text>{{shgs}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="withd-2" @click="toWaterDetail('生态供水',stStcd)">
|
<view class="withd-2" @click="toWaterDetail('水厂取水',stStcd)">
|
||||||
<text>生态供水m³/s</text>:
|
<text>水厂取水m³/s</text>:
|
||||||
<text>{{stgs}}</text>
|
<text>{{stgs}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -86,14 +86,13 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDrp(){
|
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}
|
this.dataform={...this.dataform,...res.data.data}
|
||||||
|
|
||||||
})
|
})
|
||||||
uni.$http.post('/gunshiApp/tsg/reservoir/water/list').then(res=>{
|
uni.$http.post('/gunshiApp/tsg/reservoir/water/listV2',{sources:['SW','SK']}).then(res=>{
|
||||||
this.dataform={...this.dataform,...res.data.data[0]}
|
const filterObj = res.data.data.filter(item => item.stcd == uni.$stcd)
|
||||||
this.tm = res.data.data[0].tm
|
this.dataform={...this.dataform,...filterObj[0]}
|
||||||
|
this.tm = filterObj[0].tm
|
||||||
})
|
})
|
||||||
uni.$http.post('/gunshiApp/tsg/stWaterRReal/list').then(res=>{
|
uni.$http.post('/gunshiApp/tsg/stWaterRReal/list').then(res=>{
|
||||||
res.data.data.forEach(item=>{
|
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=>{
|
res.data.data.forEach(item=>{
|
||||||
if(item.projType == 1){
|
if(item.projType == 1){
|
||||||
this.imageList = item.files.map((item,index)=>
|
this.imageList = item.files.map((item,index)=>
|
||||||
|
|
|
||||||
|
|
@ -1,138 +1,180 @@
|
||||||
<template>
|
<template>
|
||||||
<view :style="{height:'100vh',overflow:'auto',backgroundColor:'#fff'}">
|
<view :style="{ height: '100vh', overflow: 'auto', backgroundColor: '#fff' }">
|
||||||
<u-navbar :title="name" :autoBack="true" :titleStyle="{
|
<u-navbar
|
||||||
fontSize:'18px'
|
:title="name"
|
||||||
}" :height='40' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
:autoBack="true"
|
||||||
</u-navbar>
|
:titleStyle="{
|
||||||
<view style="padding:10px">
|
fontSize: '18px',
|
||||||
<view class="time-ranger" style="margin-top:70px">
|
}"
|
||||||
<view class="start-time">
|
:height="40"
|
||||||
<text>开始时间</text>
|
:safeAreaInsetTop="true"
|
||||||
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
|
leftIconSize="20"
|
||||||
</view>
|
leftIconColor="rgb(153, 153, 153)"
|
||||||
<view class="end-time">
|
>
|
||||||
<text>结束时间</text>
|
</u-navbar>
|
||||||
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
|
<view style="padding: 10px">
|
||||||
<view class="search-btn" @click="searchHandle">
|
<view class="time-ranger" style="margin-top: 70px">
|
||||||
搜索
|
<view class="start-time">
|
||||||
</view>
|
<text>开始时间</text>
|
||||||
</view>
|
<text
|
||||||
<view v-if="tableData.length != 0">
|
@click="showTime = true"
|
||||||
<view class="water-chart-area">
|
style="margin-left: 10%; color: #3399ef"
|
||||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
|
>{{ stm }}</text
|
||||||
</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>
|
</view>
|
||||||
<u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
|
<view class="end-time">
|
||||||
@cancel="showTime=false"></u-datetime-picker>
|
<text>结束时间</text>
|
||||||
<u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
|
<text
|
||||||
@cancel="showTime1=false"></u-datetime-picker>
|
@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>
|
</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>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from "moment";
|
||||||
import Table from "./jcTable.vue"
|
import Table from "./jcTable.vue";
|
||||||
import {
|
import { numberFormat } from "../../utils/tool";
|
||||||
numberFormat
|
import drpOptions from "./jcOptions";
|
||||||
} from '../../utils/tool'
|
const stm = moment()
|
||||||
import drpOptions from './jcOptions'
|
.subtract(7, "days")
|
||||||
const stm = moment().subtract(7, 'days').set({
|
.set({
|
||||||
minute: 0,
|
minute: 0,
|
||||||
second: 0
|
second: 0,
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
})
|
||||||
const etm = moment().set({
|
.format("YYYY-MM-DD HH:mm");
|
||||||
minute: 0,
|
const etm = moment()
|
||||||
second: 0
|
.set({
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
minute: 0,
|
||||||
export default {
|
second: 0,
|
||||||
components: {
|
})
|
||||||
Table
|
.format("YYYY-MM-DD HH:mm");
|
||||||
},
|
export default {
|
||||||
data() {
|
components: {
|
||||||
return {
|
Table,
|
||||||
name: '',
|
},
|
||||||
stcd: '',
|
data() {
|
||||||
startTime: stm,
|
return {
|
||||||
endTime: etm,
|
name: "",
|
||||||
stm,
|
stcd: "",
|
||||||
etm,
|
startTime: stm,
|
||||||
showTime: false,
|
endTime: etm,
|
||||||
showTime1: false,
|
stm,
|
||||||
tableData: [],
|
etm,
|
||||||
chartData: {}
|
showTime: false,
|
||||||
}
|
showTime1: false,
|
||||||
},
|
tableData: [],
|
||||||
methods: {
|
chartData: {},
|
||||||
handleStartTime(e) {
|
};
|
||||||
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
},
|
||||||
this.stm = time
|
methods: {
|
||||||
this.showTime = false
|
handleStartTime(e) {
|
||||||
},
|
let time = moment(e.value).format("YYYY-MM-DD HH:mm");
|
||||||
handleEndTime(e) {
|
this.stm = time;
|
||||||
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
this.showTime = false;
|
||||||
this.etm = time;
|
},
|
||||||
this.showTime1 = false
|
handleEndTime(e) {
|
||||||
},
|
let time = moment(e.value).format("YYYY-MM-DD HH:mm");
|
||||||
async geTableData() {
|
this.etm = time;
|
||||||
try {
|
this.showTime1 = false;
|
||||||
const {
|
},
|
||||||
data
|
async geTableData() {
|
||||||
} = await uni.$http.post(
|
uni.showLoading({
|
||||||
"/gunshiApp/tsg/stWaterR/list", {
|
title: "加载中...",
|
||||||
stcd: this.stcd,
|
mask: true,
|
||||||
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
});
|
||||||
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
|
try {
|
||||||
isAsc: false,
|
const { data } = await uni.$http.post("/gunshiApp/tsg/stWaterR/list", {
|
||||||
orderField: "tm"
|
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) {
|
if (data.code == 200) {
|
||||||
this.tableData = [...data.data]
|
uni.hideLoading();
|
||||||
}
|
|
||||||
} 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))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
this.tableData = [...data.data];
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.geTableData()
|
|
||||||
},
|
|
||||||
onLoad(options) {
|
|
||||||
this.stcd = options.stcd;
|
|
||||||
this.name = options.name;
|
|
||||||
}
|
}
|
||||||
}
|
} 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>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.water-chart-area {
|
.water-chart-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
}
|
}
|
||||||
.water-table-area{
|
.water-table-area {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,140 +1,181 @@
|
||||||
<template>
|
<template>
|
||||||
<view :style="{height:'100vh',overflow:'auto',backgroundColor:'#fff'}">
|
<view :style="{ height: '100vh', overflow: 'auto', backgroundColor: '#fff' }">
|
||||||
<u-navbar :title="name" :autoBack="true" :titleStyle="{
|
<u-navbar
|
||||||
fontSize:'18px'
|
:title="name"
|
||||||
}" :height='40' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
:autoBack="true"
|
||||||
</u-navbar>
|
:titleStyle="{
|
||||||
<view style="padding:10px">
|
fontSize: '18px',
|
||||||
<view class="time-ranger" style="margin-top:70px">
|
}"
|
||||||
<view class="start-time">
|
:height="40"
|
||||||
<text>开始时间</text>
|
:safeAreaInsetTop="true"
|
||||||
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
|
leftIconSize="20"
|
||||||
</view>
|
leftIconColor="rgb(153, 153, 153)"
|
||||||
<view class="end-time">
|
>
|
||||||
<text>结束时间</text>
|
</u-navbar>
|
||||||
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
|
<view style="padding: 10px">
|
||||||
<view class="search-btn" @click="searchHandle">
|
<view class="time-ranger" style="margin-top: 70px">
|
||||||
搜索
|
<view class="start-time">
|
||||||
</view>
|
<text>开始时间</text>
|
||||||
</view>
|
<text
|
||||||
<view v-if="tableData.length != 0">
|
@click="showTime = true"
|
||||||
<view class="water-chart-area">
|
style="margin-left: 10%; color: #3399ef"
|
||||||
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true"
|
>{{ stm }}</text
|
||||||
: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>
|
</view>
|
||||||
<u-datetime-picker :show="showTime" v-model="startTime" mode="datetime" @confirm="handleStartTime"
|
<view class="end-time">
|
||||||
@cancel="showTime=false"></u-datetime-picker>
|
<text>结束时间</text>
|
||||||
<u-datetime-picker :show="showTime1" v-model="endTime" mode="datetime" @confirm="handleEndTime"
|
<text
|
||||||
@cancel="showTime1=false"></u-datetime-picker>
|
@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>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from "moment";
|
||||||
import Table from "./jcTable.vue"
|
import Table from "./jcTable.vue";
|
||||||
import drpOptions from './chartOption'
|
import drpOptions from "./chartOption";
|
||||||
const stm = moment().subtract(7, 'days').set({
|
const stm = moment()
|
||||||
minute: 0,
|
.subtract(7, "days")
|
||||||
second: 0
|
.set({
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
minute: 0,
|
||||||
const etm = moment().set({
|
second: 0,
|
||||||
minute: 0,
|
})
|
||||||
second: 0
|
.format("YYYY-MM-DD HH:mm");
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
const etm = moment()
|
||||||
export default {
|
.set({
|
||||||
components: {
|
minute: 0,
|
||||||
Table
|
second: 0,
|
||||||
},
|
})
|
||||||
data() {
|
.format("YYYY-MM-DD HH:mm");
|
||||||
return {
|
export default {
|
||||||
name: '',
|
components: {
|
||||||
startTime: stm,
|
Table,
|
||||||
endTime: etm,
|
},
|
||||||
stm,
|
data() {
|
||||||
etm,
|
return {
|
||||||
showTime: false,
|
name: "",
|
||||||
showTime1: false,
|
startTime: stm,
|
||||||
tableData: [],
|
endTime: etm,
|
||||||
chartData: {},
|
stm,
|
||||||
stcd: ''
|
etm,
|
||||||
}
|
showTime: false,
|
||||||
},
|
showTime1: false,
|
||||||
methods: {
|
tableData: [],
|
||||||
handleStartTime(e) {
|
chartData: {},
|
||||||
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
stcd: "",
|
||||||
this.stm = time
|
};
|
||||||
this.showTime = false
|
},
|
||||||
},
|
methods: {
|
||||||
handleEndTime(e) {
|
handleStartTime(e) {
|
||||||
let time = moment(e.value).format("YYYY-MM-DD HH:mm")
|
let time = moment(e.value).format("YYYY-MM-DD HH:mm");
|
||||||
this.etm = time;
|
this.stm = time;
|
||||||
this.showTime1 = false
|
this.showTime = false;
|
||||||
},
|
},
|
||||||
async geTableData() {
|
handleEndTime(e) {
|
||||||
try {
|
let time = moment(e.value).format("YYYY-MM-DD HH:mm");
|
||||||
const {
|
this.etm = time;
|
||||||
data
|
this.showTime1 = false;
|
||||||
} = await uni.$http.post(
|
},
|
||||||
"/gunshiApp/tsg/reservoir/water/monitor/data", {
|
async geTableData() {
|
||||||
stcd: this.stcd,
|
uni.showLoading({
|
||||||
stm: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
title: "加载中...",
|
||||||
etm: moment(this.etm).format("YYYY-MM-DD HH:mm:ss"),
|
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) {
|
||||||
|
uni.hideLoading();
|
||||||
if (data.code == 200) {
|
this.tableData = [...data.data];
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
} 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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.water-chart-area {
|
.water-chart-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 270px;
|
height: 270px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.water-table-area {
|
.water-table-area {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -99,6 +99,10 @@
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "加载中...",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
console.log(uni.getStorageSync('value'));
|
console.log(uni.getStorageSync('value'));
|
||||||
let params = {
|
let params = {
|
||||||
"pageSo": {
|
"pageSo": {
|
||||||
|
|
@ -110,10 +114,11 @@
|
||||||
end:this.etm?moment(this.etm).format('YYYY-MM-DD 23:59:59'):''
|
end:this.etm?moment(this.etm).format('YYYY-MM-DD 23:59:59'):''
|
||||||
},
|
},
|
||||||
"isHandle": 0,
|
"isHandle": 0,
|
||||||
"handleUserId": uni.getStorageSync('value').userId
|
"inspectUserId": uni.getStorageSync('value').userId
|
||||||
}
|
}
|
||||||
console.log(params,'dsd');
|
console.log(params,'dsd');
|
||||||
uni.$http.post('/gunshiApp/tsg/inspect/detail/page', params).then(res => {
|
uni.$http.post('/gunshiApp/tsg/inspect/detail/page', params).then(res => {
|
||||||
|
uni.hideLoading();
|
||||||
this.list=res.data.data.records
|
this.list=res.data.data.records
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,8 @@
|
||||||
lttd: latitude,
|
lttd: latitude,
|
||||||
lgtd: longitude
|
lgtd: longitude
|
||||||
})
|
})
|
||||||
if (data.code == 200) {
|
console.log("data",data);
|
||||||
|
if (data.code == 200) {
|
||||||
console.log('Location sent successfully')
|
console.log('Location sent successfully')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'
|
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,
|
minute: 0,
|
||||||
second: 0
|
second: 0
|
||||||
}).format("YYYY-MM-DD");
|
}).format("YYYY-MM-DD");
|
||||||
|
|
@ -77,10 +77,10 @@
|
||||||
1: '继续任务',
|
1: '继续任务',
|
||||||
2: '已完成'
|
2: '已完成'
|
||||||
},
|
},
|
||||||
startTime: stm,
|
startTime: '',
|
||||||
endTime: etm,
|
endTime: '',
|
||||||
stm,
|
stm:'请选择开始时间',
|
||||||
etm,
|
etm:'请选择结束时间',
|
||||||
showTime: false,
|
showTime: false,
|
||||||
showTime1: false,
|
showTime1: false,
|
||||||
list: []
|
list: []
|
||||||
|
|
@ -97,26 +97,33 @@
|
||||||
handleStartTime(e) {
|
handleStartTime(e) {
|
||||||
let time = moment(e.value).format("YYYY-MM-DD")
|
let time = moment(e.value).format("YYYY-MM-DD")
|
||||||
this.stm = time
|
this.stm = time
|
||||||
|
this.startTime =time
|
||||||
this.showTime = false
|
this.showTime = false
|
||||||
},
|
},
|
||||||
handleEndTime(e) {
|
handleEndTime(e) {
|
||||||
let time = moment(e.value).format("YYYY-MM-DD")
|
let time = moment(e.value).format("YYYY-MM-DD")
|
||||||
this.etm = time;
|
this.etm = time;
|
||||||
|
this.endTime = time
|
||||||
this.showTime1 = false
|
this.showTime1 = false
|
||||||
},
|
},
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "加载中...",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
const userId = uni.getStorageSync('value')?.userId
|
const userId = uni.getStorageSync('value')?.userId
|
||||||
const params = {
|
const params = {
|
||||||
dateRangeSo: {
|
dateRangeSo: {
|
||||||
start: moment(this.stm).format("YYYY-MM-DD 00:00:00"),
|
start: this.startTime ?moment(this.startTime).format("YYYY-MM-DD 00:00:00"):"",
|
||||||
end: moment(this.etm).format("YYYY-MM-DD 23:59:59"),
|
end: this.endTime ? moment(this.endTime).format("YYYY-MM-DD 23:59:59"):'',
|
||||||
},
|
},
|
||||||
inspectUserId: userId,
|
inspectUserId: userId,
|
||||||
statusList: [0, 1]
|
statusList: [0, 1]
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await uni.$http.post("/gunshiApp/tsg/inspect/task/list", params)
|
const res = await uni.$http.post("/gunshiApp/tsg/inspect/task/list", params)
|
||||||
|
uni.hideLoading();
|
||||||
this.list = [...res.data.data];
|
this.list = [...res.data.data];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.$showMsg();
|
uni.$showMsg();
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,18 @@
|
||||||
mapType:{
|
mapType:{
|
||||||
aiWarnCount:'AI告警',
|
aiWarnCount:'AI告警',
|
||||||
rzWarn:"水位告警",
|
rzWarn:"水位告警",
|
||||||
qxWarn:'气象告警',
|
// qxWarn:'气象告警',
|
||||||
pressWarn:'渗流告警',
|
pressWarn:'渗流告警',
|
||||||
flowWarn:'渗压告警',
|
flowWarn:'渗压告警',
|
||||||
shiftWarn:'位移告警'
|
shiftWarn:'位移告警'
|
||||||
},
|
},
|
||||||
list: {rzWarn:"正常(-4.031)",flowWarn:[],pressWarn:[],qxWarn:[],shiftWarn:[],aiWarnCount: 0,}
|
list: {
|
||||||
|
rzWarn:"正常(-4.031)",
|
||||||
|
flowWarn:[],
|
||||||
|
pressWarn:[],
|
||||||
|
// qxWarn:[],
|
||||||
|
shiftWarn:[],
|
||||||
|
aiWarnCount: 0,}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -106,6 +112,7 @@
|
||||||
},
|
},
|
||||||
getList(){
|
getList(){
|
||||||
uni.$http.post('/gunshiApp/tsg/stQxWarnR/home/warn',this.model).then(res=>{
|
uni.$http.post('/gunshiApp/tsg/stQxWarnR/home/warn',this.model).then(res=>{
|
||||||
|
delete res.data.data.qxWarn;
|
||||||
this.list = res.data.data
|
this.list = res.data.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -117,7 +124,8 @@
|
||||||
.itemYj{
|
.itemYj{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
|
// column-gap: 8px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
.itemYjCont{
|
.itemYjCont{
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
|
|
@ -135,6 +143,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
margin-right: 1px;
|
||||||
.item{
|
.item{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,274 +1,346 @@
|
||||||
<template>
|
<template>
|
||||||
<view :style="{height:'100vh',overflow:'auto',backgroundColor:'#fff'}">
|
<view :style="{ height: '100vh', overflow: 'auto', backgroundColor: '#fff' }">
|
||||||
<u-navbar :title="stnm" :autoBack="true" :titleStyle="{
|
<u-navbar
|
||||||
fontSize:'18px'
|
:title="stnm"
|
||||||
}" :height='40' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
:autoBack="true"
|
||||||
</u-navbar>
|
:titleStyle="{
|
||||||
<view class="tab-bar" style="margin-top:70px">
|
fontSize: '18px',
|
||||||
<view class="jcsj" @click="activeOne = 0" :class="{'active':activeOne == 0}">
|
}"
|
||||||
监测数据
|
:height="40"
|
||||||
</view>
|
:safeAreaInsetTop="true"
|
||||||
<view class="tjsj" @click="activeOne = 1" :class="{'active':activeOne == 1}">
|
leftIconSize="20"
|
||||||
统计数据
|
leftIconColor="rgb(153, 153, 153)"
|
||||||
</view>
|
>
|
||||||
</view>
|
</u-navbar>
|
||||||
<view style="padding:10px" v-if="activeOne == 0">
|
<view class="tab-bar" style="margin-top: 70px">
|
||||||
<view class="time-ranger">
|
<view
|
||||||
<view class="start-time">
|
class="jcsj"
|
||||||
<text>开始时间</text>
|
@click="activeOne = 0"
|
||||||
<text @click="showTime=true" style="margin-left:10%;color:#3399ef">{{stm}}</text>
|
:class="{ active: activeOne == 0 }"
|
||||||
</view>
|
>
|
||||||
<view class="end-time">
|
监测数据
|
||||||
<text>结束时间</text>
|
</view>
|
||||||
<text @click="showTime1=true" style="margin:0 10%;color:#3399ef">{{etm}}</text>
|
<view
|
||||||
<view class="search-btn" @click="searchHandle">
|
class="tjsj"
|
||||||
搜索
|
@click="activeOne = 1"
|
||||||
</view>
|
:class="{ active: activeOne == 1 }"
|
||||||
</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>
|
</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>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from "moment";
|
||||||
import Table from "./tjsjTable.vue"
|
import Table from "./tjsjTable.vue";
|
||||||
import YlzTable from "./jcTable.vue"
|
import YlzTable from "./jcTable.vue";
|
||||||
import drpOptions from './jcOptions'
|
import drpOptions from "./jcOptions";
|
||||||
import projectOptions from './barOptions'
|
import projectOptions from "./barOptions";
|
||||||
const stm = moment().subtract(7, 'days').set({
|
const stm = moment()
|
||||||
minute: 0,
|
.subtract(7, "days")
|
||||||
second: 0
|
.set({
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
minute: 0,
|
||||||
const etm = moment().set({
|
second: 0,
|
||||||
minute: 0,
|
})
|
||||||
second: 0
|
.format("YYYY-MM-DD HH:mm");
|
||||||
}).format("YYYY-MM-DD HH:mm");
|
const etm = moment()
|
||||||
const projectTime = moment().set({
|
.set({
|
||||||
minute: 0,
|
minute: 0,
|
||||||
second: 0
|
second: 0,
|
||||||
}).format("YYYY-MM-DD HH:mm")
|
})
|
||||||
export default {
|
.format("YYYY-MM-DD HH:mm");
|
||||||
components: {
|
const projectTime = moment()
|
||||||
Table,
|
.set({
|
||||||
YlzTable
|
minute: 0,
|
||||||
},
|
second: 0,
|
||||||
data() {
|
})
|
||||||
return {
|
.format("YYYY-MM-DD HH:mm");
|
||||||
startTime: stm,
|
export default {
|
||||||
endTime: etm,
|
components: {
|
||||||
stm,
|
Table,
|
||||||
etm,
|
YlzTable,
|
||||||
showTime: false,
|
},
|
||||||
showTime1: false,
|
data() {
|
||||||
activeOne: 0,
|
return {
|
||||||
ylzData: [],
|
startTime: stm,
|
||||||
chartData1: {},
|
endTime: etm,
|
||||||
chartData: {},
|
stm,
|
||||||
stnm: '',
|
etm,
|
||||||
stcd:'',
|
showTime: false,
|
||||||
projectTime,
|
showTime1: false,
|
||||||
projectData: '',
|
activeOne: 0,
|
||||||
projectBarData: {}
|
ylzData: [],
|
||||||
}
|
chartData1: {},
|
||||||
},
|
chartData: {},
|
||||||
methods: {
|
stnm: "",
|
||||||
|
stcd: "",
|
||||||
// 获取雨量信息
|
projectTime,
|
||||||
async getrainInfo() {
|
projectData: "",
|
||||||
try {
|
projectBarData: {},
|
||||||
const {
|
totalTableData: {},
|
||||||
data
|
};
|
||||||
} = await uni.$http.post(
|
},
|
||||||
"/gunshiApp/tsg/attResBase/rainBasinDivision/queryStStbprpPerHour/StcdAndStartTimeAndEndTime", {
|
methods: {
|
||||||
stcd: this.stcd,
|
// 获取雨量信息
|
||||||
startTime: moment(this.stm).format("YYYY-MM-DD HH:mm:ss"),
|
async getrainInfo() {
|
||||||
endTime: moment(this.etm).format("YYYY-MM-DD HH:mm:ss")
|
uni.showLoading({
|
||||||
})
|
title: "加载中...",
|
||||||
if (data.code == 200) {
|
mask: true,
|
||||||
this.ylzData = data.data;
|
});
|
||||||
}
|
try {
|
||||||
} catch (error) {
|
const { data } = await uni.$http.post(
|
||||||
uni.$showMsg();
|
"/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"),
|
||||||
async getrainChartInfo() {
|
}
|
||||||
try {
|
);
|
||||||
const {
|
if (data.code == 200) {
|
||||||
data
|
uni.hideLoading();
|
||||||
} = 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();
|
|
||||||
|
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.tab-bar {
|
.tab-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
padding: 10px 40px;
|
padding: 10px 40px;
|
||||||
border-bottom: 1px solid #dfdfdf;
|
border-bottom: 1px solid #dfdfdf;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
color: #39a6ff;
|
color: #39a6ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ylz-chart-area {
|
.ylz-chart-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 230px;
|
height: 230px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ylz-table-area {
|
.ylz-table-area {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yl-dl-yb {
|
.yl-dl-yb {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yl-bluetiao {
|
.yl-bluetiao {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
background-color: #02a7f0;
|
background-color: #02a7f0;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ylzpro-chart-area {
|
.ylzpro-chart-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
background-color: #fff;
|
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%;
|
.sw-name {
|
||||||
position: relative;
|
position: absolute;
|
||||||
border: 1px solid #efefef;
|
top: 0;
|
||||||
height: 60px;
|
left: 0;
|
||||||
text-align: center;
|
// padding: 0 5px;
|
||||||
line-height: 75px;
|
color: #49a7f0;
|
||||||
margin-right: 10px;
|
background-color: #cbecfd;
|
||||||
|
font-size: 12px;
|
||||||
.sw-name {
|
line-height: 20px;
|
||||||
position: absolute;
|
padding: 0 5px;
|
||||||
top: 0;
|
}
|
||||||
left: 0;
|
}
|
||||||
// padding: 0 5px;
|
|
||||||
color: #49a7f0;
|
|
||||||
background-color: #cbecfd;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 20px;
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -85,9 +85,15 @@
|
||||||
<script>
|
<script>
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
tableData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData:{},
|
stcd:'',
|
||||||
days:moment().diff(moment().startOf('year'),'days')+1
|
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>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import {wgs84ToGcj02} from '../../../utils/tools.js'
|
||||||
const iconObj = {
|
const iconObj = {
|
||||||
"溢洪道":{
|
"溢洪道":{
|
||||||
1: '/static/tabs/yhd1.png',
|
1: '/static/tabs/yhd1.png',
|
||||||
|
|
@ -97,6 +98,10 @@
|
||||||
1: '/static/tabs/zshenya1.png',
|
1: '/static/tabs/zshenya1.png',
|
||||||
2: "/static/tabs/zshenya2.png"
|
2: "/static/tabs/zshenya2.png"
|
||||||
},
|
},
|
||||||
|
"副坝渗压": {
|
||||||
|
1: '/static/tabs/zshenya1.png',
|
||||||
|
2: "/static/tabs/zshenya2.png"
|
||||||
|
},
|
||||||
"发电洞位移": {
|
"发电洞位移": {
|
||||||
1: '/static/tabs/zweiyi1.png',
|
1: '/static/tabs/zweiyi1.png',
|
||||||
2: "/static/tabs/zweiyi2.png"
|
2: "/static/tabs/zweiyi2.png"
|
||||||
|
|
@ -215,7 +220,7 @@
|
||||||
width: 15,
|
width: 15,
|
||||||
height: 15,
|
height: 15,
|
||||||
id: 106,
|
id: 106,
|
||||||
title: "灌溉发电洞变型监测",
|
title: "灌溉发电洞变形监测",
|
||||||
pointType: "发电洞位移",
|
pointType: "发电洞位移",
|
||||||
name: "安全监测"
|
name: "安全监测"
|
||||||
},
|
},
|
||||||
|
|
@ -229,6 +234,17 @@
|
||||||
title: "副坝",
|
title: "副坝",
|
||||||
pointType: "副坝",
|
pointType: "副坝",
|
||||||
name: "水库工程"
|
name: "水库工程"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
latitude: 31.491300,
|
||||||
|
longitude: 114.7642000,
|
||||||
|
iconPath: '/static/tabs/zshenya1.png',
|
||||||
|
width: 15,
|
||||||
|
height: 15,
|
||||||
|
id: 97,
|
||||||
|
title: "副坝渗压监测",
|
||||||
|
pointType: "副坝渗压",
|
||||||
|
name: "安全监测"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
latitude: 31.491200,
|
latitude: 31.491200,
|
||||||
|
|
@ -334,8 +350,11 @@
|
||||||
url='/pages/skInfo/detail/index?value=2&key=4'
|
url='/pages/skInfo/detail/index?value=2&key=4'
|
||||||
}else if(type == "发电洞渗压"){
|
}else if(type == "发电洞渗压"){
|
||||||
url=`/pages/sjc/index?name=灌溉发电洞渗压监测`
|
url=`/pages/sjc/index?name=灌溉发电洞渗压监测`
|
||||||
}else if(type == "发电洞位移"){
|
}else if(type == "副坝渗压"){
|
||||||
url=`/pages/sjc/index?name=灌溉发电洞变型监测`
|
url=`/pages/sjc/index?name=副坝渗压监测`
|
||||||
|
}
|
||||||
|
else if(type == "发电洞位移"){
|
||||||
|
url=`/pages/sjc/index?name=灌溉发电洞变形监测`
|
||||||
}else if(type == "副坝"){
|
}else if(type == "副坝"){
|
||||||
url='/pages/skInfo/detail/index?value=2&key=2'
|
url='/pages/skInfo/detail/index?value=2&key=2'
|
||||||
}else if(type == "副坝位移"){
|
}else if(type == "副坝位移"){
|
||||||
|
|
@ -393,8 +412,8 @@
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
const videoList = data.data.map(item => ({
|
const videoList = data.data.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
latitude: item.lttd - 0,
|
latitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[1],
|
||||||
longitude: item.lgtd - 0,
|
longitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[0] - 0.0007,
|
||||||
iconPath: '/static/tabs/sxt1.png',
|
iconPath: '/static/tabs/sxt1.png',
|
||||||
width: 15,
|
width: 15,
|
||||||
height: 15,
|
height: 15,
|
||||||
|
|
@ -421,8 +440,8 @@
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
const rainList = data.data.map(item => ({
|
const rainList = data.data.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
latitude: item.lttd - 0,
|
latitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[1],
|
||||||
longitude: item.lgtd - 0,
|
longitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[0] - 0.0007,
|
||||||
iconPath: '/static/tabs/sl1.png',
|
iconPath: '/static/tabs/sl1.png',
|
||||||
width: 15,
|
width: 15,
|
||||||
height: 15,
|
height: 15,
|
||||||
|
|
@ -443,12 +462,12 @@
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
} = await uni.$http.post("/gunshiApp/tsg/reservoir/water/list", )
|
} = await uni.$http.post("/gunshiApp/tsg/reservoir/water/listV2", )
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
const waterList = data.data.map(item => ({
|
const waterList = data.data.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
latitude: item.lttd - 0.0001,
|
latitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[1] - 0.0001,
|
||||||
longitude: item.lgtd - 0.0001,
|
longitude: wgs84ToGcj02(item.lgtd - 0,item.lttd - 0)[0] - 0.0007 - 0.0001,
|
||||||
iconPath: '/static/tabs/yl1.png',
|
iconPath: '/static/tabs/yl1.png',
|
||||||
width: 15,
|
width: 15,
|
||||||
height: 15,
|
height: 15,
|
||||||
|
|
@ -478,6 +497,7 @@
|
||||||
this.getVideoList();
|
this.getVideoList();
|
||||||
this.getRainList();
|
this.getRainList();
|
||||||
this.getWaterList();
|
this.getWaterList();
|
||||||
|
console.log(wgs84ToGcj02(114.7632670,31.4934740))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -9,4 +9,48 @@ export const GetInterval=(min,max,step=10)=>{
|
||||||
}else{
|
}else{
|
||||||
return Math.ceil(s)
|
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;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue