|
|
@ -18,9 +18,9 @@ import org.springframework.stereotype.Component; |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class A8kSubModuleConfigDebugPage { |
|
|
|
|
|
|
|
private final ExtApiPageMgr extApiPageMgr; |
|
|
|
private final A8kCanBusService canBus; |
|
|
|
private final SubModuleConfigService subModuleConfigService; |
|
|
|
private final ExtApiPageMgr extApiPageMgr; |
|
|
|
private final A8kCanBusService canBus; |
|
|
|
private final SubModuleConfigService subModuleConfigService; |
|
|
|
|
|
|
|
public FileToBeDownload export() { |
|
|
|
subModuleConfigService.export(); |
|
|
@ -31,6 +31,10 @@ public class A8kSubModuleConfigDebugPage { |
|
|
|
subModuleConfigService.syncFromMirco(); |
|
|
|
} |
|
|
|
|
|
|
|
public void syncToMirco() throws AppException { |
|
|
|
subModuleConfigService.syncToMirco(); |
|
|
|
} |
|
|
|
|
|
|
|
public void importFromCSV(ExtUIFile file) { |
|
|
|
String filecontent = new String(file.bytes); |
|
|
|
subModuleConfigService.importFromCSV(filecontent); |
|
|
@ -41,6 +45,8 @@ public class A8kSubModuleConfigDebugPage { |
|
|
|
ExtUIPageCfg page = new ExtUIPageCfg(this); |
|
|
|
page.newGroup("sync"); |
|
|
|
page.addFunction("syncFromMirco", this::syncFromMirco); |
|
|
|
page.addFunction("syncToMirco", this::syncToMirco); |
|
|
|
|
|
|
|
page.newGroup("导入/导出"); |
|
|
|
page.addFunction("导出", this::export); |
|
|
|
page.addFunction("导入", this::importFromCSV); |
|
|
|