1
0
forked from dyf/APP

6155限制人员信息,文字不能超过7个字

This commit is contained in:
fengerli
2025-11-21 11:10:47 +08:00
parent a28d4921a0
commit eea68b5276

View File

@ -77,7 +77,7 @@
<text class="smallTxt">泛光模式</text> <text class="smallTxt">泛光模式</text>
</view> </view>
</view> </view>
<view class="mode fleft" v-on:click.stop="UploadOpenImg()"> <!-- <view class="mode fleft" v-on:click.stop="UploadOpenImg()">
<view class="leftImg"> <view class="leftImg">
<image class="img" src="/static/images/6155/DeviceDetail/open.png" mode="aspectFit"></image> <image class="img" src="/static/images/6155/DeviceDetail/open.png" mode="aspectFit"></image>
</view> </view>
@ -85,8 +85,8 @@
<text class="bigTxt">开机画面</text> <text class="bigTxt">开机画面</text>
<text class="smallTxt">上传</text> <text class="smallTxt">上传</text>
</view> </view>
</view> </view> -->
<view class="mode fleft marginLeft" v-on:click.stop="UploadOpenVideo()"> <view class="mode fleft" v-on:click.stop="UploadOpenVideo()">
<view class="leftImg"> <view class="leftImg">
<image class="img" src="/static/images/common/video.png" mode="aspectFit"></image> <image class="img" src="/static/images/common/video.png" mode="aspectFit"></image>
</view> </view>
@ -929,7 +929,9 @@
if (res.statusCode === 200) { if (res.statusCode === 200) {
if (res.data.code == 200) { if (res.data.code == 200) {
console.log("上传完成,耗时:" + m + "分" + s + "秒"); console.log("上传完成,耗时:" + m + "分" + s + "秒");
updateLoading(these,{text:"上传完成,耗时:" + m + "分" + s + "秒,正在切片。"}) updateLoading(these, {
text: "上传完成,耗时:" + m + "分" + s + "秒,正在切片。"
})
resolve(res.data); resolve(res.data);
return; return;
@ -1042,7 +1044,8 @@
let packetSize = packetData.length; let packetSize = packetData.length;
const isFirstChild = childPacketIndex === 0; const isFirstChild = childPacketIndex === 0;
const isLastChild = childPacketIndex === (childPacketsGroup.length - 1); const isLastChild = childPacketIndex === (childPacketsGroup
.length - 1);
if (isFirstChild) { if (isFirstChild) {
packetSize = packetData.length + 8; packetSize = packetData.length + 8;
@ -1078,7 +1081,8 @@
} }
let inteval = parseInt(this.inteval ? this.inteval : 80); let inteval = parseInt(this.inteval ? this.inteval : 80);
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId).then(() => { ble.sendData(f.deviceId, buffer, f.writeServiceId, f
.wirteCharactId).then(() => {
if (ReSendNo) { if (ReSendNo) {
resolve(); resolve();
return; return;
@ -1086,8 +1090,9 @@
// 更新进度 // 更新进度
this.currentPacket = currentPacket; this.currentPacket = currentPacket;
updateLoading(these,{ updateLoading(these, {
text:'正在发送:'+currentPacket+"/"+totalPackets text: '正在发送:' + currentPacket + "/" +
totalPackets
}); });
childPacketIndex++; childPacketIndex++;
@ -1112,7 +1117,9 @@
} }
console.error(err.errMsg + ",发送失败了" + currentPacket); console.error(err.errMsg + ",发送失败了" + currentPacket);
updateLoading(these,{text:"发送失败,"+err.errMsg}); updateLoading(these, {
text: "发送失败," + err.errMsg
});
reject(err); reject(err);
}); });
}; };
@ -1125,7 +1132,7 @@
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['album'], sourceType: ['album'],
success: function(res) { success: function(res) {
console.log("res=",res); console.log("res=", res);
let path = res.tempFilePath; let path = res.tempFilePath;
let width = res.width; let width = res.width;
let height = res.height; let height = res.height;
@ -1179,12 +1186,15 @@
shotVideoClick(array).then(() => { shotVideoClick(array).then(() => {
console.log("发送完成"); console.log("发送完成");
let end = new Date(); let end = new Date();
var diff = (end.getTime() - start.getTime()) / 1000; var diff = (end.getTime() - start
let s =parseInt(diff % 60); .getTime()) / 1000;
let m =parseInt((diff - s) / 60); let s = parseInt(diff % 60);
console.log("发送完成,耗时:" + m + "分" + s + "秒"); let m = parseInt((diff - s) / 60);
updateLoading(these,{ console.log("发送完成,耗时:" + m + "分" +
text: "发送完成,耗时:" + m + "分" + s + "秒", s + "秒");
updateLoading(these, {
text: "发送完成,耗时:" + m +
"分" + s + "秒",
}); });
}).catch((ex1) => { }).catch((ex1) => {
@ -1458,6 +1468,24 @@
these.showBleUnConnect() these.showBleUnConnect()
return; return;
} }
let err = false;
this.formData.textLines.find((txt) => {
if (txt.length === 0 || txt.length > 7) {
console.log("txt=", txt);
err = true;
return true;
}
return false;
})
if (err) {
this.showPop({
message: "单位、部门、姓名必须填写且最多7字",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
borderColor: "#e034344d",
buttonBgColor: "#E03434",
});
return;
}
showLoading(these, { showLoading(these, {
text: "请稍候..." text: "请稍候..."
}); });