From 654c31db23a6ac6eb92d03ee70d97b3095ebeb25 Mon Sep 17 00:00:00 2001 From: zhuyinlong <1158756092@qq.com> Date: Wed, 8 Nov 2023 11:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/css/skins_new.css | 4 ++- admin/src/main/resources/static/css/style.css | 2 +- .../properties-default-controllers.js | 36 +++++++++++++++++-- .../editor-app/configuration/properties.js | 4 +++ .../properties/jsontext-popup.html | 21 +++++++++++ .../jsontext-property-write-template.html | 4 +++ .../static/designer/editor-app/css/style.css | 30 +++++++++++++--- .../designer/editor-app/editor-controller.js | 2 +- .../designer/editor-app/stencil-controller.js | 1 + .../designer/editor-app/stencilset.json | 2 +- .../main/resources/static/designer/index.html | 4 ++- .../resources/static/designer/scripts/app.js | 3 +- .../resources/templates/index-topnav.html | 7 ++-- 13 files changed, 104 insertions(+), 16 deletions(-) create mode 100644 admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html create mode 100644 admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-property-write-template.html diff --git a/admin/src/main/resources/static/css/skins_new.css b/admin/src/main/resources/static/css/skins_new.css index ecb73ef..7de6010 100644 --- a/admin/src/main/resources/static/css/skins_new.css +++ b/admin/src/main/resources/static/css/skins_new.css @@ -35,6 +35,7 @@ .skin-light .navbar .nav .open>a:focus, .skin-light .navbar .nav>.active>a { background: #0D6EFD; + box-shadow: 0px 0px 5px #333333; } .skin-light .navbar .sidebar-toggle { @@ -69,7 +70,8 @@ .skin-light .logo { background-color: #0D6EFD; /*color: #63686e;*/ - border-bottom: 0 solid transparent + border-bottom: 0 solid transparent; + line-height: 46px; } .skin-light li.user-header { diff --git a/admin/src/main/resources/static/css/style.css b/admin/src/main/resources/static/css/style.css index 7b62d84..e223f15 100644 --- a/admin/src/main/resources/static/css/style.css +++ b/admin/src/main/resources/static/css/style.css @@ -134,7 +134,7 @@ body.body-small .navbar-top-links li:last-child { .dropdown-menu>li>a { border-radius: 3px; - color: inherit; + color: #777; line-height: 25px; margin: 4px; text-align: left; diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js b/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js index c31fe4d..f1816a1 100644 --- a/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js @@ -99,17 +99,49 @@ angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$sco $scope.property.mode = 'read'; }, 0); }); - + // Open the dialog _internalCreateModal(opts, $modal, $scope); }]); - angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['$scope', function($scope) { $scope.save = function() { $scope.updatePropertyInModel($scope.property); $scope.close(); }; + + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]); + +/* + * Json Text controller + */ +angular.module('flowableModeler').controller('FlowableJsonTextPropertyCtrl', [ '$scope', '$modal', '$timeout', function($scope, $modal, $timeout) { + + var opts = { + template: 'editor-app/configuration/properties/jsontext-popup.html?version=' + Date.now(), + scope: $scope, + prefixEvent: 'jsonTextModalEvent' + }; + + $scope.$on('jsonTextModalEvent.hide.before', function() { + $timeout(function() { + $scope.property.mode = 'read'; + }, 0); + }); + + // Open the dialog + _internalCreateModal(opts, $modal, $scope); +}]); +angular.module('flowableModeler').controller('FlowableJsonTextPropertyPopupCtrl', ['$scope', function($scope) { + + $scope.save = function() { + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; $scope.close = function() { $scope.property.mode = 'read'; diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties.js b/admin/src/main/resources/static/designer/editor-app/configuration/properties.js index 8b7c264..513c51e 100644 --- a/admin/src/main/resources/static/designer/editor-app/configuration/properties.js +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties.js @@ -26,6 +26,10 @@ FLOWABLE.PROPERTY_CONFIG = "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", "writeModeTemplateUrl": "editor-app/configuration/properties/text-property-write-template.html" }, + "jsontext" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/jsontext-property-write-template.html" + }, "flowable-calledelementtype" : { "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", "writeModeTemplateUrl": "editor-app/configuration/properties/calledelementtype-property-write-template.html" diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html b/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html new file mode 100644 index 0000000..69151d7 --- /dev/null +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html @@ -0,0 +1,21 @@ + + \ No newline at end of file diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-property-write-template.html b/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-property-write-template.html new file mode 100644 index 0000000..7b44058 --- /dev/null +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-property-write-template.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/admin/src/main/resources/static/designer/editor-app/css/style.css b/admin/src/main/resources/static/designer/editor-app/css/style.css index 71754b3..e1d9d20 100644 --- a/admin/src/main/resources/static/designer/editor-app/css/style.css +++ b/admin/src/main/resources/static/designer/editor-app/css/style.css @@ -17,6 +17,24 @@ font-style: normal; } +/* 整个滚动条 */ +::-webkit-scrollbar { + /* 对应纵向滚动条的宽度 */ + width: 10px; + /* 对应横向滚动条的宽度 */ + height: 10px; +} +/* 滚动条上的滚动滑块 */ +::-webkit-scrollbar-thumb { + background-color: #49b1f5; + border-radius: 32px; +} +/* 滚动条轨道 */ +::-webkit-scrollbar-track { + background-color: #dbeffd; + border-radius: 32px; +} + .row-no-gutter .col-xs-9, .row-no-gutter .col-xs-12 { padding-left: 0px; @@ -188,7 +206,7 @@ -------------------------------- */ div.canvas-wrapper { overflow: auto; - background-color: #F8F8F8; + background-color: #FFFFFF; } .canvas_resize_indicator i { @@ -241,7 +259,7 @@ div.canvas-wrapper { div.propertySection { height: 250px; - background-color: #e8edf1; + background-color: #ffffff; margin-bottom: 0px; } @@ -250,6 +268,7 @@ div.propertySection { font-weight: bold; padding: 2px 0 2px 8px; border-bottom: 1px solid #a4acb9; + border-top: 1px solid #a4acb9; cursor: pointer; } @@ -337,7 +356,7 @@ div.propertySection { } .propertySection.collapsed .selected-item-title { - border: none; + /*border: none;*/ } .property-row input[type="text"] { @@ -1123,7 +1142,7 @@ hot-table .column-header.label { #paletteSectionFooter { height: 30px; text-align: center; - background-color: #e8edf1; + background-color: #ffffff; border-top: 1px solid #a4acb9; border-right: 1px solid #a4acb9; cursor: pointer; @@ -1137,7 +1156,7 @@ hot-table .column-header.label { #paletteSectionOpen { width: 30px; height: 30px; - background-color: #e8edf1; + background-color: #ffffff; text-align: center; bottom: 1px; position: fixed; @@ -1181,6 +1200,7 @@ hot-table .column-header.label { background: #f3f3f3; border-right: 1px solid #bbbbbb; overflow-y: auto; + display: none;/*隐藏左边树下部分*/ } .process-treeview-header { diff --git a/admin/src/main/resources/static/designer/editor-app/editor-controller.js b/admin/src/main/resources/static/designer/editor-app/editor-controller.js index a9c762a..83e2cf1 100644 --- a/admin/src/main/resources/static/designer/editor-app/editor-controller.js +++ b/admin/src/main/resources/static/designer/editor-app/editor-controller.js @@ -255,7 +255,7 @@ angular.module('flowableModeler') canvas.height(totalAvailable - propSectionHeight); var footerHeight = jQuery('#paletteSectionFooter').height(); var treeViewHeight = jQuery('#process-treeview-wrapper').height(); - jQuery('#paletteSection').height(totalAvailable - treeViewHeight - footerHeight-15); + jQuery('#paletteSection').height(totalAvailable/* - treeViewHeight*/ - footerHeight-15);//隐藏左边树下部分 // Update positions of the resize-markers, according to the canvas diff --git a/admin/src/main/resources/static/designer/editor-app/stencil-controller.js b/admin/src/main/resources/static/designer/editor-app/stencil-controller.js index bf16ded..2a1d662 100644 --- a/admin/src/main/resources/static/designer/editor-app/stencil-controller.js +++ b/admin/src/main/resources/static/designer/editor-app/stencil-controller.js @@ -626,6 +626,7 @@ angular.module('flowableModeler') return $scope.selectedItem.properties[index].templateUrl; }; $scope.getPropertyReadModeTemplateUrl = function (index) { + //debugger return $scope.selectedItem.properties[index].readModeTemplateUrl; }; $scope.getPropertyWriteModeTemplateUrl = function (index) { diff --git a/admin/src/main/resources/static/designer/editor-app/stencilset.json b/admin/src/main/resources/static/designer/editor-app/stencilset.json index 61fbf85..aaaa830 100644 --- a/admin/src/main/resources/static/designer/editor-app/stencilset.json +++ b/admin/src/main/resources/static/designer/editor-app/stencilset.json @@ -348,7 +348,7 @@ "name" : "jsontextpackage", "properties" : [ { "id" : "jsontext", - "type" : "Text", + "type" : "JsonText", "title" : "JSON报文", "value" : "", "description" : "JSON报文文本", diff --git a/admin/src/main/resources/static/designer/index.html b/admin/src/main/resources/static/designer/index.html index 1c5c1ab..527f373 100644 --- a/admin/src/main/resources/static/designer/index.html +++ b/admin/src/main/resources/static/designer/index.html @@ -41,7 +41,7 @@ - + @@ -274,5 +274,7 @@ + + diff --git a/admin/src/main/resources/static/designer/scripts/app.js b/admin/src/main/resources/static/designer/scripts/app.js index 8251364..30614b0 100644 --- a/admin/src/main/resources/static/designer/scripts/app.js +++ b/admin/src/main/resources/static/designer/scripts/app.js @@ -32,7 +32,8 @@ var flowableModeler = angular.module('flowableModeler', [ 'angularSpectrumColorpicker', 'duScroll', 'dndLists', - 'ngHandsontable' + 'ngHandsontable', + 'ng.jsoneditor' ]); var flowableModule = flowableModeler; diff --git a/admin/src/main/resources/templates/index-topnav.html b/admin/src/main/resources/templates/index-topnav.html index bc7c457..1fb1dc1 100644 --- a/admin/src/main/resources/templates/index-topnav.html +++ b/admin/src/main/resources/templates/index-topnav.html @@ -25,7 +25,8 @@