lsiten 6 years ago
parent
commit
810bd810a0
3 changed files with 458 additions and 1 deletions
  1. 455 0
      src/data.json
  2. 2 1
      src/js/menus/underline/index.js
  3. 1 0
      src/js/yzPage.js

+ 455 - 0
src/data.json

@@ -16,6 +16,461 @@
 	"attention": null,
 	"examPageCnt": "0",
 	"pageQus": [{
+		"sort": "1",
+		"attribute": null,
+		"content": null,
+		"annexable": "1",
+		"group": "0",
+		"pIndex": "",
+		"pros": [{
+			"proId": "1596",
+			"score": 36.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "1",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2855",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "1",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2856",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "2",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2857",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "3",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2858",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "4",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2859",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "5",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2860",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "6",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1603",
+			"score": 42.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "2",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2881",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "7",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2882",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "8",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2883",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "9",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2884",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "10",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2885",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "11",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2886",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "12",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2887",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "13",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1609",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "3",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2912",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "14",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1610",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "4",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2913",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "15",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1611",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "5",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2914",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "16",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1613",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "6",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2920",
+				"score": 6.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "17",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1615",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "7",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2923",
+				"score": 6.0,
+				"quType": "多选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "18",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1616",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "8",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2924",
+				"score": 6.0,
+				"quType": "多选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "19",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1618",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "9",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2927",
+				"score": 6.0,
+				"quType": "多选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "20",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1620",
+			"score": 6.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "10",
+			"pnum": "",
+			"group": "0",
+			"qus": [{
+				"quId": "2929",
+				"score": 6.0,
+				"quType": "多选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "21",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1605",
+			"score": 15.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "11",
+			"pnum": "27",
+			"group": "0",
+			"qus": [{
+				"quId": "2892",
+				"score": 3.0,
+				"quType": "多选题",
+				"nums": "5",
+				"content": "",
+				"pnum": "(1)",
+				"visible": false,
+				"rIndex": "0"
+			}]
+		}, {
+			"proId": "1606",
+			"score": 14.0,
+			"pureObjective": "1",
+			"content": "",
+			"sort": "12",
+			"pnum": "28",
+			"group": "0",
+			"qus": [{
+				"quId": "2897",
+				"score": 2.0,
+				"quType": "单选题",
+				"nums": "3",
+				"content": "",
+				"pnum": "(1)",
+				"visible": false,
+				"rIndex": "0"
+			}, {
+				"quId": "2898",
+				"score": 2.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "(2)",
+				"visible": false,
+				"rIndex": "0"
+			}, {
+				"quId": "2902",
+				"score": 2.0,
+				"quType": "单选题",
+				"nums": "4",
+				"content": "",
+				"pnum": "(6)",
+				"visible": false,
+				"rIndex": "0"
+			}]
+		}]
+	}, {
+		"sort": "2",
+		"attribute": null,
+		"content": null,
+		"annexable": "1",
+		"group": "0",
+		"pIndex": "",
+		"pros": [{
+			"proId": "1363",
+			"score": 6.0,
+			"pureObjective": "2",
+			"content": "",
+			"sort": "11",
+			"pnum": "22",
+			"group": "0",
+			"qus": [{
+				"quId": "2319",
+				"score": 2.0,
+				"quType": "解答题",
+				"nums": null,
+				"content": "",
+				"pnum": "(1)",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2320",
+				"score": 4.0,
+				"quType": "填空题",
+				"nums": "2",
+				"content": "",
+				"pnum": "(2)",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}]
+	}, {
+		"sort": "3",
+		"attribute": null,
+		"content": null,
+		"annexable": "1",
+		"group": "0",
+		"pIndex": "",
+		"pros": [{
+			"proId": "1623",
+			"score": 9.0,
+			"pureObjective": "2",
+			"content": "",
+			"sort": "12",
+			"pnum": "23",
+			"group": "0",
+			"qus": [{
+				"quId": "2934",
+				"score": 2.0,
+				"quType": "解答题",
+				"nums": null,
+				"content": "",
+				"pnum": "(1)",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2935",
+				"score": 4.0,
+				"quType": "解答题",
+				"nums": null,
+				"content": "",
+				"pnum": "(2)",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2936",
+				"score": 3.0,
+				"quType": "解答题",
+				"nums": null,
+				"content": "",
+				"pnum": "(3)",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}]
+	}, {
+		"sort": "4",
+		"attribute": null,
+		"content": null,
+		"annexable": "1",
+		"group": "0",
+		"pIndex": "",
+		"pros": [{
+			"proId": "1625",
+			"score": 12.0,
+			"pureObjective": "2",
+			"content": "",
+			"sort": "13",
+			"pnum": "24",
+			"group": "0",
+			"qus": [{
+				"quId": "2939",
+				"score": 4.0,
+				"quType": "解答题",
+				"nums": null,
+				"content": "",
+				"pnum": "(1)",
+				"visible": true,
+				"rIndex": "0"
+			}, {
+				"quId": "2940",
+				"score": 8.0,
+				"quType": "解答题",
+				"nums": null,
+				"content": "",
+				"pnum": "(2)",
+				"visible": true,
+				"rIndex": "0"
+			}]
+		}]
+	}, {
 		"sort": "5",
 		"attribute": null,
 		"content": null,

+ 2 - 1
src/js/menus/underline/index.js

@@ -68,7 +68,8 @@ Underline.prototype = {
         let $text = $(
             text.startContainer.nodeType === 1 ? text.startContainer : text.startContainer.parentNode
         );
-        $text.css('text-decoration', 'underline');
+        let textUnderline = $text[0].getAttribute('text-decoration-line');
+        textUnderline && textUnderline === 'underline' && $text.css('text-decoration', 'underline');
         editor.selection.restoreSelection();
         // 执行 underline 命令
         // let result = editor.cmd.do('underline');

+ 1 - 0
src/js/yzPage.js

@@ -323,6 +323,7 @@ yzPage.prototype = {
               this._insertParagraph(item, $firsParagraph);
             } else {
               nextColumn.column.append($(item));
+              this.manage._updatePositionInfo(false, $(item));
             }
           })