From 43e4843d564cdb0dad5891475da2af223422ed75 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Wed, 5 Dec 2018 17:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PlanProjectFlowServiceImpl.java | 3 -- .../dbmapper/PlanProjectFlowMapper.xml | 9 ++-- .../webapp/assets/lib/winui/css/winui.css | 19 -------- .../main/webapp/js/flowchart/makeflowchart.js | 33 +++++++------ .../webapp/tpl/flowchart/makeflowchart.html | 48 +------------------ 5 files changed, 23 insertions(+), 89 deletions(-) diff --git a/skyeye-service/src/main/java/com/skyeye/planproject/service/impl/PlanProjectFlowServiceImpl.java b/skyeye-service/src/main/java/com/skyeye/planproject/service/impl/PlanProjectFlowServiceImpl.java index 8ccd394a4..27291a7ba 100644 --- a/skyeye-service/src/main/java/com/skyeye/planproject/service/impl/PlanProjectFlowServiceImpl.java +++ b/skyeye-service/src/main/java/com/skyeye/planproject/service/impl/PlanProjectFlowServiceImpl.java @@ -31,13 +31,10 @@ public class PlanProjectFlowServiceImpl implements PlanProjectFlowService{ * @return void 返回类型 * @throws */ - @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void queryPlanProjectFlowList(InputObject inputObject, OutputObject outputObject) throws Exception { Map map = inputObject.getParams(); List> beans = planProjectFlowDao.queryPlanProjectFlowList(map); - JSONArray result = ToolUtil.listToTree(JSONArray.parseArray(JSON.toJSONString(beans)), "id", "parentId", "children"); - beans = (List)result; if(!beans.isEmpty()){ outputObject.setBeans(beans); outputObject.settotal(beans.size()); diff --git a/skyeye-web/src/main/resources/dbmapper/PlanProjectFlowMapper.xml b/skyeye-web/src/main/resources/dbmapper/PlanProjectFlowMapper.xml index 35777993e..1ab19243d 100644 --- a/skyeye-web/src/main/resources/dbmapper/PlanProjectFlowMapper.xml +++ b/skyeye-web/src/main/resources/dbmapper/PlanProjectFlowMapper.xml @@ -6,12 +6,9 @@ SELECT a.id, a.title title, - a.p_id parentId, - CASE a.type WHEN 1 THEN - (CASE a.p_id WHEN '0' THEN false ELSE true END) ELSE true END isLast, - '[{"type": "0", "isChecked": "0"}]' checkArr, - CASE a.p_id WHEN '0' THEN '1' ELSE '2' END level, - a.`type` + a.p_id pId, + a.`type`, + false lay_is_open FROM plan_project_flow a WHERE a.project_id = #{projectId} diff --git a/skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css b/skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css index ba177946c..f1ce38f40 100644 --- a/skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css +++ b/skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css @@ -4156,25 +4156,6 @@ body .layer-ext-winconfirm { /*** 折叠面板列表样式start ***/ -.skyeye-collapse{ - -} - -.skyeye-collapse .layui-colla-title{ - height: 30px !important; - line-height: 30px !important; -} - -.skyeye-collapse .layui-colla-content{ - padding: 10px 10px !important; -} - -.operater{ - float: right; - position: relative; - right: 10px; -} - /*** 折叠面板列表样式end ***/ .mar-left-5px{ diff --git a/skyeye-web/src/main/webapp/js/flowchart/makeflowchart.js b/skyeye-web/src/main/webapp/js/flowchart/makeflowchart.js index 03280fe52..a6b89e280 100644 --- a/skyeye-web/src/main/webapp/js/flowchart/makeflowchart.js +++ b/skyeye-web/src/main/webapp/js/flowchart/makeflowchart.js @@ -2,12 +2,13 @@ layui.config({ base: basePath, version: skyeyeVersion -}).define(['jquery', 'winui', 'g6'], function (exports) { +}).define(['treeGrid', 'jquery', 'winui', 'g6'], function (exports) { winui.renderColor(); var index = parent.layer.getFrameIndex(window.name); //获取窗口索引 - var $ = layui.$; + var $ = layui.$, + treeGrid = layui.treeGrid; var tip_index = 0;//鼠标移上去的tip的index @@ -16,18 +17,22 @@ layui.config({ // 关闭 G6 的体验改进计划打点请求 G6.track(false); -// showGrid({ -// id: "groupList", -// url: reqBasePath + 'planprojectflow001', -// params: {projectId: parent.rowId}, -// pagination: false, -// template: getFileContent('tpl/planprojectflow/planprojectfloweditTemplate.tpl'), -// ajaxSendLoadBefore: function(hdb){ -// }, -// ajaxSendAfter:function(json){ -// -// } -// }); + treeGrid.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + idField: 'id', + url: reqBasePath + 'planprojectflow001?projectId=' + parent.rowId, + cellMinWidth: 100, + treeId: 'id',//树形id字段名称 + treeUpId: 'pId',//树形父id字段名称 + treeShowName: 'title',//以树形式显示的字段 + cols: [[ + {field:'title', width:80, title: '名称'}, + {field:'type', width:60, title: '类型'}, + ]], + isPage:false + }); //左右框高度 /*$(".left-div").css({height:window.innerHeight}); diff --git a/skyeye-web/src/main/webapp/tpl/flowchart/makeflowchart.html b/skyeye-web/src/main/webapp/tpl/flowchart/makeflowchart.html index 4b562c537..11b2be739 100644 --- a/skyeye-web/src/main/webapp/tpl/flowchart/makeflowchart.html +++ b/skyeye-web/src/main/webapp/tpl/flowchart/makeflowchart.html @@ -11,53 +11,7 @@
- -
-
-

文豪

-
-
- - - -
-
-
-
-
-

唐代

-
-
-
-

杜甫

-
伟大的诗人
-
-
-

李白

-
-

据说是韩国人

-
-
-
-

王勃

-
-

千古绝唱《滕王阁序》

-
-
-
-
-
-
-
-
-
- +
-- GitLab