|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.fr.design.actions.file.export; |
|
|
|
|
|
|
|
|
|
import com.fanruan.entity.template.TemplateExportBean; |
|
|
|
|
import com.fanruan.repository.TemplateRepository; |
|
|
|
|
import com.fr.design.actions.JTemplateAction; |
|
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
@ -18,12 +20,8 @@ import com.fr.log.FineLoggerFactory;
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
|
import com.fr.third.jodd.io.FileNameUtil; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
import com.fr.workspace.server.exporter.TemplateExportOperator; |
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.io.OutputStream; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -215,9 +213,7 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
|
|
|
|
|
path = path.substring(ProjectConstants.REPORTLETS_NAME.length()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
byte[] contents = |
|
|
|
|
WorkContext.getCurrent().get(TemplateExportOperator.class) |
|
|
|
|
.export(exportKey(), exportType(), null, path, para); |
|
|
|
|
byte[] contents = TemplateRepository.getInstance().export(new TemplateExportBean().setKey(exportKey()).setType(exportType()).setPath(path).setParas(para)); |
|
|
|
|
|
|
|
|
|
outputStream.write(contents); |
|
|
|
|
} |
|
|
|
|