diff --git a/components/TextToHex/textToDotMatrix.vue b/components/TextToHex/textToDotMatrix.vue
new file mode 100644
index 0000000..2dc904d
--- /dev/null
+++ b/components/TextToHex/textToDotMatrix.vue
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/index.js b/config/index.js
index 93e0224..dfb50b2 100644
--- a/config/index.js
+++ b/config/index.js
@@ -2,7 +2,7 @@
const config = {
// 开发环境
development: {
- BASE_URL: 'https://www.cnxhyc.com/jq',
+ BASE_URL: 'http://192.168.110.56:8000',
API_PREFIX: '',
// MQTT 配置
MQTT_HOST: 'www.cnxhyc.com',
diff --git a/pages/6155/ImgCrop.vue b/pages/6155/ImgCrop.vue
index 26cf4a2..39126ca 100644
--- a/pages/6155/ImgCrop.vue
+++ b/pages/6155/ImgCrop.vue
@@ -1,9 +1,9 @@
-
+
-
@@ -18,17 +18,29 @@
data() {
return {
src: "",
- Statu: false
+ Statu: false,
+ width:160,
+ height:80
}
},
+ computed:{
+ cropWidth(){
+ return this.width*10;
+ }
+ ,
+ cropHeight(){
+ return this.height*10;
+ }
+ },
onLoad: function(option) {
const eventChannel = this.getOpenerEventChannel();
var these = this;
- eventChannel.on('checkImg', (data)=> {
- console.log("我收到你的消息了,消息内容是:" + JSON.stringify(data));
- this.src = data.data;
- console.log("我收到你的消息了,消息内容是:",data);
+ eventChannel.on('checkImg', (rec)=> {
+ console.log("我收到你的消息了,消息内容是:" + JSON.stringify(rec));
+ this.src = rec.data;
+ this.width=rec.width?rec.width:160;
+ this.height=rec.height?rec.height:80;
})
},
methods: {
@@ -43,7 +55,7 @@
const ctx = uni.createCanvasContext('splashCanvas', this);
ctx.drawImage(
e.tempFilePath,
- 0,0,160,80
+ 0,0,these.width,these.height
);
setTimeout(() => {
ctx.draw(false, ()=>{
@@ -52,8 +64,8 @@
canvasId: 'splashCanvas',
x: 0,
y: 0,
- width: 160,
- height: 80,
+ width: these.width,
+ height: these.height,
success: (res) => {
// 处理像素数据并发送
@@ -81,8 +93,7 @@
\ No newline at end of file
diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue
index c333c54..c303838 100644
--- a/pages/6155/deviceDetail.vue
+++ b/pages/6155/deviceDetail.vue
@@ -1,7 +1,7 @@
-
+
@@ -410,6 +410,15 @@
}
},
methods: {
+ previewImg(img){
+ if(!img){
+ return;
+ }
+
+ uni.previewImage({
+ urls:[img]
+ })
+ },
getDevice: function() {
// console.log("LinkedList=", ble.data.LinkedList);
// console.log("formData=", these.formData);
diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue
index a5aa98c..0ca6149 100644
--- a/pages/650/HBY650.vue
+++ b/pages/650/HBY650.vue
@@ -1,7 +1,7 @@
-
+
@@ -367,6 +367,15 @@
}
},
methods: {
+ previewImg(img){
+ if(!img){
+ return;
+ }
+
+ uni.previewImage({
+ urls:[img]
+ })
+ },
getWarnStyle(index) {
let className = "";
switch (this.formData.warnLevel) {
@@ -590,6 +599,7 @@
borderColor: "#e034344d",
buttonBgColor: "#E03434",
buttonText: '去连接',
+ buttonTextColor:'#FFFFFFde',
okCallback: function() {
uni.navigateTo({
diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue
index 7a6dc83..27c9d75 100644
--- a/pages/670/HBY670.vue
+++ b/pages/670/HBY670.vue
@@ -4,7 +4,7 @@
:rightIcons="Status.navbar.icons" @icon-click="handleRightClick">
-
+
@@ -524,6 +524,15 @@
},
methods: {
+ previewImg(img){
+ if(!img){
+ return;
+ }
+
+ uni.previewImage({
+ urls:[img]
+ })
+ },
showBleUnConnect() {
this.Status.bleLinkCnt++;
if(this.Status.bleLinkCnt>3){
@@ -537,7 +546,7 @@
buttonText: '去连接',
showCancel: true,
cancelCallback: () => {
- this.closePop();
+ // this.closePop();
},
okCallback: function() {
console.log("1111");
@@ -1200,7 +1209,7 @@
message.deviceId = these.device.id;
message.deviceImei = these.device.deviceImei;
- let requestSend = () => {
+ let requestSend = (callback) => {
message.isBluetooth = false;
api.sendSos(message).then((res) => {
@@ -1211,12 +1220,18 @@
code: 200,
msg: '操作成功'
});
+ if(callback){
+ callback();
+ }
} else {
return this.sendMQ(json);
}
}).then((res) => {
console.log("res=", res);
+ if(callback){
+ callback();
+ }
}).catch((ex) => {
console.log("ex=", ex);
these.showPop({
@@ -1234,7 +1249,7 @@
}
- let bleSendCmd = () => {
+ let bleSendCmd = (callback) => {
let f = this.getDevice();
let buffer = null;
if (f) {
@@ -1255,53 +1270,59 @@
these.setBleFormData();
message.isBluetooth = true;
api.sendSos(message);
+ if(callback){
+ callback();
+ }
}).catch((ex) => {
//使用4G发送
console.log("蓝牙发送失败,转4g发送", ex);
- requestSend();
+ requestSend(callback);
});
} else {
console.log("找不到蓝牙设备");
- requestSend();
+ requestSend(callback);
these.showBleUnConnect();
}
}
let OpenSOS = () => {
- these.formData.qzwarn = true; //标记为强制报警了
-
- these.Status.staticWarn.time = 180;
- this.formData.SOS = type;
-
- let loopFunc = () => {
- if (these.Status.staticWarn.inteval === null) {
- return;
+ let execSos=()=>{
+ these.formData.qzwarn = true; //标记为强制报警了
+
+ these.Status.staticWarn.time = 180;
+ this.formData.SOS = type;
+
+ let loopFunc = () => {
+ if (these.Status.staticWarn.inteval === null) {
+ return;
+ }
+ if (these.Status.staticWarn.time === 0) {
+
+
+ clearInterval(these.Status.staticWarn.inteval);
+ these.Status.staticWarn.inteval = null;
+ these.formData.qzwarn = false;
+ these.formData.SOS = 'close';
+ these.CloseWarn(false);
+ return;
+ }
+ these.Status.staticWarn.time = these.Status.staticWarn
+ .time - 1;
+
+ if (these.Status.Pop.clickEvt == 'time' && this.Status.Pop.showPop) {
+ console.log("111111");
+ this.showQzWarn(this.Status.Pop.okCallback);
+ }
+
+
}
- if (these.Status.staticWarn.time === 0) {
-
-
- clearInterval(these.Status.staticWarn.inteval);
- these.Status.staticWarn.inteval = null;
- these.formData.qzwarn = false;
- these.formData.SOS = 'close';
- these.CloseWarn(false);
- return;
- }
- these.Status.staticWarn.time = these.Status.staticWarn
- .time - 1;
-
- if (these.Status.Pop.clickEvt == 'time' && this.Status.Pop.showPop) {
- console.log("111111");
- this.showQzWarn(this.Status.Pop.okCallback);
- }
-
-
+ these.Status.staticWarn.inteval = setInterval(() => {
+ loopFunc();
+ }, 1000);
}
- these.Status.staticWarn.inteval = setInterval(() => {
- loopFunc();
- }, 1000);
+
- bleSendCmd();
+ bleSendCmd(execSos);
}
diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue
index 6f8c24c..c620b9c 100644
--- a/pages/7305/BJQ7305.vue
+++ b/pages/7305/BJQ7305.vue
@@ -1,7 +1,7 @@
-
+
@@ -83,7 +83,7 @@
人员信息登记
发送
-
@@ -124,8 +124,8 @@
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
- @buttonClick="HidePop" @closePop="closePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
- v-model="Status.Pop.modelValue" />
+ @buttonClick="HidePop" @closePop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
+ :promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" />