Commit b561bcee by chentian

解决伴随照片不显示问题

parent f34d1bf5
...@@ -62,6 +62,8 @@ public class RegionalTaskResultDetail extends PageBean{ ...@@ -62,6 +62,8 @@ public class RegionalTaskResultDetail extends PageBean{
private String gwdqs;//高危地区 private String gwdqs;//高危地区
@Transient @Transient
private String type;//区分区域碰撞或者时空绘制 private String type;//区分区域碰撞或者时空绘制
@Transient
private String zp;
......
...@@ -460,9 +460,10 @@ public class TrackTogetherContoller { ...@@ -460,9 +460,10 @@ public class TrackTogetherContoller {
if (tsaf.getCsdDzmc() == null || "".equals(tsaf.getCsdDzmc())) { if (tsaf.getCsdDzmc() == null || "".equals(tsaf.getCsdDzmc())) {
tsaf.setCsdDzmc("--"); tsaf.setCsdDzmc("--");
} }
if(tsaf.getRyzp() != null){ /*if(tsaf.getRyzp() != null){
tsaf.setRyzpStr(new String(tsaf.getRyzp())); tsaf.setRyzpStr(new String(tsaf.getRyzp()));
} }*/
clzpnew(tsaf);
} }
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -476,6 +477,17 @@ public class TrackTogetherContoller { ...@@ -476,6 +477,17 @@ public class TrackTogetherContoller {
resultMap.put("state",state); resultMap.put("state",state);
return resultMap; return resultMap;
} }
private void clzpnew(RegionalTaskResultDetail tsaf){
String zp64bite = "";
if (!"".equals(tsaf.getRyzp()) && tsaf.getRyzp() != null) {
// 对字节数组Base64编码 处理图片
/*BASE64Encoder encoder = new BASE64Encoder();
zp64bite = encoder.encode(tsaf.getRyzp());*/// 返回Base64编码过的字节数组字符串
zp64bite = new String(tsaf.getRyzp());
}
String zp = "data:image/gif;base64," + zp64bite;
tsaf.setZp(zp);
}
/** /**
* 时空伴随分类导航点击查询,查出分类导航count * 时空伴随分类导航点击查询,查出分类导航count
* @return * @return
......
...@@ -284,10 +284,10 @@ function doQueryqk(){ ...@@ -284,10 +284,10 @@ function doQueryqk(){
var html=""; var html="";
$.each(rows, function(k,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值 $.each(rows, function(k,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值
var srcurl = ""; var srcurl = "";
if(rows[k].ryzpStr == "data:image/gif;base64,"){ if(rows[k].zp == "data:image/gif;base64,"){
srcurl = "/images/no_data.jpg" srcurl = "/images/no_data.jpg"
} else { } else {
srcurl = rows[k].ryzpStr; srcurl = rows[k].zp;
} }
//处理证件类型和证件号码 //处理证件类型和证件号码
var zjlx = getLx(rows[k]); var zjlx = getLx(rows[k]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment