From b3917919b454401d42e09fb59b798eb506cf39b6 Mon Sep 17 00:00:00 2001 From: jiangzeyin Date: Sun, 30 Sep 2018 15:25:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=BC=80=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/jiangzeyin/controller/manage/BuildController.java | 2 +- src/main/resources/vm/common/head.vm | 4 ++-- src/main/resources/vm/manage/build.vm | 4 ++-- src/main/resources/vm/manage/projectInfo.vm | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/cn/jiangzeyin/controller/manage/BuildController.java b/src/main/java/cn/jiangzeyin/controller/manage/BuildController.java index bca5e69c9..5697b3b75 100644 --- a/src/main/java/cn/jiangzeyin/controller/manage/BuildController.java +++ b/src/main/java/cn/jiangzeyin/controller/manage/BuildController.java @@ -47,7 +47,7 @@ public class BuildController extends BaseController { } @RequestMapping(value = "build_download", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) - public String build_download(String id, String key) { + public String buildDownload(String id, String key) { try { ProjectInfoModel projectInfoModel = manageService.getProjectInfo(id); if (projectInfoModel == null) { diff --git a/src/main/resources/vm/common/head.vm b/src/main/resources/vm/common/head.vm index bd7d71a39..c391aef92 100644 --- a/src/main/resources/vm/common/head.vm +++ b/src/main/resources/vm/common/head.vm @@ -16,9 +16,9 @@ function tabChange(options) { var element = top.layui.element; - var lay_id = 'tab_' + options.id; + var lay_id = 'tab_' + options.id + options.title; // 如果存在选项卡,切换,否则创建 - if ($('[lay-id="tab_' + options.id + '"]').length > 0) { + if ($('[lay-id="' + lay_id + '"]', top.document).length > 0) { element.tabChange('mainTabs', lay_id); } else { // 创建 diff --git a/src/main/resources/vm/manage/build.vm b/src/main/resources/vm/manage/build.vm index 46742c5b8..73fa19258 100644 --- a/src/main/resources/vm/manage/build.vm +++ b/src/main/resources/vm/manage/build.vm @@ -30,10 +30,10 @@ $item.size 下载 + class="layui-btn layui-btn-warm layui-btn-sm">下载 diff --git a/src/main/resources/vm/manage/projectInfo.vm b/src/main/resources/vm/manage/projectInfo.vm index 7c8f79ee1..24972e624 100644 --- a/src/main/resources/vm/manage/projectInfo.vm +++ b/src/main/resources/vm/manage/projectInfo.vm @@ -62,7 +62,6 @@ } }); - // '刷新表格'点击事件 $('#refresh').on('click', function () { reloadTable(); @@ -180,7 +179,7 @@ area: ['80%', '90%'], content: 'build?id=' + data.id }); - }else if ('ram' === event) { + } else if ('ram' === event) { layer.open({ type: 2, title: '内存', @@ -195,7 +194,6 @@ function fileManage(data) { var lay_id = 'tab_file_' + data.id; var url = '/file/filemanage?id=' + data.id; - tabChange({ id: data.id, url: url,