wx-program
pangdundun 2024-01-26 10:25:01 +08:00
parent 0c814956b3
commit 748351ce99
54 changed files with 1211 additions and 303 deletions

View File

@ -54,6 +54,12 @@ let api = {
camera_gethls:'/camera/gethls',//获取摄像头得地址 camera_gethls:'/camera/gethls',//获取摄像头得地址
readFs_byid:'/readFs/byid',//查看用户施肥机名称信息 readFs_byid:'/readFs/byid',//查看用户施肥机名称信息
getcontrol_geteqetdata:'/getcontrol/geteqetdata',//小程序气象站显示
getcontrol_rtDatastation:'/getcontrol/rtDatastation',//主页查看控制器气象站实时数据
readControl_interiorthermalinsulation:'/readControl/interiorthermalinsulation',//读取(内保温)控制器
//countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10 4是(原数据-1000)/10 //countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10 4是(原数据-1000)/10

View File

@ -497,8 +497,8 @@
</view> </view>
</view> </view>
<view class="lishui-status"> <view class="lishui-status">
静止状态: {{ getNumberStatus(item.statusProgress) }}:
<span :style="item.progress!=100 ? 'color:#FF6C6C' : ''">{{ item.progress }}%</span> <span :style="item.statusProgress != 1 ? 'color:#FF6C6C' : '#24B383'">{{ item.progress }}%</span>
</view> </view>
</view> </view>
<view v-else class="status-noTrue"> <view v-else class="status-noTrue">
@ -536,8 +536,8 @@
</view> </view>
</view> </view>
<view class="lishui-status"> <view class="lishui-status">
静止状态: {{ getNumberStatus(item.statusProgress) }}:
<span :style="item.progress!=100 ? 'color:#FF6C6C' : ''">{{ item.progress }}%</span> <span :style="item.statusProgress != 1 ? 'color:#FF6C6C' : '#24B383'">{{ item.progress }}%</span>
</view> </view>
</view> </view>
<view v-else class="status-noTrue"> <view v-else class="status-noTrue">
@ -575,8 +575,8 @@
</view> </view>
</view> </view>
<view class="lishui-status"> <view class="lishui-status">
静止状态: {{ getNumberStatus(item.statusProgress) }}:
<span :style="item.progress!=100 ? 'color:#FF6C6C' : ''">{{ item.progress }}%</span> <span :style="item.statusProgress != 1 ? 'color:#FF6C6C' : '#24B383'">{{ item.progress }}%</span>
</view> </view>
</view> </view>
<view v-else class="status-noTrue"> <view v-else class="status-noTrue">
@ -614,8 +614,47 @@
</view> </view>
</view> </view>
<view class="lishui-status"> <view class="lishui-status">
静止状态: {{ getNumberStatus(item.statusProgress) }}:
<span :style="item.progress!=100 ? 'color:#FF6C6C' : ''">{{ item.progress }}%</span> <span :style="item.statusProgress != 1 ? 'color:#FF6C6C' : '#24B383'">{{ item.progress }}%</span>
</view>
</view>
<view v-else class="status-noTrue">
<image src="../../static/noTrue.png" mode=""></image>
<span>当前设备无效</span>
</view>
</view>
</template>
</view>
<!-- 内保温 -->
<view class="content" v-if="purviewList.indexOf('27')!=-1">
<template v-for="(item,index) in interiorthermalinsulationList">
<view class="lishui-item" v-show="item.interiorthermalinsulationState != 0" :key="index">
<view class="lishui-title">
<view class="title-left">
{{ item.name }}
</view>
<view class="title-right" @click="interiorthermalinsulationHander(index)">
设置
<image src="../../static/set-arrow.png" mode=""></image>
</view>
</view>
<view class="lishui-content" v-if="item.interiorthermalinsulationState != 0">
<view class="lishui-set">
<view class="set-1">
<image v-if="item.interiorthermalinsulationState == 1" class="sel" src="../../static/sel.png" mode=""></image>
<view v-else class="sel-no"></view>
<span>自动控制</span>
</view>
<view class="set-2">
<image v-if="item.interiorthermalinsulationState != 1" class="sel" src="../../static/sel.png" mode=""></image>
<view v-else class="sel-no"></view>
<span>手机控制</span>
</view>
</view>
<view class="lishui-status">
{{ getNumberStatus(item.statusProgress) }}:
<span :style="item.statusProgress != 1 ? 'color:#FF6C6C' : '#24B383'">{{ item.progress }}%</span>
</view> </view>
</view> </view>
<view v-else class="status-noTrue"> <view v-else class="status-noTrue">
@ -1204,6 +1243,46 @@
</view> </view>
</u-popup> </u-popup>
<!-- 内保温 -->
<u-popup v-model="interiorthermalinsulationShow" mode="center" :mask-close-able='true' width="640rpx" height="454rpx"
:closeable='false'>
<view class="contentPop lishui-item">
<view class="contentPop_box">
<view class="title">
{{ (interiorthermalinsulationName + 1)+"#内保温" }}
</view>
</view>
<view class="lishui-content">
<view class="model-title">
控制模式:
</view>
<view class="lishui-flex">
<view class="btn btn-140 " @click="changeInnerInsulationControl(1)"
:class="interiorthermalinsulationIndex==1?'btn-on':'btn-off'">
<span style="font-size: 28rpx;">自动运行</span>
</view>
<view class="btn btn-140 " @click="changeInnerInsulationControl(2)"
:class="interiorthermalinsulationIndex==2?'btn-on':'btn-off'">
<span style="font-size: 28rpx;">手动打开</span>
</view>
<view class="btn btn-140 " @click="changeInnerInsulationControl(3)"
:class="interiorthermalinsulationIndex==3?'btn-on':'btn-off'">
<span style="font-size: 28rpx;">手动关闭</span>
</view>
<view class="btn btn-110 " @click="changeInnerInsulationControl(4)"
:class="interiorthermalinsulationIndex==4?'btn-on':'btn-off'">
<span style="font-size: 28rpx;">停止</span>
</view>
</view>
</view>
<view class="changeMoreBtn" @click="toWebView('internalInsulation')">
<image src="../../static/changeMore.png" mode=""></image>
<text>修改更多参数</text>
</view>
<image src="../../static/closed.png" mode="" @click="interiorthermalinsulationShow=false"></image>
</view>
</u-popup>
<view class="content" v-if="!purviewList.length" style="text-align: center;"> <view class="content" v-if="!purviewList.length" style="text-align: center;">
@ -1573,36 +1652,44 @@
outFlipWindowShow:false,//湿 outFlipWindowShow:false,//湿
outFlipWindowControlIndex:0, outFlipWindowControlIndex:0,
outFlipWindowList:[ outFlipWindowList:[
{name:'1#湿帘外翻窗',outFlipWindowState:0,progress:0}, {name:'1#湿帘外翻窗',outFlipWindowState:0,progress:0,statusProgress:0},
{name:'2#湿帘外翻窗',outFlipWindowState:0,progress:0}, {name:'2#湿帘外翻窗',outFlipWindowState:0,progress:0,statusProgress:0},
], ],
popoutFlipWindowName:'', popoutFlipWindowName:'',
innercurtainShow:false,// innercurtainShow:false,//
innercurtainControlIndex:0, innercurtainControlIndex:0,
innercurtainList:[ innercurtainList:[
{name:'1#内遮阳',innercurtainState:0,progress:0}, {name:'1#内遮阳',innercurtainState:0,progress:0,statusProgress:0},
{name:'2#内遮阳',innercurtainState:0,progress:0}, {name:'2#内遮阳',innercurtainState:0,progress:0,statusProgress:0},
], ],
popinnercurtainName:'', popinnercurtainName:'',
externalsunshadeShow:false,// externalsunshadeShow:false,//
externalsunshadeControlIndex:0, externalsunshadeControlIndex:0,
externalsunshadeList:[ externalsunshadeList:[
{name:'1#外遮阳',externalsunshadeState:0,progress:0}, {name:'1#外遮阳',externalsunshadeState:0,progress:0,statusProgress:0},
{name:'2#外遮阳',externalsunshadeState:0,progress:0}, {name:'2#外遮阳',externalsunshadeState:0,progress:0,statusProgress:0},
], ],
popexternalsunshadeName:'', popexternalsunshadeName:'',
airWindowShow:false,// airWindowShow:false,//
airWindowControlIndex:0, airWindowControlIndex:0,
airWindowList:[ airWindowList:[
{name:'1#通风窗',airWindowState:0,progress:0}, {name:'1#通风窗',airWindowState:0,progress:0,statusProgress:0},
{name:'2#通风窗',airWindowState:0,progress:0}, {name:'2#通风窗',airWindowState:0,progress:0,statusProgress:0},
{name:'3#通风窗',airWindowState:0,progress:0}, {name:'3#通风窗',airWindowState:0,progress:0,statusProgress:0},
{name:'4#通风窗',airWindowState:0,progress:0}, {name:'4#通风窗',airWindowState:0,progress:0,statusProgress:0},
], ],
popairWindowName:'', popairWindowName:'',
interiorthermalinsulationShow:false,//
interiorthermalinsulationIndex:0,
interiorthermalinsulationList:[
{name:'1#内保温',interiorthermalinsulationState:0,progress:0,statusProgress:0},
{name:'2#内保温',interiorthermalinsulationState:0,progress:0,statusProgress:0},
],
interiorthermalinsulationName:''
}; };
}, },
onReady(){ onReady(){
@ -1933,6 +2020,21 @@
this.changeBtn(21319, dataNum); this.changeBtn(21319, dataNum);
} }
}, },
//
changeInnerInsulationControl(index){
this.interiorthermalinsulationIndex = index;
let dataNum = {
target: {
value: this.interiorthermalinsulationIndex,
},
};
if(this.interiorthermalinsulationName == 0){
this.changeBtn(22000, dataNum);
}else if(this.interiorthermalinsulationName == 1){
this.changeBtn(21915, dataNum);
}
},
changeBtn(code, el) { changeBtn(code, el) {
@ -2190,6 +2292,7 @@
this.outFlipWindowList.forEach((el,index)=>{ this.outFlipWindowList.forEach((el,index)=>{
el.outFlipWindowState = res.data[1084 + index * 3]; el.outFlipWindowState = res.data[1084 + index * 3];
el.progress = res.data[1086 + index * 3]; el.progress = res.data[1086 + index * 3];
el.statusProgress = res.data[1085 + index * 3]
}) })
}; };
@ -2198,6 +2301,7 @@
this.innercurtainList.forEach((el,index)=>{ this.innercurtainList.forEach((el,index)=>{
el.innercurtainState = res.data[1090 + index * 3]; el.innercurtainState = res.data[1090 + index * 3];
el.progress = res.data[1092 + index * 3]; el.progress = res.data[1092 + index * 3];
el.statusProgress = res.data[1091 + index * 3]
}) })
}; };
@ -2206,6 +2310,7 @@
this.externalsunshadeList.forEach((el,index)=>{ this.externalsunshadeList.forEach((el,index)=>{
el.externalsunshadeState = res.data[1096 + index * 3]; el.externalsunshadeState = res.data[1096 + index * 3];
el.progress = res.data[1098 + index * 3]; el.progress = res.data[1098 + index * 3];
el.statusProgress = res.data[1097 + index * 3]
}) })
}; };
@ -2214,9 +2319,20 @@
this.airWindowList.forEach((el,index)=>{ this.airWindowList.forEach((el,index)=>{
el.airWindowState = res.data[1102 + index * 3]; el.airWindowState = res.data[1102 + index * 3];
el.progress = res.data[1104 + index * 3]; el.progress = res.data[1104 + index * 3];
el.statusProgress = res.data[1103 + index * 3]
}) })
}; };
//
if(this.purviewList.indexOf('27') != -1){
this.interiorthermalinsulationList.forEach((el,index)=>{
el.interiorthermalinsulationState = res.data[1182 + index * 3];
el.progress = res.data[1184 + index * 3];
el.statusProgress = res.data[1183 + index * 3]
})
};
// //
for(let t=0;t<this.electronMagneticStatus.length;t++){ for(let t=0;t<this.electronMagneticStatus.length;t++){
this.electronMagneticStatus[t].status = res.data[1166 + t] this.electronMagneticStatus[t].status = res.data[1166 + t]
@ -2476,6 +2592,24 @@
} }
}) })
}, },
//
interiorthermalinsulationHander(index){
this.interiorthermalinsulationIndex = 0;
this.interiorthermalinsulationName = index;
var deviceId = this.deviceId;
this.interiorthermalinsulationShow = true;
this.$http({
url:this.api.readControl_interiorthermalinsulation + '?deviceId=' + deviceId,
method: 'GET'
}).then(res => {
if (res.code == 200) {
uni.hideLoading();
uni.stopPullDownRefresh();
this.interiorthermalinsulationIndex = res.data[22000 + index * 12];
}
})
},
getNumberStatus(index) { getNumberStatus(index) {
if (index == 0) { if (index == 0) {

View File

@ -23,6 +23,59 @@
<view class="subtitle"> <view class="subtitle">
欢迎使用温室智慧云数据统计 欢迎使用温室智慧云数据统计
</view> </view>
<!-- 以下是单独调接口的气象数据 -->
<template v-for="item0 in weatherList">
<view class="waterAndFertilizerParams" :key="item0.id">
<view class="nav">
<image src="../../static/PH.png" mode=""></image>
<text>{{item0.deviceName}}</text>
</view>
<view class="detail">
<view class="item" v-for="item in item0.weatherListChild" :key="item.id">
<image :src="`../../static/icon_new/icon${ item.formula }.png`" mode=""></image>
<view class="info">
<view class="">
{{ item.environmentDataId }}
</view>
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">{{ item.equipmentStart == 0 ? '故障' : (item.environmentData + getTypeList(item.formula)) }}</view>
</view>
</view>
</view>
<view class="line" v-if="item0.weatherListChild.length > 0"></view>
<view class="updateTime">
<span></span>
<span>*更新数据时间&nbsp;: &nbsp;{{ (updateTimeWeather.filter(el=> el.equipmentId == item0.deviceId)).length > 0 ? (updateTimeWeather.filter(el=> el.equipmentId == item0.deviceId))[0].updateTime : '暂无'}}</span>
</view>
</view>
</template>
<!-- 以下是通过userid调取的气象数据 -->
<template v-for="item0 in equipmentName30List">
<view class="waterAndFertilizerParams" :key="item0.id">
<view class="nav">
<image src="../../static/PH.png" mode=""></image>
<text>{{item0.deviceTypeName}}</text>
</view>
<view class="detail">
<view class="item" v-for="item in item0.equipmentName30ListChild" :key="item.id">
<image :src="`../../static/icon_new/icon${ item.formula }.png`" mode=""></image>
<view class="info">
<view class="">
{{ item.environmentDataId }}
</view>
<view class="" :style="item.equipmentStart == 0 ? 'color:red':''">{{ item.equipmentStart == 0 ? '故障' : (item.environmentData + getTypeList(item.formula)) }}</view>
</view>
</view>
</view>
<view class="line" v-if="item0.equipmentName30ListChild.length > 0"></view>
<view class="updateTime">
<span></span>
<span>*更新数据时间&nbsp;: &nbsp;{{ (updateTime30.filter(el=> el.equipmentId == item0.deviceId)).length > 0 ? (updateTime30.filter(el=> el.equipmentId == item0.deviceId))[0].updateTime : '暂无'}}</span>
</view>
</view>
</template>
<view class="waterAndFertilizerParams" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1"> <view class="waterAndFertilizerParams" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
<view class="nav"> <view class="nav">
@ -341,7 +394,15 @@
typeList: [], typeList: [],
timer: null, timer: null,
updateTime: [] updateTime: [],
weatherList:[],
weatherDeviceName:'',
updateTimeWeather:[],
equipmentName30List:[],
equipmentName30ListChild:[],
updateTime30:[],
} }
}, },
onLoad() { onLoad() {
@ -353,8 +414,14 @@
uni.getStorage({ uni.getStorage({
key: 'token', key: 'token',
success: function(res) { success: function(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')) that.getEquipmentInfo(uni.getStorageSync('userid'));
that.getcontrol_geteqetdata(uni.getStorageSync('userid'))
}, },
fail: function(err) {
uni.reLaunch({
url: '/pages/login/login'
})
}
}) })
}, },
onShow() { onShow() {
@ -366,6 +433,7 @@
key: 'token', key: 'token',
success: function(res) { success: function(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')) that.getEquipmentInfo(uni.getStorageSync('userid'))
that.getcontrol_geteqetdata(uni.getStorageSync('userid'))
}, },
}) })
}, 60000); }, 60000);
@ -383,25 +451,28 @@
key: 'token', key: 'token',
success: function(res) { success: function(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')) that.getEquipmentInfo(uni.getStorageSync('userid'))
that.getcontrol_geteqetdata(uni.getStorageSync('userid'))
}, },
}) })
}, },
mounted() { mounted() {
uni.showLoading({ // uni.showLoading({
title: '加载中...' // title: '...'
}); // });
let that = this // let that = this
uni.getStorage({ // uni.getStorage({
key: 'token', // key: 'token',
success: function(res) { // success: function(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')) // that.getEquipmentInfo(uni.getStorageSync('userid'));
}, // that.getcontrol_geteqetdata(uni.getStorageSync('userid'))
fail: function(err) { // },
uni.reLaunch({ // fail: function(err) {
url: '/pages/login/login' // uni.reLaunch({
}) // url: '/pages/login/login'
} // })
}) // }
// })
}, },
methods: { methods: {
// id // id
@ -412,10 +483,21 @@
// }); // });
this.$http({ this.$http({
url: this.api.sel_eqbyid + userid, url: this.api.sel_eqbyid + userid,
// url: this.api.sel_eqbyid + '1730755572975824896',
method: 'GET' method: 'GET'
}).then(res => { }).then(res => {
// console.log(res, 'id'); // console.log(res, 'id');
if (res.code == 200) { if (res.code == 200) {
this.equipmentName30List = [];
res.data.forEach(el=>{
if(el.equipmentName == 30){
this.equipmentName30List.push(el)
}
})
if(this.equipmentName30List.length != 0){
this.getcontrol_rtDatastation1()
}
this.waterAndFertilizerParamsList = res.data.map((item, index) => { this.waterAndFertilizerParamsList = res.data.map((item, index) => {
return { return {
@ -538,7 +620,74 @@
} else if (targetValue == 0 && equipmentNumber != 0 && equipmentNumber != 15) { } else if (targetValue == 0 && equipmentNumber != 0 && equipmentNumber != 15) {
return equipmentNumber + '#' return equipmentNumber + '#'
} }
} },
//
getcontrol_geteqetdata(userId){
this.$http({
url: this.api.getcontrol_geteqetdata + '?userId=' + userId,
method: 'GET'
}).then(res=>{
// console.log(res,'');
if(res.code == 200){
this.weatherList = res.data
this.weatherList = this.weatherList.map((item,index)=>{
return {
...item,
weatherListChild:[]
}
})
this.weatherList.forEach(el=>{
//
this.$http({
url:this.api.getcontrol_rtDatastation + '?equipmentId=' + el.deviceId,
method: 'GET'
}).then(res=>{
// console.log(res,'');
if(res.code == 200){
el.weatherListChild = res.data;
this.updateTimeWeather.push(res.data[0])
}
})
})
}
})
},
//
getcontrol_rtDatastation(equipmentId){
},
// deviceName30
getcontrol_rtDatastation1(){
this.equipmentName30List = this.equipmentName30List.map((item,index)=>{
return {
...item,
equipmentName30ListChild:[]
}
})
this.updateTime30 = []
this.equipmentName30List.forEach(el=>{
this.$http({
url:this.api.getcontrol_rtDatastation + '?equipmentId=' + el.deviceId,
method: 'GET'
}).then(res=>{
if(res.code == 200){
el.equipmentName30ListChild = res.data;
this.updateTime30.push(res.data[0])
}
})
})
// console.log(this.equipmentName30List,'this.equipmentName30List');
},
} }
} }
</script> </script>
@ -550,6 +699,7 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background-color: #F5F6FA; background-color: #F5F6FA;
overflow: auto;
.navbar { .navbar {
width: 100%; width: 100%;
@ -859,4 +1009,12 @@
} }
} }
} }
.line {
width: 100%;
height: 1rpx;
background-color: #DDDDDD;
flex-shrink: 0;
margin-top: 20rpx;
}
</style> </style>

View File

@ -11,15 +11,13 @@
</view> </view>
<view class="video" > <view class="video" >
<image src="../../static/video1.png" mode=""></image> <image src="../../static/video1.png" mode=""></image>
<!-- <live-player :src="src" mode='live' muted='true' autoplay @error="error"
style="width: 100%; height: 100%;border-radius: 15rpx;" /> -->
</view> </view>
<view class="timer"> <view class="timer">
<view class="left"> <view class="left">
<image src="../../static/timer.png" mode=""></image> <image src="../../static/timer.png" mode=""></image>
<text>2023-09-20 14:00:55</text> <text>{{ time }}</text>
</view> </view>
<view class="right" @click="toVideoLive"> <view class="right" @click="toVideoLive(item.cameraSerialNumber,item.cameraChannelNumber)">
<image src="../../static/play.png" mode=""></image> <image src="../../static/play.png" mode=""></image>
<text>现场实况</text> <text>现场实况</text>
</view> </view>
@ -30,7 +28,6 @@
</template> </template>
<script> <script>
// import EZUIKit from 'ezuikit-js';
export default { export default {
data() { data() {
return { return {
@ -42,16 +39,24 @@
userid: '', userid: '',
deviceList: [], deviceList: [],
liveList: [], liveList: [],
src: '' accesstoken:'',
src: '',
time:'',
}; };
}, },
onLoad() {
this.userid = uni.getStorageSync('userid');
this.getEquipmentInfo(this.userid);
},
onPullDownRefresh() { onPullDownRefresh() {
this.getEquipmentInfo(this.userid) this.getEquipmentInfo(this.userid)
}, },
mounted() { mounted() {
this.userid = uni.getStorageSync('userid');
// console.log(EZUIKit);
this.getEquipmentInfo(this.userid) setInterval(() => {
this.time = this.getCurrentTime()
}, 1000);
}, },
methods: { methods: {
// id // id
@ -70,7 +75,7 @@
// this.deviceList.forEach(el=>{ // this.deviceList.forEach(el=>{
// this.getVideoData(el.cameraSerialNumber,el.cameraChannelNumber) // this.getVideoData(el.cameraSerialNumber,el.cameraChannelNumber)
// }) // })
this.getVideoData("AD6463273", 11) // this.getVideoData("AD6463273", 11)
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, title: res.msg,
@ -81,25 +86,56 @@
}, },
// //
getVideoData(cameraid, channelid) { // getVideoData(cameraid, channelid) {
this.$http({ // this.$http({
url: this.api.camera_gethls, // url: this.api.camera_gethls,
method: 'GET', // method: 'GET',
data: { // data: {
cameraid, // cameraid,
channelid, // channelid,
} // }
}).then(res => { // }).then(res => {
if (res.code == 200) { // if (res.code == 200) {
this.src = res.ezopen // this.accesstoken = res.data.accesstoken;
} // this.src = res.data.ezopen;
// }
// })
// },
toMiniProgram(){
uni.navigateToMiniProgram({
appId: 'wxf2b3a0262975d8c2',
path: 'pages/live/live?accessToken=' + this.accesstoken + '&deviceSerial=AD6463273&channelNo=11',
success(res) {
console.log(res);
}
}) })
}, },
toVideoLive() { toVideoLive(cameraSerialNumber,cameraChannelNumber) {
uni.navigateTo({ if(cameraSerialNumber && cameraChannelNumber){
url: '/pages/videoLive/videoLive' uni.navigateTo({
}) url: '/pages/videoLive/videoLive?cameraSerialNumber=' + cameraSerialNumber + '&cameraChannelNumber=' + cameraChannelNumber
})
}else{
uni.showToast({
icon:'none',
title: '暂无监控数据',
duration: 2000
});
}
},
getCurrentTime() {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
} }
} }
} }

View File

@ -5,7 +5,8 @@
<view class="center"> <view class="center">
<view class="video_live"> <view class="video_live">
<image src="../../static/videoLive.png" mode=""></image> <!-- <image src="../../static/videoLive.png" mode=""></image> -->
<video id="myVideo" style="width: 100%;height: 100%;" src="https://open.ys7.com/v3/openlive/AK5743927_7_2.m3u8?expire=1706319207&id=670924254623047680&t=8da412e4fc771057b4857d65ebb164168256d1cabd23aad0872faec529c6f896&ev=100" controls></video>
</view> </view>
<view class="skills"> <view class="skills">
@ -74,9 +75,48 @@
flag1:true, flag1:true,
flag2:true, flag2:true,
flag3:true, flag3:true,
cameraSerialNumber:'',
cameraChannelNumber:'',
accesstoken:'',
src:''
}; };
}, },
onLoad(options) {
console.log(options,'00');
this.cameraSerialNumber = options.cameraSerialNumber;
this.cameraChannelNumber = options.cameraChannelNumber
this.getVideoData(this.cameraSerialNumber, this.cameraChannelNumber)
let that = this;
let livePlayerContext = uni.createLivePlayerContext('myVideo');
//
livePlayerContext.play();
//
// livePlayerContext.onEnded(function () {
// console.log('');
// //
// livePlayerContext.pause();
// });
},
methods:{ methods:{
//
getVideoData(cameraid, channelid) {
this.$http({
url: this.api.camera_gethls,
method: 'GET',
data: {
cameraid,
channelid,
}
}).then(res => {
if (res.code == 200) {
this.accesstoken = res.data.accesstoken;
this.src = res.data.ezopen;
}
})
},
// //
focus_addClick(){ focus_addClick(){
this.flag1 = true this.flag1 = true

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

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

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

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

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

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

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

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1557,7 +1557,7 @@ function initData(vueOptions, context) {
try { try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据 data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) { } catch (e) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) { if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data); console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
} }
} }
@ -8934,7 +8934,7 @@ function type(obj) {
function flushCallbacks$1(vm) { function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) { if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) { if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
var mpInstance = vm.$scope; var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid + console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']'); ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@ -8955,14 +8955,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成 //1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher //2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) { if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){ if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance = vm.$scope; var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid + console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick'); ']:nextVueTick');
} }
return nextTick(cb, vm) return nextTick(cb, vm)
}else{ }else{
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){ if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope; var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid + console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick'); ']:nextMPTick');
@ -9058,7 +9058,7 @@ var patch = function(oldVnode, vnode) {
}); });
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData); var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) { if (Object.keys(diffData).length) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) { if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid + console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新', ']差量更新',
JSON.stringify(diffData)); JSON.stringify(diffData));
@ -12006,7 +12006,7 @@ var api = (_api = {
sel_user: "/api/sel/user", sel_user: "/api/sel/user",
//根据id查询用户信息 //根据id查询用户信息
getFs_rtdata: "/getFs/rtdata" getFs_rtdata: "/getFs/rtdata"
}, (0, _defineProperty2.default)(_api, "selFs_time", "/selFs/time"), (0, _defineProperty2.default)(_api, "sel_eqbyid", "/sel/eqbyid/"), (0, _defineProperty2.default)(_api, "chart_fsdata", "/chart/fsdata"), (0, _defineProperty2.default)(_api, "user_update_pwd", "/user/update/pwd"), (0, _defineProperty2.default)(_api, "readFs_state", "/readFs/state"), (0, _defineProperty2.default)(_api, "writeFs", "/writeFs"), (0, _defineProperty2.default)(_api, "readFs_reg", "/readFs/reg"), (0, _defineProperty2.default)(_api, "readJinHuaControl_reg", "/readJinHuaControl/reg"), (0, _defineProperty2.default)(_api, "writeJinHuaControl_write", "/writeJinHuaControl/write"), (0, _defineProperty2.default)(_api, "getcontrol_rtdata", "/getcontrol/rtdata"), (0, _defineProperty2.default)(_api, "getcontrol_fsdata", "/getcontrol/fsdata"), (0, _defineProperty2.default)(_api, "getcontrol_cpermission", '/getcontrol/cpermission'), (0, _defineProperty2.default)(_api, "getControl_getState", '/readControl/getState'), (0, _defineProperty2.default)(_api, "getReadControlliShuiControl", '/readControl/liShuiControl'), (0, _defineProperty2.default)(_api, "readControl_fiveControl", '/readControl/fiveControl'), (0, _defineProperty2.default)(_api, "getcontrol_wxgetpermission", '/getcontrol/wxgetpermission'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve1", '/readControl/solenoidValve1'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve2", '/readControl/solenoidValve2'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve3", '/readControl/solenoidValve3'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve4", '/readControl/solenoidValve4'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve5", '/readControl/solenoidValve5'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve6", '/readControl/solenoidValve6'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve7", '/readControl/solenoidValve7'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve8", '/readControl/solenoidValve8'), (0, _defineProperty2.default)(_api, "readControl_readfilllight", '/readControl/readfilllight'), (0, _defineProperty2.default)(_api, "readControl_readcirculationfan", '/readControl/readcirculationfan'), (0, _defineProperty2.default)(_api, "readControl_fanwetcurtain", '/readControl/fanwetcurtain'), (0, _defineProperty2.default)(_api, "readControl_innercurtain", '/readControl/innercurtain'), (0, _defineProperty2.default)(_api, "readControl_externalsunshade", '/readControl/externalsunshade'), (0, _defineProperty2.default)(_api, "readControl_readskylight", '/readControl/readskylight'), (0, _defineProperty2.default)(_api, "camera_gethls", '/camera/gethls'), (0, _defineProperty2.default)(_api, "readFs_byid", '/readFs/byid'), (0, _defineProperty2.default)(_api, "typeList", [{ }, (0, _defineProperty2.default)(_api, "selFs_time", "/selFs/time"), (0, _defineProperty2.default)(_api, "sel_eqbyid", "/sel/eqbyid/"), (0, _defineProperty2.default)(_api, "chart_fsdata", "/chart/fsdata"), (0, _defineProperty2.default)(_api, "user_update_pwd", "/user/update/pwd"), (0, _defineProperty2.default)(_api, "readFs_state", "/readFs/state"), (0, _defineProperty2.default)(_api, "writeFs", "/writeFs"), (0, _defineProperty2.default)(_api, "readFs_reg", "/readFs/reg"), (0, _defineProperty2.default)(_api, "readJinHuaControl_reg", "/readJinHuaControl/reg"), (0, _defineProperty2.default)(_api, "writeJinHuaControl_write", "/writeJinHuaControl/write"), (0, _defineProperty2.default)(_api, "getcontrol_rtdata", "/getcontrol/rtdata"), (0, _defineProperty2.default)(_api, "getcontrol_fsdata", "/getcontrol/fsdata"), (0, _defineProperty2.default)(_api, "getcontrol_cpermission", '/getcontrol/cpermission'), (0, _defineProperty2.default)(_api, "getControl_getState", '/readControl/getState'), (0, _defineProperty2.default)(_api, "getReadControlliShuiControl", '/readControl/liShuiControl'), (0, _defineProperty2.default)(_api, "readControl_fiveControl", '/readControl/fiveControl'), (0, _defineProperty2.default)(_api, "getcontrol_wxgetpermission", '/getcontrol/wxgetpermission'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve1", '/readControl/solenoidValve1'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve2", '/readControl/solenoidValve2'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve3", '/readControl/solenoidValve3'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve4", '/readControl/solenoidValve4'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve5", '/readControl/solenoidValve5'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve6", '/readControl/solenoidValve6'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve7", '/readControl/solenoidValve7'), (0, _defineProperty2.default)(_api, "readControl_solenoidValve8", '/readControl/solenoidValve8'), (0, _defineProperty2.default)(_api, "readControl_readfilllight", '/readControl/readfilllight'), (0, _defineProperty2.default)(_api, "readControl_readcirculationfan", '/readControl/readcirculationfan'), (0, _defineProperty2.default)(_api, "readControl_fanwetcurtain", '/readControl/fanwetcurtain'), (0, _defineProperty2.default)(_api, "readControl_innercurtain", '/readControl/innercurtain'), (0, _defineProperty2.default)(_api, "readControl_externalsunshade", '/readControl/externalsunshade'), (0, _defineProperty2.default)(_api, "readControl_readskylight", '/readControl/readskylight'), (0, _defineProperty2.default)(_api, "camera_gethls", '/camera/gethls'), (0, _defineProperty2.default)(_api, "readFs_byid", '/readFs/byid'), (0, _defineProperty2.default)(_api, "getcontrol_geteqetdata", '/getcontrol/geteqetdata'), (0, _defineProperty2.default)(_api, "getcontrol_rtDatastation", '/getcontrol/rtDatastation'), (0, _defineProperty2.default)(_api, "readControl_interiorthermalinsulation", '/readControl/interiorthermalinsulation'), (0, _defineProperty2.default)(_api, "typeList", [{
label: '无意义的传感器', label: '无意义的传感器',
value: 0, value: 0,
countType: 0, countType: 0,
@ -12674,7 +12674,7 @@ function _extends() {
var formatRegExp = /%[sdj%]/g; var formatRegExp = /%[sdj%]/g;
var warning = function warning() {}; // don't print warning message when in production env or node runtime var warning = function warning() {}; // don't print warning message when in production env or node runtime
if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') { if (typeof process !== 'undefined' && Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"greenhouse-wisdom-applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
warning = function warning(type, errors) { warning = function warning(type, errors) {
if (typeof console !== 'undefined' && console.warn) { if (typeof console !== 'undefined' && console.warn) {
if (errors.every(function (e) { if (errors.every(function (e) {

View File

@ -182,18 +182,89 @@ var render = function () {
var g6 = _vm.purviewList.indexOf("26") var g6 = _vm.purviewList.indexOf("26")
var g7 = _vm.purviewList.indexOf("23") var g7 = _vm.purviewList.indexOf("23")
var g8 = _vm.purviewList.indexOf("26") var g8 = _vm.purviewList.indexOf("26")
var l3 =
g8 != -1
? _vm.__map(_vm.outFlipWindowList, function (item, index) {
var $orig = _vm.__get_orig(item)
var m6 =
item.outFlipWindowState != 0
? _vm.getNumberStatus(item.statusProgress)
: null
return {
$orig: $orig,
m6: m6,
}
})
: null
var g9 = _vm.purviewList.indexOf("24") var g9 = _vm.purviewList.indexOf("24")
var l4 =
g9 != -1
? _vm.__map(_vm.innercurtainList, function (item, index) {
var $orig = _vm.__get_orig(item)
var m7 =
item.innercurtainState != 0
? _vm.getNumberStatus(item.statusProgress)
: null
return {
$orig: $orig,
m7: m7,
}
})
: null
var g10 = _vm.purviewList.indexOf("25") var g10 = _vm.purviewList.indexOf("25")
var l5 =
g10 != -1
? _vm.__map(_vm.externalsunshadeList, function (item, index) {
var $orig = _vm.__get_orig(item)
var m8 =
item.externalsunshadeState != 0
? _vm.getNumberStatus(item.statusProgress)
: null
return {
$orig: $orig,
m8: m8,
}
})
: null
var g11 = _vm.purviewList.indexOf("19") var g11 = _vm.purviewList.indexOf("19")
var l3 = _vm.__map(_vm.electronMagneticStatus, function (item, index) { var l6 =
g11 != -1
? _vm.__map(_vm.airWindowList, function (item, index) {
var $orig = _vm.__get_orig(item)
var m9 =
item.airWindowState != 0
? _vm.getNumberStatus(item.statusProgress)
: null
return {
$orig: $orig,
m9: m9,
}
})
: null
var g12 = _vm.purviewList.indexOf("27")
var l7 =
g12 != -1
? _vm.__map(_vm.interiorthermalinsulationList, function (item, index) {
var $orig = _vm.__get_orig(item)
var m10 =
item.interiorthermalinsulationState != 0
? _vm.getNumberStatus(item.statusProgress)
: null
return {
$orig: $orig,
m10: m10,
}
})
: null
var l8 = _vm.__map(_vm.electronMagneticStatus, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g12 = _vm.purviewList.indexOf((index + 11).toString()) var g13 = _vm.purviewList.indexOf((index + 11).toString())
return { return {
$orig: $orig, $orig: $orig,
g12: g12, g13: g13,
} }
}) })
var g13 = _vm.purviewList.length var g14 = _vm.purviewList.length
if (!_vm._isMounted) { if (!_vm._isMounted) {
_vm.e0 = function ($event) { _vm.e0 = function ($event) {
_vm.fiveControlShow = false _vm.fiveControlShow = false
@ -234,6 +305,9 @@ var render = function () {
_vm.e12 = function ($event) { _vm.e12 = function ($event) {
_vm.airWindowShow = false _vm.airWindowShow = false
} }
_vm.e13 = function ($event) {
_vm.interiorthermalinsulationShow = false
}
} }
_vm.$mp.data = Object.assign( _vm.$mp.data = Object.assign(
{}, {},
@ -251,11 +325,17 @@ var render = function () {
g6: g6, g6: g6,
g7: g7, g7: g7,
g8: g8, g8: g8,
g9: g9,
g10: g10,
g11: g11,
l3: l3, l3: l3,
g13: g13, g9: g9,
l4: l4,
g10: g10,
l5: l5,
g11: g11,
l6: l6,
g12: g12,
l7: l7,
l8: l8,
g14: g14,
}, },
} }
) )
@ -1516,6 +1596,85 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = { var _default = {
data: function data() { data: function data() {
return { return {
@ -1874,11 +2033,13 @@ var _default = {
outFlipWindowList: [{ outFlipWindowList: [{
name: '1#湿帘外翻窗', name: '1#湿帘外翻窗',
outFlipWindowState: 0, outFlipWindowState: 0,
progress: 0 progress: 0,
statusProgress: 0
}, { }, {
name: '2#湿帘外翻窗', name: '2#湿帘外翻窗',
outFlipWindowState: 0, outFlipWindowState: 0,
progress: 0 progress: 0,
statusProgress: 0
}], }],
popoutFlipWindowName: '', popoutFlipWindowName: '',
innercurtainShow: false, innercurtainShow: false,
@ -1887,11 +2048,13 @@ var _default = {
innercurtainList: [{ innercurtainList: [{
name: '1#内遮阳', name: '1#内遮阳',
innercurtainState: 0, innercurtainState: 0,
progress: 0 progress: 0,
statusProgress: 0
}, { }, {
name: '2#内遮阳', name: '2#内遮阳',
innercurtainState: 0, innercurtainState: 0,
progress: 0 progress: 0,
statusProgress: 0
}], }],
popinnercurtainName: '', popinnercurtainName: '',
externalsunshadeShow: false, externalsunshadeShow: false,
@ -1900,11 +2063,13 @@ var _default = {
externalsunshadeList: [{ externalsunshadeList: [{
name: '1#外遮阳', name: '1#外遮阳',
externalsunshadeState: 0, externalsunshadeState: 0,
progress: 0 progress: 0,
statusProgress: 0
}, { }, {
name: '2#外遮阳', name: '2#外遮阳',
externalsunshadeState: 0, externalsunshadeState: 0,
progress: 0 progress: 0,
statusProgress: 0
}], }],
popexternalsunshadeName: '', popexternalsunshadeName: '',
airWindowShow: false, airWindowShow: false,
@ -1913,21 +2078,40 @@ var _default = {
airWindowList: [{ airWindowList: [{
name: '1#通风窗', name: '1#通风窗',
airWindowState: 0, airWindowState: 0,
progress: 0 progress: 0,
statusProgress: 0
}, { }, {
name: '2#通风窗', name: '2#通风窗',
airWindowState: 0, airWindowState: 0,
progress: 0 progress: 0,
statusProgress: 0
}, { }, {
name: '3#通风窗', name: '3#通风窗',
airWindowState: 0, airWindowState: 0,
progress: 0 progress: 0,
statusProgress: 0
}, { }, {
name: '4#通风窗', name: '4#通风窗',
airWindowState: 0, airWindowState: 0,
progress: 0 progress: 0,
statusProgress: 0
}], }],
popairWindowName: '' popairWindowName: '',
interiorthermalinsulationShow: false,
//内保温
interiorthermalinsulationIndex: 0,
interiorthermalinsulationList: [{
name: '1#内保温',
interiorthermalinsulationState: 0,
progress: 0,
statusProgress: 0
}, {
name: '2#内保温',
interiorthermalinsulationState: 0,
progress: 0,
statusProgress: 0
}],
interiorthermalinsulationName: ''
}; };
}, },
onReady: function onReady() { onReady: function onReady() {
@ -2244,6 +2428,20 @@ var _default = {
this.changeBtn(21319, dataNum); this.changeBtn(21319, dataNum);
} }
}, },
// 内保温
changeInnerInsulationControl: function changeInnerInsulationControl(index) {
this.interiorthermalinsulationIndex = index;
var dataNum = {
target: {
value: this.interiorthermalinsulationIndex
}
};
if (this.interiorthermalinsulationName == 0) {
this.changeBtn(22000, dataNum);
} else if (this.interiorthermalinsulationName == 1) {
this.changeBtn(21915, dataNum);
}
},
changeBtn: function changeBtn(code, el) { changeBtn: function changeBtn(code, el) {
var data = { var data = {
equipmentId: this.deviceId, equipmentId: this.deviceId,
@ -2497,6 +2695,7 @@ var _default = {
_this7.outFlipWindowList.forEach(function (el, index) { _this7.outFlipWindowList.forEach(function (el, index) {
el.outFlipWindowState = res.data[1084 + index * 3]; el.outFlipWindowState = res.data[1084 + index * 3];
el.progress = res.data[1086 + index * 3]; el.progress = res.data[1086 + index * 3];
el.statusProgress = res.data[1085 + index * 3];
}); });
} }
; ;
@ -2506,6 +2705,7 @@ var _default = {
_this7.innercurtainList.forEach(function (el, index) { _this7.innercurtainList.forEach(function (el, index) {
el.innercurtainState = res.data[1090 + index * 3]; el.innercurtainState = res.data[1090 + index * 3];
el.progress = res.data[1092 + index * 3]; el.progress = res.data[1092 + index * 3];
el.statusProgress = res.data[1091 + index * 3];
}); });
} }
; ;
@ -2515,6 +2715,7 @@ var _default = {
_this7.externalsunshadeList.forEach(function (el, index) { _this7.externalsunshadeList.forEach(function (el, index) {
el.externalsunshadeState = res.data[1096 + index * 3]; el.externalsunshadeState = res.data[1096 + index * 3];
el.progress = res.data[1098 + index * 3]; el.progress = res.data[1098 + index * 3];
el.statusProgress = res.data[1097 + index * 3];
}); });
} }
; ;
@ -2524,6 +2725,17 @@ var _default = {
_this7.airWindowList.forEach(function (el, index) { _this7.airWindowList.forEach(function (el, index) {
el.airWindowState = res.data[1102 + index * 3]; el.airWindowState = res.data[1102 + index * 3];
el.progress = res.data[1104 + index * 3]; el.progress = res.data[1104 + index * 3];
el.statusProgress = res.data[1103 + index * 3];
});
}
;
// 内保温
if (_this7.purviewList.indexOf('27') != -1) {
_this7.interiorthermalinsulationList.forEach(function (el, index) {
el.interiorthermalinsulationState = res.data[1182 + index * 3];
el.progress = res.data[1184 + index * 3];
el.statusProgress = res.data[1183 + index * 3];
}); });
} }
; ;
@ -2783,6 +2995,24 @@ var _default = {
} }
}); });
}, },
// 内保温
interiorthermalinsulationHander: function interiorthermalinsulationHander(index) {
var _this20 = this;
this.interiorthermalinsulationIndex = 0;
this.interiorthermalinsulationName = index;
var deviceId = this.deviceId;
this.interiorthermalinsulationShow = true;
this.$http({
url: this.api.readControl_interiorthermalinsulation + '?deviceId=' + deviceId,
method: 'GET'
}).then(function (res) {
if (res.code == 200) {
uni.hideLoading();
uni.stopPullDownRefresh();
_this20.interiorthermalinsulationIndex = res.data[22000 + index * 12];
}
});
},
getNumberStatus: function getNumberStatus(index) { getNumberStatus: function getNumberStatus(index) {
if (index == 0) { if (index == 0) {
return '静止状态'; return '静止状态';
@ -2905,7 +3135,7 @@ var _default = {
this.delayTimer(0, data); this.delayTimer(0, data);
}, },
delayTimer: function delayTimer(i, data) { delayTimer: function delayTimer(i, data) {
var _this20 = this; var _this21 = this;
var that = this; var that = this;
//整体接口 //整体接口
var j = 5; var j = 5;
@ -2915,12 +3145,12 @@ var _default = {
++i; ++i;
if (i == j) { if (i == j) {
that.changeData(data); that.changeData(data);
clearInterval(_this20.timer); clearInterval(_this21.timer);
} }
}, 100); }, 100);
}, },
changeData: function changeData(data) { changeData: function changeData(data) {
var _this21 = this; var _this22 = this;
var that = this; var that = this;
this.$http({ this.$http({
url: this.api.writeJinHuaControl_write, url: this.api.writeJinHuaControl_write,
@ -2932,7 +3162,7 @@ var _default = {
title: res.msg, title: res.msg,
icon: "success" icon: "success"
}); });
_this21.dataInit(); _this22.dataInit();
} else { } else {
uni.showToast({ uni.showToast({
title: "失败!", title: "失败!",

File diff suppressed because one or more lines are too long

View File

@ -125,278 +125,338 @@ var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h var _c = _vm._self._c || _h
var l15 = _vm.__map( var l1 = _vm.__map(_vm.weatherList, function (item0, __i0__) {
var $orig = _vm.__get_orig(item0)
var l0 = _vm.__map(item0.weatherListChild, function (item, __i1__) {
var $orig = _vm.__get_orig(item)
var m0 = !(item.equipmentStart == 0)
? _vm.getTypeList(item.formula)
: null
return {
$orig: $orig,
m0: m0,
}
})
var g0 = item0.weatherListChild.length
var g1 = _vm.updateTimeWeather.filter(function (el) {
return el.equipmentId == item0.deviceId
}).length
var g2 =
g1 > 0
? _vm.updateTimeWeather.filter(function (el) {
return el.equipmentId == item0.deviceId
})
: null
return {
$orig: $orig,
l0: l0,
g0: g0,
g1: g1,
g2: g2,
}
})
var l3 = _vm.__map(_vm.equipmentName30List, function (item0, __i2__) {
var $orig = _vm.__get_orig(item0)
var l2 = _vm.__map(item0.equipmentName30ListChild, function (item, __i3__) {
var $orig = _vm.__get_orig(item)
var m1 = !(item.equipmentStart == 0)
? _vm.getTypeList(item.formula)
: null
return {
$orig: $orig,
m1: m1,
}
})
var g3 = item0.equipmentName30ListChild.length
var g4 = _vm.updateTime30.filter(function (el) {
return el.equipmentId == item0.deviceId
}).length
var g5 =
g4 > 0
? _vm.updateTime30.filter(function (el) {
return el.equipmentId == item0.deviceId
})
: null
return {
$orig: $orig,
l2: l2,
g3: g3,
g4: g4,
g5: g5,
}
})
var l19 = _vm.__map(
_vm.waterAndFertilizerParamsList, _vm.waterAndFertilizerParamsList,
function (item1, index1) { function (item1, index1) {
var $orig = _vm.__get_orig(item1) var $orig = _vm.__get_orig(item1)
var l0 = _vm.__map(item1.childList_mubiao, function (item2, index2) { var l4 = _vm.__map(item1.childList_mubiao, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m0 = _vm.getTypeList(item2.formula) var m2 = _vm.getTypeList(item2.formula)
var m1 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m3 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m2 = !(item2.equipmentStart == 0) var m4 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m0: m0,
m1: m1,
m2: m2, m2: m2,
}
})
var g0 = item1.childList_mubiao.length
var l1 = _vm.__map(item1.childList_one, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m3 = _vm.getTypeList(item2.formula)
var m4 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m5 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m3: m3, m3: m3,
m4: m4, m4: m4,
m5: m5,
} }
}) })
var g1 = item1.childList_one.length var g6 = item1.childList_mubiao.length
var l2 = _vm.__map(item1.childList_two, function (item2, index2) { var l5 = _vm.__map(item1.childList_one, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m6 = _vm.getTypeList(item2.formula) var m5 = _vm.getTypeList(item2.formula)
var m7 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m6 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m8 = !(item2.equipmentStart == 0) var m7 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m5: m5,
m6: m6, m6: m6,
m7: m7, m7: m7,
m8: m8,
} }
}) })
var g2 = item1.childList_two.length var g7 = item1.childList_one.length
var l3 = _vm.__map(item1.childList_three, function (item2, index2) { var l6 = _vm.__map(item1.childList_two, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m9 = _vm.getTypeList(item2.formula) var m8 = _vm.getTypeList(item2.formula)
var m10 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m9 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m11 = !(item2.equipmentStart == 0) var m10 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m8: m8,
m9: m9, m9: m9,
m10: m10, m10: m10,
m11: m11,
} }
}) })
var g3 = item1.childList_three.length var g8 = item1.childList_two.length
var l4 = _vm.__map(item1.childList_four, function (item2, index2) { var l7 = _vm.__map(item1.childList_three, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m12 = _vm.getTypeList(item2.formula) var m11 = _vm.getTypeList(item2.formula)
var m13 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m12 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m14 = !(item2.equipmentStart == 0) var m13 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m11: m11,
m12: m12, m12: m12,
m13: m13, m13: m13,
m14: m14,
} }
}) })
var g4 = item1.childList_four.length var g9 = item1.childList_three.length
var l5 = _vm.__map(item1.childList_five, function (item2, index2) { var l8 = _vm.__map(item1.childList_four, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m15 = _vm.getTypeList(item2.formula) var m14 = _vm.getTypeList(item2.formula)
var m16 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m15 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m17 = !(item2.equipmentStart == 0) var m16 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m14: m14,
m15: m15, m15: m15,
m16: m16, m16: m16,
m17: m17,
} }
}) })
var g5 = item1.childList_five.length var g10 = item1.childList_four.length
var l6 = _vm.__map(item1.childList_six, function (item2, index2) { var l9 = _vm.__map(item1.childList_five, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m18 = _vm.getTypeList(item2.formula) var m17 = _vm.getTypeList(item2.formula)
var m19 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m18 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m20 = !(item2.equipmentStart == 0) var m19 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m17: m17,
m18: m18, m18: m18,
m19: m19, m19: m19,
m20: m20,
} }
}) })
var g6 = item1.childList_six.length var g11 = item1.childList_five.length
var l7 = _vm.__map(item1.childList_seven, function (item2, index2) { var l10 = _vm.__map(item1.childList_six, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m21 = _vm.getTypeList(item2.formula) var m20 = _vm.getTypeList(item2.formula)
var m22 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m21 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m23 = !(item2.equipmentStart == 0) var m22 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m20: m20,
m21: m21, m21: m21,
m22: m22, m22: m22,
m23: m23,
} }
}) })
var g7 = item1.childList_seven.length var g12 = item1.childList_six.length
var l8 = _vm.__map(item1.childList_eight, function (item2, index2) { var l11 = _vm.__map(item1.childList_seven, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m24 = _vm.getTypeList(item2.formula) var m23 = _vm.getTypeList(item2.formula)
var m25 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m24 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m26 = !(item2.equipmentStart == 0) var m25 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m23: m23,
m24: m24, m24: m24,
m25: m25, m25: m25,
m26: m26,
} }
}) })
var g8 = item1.childList_eight.length var g13 = item1.childList_seven.length
var l9 = _vm.__map(item1.childList_nine, function (item2, index2) { var l12 = _vm.__map(item1.childList_eight, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m27 = _vm.getTypeList(item2.formula) var m26 = _vm.getTypeList(item2.formula)
var m28 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m27 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m29 = !(item2.equipmentStart == 0) var m28 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m26: m26,
m27: m27, m27: m27,
m28: m28, m28: m28,
m29: m29,
} }
}) })
var g9 = item1.childList_nine.length var g14 = item1.childList_eight.length
var l10 = _vm.__map(item1.childList_ten, function (item2, index2) { var l13 = _vm.__map(item1.childList_nine, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m30 = _vm.getTypeList(item2.formula) var m29 = _vm.getTypeList(item2.formula)
var m31 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m30 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m32 = !(item2.equipmentStart == 0) var m31 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m29: m29,
m30: m30, m30: m30,
m31: m31, m31: m31,
m32: m32,
} }
}) })
var g10 = item1.childList_ten.length var g15 = item1.childList_nine.length
var l11 = _vm.__map(item1.childList_eleven, function (item2, index2) { var l14 = _vm.__map(item1.childList_ten, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m33 = _vm.getTypeList(item2.formula) var m32 = _vm.getTypeList(item2.formula)
var m34 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m33 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m35 = !(item2.equipmentStart == 0) var m34 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m32: m32,
m33: m33, m33: m33,
m34: m34, m34: m34,
m35: m35,
} }
}) })
var g11 = item1.childList_eleven.length var g16 = item1.childList_ten.length
var l12 = _vm.__map(item1.childList_twelve, function (item2, index2) { var l15 = _vm.__map(item1.childList_eleven, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m36 = _vm.getTypeList(item2.formula) var m35 = _vm.getTypeList(item2.formula)
var m37 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m36 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m38 = !(item2.equipmentStart == 0) var m37 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m35: m35,
m36: m36, m36: m36,
m37: m37, m37: m37,
m38: m38,
} }
}) })
var g12 = item1.childList_twelve.length var g17 = item1.childList_eleven.length
var l13 = _vm.__map(item1.childList_thirteen, function (item2, index2) { var l16 = _vm.__map(item1.childList_twelve, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m39 = _vm.getTypeList(item2.formula) var m38 = _vm.getTypeList(item2.formula)
var m40 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m39 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m41 = !(item2.equipmentStart == 0) var m40 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m38: m38,
m39: m39, m39: m39,
m40: m40, m40: m40,
m41: m41,
} }
}) })
var g13 = item1.childList_thirteen.length var g18 = item1.childList_twelve.length
var l14 = _vm.__map(item1.childList_fourteen, function (item2, index2) { var l17 = _vm.__map(item1.childList_thirteen, function (item2, index2) {
var $orig = _vm.__get_orig(item2) var $orig = _vm.__get_orig(item2)
var m42 = _vm.getTypeList(item2.formula) var m41 = _vm.getTypeList(item2.formula)
var m43 = _vm.getStatus(item2.equipmentNumber, item2.targetValue) var m42 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m44 = !(item2.equipmentStart == 0) var m43 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula) ? _vm.getTypeList(item2.formula)
: null : null
return { return {
$orig: $orig, $orig: $orig,
m41: m41,
m42: m42, m42: m42,
m43: m43, m43: m43,
m44: m44,
} }
}) })
var g14 = item1.childList_fourteen.length var g19 = item1.childList_thirteen.length
var g15 = _vm.updateTime.filter(function (el) { var l18 = _vm.__map(item1.childList_fourteen, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m44 = _vm.getTypeList(item2.formula)
var m45 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m46 = !(item2.equipmentStart == 0)
? _vm.getTypeList(item2.formula)
: null
return {
$orig: $orig,
m44: m44,
m45: m45,
m46: m46,
}
})
var g20 = item1.childList_fourteen.length
var g21 = _vm.updateTime.filter(function (el) {
return el.equipmentId == item1.deviceId return el.equipmentId == item1.deviceId
}).length }).length
var g16 = var g22 =
g15 > 0 g21 > 0
? _vm.updateTime.filter(function (el) { ? _vm.updateTime.filter(function (el) {
return el.equipmentId == item1.deviceId return el.equipmentId == item1.deviceId
}) })
: null : null
return { return {
$orig: $orig, $orig: $orig,
l0: l0,
g0: g0,
l1: l1,
g1: g1,
l2: l2,
g2: g2,
l3: l3,
g3: g3,
l4: l4, l4: l4,
g4: g4,
l5: l5,
g5: g5,
l6: l6,
g6: g6, g6: g6,
l7: l7, l5: l5,
g7: g7, g7: g7,
l8: l8, l6: l6,
g8: g8, g8: g8,
l9: l9, l7: l7,
g9: g9, g9: g9,
l10: l10, l8: l8,
g10: g10, g10: g10,
l11: l11, l9: l9,
g11: g11, g11: g11,
l12: l12, l10: l10,
g12: g12, g12: g12,
l13: l13, l11: l11,
g13: g13, g13: g13,
l14: l14, l12: l12,
g14: g14, g14: g14,
l13: l13,
g15: g15, g15: g15,
l14: l14,
g16: g16, g16: g16,
l15: l15,
g17: g17,
l16: l16,
g18: g18,
l17: l17,
g19: g19,
l18: l18,
g20: g20,
g21: g21,
g22: g22,
} }
} }
) )
@ -404,7 +464,9 @@ var render = function () {
{}, {},
{ {
$root: { $root: {
l15: l15, l1: l1,
l3: l3,
l19: l19,
}, },
} }
) )
@ -675,6 +737,59 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = { var _default = {
data: function data() { data: function data() {
return { return {
@ -768,7 +883,13 @@ var _default = {
//countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10 //countType计算类型 0是原数据 1是原数据-400 2是原数据/10 3是(原数据-400) / 10
typeList: [], typeList: [],
timer: null, timer: null,
updateTime: [] updateTime: [],
weatherList: [],
weatherDeviceName: '',
updateTimeWeather: [],
equipmentName30List: [],
equipmentName30ListChild: [],
updateTime30: []
}; };
}, },
onLoad: function onLoad() { onLoad: function onLoad() {
@ -781,6 +902,12 @@ var _default = {
key: 'token', key: 'token',
success: function success(res) { success: function success(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')); that.getEquipmentInfo(uni.getStorageSync('userid'));
that.getcontrol_geteqetdata(uni.getStorageSync('userid'));
},
fail: function fail(err) {
uni.reLaunch({
url: '/pages/login/login'
});
} }
}); });
}, },
@ -793,6 +920,7 @@ var _default = {
key: 'token', key: 'token',
success: function success(res) { success: function success(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')); that.getEquipmentInfo(uni.getStorageSync('userid'));
that.getcontrol_geteqetdata(uni.getStorageSync('userid'));
} }
}); });
}, 60000); }, 60000);
@ -810,25 +938,27 @@ var _default = {
key: 'token', key: 'token',
success: function success(res) { success: function success(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')); that.getEquipmentInfo(uni.getStorageSync('userid'));
that.getcontrol_geteqetdata(uni.getStorageSync('userid'));
} }
}); });
}, },
mounted: function mounted() { mounted: function mounted() {
uni.showLoading({ // uni.showLoading({
title: '加载中...' // title: '加载中...'
}); // });
var that = this; // let that = this
uni.getStorage({ // uni.getStorage({
key: 'token', // key: 'token',
success: function success(res) { // success: function(res) {
that.getEquipmentInfo(uni.getStorageSync('userid')); // that.getEquipmentInfo(uni.getStorageSync('userid'));
}, // that.getcontrol_geteqetdata(uni.getStorageSync('userid'))
fail: function fail(err) { // },
uni.reLaunch({ // fail: function(err) {
url: '/pages/login/login' // uni.reLaunch({
}); // url: '/pages/login/login'
} // })
}); // }
// })
}, },
methods: { methods: {
// 根据用户id查询对应的设备数据 // 根据用户id查询对应的设备数据
@ -840,10 +970,20 @@ var _default = {
// }); // });
this.$http({ this.$http({
url: this.api.sel_eqbyid + userid, url: this.api.sel_eqbyid + userid,
// url: this.api.sel_eqbyid + '1730755572975824896',
method: 'GET' method: 'GET'
}).then(function (res) { }).then(function (res) {
// console.log(res, '根据用户id查询对应的设备数据'); // console.log(res, '根据用户id查询对应的设备数据');
if (res.code == 200) { if (res.code == 200) {
_this.equipmentName30List = [];
res.data.forEach(function (el) {
if (el.equipmentName == 30) {
_this.equipmentName30List.push(el);
}
});
if (_this.equipmentName30List.length != 0) {
_this.getcontrol_rtDatastation1();
}
_this.waterAndFertilizerParamsList = res.data.map(function (item, index) { _this.waterAndFertilizerParamsList = res.data.map(function (item, index) {
return _objectSpread(_objectSpread({}, item), {}, { return _objectSpread(_objectSpread({}, item), {}, {
childList: [], childList: [],
@ -1006,6 +1146,61 @@ var _default = {
} else if (targetValue == 0 && equipmentNumber != 0 && equipmentNumber != 15) { } else if (targetValue == 0 && equipmentNumber != 0 && equipmentNumber != 15) {
return equipmentNumber + '#'; return equipmentNumber + '#';
} }
},
// 气象站
getcontrol_geteqetdata: function getcontrol_geteqetdata(userId) {
var _this2 = this;
this.$http({
url: this.api.getcontrol_geteqetdata + '?userId=' + userId,
method: 'GET'
}).then(function (res) {
// console.log(res,'小程序气象站显示');
if (res.code == 200) {
_this2.weatherList = res.data;
_this2.weatherList = _this2.weatherList.map(function (item, index) {
return _objectSpread(_objectSpread({}, item), {}, {
weatherListChild: []
});
});
_this2.weatherList.forEach(function (el) {
// 主页查看控制器气象站实时数据
_this2.$http({
url: _this2.api.getcontrol_rtDatastation + '?equipmentId=' + el.deviceId,
method: 'GET'
}).then(function (res) {
// console.log(res,'主页查看控制器气象站实时数据');
if (res.code == 200) {
el.weatherListChild = res.data;
_this2.updateTimeWeather.push(res.data[0]);
}
});
});
}
});
},
// 主页查看控制器气象站实时数据
getcontrol_rtDatastation: function getcontrol_rtDatastation(equipmentId) {},
// 获取deviceName为30的气象站实时数据
getcontrol_rtDatastation1: function getcontrol_rtDatastation1() {
var _this3 = this;
this.equipmentName30List = this.equipmentName30List.map(function (item, index) {
return _objectSpread(_objectSpread({}, item), {}, {
equipmentName30ListChild: []
});
});
this.updateTime30 = [];
this.equipmentName30List.forEach(function (el) {
_this3.$http({
url: _this3.api.getcontrol_rtDatastation + '?equipmentId=' + el.deviceId,
method: 'GET'
}).then(function (res) {
if (res.code == 200) {
el.equipmentName30ListChild = res.data;
_this3.updateTime30.push(res.data[0]);
}
});
});
// console.log(this.equipmentName30List,'this.equipmentName30List');
} }
} }
}; };

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background-color: #F5F6FA; background-color: #F5F6FA;
overflow: auto;
} }
.timeEnvironment .navbar.data-v-34c343d8 { .timeEnvironment .navbar.data-v-34c343d8 {
width: 100%; width: 100%;
@ -293,4 +294,11 @@
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
} }
.line.data-v-34c343d8 {
width: 100%;
height: 1rpx;
background-color: #DDDDDD;
flex-shrink: 0;
margin-top: 20rpx;
}

View File

@ -193,9 +193,6 @@ exports.default = void 0;
// //
// //
// //
//
//
// import EZUIKit from 'ezuikit-js';
var _default = { var _default = {
data: function data() { data: function data() {
return { return {
@ -206,21 +203,28 @@ var _default = {
userid: '', userid: '',
deviceList: [], deviceList: [],
liveList: [], liveList: [],
src: '' accesstoken: '',
src: '',
time: ''
}; };
}, },
onLoad: function onLoad() {
this.userid = uni.getStorageSync('userid');
this.getEquipmentInfo(this.userid);
},
onPullDownRefresh: function onPullDownRefresh() { onPullDownRefresh: function onPullDownRefresh() {
this.getEquipmentInfo(this.userid); this.getEquipmentInfo(this.userid);
}, },
mounted: function mounted() { mounted: function mounted() {
this.userid = uni.getStorageSync('userid'); var _this = this;
// console.log(EZUIKit); setInterval(function () {
this.getEquipmentInfo(this.userid); _this.time = _this.getCurrentTime();
}, 1000);
}, },
methods: { methods: {
// 根据用户id查询对应的设备数据 // 根据用户id查询对应的设备数据
getEquipmentInfo: function getEquipmentInfo(userid) { getEquipmentInfo: function getEquipmentInfo(userid) {
var _this = this; var _this2 = this;
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}); });
@ -231,13 +235,13 @@ var _default = {
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading(); uni.hideLoading();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
_this.deviceList = res.data; _this2.deviceList = res.data;
// this.deviceList.forEach(el=>{ // this.deviceList.forEach(el=>{
// this.getVideoData(el.cameraSerialNumber,el.cameraChannelNumber) // this.getVideoData(el.cameraSerialNumber,el.cameraChannelNumber)
// }) // })
_this.getVideoData("AD6463273", 11); // this.getVideoData("AD6463273", 11)
} else { } else {
_this.$refs.uToast.show({ _this2.$refs.uToast.show({
title: res.msg, title: res.msg,
type: 'error' type: 'error'
}); });
@ -245,25 +249,52 @@ var _default = {
}); });
}, },
// 获取摄像头得地址 // 获取摄像头得地址
getVideoData: function getVideoData(cameraid, channelid) { // getVideoData(cameraid, channelid) {
var _this2 = this; // this.$http({
this.$http({ // url: this.api.camera_gethls,
url: this.api.camera_gethls, // method: 'GET',
method: 'GET', // data: {
data: { // cameraid,
cameraid: cameraid, // channelid,
channelid: channelid // }
} // }).then(res => {
}).then(function (res) { // if (res.code == 200) {
if (res.code == 200) { // this.accesstoken = res.data.accesstoken;
_this2.src = res.ezopen; // this.src = res.data.ezopen;
// }
// })
// },
toMiniProgram: function toMiniProgram() {
uni.navigateToMiniProgram({
appId: 'wxf2b3a0262975d8c2',
path: 'pages/live/live?accessToken=' + this.accesstoken + '&deviceSerial=AD6463273&channelNo=11',
success: function success(res) {
console.log(res);
} }
}); });
}, },
toVideoLive: function toVideoLive() { toVideoLive: function toVideoLive(cameraSerialNumber, cameraChannelNumber) {
uni.navigateTo({ if (cameraSerialNumber && cameraChannelNumber) {
url: '/pages/videoLive/videoLive' uni.navigateTo({
}); url: '/pages/videoLive/videoLive?cameraSerialNumber=' + cameraSerialNumber + '&cameraChannelNumber=' + cameraChannelNumber
});
} else {
uni.showToast({
icon: 'none',
title: '暂无监控数据',
duration: 2000
});
}
},
getCurrentTime: function getCurrentTime() {
var now = new Date();
var year = now.getFullYear();
var month = (now.getMonth() + 1).toString().padStart(2, '0');
var day = now.getDate().toString().padStart(2, '0');
var hours = now.getHours().toString().padStart(2, '0');
var minutes = now.getMinutes().toString().padStart(2, '0');
var seconds = now.getSeconds().toString().padStart(2, '0');
return "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes, ":").concat(seconds);
} }
} }
}; };

View File

@ -1 +1 @@
<view class="timeVideo data-v-dd7dcdb8"><u-navbar vue-id="d23ae73c-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="实时视频" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-dd7dcdb8" bind:__l="__l"></u-navbar><view class="content data-v-dd7dcdb8"><block wx:for="{{deviceList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-dd7dcdb8"><view class="nav data-v-dd7dcdb8"><image src="../../static/video.png" mode class="data-v-dd7dcdb8"></image><text class="data-v-dd7dcdb8">{{item.deviceTypeName+"-摄像机#2"}}</text></view><view class="video data-v-dd7dcdb8"><image src="../../static/video1.png" mode class="data-v-dd7dcdb8"></image></view><view class="timer data-v-dd7dcdb8"><view class="left data-v-dd7dcdb8"><image src="../../static/timer.png" mode class="data-v-dd7dcdb8"></image><text class="data-v-dd7dcdb8">2023-09-20 14:00:55</text></view><view data-event-opts="{{[['tap',[['toVideoLive',['$event']]]]]}}" class="right data-v-dd7dcdb8" bindtap="__e"><image src="../../static/play.png" mode class="data-v-dd7dcdb8"></image><text class="data-v-dd7dcdb8">现场实况</text></view></view></view></block></view></view> <view class="timeVideo data-v-dd7dcdb8"><u-navbar vue-id="d23ae73c-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="实时视频" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-dd7dcdb8" bind:__l="__l"></u-navbar><view class="content data-v-dd7dcdb8"><block wx:for="{{deviceList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item data-v-dd7dcdb8"><view class="nav data-v-dd7dcdb8"><image src="../../static/video.png" mode class="data-v-dd7dcdb8"></image><text class="data-v-dd7dcdb8">{{item.deviceTypeName+"-摄像机#2"}}</text></view><view class="video data-v-dd7dcdb8"><image src="../../static/video1.png" mode class="data-v-dd7dcdb8"></image></view><view class="timer data-v-dd7dcdb8"><view class="left data-v-dd7dcdb8"><image src="../../static/timer.png" mode class="data-v-dd7dcdb8"></image><text class="data-v-dd7dcdb8">{{time}}</text></view><view data-event-opts="{{[['tap',[['toVideoLive',['$0','$1'],[[['deviceList','',index,'cameraSerialNumber']],[['deviceList','',index,'cameraChannelNumber']]]]]]]}}" class="right data-v-dd7dcdb8" bindtap="__e"><image src="../../static/play.png" mode class="data-v-dd7dcdb8"></image><text class="data-v-dd7dcdb8">现场实况</text></view></view></view></block></view></view>

View File

@ -158,7 +158,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) {
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
@ -228,6 +228,7 @@ exports.default = void 0;
// //
// //
// //
//
var _default = { var _default = {
data: function data() { data: function data() {
return { return {
@ -237,10 +238,48 @@ var _default = {
}, },
flag1: true, flag1: true,
flag2: true, flag2: true,
flag3: true flag3: true,
cameraSerialNumber: '',
cameraChannelNumber: '',
accesstoken: '',
src: ''
}; };
}, },
onLoad: function onLoad(options) {
console.log(options, '00');
this.cameraSerialNumber = options.cameraSerialNumber;
this.cameraChannelNumber = options.cameraChannelNumber;
this.getVideoData(this.cameraSerialNumber, this.cameraChannelNumber);
var that = this;
var livePlayerContext = uni.createLivePlayerContext('myVideo');
// 播放直播
livePlayerContext.play();
// 监听直播播放结束事件
// livePlayerContext.onEnded(function () {
// console.log('直播播放结束');
// // 暂停直播
// livePlayerContext.pause();
// });
},
methods: { methods: {
// 获取摄像头得地址
getVideoData: function getVideoData(cameraid, channelid) {
var _this = this;
this.$http({
url: this.api.camera_gethls,
method: 'GET',
data: {
cameraid: cameraid,
channelid: channelid
}
}).then(function (res) {
if (res.code == 200) {
_this.accesstoken = res.data.accesstoken;
_this.src = res.data.ezopen;
}
});
},
// 焦距 // 焦距
focus_addClick: function focus_addClick() { focus_addClick: function focus_addClick() {
this.flag1 = true; this.flag1 = true;
@ -265,6 +304,7 @@ var _default = {
} }
}; };
exports.default = _default; exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }), /***/ }),

View File

@ -1 +1 @@
<view class="videoLive data-v-0ceca996"><u-navbar vue-id="deadeba0-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="摄像机01" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-0ceca996" bind:__l="__l"></u-navbar><view class="center data-v-0ceca996"><view class="video_live data-v-0ceca996"><image src="../../static/videoLive.png" mode class="data-v-0ceca996"></image></view><view class="skills data-v-0ceca996"><view class="left data-v-0ceca996"><image src="../../static/direction_keys.png" mode class="data-v-0ceca996"></image><image class="left_arrow data-v-0ceca996" src="../../static/left_arrow.png" mode></image><image class="right_arrow data-v-0ceca996" src="../../static/right_arrow.png" mode></image><image class="up_arrow data-v-0ceca996" src="../../static/up_arrow.png" mode></image><image class="down_arrow data-v-0ceca996" src="../../static/down_arrow.png" mode></image></view><view class="right data-v-0ceca996"><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['focus_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag1?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag1==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">焦距</view><view data-event-opts="{{[['tap',[['focus_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag1?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag1==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['scale_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag2?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag2==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">缩放</view><view data-event-opts="{{[['tap',[['scale_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag2?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag2==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['aperture_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag3?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag3==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag3==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">光圈</view><view data-event-opts="{{[['tap',[['aperture_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag3?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag3==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag3==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view></view></view></view></view> <view class="videoLive data-v-0ceca996"><u-navbar vue-id="deadeba0-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="摄像机01" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-0ceca996" bind:__l="__l"></u-navbar><view class="center data-v-0ceca996"><view class="video_live data-v-0ceca996"><video style="width:100%;height:100%;" id="myVideo" src="https://open.ys7.com/v3/openlive/AK5743927_7_2.m3u8?expire=1706319207&id=670924254623047680&t=8da412e4fc771057b4857d65ebb164168256d1cabd23aad0872faec529c6f896&ev=100" controls="{{true}}" class="data-v-0ceca996"></video></view><view class="skills data-v-0ceca996"><view class="left data-v-0ceca996"><image src="../../static/direction_keys.png" mode class="data-v-0ceca996"></image><image class="left_arrow data-v-0ceca996" src="../../static/left_arrow.png" mode></image><image class="right_arrow data-v-0ceca996" src="../../static/right_arrow.png" mode></image><image class="up_arrow data-v-0ceca996" src="../../static/up_arrow.png" mode></image><image class="down_arrow data-v-0ceca996" src="../../static/down_arrow.png" mode></image></view><view class="right data-v-0ceca996"><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['focus_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag1?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag1==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">焦距</view><view data-event-opts="{{[['tap',[['focus_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag1?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag1==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag1==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['scale_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag2?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag2==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">缩放</view><view data-event-opts="{{[['tap',[['scale_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag2?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag2==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag2==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view><view class="right_item data-v-0ceca996"><view data-event-opts="{{[['tap',[['aperture_addClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag3?'add_act':'add']}}" bindtap="__e"><block wx:if="{{flag3==true}}"><image src="../../static/add_act.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag3==false}}"><image src="../../static/add.png" mode class="data-v-0ceca996"></image></block></view><view class="focus data-v-0ceca996">光圈</view><view data-event-opts="{{[['tap',[['aperture_subtractClick',['$event']]]]]}}" class="{{['data-v-0ceca996',flag3?'subtract':'subtract_act']}}" bindtap="__e"><block wx:if="{{flag3==true}}"><image src="../../static/subtract.png" mode class="data-v-0ceca996"></image></block><block wx:if="{{flag3==false}}"><image src="../../static/subtract_act.png" mode class="data-v-0ceca996"></image></block></view></view></view></view></view></view>

View File

@ -22,7 +22,24 @@
"libVersion": "3.2.0", "libVersion": "3.2.0",
"appid": "wx05b45a2699f02a2b", "appid": "wx05b45a2699f02a2b",
"projectname": "greenhouse-wisdom-applet", "projectname": "greenhouse-wisdom-applet",
"condition": {}, "condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
},
"editorSetting": { "editorSetting": {
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 4 "tabSize": 4

View File

@ -3,5 +3,18 @@
"projectname": "wszhyWx", "projectname": "wszhyWx",
"setting": { "setting": {
"compileHotReLoad": true "compileHotReLoad": true
},
"condition": {
"miniprogram": {
"list": [
{
"name": "",
"pathName": "pages/videoLive/videoLive",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
} }
} }