|
|
@@ -6,6 +6,15 @@
|
|
|
<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="查看图片"></uni-nav-bar>
|
|
|
</view>
|
|
|
<p class="tishi" v-if="tishi">暂无图片</p>
|
|
|
+ <u-select v-model="modelPicker" mode="single-column" @confirm="confirmModel"
|
|
|
+ :default-value="[identify_model]" :list="modelList"></u-select>
|
|
|
+ <view class="schedule" @click="modelPicker=!modelPicker">
|
|
|
+ <p class="schedule_value">{{modelList[identify_model].label}}</p>
|
|
|
+ <!-- {{titletext[indexone]}} -->
|
|
|
+ <p class="schedule_icon">
|
|
|
+ <u-icon name="arrow-down"></u-icon>
|
|
|
+ </p>
|
|
|
+ </view>
|
|
|
<view class="timeshow">
|
|
|
<view class="selecttimes" @click="tiemshow=!tiemshow">
|
|
|
<view class="timesbox">
|
|
|
@@ -26,7 +35,8 @@
|
|
|
<view class="imglist">
|
|
|
<view class="imglist_box" v-for="(item,index) in imglists" :key="index">
|
|
|
<view class="imglist_left">
|
|
|
- <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/jiazai.ui.gif'" mode=""></image>
|
|
|
+ <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/cb/jiazai.ui.gif'" mode="">
|
|
|
+ </image>
|
|
|
<image :src="item.addr" mode="" @click="examine(index)"></image>
|
|
|
</view>
|
|
|
<view class="imglist_right">
|
|
|
@@ -51,7 +61,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="top" v-if="isTop" @click="top">
|
|
|
- <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'" mode=""></image>
|
|
|
+ <image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'"
|
|
|
+ mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -60,6 +71,15 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ modelPicker: false,
|
|
|
+ identify_model: 1,
|
|
|
+ modelList: [{
|
|
|
+ value: 'A',
|
|
|
+ label: '模型A'
|
|
|
+ }, {
|
|
|
+ value: 'B',
|
|
|
+ label: '模型B'
|
|
|
+ }],
|
|
|
page: 1,
|
|
|
imglists: [],
|
|
|
tishi: true,
|
|
|
@@ -75,28 +95,41 @@
|
|
|
minute: true,
|
|
|
second: false
|
|
|
},
|
|
|
- flag:1,
|
|
|
- self:true,
|
|
|
- isTop:false,
|
|
|
- resultdata:{},
|
|
|
- titleidnex:0,
|
|
|
- tiemshow:false,
|
|
|
- disable:"",
|
|
|
- device_type:"",
|
|
|
- myuid:""
|
|
|
+ flag: 1,
|
|
|
+ self: true,
|
|
|
+ isTop: false,
|
|
|
+ resultdata: {},
|
|
|
+ titleidnex: 0,
|
|
|
+ tiemshow: false,
|
|
|
+ disable: "",
|
|
|
+ device_type: "",
|
|
|
+ myuid: ""
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 切换模型
|
|
|
+ confirmModel(e) {
|
|
|
+ this.modelList.forEach((item, index) => {
|
|
|
+ if (e[0].value == item.value) {
|
|
|
+ this.identify_model = index;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.imglists=[];
|
|
|
+ this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
|
|
|
+ // console.log(e)
|
|
|
+ },
|
|
|
//forecast.forecast_system.equip_photofo
|
|
|
- async imglistdata(time_begin,time_end) { //获取图片列表
|
|
|
+ async imglistdata(time_begin, time_end) { //获取图片列表
|
|
|
const res = await this.$myRequest({
|
|
|
- url: '/api/api_gateway?method=forecast.forecast_system.equip_photo',
|
|
|
+ url: '/api/api_gateway?method=forecast.forecast_system.device_photo_list',
|
|
|
data: {
|
|
|
device_id: this.device_id,
|
|
|
page: this.page,
|
|
|
- ret: "list",
|
|
|
- time_begin:time_begin,//开始时间
|
|
|
- time_end:time_end,//结束时间
|
|
|
+ status: "no",
|
|
|
+ page_number: 12,
|
|
|
+ identify_model: this.modelList[this.identify_model].value,
|
|
|
+ time_begin: time_begin, //开始时间
|
|
|
+ time_end: time_end, //结束时间
|
|
|
}
|
|
|
})
|
|
|
this.imglists = this.imglists.concat(res.data)
|
|
|
@@ -124,12 +157,12 @@
|
|
|
});
|
|
|
this.page = 1
|
|
|
this.imglists = []
|
|
|
- this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
|
|
|
- }else{
|
|
|
+ this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: '指令下发失败!',
|
|
|
duration: 2000,
|
|
|
- icon:"none"
|
|
|
+ icon: "none"
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -150,17 +183,17 @@
|
|
|
duration: 2000
|
|
|
});
|
|
|
var that = this
|
|
|
- setTimeout(()=>{
|
|
|
- that.imglistdata(parseInt(that.timestate),parseInt(that.timeend))
|
|
|
- },1000)
|
|
|
- }else{
|
|
|
+ setTimeout(() => {
|
|
|
+ that.imglistdata(parseInt(that.timestate), parseInt(that.timeend))
|
|
|
+ }, 1000)
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: '指令下发失败!',
|
|
|
duration: 2000,
|
|
|
- icon:"none"
|
|
|
+ icon: "none"
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
clickLeft() {
|
|
|
uni.navigateBack({
|
|
|
@@ -171,7 +204,7 @@
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '是否删除此图片?',
|
|
|
- success: (res)=> {
|
|
|
+ success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
this.del(id)
|
|
|
console.log('用户点击确定');
|
|
|
@@ -181,31 +214,32 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- shibie(id,addr) { //识别
|
|
|
+ shibie(id, addr) { //识别
|
|
|
// this.discern(id)
|
|
|
uni.navigateTo({
|
|
|
- url: "./results?id="+id+"&addr="+addr
|
|
|
+ url: "./results?id=" + id + "&addr=" + addr
|
|
|
})
|
|
|
},
|
|
|
tongji(item) { //统计
|
|
|
uni.navigateTo({
|
|
|
- url:"./manualinput?id="+item.id + "&device_id=" + item.device_id+"&addtime="+item.addtime
|
|
|
+ url: "./manualinput?id=" + item.id + "&device_id=" + item.device_id + "&addtime=" + item
|
|
|
+ .addtime
|
|
|
})
|
|
|
},
|
|
|
add(item) {
|
|
|
uni.navigateTo({
|
|
|
- url: "./addimg?id=" + item.id + "&device_id=" + item.device_id+"&addtime="+item.addtime
|
|
|
+ url: "./addimg?id=" + item.id + "&device_id=" + item.device_id + "&addtime=" + item.addtime
|
|
|
})
|
|
|
},
|
|
|
examine(index) {
|
|
|
var imgarr = []
|
|
|
- for(var i=0;i<this.imglists.length;i++){
|
|
|
+ for (var i = 0; i < this.imglists.length; i++) {
|
|
|
imgarr.push(this.imglists[i].addr)
|
|
|
}
|
|
|
console.log(imgarr)
|
|
|
uni.previewImage({
|
|
|
urls: imgarr,
|
|
|
- current:index
|
|
|
+ current: index
|
|
|
});
|
|
|
},
|
|
|
clickRight() { //下发拍照指令
|
|
|
@@ -217,13 +251,13 @@
|
|
|
duration: 500
|
|
|
})
|
|
|
},
|
|
|
- tiemchange(e){
|
|
|
- this.imglists=[]
|
|
|
- this.page =1
|
|
|
+ tiemchange(e) {
|
|
|
+ this.imglists = []
|
|
|
+ this.page = 1
|
|
|
console.log(e)
|
|
|
this.timestate = +new Date(e.startDate) / 1000 - 8 * 60 * 60
|
|
|
this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60
|
|
|
- this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
|
|
|
+ this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
|
|
|
},
|
|
|
timetab(e) {
|
|
|
e = new Date(e * 1000)
|
|
|
@@ -236,8 +270,8 @@
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
uni.getStorage({
|
|
|
- key:"myuid",
|
|
|
- success:(res)=> {
|
|
|
+ key: "myuid",
|
|
|
+ success: (res) => {
|
|
|
this.myuid = res.data
|
|
|
console.log(this.myuid)
|
|
|
}
|
|
|
@@ -248,16 +282,16 @@
|
|
|
this.disable = option.disable
|
|
|
this.timeend = +new Date() / 1000
|
|
|
this.timestate = this.timeend - 60 * 60 * 24
|
|
|
- this.imglists=[]
|
|
|
+ this.imglists = []
|
|
|
this.device_type = option.device_type
|
|
|
- this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
|
|
|
+ this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
|
|
|
},
|
|
|
- onShow(){
|
|
|
-
|
|
|
+ onShow() {
|
|
|
+
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
this.page++
|
|
|
- this.imglistdata(parseInt(this.timestate),parseInt(this.timeend))
|
|
|
+ this.imglistdata(parseInt(this.timestate), parseInt(this.timeend))
|
|
|
},
|
|
|
onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
|
|
|
if (e.scrollTop > 200) { //距离大于200时显示
|
|
|
@@ -278,17 +312,50 @@
|
|
|
text-align: center;
|
|
|
font-size: 40rpx;
|
|
|
}
|
|
|
-
|
|
|
+ .schedule {
|
|
|
+ position: fixed;
|
|
|
+ top: 84px;
|
|
|
+ left: 10rpx;
|
|
|
+ padding: 5rpx 0;
|
|
|
+ // left: 50%;
|
|
|
+ // transform: translateX(-50%);
|
|
|
+ z-index: 100;
|
|
|
+ display: flex;
|
|
|
+ width: 180rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+ height: 50rpx;
|
|
|
+ // border: 2rpx solid #F0F0F0;
|
|
|
+ background-color: #Fff;
|
|
|
+ // border-radius: 25px;
|
|
|
+ box-shadow: 0 0 10rpx #bcb9ca;
|
|
|
+
|
|
|
+ .schedule_value {
|
|
|
+ width: 70%;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .schedule_icon {
|
|
|
+ width: 30%;
|
|
|
+ // background-color: #F2F2F2;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50rpx;
|
|
|
+
|
|
|
+ /deep/.u-icon__icon {
|
|
|
+ color: rgba(0, 0, 0, 0.3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.timeshow {
|
|
|
- width: 100%;
|
|
|
+ width: 70%;
|
|
|
height: 80rpx;
|
|
|
background-color: #FFFFFF;
|
|
|
position: fixed;
|
|
|
top: 84px;
|
|
|
- left: 0;
|
|
|
+ right: 10rpx;
|
|
|
display: flex;
|
|
|
z-index: 100;
|
|
|
- padding-top: 10px;
|
|
|
.selecttimes {
|
|
|
width: 85%;
|
|
|
z-index: 100;
|
|
|
@@ -299,7 +366,7 @@
|
|
|
margin: 0 auto;
|
|
|
justify-content: space-around;
|
|
|
box-shadow: 0 0 10rpx #bcb9ca;
|
|
|
- padding: 10rpx 20rpx;
|
|
|
+ padding: 13rpx 20rpx;
|
|
|
box-sizing: border-box;
|
|
|
image {
|
|
|
width: 30rpx;
|
|
|
@@ -325,8 +392,8 @@
|
|
|
}
|
|
|
.paizhao{
|
|
|
position: absolute;
|
|
|
- top: 28rpx;
|
|
|
- right: 40rpx;
|
|
|
+ top: 10rpx;
|
|
|
+ right: 10rpx;
|
|
|
}
|
|
|
.shuju_one_title {
|
|
|
width: 70%;
|