Browse Source

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!1802
胡起 5 years ago
parent
commit
2f6b4dd55e

+ 12 - 18
o2server/x_console/src/main/java/com/x/server/console/NodeAgent.java

@@ -277,34 +277,28 @@ public class NodeAgent extends Thread {
 					randomFile.seek(lastTimeFileSize);
 					randomFile.seek(lastTimeFileSize);
 					int curReadSize = 0;
 					int curReadSize = 0;
 					String tmp = "";
 					String tmp = "";
-					String curTime = "";
+					String curTime = "2020-01-01 00:00:01.001";
 					while ((tmp = randomFile.readLine()) != null) {
 					while ((tmp = randomFile.readLine()) != null) {
 						byte[] bytes = tmp.getBytes("ISO8859-1");
 						byte[] bytes = tmp.getBytes("ISO8859-1");
 						curReadSize = curReadSize + bytes.length + 1;
 						curReadSize = curReadSize + bytes.length + 1;
 						String lineStr = new String(bytes);
 						String lineStr = new String(bytes);
 						String time = curTime;
 						String time = curTime;
 						String logLevel = "";
 						String logLevel = "";
-						if (lineStr.length() > 23) {
-							time = StringUtils.left(lineStr, 19);
-							if (DateTools.isDateTime(time)) {
-								time = StringUtils.left(lineStr, 23);
-								curTime = time;
-								if (lineStr.length() > 29) {
-									logLevel = StringUtils.right(StringUtils.left(lineStr, 29), 5).trim();
-								}
-							} else {
-								if (StringUtils.isEmpty(curTime)) {
-									time = "2020-01-01 00:00:01.001";
+						if (lineStr.length() > 0) {
+							if (lineStr.length() > 23) {
+								time = StringUtils.left(lineStr, 19);
+								if (DateTools.isDateTime(time)) {
+									time = StringUtils.left(lineStr, 23);
+									curTime = time;
+									if (lineStr.length() > 29) {
+										logLevel = StringUtils.right(StringUtils.left(lineStr, 29), 5).trim();
+									}
 								} else {
 								} else {
 									time = curTime;
 									time = curTime;
 								}
 								}
 							}
 							}
-						} else {
-							if (StringUtils.isEmpty(curTime)) {
-								continue;
-							} else {
-								time = curTime;
-							}
+						}else{
+							continue;
 						}
 						}
 						Map<String, String> map = new HashMap<>();
 						Map<String, String> map = new HashMap<>();
 						map.put("logTime", time + "#" + Config.node());
 						map.put("logTime", time + "#" + Config.node());

+ 16 - 0
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -2915,6 +2915,22 @@ debugger;
             var tmpNode = this.contentNode.getFirst().getFirst().clone(true);
             var tmpNode = this.contentNode.getFirst().getFirst().clone(true);
             var htmlNode = tmpNode.getLast();
             var htmlNode = tmpNode.getLast();
             htmlNode = this.removeDisplayNone(htmlNode);
             htmlNode = this.removeDisplayNone(htmlNode);
+            var nodes = tmpNode.querySelectorAll("[data-w-style]");
+            if (nodes.length){
+                for (var i=0; i<nodes.length; i++){
+                    var n = nodes.item(i);
+                    wStyle = n.dataset["wStyle"];
+                    var styles = wStyle.split(/\s*\;\s*/g);
+                    styles.each(function(style){
+                        if (style){
+                            try{
+                                s = style.split(/\s*\:\s*/g);
+                                n.setStyle(s[0], s[1]);
+                            }catch(e) {}
+                        }
+                    });
+                }
+            }
             var content = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"><head><meta charset=\"UTF-8\" /></head><body>"+tmpNode.get("html")+"</body></html>";
             var content = "<html xmlns:v=\"urn:schemas-microsoft-com:vml\"><head><meta charset=\"UTF-8\" /></head><body>"+tmpNode.get("html")+"</body></html>";
 
 
             var fileName = docNmae || this.json.toWordFilename || "$doc";
             var fileName = docNmae || this.json.toWordFilename || "$doc";