Browse Source

modify time interval

master
xiaowuler 3 years ago
parent
commit
e56a06ce55
  1. 21
      04.系统编码/Backend/src/main/java/com/userinformation/backend/config/BinderControllerAdvice.java
  2. 7
      04.系统编码/Frontend/src/components/RamanLidar.vue
  3. 2
      04.系统编码/Frontend/src/model/constant.ts

21
04.系统编码/Backend/src/main/java/com/userinformation/backend/config/BinderControllerAdvice.java

@ -0,0 +1,21 @@
package com.userinformation.backend.config;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;
/**
* @author: xiaowuler
* @createTime: 2022-04-02 14:02
* @describe: spring freamwork bug 处理
*/
@ControllerAdvice
@Order(10000)
public class BinderControllerAdvice {
@InitBinder
public void setAllowedFields(org.springframework.web.bind.WebDataBinder binder) {
String[] denylist = new String[]{"class.*",
"Class.*", "*.class.*", "*.Class.*"};
binder.setDisallowedFields(denylist);
}
}

7
04.系统编码/Frontend/src/components/RamanLidar.vue

@ -776,7 +776,7 @@ export default {
result.forEach(r => {
const time = moment(r.time, 'M_D_H').format("MM月DD日HH时")
if (r.data == null) {
for (let x = 0; x < 60; x++) {
for (let x = 0; x < 11; x++) {
index++;
if (matrix[index] == null) {
matrix[index] = new Array<Box>(capacity);
@ -787,10 +787,10 @@ export default {
}
return;
}
const interval = Math.round(60 / r.data[0].length);
const interval = Math.round(11 / r.data[0].length);
for (let h = 0, len = r.data.length; h < len; h++) {
let tempIndex = parseInt(index + "");
r.data[h] = r.data[h].slice(0, 60);
r.data[h] = r.data[h].slice(0, 11);
for (let i = 0, len = r.data[h].length; i < len; i++) {
for (let _i = 0; _i < interval; _i++) {
tempIndex++;
@ -820,6 +820,7 @@ export default {
setCloudRecognitionResult(capacity, time, response.message, null, result);
return;
}
setCloudRecognitionResult(capacity, time, response.message, response.data, result);
}).catch(error => {
setCloudRecognitionResult(capacity, time, error.message, null, result);

2
04.系统编码/Frontend/src/model/constant.ts

@ -4,4 +4,4 @@ export class Constant{
export class ConstantRamanLidar{
public static readonly baseUrl: string = 'http://112.124.40.88:5511';
// public static readonly baseUrl: string = 'http://10.124.102.10:9998';
}
}
Loading…
Cancel
Save