zydx-plus 1.35.525 → 1.35.527
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
|
@@ -297,7 +297,8 @@ export default defineComponent({
|
|
|
297
297
|
matrix,
|
|
298
298
|
} = this;
|
|
299
299
|
return (
|
|
300
|
-
<div class="table_wrapper" style={[getHeight, getWidth]}>
|
|
300
|
+
// <div class="table_wrapper" style={[getHeight, getWidth]}>
|
|
301
|
+
<div class="table_wrapper" style={[getWidth]}>
|
|
301
302
|
{draggable ? (
|
|
302
303
|
<div class="table_root" aria-label="draggbale-table">
|
|
303
304
|
<VueDraggableNext tag={"table"} border="0" cellpadding="0" cellspacing="0" animation={"200"} onEnd={onDragEnd}>
|
|
@@ -343,6 +344,7 @@ export default defineComponent({
|
|
|
343
344
|
opacity: 1;
|
|
344
345
|
overflow: scroll;
|
|
345
346
|
border-top: 1px solid #cccccc;
|
|
347
|
+
border-left: 1px solid #cccccc;
|
|
346
348
|
}
|
|
347
349
|
|
|
348
350
|
.table_wrapper::-webkit-scrollbar {
|
|
@@ -354,7 +356,6 @@ export default defineComponent({
|
|
|
354
356
|
table-layout: fixed;
|
|
355
357
|
display: table;
|
|
356
358
|
max-width: 100%;
|
|
357
|
-
border-left: 1px solid #cccccc;
|
|
358
359
|
margin: 0 auto;
|
|
359
360
|
border-spacing: 0;
|
|
360
361
|
}
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
<i v-if="closeShow" @click.stop="close"></i>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
<div :class="{'drag-cont2': fixedStart,'drag-conts': true}"
|
|
14
|
+
<div :id="`resizable${id}`" :class="{'drag-cont2': fixedStart,'drag-conts': true}"
|
|
15
15
|
@mousemove.stop="footMove" @mouseleave.stop="footMove">
|
|
16
16
|
<div class="drag-cont-slot">
|
|
17
17
|
<slot name="content"></slot>
|
|
18
18
|
</div>
|
|
19
|
-
<div v-show="!fixedStart&&!autoHeight"
|
|
19
|
+
<!-- <div v-show="!fixedStart&&!autoHeight">-->
|
|
20
20
|
<!-- <i :class="{'drag-down2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-down" v-if="dragStatus" @mousedown.stop="footDown($event,'d')" @mouseup.stop="footUp"></i>-->
|
|
21
|
-
<i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i
|
|
21
|
+
<!-- <i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i>-->
|
|
22
22
|
<!-- <i :class="{'drag-right2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-right" v-if="dragStatus" @mousedown.stop="footDown($event,'r')" @mouseup.stop="footUp"></i>-->
|
|
23
|
-
</div
|
|
23
|
+
<!-- </div>-->
|
|
24
24
|
</div>
|
|
25
25
|
<!-- <div class="down-text" v-if="dragStatus&&dragTextShow&&!fixedStart&&!autoHeight">-->
|
|
26
26
|
<!-- <div class="down-text-cont">-->
|
|
@@ -55,7 +55,9 @@ export default {
|
|
|
55
55
|
clientHeight: 0,
|
|
56
56
|
transAll: false,
|
|
57
57
|
fixedStart: false,
|
|
58
|
-
initWidth: 1280
|
|
58
|
+
initWidth: 1280,
|
|
59
|
+
draggableState: null,
|
|
60
|
+
draggableState2: null,
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
props: {
|
|
@@ -152,7 +154,6 @@ export default {
|
|
|
152
154
|
this.footDownOffset = val
|
|
153
155
|
if (this.isInitShowBottomRight) {
|
|
154
156
|
this.y = window.innerHeight - val
|
|
155
|
-
console.log('this.y', this.y)
|
|
156
157
|
}
|
|
157
158
|
},
|
|
158
159
|
immediate: true
|
|
@@ -160,6 +161,7 @@ export default {
|
|
|
160
161
|
fixed: {
|
|
161
162
|
handler: function (val) {
|
|
162
163
|
this.fixedStart = val
|
|
164
|
+
if(!this.fixedStart) return
|
|
163
165
|
this.init()
|
|
164
166
|
},
|
|
165
167
|
immediate: true,
|
|
@@ -219,6 +221,8 @@ export default {
|
|
|
219
221
|
methods: {
|
|
220
222
|
// 全屏
|
|
221
223
|
fullScreen() {
|
|
224
|
+
this.draggableState.draggable({enabled: false})
|
|
225
|
+
this.draggableState2.resizable({enabled: false})
|
|
222
226
|
const myElement = document.body;
|
|
223
227
|
if (myElement.requestFullscreen) {
|
|
224
228
|
myElement.requestFullscreen();
|
|
@@ -233,6 +237,8 @@ export default {
|
|
|
233
237
|
},
|
|
234
238
|
// 退出全屏
|
|
235
239
|
exitFullscreen() {
|
|
240
|
+
this.draggableState.draggable({enabled: true})
|
|
241
|
+
this.draggableState2.resizable({enabled: true})
|
|
236
242
|
if (document.exitFullscreen) {
|
|
237
243
|
document.exitFullscreen();
|
|
238
244
|
} else if (document.mozCancelFullScreen) {
|
|
@@ -285,11 +291,11 @@ export default {
|
|
|
285
291
|
this.y=isNaN(this.y)?100:this.y
|
|
286
292
|
}
|
|
287
293
|
setTimeout(() => {
|
|
288
|
-
interact(`#draggable${that.id}`)
|
|
294
|
+
this.draggableState = interact(`#draggable${that.id}`)
|
|
295
|
+
this.draggableState2 = interact(`#resizable${that.id}`)
|
|
296
|
+
this.draggableState.draggable({
|
|
297
|
+
enabled: true,
|
|
289
298
|
listeners: {
|
|
290
|
-
start (event) {
|
|
291
|
-
that.dragTap()
|
|
292
|
-
},
|
|
293
299
|
move (event) {
|
|
294
300
|
// 获取滚动距离
|
|
295
301
|
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
@@ -310,6 +316,22 @@ export default {
|
|
|
310
316
|
}
|
|
311
317
|
}
|
|
312
318
|
})
|
|
319
|
+
this.draggableState2.resizable({
|
|
320
|
+
edges: { top: false, left: false, bottom: true, right: true },
|
|
321
|
+
enabled: true,
|
|
322
|
+
listeners: {
|
|
323
|
+
move: function (event) {
|
|
324
|
+
that.footRightOffset = event.rect.width
|
|
325
|
+
that.footDownOffset = event.rect.height + (that.dragTextShow?60:30)
|
|
326
|
+
that.$emit('updateDrag', {
|
|
327
|
+
width: that.footRightOffset,
|
|
328
|
+
height: that.footDownOffset - (that.dragTextShow?60:30),
|
|
329
|
+
left: that.x,
|
|
330
|
+
top: that.y
|
|
331
|
+
})
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
})
|
|
313
335
|
},0)
|
|
314
336
|
},
|
|
315
337
|
getWH(v) {
|
|
@@ -370,8 +392,8 @@ export default {
|
|
|
370
392
|
setTimeout(() => {
|
|
371
393
|
this.x = 0;
|
|
372
394
|
this.y = 0;
|
|
373
|
-
this.footDownOffset = window.outerHeight;
|
|
374
|
-
this.footRightOffset = window.outerWidth;
|
|
395
|
+
this.footDownOffset = window.outerHeight + 20;
|
|
396
|
+
this.footRightOffset = window.outerWidth + 20;
|
|
375
397
|
},100)
|
|
376
398
|
}
|
|
377
399
|
this.$emit('updateDrag', {
|
|
@@ -406,6 +428,8 @@ export default {
|
|
|
406
428
|
width: 100%;
|
|
407
429
|
height: 100%;
|
|
408
430
|
overflow: auto;
|
|
431
|
+
position: relative;
|
|
432
|
+
z-index: -1;
|
|
409
433
|
}
|
|
410
434
|
|
|
411
435
|
.drag-cont-slot::-webkit-scrollbar {
|
|
@@ -12,16 +12,15 @@
|
|
|
12
12
|
<i v-if="closeShow" @click.stop="close"></i>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
|
-
<div :class="{'drag-cont2': fixedStart,'drag-conts': true}"
|
|
16
|
-
@mousemove.stop="footMove" @mouseleave.stop="footMove">
|
|
15
|
+
<div :id="`resizable${id}`" :class="{'drag-cont2': fixedStart,'drag-conts': true}">
|
|
17
16
|
<div class="drag-cont-slot">
|
|
18
17
|
<slot name="content"></slot>
|
|
19
18
|
</div>
|
|
20
|
-
<div v-show="!fixedStart&&!autoHeight"
|
|
21
|
-
|
|
22
|
-
<i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i
|
|
23
|
-
|
|
24
|
-
</div
|
|
19
|
+
<!-- <div v-show="!fixedStart&&!autoHeight">-->
|
|
20
|
+
<!-- <i :class="{'drag-down2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-down" v-if="dragStatus" @mousedown.stop="footDown($event,'d')" @mouseup.stop="footUp"></i>-->
|
|
21
|
+
<!-- <i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i>-->
|
|
22
|
+
<!-- <i :class="{'drag-right2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-right" v-if="dragStatus" @mousedown.stop="footDown($event,'r')" @mouseup.stop="footUp"></i>-->
|
|
23
|
+
<!-- </div>-->
|
|
25
24
|
</div>
|
|
26
25
|
<!-- <div class="down-text" v-if="dragStatus&&dragTextShow&&!fixedStart&&!autoHeight">-->
|
|
27
26
|
<!-- <div class="down-text-cont">-->
|
|
@@ -56,7 +55,9 @@ export default {
|
|
|
56
55
|
clientHeight: 0,
|
|
57
56
|
transAll: false,
|
|
58
57
|
fixedStart: false,
|
|
59
|
-
initWidth: 1280
|
|
58
|
+
initWidth: 1280,
|
|
59
|
+
draggableState: null,
|
|
60
|
+
draggableState2: null,
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
props: {
|
|
@@ -164,6 +165,7 @@ export default {
|
|
|
164
165
|
fixed: {
|
|
165
166
|
handler: function (val) {
|
|
166
167
|
this.fixedStart = val
|
|
168
|
+
if(!this.fixedStart) return
|
|
167
169
|
this.init()
|
|
168
170
|
},
|
|
169
171
|
immediate: true,
|
|
@@ -227,20 +229,24 @@ export default {
|
|
|
227
229
|
methods: {
|
|
228
230
|
// 全屏
|
|
229
231
|
fullScreen() {
|
|
232
|
+
this.draggableState.draggable({enabled: false})
|
|
233
|
+
this.draggableState2.resizable({enabled: false})
|
|
230
234
|
const myElement = document.body;
|
|
231
235
|
if (myElement.requestFullscreen) {
|
|
232
236
|
myElement.requestFullscreen();
|
|
233
|
-
} else if (myElement.mozRequestFullScreen) {
|
|
237
|
+
} else if (myElement.mozRequestFullScreen) {
|
|
234
238
|
myElement.mozRequestFullScreen();
|
|
235
|
-
} else if (myElement.webkitRequestFullscreen) {
|
|
239
|
+
} else if (myElement.webkitRequestFullscreen) {
|
|
236
240
|
myElement.webkitRequestFullscreen();
|
|
237
|
-
} else if (myElement.msRequestFullscreen) {
|
|
241
|
+
} else if (myElement.msRequestFullscreen) {
|
|
238
242
|
myElement.msRequestFullscreen();
|
|
239
243
|
}
|
|
240
244
|
this.state = true
|
|
241
245
|
},
|
|
242
246
|
// 退出全屏
|
|
243
247
|
exitFullscreen() {
|
|
248
|
+
this.draggableState.draggable({enabled: true})
|
|
249
|
+
this.draggableState2.resizable({enabled: true})
|
|
244
250
|
if (document.exitFullscreen) {
|
|
245
251
|
document.exitFullscreen();
|
|
246
252
|
} else if (document.mozCancelFullScreen) {
|
|
@@ -294,7 +300,10 @@ export default {
|
|
|
294
300
|
this.y=isNaN(this.y)?100:this.y
|
|
295
301
|
}
|
|
296
302
|
setTimeout(() => {
|
|
297
|
-
interact(`#draggable${that.id}`)
|
|
303
|
+
this.draggableState = interact(`#draggable${that.id}`)
|
|
304
|
+
this.draggableState2 = interact(`#resizable${that.id}`)
|
|
305
|
+
this.draggableState.draggable({
|
|
306
|
+
enabled: true,
|
|
298
307
|
listeners: {
|
|
299
308
|
move (event) {
|
|
300
309
|
// 获取滚动距离
|
|
@@ -316,6 +325,22 @@ export default {
|
|
|
316
325
|
}
|
|
317
326
|
}
|
|
318
327
|
})
|
|
328
|
+
this.draggableState2.resizable({
|
|
329
|
+
edges: { top: false, left: false, bottom: true, right: true },
|
|
330
|
+
enabled: true,
|
|
331
|
+
listeners: {
|
|
332
|
+
move: function (event) {
|
|
333
|
+
that.footRightOffset = event.rect.width
|
|
334
|
+
that.footDownOffset = event.rect.height + (that.dragTextShow?60:30)
|
|
335
|
+
that.$emit('updateDrag', {
|
|
336
|
+
width: that.footRightOffset,
|
|
337
|
+
height: that.footDownOffset - (that.dragTextShow?60:30),
|
|
338
|
+
left: that.x,
|
|
339
|
+
top: that.y
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
})
|
|
319
344
|
},0)
|
|
320
345
|
},
|
|
321
346
|
getWH(v) {
|
|
@@ -326,43 +351,6 @@ export default {
|
|
|
326
351
|
this.transAll = false
|
|
327
352
|
},300)
|
|
328
353
|
},
|
|
329
|
-
footDown(event, v) {
|
|
330
|
-
event.preventDefault()
|
|
331
|
-
this.direction = v
|
|
332
|
-
this.footIsMove = true;
|
|
333
|
-
this.dragTap()
|
|
334
|
-
},
|
|
335
|
-
footMove(event) {
|
|
336
|
-
if (this.state) return;
|
|
337
|
-
if (!this.footIsMove) return;
|
|
338
|
-
if (this.direction === 'd') {
|
|
339
|
-
this.footDownOffset = event.clientY - this.y;
|
|
340
|
-
} else if (this.direction === 'in') {
|
|
341
|
-
this.footDownOffset = event.clientY - this.y;
|
|
342
|
-
this.footRightOffset = event.clientX - this.x;
|
|
343
|
-
} else if (this.direction === 'r') {
|
|
344
|
-
this.footRightOffset = event.clientX - this.x;
|
|
345
|
-
}
|
|
346
|
-
if(this.footRightOffset < this.minWidth) {
|
|
347
|
-
this.footRightOffset = this.minWidth
|
|
348
|
-
}
|
|
349
|
-
if(this.footDownOffset < this.minHeight) {
|
|
350
|
-
this.footDownOffset = this.minHeight
|
|
351
|
-
}
|
|
352
|
-
this.$emit('updateDrag', {
|
|
353
|
-
width: this.footRightOffset,
|
|
354
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
355
|
-
left: this.x,
|
|
356
|
-
top: this.y
|
|
357
|
-
})
|
|
358
|
-
},
|
|
359
|
-
footUp() {
|
|
360
|
-
this.$emit('dragMouseup', {
|
|
361
|
-
width: this.footRightOffset,
|
|
362
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30)
|
|
363
|
-
})
|
|
364
|
-
this.footIsMove = false;
|
|
365
|
-
},
|
|
366
354
|
enlarge() {
|
|
367
355
|
let clientWidth = window.innerWidth
|
|
368
356
|
if(this.state) {
|
|
@@ -376,8 +364,8 @@ export default {
|
|
|
376
364
|
setTimeout(() => {
|
|
377
365
|
this.x = 0;
|
|
378
366
|
this.y = 0;
|
|
379
|
-
this.footDownOffset = window.outerHeight;
|
|
380
|
-
this.footRightOffset = window.outerWidth;
|
|
367
|
+
this.footDownOffset = window.outerHeight + 20;
|
|
368
|
+
this.footRightOffset = window.outerWidth + 20;
|
|
381
369
|
},100)
|
|
382
370
|
}
|
|
383
371
|
this.$emit('updateDrag', {
|
|
@@ -412,6 +400,8 @@ export default {
|
|
|
412
400
|
width: 100%;
|
|
413
401
|
height: 100%;
|
|
414
402
|
overflow: auto;
|
|
403
|
+
position: relative;
|
|
404
|
+
z-index: -1;
|
|
415
405
|
}
|
|
416
406
|
|
|
417
407
|
.drag-cont-slot::-webkit-scrollbar {
|
|
@@ -404,8 +404,10 @@
|
|
|
404
404
|
</div>
|
|
405
405
|
<div class="tip-box" style="min-width:600px;max-height: 900px;">
|
|
406
406
|
<div class="tip-title" v-html="`${item.fileName}`"></div>
|
|
407
|
-
<div class="tip-boxContent" style="height: 700px
|
|
408
|
-
<
|
|
407
|
+
<div class="tip-boxContent" :style="{height: item.isPPT?'590px':'700px'}">
|
|
408
|
+
<iframe v-if="item.isPPT" :src="item.url" frameborder="no" height="590"
|
|
409
|
+
scrolling="no" width="100%"></iframe>
|
|
410
|
+
<zydx-read v-else :url="item.url" style="height: 100%"></zydx-read>
|
|
409
411
|
</div>
|
|
410
412
|
</div>
|
|
411
413
|
<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top: 10px;">
|
|
@@ -2614,33 +2616,57 @@ export default {
|
|
|
2614
2616
|
const r = await this.signIdData('reference')
|
|
2615
2617
|
const html = butJson(this.editor, this.menusText)[v].html
|
|
2616
2618
|
// if (r === -1) {
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2619
|
+
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
2620
|
+
const id = new Date().getTime()
|
|
2621
|
+
if (t === -1) this.editor.chain().focus().insertContentAt(to, html).run()
|
|
2622
|
+
const num = this.upSort(this.editor, 'enclosure')
|
|
2623
|
+
const html2 = `<p contenteditable="false" data-signId="u-${id}" data-url="${url}" class="indent mu"><span>${num.num}. ${name}</span></p>`
|
|
2624
|
+
this.editor.chain().focus().insertContentAt(num.len, html2).run()
|
|
2625
|
+
const json = this.editor.getJSON()
|
|
2626
|
+
for (let i = 0; i < json.content.length; i++) {
|
|
2627
|
+
const item = json.content[i]
|
|
2628
|
+
if (item.attrs.signId === 'enclosure' && item.content[0].text === '附件列表:') {
|
|
2629
|
+
item.attrs.titleId = this.checkbox ? 'indent' : null
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
this.editor.chain().setContent(<p></p>).run()
|
|
2633
|
+
this.editor.chain().setContent(json).run()
|
|
2634
|
+
this.isShowUpload = false
|
|
2635
|
+
const ext = file.name.split('.').pop().toLowerCase();
|
|
2636
|
+
let pptArr = ['pptx', 'ppt', 'pptm', 'potx', 'potm', 'pot', 'ppsx', 'ppsm', 'ppam', 'ppa', 'odp']
|
|
2637
|
+
let dataInfo = {}
|
|
2638
|
+
if (pptArr.includes(ext)) {
|
|
2639
|
+
let officeInfo = this.getOffice
|
|
2640
|
+
let annex = res.data.annex
|
|
2641
|
+
officeInfo.meta.wordPath = annex.showPath
|
|
2642
|
+
officeInfo.meta.filePath = annex.filePath
|
|
2643
|
+
officeInfo.meta.fileName = annex.fileName
|
|
2644
|
+
officeInfo.meta.useType = 'view'
|
|
2645
|
+
officeInfo.meta.height = '590'
|
|
2646
|
+
let officeRes = await this.getOfficePath(officeInfo)
|
|
2647
|
+
dataInfo = {
|
|
2620
2648
|
isShow: false,
|
|
2621
2649
|
edit: false,
|
|
2622
2650
|
id: `${id}`,
|
|
2623
2651
|
type: v,
|
|
2624
2652
|
exegesis: this.tipTitle,
|
|
2625
2653
|
fileName: name,
|
|
2626
|
-
|
|
2654
|
+
isPPT:true,
|
|
2655
|
+
url: officeRes.data
|
|
2627
2656
|
}
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
}
|
|
2657
|
+
} else {
|
|
2658
|
+
dataInfo = {
|
|
2659
|
+
isShow: false,
|
|
2660
|
+
edit: false,
|
|
2661
|
+
id: `${id}`,
|
|
2662
|
+
type: v,
|
|
2663
|
+
exegesis: this.tipTitle,
|
|
2664
|
+
fileName: name,
|
|
2665
|
+
url: url
|
|
2638
2666
|
}
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
this.interpositionData.push(dataInfo)
|
|
2643
|
-
this.documentClick()
|
|
2667
|
+
}
|
|
2668
|
+
this.interpositionData.push(dataInfo)
|
|
2669
|
+
this.documentClick()
|
|
2644
2670
|
// return
|
|
2645
2671
|
// }
|
|
2646
2672
|
/*const num1 = this.upSort(this.editor, 'reference')
|