Browse Source

资料库(查看页面添加收藏按钮)

[user3] 4 years atrás
parent
commit
47cc08c18e

+ 2 - 2
src/main/webapp/static/oss/ossupload.js

@@ -744,8 +744,8 @@ function multitest (ossClient, storeAs, file,attachmentId,attachmentFlag,uploadP
                     }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>&nbsp;下载</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>&nbsp;删除</a>'+
-                        '<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>&nbsp;收藏</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>&nbsp;收藏</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>&nbsp;删除</a>'+
                         '</div>' +
                         '</td>'+
                         '</tr>';

+ 3 - 0
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanView.jsp

@@ -320,6 +320,9 @@
                                                 <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
                                             </c:otherwise>
                                         </c:choose>
+                                        <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>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
                                 </td>
                             </tr>

+ 3 - 0
src/main/webapp/webpage/modules/projectrecord/projectRecordsView.jsp

@@ -575,6 +575,9 @@
 								<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
 								<td  class="op-td">
 									<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									<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>&nbsp;收藏</a>
+									</c:if>
 <%--									<a href="javascript:location.href=encodeURI('${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file=${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>--%>
 									<%--<a href="#" onclick="seeFile('${workClientAttachment.url}','${workClientAttachment.attachmentName}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;查看</a>--%>
 								</td>

+ 12 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp

@@ -482,7 +482,7 @@
 						<tr>
 							<th width="55%">文件类型</th>
 							<th width="">文件名</th>
-							<th width="100px">操作</th>
+							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
@@ -581,6 +581,9 @@
 															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 														</c:otherwise>
 													</c:choose>
+													<c:if test="${fileAttachment.collectFlag != 1}">
+														<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileAttachment.url}','${fileAttachment.createBy.id}','${fileAttachment.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+													</c:if>
 												</c:otherwise>
 											</c:choose>
 										</div>
@@ -611,7 +614,7 @@
 						<tr>
 							<th width="55%">文件类型</th>
 							<th width="">文件名</th>
-							<th width="100px">操作</th>
+							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
@@ -710,6 +713,9 @@
 														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 													</c:otherwise>
 												</c:choose>
+												<c:if test="${fileGistdata.collectFlag != 1}">
+													<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileGistdata.url}','${fileGistdata.createBy.id}','${fileGistdata.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+												</c:if>
 											</c:otherwise>
 										</c:choose>
 									</div>
@@ -741,7 +747,7 @@
 						<tr>
 							<th width="55%">文件类型</th>
 							<th width="">文件名</th>
-							<th width="100px">操作</th>
+							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
@@ -840,6 +846,9 @@
 														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 													</c:otherwise>
 												</c:choose>
+												<c:if test="${fileOther.collectFlag != 1}">
+													<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileOther.url}','${fileOther.createBy.id}','${fileOther	.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+												</c:if>
 											</c:otherwise>
 										</c:choose>
 									</div>

+ 12 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp

@@ -125,7 +125,7 @@
 								<%-- <th>序号</th>--%>
 							<th width="30%">文件类型</th>
 							<th width="">文件名</th>
-							<th width="100px">操作</th>
+							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
@@ -208,6 +208,9 @@
 											</c:when>
 											<c:otherwise>
 												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												<c:if test="${fileAttachment.collectFlag != 1}">
+													<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileAttachment.url}','${fileAttachment.createBy.id}','${fileAttachment.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+												</c:if>
 											</c:otherwise>
 										</c:choose>
 									</div>
@@ -240,7 +243,7 @@
 								<%-- <th>序号</th>--%>
 							<th width="30%">文件类型</th>
 							<th width="">文件名</th>
-							<th width="100px">操作</th>
+							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
@@ -324,6 +327,9 @@
 											</c:when>
 											<c:otherwise>
 												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												<c:if test="${fileGistdata.collectFlag != 1}">
+													<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileGistdata.url}','${fileGistdata.createBy.id}','${fileGistdata.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+												</c:if>
 											</c:otherwise>
 										</c:choose>
 									</div>
@@ -355,7 +361,7 @@
 								<%-- <th>序号</th>--%>
 							<th width="30%">文件类型</th>
 							<th width="">文件名</th>
-							<th width="100px">操作</th>
+							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
@@ -439,6 +445,9 @@
 													</c:when>
 													<c:otherwise>
 														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														<c:if test="${fileOther.collectFlag != 1}">
+															<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileOther.url}','${fileOther.createBy.id}','${fileOther.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+														</c:if>
 													</c:otherwise>
 												</c:choose>
 											</div>

+ 4 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectPlanView.jsp

@@ -337,7 +337,11 @@
                                 <td class="op-td">
                                     <div class="op-btn-box" >
                                         <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <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>&nbsp;收藏</a>
+                                        </c:if>
                                     </div>
+
                                 </td>
                             </tr>
                         </c:forEach>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/reportedView.jsp

@@ -542,6 +542,9 @@
                                     <td class="op-td">
                                         <div class="op-btn-box" >
                                             <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            <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>&nbsp;收藏</a>
+                                            </c:if>
                                         </div>
                                     </td>
                                 </tr>

+ 6 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/workClientAndContractView.jsp

@@ -311,6 +311,9 @@
                                     <td class="op-td">
                                         <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));"
                                            class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <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>&nbsp;收藏</a>
+                                        </c:if>
                                     </td>
                                 </tr>
                             </c:forEach>
@@ -473,6 +476,9 @@
                                                         <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
                                                     </c:otherwise>
                                                 </c:choose>
+                                                <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>&nbsp;收藏</a>
+                                                </c:if>
                                             </div>
                                         </td>
                                     </tr>

+ 3 - 0
src/main/webapp/webpage/modules/workcontractrecord/workContractView.jsp

@@ -302,6 +302,9 @@
 											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
 										</c:otherwise>
 									</c:choose>
+									<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>&nbsp;收藏</a>
+									</c:if>
 								</td>
 							</tr>
 						</c:forEach>