Browse Source

主题配置

zhuth 7 years ago
parent
commit
d803ea94ae

+ 3 - 3
kanban-console/src/main/java/com/uas/kanban/controller/PanelViewController.java

@@ -43,11 +43,11 @@ public class PanelViewController extends BaseController<PanelView> {
     }
     
     /**
-     * 获取指定面板的多画面配置
+     * 根据指定的面板实例,解析生成json数据传给前台
      *
-     * @param panelCode 所指定的面板 code
+     * @param code 所指定的面板 code
      * @param request   request
-     * @return  多画面配置
+     * @return  解析生成的json
 	 * @throws OperationException 
      */
     @RequestMapping("/parseData/{code}")

+ 14 - 1
kanban-console/src/main/java/com/uas/kanban/model/Kanban.java

@@ -39,8 +39,13 @@ public class Kanban extends BaseEntity {
      */
     @FieldProperty(nullable = false)
     private String content;
-
+    
     /**
+     * 主题
+     */
+    private String theme;
+
+	/**
      * 是否启用,默认不启用
      */
     @FieldProperty(nullable = false)
@@ -84,6 +89,14 @@ public class Kanban extends BaseEntity {
         this.content = content;
     }
 
+    public String getTheme() {
+		return theme;
+	}
+
+	public void setTheme(String theme) {
+		this.theme = theme;
+	}
+    
     public Boolean getEnabled() {
         return enabled;
     }

+ 2 - 0
kanban-console/src/main/java/com/uas/kanban/service/impl/PanelViewServiceImpl.java

@@ -106,6 +106,7 @@ public class PanelViewServiceImpl extends BaseService<PanelView> implements Pane
         BaseDao.checkFields(kanban);
         String content = kanban.getContent();
         String title = kanban.getTitle();
+        String theme = kanban.getTheme();
         if (StringUtils.isEmpty(content)) {
             throw new IllegalStateException("看板内容为空:" + kanbanCode);
         }
@@ -141,6 +142,7 @@ public class PanelViewServiceImpl extends BaseService<PanelView> implements Pane
         List<JSONObject> data = new ArrayList<>();
         data.add(JSONObject.parseObject(kanbanContent));
         result.put("data", data);
+        result.put("theme", theme);
         return result;
 	}
 

+ 1 - 0
kanban-console/src/main/webapp/resources/app/controller/board.js

@@ -45,6 +45,7 @@ Ext.define('erp.controller.board', {
 								record.set = function(key, value) {
 									this[key] = value;
 								};
+								Ext.getCmp('theme').setValue(record.get('theme'));
 								view.fireEvent('repaintcomponent', view, record);
 							}catch(e) {
 								Ext.Msg.alert(e.name, e.message)

+ 25 - 1
kanban-console/src/main/webapp/resources/app/view/boardmodel/modeleditpanel.js

@@ -40,7 +40,28 @@ Ext.define('erp.view.boardmodel.modeleditpanel',{
 				id:'tplSetBtn',
 				handler:me.setModelConfig,
 				disabled:true
-			},{
+			}, {
+				xtype:'combobox',
+				fieldLabel:'主题',
+				id:'theme',
+            	name: 'theme',
+            	width: 120,
+            	labelWidth: 40,
+            	listConfig: {
+                    maxHeight: 120
+                },
+                store: Ext.create('Ext.data.Store', {
+                    fields: ['value', 'name'],
+                    data : [
+                    	{ name: '经典黑', value: 'dark' },
+                        { name: '科技蓝', value: 'blue' },
+                    ]
+                }),
+                queryMode: 'local',
+                displayField: 'name',
+                valueField: 'value',
+                emptyText: '经典黑',
+			}, {
 				xtype:'button',
 				text:'导出',
 				//disabled:true,
@@ -375,7 +396,10 @@ Ext.define('erp.view.boardmodel.modeleditpanel',{
 		var modelCode = record.get('code'),
 			content = record.get('content'),
 			title = record.get('title');
+			
+		var theme = Ext.getCmp('theme').getValue() || 'dark';
 		var json = {
+			theme: theme,
 			title: title,
         	content:content
 		};

+ 4 - 4
kanban-console/src/main/webapp/resources/app/view/core/trigger/LineAreaStyleTrigger.js

@@ -40,15 +40,15 @@ Ext.define('erp.view.core.trigger.LineAreaStyleTrigger', {
                     store: Ext.create('Ext.data.Store', {
                         fields: ['value', 'name'],
                         data : [
-                        	{ name: '无', value: 'null' },
-                            { name: '横向', value: 'horizontal' },
-                        	{ name: '纵向', value: 'vertical' }
+                        	{ name: '无渐变', value: 'null' },
+                            { name: '横向渐变', value: 'horizontal' },
+                        	{ name: '纵向渐变', value: 'vertical' }
                         ]
                     }),
                     queryMode: 'local',
                     displayField: 'name',
                     valueField: 'value',
-                    emptyText: '无',
+                    emptyText: '无渐变',
                     listeners: {
                     	change: function(f, v) {
                     		var form = f.up('form');

+ 15 - 15
kanban-console/src/main/webapp/resources/css/boardshow/main.css

@@ -47,7 +47,7 @@
   width: 100%;
 }
 .react-grid-layout {
-  background: #2f2e2c;
+  background: transparent;
 }
 .layoutJSON {
   background: #ddd;
@@ -64,14 +64,14 @@
   box-sizing: content-box;
 }
 .react-grid-item:not(.react-grid-placeholder) {
-  background: #2f2e2c;
+  background: transparent;
   border: 1px solid black;
 }
 .react-grid-item.resizing {
   opacity: 0.9;
 }
 .react-grid-item.static {
-  background: #2f2e2c;
+  background: transparent;
 }
 .react-grid-item .text {
   font-size: 24px;
@@ -101,16 +101,6 @@ li b {
   font-size: 19px;
   line-height: 14px;
 }
-html,
-body,
-#root {
-  height: 100%;
-  font-size: 16px;
-  overflow: hidden;
-}
-#root {
-  background-color: #2f2e2c;
-}
 .rc-form {
   height: 100%;
   overflow: hidden;
@@ -132,7 +122,7 @@ body,
   width: 100%;
   height: 100%;
   margin: 0 auto;
-  background: #2f2e2c;
+  background: transparent;
   color: #f5fdff;
   vertical-align: middle;
   text-align: center;
@@ -158,7 +148,7 @@ body,
   text-align: center;
 }
 .rc-table-thead {
-  background-color: #010101;
+  background-color: transparent;
 }
 .rc-table-header-item {
   font-weight: bold;
@@ -272,3 +262,13 @@ body,
   text-align: left;
   padding: 20px;
 }
+html,
+body,
+#root {
+  height: 100%;
+  font-size: 16px;
+  overflow: hidden;
+}
+#root {
+  background-color: #2f2e2c;
+}

File diff suppressed because it is too large
+ 0 - 0
kanban-console/src/main/webapp/resources/js/boardshow/main.bundle.js


File diff suppressed because it is too large
+ 0 - 0
kanban-console/src/main/webapp/resources/lib/boardshow/vendor.js


Some files were not shown because too many files changed in this diff