Merge remote-tracking branch 'origin/jixian' into jixian
# Conflicts: # pages/maps/index.vue
This commit is contained in:
commit
4083d013a6
|
|
@ -48,7 +48,7 @@ http.interceptor.request((config, cancel) => { /* 请求之前拦截器 */
|
||||||
'app-id' : uni.getAccountInfoSync().miniProgram.appId,
|
'app-id' : uni.getAccountInfoSync().miniProgram.appId,
|
||||||
"client-type" : "MA",
|
"client-type" : "MA",
|
||||||
'third-session' : uni.getStorageSync('third_session')||'123',
|
'third-session' : uni.getStorageSync('third_session')||'123',
|
||||||
'X-Tenant-Id' : '1001'
|
'X-Tenant-Id' : '1003'
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (!token) { // 如果token不存在,调用cancel 会取消本次请求,但是该函数的catch() 仍会执行
|
if (!token) { // 如果token不存在,调用cancel 会取消本次请求,但是该函数的catch() 仍会执行
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name" : "武乡面源污染监测平台",
|
"name" : "稷山县县面源污染监测平台",
|
||||||
"appid" : "__UNI__A58A5D7",
|
"appid" : "__UNI__A58A5D7",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "2.2.22",
|
"versionName" : "2.2.22",
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wx9eda310e459cc7b9",
|
"appid" : "wxca651c881cfb603f",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"es6" : true,
|
"es6" : true,
|
||||||
|
|
|
||||||
|
|
@ -260,14 +260,12 @@
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.item = JSON.parse(decodeURIComponent(options.item));
|
this.item = JSON.parse(decodeURIComponent(options.item));
|
||||||
console.log("...........",this.item)
|
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: res => {
|
success: res => {
|
||||||
var pxToRpxScale = 750 / res.windowWidth
|
var pxToRpxScale = 750 / res.windowWidth
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -328,7 +326,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tosjdetail(item,index){
|
tosjdetail(item,index){
|
||||||
console.log(item,'gegwg')
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/packDetail/pages/Site/sjdetail?item=' + encodeURIComponent(JSON.stringify(item)) + '&stationCode='+this.details.stationCode + '&stationName=' + this.details.stationName
|
url:'/packDetail/pages/Site/sjdetail?item=' + encodeURIComponent(JSON.stringify(item)) + '&stationCode='+this.details.stationCode + '&stationName=' + this.details.stationName
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -144,27 +143,20 @@
|
||||||
this.List[i].survDataCount = (this.List[i].survDataCount /100000000).toFixed(1) + '亿'
|
this.List[i].survDataCount = (this.List[i].survDataCount /100000000).toFixed(1) + '亿'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.List,'35415')
|
|
||||||
if(res.data.data.total != 0){
|
if(res.data.data.total != 0){
|
||||||
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
||||||
console.log(this.allNum,'总页数')
|
|
||||||
if(this.allNum.indexOf('.') == -1) {
|
if(this.allNum.indexOf('.') == -1) {
|
||||||
this.allNum = this.allNum;
|
this.allNum = this.allNum;
|
||||||
console.log(this.allNum,'if')
|
|
||||||
} else {
|
} else {
|
||||||
this.allNum = parseInt(Number(this.allNum)+1);
|
this.allNum = parseInt(Number(this.allNum)+1);
|
||||||
console.log(this.allNum,'else')
|
|
||||||
}
|
}
|
||||||
console.log(this.pageNo,this.allNum,'156156')
|
|
||||||
if(this.pageNo == this.allNum) {
|
if(this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus='nomore'
|
this.loadStatus='nomore'
|
||||||
console.log(this.isLastpage,'true','nomore')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage,'false')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -176,7 +168,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
lower() {
|
lower() {
|
||||||
console.log("最后一页了,取消下拉功能");
|
|
||||||
// 最后一页了,取消下拉功能
|
// 最后一页了,取消下拉功能
|
||||||
if (this.isLastpage) {
|
if (this.isLastpage) {
|
||||||
return
|
return
|
||||||
|
|
@ -186,7 +177,6 @@
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
num = num+1;
|
num = num+1;
|
||||||
},1000)
|
},1000)
|
||||||
console.log(this.intervalId,num)
|
|
||||||
this.pageNo = this.pageNo + 1;
|
this.pageNo = this.pageNo + 1;
|
||||||
let params = {}
|
let params = {}
|
||||||
params.pageNo = this.pageNo
|
params.pageNo = this.pageNo
|
||||||
|
|
@ -199,12 +189,10 @@
|
||||||
if(this.pageNo == this.allNum) {
|
if(this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus='nomore'
|
this.loadStatus='nomore'
|
||||||
console.log(this.isLastpage,'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage,'false')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,6 @@
|
||||||
value: (Math.floor(Object.values(data[i])[k] * 100) / 100).toFixed(2),
|
value: (Math.floor(Object.values(data[i])[k] * 100) / 100).toFixed(2),
|
||||||
dataDateTime:data[i].dataDateTime
|
dataDateTime:data[i].dataDateTime
|
||||||
})
|
})
|
||||||
console.log(data[i].codelist, '数据')
|
|
||||||
console.log(data, '数据全部')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -141,26 +139,19 @@
|
||||||
}
|
}
|
||||||
// this.list = data
|
// this.list = data
|
||||||
this.list = this.list.concat(data)
|
this.list = this.list.concat(data)
|
||||||
// console.log(this.list, '数据all')
|
|
||||||
if(res.data.data.total != 0){
|
if(res.data.data.total != 0){
|
||||||
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
||||||
console.log(this.allNum,'总页数')
|
|
||||||
if(this.allNum.indexOf('.') == -1) {
|
if(this.allNum.indexOf('.') == -1) {
|
||||||
this.allNum = this.allNum;
|
this.allNum = this.allNum;
|
||||||
console.log(this.allNum,'if')
|
|
||||||
} else {
|
} else {
|
||||||
this.allNum = parseInt(Number(this.allNum)+1);
|
this.allNum = parseInt(Number(this.allNum)+1);
|
||||||
console.log(this.allNum,'else')
|
|
||||||
}
|
}
|
||||||
console.log(this.pageNo,this.allNum,'156156')
|
|
||||||
if(this.pageNo == this.allNum) {
|
if(this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus='nomore'
|
this.loadStatus='nomore'
|
||||||
console.log(this.isLastpage,'true','nomore')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage,'false')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -169,7 +160,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
lower() {
|
lower() {
|
||||||
console.log("最后一页了,取消下拉功能");
|
|
||||||
// 最后一页了,取消下拉功能
|
// 最后一页了,取消下拉功能
|
||||||
if (this.isLastpage) {
|
if (this.isLastpage) {
|
||||||
return
|
return
|
||||||
|
|
@ -179,7 +169,6 @@
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
num = num+1;
|
num = num+1;
|
||||||
},1000)
|
},1000)
|
||||||
console.log(this.intervalId,num)
|
|
||||||
this.pageNo = this.pageNo + 1;
|
this.pageNo = this.pageNo + 1;
|
||||||
let params = {}
|
let params = {}
|
||||||
params.pollutionCode = this.details.code
|
params.pollutionCode = this.details.code
|
||||||
|
|
@ -201,8 +190,6 @@
|
||||||
value: (Math.floor(Object.values(data[i])[k] * 100) / 100).toFixed(2),
|
value: (Math.floor(Object.values(data[i])[k] * 100) / 100).toFixed(2),
|
||||||
dataDateTime:data[i].dataDateTime
|
dataDateTime:data[i].dataDateTime
|
||||||
})
|
})
|
||||||
console.log(data[i].codelist, '数据')
|
|
||||||
console.log(data, '数据全部')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -214,12 +201,10 @@
|
||||||
if(this.pageNo == this.allNum) {
|
if(this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus='nomore'
|
this.loadStatus='nomore'
|
||||||
console.log(this.isLastpage,'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage,'false')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,11 @@
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 在template部分,找到年月日选择器部分,修改为以下代码 -->
|
<!-- 年月日选择器 -->
|
||||||
<view class="uni-form-item uni-column">
|
<view class="uni-form-item uni-column">
|
||||||
<radio-group class="radio-group" @change="radioChange">
|
<radio-group class="radio-group" @change="radioChange">
|
||||||
<label class="radio-label" v-for="(item, index) in timList" :key="item.value">
|
<label class="radio-label" v-for="(item, index) in timList" :key="item.value" :class="{ 'checked': current === index }">
|
||||||
<radio :value="item.value" :checked="index === current" class="radio-item" />
|
<radio :value="item.value" :checked="index === current" class="radio-item" color="#0f6efe" />
|
||||||
<view class="radio-text">{{item.name}}</view>
|
<view class="radio-text">{{item.name}}</view>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
|
|
@ -126,16 +126,19 @@
|
||||||
height: 0,
|
height: 0,
|
||||||
scorllheight: 0,
|
scorllheight: 0,
|
||||||
zt: '',
|
zt: '',
|
||||||
date: new Date().getFullYear(),
|
date: new Date().getFullYear().toString(),
|
||||||
array: [],
|
array: [],
|
||||||
index: '',
|
index: 0,
|
||||||
index1: '',
|
index1: 0,
|
||||||
array1: [],
|
array1: [],
|
||||||
arrays: [],
|
arrays: [],
|
||||||
list: [],
|
list: [],
|
||||||
tabList: ['站点名称', '告警指标', '指标值', '告警时间'],
|
tabList: ['站点名称', '告警指标', '指标值', '告警时间'],
|
||||||
pjlist: [],
|
pjlist: [],
|
||||||
chartData: {},
|
chartData: {
|
||||||
|
categories: [],
|
||||||
|
series: []
|
||||||
|
},
|
||||||
opts: {
|
opts: {
|
||||||
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
|
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
|
||||||
padding: [15,10,0,15],
|
padding: [15,10,0,15],
|
||||||
|
|
@ -144,9 +147,8 @@
|
||||||
enableScroll: false,
|
enableScroll: false,
|
||||||
legend: {},
|
legend: {},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
disabled: false, // 启用X轴
|
disabled: false,
|
||||||
// 不设置itemCount,因为我们自定义显示的数据
|
gridType: 'dash',
|
||||||
gridType: 'dash', // 网格类型
|
|
||||||
dashLength: 2,
|
dashLength: 2,
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
|
|
@ -176,8 +178,8 @@
|
||||||
allNum: '',
|
allNum: '',
|
||||||
isLastpage: '',
|
isLastpage: '',
|
||||||
intervalId: null,
|
intervalId: null,
|
||||||
loadStatus: 'more', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
|
loadStatus: 'more',
|
||||||
isLoadMore: false, //是否加载中
|
isLoadMore: false,
|
||||||
show: false,
|
show: false,
|
||||||
show1: false,
|
show1: false,
|
||||||
top: 0,
|
top: 0,
|
||||||
|
|
@ -190,8 +192,7 @@
|
||||||
zxtdata: [],
|
zxtdata: [],
|
||||||
timList: [{
|
timList: [{
|
||||||
value: 'yearMonth',
|
value: 'yearMonth',
|
||||||
name: '年',
|
name: '年'
|
||||||
checked: 'true'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'monthDays',
|
value: 'monthDays',
|
||||||
|
|
@ -203,9 +204,11 @@
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
current: 0,
|
current: 0,
|
||||||
dateqs:new Date().getFullYear(),
|
dateqs: new Date().getFullYear().toString(),
|
||||||
datetwo:currentDate,
|
datetwo: currentDate,
|
||||||
riqinumber:'yearMonth',
|
riqinumber: 'yearMonth',
|
||||||
|
startDate: '2000-01-01',
|
||||||
|
endDate: '2030-12-31'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -214,7 +217,7 @@
|
||||||
var pxToRpxScale = 750 / res.windowWidth
|
var pxToRpxScale = 750 / res.windowWidth
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -224,10 +227,14 @@
|
||||||
this.importWyw()
|
this.importWyw()
|
||||||
this.getazsurvMulchRecord()
|
this.getazsurvMulchRecord()
|
||||||
this.getyjList()
|
this.getyjList()
|
||||||
// this.gettj()
|
|
||||||
this.qushicov()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 格式化数字
|
||||||
|
cutMoneyFiter(val) {
|
||||||
|
if (!val && val !== 0) return 0
|
||||||
|
return val
|
||||||
|
},
|
||||||
|
// 获取站点列表
|
||||||
importWyw() {
|
importWyw() {
|
||||||
this.array = []
|
this.array = []
|
||||||
this.arrays = []
|
this.arrays = []
|
||||||
|
|
@ -247,12 +254,22 @@
|
||||||
})
|
})
|
||||||
this.array.push(res.data.data[i].stationName)
|
this.array.push(res.data.data[i].stationName)
|
||||||
}
|
}
|
||||||
|
// 站点数据加载完成后,设置默认站点并获取趋势数据
|
||||||
|
if (this.array.length > 0) {
|
||||||
|
this.stationCode = this.arrays[0]?.value || ''
|
||||||
|
// 延迟一点确保数据已渲染
|
||||||
|
setTimeout(() => {
|
||||||
|
this.qushicov()
|
||||||
|
}, 300)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('获取站点列表失败', err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取监测站点数据
|
// 获取监测站点设备数据
|
||||||
getazsurvMulchRecord() {
|
getazsurvMulchRecord() {
|
||||||
this.arrays = []
|
this.arrays = []
|
||||||
this.array1 = ['全部监测设备', ]
|
this.array1 = ['全部监测设备']
|
||||||
this.arrays1 = [{
|
this.arrays1 = [{
|
||||||
label: '全部监测设备',
|
label: '全部监测设备',
|
||||||
value: ''
|
value: ''
|
||||||
|
|
@ -269,6 +286,8 @@
|
||||||
})
|
})
|
||||||
this.array1.push(res.data.data[i].fullDeviceName)
|
this.array1.push(res.data.data[i].fullDeviceName)
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('获取设备列表失败', err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取预警列表
|
// 获取预警列表
|
||||||
|
|
@ -295,11 +314,18 @@
|
||||||
data[i].shi = data[i].times[3];
|
data[i].shi = data[i].times[3];
|
||||||
data[i].fen = data[i].times[4];
|
data[i].fen = data[i].times[4];
|
||||||
data[i].miao = data[i].times[5];
|
data[i].miao = data[i].times[5];
|
||||||
data[i].datetime = data[i].yue + '-' + data[i].ri + ' ' + data[i].shi + ':' + data[i]
|
data[i].datetime = data[i].yue + '-' + data[i].ri + ' ' + data[i].shi + ':' + data[i].fen
|
||||||
.fen
|
if (data[i].alertContent && data[i].alertContent.indexOf('监测数据名称:') != -1) {
|
||||||
if (data[i].alertContent.indexOf('监测数据名称:') != -1) {
|
|
||||||
data[i].alertContent = data[i].alertContent.replace('监测数据名称:', '')
|
data[i].alertContent = data[i].alertContent.replace('监测数据名称:', '')
|
||||||
}
|
}
|
||||||
|
// 如果alertContent是字符串,转换为数组格式
|
||||||
|
if (typeof data[i].alertContent === 'string') {
|
||||||
|
data[i].alertContent = [{
|
||||||
|
name: '告警',
|
||||||
|
val: data[i].alertContent,
|
||||||
|
unit: ''
|
||||||
|
}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.list = this.list.concat(data)
|
this.list = this.list.concat(data)
|
||||||
this.total = res.data.data.total
|
this.total = res.data.data.total
|
||||||
|
|
@ -315,7 +341,6 @@
|
||||||
this.loadStatus = 'nomore'
|
this.loadStatus = 'nomore'
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -325,11 +350,13 @@
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.isRefresher = false
|
this.isRefresher = false
|
||||||
|
}).catch(err => {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.log('获取预警列表失败', err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 分页加载
|
// 分页加载
|
||||||
lower() {
|
lower() {
|
||||||
// 最后一页了,取消下拉功能
|
|
||||||
if (this.isLastpage) {
|
if (this.isLastpage) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -357,11 +384,17 @@
|
||||||
data[i].shi = data[i].times[3];
|
data[i].shi = data[i].times[3];
|
||||||
data[i].fen = data[i].times[4];
|
data[i].fen = data[i].times[4];
|
||||||
data[i].miao = data[i].times[5];
|
data[i].miao = data[i].times[5];
|
||||||
data[i].datetime = data[i].yue + '-' + data[i].ri + ' ' + data[i].shi + ':' + data[i]
|
data[i].datetime = data[i].yue + '-' + data[i].ri + ' ' + data[i].shi + ':' + data[i].fen
|
||||||
.fen
|
if (data[i].alertContent && data[i].alertContent.indexOf('监测数据名称:') != -1) {
|
||||||
if (data[i].alertContent.indexOf('监测数据名称:') != -1) {
|
|
||||||
data[i].alertContent = data[i].alertContent.replace('监测数据名称:', '')
|
data[i].alertContent = data[i].alertContent.replace('监测数据名称:', '')
|
||||||
}
|
}
|
||||||
|
if (typeof data[i].alertContent === 'string') {
|
||||||
|
data[i].alertContent = [{
|
||||||
|
name: '告警',
|
||||||
|
val: data[i].alertContent,
|
||||||
|
unit: ''
|
||||||
|
}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.list = this.list.concat(data)
|
this.list = this.list.concat(data)
|
||||||
if (res.data.data.total != 0) {
|
if (res.data.data.total != 0) {
|
||||||
|
|
@ -370,7 +403,6 @@
|
||||||
this.loadStatus = 'nomore'
|
this.loadStatus = 'nomore'
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -378,6 +410,8 @@
|
||||||
this.loadStatus = 'nomore'
|
this.loadStatus = 'nomore'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('加载更多预警失败', err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取评价
|
// 获取评价
|
||||||
|
|
@ -390,335 +424,178 @@
|
||||||
this.pjnr = data[i].detailValue
|
this.pjnr = data[i].detailValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('获取评价失败', err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选择年月日
|
// 选择年月日
|
||||||
radioChange(e){
|
radioChange(e) {
|
||||||
this.riqinumber = e.detail.value
|
this.riqinumber = e.detail.value
|
||||||
this.bindDateqsChange(this.datetwo,'twotime')
|
// 更新当前选中的索引
|
||||||
},
|
this.timList.forEach((item, index) => {
|
||||||
// 趋势时间
|
if (item.value === e.detail.value) {
|
||||||
bindDateqsChange(e,tiem) {
|
this.current = index
|
||||||
if (tiem=='twotime') {
|
|
||||||
let selectedDate = e
|
|
||||||
if (this.riqinumber === 'monthDays') {
|
|
||||||
this.dateqs = selectedDate.slice(0, 7); // YYYY-MM
|
|
||||||
} else if (this.riqinumber === 'yearMonth') {
|
|
||||||
this.dateqs = selectedDate.slice(0, 4); // YYYY
|
|
||||||
} else {
|
|
||||||
this.dateqs = selectedDate; // YYYY-MM-DD
|
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
let selectedDate = e.detail.value;
|
// 根据选择的模式调整日期格式
|
||||||
if (this.riqinumber === 'monthDays') {
|
let currentDate = new Date()
|
||||||
this.dateqs = selectedDate.slice(0, 7); // YYYY-MM
|
let year = currentDate.getFullYear()
|
||||||
} else if (this.riqinumber === 'yearMonth') {
|
let month = String(currentDate.getMonth() + 1).padStart(2, '0')
|
||||||
this.dateqs = selectedDate.slice(0, 4); // YYYY
|
let day = String(currentDate.getDate()).padStart(2, '0')
|
||||||
} else {
|
|
||||||
this.dateqs = selectedDate; // YYYY-MM-DD
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.qushicov();
|
if (this.riqinumber === 'yearMonth') {
|
||||||
|
this.dateqs = String(year)
|
||||||
|
} else if (this.riqinumber === 'monthDays') {
|
||||||
|
this.dateqs = year + '-' + month
|
||||||
|
} else {
|
||||||
|
this.dateqs = year + '-' + month + '-' + day
|
||||||
|
}
|
||||||
|
this.qushicov()
|
||||||
|
},
|
||||||
|
// 趋势时间选择
|
||||||
|
bindDateqsChange(e) {
|
||||||
|
let selectedDate = e.detail.value
|
||||||
|
if (this.riqinumber === 'yearMonth') {
|
||||||
|
this.dateqs = selectedDate.slice(0, 4)
|
||||||
|
} else if (this.riqinumber === 'monthDays') {
|
||||||
|
this.dateqs = selectedDate.slice(0, 7)
|
||||||
|
} else {
|
||||||
|
this.dateqs = selectedDate
|
||||||
|
}
|
||||||
|
this.qushicov()
|
||||||
},
|
},
|
||||||
// 趋势接口
|
// 趋势接口
|
||||||
qushicov() {
|
qushicov() {
|
||||||
let data = {
|
// 如果没有站点编码,使用默认值或等待
|
||||||
summrayMode: this.riqinumber,
|
|
||||||
startTime: this.dateqs,
|
|
||||||
stationCode:this.stationCode,
|
|
||||||
}
|
|
||||||
this.$http.post('/applet/survDeviceDeploy/waterIntegrateStatistic', data).then(iem => {
|
|
||||||
let lynum = iem.data.data
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
let categories = [];
|
|
||||||
let displayCategories = []; // 用于显示的X轴数据
|
|
||||||
let series = [];
|
|
||||||
let allValues = []; // 收集所有数值
|
|
||||||
|
|
||||||
if (lynum.tableHead && lynum.tableHead.length > 0) {
|
|
||||||
categories = lynum.tableIndex;
|
|
||||||
|
|
||||||
// 计算要显示的X轴数据:第一个、中间、最后一个
|
|
||||||
if (categories.length > 0) {
|
|
||||||
const first = categories[0];
|
|
||||||
const middle = categories[Math.floor(categories.length / 2)];
|
|
||||||
const last = categories[categories.length - 3];
|
|
||||||
|
|
||||||
// 创建显示用的categories数组,只在这三个位置有值,其他为空字符串
|
|
||||||
displayCategories = categories.map((item, index) => {
|
|
||||||
if (index === 0 || index === Math.floor(categories.length / 2) || index === categories.length - 2) {
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
lynum.tableHead.forEach((header, index) => {
|
|
||||||
const seriesData = lynum.tableData2.map(row => {
|
|
||||||
const value = row[index] === "0" ? 0 : parseFloat(row[index]) || 0;
|
|
||||||
allValues.push(value); // 收集数值
|
|
||||||
return value;
|
|
||||||
});
|
|
||||||
|
|
||||||
series.push({
|
|
||||||
name: header.eleDesc,
|
|
||||||
data: seriesData
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// 动态计算Y轴范围
|
|
||||||
const maxValue = Math.max(...allValues);
|
|
||||||
const minValue = Math.min(...allValues);
|
|
||||||
|
|
||||||
// 设置合适的上下边界,增加一些余量
|
|
||||||
const padding = maxValue * 0.1; // 10%的余量
|
|
||||||
const yAxisMax = maxValue + padding;
|
|
||||||
const yAxisMin = Math.max(0, minValue - padding); // 确保最小值不小于0
|
|
||||||
|
|
||||||
// 更新opts中的yAxis配置
|
|
||||||
this.opts = {
|
|
||||||
...this.opts,
|
|
||||||
yAxis: {
|
|
||||||
gridType: "dash",
|
|
||||||
dashLength: 2,
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
min: yAxisMin,
|
|
||||||
max: yAxisMax
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
let res = {
|
|
||||||
categories: displayCategories, // 使用处理后的显示数据
|
|
||||||
series: series
|
|
||||||
};
|
|
||||||
this.chartData = JSON.parse(JSON.stringify(res));
|
|
||||||
}, 500);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取折线图
|
|
||||||
gettj() {
|
|
||||||
if (!this.stationCode) {
|
if (!this.stationCode) {
|
||||||
this.stationCode = 'S_1'
|
console.log('站点编码为空,使用默认站点')
|
||||||
|
if (this.arrays.length > 0) {
|
||||||
|
this.stationCode = this.arrays[0].value
|
||||||
|
} else {
|
||||||
|
// 如果站点还没加载完成,延迟重试
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.arrays.length > 0) {
|
||||||
|
this.stationCode = this.arrays[0].value
|
||||||
|
this.qushicov()
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$http.post('/applet/wxclient/getPplutionSummry?stationCode=' + this.stationCode).then(res => {
|
|
||||||
this.zxtdata = res.data.data[0]
|
let data = {
|
||||||
this.ec.option.legend.data = ['总磷', '总氮', '硝态氮']
|
summrayMode: this.riqinumber,
|
||||||
this.ec.option.color = ['#19D58A', '#FFC53B', '#3BA0FF']
|
startTime: this.dateqs,
|
||||||
this.ec.option.series = [{
|
stationCode: this.stationCode,
|
||||||
name: '总磷',
|
}
|
||||||
type: 'line',
|
console.log('请求趋势数据参数:', data)
|
||||||
stack: 'Total1',
|
|
||||||
areaStyle: { //区域填充渐变颜色
|
this.$http.post('/applet/survDeviceDeploy/waterIntegrateStatistic', data).then(iem => {
|
||||||
color: {
|
let lynum = iem.data.data
|
||||||
type: 'linear',
|
console.log('趋势数据返回:', lynum)
|
||||||
x: 0,
|
|
||||||
y: 0,
|
// 数据为空时显示空图表
|
||||||
x2: 0,
|
if (!lynum || !lynum.tableHead || !lynum.tableData2 || lynum.tableHead.length === 0) {
|
||||||
y2: 1,
|
console.log('趋势数据为空')
|
||||||
colorStops: [{
|
this.chartData = {
|
||||||
offset: 0,
|
categories: [],
|
||||||
color: 'rgba(25, 213, 138, 1)' // 0% 处的颜色
|
series: []
|
||||||
}, {
|
}
|
||||||
offset: 1,
|
return
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
}
|
||||||
}],
|
|
||||||
global: false // 缺省为 false
|
setTimeout(() => {
|
||||||
|
let categories = []
|
||||||
|
let displayCategories = []
|
||||||
|
let series = []
|
||||||
|
let allValues = []
|
||||||
|
|
||||||
|
// 处理X轴数据
|
||||||
|
categories = lynum.tableIndex || []
|
||||||
|
if (categories.length > 0) {
|
||||||
|
const first = categories[0]
|
||||||
|
const middle = categories[Math.floor(categories.length / 2)]
|
||||||
|
const last = categories[categories.length - 1]
|
||||||
|
|
||||||
|
displayCategories = categories.map((item, index) => {
|
||||||
|
if (index === 0 || index === Math.floor(categories.length / 2) || index === categories.length - 1) {
|
||||||
|
return item
|
||||||
}
|
}
|
||||||
},
|
return ''
|
||||||
emphasis: {
|
})
|
||||||
focus: 'series'
|
}
|
||||||
},
|
|
||||||
data: this.zxtdata.TPSummry
|
// 处理series数据
|
||||||
},
|
lynum.tableHead.forEach((header, index) => {
|
||||||
{
|
const seriesData = (lynum.tableData2 || []).map(row => {
|
||||||
name: '总氮',
|
const value = row[index] === "0" ? 0 : parseFloat(row[index]) || 0
|
||||||
type: 'line',
|
allValues.push(value)
|
||||||
stack: 'Total2',
|
return value
|
||||||
areaStyle: { //区域填充渐变颜色
|
})
|
||||||
color: {
|
|
||||||
type: 'linear',
|
series.push({
|
||||||
x: 0,
|
name: header.eleDesc || header.name || '指标',
|
||||||
y: 0,
|
data: seriesData
|
||||||
x2: 0,
|
})
|
||||||
y2: 1,
|
})
|
||||||
colorStops: [{
|
|
||||||
offset: 0,
|
// 动态计算Y轴范围
|
||||||
color: 'rgba(255, 197, 59, 1)' // 0% 处的颜色
|
if (allValues.length > 0) {
|
||||||
}, {
|
const maxValue = Math.max(...allValues)
|
||||||
offset: 1,
|
const minValue = Math.min(...allValues)
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
const padding = maxValue * 0.1 || 10
|
||||||
}],
|
const yAxisMax = maxValue + padding
|
||||||
global: false // 缺省为 false
|
const yAxisMin = Math.max(0, minValue - padding)
|
||||||
|
|
||||||
|
this.opts = {
|
||||||
|
...this.opts,
|
||||||
|
yAxis: {
|
||||||
|
gridType: "dash",
|
||||||
|
dashLength: 2,
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
min: yAxisMin,
|
||||||
|
max: yAxisMax || 100
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
emphasis: {
|
}
|
||||||
focus: 'series'
|
|
||||||
},
|
this.chartData = {
|
||||||
data: this.zxtdata.TNSummry
|
categories: displayCategories,
|
||||||
},
|
series: series
|
||||||
{
|
}
|
||||||
name: '硝态氮',
|
console.log('图表数据:', this.chartData)
|
||||||
type: 'line',
|
}, 300)
|
||||||
stack: 'Total3',
|
}).catch(err => {
|
||||||
areaStyle: { //区域填充渐变颜色
|
console.log('趋势数据请求失败', err)
|
||||||
color: {
|
this.chartData = {
|
||||||
type: 'linear',
|
categories: [],
|
||||||
x: 0,
|
series: []
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [{
|
|
||||||
offset: 0,
|
|
||||||
color: 'rgba(59, 160, 255, 1)' // 0% 处的颜色
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
|
||||||
}],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: this.zxtdata.NOSummry
|
|
||||||
},
|
|
||||||
]
|
|
||||||
if (this.array[this.index].indexOf('畜禽') != -1) {
|
|
||||||
this.ec.option.legend.data = ['总磷', '总氮', 'COD', '氨氮']
|
|
||||||
this.ec.option.color = ['#19D58A', '#FFC53B', '#3BA0FF', '#FF3B3B']
|
|
||||||
this.ec.option.series = [{
|
|
||||||
name: '总磷',
|
|
||||||
type: 'line',
|
|
||||||
stack: 'Total1',
|
|
||||||
areaStyle: { //区域填充渐变颜色
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [{
|
|
||||||
offset: 0,
|
|
||||||
color: 'rgba(25, 213, 138, 1)' // 0% 处的颜色
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
|
||||||
}],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: this.zxtdata.TPSummry
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '总氮',
|
|
||||||
type: 'line',
|
|
||||||
stack: 'Total2',
|
|
||||||
areaStyle: { //区域填充渐变颜色
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [{
|
|
||||||
offset: 0,
|
|
||||||
color: 'rgba(255, 197, 59, 1)' // 0% 处的颜色
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
|
||||||
}],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: this.zxtdata.TNSummry
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'COD',
|
|
||||||
type: 'line',
|
|
||||||
stack: 'Total3',
|
|
||||||
areaStyle: { //区域填充渐变颜色
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [{
|
|
||||||
offset: 0,
|
|
||||||
color: 'rgba(59, 160, 255, 1)' // 0% 处的颜色
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
|
||||||
}],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: this.zxtdata.CODSummry
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '氨氮',
|
|
||||||
type: 'line',
|
|
||||||
stack: 'Total4',
|
|
||||||
areaStyle: { //区域填充渐变颜色
|
|
||||||
color: {
|
|
||||||
type: 'linear',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
x2: 0,
|
|
||||||
y2: 1,
|
|
||||||
colorStops: [{
|
|
||||||
offset: 0,
|
|
||||||
color: 'rgba(255, 59, 59, 1)' // 0% 处的颜色
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
color: 'rgba(255, 255, 255, 1)' // 100% 处的颜色
|
|
||||||
}],
|
|
||||||
global: false // 缺省为 false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
data: this.zxtdata.NHSummry
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 折线图切换站点
|
// 折线图切换站点
|
||||||
bindPickerChange: function(e) {
|
bindPickerChange: function(e) {
|
||||||
this.index = e.detail.value
|
this.index = e.detail.value
|
||||||
this.stationName = this.array[this.index]
|
let stationName = this.array[this.index]
|
||||||
for (var i = 0; i < this.arrays.length; i++) {
|
for (var i = 0; i < this.arrays.length; i++) {
|
||||||
if (this.stationName == this.arrays[i].label) {
|
if (stationName == this.arrays[i].label) {
|
||||||
this.stationCode = this.arrays[i].value
|
this.stationCode = this.arrays[i].value
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this.gettj()
|
|
||||||
this.qushicov()
|
this.qushicov()
|
||||||
},
|
},
|
||||||
// 预警切换站点
|
// 预警切换站点
|
||||||
bindPickerChange1: function(e) {
|
bindPickerChange1: function(e) {
|
||||||
this.index1 = e.detail.value
|
this.index1 = e.detail.value
|
||||||
this.stationName1 = this.array1[this.index1]
|
this.stationName1 = this.array1[this.index1]
|
||||||
for (var i = 0; i < this.arrays.length; i++) {
|
for (var i = 0; i < this.arrays1.length; i++) {
|
||||||
if (this.stationName1 == this.arrays1[i].label) {
|
if (this.stationName1 == this.arrays1[i].label) {
|
||||||
this.stationCode1 = this.arrays1[i].value
|
this.stationCode1 = this.arrays1[i].value
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.stationName1 == '全部监测设备') {
|
if (this.stationName1 == '全部监测设备') {
|
||||||
|
|
@ -739,7 +616,6 @@
|
||||||
let year = date.getFullYear();
|
let year = date.getFullYear();
|
||||||
let month = date.getMonth() + 1;
|
let month = date.getMonth() + 1;
|
||||||
let day = date.getDate();
|
let day = date.getDate();
|
||||||
|
|
||||||
if (type === 'start') {
|
if (type === 'start') {
|
||||||
year = year - 10;
|
year = year - 10;
|
||||||
} else if (type === 'end') {
|
} else if (type === 'end') {
|
||||||
|
|
@ -755,12 +631,10 @@
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
// height: 100%;
|
|
||||||
background-color: #0f6efe;
|
background-color: #0f6efe;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
// height: 100%;
|
|
||||||
padding: 0 32rpx;
|
padding: 0 32rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|
@ -796,7 +670,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ybecharts image {
|
.ybecharts image {
|
||||||
// position: absolute;
|
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
@ -1009,21 +882,18 @@
|
||||||
|
|
||||||
.tabitem:first-child {
|
.tabitem:first-child {
|
||||||
width: 31%;
|
width: 31%;
|
||||||
// text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabitem:nth-child(2) {
|
.tabitem:nth-child(2) {
|
||||||
width: 27%;
|
width: 27%;
|
||||||
// text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabitem:nth-child(3) {
|
.tabitem:nth-child(3) {
|
||||||
width: 19%;
|
width: 19%;
|
||||||
// text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabitem:nth-child(4) {
|
.tabitem:nth-child(4) {
|
||||||
flex: 1 // text-align: center
|
flex: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-Y {
|
.scroll-Y {
|
||||||
|
|
@ -1083,10 +953,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .lists_item:first-child {
|
|
||||||
// padding-top: 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.jczbs {
|
.jczbs {
|
||||||
width: 32%;
|
width: 32%;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|
@ -1096,7 +962,6 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
// text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.zbz {
|
.zbz {
|
||||||
|
|
@ -1108,7 +973,6 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
// text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sbsj {
|
.sbsj {
|
||||||
|
|
@ -1117,8 +981,6 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #667482;
|
color: #667482;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
// text-align: center
|
|
||||||
// text-align: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.szqss {
|
.szqss {
|
||||||
|
|
@ -1134,12 +996,9 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
// text-align: center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.load {
|
.load {
|
||||||
// height: 50rpx;
|
|
||||||
// line-height: 50rpx;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #c6c6c6;
|
color: #c6c6c6;
|
||||||
}
|
}
|
||||||
|
|
@ -1147,14 +1006,13 @@
|
||||||
.pagebot {
|
.pagebot {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择年月日
|
// 选择年月日
|
||||||
.radio-group {
|
.radio-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
// margin: 20rpx 32rpx 0;
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
padding: 8rpx;
|
padding: 8rpx;
|
||||||
// width: 60%;
|
|
||||||
.radio-label {
|
.radio-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -1169,7 +1027,6 @@
|
||||||
background: rgba(15, 110, 254, 0.1);
|
background: rgba(15, 110, 254, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选中状态背景
|
|
||||||
&.checked {
|
&.checked {
|
||||||
background: #0f6efe;
|
background: #0f6efe;
|
||||||
|
|
||||||
|
|
@ -1183,7 +1040,6 @@
|
||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
|
|
||||||
// 选中状态样式
|
|
||||||
&[checked] {
|
&[checked] {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,6 @@
|
||||||
text:res.data.data[i].itemText,
|
text:res.data.data[i].itemText,
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
console.log(this.hobby)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -207,7 +206,6 @@
|
||||||
text:res.data.data[i].itemText,
|
text:res.data.data[i].itemText,
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
console.log(this.hobby3)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -217,17 +215,14 @@
|
||||||
},
|
},
|
||||||
// 选择养殖品种
|
// 选择养殖品种
|
||||||
change1(e){
|
change1(e){
|
||||||
console.log(e)
|
|
||||||
this.details.breedVariety = e.detail.value
|
this.details.breedVariety = e.detail.value
|
||||||
},
|
},
|
||||||
// 选择治污模式
|
// 选择治污模式
|
||||||
change2(e){
|
change2(e){
|
||||||
console.log(e)
|
|
||||||
this.details.controlMode = e.detail.value
|
this.details.controlMode = e.detail.value
|
||||||
},
|
},
|
||||||
// 选择利用模式
|
// 选择利用模式
|
||||||
change3(e){
|
change3(e){
|
||||||
console.log(e)
|
|
||||||
this.details.useMode = e.detail.value
|
this.details.useMode = e.detail.value
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,6 @@
|
||||||
text:res.data.data[i].itemText,
|
text:res.data.data[i].itemText,
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
console.log(this.hobby)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -155,7 +154,6 @@
|
||||||
text:res.data.data[i].itemText,
|
text:res.data.data[i].itemText,
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
console.log(this.hobby3)
|
|
||||||
}
|
}
|
||||||
for(var i=0;i<this.hobby3.length;i++){
|
for(var i=0;i<this.hobby3.length;i++){
|
||||||
if(this.details.useMode){
|
if(this.details.useMode){
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,6 @@
|
||||||
text:res.data.data[i].itemText,
|
text:res.data.data[i].itemText,
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
console.log(this.hobby)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -208,7 +207,6 @@
|
||||||
text:res.data.data[i].itemText,
|
text:res.data.data[i].itemText,
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
console.log(this.hobby3)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -218,17 +216,14 @@
|
||||||
},
|
},
|
||||||
// 选择养殖品种
|
// 选择养殖品种
|
||||||
change1(e){
|
change1(e){
|
||||||
console.log(e)
|
|
||||||
this.details.breedVariety = e.detail.value
|
this.details.breedVariety = e.detail.value
|
||||||
},
|
},
|
||||||
// 选择治污模式
|
// 选择治污模式
|
||||||
change2(e){
|
change2(e){
|
||||||
console.log(e)
|
|
||||||
this.details.controlMode = e.detail.value
|
this.details.controlMode = e.detail.value
|
||||||
},
|
},
|
||||||
// 选择利用模式
|
// 选择利用模式
|
||||||
change3(e){
|
change3(e){
|
||||||
console.log(e)
|
|
||||||
this.details.useMode = e.detail.value
|
this.details.useMode = e.detail.value
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height - 182
|
this.scorllheight = this.height - 182
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -142,14 +141,12 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height - 182
|
this.scorllheight = this.height - 182
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let pages = getCurrentPages();
|
let pages = getCurrentPages();
|
||||||
let currPage = pages[pages.length - 1]; //当前页面
|
let currPage = pages[pages.length - 1]; //当前页面
|
||||||
this.reload = currPage.data.reload
|
this.reload = currPage.data.reload
|
||||||
console.log(this.reload,'Ge')
|
|
||||||
if(this.reload){
|
if(this.reload){
|
||||||
this.farmName = ''
|
this.farmName = ''
|
||||||
this.breedVariety = ''
|
this.breedVariety = ''
|
||||||
|
|
@ -175,7 +172,6 @@
|
||||||
value:res.data.data[i].itemValue
|
value:res.data.data[i].itemValue
|
||||||
})
|
})
|
||||||
this.array.push(res.data.data[i].itemText)
|
this.array.push(res.data.data[i].itemText)
|
||||||
console.log(this.array)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -210,24 +206,18 @@
|
||||||
this.List = this.List.concat(data)
|
this.List = this.List.concat(data)
|
||||||
if(res.data.data.total != 0){
|
if(res.data.data.total != 0){
|
||||||
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+'';
|
||||||
console.log(this.allNum,'总页数')
|
|
||||||
if(this.allNum.indexOf('.') == -1) {
|
if(this.allNum.indexOf('.') == -1) {
|
||||||
this.allNum = this.allNum;
|
this.allNum = this.allNum;
|
||||||
console.log(this.allNum,'if')
|
|
||||||
} else {
|
} else {
|
||||||
this.allNum = parseInt(Number(this.allNum)+1);
|
this.allNum = parseInt(Number(this.allNum)+1);
|
||||||
console.log(this.allNum,'else')
|
|
||||||
}
|
}
|
||||||
console.log(this.pageNo,this.allNum,'156156')
|
|
||||||
if(this.pageNo == this.allNum) {
|
if(this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus='nomore'
|
this.loadStatus='nomore'
|
||||||
console.log(this.isLastpage,'true','nomore')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage,'false')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -240,7 +230,6 @@
|
||||||
},
|
},
|
||||||
// 分页加载
|
// 分页加载
|
||||||
lower() {
|
lower() {
|
||||||
console.log("最后一页了,取消下拉功能");
|
|
||||||
// 最后一页了,取消下拉功能
|
// 最后一页了,取消下拉功能
|
||||||
if (this.isLastpage) {
|
if (this.isLastpage) {
|
||||||
return
|
return
|
||||||
|
|
@ -250,7 +239,6 @@
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
num = num+1;
|
num = num+1;
|
||||||
},1000)
|
},1000)
|
||||||
console.log(this.intervalId,num)
|
|
||||||
this.pageNo = this.pageNo + 1;
|
this.pageNo = this.pageNo + 1;
|
||||||
let params = {}
|
let params = {}
|
||||||
params.pageNo = this.pageNo
|
params.pageNo = this.pageNo
|
||||||
|
|
@ -266,12 +254,10 @@
|
||||||
if(this.pageNo == this.allNum) {
|
if(this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus='nomore'
|
this.loadStatus='nomore'
|
||||||
console.log(this.isLastpage,'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage,'false')
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -281,7 +267,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
bindPickerChange: function(e) {
|
bindPickerChange: function(e) {
|
||||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
||||||
this.index = e.detail.value
|
this.index = e.detail.value
|
||||||
this.breedVariety = this.arrays[this.index].value
|
this.breedVariety = this.arrays[this.index].value
|
||||||
this.breedVariety1 = this.arrays[this.index].text
|
this.breedVariety1 = this.arrays[this.index].text
|
||||||
|
|
@ -312,12 +297,10 @@
|
||||||
},
|
},
|
||||||
// 操作
|
// 操作
|
||||||
caozuo(item){
|
caozuo(item){
|
||||||
console.log(item)
|
|
||||||
var that = this
|
var that = this
|
||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: ['编辑', '删除'],
|
itemList: ['编辑', '删除'],
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
|
||||||
if((res.tapIndex + 1) == 1){
|
if((res.tapIndex + 1) == 1){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/packDetail/pages/fwtz/edit?item='+ encodeURIComponent(JSON.stringify(item))
|
url:'/packDetail/pages/fwtz/edit?item='+ encodeURIComponent(JSON.stringify(item))
|
||||||
|
|
@ -328,8 +311,6 @@
|
||||||
content: '是否删除数据?',
|
content: '是否删除数据?',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
console.log('用户点击确定');
|
|
||||||
console.log(item.id,1)
|
|
||||||
that.$http.delete(that.deleteUrl+'?id='+item.id).then(res =>{
|
that.$http.delete(that.deleteUrl+'?id='+item.id).then(res =>{
|
||||||
if(res.data.code == 0){
|
if(res.data.code == 0){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 武乡县农业农村局</text>
|
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 稷山县县现代农业发展中心</text>
|
||||||
<!-- <view class="loginpage">
|
<!-- <view class="loginpage">
|
||||||
<image class="bigimg" src="../../static/dls.jpg" mode=""></image>
|
<image class="bigimg" src="../../static/dls.jpg" mode=""></image>
|
||||||
<view class="padding text-center margin-top">
|
<view class="padding text-center margin-top">
|
||||||
|
|
@ -100,11 +100,9 @@ export default {
|
||||||
var that = this
|
var that = this
|
||||||
uni.login({
|
uni.login({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res.code)
|
|
||||||
that.code = res.code
|
that.code = res.code
|
||||||
let params = {}
|
let params = {}
|
||||||
params.jsCode = that.code
|
params.jsCode = that.code
|
||||||
console.log(params, 152)
|
|
||||||
api.wxlogin(params).then(res => {
|
api.wxlogin(params).then(res => {
|
||||||
let userInfo = res.data.data;
|
let userInfo = res.data.data;
|
||||||
uni.setStorageSync('third_session', userInfo.thirdSession);
|
uni.setStorageSync('third_session', userInfo.thirdSession);
|
||||||
|
|
@ -146,7 +144,6 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
TypeInput(e) {
|
TypeInput(e) {
|
||||||
console.log(e, 415)
|
|
||||||
// 只能输入数字的验证;
|
// 只能输入数字的验证;
|
||||||
const inputType = /[\W]/g //想限制什么类型在这里换换正则就可以了
|
const inputType = /[\W]/g //想限制什么类型在这里换换正则就可以了
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
|
|
@ -154,7 +151,6 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tologins() {
|
tologins() {
|
||||||
console.log(this.userInfoLoginDTO.password, this.userInfoLoginDTO.userName, '密码用户')
|
|
||||||
if (!this.userInfoLoginDTO.userName) {
|
if (!this.userInfoLoginDTO.userName) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入账号',
|
title: '请输入账号',
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height - 120
|
this.scorllheight = this.height - 120
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -199,21 +198,17 @@
|
||||||
this.$set(item, 'checked', true)
|
this.$set(item, 'checked', true)
|
||||||
})
|
})
|
||||||
this.checkList = this.alllist
|
this.checkList = this.alllist
|
||||||
console.log(this.checkList,156)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
checkSelectItem(e, item) {
|
checkSelectItem(e, item) {
|
||||||
console.log(item,156)
|
|
||||||
// 如果是取消选中,就把checked置为false,如果是选中,就给添加一个checked=true
|
// 如果是取消选中,就把checked置为false,如果是选中,就给添加一个checked=true
|
||||||
if (item.checked == true) {
|
if (item.checked == true) {
|
||||||
this.$set(item, 'checked', false)
|
this.$set(item, 'checked', false)
|
||||||
this.checkList = this.checkList.filter(items => (items.value !== item.value))
|
this.checkList = this.checkList.filter(items => (items.value !== item.value))
|
||||||
console.log(this.checkList,'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.$set(item, 'checked', true)
|
this.$set(item, 'checked', true)
|
||||||
this.checkList.push(item)
|
this.checkList.push(item)
|
||||||
console.log(this.checkList,'false')
|
|
||||||
}
|
}
|
||||||
// 过滤出数组中checked为true的项目,如果和原alllist长度相等,就全选显示
|
// 过滤出数组中checked为true的项目,如果和原alllist长度相等,就全选显示
|
||||||
let newArr = this.alllist.filter(item => (item.checked == true))
|
let newArr = this.alllist.filter(item => (item.checked == true))
|
||||||
|
|
@ -222,7 +217,6 @@
|
||||||
} else {
|
} else {
|
||||||
this.checkTrue = false;
|
this.checkTrue = false;
|
||||||
}
|
}
|
||||||
console.log(this.checkList,41561456)
|
|
||||||
},
|
},
|
||||||
submit(){
|
submit(){
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 顶部选项卡 -->
|
<!-- 顶部选项卡 -->
|
||||||
<view class="topScroll">
|
<!-- <view class="topScroll">
|
||||||
<scroll-view scroll-x="true" class="scroll">
|
<scroll-view scroll-x="true" class="scroll">
|
||||||
<view class="scroll-item" v-for="(item,index) in topItems" :key="index" @click="chooseClick(item,index)"
|
<view class="scroll-item" v-for="(item,index) in topItems" :key="index" @click="chooseClick(item,index)"
|
||||||
:class="{'scroll-item2':isActive == index}">
|
:class="{'scroll-item2':isActive == index}">
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 监测站告警 -->
|
<!-- 监测站告警 -->
|
||||||
<block v-if="isActive == 0">
|
<block v-if="isActive == 0">
|
||||||
|
|
@ -135,12 +135,13 @@
|
||||||
arrays: [],
|
arrays: [],
|
||||||
isRefresher: false, //下拉刷新状态
|
isRefresher: false, //下拉刷新状态
|
||||||
reload: '',
|
reload: '',
|
||||||
topItems: [{
|
topItems: [
|
||||||
dictLabel: '监测站告警'
|
// {
|
||||||
},
|
// dictLabel: '监测站告警'
|
||||||
{
|
// },
|
||||||
dictLabel: '异常趋势图'
|
// {
|
||||||
}
|
// dictLabel: '异常趋势图'
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
value: 0,
|
value: 0,
|
||||||
rangeList: [],
|
rangeList: [],
|
||||||
|
|
@ -938,8 +939,8 @@
|
||||||
.zwsj {
|
.zwsj {
|
||||||
height: calc(100vh - 100rpx);
|
height: calc(100vh - 100rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inzwsj {
|
.inzwsj {
|
||||||
|
|
@ -947,8 +948,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.zwsjimg {
|
.zwsjimg {
|
||||||
width: 200rpx;
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 240rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zwsjtext {
|
.zwsjtext {
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
this.contentheight = this.height - ktxStatusHeight - navigationHeight - 150
|
this.contentheight = this.height - ktxStatusHeight - navigationHeight - 150
|
||||||
console.log(this.contentheight,123132)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -105,7 +104,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
radioChange(value){
|
radioChange(value){
|
||||||
console.log(value)
|
|
||||||
this.constant.sex = value.detail.value
|
this.constant.sex = value.detail.value
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<uni-nav-bar :fixed="true" left-icon="left" background-color="#0F6EFF" @clickLeft="back()" status-bar :title="item.stationName"/>
|
<uni-nav-bar :fixed="true" left-icon="left" background-color="#0F6EFF" @clickLeft="back()" status-bar :title="item.deployDes"/>
|
||||||
<view class="liebiaos">
|
<view class="liebiaos">
|
||||||
<view class="list_item">
|
<view class="list_item">
|
||||||
<view class="list_item_top">
|
<view class="list_item_top">
|
||||||
|
|
@ -128,7 +128,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log(JSON.parse(decodeURIComponent(options.item)))
|
|
||||||
this.item = JSON.parse(decodeURIComponent(options.item));
|
this.item = JSON.parse(decodeURIComponent(options.item));
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -102,8 +101,22 @@
|
||||||
this.$http.get('/applet/survStationInfo/deviceList'),
|
this.$http.get('/applet/survStationInfo/deviceList'),
|
||||||
this.$http.get('/applet/survStationInfo/fdeviceList')
|
this.$http.get('/applet/survStationInfo/fdeviceList')
|
||||||
]).then(([res1, res2]) => {
|
]).then(([res1, res2]) => {
|
||||||
// 合并两个数组
|
const data1 = res1?.data?.data || [];
|
||||||
this.list = res1.data.data.concat(res2.data.data);
|
|
||||||
|
// 安全获取第二个接口的数据
|
||||||
|
let data2 = [];
|
||||||
|
if (res2?.data?.data && Array.isArray(res2.data.data) && res2.data.data.length > 0) {
|
||||||
|
data2 = res2.data.data[0] || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// data2 有数据才合并
|
||||||
|
this.list = data2.length > 0 ? data1.concat(data2) : data1;
|
||||||
|
|
||||||
|
// 可选:打印日志方便调试
|
||||||
|
if (data2.length === 0) {
|
||||||
|
console.log('第二个接口无数据,跳过合并');
|
||||||
|
}
|
||||||
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error('请求失败:', error);
|
console.error('请求失败:', error);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<image v-if="it[0].stationType == 'livestock'" src="../../static/zhandian_icon_xuqin.png" mode=""></image>
|
<image v-if="it[0].stationType == 'livestock'" src="../../static/zhandian_icon_xuqin.png" mode=""></image>
|
||||||
<view class="item_right">
|
<view class="item_right">
|
||||||
<view class="right_top">
|
<view class="right_top">
|
||||||
{{it[0].stationName}}
|
{{it[0].stationName?it[0].stationName:'无设备信息'}}
|
||||||
</view>
|
</view>
|
||||||
<view class="right_bot">
|
<view class="right_bot">
|
||||||
<image src="../../static/shebei_icon_shebei.png" mode=""></image>
|
<image src="../../static/shebei_icon_shebei.png" mode=""></image>
|
||||||
|
|
@ -84,7 +84,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -101,7 +100,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
todetail(item,index){
|
todetail(item,index){
|
||||||
console.log(item,12)
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/packDetail/pages/vidio/detail?item=' + encodeURIComponent(JSON.stringify(item))
|
url:'/packDetail/pages/vidio/detail?item=' + encodeURIComponent(JSON.stringify(item))
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 67 KiB |
|
|
@ -23,7 +23,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 武乡县农业农村局</text>
|
<text class="botmTetx">Copyright <text style="font-size: 30rpx;padding:0rpx 7rpx;"> © </text> 稷山县县现代农业发展中心</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -112,6 +112,6 @@
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%);
|
transform: translate(-50%);
|
||||||
color: #999;
|
color: #999;
|
||||||
width: 52%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
|
||||||
console.log(this.height, ktxStatusHeight, navigationHeight)
|
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -85,7 +84,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale //将px 转换rpx
|
||||||
console.log(this.height, ktxStatusHeight, navigationHeight)
|
|
||||||
this.scorllheight = this.height
|
this.scorllheight = this.height
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -112,24 +110,18 @@
|
||||||
this.List = this.List.concat(data)
|
this.List = this.List.concat(data)
|
||||||
if (data.length != 0) {
|
if (data.length != 0) {
|
||||||
this.allNum = Number(data.length) / Number(this.pageSize) + '';
|
this.allNum = Number(data.length) / Number(this.pageSize) + '';
|
||||||
console.log(this.allNum, '总页数')
|
|
||||||
if (this.allNum.indexOf('.') == -1) {
|
if (this.allNum.indexOf('.') == -1) {
|
||||||
this.allNum = this.allNum;
|
this.allNum = this.allNum;
|
||||||
console.log(this.allNum, 'if')
|
|
||||||
} else {
|
} else {
|
||||||
this.allNum = parseInt(Number(this.allNum) + 1);
|
this.allNum = parseInt(Number(this.allNum) + 1);
|
||||||
console.log(this.allNum, 'else')
|
|
||||||
}
|
}
|
||||||
console.log(this.pageNo, this.allNum, '156156')
|
|
||||||
if (this.pageNo == this.allNum) {
|
if (this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus = 'nomore'
|
this.loadStatus = 'nomore'
|
||||||
console.log(this.isLastpage, 'true', 'nomore')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage, 'false')
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
@ -141,7 +133,6 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
lower() {
|
lower() {
|
||||||
console.log("最后一页了,取消下拉功能");
|
|
||||||
// 最后一页了,取消下拉功能
|
// 最后一页了,取消下拉功能
|
||||||
if (this.isLastpage) {
|
if (this.isLastpage) {
|
||||||
return
|
return
|
||||||
|
|
@ -151,7 +142,6 @@
|
||||||
this.intervalId = setInterval(() => {
|
this.intervalId = setInterval(() => {
|
||||||
num = num + 1;
|
num = num + 1;
|
||||||
}, 1000)
|
}, 1000)
|
||||||
console.log(this.intervalId, num)
|
|
||||||
this.pageNo = this.pageNo + 1;
|
this.pageNo = this.pageNo + 1;
|
||||||
let params = {}
|
let params = {}
|
||||||
params.pageNo = this.pageNo
|
params.pageNo = this.pageNo
|
||||||
|
|
@ -166,12 +156,10 @@
|
||||||
if (this.pageNo == this.allNum) {
|
if (this.pageNo == this.allNum) {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
this.loadStatus = 'nomore'
|
this.loadStatus = 'nomore'
|
||||||
console.log(this.isLastpage, 'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = false;
|
this.isLastpage = false;
|
||||||
// this.isLoadMore=true
|
// this.isLoadMore=true
|
||||||
this.loadStatus = 'more'
|
this.loadStatus = 'more'
|
||||||
console.log(this.isLastpage, 'false')
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isLastpage = true;
|
this.isLastpage = true;
|
||||||
|
|
|
||||||
|
|
@ -2326,7 +2326,6 @@
|
||||||
uni.sendSocketMessage({
|
uni.sendSocketMessage({
|
||||||
data: JSON.stringify(param)
|
data: JSON.stringify(param)
|
||||||
});
|
});
|
||||||
console.log('websocket发送给服务端的消息:', param);
|
|
||||||
socketTask.close({
|
socketTask.close({
|
||||||
code: 1000,
|
code: 1000,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
|
@ -2337,7 +2336,6 @@
|
||||||
|
|
||||||
// push
|
// push
|
||||||
pusherStateChange: function (e) {
|
pusherStateChange: function (e) {
|
||||||
console.log('>>> live-pusher onPushStateChange:', e.detail.code);
|
|
||||||
const code = e.detail.code;
|
const code = e.detail.code;
|
||||||
let content = '';
|
let content = '';
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
|
@ -2440,13 +2438,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
stopPush() {
|
stopPush() {
|
||||||
console.log('停止推流');
|
|
||||||
this.pushVideoContext.stop();
|
this.pushVideoContext.stop();
|
||||||
this.pushVideo=false
|
this.pushVideo=false
|
||||||
},
|
},
|
||||||
|
|
||||||
startPush() {
|
startPush() {
|
||||||
console.log('开始推流,推流地址为:', this.pushUrl);
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '开始推流,推流地址为:'
|
title: '开始推流,推流地址为:'
|
||||||
});
|
});
|
||||||
|
|
@ -2458,7 +2454,6 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
error(e) {
|
error(e) {
|
||||||
console.log('live-player', e);
|
|
||||||
console.error('live-player error:', e.detail.errMsg);
|
console.error('live-player error:', e.detail.errMsg);
|
||||||
if (e.detail.errCode == 10001) {
|
if (e.detail.errCode == 10001) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -34,19 +34,13 @@
|
||||||
var player = null;
|
var player = null;
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
console.log(1111111111111111111111)
|
|
||||||
// this.initPlayer()
|
// this.initPlayer()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted...');
|
|
||||||
|
|
||||||
if (typeof window.EZUIKit !== 'undefined') {
|
if (typeof window.EZUIKit !== 'undefined') {
|
||||||
|
|
||||||
console.log('defined EZUIKit...');
|
|
||||||
this.initPlayer();
|
this.initPlayer();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
console.log('undefined EZUIKit...');
|
|
||||||
// 动态引入较大类库避免影响页面展示
|
// 动态引入较大类库避免影响页面展示
|
||||||
const script = document.createElement('script')
|
const script = document.createElement('script')
|
||||||
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
|
||||||
|
|
@ -62,7 +56,6 @@
|
||||||
windowWidth,
|
windowWidth,
|
||||||
windowHeight
|
windowHeight
|
||||||
} = uni.getSystemInfoSync();
|
} = uni.getSystemInfoSync();
|
||||||
console.log('initPlayer...');
|
|
||||||
return
|
return
|
||||||
fetch('https://zy.sxzooh.com/zh-api/applet/ysyun/getYsToken')
|
fetch('https://zy.sxzooh.com/zh-api/applet/ysyun/getYsToken')
|
||||||
// .then(response => response.json())
|
// .then(response => response.json())
|
||||||
|
|
|
||||||
|
|
@ -226,10 +226,8 @@ export default {
|
||||||
},
|
},
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
livePlayerContext = uni.createLivePlayerContext('livePlayer');
|
livePlayerContext = uni.createLivePlayerContext('livePlayer');
|
||||||
console.log('获取参数', options);
|
|
||||||
// 获取当前页面栈
|
// 获取当前页面栈
|
||||||
const currentPage = getCurrentPages();
|
const currentPage = getCurrentPages();
|
||||||
console.log(currentPage.nv_length);
|
|
||||||
|
|
||||||
// 获取url携带的参数
|
// 获取url携带的参数
|
||||||
const { accessToken, deviceSerial, channelNo, date, switch1Checked } = options;
|
const { accessToken, deviceSerial, channelNo, date, switch1Checked } = options;
|
||||||
|
|
@ -238,7 +236,6 @@ export default {
|
||||||
this.deviceSerial=deviceSerial,
|
this.deviceSerial=deviceSerial,
|
||||||
this.channelNo=channelNo,
|
this.channelNo=channelNo,
|
||||||
this.page=currentPage.nv_length
|
this.page=currentPage.nv_length
|
||||||
console.log(date);
|
|
||||||
// 通过分享今日指定日期
|
// 通过分享今日指定日期
|
||||||
if (date) {
|
if (date) {
|
||||||
this.date=date,
|
this.date=date,
|
||||||
|
|
@ -261,10 +258,8 @@ export default {
|
||||||
*/
|
*/
|
||||||
onShareAppMessage: function (res) {
|
onShareAppMessage: function (res) {
|
||||||
const { accessToken, deviceSerial, channelNo, date, switch1Checked } = this;
|
const { accessToken, deviceSerial, channelNo, date, switch1Checked } = this;
|
||||||
console.log(switch1Checked);
|
|
||||||
if (res.from === 'button') {
|
if (res.from === 'button') {
|
||||||
// 来自页面内转发按钮
|
// 来自页面内转发按钮
|
||||||
console.log(res.target);
|
|
||||||
this.panelStatus=0
|
this.panelStatus=0
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
@ -298,7 +293,6 @@ export default {
|
||||||
|
|
||||||
// 获取存储类型
|
// 获取存储类型
|
||||||
switch1Change: function (e) {
|
switch1Change: function (e) {
|
||||||
console.log('当前存储类型', e.detail);
|
|
||||||
if (e.detail.value == false) {
|
if (e.detail.value == false) {
|
||||||
this.switchText='云存储',
|
this.switchText='云存储',
|
||||||
this.switch1Checked=false,
|
this.switch1Checked=false,
|
||||||
|
|
@ -327,10 +321,8 @@ export default {
|
||||||
// 获取当前操作系统类型
|
// 获取当前操作系统类型
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('当前操作系统:', res.system);
|
|
||||||
const sys = res.system;
|
const sys = res.system;
|
||||||
type = sys.split(' ');
|
type = sys.split(' ');
|
||||||
console.log(type);
|
|
||||||
if (type[0] == 'iOS') {
|
if (type[0] == 'iOS') {
|
||||||
that.toDay=date.replace(/\-/g, '/')
|
that.toDay=date.replace(/\-/g, '/')
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -351,7 +343,6 @@ export default {
|
||||||
// 获取时间轴
|
// 获取时间轴
|
||||||
getTimeLine: function () {
|
getTimeLine: function () {
|
||||||
const { recType, date, accessToken, deviceSerial, channelNo, timelineTimer, currentTimer } = this;
|
const { recType, date, accessToken, deviceSerial, channelNo, timelineTimer, currentTimer } = this;
|
||||||
console.log('获取到的accessToken, accessToken', accessToken);
|
|
||||||
var that = this;
|
var that = this;
|
||||||
let currentDate = null;
|
let currentDate = null;
|
||||||
let timestampCurrent = null;
|
let timestampCurrent = null;
|
||||||
|
|
@ -381,7 +372,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('获取播放时间片段', res.data);
|
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
if (res.data.data != null) {
|
if (res.data.data != null) {
|
||||||
var result = res.data.data;
|
var result = res.data.data;
|
||||||
|
|
@ -408,7 +398,6 @@ export default {
|
||||||
et: et
|
et: et
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log('availArr:', availArr);
|
|
||||||
this.dateLine=availArr
|
this.dateLine=availArr
|
||||||
} else {
|
} else {
|
||||||
this.dialogNodataTitle='暂无数据',
|
this.dialogNodataTitle='暂无数据',
|
||||||
|
|
@ -447,7 +436,6 @@ export default {
|
||||||
let stTime = e.detail.stTime;
|
let stTime = e.detail.stTime;
|
||||||
let etTime = e.detail.etTime;
|
let etTime = e.detail.etTime;
|
||||||
const { type, date, accessToken, deviceSerial, channelNo, videoSrc } = this;
|
const { type, date, accessToken, deviceSerial, channelNo, videoSrc } = this;
|
||||||
console.log('当前播放时间', stTime, etTime);
|
|
||||||
let startTime = null;
|
let startTime = null;
|
||||||
let stopTime = null;
|
let stopTime = null;
|
||||||
startTime = date + ' ' + stTime;
|
startTime = date + ' ' + stTime;
|
||||||
|
|
@ -481,7 +469,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('获取到的播放地址:', res.data);
|
|
||||||
if (res.data.code == '200' && res.data.data && res.data.data.url) {
|
if (res.data.code == '200' && res.data.data && res.data.data.url) {
|
||||||
const playUrl = res.data.data.url;
|
const playUrl = res.data.data.url;
|
||||||
this.videoSrc=playUrl
|
this.videoSrc=playUrl
|
||||||
|
|
@ -489,7 +476,6 @@ export default {
|
||||||
this.handleStop();
|
this.handleStop();
|
||||||
// 开始播放
|
// 开始播放
|
||||||
this.handlePlay();
|
this.handlePlay();
|
||||||
console.log('当前播放地址:', this.videoSrc);
|
|
||||||
} else if (res.data.code == '20007') {
|
} else if (res.data.code == '20007') {
|
||||||
debugger;
|
debugger;
|
||||||
this.dialogTitle='获取播放地址失败',
|
this.dialogTitle='获取播放地址失败',
|
||||||
|
|
@ -519,7 +505,6 @@ export default {
|
||||||
this.dialogTitle='获取播放地址失败',
|
this.dialogTitle='获取播放地址失败',
|
||||||
this.dialogContent=res.data.msg,
|
this.dialogContent=res.data.msg,
|
||||||
this.dialogShow=true
|
this.dialogShow=true
|
||||||
console.log('获取rtmp播放地址失败');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -549,7 +534,6 @@ export default {
|
||||||
_this.fullScreen=true
|
_this.fullScreen=true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log('开启全屏');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
unfullScreen() {
|
unfullScreen() {
|
||||||
|
|
@ -559,7 +543,6 @@ export default {
|
||||||
_this.fullScreen=false
|
_this.fullScreen=false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log('开启全屏');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
ToggleObjectFit() {
|
ToggleObjectFit() {
|
||||||
|
|
@ -576,7 +559,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handlePlay(callback) {
|
handlePlay(callback) {
|
||||||
console.log('handelPlay', this.playVideo, this.isHD);
|
|
||||||
this.checkNetWork();
|
this.checkNetWork();
|
||||||
livePlayerContext.play({
|
livePlayerContext.play({
|
||||||
success: () => {
|
success: () => {
|
||||||
|
|
@ -594,7 +576,6 @@ export default {
|
||||||
title: '网络异常',
|
title: '网络异常',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
console.log('开始播放失败');
|
|
||||||
this.videoNetWorkError=true
|
this.videoNetWorkError=true
|
||||||
this.showVideoControls=false
|
this.showVideoControls=false
|
||||||
this.videoLoadingStatus=100
|
this.videoLoadingStatus=100
|
||||||
|
|
@ -603,7 +584,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleStop(callback) {
|
handleStop(callback) {
|
||||||
console.log('stop');
|
|
||||||
const { list } = this;
|
const { list } = this;
|
||||||
livePlayerContext.stop({
|
livePlayerContext.stop({
|
||||||
success: () => {
|
success: () => {
|
||||||
|
|
@ -622,7 +602,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
autoHideControl() {
|
autoHideControl() {
|
||||||
console.log('showHdSelect', this.showHDSelect);
|
|
||||||
const _this = this;
|
const _this = this;
|
||||||
clearTimeout(this.autoHideTimer);
|
clearTimeout(this.autoHideTimer);
|
||||||
this.autoHideTimer = setTimeout(() => {
|
this.autoHideTimer = setTimeout(() => {
|
||||||
|
|
@ -640,7 +619,6 @@ export default {
|
||||||
|
|
||||||
handleHD(e) {
|
handleHD(e) {
|
||||||
var showHDSelect = this.showHDSelect;
|
var showHDSelect = this.showHDSelect;
|
||||||
console.log('handleHD', showHDSelect);
|
|
||||||
this.showHDSelect=!showHDSelect
|
this.showHDSelect=!showHDSelect
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -658,7 +636,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
statechange(e) {
|
statechange(e) {
|
||||||
console.log('live-player code:', e.detail.code, e.detail);
|
|
||||||
const { code } = e.detail;
|
const { code } = e.detail;
|
||||||
let { videoLoadingStatus, list, panelStatus } = this;
|
let { videoLoadingStatus, list, panelStatus } = this;
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
|
@ -726,7 +703,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
error(e) {
|
error(e) {
|
||||||
console.log('live-player', e);
|
|
||||||
console.error('live-player error:', e.detail.errMsg);
|
console.error('live-player error:', e.detail.errMsg);
|
||||||
if (e.detail.errCode == 10001) {
|
if (e.detail.errCode == 10001) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -738,7 +714,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
onVideoTap(e) {
|
onVideoTap(e) {
|
||||||
console.log('点击视频');
|
|
||||||
const { deviceOffline, showVideoControls, panelStatus, videoNetWorkError } = this;
|
const { deviceOffline, showVideoControls, panelStatus, videoNetWorkError } = this;
|
||||||
if (deviceOffline || panelStatus === 4 || videoNetWorkError) {
|
if (deviceOffline || panelStatus === 4 || videoNetWorkError) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -755,10 +730,8 @@ export default {
|
||||||
screenShoot(e) {
|
screenShoot(e) {
|
||||||
const { playVideo, videoLoadingStatus } = this;
|
const { playVideo, videoLoadingStatus } = this;
|
||||||
if (!playVideo || videoLoadingStatus != 100) {
|
if (!playVideo || videoLoadingStatus != 100) {
|
||||||
console.log('非播放状态下点击截图');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log('开始截图');
|
|
||||||
// livePlayerContext.snapshot('raw');
|
// livePlayerContext.snapshot('raw');
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
|
|
@ -786,13 +759,10 @@ export default {
|
||||||
livePlayerContext
|
livePlayerContext
|
||||||
.snapshot('raw')
|
.snapshot('raw')
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log('data', data);
|
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data);
|
|
||||||
uni.saveImageToPhotosAlbum({
|
uni.saveImageToPhotosAlbum({
|
||||||
filePath: data.tempImagePath,
|
filePath: data.tempImagePath,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('保存成功', res);
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '截图已保存至手机相册',
|
title: '截图已保存至手机相册',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|
@ -850,7 +820,6 @@ export default {
|
||||||
|
|
||||||
// 时间选择器
|
// 时间选择器
|
||||||
bindDateChange: function (e) {
|
bindDateChange: function (e) {
|
||||||
console.log('picker发送选择改变,携带值为', e.detail.value);
|
|
||||||
this.date=e.detail.value
|
this.date=e.detail.value
|
||||||
this.getTimeLine();
|
this.getTimeLine();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
this.height = res.windowHeight * pxToRpxScale//将px 转换rpx
|
||||||
console.log(this.height,ktxStatusHeight,navigationHeight)
|
|
||||||
this.scorllheight = this.height - 120
|
this.scorllheight = this.height - 120
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -199,21 +198,17 @@
|
||||||
this.$set(item, 'checked', true)
|
this.$set(item, 'checked', true)
|
||||||
})
|
})
|
||||||
this.checkList = this.alllist
|
this.checkList = this.alllist
|
||||||
console.log(this.checkList,156)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
checkSelectItem(e, item) {
|
checkSelectItem(e, item) {
|
||||||
console.log(item,156)
|
|
||||||
// 如果是取消选中,就把checked置为false,如果是选中,就给添加一个checked=true
|
// 如果是取消选中,就把checked置为false,如果是选中,就给添加一个checked=true
|
||||||
if (item.checked == true) {
|
if (item.checked == true) {
|
||||||
this.$set(item, 'checked', false)
|
this.$set(item, 'checked', false)
|
||||||
this.checkList = this.checkList.filter(items => (items.value !== item.value))
|
this.checkList = this.checkList.filter(items => (items.value !== item.value))
|
||||||
console.log(this.checkList,'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.$set(item, 'checked', true)
|
this.$set(item, 'checked', true)
|
||||||
this.checkList.push(item)
|
this.checkList.push(item)
|
||||||
console.log(this.checkList,'false')
|
|
||||||
}
|
}
|
||||||
// 过滤出数组中checked为true的项目,如果和原alllist长度相等,就全选显示
|
// 过滤出数组中checked为true的项目,如果和原alllist长度相等,就全选显示
|
||||||
let newArr = this.alllist.filter(item => (item.checked == true))
|
let newArr = this.alllist.filter(item => (item.checked == true))
|
||||||
|
|
@ -222,7 +217,6 @@
|
||||||
} else {
|
} else {
|
||||||
this.checkTrue = false;
|
this.checkTrue = false;
|
||||||
}
|
}
|
||||||
console.log(this.checkList,41561456)
|
|
||||||
},
|
},
|
||||||
submit(){
|
submit(){
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
|
|
|
||||||
12
pages.json
12
pages.json
|
|
@ -4,7 +4,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "武乡小流域面源污染监测",
|
"navigationBarTitleText": "稷山县县小流域面源污染监测",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -156,7 +156,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/operations/index",
|
"path": "pages/operations/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "站点运维",
|
"navigationBarTitleText": "运维记录",
|
||||||
"navigationStyle": "default",
|
"navigationStyle": "default",
|
||||||
"navigationBarBackgroundColor":"#0F6EFF"
|
"navigationBarBackgroundColor":"#0F6EFF"
|
||||||
}
|
}
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/operations/detail",
|
"path": "pages/operations/detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "站点运维详情",
|
"navigationBarTitleText": "运维记录详情",
|
||||||
"navigationStyle": "default",
|
"navigationStyle": "default",
|
||||||
"navigationBarBackgroundColor":"#0F6EFF"
|
"navigationBarBackgroundColor":"#0F6EFF"
|
||||||
}
|
}
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/operations/add",
|
"path": "pages/operations/add",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新增站点运维",
|
"navigationBarTitleText": "新增运维记录",
|
||||||
"navigationStyle": "default",
|
"navigationStyle": "default",
|
||||||
"navigationBarBackgroundColor":"#0F6EFF"
|
"navigationBarBackgroundColor":"#0F6EFF"
|
||||||
}
|
}
|
||||||
|
|
@ -180,7 +180,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/operations/edit",
|
"path": "pages/operations/edit",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "编辑站点运维",
|
"navigationBarTitleText": "编辑运维记录",
|
||||||
"navigationStyle": "default",
|
"navigationStyle": "default",
|
||||||
"navigationBarBackgroundColor":"#0F6EFF"
|
"navigationBarBackgroundColor":"#0F6EFF"
|
||||||
}
|
}
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/sjdyj/index",
|
"path": "pages/sjdyj/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "智能告警",
|
"navigationBarTitleText": "智能预警",
|
||||||
"navigationStyle": "default",
|
"navigationStyle": "default",
|
||||||
"navigationBarBackgroundColor":"#0F6EFF"
|
"navigationBarBackgroundColor":"#0F6EFF"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<uni-nav-bar :fixed="true" leftWidth="00rpx" rightWidth="0rpx" background-color="transparent" status-bar title="武乡县农业面源污染在线监测小程序" />
|
<uni-nav-bar :fixed="true" leftWidth="00rpx" rightWidth="0rpx" background-color="transparent" status-bar title="稷山县农业面源污染在线监测小程序" />
|
||||||
<image src="../../static/home_top_bg.png" mode="" class="bgimg"></image>
|
<image src="../../static/home_top_bg.png" mode="" class="bgimg"></image>
|
||||||
<scroll-view class="content" scroll-y="true" :style="{height:contentheight + 'rpx'}">
|
<scroll-view class="content" scroll-y="true" :style="{height:contentheight + 'rpx'}">
|
||||||
<view class="top_address">
|
<view class="top_address">
|
||||||
|
|
@ -80,11 +80,8 @@
|
||||||
<view class="bot_mid">
|
<view class="bot_mid">
|
||||||
<view class="bot_mid_left"
|
<view class="bot_mid_left"
|
||||||
:class="{'bot_mid_lefts':item.type == 2 || item.type == 0}">
|
:class="{'bot_mid_lefts':item.type == 2 || item.type == 0}">
|
||||||
{{ item.value }}{{ item.unit }}
|
{{ (item.value !== null && item.value !== undefined && item.value !== '' && !isNaN(item.value)) ? item.value + (item.unit || '') : '0' }}{{ item.unit }}
|
||||||
</view>
|
</view>
|
||||||
<!-- <image v-if="item.type == 1" src="../../static/home_shuju_shang.png" mode=""></image>
|
|
||||||
<image v-if="item.type == 2" src="../../static/home_shuju_xia.png" mode=""></image>
|
|
||||||
<view v-if="item.type == 0" class="" style="width: 42rpx;"> </view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bot_rig" v-if="item.times">
|
<view class="bot_rig" v-if="item.times">
|
||||||
{{ item.times[0] }}
|
{{ item.times[0] }}
|
||||||
|
|
@ -149,7 +146,6 @@
|
||||||
// this.wrwlist = uni.getStorageSync('wrwlist')
|
// this.wrwlist = uni.getStorageSync('wrwlist')
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log("getSystemInfo", res)
|
|
||||||
var pxToRpxScale = 750 / res.windowWidth
|
var pxToRpxScale = 750 / res.windowWidth
|
||||||
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
var ktxStatusHeight = res.statusBarHeight * pxToRpxScale
|
||||||
var navigationHeight = 44 * pxToRpxScale
|
var navigationHeight = 44 * pxToRpxScale
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ const indexData = {
|
||||||
img: require('../../static/home_icon_jiance.png'),
|
img: require('../../static/home_icon_jiance.png'),
|
||||||
path: '/packDetail/pages/Site/index'
|
path: '/packDetail/pages/Site/index'
|
||||||
}, {
|
}, {
|
||||||
name: '智能告警',
|
name: '智能预警',
|
||||||
img: require('../../static/scd.png'),
|
img: require('../../static/scd.png'),
|
||||||
path: '/packDetail/pages/sjdyj/index'
|
path: '/packDetail/pages/sjdyj/index'
|
||||||
},
|
},
|
||||||
|
|
@ -419,7 +419,7 @@ const indexData = {
|
||||||
path: '/packDetail1/pages/device/index'
|
path: '/packDetail1/pages/device/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '站点运维',
|
name: '运维记录',
|
||||||
img: require('../../static/home_icon_yunwei.png'),
|
img: require('../../static/home_icon_yunwei.png'),
|
||||||
path: '/packDetail/pages/operations/index'
|
path: '/packDetail/pages/operations/index'
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -187,31 +187,26 @@
|
||||||
monitorRender() {// 监测点位渲染
|
monitorRender() {// 监测点位渲染
|
||||||
this.soilStationList.forEach((item, index) => {
|
this.soilStationList.forEach((item, index) => {
|
||||||
let iconPath = '';
|
let iconPath = '';
|
||||||
let width = 32;
|
let width = 35;
|
||||||
let height = 47;
|
let height = 35;
|
||||||
// 根据设备类型设置不同的图标
|
// 根据设备类型设置不同的图标
|
||||||
// switch(item.type) {
|
switch(item.type) {
|
||||||
// case 'soil':
|
case 'soil':
|
||||||
// iconPath = this.baseUrl + '/icon/device/soil.png';
|
iconPath = this.baseUrl + '/icon/device/soil.png';
|
||||||
// width = 32;
|
width = 32;
|
||||||
// height = 47;
|
height = 47;
|
||||||
// break;
|
break;
|
||||||
// case 'camera':
|
case 'camera':
|
||||||
// iconPath = this.baseUrl + '/icon/device/cam.png';
|
iconPath = this.baseUrl + '/icon/device/cam.png';
|
||||||
// width = 45;
|
width = 45;
|
||||||
// height = 45;
|
height = 45;
|
||||||
// break;
|
break;
|
||||||
// case '10_flowmeter':
|
default:
|
||||||
// iconPath = this.baseUrl + '/icon/device/liuliang.png';
|
iconPath = this.baseUrl + '/icon/device/default.png';
|
||||||
// width = 45;
|
}
|
||||||
// height = 45;
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// iconPath = this.baseUrl + '/icon/device/default.png';
|
|
||||||
// }
|
|
||||||
const markerItem = {
|
const markerItem = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
iconPath: this.baseUrl +'/' + item.mapIcon,
|
iconPath: iconPath,
|
||||||
latitude: Number(item.latitude),
|
latitude: Number(item.latitude),
|
||||||
longitude: Number(item.longitude),
|
longitude: Number(item.longitude),
|
||||||
width: width,
|
width: width,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<view class="boxitem_left">
|
<view class="boxitem_left">
|
||||||
<image src="../../static/me_icon_shebei.png" mode=""></image>
|
<image src="../../static/me_icon_shebei.png" mode=""></image>
|
||||||
<view class="zl">
|
<view class="zl">
|
||||||
站点运维
|
运维记录
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../static/me_icon_in.png" mode=""></image>
|
<image src="../../static/me_icon_in.png" mode=""></image>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue