aaa
This commit is contained in:
parent
1b5c132ab2
commit
7282664846
|
@ -1,7 +1,7 @@
|
|||
const install = (Vue, vm) => {
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
baseUrl: 'http://192.168.2.17:3202',
|
||||
// baseUrl: 'https://fen.ccttiot.com/prod-api',
|
||||
// baseUrl: 'http://192.168.2.17:3202',
|
||||
baseUrl: 'https://fen.ccttiot.com/prod-api',
|
||||
loadingText: '努力加载中~',
|
||||
loadingTime: 800,
|
||||
// 设置自定义头部content-type
|
||||
|
@ -42,9 +42,9 @@ const install = (Vue, vm) => {
|
|||
vm.$u.post('/app/auth/wxLogin',data).then(res=>{
|
||||
uni.setStorageSync('code', res.code);
|
||||
if (res.code == 10003) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url:'/pages/login/login'
|
||||
// })
|
||||
|
||||
} else if (res.code == 200) {
|
||||
uni.setStorageSync('token', res.token);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</view> -->
|
||||
</view>
|
||||
<view class="tit">
|
||||
{{obj.name}}-{{obj.sn}}
|
||||
{{obj.name == undefined ? '--' : obj.name}}-{{obj.sn == undefined ? '--' : obj.sn}}
|
||||
<view class="sets">
|
||||
<image @click="btnmenu" src="https://api.ccttiot.com/smartmeter/img/static/ulHBKvkXDfe9OIveIJKZ" mode=""></image>
|
||||
<view class="menu" v-if="menuflag">
|
||||
|
@ -36,15 +36,15 @@
|
|||
</view>
|
||||
<view class="address">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uMOucOG04nN4PrLJfqj6" mode=""></image>
|
||||
{{obj.apiaryAddress}}
|
||||
{{obj.apiaryAddress == undefined ? '--' : obj.apiaryAddress}}
|
||||
</view>
|
||||
<view class="weather">
|
||||
<view class="weather_left">
|
||||
<view class="txt">
|
||||
多云 {{daily[0].tempMin}}℃ ~ {{daily[0].tempMax}}℃
|
||||
多云 {{daily[0].tempMin == undefined ? '--' : daily[0].tempMin}}℃ ~ {{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}}℃
|
||||
</view>
|
||||
<view class="txt" style="margin-left: 40rpx;">
|
||||
{{daily[0].windDirDay}} {{daily[0].windSpeedDay}}级
|
||||
{{daily[0].windDirDay == undefined ? '--' : daily[0].windDirDay }} {{daily[0].windSpeedDay == undefined ? '--' : daily[0].windSpeedDay}}级
|
||||
</view>
|
||||
</view>
|
||||
<view class="weather_right" @click="btngd">
|
||||
|
@ -63,7 +63,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="weather_right" style="font-weight: 400;font-size: 24rpx;color: #808080;">
|
||||
更新于 {{obj.lastOnlineTime}}
|
||||
更新于 {{obj.lastOnlineTime == undefined ? '--' : obj.lastOnlineTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="setbox">
|
||||
|
@ -86,24 +86,24 @@
|
|||
<view class="setcard" @click="btnvideo">
|
||||
<view class="top">
|
||||
<view class="left">
|
||||
视频监控
|
||||
操作日志
|
||||
</view>
|
||||
<view class="right iconfont icon-xiangyou1">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="bot">
|
||||
更好查看蜂场情况
|
||||
记录蜂箱情况
|
||||
</view>
|
||||
<view class="img">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ukN0K37DEPQQxFJ03Qi9" mode=""></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u90wdyoHsspUHR6tpifv" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="card_top">
|
||||
<view class="name">
|
||||
{{obj.name}}-{{obj.sn}}
|
||||
{{obj.name == undefined ? '--' : obj.name}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{obj.lastOnlineTime}}
|
||||
|
@ -416,7 +416,7 @@
|
|||
methods: {
|
||||
btnvideo(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/Apiary/Apiary_vadio/Apiary_vadio?apiaryId=' + this.obj.apiaryId
|
||||
url:'/page_Beehive/Beehive_log?apiaryId=' + this.obj.apiaryId + ' &name=' + this.obj.apiaryName
|
||||
})
|
||||
},
|
||||
btngd(){
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<u-navbar is-back="false" :title="title" :border-bottom="false" :background="bgc" title-color='#000'
|
||||
title-size='36' :title-bold='true' height='45' id="navbar">
|
||||
</u-navbar>
|
||||
<view class="">
|
||||
{{title}}
|
||||
<view class="" v-html="obj.content">
|
||||
<!-- {{obj.content}} -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -17,16 +17,26 @@
|
|||
backgroundColor: " #F4FAF8",
|
||||
},
|
||||
title: "",
|
||||
type:'',
|
||||
obj:''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.title = option.tit
|
||||
this.type = option.type
|
||||
this.getabout()
|
||||
},
|
||||
onShow() {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
getabout(){
|
||||
this.$u.get(`app/licence/type/${this.type}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.obj = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -34,5 +44,8 @@
|
|||
<style lang="scss">
|
||||
page {
|
||||
background-color: #FAFDFD;
|
||||
padding: 0 38rpx;
|
||||
box-sizing: border-box;
|
||||
padding-top: 50rpx;
|
||||
}
|
||||
</style>
|
|
@ -64,9 +64,9 @@
|
|||
pagesum: 1,
|
||||
list: [],
|
||||
total: '',
|
||||
pagesize:10,
|
||||
logoflag:false,
|
||||
code:''
|
||||
pagesize: 10,
|
||||
logoflag: false,
|
||||
code: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -78,29 +78,29 @@
|
|||
this.ishave()
|
||||
},
|
||||
methods: {
|
||||
changserch(){
|
||||
changserch() {
|
||||
let data = {
|
||||
pageNum:this.pagesum,
|
||||
pageSize:this.pagesize,
|
||||
name:this.code,
|
||||
pageNum: this.pagesum,
|
||||
pageSize: this.pagesize,
|
||||
name: this.code,
|
||||
}
|
||||
this.$u.get('/farm/apiary/list', data).then(res => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.list = []
|
||||
this.total = res.total
|
||||
this.list = res.rows
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 跳转蜂场详情
|
||||
btnapiaryxq(id){
|
||||
btnapiaryxq(id) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/Apiary/Apiary_detail?id=' + id
|
||||
url: '/pages/Apiary/Apiary_detail?id=' + id
|
||||
})
|
||||
},
|
||||
loadMore() {
|
||||
if (this.list.length < this.total) {
|
||||
if (this.list.length < this.total) {
|
||||
this.ishave();
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
@ -122,25 +122,26 @@
|
|||
};
|
||||
this.$u.get('/farm/apiary/list', data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.total = res.total
|
||||
if(this.total < 1){
|
||||
this.logoflag = true
|
||||
}else{
|
||||
let uniqueIds = new Set(this.list.map(item => item.apiaryId))
|
||||
let uniqueRows = res.rows.filter(row => !uniqueIds.has(row.apiaryId))
|
||||
uniqueRows.forEach(row => uniqueIds.add(row.apiaryId))
|
||||
this.list = this.list.concat(uniqueRows)
|
||||
this.pagesum++
|
||||
this.logoflag = false
|
||||
this.total = res.total;
|
||||
if (this.total < 1) {
|
||||
this.logoflag = true;
|
||||
} else {
|
||||
if(this.pagesum > 1){
|
||||
this.list = this.list.concat(res.rows)
|
||||
}else{
|
||||
this.list = res.rows
|
||||
}
|
||||
this.pagesum++;
|
||||
this.logoflag = false;
|
||||
// console.log(this.list);
|
||||
}
|
||||
// console.log(this.logoflag);
|
||||
} else {
|
||||
this.logoflag = true
|
||||
// console.log(this.logoflag);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
placeholder-class="my-placeholder" />
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="tit">
|
||||
具体位置
|
||||
</view>
|
||||
|
@ -280,6 +282,7 @@
|
|||
this.form.province = province
|
||||
this.form.city = city
|
||||
this.form.county = district
|
||||
// console.log(this.form);
|
||||
} else {
|
||||
console.log('地址格式不匹配或无法提取省市区信息');
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<view class="tip_cont" style="margin-top: 28rpx;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u9wAWh1AIzSDGgKDKsKY" mode=""></image>
|
||||
<view class="txt">
|
||||
{{daily[0].tempMax}} ℃
|
||||
{{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}} ℃
|
||||
</view>
|
||||
</view>
|
||||
<view class="tip_cont" style="margin-top: 28rpx;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uBIctX6qJ9yMtAZYuY0R" mode=""></image>
|
||||
<view class="txt">
|
||||
{{daily[0].humidity}} %
|
||||
{{daily[0].humidity == undefined ? '--' : daily[0].humidity}} %
|
||||
</view>
|
||||
</view>
|
||||
<image @click="btnedfc" style="width: 44rpx;height: 44rpx;position: absolute;top: 240rpx;right:20rpx ;"
|
||||
|
@ -57,10 +57,10 @@
|
|||
:show-location='true' :polygons="polygons" :markers="covers"> </map>
|
||||
<view class="num">
|
||||
<view class="txt">
|
||||
在线:{{apiaryobj.onlineBeehiveCount}}
|
||||
在线:{{apiaryobj.onlineBeehiveCount == undefined ? '--' : apiaryobj.onlineBeehiveCount}}
|
||||
</view>
|
||||
<view class="txt" style="color:#FF473E ;margin-top: 10rpx;">
|
||||
离线:{{apiaryobj.offlineBeehiveCount}}
|
||||
离线:{{apiaryobj.offlineBeehiveCount == undefined ? '--' : apiaryobj.offlineBeehiveCount}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" @click="showwl = true">
|
||||
|
@ -71,7 +71,7 @@
|
|||
具体位置
|
||||
</view>
|
||||
<view class="setbox">
|
||||
<view class="setcard">
|
||||
<view class="setcard" @click="btnship">
|
||||
<view class="top">
|
||||
<view class="left">
|
||||
视频监控
|
||||
|
@ -177,7 +177,7 @@
|
|||
bgc: {
|
||||
backgroundColor: " #F4FAF8",
|
||||
},
|
||||
title: "福鼎蜂场",
|
||||
title: "蜂场详情",
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
isMap: false,
|
||||
|
@ -196,9 +196,8 @@
|
|||
covers: [],
|
||||
dzcode:'',
|
||||
polygons: [{
|
||||
//多边形的坐标数组
|
||||
points: [],
|
||||
fillColor: "#cbdde9",
|
||||
fillColor:'#cbdde954',
|
||||
strokeColor: "#78addd",
|
||||
strokeWidth: 1,
|
||||
zIndex: 1,
|
||||
|
@ -224,6 +223,12 @@
|
|||
url:'/pages/Apiary/early_Set ?apiaryId=' + this.apiaryId
|
||||
})
|
||||
},
|
||||
//跳转视频监控
|
||||
btnship(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/Apiary/Apiary_vadio/Apiary_vadio?apiaryId=' + this.apiaryId
|
||||
})
|
||||
},
|
||||
// 跳转预警记录
|
||||
btnyj(){
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -9,19 +9,21 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="no_cont" >
|
||||
<view class="no_cont">
|
||||
<view class="img">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/us7oiRxHLVwqu8plEy3o" mode=""></image>
|
||||
</view>
|
||||
<view class="txt">
|
||||
当前还没有添加视频监控哦
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" @click="addApiary">
|
||||
添加视频监控
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn" v-if="flag" @click="addApiary">
|
||||
添加视频监控
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
@ -34,42 +36,42 @@
|
|||
backgroundColor: " #F4FAF8",
|
||||
},
|
||||
title: "视频监控",
|
||||
apiaryId:'',
|
||||
list:[],
|
||||
pagesum:1,
|
||||
pagesize:10,
|
||||
flag:true,
|
||||
total:''
|
||||
apiaryId: '',
|
||||
list: [],
|
||||
pagesum: 1,
|
||||
pagesize: 10,
|
||||
flag: true,
|
||||
total: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.apiaryId = option.apiaryId
|
||||
this.apiaryId = option.apiaryId
|
||||
},
|
||||
onShow() {
|
||||
this.getlist()
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
getlist(){
|
||||
getlist() {
|
||||
let data = {
|
||||
pageNum:this.pagesum,
|
||||
pageSize:this.pagesize,
|
||||
apiaryId:this.apiaryId
|
||||
pageNum: this.pagesum,
|
||||
pageSize: this.pagesize,
|
||||
apiaryId: this.apiaryId
|
||||
}
|
||||
this.$u.get(`/farm/video/list`,data).then(res => {
|
||||
if(res.code == 200){
|
||||
this.$u.get(`/farm/video/list`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.total
|
||||
if(this.total >= 1){
|
||||
if (this.total >= 1) {
|
||||
this.list = res.rows
|
||||
this.flag = true
|
||||
}else{
|
||||
} else {
|
||||
this.flag = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
addApiary(){
|
||||
addApiary() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/Apiary/addVadio?apiaryId=' + this.apiaryId
|
||||
url: '/pages/Apiary/addVadio?apiaryId=' + this.apiaryId
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -85,23 +87,27 @@
|
|||
.page {
|
||||
// position: relative;
|
||||
width: 750rpx;
|
||||
.listvideo{
|
||||
|
||||
.listvideo {
|
||||
padding: 0 34rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 56rpx;
|
||||
.list_item{
|
||||
|
||||
.list_item {
|
||||
width: 682rpx;
|
||||
height: 388rpx;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 20rpx;
|
||||
video{
|
||||
|
||||
video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn{
|
||||
|
||||
.btn {
|
||||
margin: 86rpx auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -114,17 +120,18 @@
|
|||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.no_cont {
|
||||
margin: 152rpx auto 0;
|
||||
width: 432rpx;
|
||||
|
||||
|
||||
.img {
|
||||
image {
|
||||
width: 432rpx;
|
||||
height: 432rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.txt {
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="no_cont" @click="addApiary()" v-if="haveApiary == false">
|
||||
<view class="img" >
|
||||
<view class="img">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uUZ3MF84e3bKgwAei8Rz" mode=""></image>
|
||||
</view>
|
||||
<view class="txt">
|
||||
|
@ -95,8 +95,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="echarts">
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas3"
|
||||
canvas-id="uni-ec-canvas" :ec="ec">
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas3" canvas-id="uni-ec-canvas"
|
||||
:ec="ec">
|
||||
</uni-ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -159,7 +159,7 @@
|
|||
<view v-if="logoflag" class="" style="text-align: right;padding-right: 30rpx;color: #FFCC25;">
|
||||
<text style="border-bottom: 1px solid #FFCC25;" @click="btnlogo">暂未登录,去登录</text>
|
||||
</view>
|
||||
<tab-bar :indexs='0'></tab-bar>
|
||||
<tab-bar :indexs='0'></tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -216,10 +216,10 @@
|
|||
|
||||
onShow() {
|
||||
this.getuserinfo()
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
|
||||
|
||||
}, 1500);
|
||||
const now = new Date();
|
||||
const previousDay = new Date(now)
|
||||
|
@ -238,9 +238,9 @@
|
|||
|
||||
methods: {
|
||||
// 点击跳转登录页
|
||||
btnlogo(){
|
||||
btnlogo() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/login/login'
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
// 未登录调静默获取token
|
||||
|
@ -261,8 +261,8 @@
|
|||
taht.getchartData3()
|
||||
taht.getchartData4()
|
||||
taht.gettj()
|
||||
taht.getyj()
|
||||
}else if(res.code == 10003){
|
||||
taht.getyj()
|
||||
} else if (res.code == 10003) {
|
||||
taht.logoflag = true
|
||||
}
|
||||
// console.log(res,10003);
|
||||
|
@ -271,32 +271,35 @@
|
|||
},
|
||||
})
|
||||
},
|
||||
getuserinfo(){
|
||||
getuserinfo() {
|
||||
this.$u.get(`/app/user/userInfo`).then(res => {
|
||||
if (res.code == 200) {
|
||||
if(res.data.type==1){
|
||||
this.ishave()
|
||||
if (res.data.type == 1) {
|
||||
this.logoflag = false
|
||||
this.ishave()
|
||||
this.getchartData3()
|
||||
this.getchartData4()
|
||||
this.gettj()
|
||||
this.getyj()
|
||||
}else{
|
||||
|
||||
|
||||
this.getyj()
|
||||
} else {
|
||||
|
||||
|
||||
// uni.navigateTo({
|
||||
// url:
|
||||
// })
|
||||
}
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
let code= uni.getStorageSync('code');
|
||||
console.log(code,'codecodecode');
|
||||
if(code==200){
|
||||
}else if(res.code == 401){
|
||||
this.jmlogin()
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
let code = uni.getStorageSync('code');
|
||||
console.log(code, 'codecodecode');
|
||||
if (code == 200) {
|
||||
this.getuserinfo()
|
||||
}else{
|
||||
this.logoflag = true
|
||||
} else {
|
||||
|
||||
}
|
||||
},500)
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -552,11 +555,10 @@
|
|||
//重量
|
||||
initChart3(canvas, width, height, canvasDpr) {
|
||||
let that = this
|
||||
|
||||
const option = {
|
||||
grid: {
|
||||
left: '2%',
|
||||
right: '10%',
|
||||
left: '4%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
top: '4%',
|
||||
containLabel: true
|
||||
|
@ -584,7 +586,6 @@
|
|||
show: false,
|
||||
},
|
||||
// data: that.chartday,
|
||||
// data: that.numdata.map(item => item.date)
|
||||
},
|
||||
yAxis: {
|
||||
show: true,
|
||||
|
@ -653,12 +654,12 @@
|
|||
height: height,
|
||||
devicePixelRatio: canvasDpr
|
||||
})
|
||||
|
||||
option.series[0].data = that.chartData3
|
||||
canvas.setChart(chart)
|
||||
chart.setOption(option)
|
||||
return chart
|
||||
},
|
||||
|
||||
// 获取设备详情
|
||||
|
||||
}
|
||||
|
|
902
pages/map.vue
902
pages/map.vue
File diff suppressed because it is too large
Load Diff
|
@ -58,15 +58,15 @@
|
|||
btnpage(num){
|
||||
if(num == 1){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/about?tit=' + '隐私政策'
|
||||
url:'/page_user/about?tit=' + '隐私政策' + '&type=' + 1
|
||||
})
|
||||
}else if(num == 2){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/about?tit=' + '用户协议'
|
||||
url:'/page_user/about?tit=' + '用户协议' + '&type=' + 2
|
||||
})
|
||||
}else if(num == 3){
|
||||
uni.navigateTo({
|
||||
url:'/page_user/about?tit=' + '关于我们'
|
||||
url:'/page_user/about?tit=' + '关于我们' + '&type=' + 3
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user