xiao пре 2 месеци
родитељ
комит
dfa87f3c71
2 измењених фајлова са 35 додато и 6 уклоњено
  1. 1 2
      src/components/fuEditor/index1.vue
  2. 34 4
      src/views/anscard/Index.vue

+ 1 - 2
src/components/fuEditor/index1.vue

@@ -136,8 +136,7 @@ export default {
     resizeDown(e, index) {
       console.log(e.target)
       this.resizeBox = document.getElementsByClassName("obj");
-      this.boxHeight = parseFloat(this.resizeBox[index].style.height);
-      console.log(this.boxHeight,4444444444444)
+      this.boxHeight = parseFloat(this.resizeBox[index].style.height)*3.779528;
       this.resizeY = e.clientY;
 
       document.onmousemove = (e) => {

+ 34 - 4
src/views/anscard/Index.vue

@@ -267,13 +267,20 @@
 				<div class="page_cell" v-for='(page,idx) in paper_page' :style="{
 					top: 300*idx+'mm'
 				}">
-					<div v-for='item in paper.stdPoints' class="stdPoints" :style="{
+					<div v-if="idx%2==0" v-for='item in paper.stdPointsNew' class="stdPoints" :style="{
 						width: item.w+'mm',
 						height: item.h+'mm',
 						left: item.x+'mm',
 						top: item.y+'mm'
 					}">
 					</div>
+					<div v-if="idx%2==1" v-for='item in paper.stdPointsNew' class="stdPoints" :style="{
+						width: item.w+'mm',
+						height: item.h+'mm',
+						right: item.x+'mm',
+						top: item.y+'mm'
+					}">
+					</div>
 					<!-- //试卷内容 -->
 					
 					<div class="content_box" :style="{
@@ -670,6 +677,11 @@ export default {
 		  stdPoints:[
 			  {x:6,y:11,w:5,h:5},
 			  {x:6,y:281,w:5,h:5},
+		  ],
+		  stdPointsNew:[
+		  		{x:6,y:11,w:5,h:5},
+				{x:198,y:11,w:5,h:5},
+		  		{x:6,y:281,w:5,h:5},
 		  ]
 	  },
 	  dft:{
@@ -735,6 +747,24 @@ export default {
 			// console.log(list)
 		 },
 		 deep:true
+	 },
+	 "data.layout":{
+		handler(value){
+			if(value==1){
+				this.paper.stdPointsNew = [
+					{x:6,y:11,w:5,h:5},
+					{x:198,y:11,w:5,h:5},
+					{x:6,y:281,w:5,h:5}
+				]
+			}
+			if(value==2){
+				this.paper.stdPointsNew = [
+					{x:6,y:11,w:5,h:5},
+					{x:6,y:281,w:5,h:5}
+				]
+			}
+		},
+		deep:true
 	 }
   },
   methods: {
@@ -1019,8 +1049,8 @@ export default {
 					type:4
 				})
 				this.addForm.end=end
-				break;
-			case 5:
+				break; 
+			case 5://作文(语)
 				let words=Number(this.addForm.words)
 				var obj=this.paper.objAnsPoints,sub=this.paper.stdSujQnoPoints
 				var row=Math.ceil(words/20)+1,height=row*9.5+30
@@ -1116,7 +1146,7 @@ export default {
 				console.log(7777,this.paper)
 				this.addForm.end=this.addForm.start
 				break;
-			case 6:
+			case 6://作为(英)
 				let rows=Number(this.addForm.row)
 				var obj=this.paper.objAnsPoints,sub=this.paper.stdSujQnoPoints
 				var height=rows*10+10