Browse Source

多看版时切换频率必填检验/看板展示table增加边框线,行高计算微调/看板设置支持updatePart

zhuth 8 years ago
parent
commit
e6de68249a

+ 0 - 2
kanban-console/src/main/webapp/resources/app/view/boardmodel/modeleditpanel.js

@@ -245,8 +245,6 @@ Ext.define('erp.view.boardmodel.modeleditpanel',{
 		if(extraParams){
 		if(extraParams){
 			Ext.apply(json,extraParams);
 			Ext.apply(json,extraParams);
 		}
 		}
-		json.name = modelName;
-		json.panelCode = panelCode;
 		Ext.Ajax.request({
 		Ext.Ajax.request({
         	url:'kanban/'+type,
         	url:'kanban/'+type,
         	method:'POST',
         	method:'POST',

+ 0 - 1
kanban-console/src/main/webapp/resources/app/view/boardmodel/modeltree.js

@@ -8,7 +8,6 @@ Ext.define('erp.view.boardmodel.modeltree',{
 	title: panelName + '  >>  ' + modelName,
 	title: panelName + '  >>  ' + modelName,
 	collapsible:true,
 	collapsible:true,
 	columnLines: true,
 	columnLines: true,
-	// plugins:[Ext.create('erp.view.plugin.tplgridcontextmenu')],
 	store: Ext.create('Ext.data.JsonStore',{
 	store: Ext.create('Ext.data.JsonStore',{
 		fields: ['code', 'name', 'optionalValues'],
 		fields: ['code', 'name', 'optionalValues'],
 		data: []
 		data: []

+ 13 - 4
kanban-console/src/main/webapp/resources/app/view/desktop/BoardManageRightPanel.js

@@ -66,9 +66,18 @@ Ext.define('erp.view.desktop.BoardManageRightPanel',{
 						data.set = function(key, value) {
 						data.set = function(key, value) {
 							this[key] = value;
 							this[key] = value;
 						}
 						}
-						// delete data.content;
-						// delete data.title;
-						grid.saveModel(data);
+						delete data.content;
+						delete data.title;
+						var record = {
+							code: data.code,
+							panelCode: data.panelCode,
+							description: data.description,
+							enabled: data.enabled,
+							name: data.name,
+							get: data.get,
+							set: data.set
+						}
+						grid.saveModel(record);
 					}
 					}
 				}, '-', {
 				}, '-', {
 					iconCls: 'edit',
 					iconCls: 'edit',
@@ -166,7 +175,7 @@ Ext.define('erp.view.desktop.BoardManageRightPanel',{
 			},
 			},
 			saveModel: function(record) {
 			saveModel: function(record) {
 				var grid = this;
 				var grid = this;
-				var type = record.get('code') ? 'updatePart' : 'save'
+				var type = record.get('code') ? 'updatePart' : 'savePart'
 				Ext.Ajax.request({
 				Ext.Ajax.request({
 					url:'kanban/' + type,
 					url:'kanban/' + type,
 					method:'POST',
 					method:'POST',

+ 28 - 9
kanban-console/src/main/webapp/resources/app/view/desktop/BoardParamWindow.js

@@ -22,8 +22,6 @@ Ext.define('erp.view.desktop.BoardParamWindow',{
 			items:[{
 			items:[{
 				xtype:'fieldset',
 				xtype:'fieldset',
 				title:'参数设置',
 				title:'参数设置',
-				// items:items,
-				// hidden:items.length>0?false:true
 			},{
 			},{
 				xtype:'fieldset',
 				xtype:'fieldset',
 				title:'运行设置',
 				title:'运行设置',
@@ -47,7 +45,6 @@ Ext.define('erp.view.desktop.BoardParamWindow',{
 					fieldLabel:'切换频率(秒/次)',
 					fieldLabel:'切换频率(秒/次)',
 					minValue:3,
 					minValue:3,
 					value:'30',
 					value:'30',
-					// allowBlank:templateCode.length>0?false:true,//如果有多个模板,则切换频率是必填项
 					minValue:1
 					minValue:1
 				}]
 				}]
 			}],
 			}],
@@ -154,6 +151,7 @@ Ext.define('erp.view.desktop.BoardParamWindow',{
 			var formpanel = Ext.getCmp('paramForm');
 			var formpanel = Ext.getCmp('paramForm');
 			if(formpanel.isValid()) {
 			if(formpanel.isValid()) {
 				me.savePanelInstance();
 				me.savePanelInstance();
+				me.setFullScreen();
 			}else {
 			}else {
 				Ext.Msg.alert('警告', '有必填项未填!');
 				Ext.Msg.alert('警告', '有必填项未填!');
 			}
 			}
@@ -269,6 +267,8 @@ Ext.define('erp.view.desktop.BoardParamWindow',{
 		})
 		})
 		return {
 		return {
 			code: me.resData.code,
 			code: me.resData.code,
+			panelCode: me.resData.panelCode,
+			userCode: me.resData.userCode,
 			panelVersion: me.resData.panelVersion,
 			panelVersion: me.resData.panelVersion,
 			userPanelRelationCode: me.resData.userPanelRelationCode,
 			userPanelRelationCode: me.resData.userPanelRelationCode,
 			parameters: Ext.encode(parameters),
 			parameters: Ext.encode(parameters),
@@ -278,23 +278,42 @@ Ext.define('erp.view.desktop.BoardParamWindow',{
 		}
 		}
 	},
 	},
     checkFrequency:function(){
     checkFrequency:function(){
-    	var me = this;
+		var me = this;
     	var refreshFreq = Ext.getCmp('refreshFrequency').value;
     	var refreshFreq = Ext.getCmp('refreshFrequency').value;
     	var switchFreq = Ext.getCmp('switchFrequency').value;
     	var switchFreq = Ext.getCmp('switchFrequency').value;
     	if(switchFreq){
     	if(switchFreq){
-    		if(refreshFreq>=switchFreq){
-    			Ext.Msg.alert('警告','刷新频率必须小于切换频率!');
+			if(refreshFreq>=switchFreq){
+				Ext.Msg.alert('警告','刷新频率必须小于切换频率!');
     			return false;
     			return false;
     		}
     		}
-    	}
+		}else {
+			var modelGrid = Ext.getCmp('modelGrid');
+			// 看板数量为2个以上时切换频率不可为空
+			if(modelGrid.getSelectedModels().length >= 2) {
+				Ext.Msg.alert('警告','切换频率不可为空');
+    			return false;
+			}
+		}
     	return true;
     	return true;
     },
     },
     viewBoard:function(){
     viewBoard:function(){
-    	var me = this;
+		var me = this;
     	Ext.getCmp('template').close();
     	Ext.getCmp('template').close();
     	Ext.create('erp.view.desktop.BoardWindow',{
     	Ext.create('erp.view.desktop.BoardWindow',{
     		instanceCode:me.resData.code,
     		instanceCode:me.resData.code,
     		html:'<iframe src="boardshow?code=' + me.resData.code + '" width="100%" height="100%" style="border:none"></iframe>'
     		html:'<iframe src="boardshow?code=' + me.resData.code + '" width="100%" height="100%" style="border:none"></iframe>'
-    	}).show();
+		}).show();
+	},
+	setFullScreen: function () {
+		var element = document.documentElement;
+		if (element.requestFullscreen) {
+			element.requestFullscreen();
+		} else if (element.mozRequestFullScreen) {
+			element.mozRequestFullScreen();
+		} else if (element.webkitRequestFullscreen) {
+			element.webkitRequestFullscreen();
+		} else if (element.msRequestFullscreen) {
+			element.msRequestFullscreen();
+		}
 	}
 	}
 }); 
 }); 

+ 0 - 4
kanban-console/src/main/webapp/resources/app/view/desktop/BoardWindow.js

@@ -15,9 +15,6 @@ Ext.define('erp.view.desktop.BoardWindow',{
 	id:'win',
 	id:'win',
 	fullscreen:false,
 	fullscreen:false,
 	listeners:{
 	listeners:{
-		afterrender:function(win){
-			win.setFullScreen();
-		},
 		resize:function( win, width, height, eOpts ){
 		resize:function( win, width, height, eOpts ){
 			Ext.Array.each(win.dockedItems.items,function(item){
 			Ext.Array.each(win.dockedItems.items,function(item){
 				if(window.innerHeight == screen.height){
 				if(window.innerHeight == screen.height){
@@ -42,7 +39,6 @@ Ext.define('erp.view.desktop.BoardWindow',{
 		}
 		}
 	}],
 	}],
 	setFullScreen:function(){
 	setFullScreen:function(){
-    	var me = this;
 		var element = document.documentElement;
 		var element = document.documentElement;
         if (element.requestFullscreen) {
         if (element.requestFullscreen) {
           element.requestFullscreen();
           element.requestFullscreen();

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

@@ -194,11 +194,14 @@ body,
   white-space: nowrap;
   white-space: nowrap;
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   overflow: hidden;
   overflow: hidden;
+  border: 1px solid white;
+  box-sizing: border-box;
 }
 }
 .fade-enter {
 .fade-enter {
   animation-duration: .5s;
   animation-duration: .5s;
   animation-fill-mode: both;
   animation-fill-mode: both;
   opacity: .7;
   opacity: .7;
+  border: none;
   animation-timing-function: linear;
   animation-timing-function: linear;
   animation-play-state: paused;
   animation-play-state: paused;
 }
 }
@@ -206,6 +209,7 @@ body,
   animation-duration: .5s;
   animation-duration: .5s;
   animation-fill-mode: both;
   animation-fill-mode: both;
   opacity: .7;
   opacity: .7;
+  border: none;
   animation-timing-function: linear;
   animation-timing-function: linear;
   animation-play-state: paused;
   animation-play-state: paused;
 }
 }
@@ -214,6 +218,7 @@ body,
   animation-fill-mode: both;
   animation-fill-mode: both;
   transform: translateX(0px);
   transform: translateX(0px);
   opacity: .5;
   opacity: .5;
+  border: none;
   animation-timing-function: ease-out;
   animation-timing-function: ease-out;
   animation-play-state: paused;
   animation-play-state: paused;
 }
 }
@@ -232,17 +237,21 @@ body,
 @keyframes fadeIn {
 @keyframes fadeIn {
   0% {
   0% {
     opacity: .7;
     opacity: .7;
+    border: none;
   }
   }
   100% {
   100% {
     opacity: 1;
     opacity: 1;
+    border: none;
   }
   }
 }
 }
 @keyframes fadeOut {
 @keyframes fadeOut {
   0% {
   0% {
     opacity: .5;
     opacity: .5;
+    border: none;
   }
   }
   100% {
   100% {
     opacity: 0;
     opacity: 0;
+    border: none;
   }
   }
 }
 }
 .rc-title {
 .rc-title {

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