|
|
@@ -26,20 +26,23 @@
|
|
|
<u-line color="#E5EBE9" />
|
|
|
</view>
|
|
|
|
|
|
- <view class="uni-list-cell" @click="modeShow = true">
|
|
|
+ <view class="uni-list-cell" v-if="device_type==32" @click="modeShow = true">
|
|
|
<span class="tit">定时模式</span>
|
|
|
<view class="right-data" style="float: right;">
|
|
|
<span>{{tsArrLabel}}</span>
|
|
|
<u-icon class="arrow" name="arrow-right"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view >
|
|
|
- <u-select v-model="modeShow" :list="tsArr" @confirm="tsArrConfirm"></u-select>
|
|
|
- <u-select v-model="shikongshow" mode="mutil-column" :list="shikonglist" @confirm="shikongconfirm"></u-select>
|
|
|
+ <view class="uni-list-cell" v-if="device_type==33||device_type==34" @click="syModeShow = true">
|
|
|
+ <span class="tit">控制模式</span>
|
|
|
+ <view class="right-data" style="float: right;">
|
|
|
+ <span>{{tsArrLabel}}</span>
|
|
|
+ <u-icon class="arrow" name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="uni-list-cell" @click="shikongshow = true">
|
|
|
+ <view class="uni-list-cell" @click="shikongshow = true" v-if="equipContrlForm.CONTROL==0">
|
|
|
<span class="tit">
|
|
|
- 开始结束时间
|
|
|
+ 时控时长
|
|
|
</span>
|
|
|
<view class="right-data" style="float: right;">
|
|
|
<span>{{shikongLabel}}</span>
|
|
|
@@ -47,9 +50,38 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
-
|
|
|
- <u-select v-model="dataSelectShow" :list="singleSelectList" @confirm="dataconfirm"></u-select>
|
|
|
- <view class="uni-list-cell" @click="selectOperate('dataList','DATT')">
|
|
|
+ <view class="uni-list-cell" @click="gkongShow = true" v-if="equipContrlForm.CONTROL==1">
|
|
|
+ <span class="tit">
|
|
|
+ 光控时长
|
|
|
+ </span>
|
|
|
+ <view class="right-data" style="float: right;">
|
|
|
+ <span>{{gkongLabel}}</span>
|
|
|
+ <u-icon class="arrow" name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="uni-list-cell" @click="photoShow = true" v-if="device_type==33||device_type==34">
|
|
|
+ <span class="tit">
|
|
|
+ 拍照时间
|
|
|
+ </span>
|
|
|
+ <view class="right-data" style="float: right;">
|
|
|
+ <span>{{photoLabel}}</span>
|
|
|
+ <u-icon class="arrow" name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="uni-list-cell" v-if="device_type==33||device_type==34" @click="selectOperate(5,1440,'P_DATT')">
|
|
|
+ <span class="tit">
|
|
|
+ 拍照频率(min)
|
|
|
+ </span>
|
|
|
+ <view class="right-data" style="float: right;">
|
|
|
+ <span>{{equipContrlForm.P_DATT}}</span>
|
|
|
+ <u-icon class="arrow" name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="uni-list-cell" @click="selectOperate(5,device_type==32?60:1440,'DATT')">
|
|
|
<span class="tit">
|
|
|
数据上传频率(min)
|
|
|
</span>
|
|
|
@@ -59,7 +91,7 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <view class="uni-list-cell" @click="selectOperate('photoList','PHO_T')">
|
|
|
+ <view v-if="device_type==32" class="uni-list-cell" @click="selectOperate(5,180,'PHO_T')">
|
|
|
<span class="tit">
|
|
|
照片上传频率(min)
|
|
|
</span>
|
|
|
@@ -69,6 +101,14 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
+ <view >
|
|
|
+ <u-select v-model="modeShow" :list="tsArr" @confirm="tsArrConfirm"></u-select>
|
|
|
+ <u-select v-model="syModeShow" :list="syArr" @confirm="tsArrConfirm"></u-select>
|
|
|
+ <u-select v-model="shikongshow" mode="mutil-column" :list="shikonglist" @confirm="shikongconfirm"></u-select>
|
|
|
+ <u-select v-model="photoShow" mode="mutil-column" :list="shikonglist" @confirm="photoConfirm"></u-select>
|
|
|
+ <u-select v-model="gkongShow" :list="gkongArr" @confirm="gkArrConfirm"></u-select>
|
|
|
+ <u-select v-model="dataSelectShow" :list="singleSelectList" @confirm="dataconfirm"></u-select>
|
|
|
+ </view>
|
|
|
<view class="submit-box">
|
|
|
<u-button :custom-style="customStyle" @click="submit" :disabled="submitBtnDisabled" >确定</u-button>
|
|
|
</view>
|
|
|
@@ -114,18 +154,28 @@
|
|
|
dsIndex: 0,
|
|
|
wsArr: ['待机', '工作'],
|
|
|
wsIndex: 0,
|
|
|
- tsArr: [ { value: '1', label: '时控触发' },
|
|
|
- { value: '0', label: '时控模式' }],
|
|
|
+ tsArr: [
|
|
|
+ { value: 1, label: '时控触发' },
|
|
|
+ { value: 0, label: '时控模式' },
|
|
|
+ ],
|
|
|
+ syArr:[
|
|
|
+ { value: 1, label: '光控模式' },
|
|
|
+ { value: 0, label: '时控模式' }
|
|
|
+ ],
|
|
|
tsIndex: 0,
|
|
|
imgresArr: ['高', '中', '低'],
|
|
|
imgresIndex: "",
|
|
|
wsModelShow: false,
|
|
|
equipContrlForm: {
|
|
|
END_TIME: '',
|
|
|
- CONTROL: '0',
|
|
|
+ CONTROL: 0,
|
|
|
DATT: 5,
|
|
|
START_TIME: '',
|
|
|
- PHO_T: 5
|
|
|
+ PHO_T: 5,
|
|
|
+ P_DATT:1,
|
|
|
+ TT: '',
|
|
|
+ P_START:'',
|
|
|
+ P_END:''
|
|
|
},
|
|
|
|
|
|
shikongLabel:'00:00-00:00',
|
|
|
@@ -225,6 +275,8 @@
|
|
|
],
|
|
|
mqttShow: false,
|
|
|
shikongshow:false,
|
|
|
+ gkongLabel:'0h',
|
|
|
+ gkongShow:false,
|
|
|
mqttConfig: {
|
|
|
muid: '',
|
|
|
mpwd: '',
|
|
|
@@ -242,12 +294,28 @@
|
|
|
dataSelectShow:false,
|
|
|
currentFormKey:'',
|
|
|
tsArrLabel:'时控模式',
|
|
|
+
|
|
|
modeShow:false,
|
|
|
- submitBtnDisabled:false
|
|
|
+ syModeShow:false,
|
|
|
+ submitBtnDisabled:false,
|
|
|
+ photoShow:false,
|
|
|
+ photoLabel:'00:00-00:00'
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|
|
|
computed:{
|
|
|
+ gkongArr(){
|
|
|
+ const list = []
|
|
|
+ const count = 24
|
|
|
+ for (let i = 0; i < count; i++) {
|
|
|
+ list.push({
|
|
|
+ value: i + 1 + '',
|
|
|
+ label: i + 1 + 'h'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return list
|
|
|
+ },
|
|
|
customStyle(){
|
|
|
return {
|
|
|
background: '#14A478',
|
|
|
@@ -334,17 +402,11 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- selectOperate(selectList,formKey){
|
|
|
+ selectOperate(min,max,formKey){
|
|
|
this.dataSelectShow = true
|
|
|
- let length = 0
|
|
|
- if(selectList=='photoList'){
|
|
|
- length = 60
|
|
|
- }
|
|
|
- if(selectList=='dataList'){
|
|
|
- length = 180
|
|
|
- }
|
|
|
+
|
|
|
this.singleSelectList = []
|
|
|
- for (let i = 5; i < length; i++) {
|
|
|
+ for (let i = min; i < max; i+=5) {
|
|
|
this.singleSelectList.push({
|
|
|
value:i,
|
|
|
label:i.toString()
|
|
|
@@ -357,6 +419,10 @@
|
|
|
this.tsArrLabel = e[0].label
|
|
|
this.equipContrlForm.CONTROL = e[0].value
|
|
|
},
|
|
|
+ gkArrConfirm(e){
|
|
|
+ this.gkongLabel = e[0].label
|
|
|
+ this.equipContrlForm.TT = e[0].value
|
|
|
+ },
|
|
|
dataconfirm(e){
|
|
|
this.equipContrlForm[this.currentFormKey] = e[0].value
|
|
|
},
|
|
|
@@ -366,7 +432,12 @@
|
|
|
this.equipContrlForm.START_TIME = e[0].value
|
|
|
this.equipContrlForm.END_TIME = e[1].value
|
|
|
},
|
|
|
-
|
|
|
+ photoConfirm(e){
|
|
|
+
|
|
|
+ this.photoLabel = e[0].label+'-'+e[1].label
|
|
|
+ this.equipContrlForm.P_START = e[0].value
|
|
|
+ this.equipContrlForm.P_END = e[1].value
|
|
|
+ },
|
|
|
turnChange(e, a) {
|
|
|
this.equipContrlForm.ts = e.target.value
|
|
|
|
|
|
@@ -376,7 +447,7 @@
|
|
|
url: '/api/api_gateway?method=new_gateway.device_info.get_device_config',
|
|
|
data: {
|
|
|
device_type_id:this.device_type,
|
|
|
- d_id: this.d_id
|
|
|
+ id: this.d_id
|
|
|
}
|
|
|
})
|
|
|
if(res.code==4000){
|
|
|
@@ -387,7 +458,9 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ this.equipContrlForm = res
|
|
|
+ this.photoLabel = (res.P_START||'00:00')+' - '+ (res.P_END||'00:00')
|
|
|
+ this.shikongLabel = res.START_TIME + ':00' + ' - '+res.END_TIME + ':00'
|
|
|
console.log(this.equipContrlForm)
|
|
|
},
|
|
|
async submit() {
|
|
|
@@ -401,6 +474,12 @@
|
|
|
|
|
|
}
|
|
|
})
|
|
|
+ if(res){
|
|
|
+ this.$refs.toast.show({
|
|
|
+ title: '修改成功!',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ }
|
|
|
if(res.code==4000){
|
|
|
this.$refs.toast.show({
|
|
|
title: res.msg+'无法修改',
|