670增加去连接蓝牙,其它体验问题小调整
This commit is contained in:
@ -146,7 +146,7 @@
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" />
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" />
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@ -173,7 +173,10 @@
|
||||
hideLoading,
|
||||
updateLoading
|
||||
} from '@/utils/loading.js'
|
||||
import {request,baseURL} from '../../utils/request';
|
||||
import {
|
||||
request,
|
||||
baseURL
|
||||
} from '../../utils/request';
|
||||
|
||||
import usrApi from '@/api/670/HBY670.js'
|
||||
const pagePath = "pages/650/HBY650";
|
||||
@ -201,7 +204,7 @@
|
||||
promptTitle: '设备名称',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback:null
|
||||
okCallback: null
|
||||
},
|
||||
BottomMenu: {
|
||||
show: false,
|
||||
@ -302,7 +305,7 @@
|
||||
|
||||
console.log("收到父页面的参数:" + JSON.stringify(data));
|
||||
var device = data.data;
|
||||
these.device=device;
|
||||
these.device = device;
|
||||
let f = ble.data.LinkedList.find((v) => {
|
||||
if (v.macAddress == device.deviceMac) {
|
||||
console.log("找到设备了", v);
|
||||
@ -462,9 +465,9 @@
|
||||
getDetail() {
|
||||
var that = this;
|
||||
usrApi.getDetail(this.device.id).then(res => {
|
||||
|
||||
|
||||
if (res && res.code == 200) {
|
||||
res = res.data;
|
||||
res = res.data;
|
||||
let personnelInfo = res.personnelInfo;
|
||||
if (personnelInfo) {
|
||||
that.formData.company = personnelInfo.unitName;
|
||||
@ -475,7 +478,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
setBleFormData() {
|
||||
ble.data.LinkedList.find((v) => {
|
||||
if (v.deviceId == these.formData.deviceId) {
|
||||
@ -579,34 +582,36 @@
|
||||
|
||||
|
||||
},
|
||||
showBleUnConnect(){
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText:'去连接',
|
||||
okCallback:function(){
|
||||
console.log("1111");
|
||||
uni.navigateTo({
|
||||
url:"/pages/common/addBLE/addEquip",
|
||||
events: {
|
||||
BindOver: function(data) {
|
||||
console.log(data)
|
||||
}
|
||||
},
|
||||
success: function(res) {
|
||||
// 通过eventChannel向被打开页面传送数据
|
||||
res.eventChannel.emit('detailData', { data: these.device })
|
||||
},
|
||||
fail(ex){
|
||||
console.log("跳转失败",ex);
|
||||
}
|
||||
})
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
okCallback: function() {
|
||||
console.log("1111");
|
||||
uni.navigateTo({
|
||||
url: "/pages/common/addBLE/addEquip",
|
||||
events: {
|
||||
BindOver: function(data) {
|
||||
console.log(data)
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
success: function(res) {
|
||||
// 通过eventChannel向被打开页面传送数据
|
||||
res.eventChannel.emit('detailData', {
|
||||
data: these.device
|
||||
})
|
||||
},
|
||||
fail(ex) {
|
||||
console.log("跳转失败", ex);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
LampToggle: function() {
|
||||
|
||||
this.formData.cMode = !this.formData.cMode;
|
||||
@ -1141,6 +1146,13 @@
|
||||
this.Status.BottomMenu.activeIndex = index;
|
||||
|
||||
},
|
||||
closePop: function() {
|
||||
this.Status.Pop.showPop = false;
|
||||
|
||||
if (this.Status.Pop.cancelCallback) {
|
||||
this.Status.Pop.cancelCallback();
|
||||
}
|
||||
},
|
||||
HidePop: function() {
|
||||
if (this.Status.Pop.clickEvt == 'SendUsr') {
|
||||
|
||||
@ -1148,7 +1160,7 @@
|
||||
console.log("1111");
|
||||
|
||||
this.Status.Pop.showPop = false;
|
||||
if(this.Status.Pop.okCallback){
|
||||
if (this.Status.Pop.okCallback) {
|
||||
this.Status.Pop.okCallback();
|
||||
}
|
||||
},
|
||||
@ -1232,10 +1244,10 @@
|
||||
visibleClose: true
|
||||
});
|
||||
these.setBleFormData();
|
||||
|
||||
|
||||
|
||||
|
||||
let json = {
|
||||
deviceId: these.device.id,
|
||||
deviceId: these.device.id,
|
||||
name: these.formData.company,
|
||||
position: these.formData.name,
|
||||
unitName: these.formData.job,
|
||||
|
||||
Reference in New Issue
Block a user