From 7eb0e3cf71e6bf712da3ed282504a5ecf5173c0c Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Wed, 14 Apr 2021 14:26:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=BA=93=E6=96=B0=E5=A2=9Ewe?= =?UTF-8?q?b=E9=A1=B5=E9=9D=A2=E6=A0=91=E5=BD=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/indexlib/IndexLibController.java | 10 +++++ .../pojo/dtos/indexlib/IndexLibDTO.java | 43 ++++++++++++++++--- .../dtos/indextemplate/IndexTemplateDTO.java | 2 - .../service/indexlib/IIndexLibService.java | 17 ++++++++ .../indexlib/impl/IndexLibServiceImpl.java | 19 ++++---- .../mapper/indexLib/indexLib-mapper.xml | 11 ++++- .../static/route/indexLib/update.html | 3 -- 7 files changed, 82 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/tenlion/twoduty/controller/api/indexlib/IndexLibController.java b/src/main/java/com/tenlion/twoduty/controller/api/indexlib/IndexLibController.java index 7253939..9249f80 100644 --- a/src/main/java/com/tenlion/twoduty/controller/api/indexlib/IndexLibController.java +++ b/src/main/java/com/tenlion/twoduty/controller/api/indexlib/IndexLibController.java @@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.tags.Param; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -38,6 +39,15 @@ public class IndexLibController extends DefaultBaseController { @Autowired private IIndexLibService indexLibService; + @ApiOperation(value = "web页面导航列表", notes = "web页面导航列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listwebtags") + public List listWebTags(){ + Map params = new HashMap(); + params.put("indexLibParentId","0"); + return indexLibService.listWebTags(params); + } + @ApiOperation(value = "web页面指标库树形列表", notes = "web页面指标库树形列表接口") diff --git a/src/main/java/com/tenlion/twoduty/pojo/dtos/indexlib/IndexLibDTO.java b/src/main/java/com/tenlion/twoduty/pojo/dtos/indexlib/IndexLibDTO.java index 5cc1793..508e78c 100644 --- a/src/main/java/com/tenlion/twoduty/pojo/dtos/indexlib/IndexLibDTO.java +++ b/src/main/java/com/tenlion/twoduty/pojo/dtos/indexlib/IndexLibDTO.java @@ -1,5 +1,6 @@ package com.tenlion.twoduty.pojo.dtos.indexlib; +import com.tenlion.twoduty.pojo.dtos.indextemplate.IndexTemplateDTO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -26,12 +27,19 @@ public class IndexLibDTO { private Integer indexLibSort; @ApiModelProperty(name = "indexLibRemark", value = "指标备注") private String indexLibRemark; + @ApiModelProperty(name = "indexLibState", value = "指标状态") + private Integer indexLibState; @ApiModelProperty(name = "indexTemplateId", value = "模板ID") private String indexTemplateId; @ApiModelProperty(name = "indexTemplateName", value = "模板名称") private String indexTemplateName; - @ApiModelProperty(name = "indexLibState", value = "指标状态") - private Integer indexLibState; + @ApiModelProperty(name = "indexTemplateSavePath", value = "保存路径") + private String indexTemplateSavePath; + @ApiModelProperty(name = "indexTemplateUploadPath", value = "修改路径") + private String indexTemplateUploadPath; + @ApiModelProperty(name = "indexTemplateListPath", value = "列表路径") + private String indexTemplateListPath; + @@ -83,6 +91,13 @@ public class IndexLibDTO { this.indexLibRemark = indexLibRemark; } + public Integer getIndexLibState() { + return indexLibState; + } + + public void setIndexLibState(Integer indexLibState) { + this.indexLibState = indexLibState; + } public String getIndexTemplateId() { return indexTemplateId; @@ -100,11 +115,27 @@ public class IndexLibDTO { this.indexTemplateName = indexTemplateName; } - public Integer getIndexLibState() { - return indexLibState; + public String getIndexTemplateSavePath() { + return indexTemplateSavePath; } - public void setIndexLibState(Integer indexLibState) { - this.indexLibState = indexLibState; + public void setIndexTemplateSavePath(String indexTemplateSavePath) { + this.indexTemplateSavePath = indexTemplateSavePath; + } + + public String getIndexTemplateUploadPath() { + return indexTemplateUploadPath; + } + + public void setIndexTemplateUploadPath(String indexTemplateUploadPath) { + this.indexTemplateUploadPath = indexTemplateUploadPath; + } + + public String getIndexTemplateListPath() { + return indexTemplateListPath; + } + + public void setIndexTemplateListPath(String indexTemplateListPath) { + this.indexTemplateListPath = indexTemplateListPath; } } diff --git a/src/main/java/com/tenlion/twoduty/pojo/dtos/indextemplate/IndexTemplateDTO.java b/src/main/java/com/tenlion/twoduty/pojo/dtos/indextemplate/IndexTemplateDTO.java index 49367c5..9fdd3af 100644 --- a/src/main/java/com/tenlion/twoduty/pojo/dtos/indextemplate/IndexTemplateDTO.java +++ b/src/main/java/com/tenlion/twoduty/pojo/dtos/indextemplate/IndexTemplateDTO.java @@ -21,14 +21,12 @@ public class IndexTemplateDTO { @ApiModelProperty(name = "indexTemplateName", value = "模板名称") private String indexTemplateName; - @ApiModelProperty(name = "indexTemplateSavePath", value = "保存路径") private String indexTemplateSavePath; @ApiModelProperty(name = "indexTemplateUploadPath", value = "修改路径") private String indexTemplateUploadPath; @ApiModelProperty(name = "indexTemplateListPath", value = "列表路径") private String indexTemplateListPath; - @ApiModelProperty(name = "indexTemplateRemark", value = "模板说明") private String indexTemplateRemark; @ApiModelProperty(name = "indexTemplateState", value = "模板状态") diff --git a/src/main/java/com/tenlion/twoduty/service/indexlib/IIndexLibService.java b/src/main/java/com/tenlion/twoduty/service/indexlib/IIndexLibService.java index 8507b6a..9667e4a 100644 --- a/src/main/java/com/tenlion/twoduty/service/indexlib/IIndexLibService.java +++ b/src/main/java/com/tenlion/twoduty/service/indexlib/IIndexLibService.java @@ -20,6 +20,16 @@ import java.util.Map; **/ public interface IIndexLibService { + + /** + * 获取web页面导航 + * @param params + * @return + * @throws Exception + */ + List listWebTags(Map params); + + /** * web页面树形列表(递归处理) * @param params @@ -29,6 +39,13 @@ public interface IIndexLibService { List listZTreeWeb(Map params); + + /** + * 树形列表 + * @param params + * @return + * @throws Exception + */ List listZTree(Map params); /** * 新增 diff --git a/src/main/java/com/tenlion/twoduty/service/indexlib/impl/IndexLibServiceImpl.java b/src/main/java/com/tenlion/twoduty/service/indexlib/impl/IndexLibServiceImpl.java index 6af318a..ff70900 100644 --- a/src/main/java/com/tenlion/twoduty/service/indexlib/impl/IndexLibServiceImpl.java +++ b/src/main/java/com/tenlion/twoduty/service/indexlib/impl/IndexLibServiceImpl.java @@ -1,6 +1,7 @@ package com.tenlion.twoduty.service.indexlib.impl; import com.tenlion.twoduty.pojo.dtos.indexlib.IndexLibZTreeDTO; +import com.tenlion.twoduty.service.indextemplate.IIndexTemplateService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; @@ -33,6 +34,13 @@ public class IndexLibServiceImpl extends DefaultBaseService implements IIndexLib @Autowired private IIndexLibDao indexLibDao; + @Autowired + private IIndexTemplateService indexTemplateService; + + public List listWebTags(Map params){ + return indexLibDao.listZTreeWeb(params); + } + public List listZTreeWeb(Map params){ List list = indexLibDao.listZTreeWeb(params); @@ -40,21 +48,10 @@ public class IndexLibServiceImpl extends DefaultBaseService implements IIndexLib Map data = new HashMap<>(); data.put("indexLibParentId",indexLibZTreeDTO.getId()); indexLibZTreeDTO.setChildrens(this.listZTreeWeb(data)); -// Map data = new HashMap<>(); -//// data.put("parentId",indexLibZTreeDTO.getId()); -//// Integer count = countByParentIdWeb(data); -//// if (count > 0){ -//// indexLibZTreeDTO.setIsParent(true); -//// }else{ -//// indexLibZTreeDTO.setIsParent(false); -//// } } return list; } - - - public List listZTree(Map params){ List list = indexLibDao.listZTree(params); for (IndexLibZTreeDTO indexLibZTreeDTO : list) { diff --git a/src/main/resources/mybatis/mapper/indexLib/indexLib-mapper.xml b/src/main/resources/mybatis/mapper/indexLib/indexLib-mapper.xml index 09976c4..1d0a788 100644 --- a/src/main/resources/mybatis/mapper/indexLib/indexLib-mapper.xml +++ b/src/main/resources/mybatis/mapper/indexLib/indexLib-mapper.xml @@ -12,6 +12,9 @@ + + + @@ -182,6 +185,9 @@ index_lib_parent_id = #{indexLibParentId}, + + index_template_id = #{indexTemplateId}, + index_lib_sort = #{indexLibSort}, @@ -281,7 +287,10 @@ t1.index_lib_remark, t1.index_lib_state, t1.index_template_id, - t3.index_template_name + t3.index_template_name, + t3.index_template_save_path, + t3.index_template_upload_path, + t3.index_template_list_path FROM duty_index_lib t1 LEFT JOIN duty_index_lib t2 diff --git a/src/main/resources/static/route/indexLib/update.html b/src/main/resources/static/route/indexLib/update.html index 808c28b..d88d6b4 100644 --- a/src/main/resources/static/route/indexLib/update.html +++ b/src/main/resources/static/route/indexLib/update.html @@ -97,14 +97,11 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var indexLibId = top.restAjax.params(window.location.href).indexLibId; - var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; - - function initIndexTemplateList(selectValue){ top.restAjax.get(top.restAjax.path("api/indextemplate/list",[]),{},null,function (code,data,args) { laytpl(document.getElementById('indexTemplateIdTemplate').innerHTML).render(data, function(html) {