修改7305人员信息取模组件,文本自动居中
This commit is contained in:
@ -52,9 +52,9 @@
|
||||
{{ deviceInfo.onlineStatus === 0 ? '离线' : deviceInfo.onlineStatus === 2 ? '故障' : '在线' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="info-row" v-if="itemInfo.deviceMac">
|
||||
<view class="info-row" v-if="itemInfo.deviceMac" @click="bleStatuToggle">
|
||||
<text class="info-label">蓝牙状态</text>
|
||||
<text class="info-value status-running">
|
||||
<text class="info-value status-running" >
|
||||
{{getbleStatu}}
|
||||
</text>
|
||||
</view>
|
||||
@ -404,7 +404,8 @@
|
||||
},
|
||||
Status: {
|
||||
pageHide: null
|
||||
}
|
||||
},
|
||||
inteval: 120
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -432,20 +433,48 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bleStatuToggle() {
|
||||
let f = this.getDevice();
|
||||
if (!f) {
|
||||
this.showBleUnConnect();
|
||||
return;
|
||||
}
|
||||
if (this.formData.bleStatu === true) {
|
||||
this.formData.bleStatu = 'dicconnect';
|
||||
ble.disconnectDevice(f.deviceId).finally(r => {
|
||||
this.formData.bleStatu = false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.formData.bleStatu === false || this.formData.bleStatu === 'err') {
|
||||
these.formData.bleStatu = 'connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getDevice: function() {
|
||||
if (ble) {
|
||||
console.log("LinkedList=", ble.data.LinkedList);
|
||||
console.log("this.device=", this.itemInfo);
|
||||
let f = ble.data.LinkedList.find((v) => {
|
||||
if (v.macAddress == this.itemInfo.deviceMac) {
|
||||
if (!this.formData.deviceId) {
|
||||
this.formData.deviceId = v.deviceId
|
||||
};
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
console.log("LinkedList=", ble.data.LinkedList);
|
||||
console.log("this.device=", this.device);
|
||||
let f = ble.data.LinkedList.find((v) => {
|
||||
if (v.macAddress == this.itemInfo.deviceMac) {
|
||||
if (!this.formData.deviceId) {
|
||||
this.formData.deviceId = v.deviceId
|
||||
};
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return f;
|
||||
return f;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
initBle() {
|
||||
if (this.itemInfo.deviceMac) {
|
||||
@ -1259,9 +1288,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(()=> {
|
||||
sendImagePackets().catch(() => {
|
||||
|
||||
}).finally(()=>{
|
||||
this.lightModeB=false;
|
||||
});
|
||||
}, 0)
|
||||
}
|
||||
@ -1938,12 +1969,13 @@
|
||||
|
||||
},
|
||||
onShow() {
|
||||
debugger;
|
||||
let f = this.getDevice();
|
||||
if (f) {
|
||||
these.formData.bleStatu = 'connecting';
|
||||
this.formData.bleStatu = 'connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
this.formData.bleStatu = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user