diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/gulpfile.js b/fast-develop-web/fast-develop-editor/src/fast-develop/gulpfile.js index 9b00b67bd10fc89903b3377c5b78bab683d0efa5..3b5416f16cf6176668fceb57dfa13942e8214e62 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/gulpfile.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/gulpfile.js @@ -172,7 +172,7 @@ function server(){ return [ createProxyMiddleware( '/builder',{ - target: 'http://localhost:8210' + target: 'http://11.2.251.48:8210' }), createProxyMiddleware( '/api', { diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/package.json b/fast-develop-web/fast-develop-editor/src/fast-develop/package.json index 7f9f6b7732d4d8216165ffbc0af0f8b7a622c410..10b2a9994887d1a965162e87a07b4122b19e0ac2 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/package.json +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/package.json @@ -12,7 +12,7 @@ "@babel/core": "^7.18.6", "@babel/preset-env": "^7.18.6", "@ztree/ztree_v3": "3.5.48", - "amis": "2.0.0", + "amis": "2.0.2", "browser-sync": "^2.27.10", "gulp": "^4.0.2", "gulp-babel": "^8.0.0", diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon.png b/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon.png index bcb959659e548874c8d17d1db369fb5c4b2bdd46..84771a5922cc1c614ba84c9393ae553d2a0b6bbc 100644 Binary files a/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon.png and b/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon.png differ diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon3.png b/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon3.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb959659e548874c8d17d1db369fb5c4b2bdd46 Binary files /dev/null and b/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon3.png differ diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/js/jquery.ztree.extend.js b/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/js/jquery.ztree.extend.js index 3b614b2d31aba3ae1b2ad4f39f58e530b0ab8fd9..7edb421434f406be708f82752146b0c9bee7dbef 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/js/jquery.ztree.extend.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/compoment/@ztree/ztree_v3/js/jquery.ztree.extend.js @@ -78,7 +78,8 @@ onKeyboard: false, theme: 'default', viewMode: 'body', - schemaType:'' + schemaType:'', + keepActiveParentNode:'ztree' }, data: { key: { @@ -845,6 +846,7 @@ return true; }, onClickNode: function (event, node) { + $('.currentNode').removeClass('currentNode') // 取消所有的激活的树节点 console.log(event.data.treeId,'treeId') var setting = data.getSetting(event.data.treeId), @@ -1981,7 +1983,7 @@ var setting = tools.clone(_setting); $.extend(true, setting, zSetting); // console.log(zSetting,'zSetting') - // console.log(setting,'setting') + console.log(setting,'setting') setting.treeId = obj.attr("id"); setting.treeObj = obj; setting.treeObj.empty(); @@ -2240,6 +2242,13 @@ } // 添加风格主题 $(obj).addClass(setting.view.theme) + $(document).click(function(e){ + if(!$(e.target).parents(setting.view.keepActiveParentNode).length){ + $('.curSelectedNode').addClass('currentNode') + var treeObj = $.fn.zTree.getZTreeObj(setting.treeId); + treeObj.cancelSelectedNode(); + } + }) return zTreeTools; } }; diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/css/style1.css b/fast-develop-web/fast-develop-editor/src/fast-develop/src/css/style1.css index 074238c9bc1d393b3508af553ebd71dd7931c1bf..baaba9778546a4bb195a443d59b7f4b97df9a711 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/css/style1.css +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/css/style1.css @@ -92,6 +92,7 @@ body, .layui-side-scroll{ width: 400px; overflow-x: auto; + height: 100%; } .layui-tab-title{ @@ -123,7 +124,7 @@ body, display: flex; flex-direction: column; width: 400px; - height: 100%; + height: calc(100vh - 43px); background-color: #fbfbfb; } .box1 { @@ -132,6 +133,7 @@ body, } .box2 { height: 40%; + min-height: 40%; /*height: 400px;*/ background-color: #F5F6F9; overflow: auto; @@ -151,7 +153,7 @@ body, .layui-elem-field legend { margin-left: 0px; - padding: 0 10px; + padding: 0 5px; font-size: 16px; font-weight: 400; } @@ -188,17 +190,12 @@ body, padding: 3px; } #header-left span.layui-breadcrumb a:hover{ - /* color: rgb(79,158,238) !important; */ - /* background-color: #43437f; */ background-color: rgb(245,246,249); } .content .header .header-right { width: 500px; - /*background-color: antiquewhite;*/ } -/* .content .header .header-right .layui-nav { - background-color: #43437f; -} */ + tr.pq-grid-oddRow { background: #f5f6f9; } @@ -229,9 +226,7 @@ tr.pq-row-delete td /*background: #ccc;*/ color: #ccc; } -.ui-widget-header.disabled .ui-icon{ - /*background-image: url(images/ui-icons_888888_256x240.png);*/ -} + .pq-ui-button { cursor: pointer; margin-left: 3px; @@ -292,7 +287,7 @@ div.pq-toolbar{ box-shadow:1px 2px 5px 0 rgba(0,0,0,.2); } .header-left #header-left { - margin-top: 12px; + margin-top: 9px; } .ui-widget.ui-widget-content { border: 1px solid #ede8e8; @@ -302,8 +297,8 @@ div.pq-toolbar{ } .layui-tab-title, .layui-tab-title li { - height: 32px; - line-height: 32px; + height: 30px; + line-height: 30px; } .layui-tab-title .layui-this:after{ height: 32px; @@ -357,7 +352,7 @@ div.pq-toolbar{ } #viewForm .cxd-Form-item--horizontal > .cxd-Form-label { text-align: left; - padding-left: 30px; + padding-left: 10px; } #viewForm .cxd-TextControl-input{ border-radius: 1px; @@ -367,7 +362,7 @@ div.pq-toolbar{ padding-left: 0px; } #viewForm .cxd-Form-item--horizontal { - margin-bottom: 0.5em; + margin-bottom: 0.3em; } #content .layui-tab-item .cxd-Page-body>iframe { height: calc(100vh - 120px)!important; @@ -415,9 +410,7 @@ div.pq-toolbar{ .amis-scope .layui-tab-content>.layui-tab-item.item-pgGride{ width: 100%; } -.amis-scope *{ - /* box-sizing: ; */ -} + /* 解决右侧内容区侧出现的滚动条 */ #content .pear-tab>div, #content .pear-tab>ul{ @@ -428,9 +421,16 @@ div.pq-toolbar{ #content .pear-tab>div .amis-scope{ box-sizing: border-box; } -.amis-scope a:hover { - background-color: transparent; +.amis-scope .layui-layer .layui-layer-ico{ + background: url(../compoment/layui/dist/css/modules/layer/default/icon.png); } +.amis-scope .layui-layer-setwin .layui-layer-close1 { + background-position: 1px -40px; +} +.amis-scope .cxd-Modal .cxd-Modal-header .cxd-Modal-close:hover{ + background-color: transparent !important; +} + .layui-layout-right .layui-nav-item a{ display: flex; align-items: center; @@ -441,18 +441,31 @@ div.pq-toolbar{ width: 30px; display: inline-block; background: url(../compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon.png) no-repeat scroll 0 0 transparent; - background-position: -112px -128px; + background-position: -335px -128px; margin-right: 3px; /* border-radius: 50%; */ } +.layui-layout-right .layui-nav-item a:hover .review { + background-position: -335px -128px; +} +.layui-layout-right .layui-nav-item a:hover{ + color: rgb(0,167,255); +} .layui-side .layui-tab-title{ - height: 78px; + height: 64px; padding-top: 0; background-color: #f3f4f6; } .layui-side .layui-tab-title li{ - padding-top: 10px; - height: 78px; + padding: 0; + border: 1px solid #e5e7eb; + margin-top: -1px; + margin-left: -1px; + padding-top: 4px; + height: 65px; +} +.layui-side .layui-tab-title li span{ + font-size: 13px; } .layui-side .layui-tab-title li{ /* display: flex; */ @@ -461,32 +474,46 @@ div.pq-toolbar{ .layui-side .layui-tab-title .layui-this:after { height: 77px; } - -.layui-side-scroll ul.layui-tab-title li span{ +.layui-side-scroll ul.layui-tab-title li { + color: #6b7280; + font-size: 14px; +} +.layui-side-scroll ul.layui-tab-title li i{ display: block; - height: 35px; + height: 30px; width: 30px; background: url(../compoment/@ztree/ztree_v3/css/zTreeStyle/img/icon.png) no-repeat scroll 0 0 transparent; - margin-left: 10px; - margin-bottom: 1px; + /* margin-left: 10px; */ +} +.layui-side-scroll ul.layui-tab-title li i.resource{ + background-position: -152px -127px; } -.layui-side-scroll ul.layui-tab-title li span.resource{ - background-position: -25px -125px; +.layui-side-scroll ul.layui-tab-title li i.workflow{ + background-position: -189px -127px; } -.layui-side-scroll ul.layui-tab-title li span.workflow{ - background-position: -67px -125px; +.layui-side-scroll ul.layui-tab-title li.layui-this i.resource{ + background-position: -230px -127px; +} +.layui-side-scroll ul.layui-tab-title li.layui-this i.workflow{ + background-position: -268px -127px; +} +.layui-side-scroll ul.layui-tab-title li span { + display: block; + width: 100px; + text-align: center; + text-align: -webkit-center; } .box1 { - height: 60%; + height: calc(60vh - 43px); overflow-y: hidden; } .box1 .layui-tab { height: calc(100% - 80px); } .box1 .layui-tab-content { - /* height: calc(100% - 80px); */ height: 100%; - background-color: #fff; + max-height: 100%; + /* background-color: #fff; */ } .box1 .layui-tab-content .layui-tab-item{ height: 100%; @@ -494,14 +521,67 @@ div.pq-toolbar{ .box1 ul.ztree { height: 100%; margin: 0px; + overflow-y: auto; } +.box1 ul.ztree>li { + /* max-height: 100%; */ + /* overflow-y: auto; */ +} .layui-tab-brief>.layui-tab-title .layui-this { - background: #fff; - color: #1296dc; + background: rgb(251,251,251); + color: #151a26; + border-bottom: none; + /* color: #1296dc; */ } .layui-tab-brief>.layui-tab-title .layui-this:after { border-bottom: none; } #content .layui-tab-brief .layui-tab-content>div { height: calc(100vh - 111px); +} +.amis-scope .cxd-Picker-input{ + text-align: left; +} +.amis-scope .cxd-Form-group--hor > * { + padding: 0; +} +.amis-scope .cxd-Grid-col--md2 .cxd-ButtonGroup > .cxd-Button{ + margin-right: 6px; +} +ul.ztree .currentNode{ + background-color: #e5e7eb; +} +.amis-scope .pear-tab-menu li { + height: 30px; +} +.amis-scope .pq-grid { + box-shadow: 0 0.0625rem 0.0625rem rgba(0, 0, 0, 0.05); +} +.box2 .content { + padding: 3px 15px 0 0; +} +#viewForm_container .layui-elem-field { + border: none; +} +#viewForm_container .layui-field-title{ + padding: 0 0 3px 5px; + margin: 0; +} +#viewForm_container .cxd-Form { + margin-left: 10px; + border-top: 1px solid #e5e7eb; + padding-top: 10px; +} +#viewForm_container .cxd-TextControl-input { + padding: 3px 5px; + border-radius: 4px; +} +#viewForm_container .cxd-Form-label { + font-size: 14px; + font-family: "Microsoft YaHei"; + font-weight: 700; + font-size: 88%; +} +.ui-state-highlight, .ui-widget-content .ui-state-highlight{ + color:#333; } \ No newline at end of file diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user.png b/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user.png index ad6c32d6ba58d3e22e4efd3344041f9a865c0d97..c60da676b2584a11fecb33a6cb72e9941bc2ca1a 100644 Binary files a/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user.png and b/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user.png differ diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user1.png b/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user1.png new file mode 100644 index 0000000000000000000000000000000000000000..ad6c32d6ba58d3e22e4efd3344041f9a865c0d97 Binary files /dev/null and b/fast-develop-web/fast-develop-editor/src/fast-develop/src/image/user1.png differ diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/editor.js b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/editor.js index 7453c1733772f65fb729f48757f9182f72a41e4f..6cd9d027bb63b9d006a4087e7f7be081ceb5227f 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/editor.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/editor.js @@ -49,7 +49,7 @@ layui.define(['element', 'edropdown', 'layer', 'util', 'form', 'fast_config', 'a } return ` -
  • ${settings.title}
  • +
  • ${settings.title}
  • `; } @@ -84,9 +84,9 @@ layui.define(['element', 'edropdown', 'layer', 'util', 'form', 'fast_config', 'a
    -
    +
    -
    +
    diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_content.js b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_content.js index 5c8f48ca94ed5b92f47e214a76a9d2e0cf9fdd03..b5d838ac110543c4a8571b793ff4b709817f9605 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_content.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_content.js @@ -93,7 +93,16 @@ layui.define(['element', 'api', 'amis', 'schema', 'listener', 'ztree', 'utils'], close: true, title: title, id: id - }) + } + // ,function(){ + // $('.amis-scope').each(function(index,item){ + // console.log(index) + // if(index !== 0){ + // $(item).removeClass('amis-scope') + // } + // }) + // } + ) sessionStorage.setItem( "content-pear-current-treeNode", JSON.stringify(data)); } else { $('#fast-body').show() diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js index c1434c25d10a6396bc973818183fa8870dd7a0d3..99bf5463271907df9c9377f04e3b7031382370d5 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js @@ -532,7 +532,8 @@ layui.define(['element', 'api', 'amis', 'schema', 'listener', 'api', 'jqgrid', ' view: { onKeyboard: true, showLine: false, - theme:'default' + theme:'default', + keepActiveParentNode:'.box1' }, check: { enable: true @@ -701,7 +702,7 @@ layui.define(['element', 'api', 'amis', 'schema', 'listener', 'api', 'jqgrid', ' } }) pearBody.click(function(id) { - console.log(id) + }) } else { $('#content').hide() diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/tab.js b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/tab.js index a2c64f074a07f8cf01dec193e438b19a000ddd99..879cb94363826ea85cfaa502cc25a1a0ed5e0180 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/tab.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/tab.js @@ -96,7 +96,7 @@ layui.define(['jquery', 'element','resource_content','utils','ztree'], function( shade: false, skin: 'pear-tab-menu', closeBtn: false, - area: [menuWidth + 'px', '150px'], + area: [menuWidth + 'px', '123px'], fixed: true, anim: false, isOutAnim: false, @@ -300,7 +300,7 @@ layui.define(['jquery', 'element','resource_content','utils','ztree'], function( } /** 添 加 唯 一 选 项 卡 */ - pearTab.prototype.addTabOnly = function(opt, time) { + pearTab.prototype.addTabOnly = function(opt, callback,time) { var title = ''; if (opt.close) { title += '' + opt.title + @@ -360,9 +360,11 @@ layui.define(['jquery', 'element','resource_content','utils','ztree'], function( sessionStorage.setItem(this.option.elem + "-pear-tab-data-current", opt.id); } } - console.log(this.option.elem, opt.id,'999999') element.tabChange(this.option.elem, opt.id); this.positionTab() + if(callback){ + callback() + } sessionStorage.setItem(this.option.elem + "-pear-tab-data-current", opt.id); } @@ -401,14 +403,12 @@ layui.define(['jquery', 'element','resource_content','utils','ztree'], function( //根据 elem id 来删除指定的 layui title li var tabTitle = $(".layui-tab[lay-filter='" + elem + "']").find(".layui-tab-title"); - console.log(id,'id') // 删除指定 id 的 title var removeTab = tabTitle.find("li[lay-id='" + id + "']"); var nextNode = removeTab.next("li"); if (!removeTab.hasClass("layui-this")) { removeTab.remove(); var tabContent = $(".layui-tab[lay-filter='" + elem + "']").find("div[id='treenode_" + id + "']").parent(); - console.log('treenode_'+id,'9999999') tabContent.remove(); tabData = JSON.parse(sessionStorage.getItem(elem + "-pear-tab-data")); @@ -629,7 +629,6 @@ layui.define(['jquery', 'element','resource_content','utils','ztree'], function( }) $("body .layui-tab[lay-filter='" + option.elem + "']").on("click", "#closeAll", function() { - console.log('向下箭头') var currentId = $(".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title .layui-this").attr("lay-id"); var tabtitle = $(".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title li"); $.each(tabtitle, function(i) { @@ -640,19 +639,8 @@ layui.define(['jquery', 'element','resource_content','utils','ztree'], function( }) $("body .layui-tab[lay-filter='" + option.elem + "']").on("click", "#refersh", function() { - console.log('向下箭头') var currentId = $(".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title .layui-this").attr("lay-id"); - console.log(currentId,'currentId') option.refersh(currentId) - // var treeNode = JSON.parse(sessionStorage.getItem("content-pear-current-treeNode")) - // var schemaType = JSON.parse(sessionStorage.getItem("content-schemaType")) - // resource_content.render({ - // elem:'#treenode_'+currentId, - // treeNode: treeNode, - // viewMode:'tabs', - // amisData: utils.getGlobalEnv(treeNode.data), - // schemaType:schemaType - // }) }) }