|
楼主 |
发表于 2017-9-25 11:12:26
|
显示全部楼层
Model.prototype.imageGridCellRender = function(event){
if(event.colName == "image"){
if (event.colVal != null && event.colVal != "" && event.colVal != "[]") {
//解析数据库中存储的json数据
var imageJson = eval("(" + event.colVal + ")");
var fileID = imageJson[0]["fileID"];
var docPath = imageJson[0]["docPath"];
//依靠上述解析出的信息获得路径
var url = DocUtils.InnerUtils.getdocServerAction({
"docPath" : docPath,
urlPattern : "/repository/file/view/" + fileID + "/last/content",
isFormAction : false,
context : this.getContext()
});
//显示图片
event.html = "<img src="+url+" xid='image1' style='height:70px;width:70px;'></img>"
}
}
};
|
|