|
@@ -55,11 +55,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
return '';
|
|
return '';
|
|
|
},operate:true},
|
|
},operate:true},
|
|
|
{field : 'file', title : '文件', formatter : function (value, row, index) {
|
|
{field : 'file', title : '文件', formatter : function (value, row, index) {
|
|
|
|
|
+
|
|
|
$file = '';
|
|
$file = '';
|
|
|
for (i=0;i<value.length;i++){
|
|
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;">'+
|
|
|
|
|
+ value[i]['name']+
|
|
|
|
|
+ '</a></br>';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return $file;
|
|
return $file;
|
|
|
},operate:false},
|
|
},operate:false},
|