Browse Source

激活记录错误日志

master
yangteng 1 month ago
parent
commit
5498c65e37

+ 1
- 0
pages/bluetooth/bluetooth.vue View File

foundDevices.push(device); foundDevices.push(device);
} }
} }
datas.setData("deviceNameZW", device._name);
deviceList.value = foundDevices; deviceList.value = foundDevices;
foundDevices = []; foundDevices = [];
console.log("deviceList.value", deviceList.value); console.log("deviceList.value", deviceList.value);

+ 33
- 12
static/etcUtil/index.js View File

datas.setData("connectPrefixName", ""); datas.setData("connectPrefixName", "");
}); });
break; break;
case "BY":
jyApi.disconnectDevice(function(res) {
datas.setData("bluLinkStatus", false);
datas.setData("connectPrefixName", "");
});
break;
case "JY": case "JY":
jyApi.disconnectDevice(function(res) { jyApi.disconnectDevice(function(res) {
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
// func(res.data); // func(res.data);
// } else { // } else {
// if (callBack != null) { // if (callBack != null) {
// callBack(res.msg);
// callBack(res);
// } else { // } else {
// alertF(res.msg); // alertF(res.msg);
// } // }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else {
alertF(res.msg);
}
}
});
break;
case "BY":
console.log('JL执行内容====', cmdArr, type)
jyApi.transCmd(cmdArr, type, function(res) {
console.log('JL执行内容====11111', res)
if (res.code == 0) {
func(res.data);
} else {
if (callBack != null) {
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }
func(res.data); func(res.data);
} else { } else {
if (callBack != null) { if (callBack != null) {
callBack(res.msg);
callBack(res);
} else { } else {
alertF(res.msg); alertF(res.msg);
} }

+ 32
- 4
subpackage/after-sale/activation/activate.vue View File

IntegerToHexString, IntegerToHexString,
} from "@/utils/util/fileData.js"; } from "@/utils/util/fileData.js";
import { import {
issueApply,issueCallback,orderDetailQuery
issueApply,issueCallback,orderDetailQuery,errorLogAdd
} from "@/utils/network/api"; } from "@/utils/network/api";
import { import {
agentId agentId
const tools = require("../../../static/etcUtil/tools.js"); const tools = require("../../../static/etcUtil/tools.js");
const bluetoothUtil = require("../../../static/etcUtil/index.js"); const bluetoothUtil = require("../../../static/etcUtil/index.js");
import activeSuccess from "./components/popup-device-active-success"; import activeSuccess from "./components/popup-device-active-success";
const datas = require("../../../static/etcUtil/datas.js");
import { import {
getVehiclePlateColor getVehiclePlateColor
} from "@/datas/vehiclePlateColor"; } from "@/datas/vehiclePlateColor";
orderId: "", orderId: "",
vehicleClassStr: "" vehicleClassStr: ""
}); });

function cmdResult1() { function cmdResult1() {
tools.showLoadingAlert('正在激活,请等待') tools.showLoadingAlert('正在激活,请等待')
const options = { const options = {
const datas =res; const datas =res;
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) { bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) {
implementCmd(datas.transOrderId, datas.cmd, res.toString(), datas.stepNo) implementCmd(datas.transOrderId, datas.cmd, res.toString(), datas.stepNo)
}, () => {
}, (err) => {
showModals('在线激活异常') showModals('在线激活异常')
console.log("err",err)
errorLog(datas.cmd,JSON.stringify(err),datas.stepNo)
tools.hideLoadingAlert(); tools.hideLoadingAlert();
}); });
}) })
console.log("datas.stepNo", datas.stepNo) console.log("datas.stepNo", datas.stepNo)
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) { bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType == 'CARD' ? '10' : '20', function(res) {
implementCmd(transOrderId, datas.cmd, res.toString(), datas.stepNo) implementCmd(transOrderId, datas.cmd, res.toString(), datas.stepNo)
}, () => {
}, (err) => {
console.log("err",err)
errorLog(datas.cmd,JSON.stringify(err),datas.stepNo)
showModals('在线激活异常') showModals('在线激活异常')
}); });
} }
}) })
}; };
//获取订单详情
const errorLog = (cmd,error,step) => {
console.log('======获取订单信息======')
const options = {
type: 2,
data: {
cardId:card.cardId,
obuId:obu.obuId,
orderType:"1",
factory:datas.getData("deviceName")+"_"+datas.getData("deviceNameZW"),
orderNo:orderInfo.orderNo,
cmd,
error,
step
},
method: "POST",
showLoading: false,
};
requestNew(errorLogAdd, options).then((res) => {
console.log("错误提交成功", res);
});
};
</script> </script>


<style> <style>

+ 3
- 1
utils/network/api.js View File

export const releasePlateaList = "/iaw/api/afterSale/releasePlate/list" //解除车牌占用列表 export const releasePlateaList = "/iaw/api/afterSale/releasePlate/list" //解除车牌占用列表
export const releasePlateaView = "/iaw/api/afterSale/releasePlate/view" //单一订单查询 export const releasePlateaView = "/iaw/api/afterSale/releasePlate/view" //单一订单查询
// 自助工单 // 自助工单
export const selfServiceUserAdd = "/iaw/selfService/userAdd" //用户提交 - 新增
export const selfServiceUserAdd = "/iaw/selfService/userAdd" //用户提交 - 新增

export const errorLogAdd = "/iaw/api/active/errorLog/add" //新增错误信息

Loading…
Cancel
Save