Commit 2f2763ba by 宋祥

Merge branch 'dev-sx' of http://129.211.46.84:8800/platform/hg-smart into dev

parents d5093d8e 827df551
......@@ -96,10 +96,13 @@ public class ServiceHGWD001C extends ServiceBase {
*/
public EiInfo add(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo, EiConstant.resultBlock);
String fileId = MapUtils.getString(queryMap, HGWD001.FIELD_FILE_ID);
HGWD001C fWd001C = MapUtils.toDaoEPBase(inInfo, EiConstant.resultBlock, HGWD001C.class);
// 写入下载记录
this.saveData(inInfo, fileId);
this.saveData(inInfo, fWd001C.getFileId());
// 构建文件HTTP地址
String url = Iplat4jUtils.buildDocUrl(fWd001C.getDocId());
AssertUtils.isEmpty(url, "文件地址异常,请联系管理人员!");
inInfo.set("url", url);
inInfo.setMsg("操作成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
......@@ -120,7 +123,7 @@ public class ServiceHGWD001C extends ServiceBase {
String fileName = MapUtils.getString(queryMap, HGWD001.FIELD_FILE_NAME);
String zipName = fileName + "_" + DateUtils.shortDateTime();
List<String> docIds = ObjectUtils.listKey(inInfo, HGWD099.FIELD_DOC_ID);
inInfo.set("downloadUrl", Iplat4jUtils.compressFile(docIds, zipName));
inInfo.set("url", Iplat4jUtils.compressFile(docIds, zipName));
// 写入下载记录
this.saveData(inInfo, fileId);
} catch (Exception e) {
......
......@@ -481,14 +481,12 @@ $(function () {
e.preventDefault();
deleteFunc();
},
columns: [
{
columns: [{
field: "operator",
title: "操作",
readonly: true,
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '">下载</a>';
let template = "";
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="changeFile(\'' + item.docId + '\',\''+item.bizId+'\')" target="_blank">变更</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
......@@ -556,7 +554,7 @@ $(function () {
//确认发布
$("#confirmRelease").on("click", updateRelease);
// 批量下载
$("#BATCH_DOWNLOAD").on("click", batchDownload);
$("#BATCH_DOWNLOAD").on("click", download);
});
let query = function () {
......
......@@ -9,6 +9,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=userId%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/HG/WD/HGWD001C1.js"></script>
<EF:EFPage title="文档库">
......
......@@ -26,7 +26,7 @@ let singleDownload = function (row) {
EiCommunicator.send("HGWD001C", "add", inInfo, {
onSuccess(res) {
if (res.status > -1) {
window.open(CommonUtils.downloadFile(row['docId'], false), '_blank');
window.open(res.extAttr.url, '_blank');
} else {
message(res.msg);
}
......@@ -44,7 +44,7 @@ let batchDownload = function () {
JSUtils.submitGridsData("result", "HGWD001C", "batchDownload", false,
function (res) {
if (res.status > -1) {
window.open(res.extAttr.downloadUrl, '_blank');
window.open(res.extAttr.url, '_blank');
}
}
);
......
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