670加入机器状态、设备详情加接口请求

This commit is contained in:
liub
2025-09-18 17:31:40 +08:00
parent 404e42a7d8
commit cb44810c6b
10 changed files with 454 additions and 221 deletions

View File

@ -255,10 +255,10 @@
cMode: false,
modeCurr: 'low',
company: '黄石消防支队',
name: '菜英俊',
job: '小队长',
id: 'HSXF01061',
company: '',
name: '',
job: '',
id: '',
iswarn: false
},
rgb565Data: [],
@ -314,6 +314,7 @@
these.showBleUnConnect();
these.getDetail();
return;
}
let form = f.formData;
@ -331,7 +332,7 @@
these.formData.deviceId = f.deviceId;
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId);
these.setBleFormData();
these.getDetail();
});
@ -457,6 +458,23 @@
return f;
},
getDetail() {
var that = this;
usrApi.getDetail(this.device.id).then(res => {
if (res && res.code == 200) {
res = res.data;
let personnelInfo = res.personnelInfo;
if (personnelInfo) {
that.formData.company = personnelInfo.unitName;
that.formData.name = personnelInfo.name;
that.formData.job = personnelInfo.position;
that.formData.id = personnelInfo.code
}
}
});
},
setBleFormData() {
ble.data.LinkedList.find((v) => {
if (v.deviceId == these.formData.deviceId) {
@ -959,8 +977,8 @@
}
uni.uploadFile({
// url: 'http://114.55.111.217/video/upload',
url: baseURL+"app/video/upload",
url: 'http://114.55.111.217/video/upload',
// url: baseURL+"app/video/upload",
filePath: videoPath,
name: 'file',
header: {