zydx-plus 1.35.466 → 1.35.468
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1177,9 +1177,9 @@ export default {
|
|
|
1177
1177
|
})
|
|
1178
1178
|
})
|
|
1179
1179
|
},
|
|
1180
|
-
readPdf:debounce(()
|
|
1180
|
+
readPdf:debounce(function (){
|
|
1181
1181
|
let that = this
|
|
1182
|
-
|
|
1182
|
+
that.mouse()
|
|
1183
1183
|
pdfs.getPage(that.pageIndex).then(function (page) {
|
|
1184
1184
|
let canvas = document.getElementById(that.id)
|
|
1185
1185
|
let canvas2 = document.getElementById(`${that.id}2`)
|
|
@@ -1230,11 +1230,11 @@ export default {
|
|
|
1230
1230
|
}, 1000)
|
|
1231
1231
|
})
|
|
1232
1232
|
},200),
|
|
1233
|
-
readDoublePdf:debounce(()
|
|
1233
|
+
readDoublePdf:debounce(function (){
|
|
1234
1234
|
let that = this
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1235
|
+
that.mouse()
|
|
1236
|
+
that.$nextTick(()=>{
|
|
1237
|
+
that.pageInfoArr.forEach((item,index)=>{
|
|
1238
1238
|
pdfs.getPage(index+1).then(function (page) {
|
|
1239
1239
|
let canvas = document.getElementById(item.id)
|
|
1240
1240
|
let canvas2 = document.getElementById(`${item.id}2`)
|
|
@@ -279,8 +279,8 @@ export default {
|
|
|
279
279
|
this.midNum = 0
|
|
280
280
|
this.question.forEach(x => {
|
|
281
281
|
this.easyNum += x.easyScore === '' || x.easyScore === '-' ? 0 : Number(x.easyScore) * Number(x.easy)
|
|
282
|
-
this.hardNum += x.hardScore === ''|| x.hardScore === '-' ? 0 : Number(x.hardScore) * Number(x.hard)
|
|
283
|
-
this.midNum += x.midScore === ''|| x.midScore === '-' ? 0 : Number(x.midScore) * Number(x.mid)
|
|
282
|
+
this.hardNum += x.hardScore === '' || x.hardScore === '-' ? 0 : Number(x.hardScore) * Number(x.hard)
|
|
283
|
+
this.midNum += x.midScore === '' || x.midScore === '-' ? 0 : Number(x.midScore) * Number(x.mid)
|
|
284
284
|
})
|
|
285
285
|
this.totalNum = this.easyNum + this.hardNum + this.midNum
|
|
286
286
|
},
|
|
@@ -343,6 +343,7 @@ export default {
|
|
|
343
343
|
.qu-input {
|
|
344
344
|
width: 60px;
|
|
345
345
|
display: inline-block;
|
|
346
|
+
padding-top: 2px;
|
|
346
347
|
overflow: hidden;
|
|
347
348
|
}
|
|
348
349
|
|
|
@@ -377,4 +378,14 @@ export default {
|
|
|
377
378
|
display: inline-block;
|
|
378
379
|
font-weight: bold;
|
|
379
380
|
}
|
|
381
|
+
|
|
382
|
+
table {
|
|
383
|
+
border-collapse: collapse !important;
|
|
384
|
+
border-spacing: 2px !important;
|
|
385
|
+
}
|
|
386
|
+
table tr,table tr th{
|
|
387
|
+
height: 30px;
|
|
388
|
+
box-sizing: border-box;
|
|
389
|
+
line-height: 1;
|
|
390
|
+
}
|
|
380
391
|
</style>
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
export default {
|
|
17
17
|
name: "zydx-variable-box",
|
|
18
18
|
props: {
|
|
19
|
-
isShowsRight:{
|
|
19
|
+
isShowsRight: {
|
|
20
20
|
type: Boolean,
|
|
21
21
|
default: true
|
|
22
22
|
},
|
|
23
|
-
isShowsLeft:{
|
|
23
|
+
isShowsLeft: {
|
|
24
24
|
type: Boolean,
|
|
25
25
|
default: true
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
watch: {
|
|
29
|
-
isShowsRight:{
|
|
29
|
+
isShowsRight: {
|
|
30
30
|
handler: function (v) {
|
|
31
31
|
setTimeout(() => {
|
|
32
|
-
if(this.isShowsRight) {
|
|
32
|
+
if (this.isShowsRight) {
|
|
33
33
|
this.handleResize()
|
|
34
34
|
} else {
|
|
35
35
|
this.$refs.leftRef.style.width = '100%'
|
|
36
36
|
}
|
|
37
|
-
}
|
|
37
|
+
}, 200)
|
|
38
38
|
},
|
|
39
39
|
immediate: true,
|
|
40
40
|
deep: true
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
} else {
|
|
48
48
|
this.$refs.rightRef.style.width = '100%'
|
|
49
49
|
}
|
|
50
|
-
},
|
|
50
|
+
}, 200)
|
|
51
51
|
},
|
|
52
52
|
immediate: true,
|
|
53
53
|
deep: true
|
|
@@ -65,32 +65,36 @@ export default {
|
|
|
65
65
|
leftDom = this.$refs.leftRef,
|
|
66
66
|
resizeDom = this.$refs.resizeRef,
|
|
67
67
|
rightDom = this.$refs.rightRef;
|
|
68
|
-
resizeDom
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
if (resizeDom) {
|
|
69
|
+
leftDom.style.width = '50%'
|
|
70
|
+
rightDom.style.width = '50%'
|
|
71
|
+
resizeDom.onmousedown = e => {
|
|
72
|
+
const startX = e.clientX; // 记录坐标起始位置
|
|
73
|
+
leftDom.left = leftDom.offsetWidth; // 左边元素起始宽度
|
|
74
|
+
document.onmousemove = e => {
|
|
75
|
+
const endX = e.clientX; // 鼠标拖动的终止位置
|
|
76
|
+
let moveLen = leftDom.left + (endX - startX); // 移动的距离 = endX - startX,左边区域最后的宽度 = resizeDom.left + 移动的距离
|
|
77
|
+
const maxWidth = boxDom.clientWidth - resizeDom.offsetWidth; // 左右两边区域的总宽度 = 外层容器宽度 - 中间区域拖拉框的宽度
|
|
78
|
+
// 限制左边区域的最小宽度为 leftMinWidth
|
|
79
|
+
if (moveLen < leftMinWidth) {
|
|
80
|
+
moveLen = leftMinWidth;
|
|
81
|
+
}
|
|
82
|
+
// 右边区域最小宽度为 rightMinWidth
|
|
83
|
+
if (moveLen > maxWidth - rightMinWidth) {
|
|
84
|
+
moveLen = maxWidth - rightMinWidth;
|
|
85
|
+
}
|
|
86
|
+
leftDom.style.width = (moveLen / maxWidth) * 100 + "%"; // 设置左边区域的宽度,通过换算为百分比的形式,实现窗体放大缩小自适应
|
|
87
|
+
rightDom.style.width = ((maxWidth - moveLen) / maxWidth) * 100 + "%"; // 右边区域 = 总大小 - 左边宽度 - 拖动条宽度
|
|
88
|
+
};
|
|
89
|
+
document.onmouseup = () => {
|
|
90
|
+
document.onmousemove = null;
|
|
91
|
+
document.onmouseup = null;
|
|
92
|
+
resizeDom.releaseCapture && resizeDom.releaseCapture(); // 鼠标捕获释放
|
|
93
|
+
};
|
|
94
|
+
resizeDom.setCapture && resizeDom.setCapture(); // 启用鼠标捕获
|
|
95
|
+
return false;
|
|
85
96
|
};
|
|
86
|
-
|
|
87
|
-
document.onmousemove = null;
|
|
88
|
-
document.onmouseup = null;
|
|
89
|
-
resizeDom.releaseCapture && resizeDom.releaseCapture(); // 鼠标捕获释放
|
|
90
|
-
};
|
|
91
|
-
resizeDom.setCapture && resizeDom.setCapture(); // 启用鼠标捕获
|
|
92
|
-
return false;
|
|
93
|
-
};
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
}
|
|
96
100
|
};
|
|
@@ -104,8 +108,7 @@ export default {
|
|
|
104
108
|
box-sizing: border-box;
|
|
105
109
|
}
|
|
106
110
|
.left {
|
|
107
|
-
width:
|
|
108
|
-
/*background-color: #f1eab3;*/
|
|
111
|
+
width: 50%;
|
|
109
112
|
}
|
|
110
113
|
.resize {
|
|
111
114
|
position: relative;
|
|
@@ -120,7 +123,6 @@ export default {
|
|
|
120
123
|
background-color: white;
|
|
121
124
|
}
|
|
122
125
|
.right {
|
|
123
|
-
width:
|
|
124
|
-
/* background-color: #b5ef8f;*/
|
|
126
|
+
width: 50%;
|
|
125
127
|
}
|
|
126
128
|
</style>
|