Commit 68bc28ec by 宋祥

1.文档库页面增加预览

parent 7d179daf
...@@ -480,18 +480,21 @@ $(function () { ...@@ -480,18 +480,21 @@ $(function () {
// 阻止默认请求,使用自定义删除 // 阻止默认请求,使用自定义删除
e.preventDefault(); e.preventDefault();
deleteFunc(); deleteFunc();
}, }, columns: [{
columns: [{ field: "operator",
field: "operator", title: "操作",
title: "操作", readonly: true,
readonly: true, template: function (model) {
template: function (item) { let param = "'" + model.docId + "', '" + model.docType + "', '" + model.docName + "'";
let template = ""; let template = "";
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="changeFile(\'' + item.docId + '\',\''+item.bizId+'\')" target="_blank">变更</a>'; + 'onclick="showPreview(' + param + ')" >预览</a>';
return template; template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
} + 'onclick="changeFile(\'' + model.docId + '\',\'' + model.bizId
}, { + '\')" target="_blank">变更</a>';
return template;
}
}, {
field: "docVersion", field: "docVersion",
template: function (model) { template: function (model) {
return "v" + model.docVersion; return "v" + model.docVersion;
...@@ -1024,6 +1027,18 @@ let preview = function () { ...@@ -1024,6 +1027,18 @@ let preview = function () {
window.open(url, '_blank'); window.open(url, '_blank');
} }
/**
* 预览
*
* @param docId
* @param docType
* @param docName
*/
let showPreview = function (docId, docType, docName) {
let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId;
addRecordWindow(fileId, docId, docType, docName);
}
let isProjectManager = function (parentId) { let isProjectManager = function (parentId) {
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("inqu_status-0-fileId", parentId); inEiInfo.set("inqu_status-0-fileId", parentId);
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=userId%>" /> <c:set var="loginName" value="<%=userId%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script> <script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/HG/WD/HGWD001C1.js"></script>
<EF:EFPage title="文档库"> <EF:EFPage title="文档库">
...@@ -212,3 +211,5 @@ ...@@ -212,3 +211,5 @@
<EF:EFButton ename="confirmRelease" cname="确认发布"/> <EF:EFButton ename="confirmRelease" cname="确认发布"/>
</div> </div>
</EF:EFWindow> </EF:EFWindow>
<jsp:include page="HGWD002A1.jsp" />
\ No newline at end of file
...@@ -154,8 +154,7 @@ $(function () { ...@@ -154,8 +154,7 @@ $(function () {
field: "operator", field: "operator",
title: "操作", title: "操作",
template: function (model) { template: function (model) {
let param = "'" + model.fileId + "', '" + model.docId + "', '" + model.docType let param = "'" + model.docId + "', '" + model.docType + "', '" + model.docName + "'";
+ "', '" + model.docName + "'";
let template = ''; let template = '';
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' // template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="showQueryRecord(' + param + ')" >预览记录</a>'; // + 'onclick="showQueryRecord(' + param + ')" >预览记录</a>';
...@@ -349,11 +348,11 @@ let preview = function () { ...@@ -349,11 +348,11 @@ let preview = function () {
/** /**
* 预览 * 预览
* *
* @param fileId
* @param docId * @param docId
* @param docType * @param docType
* @param docName * @param docName
*/ */
let showPreview = function (fileId, docId, docType, docName) { let showPreview = function (docId, docType, docName) {
let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId;
addRecordWindow(fileId, docId, docType, docName); addRecordWindow(fileId, docId, docType, docName);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment