@@ -55,11 +55,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return '';
},operate:true},
{field : 'file', title : '文件', formatter : function (value, row, index) {
+
$file = '';
for (i=0;i<value.length;i++){
- $file =$file + '<a href="'+value[i]["file_path"]+'" target="_blank" style="margin-right:10px;">'+
- value[i]['name']+
- '</a></br>';
+ if(value[i]["types"] == "application/pdf" ||value[i]["types"] == "text/plain"){
+ $file =$file + '<a href="'+value[i]["file_path"]+'" download="" style="margin-right:10px;">'+
+ value[i]['name']+
+ '</a></br>';
+ }else{
+ $file =$file + '<a href="'+value[i]["file_path"]+'" target="_blank" style="margin-right:10px;">'+
+ }
}
return $file;
},operate:false},