|
@@ -474,6 +474,45 @@ function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize) {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+/*
|
|
|
|
+function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize){
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: ['50%', '70%'],
|
|
|
|
+ title: '收藏',
|
|
|
|
+ maxmin: true, //开启最大化最小化按钮
|
|
|
|
+ content: realPath+'/projectAccessory/projectAccessory/skipSaveCollectAccessoryForm?url='+ fileUrl + '&collectUserId='+uploadUserId+'&fileSize='+ fileSize + '&type=1&collectType=1',
|
|
|
|
+ btn: ['确定','关闭'],
|
|
|
|
+ btn1: function(index, layero){
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(false){
|
|
|
|
+ top_iframe = false;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ if(iframeWin.contentWindow.doSubmit(1) ){
|
|
|
|
+ // top.layer.close(index);//关闭对话框。
|
|
|
|
+ setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ btn3: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+}*/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
function multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser) {
|
|
function multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, cpt,idx,prefix,currentUser) {
|
|
console.log("-----------------------start");
|
|
console.log("-----------------------start");
|
|
console.log("-----------------------"+realPath);
|
|
console.log("-----------------------"+realPath);
|
|
@@ -536,6 +575,195 @@ function multipartUploadWithStsCollection(storeAs, file,attachmentId,attachmentF
|
|
})
|
|
})
|
|
|
|
|
|
};
|
|
};
|
|
|
|
+function multipartUploadWithStsCollectionCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size, fileCount,idx,prefix,currentUser) {
|
|
|
|
+ console.log("-----------------------start");
|
|
|
|
+ console.log("-----------------------"+realPath);
|
|
|
|
+ var fileUrl=file.linUrl;
|
|
|
|
+ var url=file.url;
|
|
|
|
+ var fileSize=file.fileSize;
|
|
|
|
+ file.fileName.replace(" ","")
|
|
|
|
+ file.fileName.replace(/—/g,"")
|
|
|
|
+ var fileName = file.fileName;
|
|
|
|
+ // 将单引号‘’都转换成',将双引号“”都转换成"
|
|
|
|
+ fileName = fileName.replace(/\’|\‘/g,"'").replace(/\“|\”/g,"\"");
|
|
|
|
+ // 将中括号【】转换成[],将大括号{}转换成{}
|
|
|
|
+ fileName = fileName.replace(/\【/g,"(").replace(/\】/g,")").replace(/\{/g,"(").replace(/\}/g,")");
|
|
|
|
+ fileName = fileName.replace(/\[/g,"(").replace(/\]/g,")").replace(/\{/g,"(").replace(/\}/g,")");
|
|
|
|
+ // 将逗号,转换成,,将:转换成:
|
|
|
|
+ fileName = fileName.replace(/,/g,",").replace(/:/g,":");
|
|
|
|
+ //将中文——转换为英文-
|
|
|
|
+ fileName = fileName.replace(/—/g,"-")
|
|
|
|
+ fileName = fileName.replace(/……/g,"")
|
|
|
|
+ fileName = fileName.replace(/±/g,"")
|
|
|
|
+ fileName = fileName.replace(/#/g,"")
|
|
|
|
+ fileName = fileName.replace(/%/g,"")
|
|
|
|
+ var dfl=new File([file],fileName,{type:file.type});
|
|
|
|
+ file = dfl
|
|
|
|
+
|
|
|
|
+ requestUrl = realPath+"/previewController/getAccess";
|
|
|
|
+ OSS.urllib.request(requestUrl, {method: 'GET'}, function (err, response) {
|
|
|
|
+ if (err) {
|
|
|
|
+ console.log(err);
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ url:realPath+"/previewController/saveJSError",
|
|
|
|
+ data:{object:err.toString()},
|
|
|
|
+ async: false,
|
|
|
|
+ success:function(data){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return alert(err);
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ result = JSON.parse(response);
|
|
|
|
+ } catch (e) {
|
|
|
|
+ errmsg = 'parse sts response info error: ' + e.message;
|
|
|
|
+ return alert(errmsg);
|
|
|
|
+ }
|
|
|
|
+ console.log("---------result"+result);
|
|
|
|
+ client = new OSS.Wrapper({
|
|
|
|
+ accessKeyId: result.AccessKeyId,
|
|
|
|
+ accessKeySecret: result.AccessKeySecret,
|
|
|
|
+ stsToken: result.SecurityToken,
|
|
|
|
+ bucket: result.Bucket,
|
|
|
|
+ endpoint: result.Endpoint,
|
|
|
|
+ timeout:'30000'
|
|
|
|
+ });
|
|
|
|
+ storeAs = url;
|
|
|
|
+ multitestCollectionCollect(client, storeAs, file,attachmentId,attachmentFlag,uploadPath.replace('http://dmtest-test.oss-cn-shanghai.aliyuncs.com', result.AliyunUrl),divId,size, fileCount,fileUrl,fileSize);
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+function multitestCollectionCollect (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,fileCount,fileUrl,fileSize) {
|
|
|
|
+
|
|
|
|
+ var names = storeAs.split("/");
|
|
|
|
+ var name = names[names.length-1];
|
|
|
|
+ ossClient.multipartUpload(storeAs, file,{
|
|
|
|
+ partSize: 1 * 1024 * 1024,
|
|
|
|
+ parallel: 5,
|
|
|
|
+ progress: function* (percent, cpt) {
|
|
|
|
+ var p = Math.floor(percent*100);
|
|
|
|
+ $("#jindutiao"+divId).attr("style","width: "+p+"%");
|
|
|
|
+ $("#jindutiao"+divId).attr("aria-valuenow",p+"%");
|
|
|
|
+ $("#baifenbi"+divId).html(p+"%");
|
|
|
|
+ $("#fileName"+divId).html(file.name);
|
|
|
|
+ checkpoint_temp = cpt;
|
|
|
|
+ }
|
|
|
|
+ }).then(function (result) {
|
|
|
|
+ var fileLocation = "";
|
|
|
|
+ var lookUrl = "";
|
|
|
|
+ //获取文件存储位置(0:本地;1:百度云;2:阿里云)
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"get",
|
|
|
|
+ url:realPath+"/bos/getFileStorageLocation",
|
|
|
|
+ async: false,
|
|
|
|
+ success:function(data){
|
|
|
|
+ fileLocation = data.fileLocation;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ returnUrl = realPath+"/sys/workattachment/saveAttachment";
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:'post',
|
|
|
|
+ url:returnUrl,
|
|
|
|
+ data:{
|
|
|
|
+ "attachmentName":file['name'],
|
|
|
|
+ "attachmentId":attachmentId,
|
|
|
|
+ "attachmentFlag":attachmentFlag,
|
|
|
|
+ "fileSize":fileSize,
|
|
|
|
+ "url":storeAs
|
|
|
|
+ },
|
|
|
|
+ success:function(data){
|
|
|
|
+ var lowerType = data.type.toLowerCase();
|
|
|
|
+ if(data.status=="Success"){
|
|
|
|
+ parent.layer.msg("上传成功!",{icon:1});
|
|
|
|
+ var lenght =$(".trIdAdds").length;
|
|
|
|
+ if(parseInt(fileCount) == parseInt(lenght)){
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ lenght = parseInt(fileCount);
|
|
|
|
+ }
|
|
|
|
+ if (size != 0){
|
|
|
|
+ lenght += size;
|
|
|
|
+ }
|
|
|
|
+ var sort = parseInt(fileCount)+1;
|
|
|
|
+ var addFile = "addFile"+divId;
|
|
|
|
+ var str = '<tr class="trIdAdds">'+
|
|
|
|
+ '<td class="text-center">' ;
|
|
|
|
+ if(2 == fileLocation){
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ async:false,
|
|
|
|
+ url:realPath+"/workfullmanage/workFullManage/getFileTemporaryLookUrl",
|
|
|
|
+ data:{"file":data.url,},
|
|
|
|
+ success:function(result){
|
|
|
|
+ lookUrl = result.lookUrl;
|
|
|
|
+ if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
|
|
|
|
+ str = str +'<img src="'+lookUrl+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/picturePreview?url=' +lookUrl+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
|
|
|
|
+ }else if(isContains("pdf",lowerType)){
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',1)">'+data.attachmentName+'</a>';
|
|
|
|
+ }else if(isContains("rar,zip,jar,7z",lowerType)){
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',3)">'+data.attachmentName+'</a>';
|
|
|
|
+ }else if(isContains("avi,wmv,mpg,mpeg,mov,rm,ram,swf,flv,mp4,rmvb",lowerType)){
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/videoPreview?url=' +lookUrl+ '\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
|
|
|
|
+ }else {
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+lookUrl+'\',2)">'+data.attachmentName+'</a>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ if (isContains("jpg,png,gif,bmp,jpeg",lowerType)){
|
|
|
|
+ str = str +'<img src="'+data.url+'" width="50" height="50" onclick="openDialogView(\'预览\',\''+realPath+ '/a/sys/picturepreview/picturePreview?url=' +data.url+ '\',\'90%\',\'90%\')" alt="'+data.attachmentName+'"/>';
|
|
|
|
+ }else if(isContains("pdf",lowerType)){
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',1)">'+data.attachmentName+'</a>';
|
|
|
|
+ }else if(isContains("rar,zip,jar,7z",lowerType)){
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',3)">'+data.attachmentName+'</a>';
|
|
|
|
+ }else if(isContains("avi,wmv,mpg,mpeg,mov,rm,ram,swf,flv,mp4,rmvb",lowerType)){
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openDialogView(\'预览\',\''+ '/a/sys/picturepreview/videoPreview?url=' +lookUrl+ '\',\'90%\',\'90%\')">'+data.attachmentName+'</a>';
|
|
|
|
+ }else {
|
|
|
|
+ str = str + '<a class="attention-info" href="javascript:void(0)" onclick="openPreview(\''+data.url+'\',2)">'+data.attachmentName+'</a>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str = str +'</td>'+
|
|
|
|
+ '<td >'+data.createByName+'</td>'+
|
|
|
|
+ '<td >'+data.createDate+
|
|
|
|
+ '<input name="workAttachments['+sort+'].id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value=""/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].attachmentId" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentId+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].url" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.url+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].temporaryUrl" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.temporaryUrl+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].attachmentName" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentName+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].createBy.id" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.createBy+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].type" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.type+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].attachmentFlag" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.attachmentFlag+'"/>'+
|
|
|
|
+ '<input name="workAttachments['+sort+'].fileSize" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+data.fileSize+'"/>'+
|
|
|
|
+ '<input id="workAttachments'+sort+'_sort" name="workAttachments['+sort+'].sort" type="hidden" readonly="readonly" maxlength="20" style="width:140px;" class="form-control" value="'+sort+'"/>'+
|
|
|
|
+ '</td>'+
|
|
|
|
+ '<td style="padding:0px">'+'<input id="workAttachments'+sort+'_description" name="workAttachments['+sort+'].description" type="text" readonly="readonly" maxlength="250" class="form-control layui-input" required placeholder="请输入文件描述" onclick="openInfo(\'workAttachments'+sort+'\',this.value)" style="width: 100%;height: 100%;padding:0px;background-color: #FFFFFF;" />'+'</td>'+
|
|
|
|
+ '<td class="op-td">'+
|
|
|
|
+ '<div class="op-btn-box">';
|
|
|
|
+ if(2 == fileLocation){
|
|
|
|
+ str = str +'<a href="'+lookUrl+'" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
|
|
+ }else{
|
|
|
|
+ str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
|
|
+ }
|
|
|
|
+ str = str +'<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
|
|
+ /*'<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/ossCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 收藏</a>'+*/
|
|
|
|
+ '</div>' +
|
|
|
|
+ '</td>'+
|
|
|
|
+ '</tr>';
|
|
|
|
+ $("#file"+divId).append(str);
|
|
|
|
+ }else {
|
|
|
|
+ parent.layer.msg("上传失败!",{icon:2});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(function (err) {
|
|
|
|
+ console.log("err------ err:");
|
|
|
|
+ console.log(err);
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt,fileUrl,fileSize) {
|
|
function multitestCollection (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadPath,divId, size,cpt,fileUrl,fileSize) {
|
|
|
|
|
|
var names = storeAs.split("/");
|
|
var names = storeAs.split("/");
|
|
@@ -955,8 +1183,8 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
|
|
}else{
|
|
}else{
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
}
|
|
}
|
|
- str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+
|
|
|
|
- '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
|
|
|
|
+ /*str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+*/
|
|
|
|
+ str = str + '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
'</div>' +
|
|
'</div>' +
|
|
'</td>'+
|
|
'</td>'+
|
|
'</tr>';
|
|
'</tr>';
|
|
@@ -1076,8 +1304,8 @@ function CollectMultitest (ossClient, storeAs, file,attachmentId,attachmentFlag,
|
|
}else{
|
|
}else{
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
}
|
|
}
|
|
- str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+
|
|
|
|
- '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
|
|
|
|
+ /*str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+*/
|
|
|
|
+ str = str + '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
'</div>' +
|
|
'</div>' +
|
|
'</td>'+
|
|
'</td>'+
|
|
'</tr>';
|
|
'</tr>';
|
|
@@ -1369,8 +1597,8 @@ function multitestRecordsReported (ossClient, storeAs, file,attachmentId,attachm
|
|
}else{
|
|
}else{
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
}
|
|
}
|
|
- str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+
|
|
|
|
- '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
|
|
|
|
+ /*str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+*/
|
|
|
|
+ str = str + '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
'</div>' +
|
|
'</div>' +
|
|
'</td>'+
|
|
'</td>'+
|
|
'</tr>';
|
|
'</tr>';
|
|
@@ -1504,8 +1732,8 @@ function multitestOnProcessAccessory (ossClient, storeAs, file,attachmentId,atta
|
|
}else{
|
|
}else{
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
str = str +'<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>';
|
|
}
|
|
}
|
|
- str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+
|
|
|
|
- '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
|
|
|
|
+ /* str = str + '<a href="javascript:void(0)" onclick="ossCollectingAccessory(this,\''+realPath+'/projectAccessory/projectAccessory/saveCollectAccessory?url='+data.url+'&fileName='+data.attachmentName+'\',\''+addFile+'\',\''+data.createBy+'\')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>'+*/
|
|
|
|
+ str = str + '<a href="javascript:void(0)" onclick="deleteFileFromAliyun1(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+encodeURIComponent(data.url)+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>'+
|
|
'</div>' +
|
|
'</div>' +
|
|
'</td>'+
|
|
'</td>'+
|
|
'</tr>';
|
|
'</tr>';
|