|
@@ -52,9 +52,7 @@
|
|
|
layui.use(['tree', 'util'], function() {
|
|
|
var reportId = "${materialDefectRecord.reportId}"
|
|
|
// var reportId = document.getElementById('reportId').value;
|
|
|
- console.log('reportId', reportId)
|
|
|
var id = "${materialDefectRecord.id}"
|
|
|
- console.log('id', id)
|
|
|
let re = [];
|
|
|
$.ajax({
|
|
|
//几个参数需要注意一下
|
|
@@ -63,7 +61,6 @@
|
|
|
url: '${ctx}/projectReportDefectRecord/projectReportDefectRecord/getZuzhi',
|
|
|
data: {"reportId": reportId,"id": id},
|
|
|
success: function (result) {
|
|
|
- console.log('result', result)
|
|
|
re=result;
|
|
|
var tree = layui.tree;
|
|
|
var util = layui.util
|
|
@@ -87,7 +84,6 @@
|
|
|
checkedData = tree.getChecked('demoId1'); //获取选中节点的数据
|
|
|
|
|
|
layer.alert(JSON.stringify(checkedData), {shade:0});
|
|
|
- console.log('checkedData',checkedData);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -101,10 +97,7 @@
|
|
|
var tree = layui.tree;
|
|
|
var test = tree.getChecked('demoId1'); //获取选中节点的数据
|
|
|
|
|
|
- // console.log('test0', test)
|
|
|
- // console.log('test1', JSON.stringify(test))
|
|
|
document.getElementById('zuZhiList').value = JSON.stringify(test)
|
|
|
- console.log('test2', document.getElementById('zuZhiList').value)
|
|
|
if (validateForm.form()) {
|
|
|
var projectId = '${project.id}';
|
|
|
var boolFlag = true;
|
|
@@ -113,7 +106,6 @@
|
|
|
} else {
|
|
|
if (boolFlag) {
|
|
|
var gistdata = $("#file_attachment tr").length;
|
|
|
- console.log('说明扫描件数量:' + gistdata)
|
|
|
if (gistdata === 0) {
|
|
|
top.layer.msg("请上传说明扫描件!", {icon: 0});
|
|
|
return false;
|
|
@@ -215,9 +207,9 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- $("#attachment_btn").click(function () {
|
|
|
+ /*$("#attachment_btn").click(function () {
|
|
|
$("#attachment_file").click();
|
|
|
- });
|
|
|
+ });*/
|
|
|
$(".tabMove").mouseover(function () {
|
|
|
//tips层-下
|
|
|
var td = $(this)
|
|
@@ -228,7 +220,7 @@
|
|
|
})
|
|
|
});
|
|
|
|
|
|
- function insertTitle(tValue) {
|
|
|
+ /*function insertTitle(tValue) {
|
|
|
var list = "${materialDefectRecord.workAttachments}";
|
|
|
var size = (list.split('url')).length - 1;
|
|
|
var files = $("#attachment_file")[0].files;
|
|
@@ -236,16 +228,15 @@
|
|
|
var file = files[i];
|
|
|
var attachmentId = "";
|
|
|
var attachmentFlag = "99";
|
|
|
- console.log(file);
|
|
|
var timestamp = new Date().getTime();
|
|
|
|
|
|
var storeAs = "projectRecords";
|
|
|
- var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;/*将这段字符串存到数据库即可*/
|
|
|
+ var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;/!*将这段字符串存到数据库即可*!/
|
|
|
var divId = "_attachment";
|
|
|
$("#addFile" + divId).show();
|
|
|
multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -364,229 +355,23 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<input id="zuZhiList" name="zuZhiList" htmlEscape="false" readonly="true" style="display: none"/>
|
|
|
- <div class="form-group layui-row">
|
|
|
- <div class="form-group-label"><h2><span class="require-item">*</span>说明扫描件</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="listAttachment" class="table table-bordered table-condensed details">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <%-- <th>序号</th>--%>
|
|
|
- <th>文件预览</th>
|
|
|
- <th>上传人</th>
|
|
|
- <th>上传时间</th>
|
|
|
- <th width="200px">操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="file_attachment">
|
|
|
- <c:forEach items="${materialDefectRecord.workAttachments}" var="workClientAttachment"
|
|
|
- varStatus="status">
|
|
|
- <tr>
|
|
|
-
|
|
|
- <%-- <td>${status.index + 1}</td>--%>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${materialDefectRecord.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>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)"
|
|
|
- onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}">
|
|
|
- </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>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${materialDefectRecord.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>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
- <td><a class="attention-info"
|
|
|
- href="javascript:void(0)"
|
|
|
- onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${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: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}">
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <td><a href="javascript:void(0)"
|
|
|
- onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a>
|
|
|
- </td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
- <td><a class="attention-info"
|
|
|
- href="javascript:void(0)"
|
|
|
- onclick="openPreview('${workClientAttachment.url}',3)">${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>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </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 class="op-td">
|
|
|
- <div class="op-btn-box">
|
|
|
- <%--附件下载删除--%>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${materialDefectRecord.uploadMode == 2}">
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <a href="${workClientAttachment.temporaryUrl}" target="_blank"
|
|
|
- class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <a href="${workClientAttachment.temporaryUrl}"
|
|
|
- class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <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> 下载</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> 收藏</a>
|
|
|
- </c:if>
|
|
|
- <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
- <a href="javascript:void(0)"
|
|
|
- onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')"
|
|
|
- class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
|
|
|
- </c:if>
|
|
|
-
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </c:forEach>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
|
|
|
+ <!-- attachmentFlag="6" 附件标识 -->
|
|
|
+ <!-- storeAs="wrkReimbursement" 存储路径标识 -->
|
|
|
+ <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
|
|
|
+ <table:attachmentManager
|
|
|
+ title="说明扫描件"
|
|
|
+ addBtnText="添加附件"
|
|
|
+ baseId="attachment"
|
|
|
+ attachments="${materialDefectRecord.workAttachments}"
|
|
|
+ fileHandlerFuncName="insertTitle"
|
|
|
+ attachmentFlag="99"
|
|
|
+ storeAs="projectRecords"
|
|
|
+ />
|
|
|
+
|
|
|
|
|
|
</form:form>
|
|
|
</div>
|
|
@@ -806,7 +591,6 @@
|
|
|
var id = $(prefix + "_id").val();
|
|
|
var currentUser = '${fns:getUser().id}';
|
|
|
var contentId = '${projectcontentinfo.projectContentData.id}';
|
|
|
- console.log(contentId);
|
|
|
var condition = "${flag}";
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
@@ -838,7 +622,6 @@
|
|
|
var id = $(prefix + "_id").val();
|
|
|
var currentUser = '${fns:getUser().id}';
|
|
|
var contentId = '${projectcontentinfo.projectContentData.id}';
|
|
|
- console.log(contentId);
|
|
|
var condition = "${flag}";
|
|
|
$.ajax({
|
|
|
type: "post",
|