|
@@ -0,0 +1,394 @@
|
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
|
+<html>
|
|
|
|
+<head>
|
|
|
|
+ <title>收文管理管理</title>
|
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ var validateForm;
|
|
|
|
+ function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
|
+ if(validateForm.form()){
|
|
|
|
+ $("#inputForm").submit();
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ validateForm = $("#inputForm").validate({
|
|
|
|
+ submitHandler: function(form){
|
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
|
+ form.submit();
|
|
|
|
+ },
|
|
|
|
+ errorContainer: "#messageBox",
|
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
|
+ $("#messageBox").text("输入有误,请先更正。");
|
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
|
+ } else {
|
|
|
|
+ error.insertAfter(element);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ var attachmentFile = $("#file_attachment tr").length;
|
|
|
|
+ $("#fileCount").val(attachmentFile);
|
|
|
|
+ for(var i = 0 ; i<attachmentFile; i++){
|
|
|
|
+
|
|
|
|
+ let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
|
|
|
|
+ $("#"+val+"sort").val(i+1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
|
+ $("#attachment_file").click();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //文件行拖拽功能
|
|
|
|
+ $("#upTable tbody").sortable({
|
|
|
|
+ helper: fixHelperModified,
|
|
|
|
+ stop: updateIndex,
|
|
|
|
+ update : function(event, ui){ //更新排序之后
|
|
|
|
+ var attachmentFile = $("#file_attachment tr").length;
|
|
|
|
+ for(var i = 0 ; i<attachmentFile; i++){
|
|
|
|
+ let val = $("#file_attachment").find("tr").eq(i).find("input").eq(0).attr("name");
|
|
|
|
+ if(val.indexOf("[") != -1){
|
|
|
|
+ var number = val.substring(val.indexOf("[")+1,val.indexOf("[")+2);
|
|
|
|
+ console.log($("#workAttachments"+number+"_sort").val())
|
|
|
|
+ $("#workAttachments"+number+"_sort").val(i+1);
|
|
|
|
+ }else{
|
|
|
|
+ $("#"+val+"sort").val(i+1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }).disableSelection();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function insertTitle(tValue){
|
|
|
|
+ //文件后缀名
|
|
|
|
+ var attachTypes = $("#attachTypes").val();
|
|
|
|
+ console.log("attachTypes",attachTypes)
|
|
|
|
+ //文件大小
|
|
|
|
+ var attachLength = $("#attachLength").val();
|
|
|
|
+ var suffixResult = 0;
|
|
|
|
+
|
|
|
|
+ var fileName = tValue.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
|
|
|
|
+ var fileNameLength = tValue.length;//获取到文件名长度
|
|
|
|
+
|
|
|
|
+ var suffix = tValue.substring(fileName + 1, fileNameLength);//截取后缀名
|
|
|
|
+ suffix = suffix.toLowerCase();//后缀名转换小写
|
|
|
|
+ attachTypes = attachTypes.toLowerCase();
|
|
|
|
+ if(attachTypes!=undefined && attachTypes !=null & attachTypes !=''){
|
|
|
|
+ var attachTypeList = attachTypes.split(",");
|
|
|
|
+ for (var x in attachTypeList) {
|
|
|
|
+ if(attachTypeList[x] == suffix){
|
|
|
|
+ suffixResult = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(suffixResult == 0 ){
|
|
|
|
+ top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var list = "${workIncomingMessage.workAttachments}";
|
|
|
|
+ var size = (list.split('url')).length-1;
|
|
|
|
+ var files = $("#attachment_file")[0].files;
|
|
|
|
+
|
|
|
|
+ for(var i = 0;i<files.length;i++) {
|
|
|
|
+ var file = files[i];
|
|
|
|
+ var fileSize = (file.size/(1024 * 1024)).toFixed(2);
|
|
|
|
+ if(attachLength !=undefined && attachLength != null && attachLength !='') {
|
|
|
|
+ if (parseFloat(fileSize) > parseFloat(attachLength)) {
|
|
|
|
+ top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var attachmentId = "";
|
|
|
|
+ var attachmentFlag = "100";
|
|
|
|
+ console.log(file);
|
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
|
+
|
|
|
|
+ var storeAs = "workAttachment";
|
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
|
+ var divId = "_attachment";
|
|
|
|
+ $("#addFile"+divId).show();
|
|
|
|
+ var fileCount = $("#fileCount").val();
|
|
|
|
+ $("#fileCount").val(parseInt(fileCount)+1);
|
|
|
|
+ multipartUploadWithStsOnProcessAccessory(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function insertTitleCollection(tValue){
|
|
|
|
+ //文件后缀名
|
|
|
|
+ console.log(tValue);
|
|
|
|
+ var attachTypes =$("#attachTypes").val();
|
|
|
|
+ console.log(attachTypes);
|
|
|
|
+ //文件大小
|
|
|
|
+ var attachLength = $("#attachLength").val();
|
|
|
|
+ var suffixResult = 0;
|
|
|
|
+ for (var i=0;i<tValue.length;i++){
|
|
|
|
+ var fileName = tValue[i].fileName.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
|
|
|
|
+ var fileNameLength = tValue[i].fileName.length;//获取到文件名长度
|
|
|
|
+ var suffix = tValue[i].fileName.substring(fileName + 1, fileNameLength);//截取后缀名
|
|
|
|
+ suffix = suffix.toLowerCase();//后缀名转换小写
|
|
|
|
+ attachTypes = attachTypes.toLowerCase();
|
|
|
|
+ if(attachTypes!=undefined && attachTypes !=null & attachTypes !=''){
|
|
|
|
+ var attachTypeList = attachTypes.split(",");
|
|
|
|
+ for (var x in attachTypeList) {
|
|
|
|
+ if(attachTypeList[x] == suffix){
|
|
|
|
+ suffixResult = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(suffixResult == 0 ){
|
|
|
|
+ top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var list = "${workIncomingMessage.workAttachments}";
|
|
|
|
+ var size = (list.split('url')).length-1;
|
|
|
|
+ var files = tValue;
|
|
|
|
+
|
|
|
|
+ for(var i = 0;i<files.length;i++) {
|
|
|
|
+ var file = files[i];
|
|
|
|
+ var fileSize = (file.fileSize/(1024 * 1024)).toFixed(2);
|
|
|
|
+ if(attachLength !=undefined && attachLength != null && attachLength !='') {
|
|
|
|
+ if (parseFloat(fileSize) > parseFloat(attachLength)) {
|
|
|
|
+ top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ var attachmentId = "";
|
|
|
|
+ var attachmentFlag = "100";
|
|
|
|
+ console.log(file);
|
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
|
+
|
|
|
|
+ var storeAs = "workAttachment";
|
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
|
+ var divId = "_attachment";
|
|
|
|
+ $("#addFile"+divId).show();
|
|
|
|
+ var fileCount = $("#fileCount").val();
|
|
|
|
+ $("#fileCount").val(parseInt(fileCount)+1);
|
|
|
|
+ multipartUploadWithStsCollectionCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
|
|
|
|
+ //multipartUploadWithStsOnProcessAccessoryCollect(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size,fileCount);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ function showfile(){
|
|
|
|
+ var length=$("#file_attachment tr").length;
|
|
|
|
+ var files=new Array();
|
|
|
|
+ for(var i=0;i<length;i++){
|
|
|
|
+ files[i]=$("#file_attachment").find("tr").eq(i).find("td").html();
|
|
|
|
+ }
|
|
|
|
+ return files;
|
|
|
|
+ }
|
|
|
|
+ function showfileXia(){
|
|
|
|
+ var length=$("#file_attachment tr").length;
|
|
|
|
+ var xia=new Array();
|
|
|
|
+ for(var i=0;i<length;i++){
|
|
|
|
+ xia[i]=$("#file_attachment").find("tr").eq(i).find("td").eq(3).find("span").html();
|
|
|
|
+ }
|
|
|
|
+ return xia;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //文件行拖拽方法
|
|
|
|
+ var fixHelperModified = function(e, tr) {
|
|
|
|
+ var $originals = tr.children();
|
|
|
|
+ var $helper = tr.clone();
|
|
|
|
+ $helper.children().each(function(index) {
|
|
|
|
+ $(this).width($originals.eq(index).width())
|
|
|
|
+ });
|
|
|
|
+ return $helper;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //文件行拖拽方法
|
|
|
|
+ updateIndex = function(e, ui) {
|
|
|
|
+ $('td.index', ui.item.parent()).each(function (i) {
|
|
|
|
+ $(this).html(i + 1);
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ function ceshi() {
|
|
|
|
+ alert(1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function openInfo(id,value) {
|
|
|
|
+ console.log(id);
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: ['80%','65%'],
|
|
|
|
+ title:"意见",
|
|
|
|
+ name:'friend',
|
|
|
|
+ skin:"two-btns",
|
|
|
|
+ content: encodeURI("${ctx}/projectAccessory/projectAccessory/getDescription?auditOpinion="+value),
|
|
|
|
+ btn: ['确定', '关闭'],
|
|
|
|
+ yes: function(index, layero){
|
|
|
|
+ var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var item = iframeWin.getSelectedItem();
|
|
|
|
+ console.log(item);
|
|
|
|
+ if(item == "-1"){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var items = item.split('_item_');
|
|
|
|
+ console.log(items)
|
|
|
|
+ console.log(id)
|
|
|
|
+
|
|
|
|
+ $("#"+id+"_description").val(items[1]);
|
|
|
|
+ top.layer.close(index);//关闭对话框。
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+</head>
|
|
|
|
+<body>
|
|
|
|
+<div class="single-form">
|
|
|
|
+ <div class="container">
|
|
|
|
+ <form:form id="inputForm" modelAttribute="projectTemplateInfo" action="${ctx}/projectAccessory/projectAccessory/saveWorkAttachmentOverAll" method="post" class="form-horizontal">
|
|
|
|
+ <form:hidden path="id"/>
|
|
|
|
+ <form:hidden path="projectId"/>
|
|
|
|
+ <form:hidden path="attachTypes"/>
|
|
|
|
+ <form:hidden path="attachLength"/>
|
|
|
|
+ <input type="hidden" id="fileCount" value="">
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>附件信息</h2></div>
|
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
|
+ <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
|
+ <sys:collectSelect id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
|
|
|
|
+ name="linkman.id" title="选择资料库"
|
|
|
|
+ cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
|
|
|
|
+ searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
|
|
|
|
+ </div>
|
|
|
|
+ <div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
|
+ <span id="fileName_attachment" ></span>
|
|
|
|
+ <b><span id="baifenbi_attachment" ></span></b>
|
|
|
|
+ <div class="progress">
|
|
|
|
+ <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
|
|
|
|
+ <span id="attachment_title"></span>
|
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
|
+ <table id="upTable" class="table table-bordered table-condensed details">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
|
+ <th width="30%">文件预览</th>
|
|
|
|
+ <th width="80px">上传人</th>
|
|
|
|
+ <th width="160px">上传时间</th>
|
|
|
|
+ <th width="30%" >文件描述</th>
|
|
|
|
+ <th width="200px">操作</th>
|
|
|
|
+ <th class="hide"></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="file_attachment">
|
|
|
|
+ <c:forEach items="${projectTemplateInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
|
+ <tr class="attachmentClass${status.index} trIdAdds">
|
|
|
|
+ <input type="hidden" id="workAttachments${status.index + 1}_" name="workAttachments${status.index + 1}_" value="${workClientAttachment.id}" />
|
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${projectTemplateInfo.uploadMode == 2}">
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
|
+ <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
|
+ <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+
|
|
|
|
+ <td>${workClientAttachment.createBy.name}</td>
|
|
|
|
+ <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
|
+ <td style="padding:0px"><input id="workAttachments${status.index + 1}_description" name="workAttachments[${status.index + 1}].description" type="text" value="${workClientAttachment.description}" class="form-control layui-input" placeholder="请输入文件描述" style="width: 100%;height: 100%;padding:0px;background-color: #FFFFFF;" readonly="true" onclick="openInfo('workAttachments${status.index + 1}',this.value)"/></td>
|
|
|
|
+ <td class="op-td">
|
|
|
|
+ <div class="op-btn-box" >
|
|
|
|
+ <span>
|
|
|
|
+ </span>
|
|
|
|
+ <c:if test="${workClientAttachment.collectFlag != 1}">
|
|
|
|
+ <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>
|
|
|
|
+ </c:if>
|
|
|
|
+ <c:choose>
|
|
|
|
+ <c:when test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
|
+ <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
|
+ </c:when>
|
|
|
|
+ <c:otherwise>
|
|
|
|
+ <shiro:hasPermission name="ruralProject:ruralCostProjectMessage:adminEdit">
|
|
|
|
+ <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?id=${workClientAttachment.id}&type=2&url=${workClientAttachment.url}','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
|
+ </shiro:hasPermission>
|
|
|
|
+ </c:otherwise>
|
|
|
|
+ </c:choose>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="hide">
|
|
|
|
+ <input id="workAttachments${status.index + 1}_id" name="workAttachments[${status.index + 1}].id" type="hidden" value="${workClientAttachment.id}"/>
|
|
|
|
+ <input id="workAttachments${status.index + 1}_sort" name="workAttachments[${status.index + 1}].sort" type="hidden" value="${workClientAttachment.sort}"/>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </form:form>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+<script>
|
|
|
|
+
|
|
|
|
+ function collectingAccessory(obj,url,fileUrl,uploadUserId,fileSize){
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:"post",
|
|
|
|
+ url:url,
|
|
|
|
+ data: {"url":fileUrl,"type":"1","collectType":1,"collectUserId":uploadUserId,"fileSize":fileSize},
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data.success){
|
|
|
|
+ $(obj).hide()
|
|
|
|
+ //关闭当前页
|
|
|
|
+ top.layer.close(index)
|
|
|
|
+ parent.layer.msg(data.str,{icon:1});
|
|
|
|
+ }else {
|
|
|
|
+ parent.layer.msg(data.str,{icon:2});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+</body>
|
|
|
|
+</html>
|