use of com.cas.sim.tis.entity.TypicalCase in project TeachingInSimulation by ScOrPiOzzy.
the class DrawingController method refresh.
private void refresh() {
TypicalCase typicalCase = typicalCase3D.getTypicalCase();
typicalCase.setDrawings(StringUtil.combine(drawings));
// if (typicalCase.getId() != null) {
// // 典型案例已经保存过,则直接更新新增图纸到数据库
// TypicalCaseAction action = SpringUtil.getBean(TypicalCaseAction.class);
// action.modify(typicalCase);
// }
initDrawings(typicalCase3D);
}
use of com.cas.sim.tis.entity.TypicalCase in project TeachingInSimulation by ScOrPiOzzy.
the class TypicalCaseMenu method showCaseDialog.
// open打开案例选择面板
private void showCaseDialog() {
Dialog<Integer> dialog = new Dialog<>();
dialog.setDialogPane(new TypicalCaseSelectDialog(true));
dialog.setTitle(MsgUtil.getMessage("typical.case.title.list"));
dialog.setPrefSize(640, 500);
dialog.showAndWait().ifPresent(id -> {
if (id == null) {
return;
}
SpringUtil.getBean(PageController.class).showLoading();
TypicalCaseAction action = SpringUtil.getBean(TypicalCaseAction.class);
TypicalCase typicalCase = action.findTypicalCaseById(id);
typicalCase3D.setupCase(typicalCase);
});
}
use of com.cas.sim.tis.entity.TypicalCase in project TeachingInSimulation by ScOrPiOzzy.
the class TypicalCaseMenu method newCase.
private void newCase() {
SpringUtil.getBean(PageController.class).showLoading();
TypicalCase typicalCase = new TypicalCase();
typicalCase3D.setupCase(typicalCase);
}
use of com.cas.sim.tis.entity.TypicalCase in project TeachingInSimulation by ScOrPiOzzy.
the class TypicalCaseSelectDialog method refresh.
private void refresh() {
List<TypicalCase> cases = SpringUtil.getBean(TypicalCaseAction.class).getTypicalCaseList();
JSONArray array = new JSONArray();
array.addAll(cases);
table.setItems(array);
table.build();
}
use of com.cas.sim.tis.entity.TypicalCase in project TeachingInSimulation by ScOrPiOzzy.
the class DrawingController method initDrawings.
private void initDrawings(TypicalCase3D typicalCase3D) {
clean();
TypicalCase typicalCase = typicalCase3D.getTypicalCase();
String drawings = typicalCase.getDrawings();
if (StringUtils.isEmpty(drawings)) {
return;
}
this.drawings = StringUtil.split(drawings);
List<Resource> resources = SpringUtil.getBean(ResourceAction.class).findResourcesByIds(this.drawings);
for (Resource resource : resources) {
addDrawingPreviewBtn(resource);
}
index = 0;
group.selectToggle(group.getToggles().get(index));
}
Aggregations