zydx-plus 1.32.287 → 1.32.289
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 +1 -1
- package/src/components/biz_header/src/button_name.js +9 -9
- package/src/components/choice/src/choice.vue +1 -1
- package/src/components/flip/src/flip.vue +8 -3
- package/src/components/preface/src/preface.vue +11 -5
- package/src/components/read/src/read.vue +47 -6
- package/src/components/seek/src/word.css +1 -1
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -2127,24 +2127,24 @@ let buttonNames = {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
},
|
|
2129
2129
|
resource_lesson020: {
|
|
2130
|
-
actionName: '
|
|
2130
|
+
actionName: '思维训练',
|
|
2131
2131
|
buttonList: {
|
|
2132
2132
|
0: {
|
|
2133
2133
|
headLevel: {
|
|
2134
2134
|
default: "demand",
|
|
2135
2135
|
demand: '训练要求',
|
|
2136
|
-
resourceIndex: '
|
|
2136
|
+
resourceIndex: '训练试题',
|
|
2137
2137
|
analyse: '训练分析',
|
|
2138
2138
|
countermeasure: '教学对策'
|
|
2139
2139
|
},
|
|
2140
2140
|
otherLevel: {
|
|
2141
2141
|
default: "singletonClass",
|
|
2142
|
-
singletonClass: this.getCurrentPrefix(item) + '
|
|
2143
|
-
allClass: this.getPrefix(item) + '
|
|
2142
|
+
singletonClass: this.getCurrentPrefix(item) + '试题',
|
|
2143
|
+
allClass: this.getPrefix(item) + '试题'
|
|
2144
2144
|
},
|
|
2145
2145
|
lowLevel: {
|
|
2146
2146
|
default: "singletonClass",
|
|
2147
|
-
singletonClass: this.getCurrentPrefix(item) + '
|
|
2147
|
+
singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
2148
2148
|
}
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
@@ -2155,10 +2155,10 @@ let buttonNames = {
|
|
|
2155
2155
|
0: {
|
|
2156
2156
|
headLevel: {
|
|
2157
2157
|
default: "demand",
|
|
2158
|
-
demand: '
|
|
2159
|
-
resourceIndex: '
|
|
2160
|
-
review: '
|
|
2161
|
-
analyse: '
|
|
2158
|
+
demand: '案析要求',
|
|
2159
|
+
resourceIndex: '案析题目',
|
|
2160
|
+
review: '案析点评',
|
|
2161
|
+
analyse: '案析分析',
|
|
2162
2162
|
countermeasure: '教学对策'
|
|
2163
2163
|
},
|
|
2164
2164
|
otherLevel: {
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
this.id = 'canvas-wrap' + Math.random().toString(36).substr(2)
|
|
147
147
|
// 在画板以外松开鼠标后冻结画笔
|
|
148
148
|
document.onmouseup = () => {
|
|
149
|
-
this.mouseUp()
|
|
149
|
+
if (this.isDrawing) this.mouseUp()
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
methods: {
|
|
@@ -185,9 +185,11 @@ export default {
|
|
|
185
185
|
drawStart (obj) {
|
|
186
186
|
obj.index = this.pageIndex
|
|
187
187
|
obj.start = 'start'
|
|
188
|
+
obj.scale = this.scales
|
|
188
189
|
this.startX = obj.x
|
|
189
190
|
this.startY = obj.y
|
|
190
191
|
this.ctx.beginPath()
|
|
192
|
+
this.ctx.strokeStyle = 'red'
|
|
191
193
|
this.ctx.moveTo(this.startX, this.startY)
|
|
192
194
|
this.ctx.lineTo(obj.x, obj.y)
|
|
193
195
|
this.ctx.lineCap = 'round'
|
|
@@ -200,7 +202,9 @@ export default {
|
|
|
200
202
|
drawEnd (obj) {
|
|
201
203
|
obj.index = this.pageIndex
|
|
202
204
|
obj.start = 'end'
|
|
205
|
+
obj.scale = this.scales
|
|
203
206
|
this.ctx.beginPath()
|
|
207
|
+
this.ctx.strokeStyle = 'red'
|
|
204
208
|
this.ctx.moveTo(this.startX, this.startY)
|
|
205
209
|
this.ctx.lineTo(obj.x, obj.y)
|
|
206
210
|
this.ctx.lineCap = 'round'
|
|
@@ -213,6 +217,7 @@ export default {
|
|
|
213
217
|
drawMove (obj) {
|
|
214
218
|
obj.index = this.pageIndex
|
|
215
219
|
obj.start = 'move'
|
|
220
|
+
obj.scale = this.scales
|
|
216
221
|
this.ctx.beginPath()
|
|
217
222
|
this.ctx.moveTo(this.startX, this.startY)
|
|
218
223
|
this.ctx.lineTo(obj.x, obj.y)
|
|
@@ -308,9 +313,9 @@ export default {
|
|
|
308
313
|
for(let i = 0; i < that.points.length; i++) {
|
|
309
314
|
if(that.points[i].index === that.pageIndex) {
|
|
310
315
|
that.ctx.beginPath()
|
|
311
|
-
that.ctx.moveTo(that.points[i].x,that.points[i].y)
|
|
316
|
+
that.ctx.moveTo(that.points[i].x*that.scales/that.points[i].scale,that.points[i].y*that.scales/that.points[i].scale)
|
|
312
317
|
if(that.points[i].start !== 'end') {
|
|
313
|
-
that.ctx.lineTo(that.points[i+1].x, that.points[i+1].y)
|
|
318
|
+
that.ctx.lineTo(that.points[i+1].x*that.scales/that.points[i].scale, that.points[i+1].y*that.scales/that.points[i].scale)
|
|
314
319
|
}
|
|
315
320
|
that.ctx.strokeStyle = 'red'
|
|
316
321
|
that.ctx.lineCap = 'round'
|
|
@@ -104,24 +104,30 @@ export default {
|
|
|
104
104
|
font-size: 14px;
|
|
105
105
|
color: #000;
|
|
106
106
|
font-weight: 700;
|
|
107
|
-
line-height:
|
|
107
|
+
line-height: 15px;
|
|
108
108
|
}
|
|
109
109
|
.preface-input{
|
|
110
110
|
width: 40px;
|
|
111
|
-
height:
|
|
111
|
+
height: 15px;
|
|
112
112
|
border: 1px solid rgba(204, 204, 204, 1);
|
|
113
113
|
display: inline-block;
|
|
114
114
|
overflow: hidden;
|
|
115
|
+
position: relative;
|
|
116
|
+
box-sizing: border-box;
|
|
115
117
|
}
|
|
116
118
|
.preface-input>input{
|
|
117
119
|
width: 55px;
|
|
118
|
-
height:
|
|
120
|
+
height: 13px;
|
|
119
121
|
border: none;
|
|
120
122
|
padding-left: 5px;
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 0;
|
|
125
|
+
left: 0;
|
|
126
|
+
font-size: 12px;
|
|
121
127
|
}
|
|
122
128
|
.preface-right{
|
|
123
129
|
display: flex;
|
|
124
|
-
line-height:
|
|
130
|
+
line-height: 15px;
|
|
125
131
|
}
|
|
126
132
|
.preface-list>label{
|
|
127
133
|
display: inline-block;
|
|
@@ -141,4 +147,4 @@ export default {
|
|
|
141
147
|
line-height: 30px;
|
|
142
148
|
padding: 0 10px 0 25px;
|
|
143
149
|
}
|
|
144
|
-
</style>
|
|
150
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="read">
|
|
3
3
|
<vue-office-docx v-if="fileType === 'docx'" :src="url" style="height: 100%;" @rendered="renderedHandler" />
|
|
4
|
-
<vue-office-excel v-if="fileType === 'xlsx'" :src="url" style="height: 100%;" @rendered="renderedHandler" />
|
|
4
|
+
<vue-office-excel v-if="fileType === 'xlsx' && xlsx" :src="url" style="height: 100%;" @rendered="renderedHandler" />
|
|
5
5
|
<div class="view-pdf" v-if="fileType === 'pdf'">
|
|
6
6
|
<div class="pageContainer" v-for="(item,index) in idArr">
|
|
7
7
|
<canvas :id="item"></canvas>
|
|
@@ -45,7 +45,13 @@ export default {
|
|
|
45
45
|
pdfPages: 0,
|
|
46
46
|
loading: false,
|
|
47
47
|
repeat: false,
|
|
48
|
-
idArr: []
|
|
48
|
+
idArr: [],
|
|
49
|
+
scales: 1.35,
|
|
50
|
+
timer: null,
|
|
51
|
+
pdf: null,
|
|
52
|
+
page: 0,
|
|
53
|
+
xlsx: true,
|
|
54
|
+
canvasArr: []
|
|
49
55
|
}
|
|
50
56
|
},
|
|
51
57
|
props: {
|
|
@@ -57,6 +63,10 @@ export default {
|
|
|
57
63
|
type: Number,
|
|
58
64
|
default: 1.35
|
|
59
65
|
},
|
|
66
|
+
scaleStyle: {
|
|
67
|
+
type: Object,
|
|
68
|
+
default: () => {}
|
|
69
|
+
},
|
|
60
70
|
},
|
|
61
71
|
watch: {
|
|
62
72
|
url: {
|
|
@@ -66,7 +76,36 @@ export default {
|
|
|
66
76
|
},
|
|
67
77
|
deep: true,
|
|
68
78
|
immediate: true
|
|
69
|
-
}
|
|
79
|
+
},
|
|
80
|
+
scaleStyle: {
|
|
81
|
+
handler: function (val) {
|
|
82
|
+
if(!val) return
|
|
83
|
+
if (this.repeat) return
|
|
84
|
+
if (this.timer) {
|
|
85
|
+
clearTimeout(this.timer)
|
|
86
|
+
}
|
|
87
|
+
this.timer = setTimeout(() => {
|
|
88
|
+
this.scales = val.width / 550
|
|
89
|
+
if(this.scales >= this.scale) {
|
|
90
|
+
this.scales = this.scale
|
|
91
|
+
}
|
|
92
|
+
if(this.fileType === 'pdf') {
|
|
93
|
+
if(val.width >= 800) return
|
|
94
|
+
this.canvasArr.map(item => {
|
|
95
|
+
item.style.width = val.width + 'px'
|
|
96
|
+
item.style.height = val.width*1.35 + 'px'
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
if(this.fileType === 'xlsx') {
|
|
100
|
+
this.xlsx = false
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
this.xlsx = true
|
|
103
|
+
},0)
|
|
104
|
+
}
|
|
105
|
+
}, 200)
|
|
106
|
+
},
|
|
107
|
+
deep: true
|
|
108
|
+
}
|
|
70
109
|
},
|
|
71
110
|
methods: {
|
|
72
111
|
repeatInit() {
|
|
@@ -99,9 +138,10 @@ export default {
|
|
|
99
138
|
cMapPacked: true
|
|
100
139
|
})
|
|
101
140
|
loadingTask.promise.then((pdf) => {
|
|
141
|
+
that.pdf = pdf
|
|
102
142
|
that.pdfPages = pdf.numPages // 获取pdf文件的总页数
|
|
103
|
-
|
|
104
|
-
that.getPDF(pdf,page)
|
|
143
|
+
that.page = pdf.numPages
|
|
144
|
+
that.getPDF(pdf,that.page)
|
|
105
145
|
})
|
|
106
146
|
},
|
|
107
147
|
getPDF(pdf,page) {
|
|
@@ -111,8 +151,9 @@ export default {
|
|
|
111
151
|
that.idArr.push(id)
|
|
112
152
|
pdf.getPage(that.idArr.length).then(function (page) {
|
|
113
153
|
let canvas = document.getElementById(id)
|
|
154
|
+
that.canvasArr.push(canvas)
|
|
114
155
|
let ctx = canvas.getContext('2d');
|
|
115
|
-
let viewport = page.getViewport({scale: that.
|
|
156
|
+
let viewport = page.getViewport({scale: that.scales})
|
|
116
157
|
canvas.width = viewport.width * 2
|
|
117
158
|
canvas.height = viewport.height * 2
|
|
118
159
|
canvas.style.width = viewport.width + 'px'
|