|
@@ -5,6 +5,9 @@ import com.alibaba.fastjson.JSONObject;
|
|
import kd.bos.context.RequestContext;
|
|
import kd.bos.context.RequestContext;
|
|
import kd.bos.dataentity.utils.StringUtils;
|
|
import kd.bos.dataentity.utils.StringUtils;
|
|
import kd.bos.fileservice.path.DecodeFileFactory;
|
|
import kd.bos.fileservice.path.DecodeFileFactory;
|
|
|
|
+import kd.bos.form.container.Tab;
|
|
|
|
+import kd.bos.form.control.EntryGrid;
|
|
|
|
+import kd.bos.form.control.Search;
|
|
import kd.bos.form.control.events.ItemClickEvent;
|
|
import kd.bos.form.control.events.ItemClickEvent;
|
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
|
import kd.bos.logging.Log;
|
|
import kd.bos.logging.Log;
|
|
@@ -16,6 +19,7 @@ import kd.imc.bds.common.utils.UrlServiceUtils;
|
|
import kd.imc.bds.common.utils.ViewUtil;
|
|
import kd.imc.bds.common.utils.ViewUtil;
|
|
import kd.sdk.plugin.Plugin;
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
|
|
|
|
+import java.util.EventObject;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -25,17 +29,21 @@ public class ViewImageByDownloadFilePlugin extends AbstractFormPlugin implements
|
|
|
|
|
|
private static Log logger = LogFactory.getLog(ViewImageByDownloadFilePlugin.class);
|
|
private static Log logger = LogFactory.getLog(ViewImageByDownloadFilePlugin.class);
|
|
|
|
|
|
|
|
+ public void registerListener(EventObject event) {
|
|
|
|
+ this.addItemClickListeners(new String[]{"toolbarap"});
|
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void itemClick(ItemClickEvent evt) {
|
|
public void itemClick(ItemClickEvent evt) {
|
|
String itemKey = evt.getItemKey();
|
|
String itemKey = evt.getItemKey();
|
|
|
|
+ logger.info("ViewImages itemKey: " + itemKey);
|
|
if (StringUtils.equals(itemKey, "down_test")) {
|
|
if (StringUtils.equals(itemKey, "down_test")) {
|
|
- this.downOneFile();
|
|
|
|
|
|
+ this.downOneFile1();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private void downOneFile() {
|
|
|
|
|
|
+ private void downOneFile1() {
|
|
JSONObject selectImage = this.getSelectImage();
|
|
JSONObject selectImage = this.getSelectImage();
|
|
if (selectImage != null) {
|
|
if (selectImage != null) {
|
|
String viewFileIndexList = selectImage.getString("viewFileIndexList");
|
|
String viewFileIndexList = selectImage.getString("viewFileIndexList");
|