gunter-kgd 1.0.11 → 1.0.13
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/components/gante_test/gante-gc-item-content.vue +81 -13
- package/components/gante_test/gante-gc-item.vue +1 -1
- package/components/gante_test/gante-gc.vue +116 -25
- package/components/gante_test/gante-split.vue +1 -1
- package/components/gante_test/gante-table.vue +7 -2
- package/components/gante_test/gante.vue +5 -1
- package/components/gante_test/gante_op.js +5 -4
- package/gante.vue +6 -3
- package/package.json +1 -1
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
:style="{
|
|
10
10
|
cursor: DragObject.mouseDown ? 'grabbing' : 'grab',
|
|
11
11
|
width:current_data.width?current_data.width+'px':0,
|
|
12
|
-
transform: `translate3d(${current_data.left?current_data.left+'px':0},
|
|
12
|
+
transform: `translate3d(${current_data.left?current_data.left+'px':0},15px,0)`,
|
|
13
13
|
transition: !DragObject.mouseDown ? 'width .5s linear, opacity .2s ease' : 'null',
|
|
14
|
-
background:
|
|
14
|
+
background: progressColor,
|
|
15
15
|
borderColor: current_data.bg_color ? `${current_data.bg_color} ${current_data.bg_color} transparent`: '#00b0ff #00b0ff transparent'}"
|
|
16
16
|
class="ganteview-item" :class="{'has-child': current_data.children}">
|
|
17
|
-
<
|
|
17
|
+
<div class="ganteview-item__progress" :style="{width: progressWidth, background: taskBackground}"></div>
|
|
18
|
+
<span class="ganteview-item__label">{{ progressText }}</span>
|
|
18
19
|
<span v-show="current_data.show_drag" @mousedown.stop="dragDown($event,'left')" data-drag="true" class="left-drag-line"></span>
|
|
19
20
|
<span v-show="current_data.show_drag" @mousedown.stop="dragDown($event,'right')" data-drag="true" class="right-drag-line"></span>
|
|
20
21
|
<div v-show="current_data.show_drag" data-drag="true" class="ganter_drag_hover"></div>
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
justDragged: false,
|
|
36
37
|
DragObject:{
|
|
37
38
|
startX: 0, // 开始的位置
|
|
39
|
+
startY: 0,
|
|
38
40
|
mouseDown: false,// 是否按下了鼠标
|
|
39
41
|
scale: 0, // 刻度
|
|
40
42
|
mode: 1, // 默认以小时为单位 1:小时 2 :天
|
|
@@ -45,6 +47,7 @@
|
|
|
45
47
|
startAttr: null,// 开始时间的属性名
|
|
46
48
|
endAttr: null,// 结束时间的属性名
|
|
47
49
|
move_type: null, // 拖动的方式 left: 拖动左边时间 right: 拖动右边时间 drag: 拖动整体
|
|
50
|
+
moved: false,
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
},
|
|
@@ -63,6 +66,29 @@
|
|
|
63
66
|
const start = this.current_data && this.current_data.start_time
|
|
64
67
|
const end = this.current_data && this.current_data.end_time
|
|
65
68
|
return Number(start) > 0 && Number(end) > 0
|
|
69
|
+
},
|
|
70
|
+
progressValue(){
|
|
71
|
+
if(!this.current_data){
|
|
72
|
+
return 0
|
|
73
|
+
}
|
|
74
|
+
const raw = this.current_data.progress
|
|
75
|
+
const num = Number(raw)
|
|
76
|
+
if(Number.isNaN(num)){
|
|
77
|
+
return 0
|
|
78
|
+
}
|
|
79
|
+
return Math.max(0, Math.min(100, num))
|
|
80
|
+
},
|
|
81
|
+
progressWidth(){
|
|
82
|
+
return `${this.progressValue}%`
|
|
83
|
+
},
|
|
84
|
+
progressText(){
|
|
85
|
+
return `${this.progressValue}%`
|
|
86
|
+
},
|
|
87
|
+
progressColor(){
|
|
88
|
+
return this.current_data && this.current_data.bg_color ? this.current_data.bg_color : '#989b9c'
|
|
89
|
+
},
|
|
90
|
+
taskBackground(){
|
|
91
|
+
return this.current_data && this.current_data.task_color ? this.current_data.task_color : '#d6721f'
|
|
66
92
|
}
|
|
67
93
|
},
|
|
68
94
|
methods:{
|
|
@@ -82,7 +108,7 @@
|
|
|
82
108
|
buildToastContent() {
|
|
83
109
|
if (!this.current_data || !this.current_data.params) {
|
|
84
110
|
this.toastClassResolved = (this.toastClass || '').trim();
|
|
85
|
-
return '';
|
|
111
|
+
return { content: '', canShow: false };
|
|
86
112
|
}
|
|
87
113
|
let list = '';
|
|
88
114
|
for (let i in this.th_data) {
|
|
@@ -114,7 +140,8 @@
|
|
|
114
140
|
}
|
|
115
141
|
|
|
116
142
|
this.toastClassResolved = resolvedClass;
|
|
117
|
-
|
|
143
|
+
const canShow = resolvedContent !== '';
|
|
144
|
+
return { content: resolvedContent, canShow };
|
|
118
145
|
},
|
|
119
146
|
showToast(e) {
|
|
120
147
|
this.canShow = true;
|
|
@@ -124,7 +151,14 @@
|
|
|
124
151
|
if(this.current_data && this.canShow){
|
|
125
152
|
if(this.current_data.params){
|
|
126
153
|
let toast = document.createElement('div'), add_toast = true
|
|
127
|
-
const
|
|
154
|
+
const toastInfo = this.buildToastContent();
|
|
155
|
+
if(!toastInfo.canShow){
|
|
156
|
+
if (document.getElementsByClassName('gante-toast-liu')[0]) {
|
|
157
|
+
document.getElementsByClassName('gante-toast-liu')[0].style.display = 'none';
|
|
158
|
+
}
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const content = toastInfo.content;
|
|
128
162
|
const toastClass = `gante-toast-liu${this.toastClassResolved ? ' ' + this.toastClassResolved : ''}`
|
|
129
163
|
toast.setAttribute('class', toastClass)
|
|
130
164
|
if (document.getElementsByClassName('gante-toast-liu')[0]) {
|
|
@@ -151,7 +185,13 @@
|
|
|
151
185
|
toast.style.left = x + 'px'
|
|
152
186
|
toast.style.top = y + 'px'
|
|
153
187
|
if (add_toast) {
|
|
154
|
-
document.getElementsByTagName('body')[0]
|
|
188
|
+
const host = document.fullscreenElement || document.getElementsByTagName('body')[0]
|
|
189
|
+
host.appendChild(toast)
|
|
190
|
+
} else if (document.fullscreenElement) {
|
|
191
|
+
const host = document.fullscreenElement
|
|
192
|
+
if (toast.parentNode !== host) {
|
|
193
|
+
host.appendChild(toast)
|
|
194
|
+
}
|
|
155
195
|
}
|
|
156
196
|
}
|
|
157
197
|
}
|
|
@@ -185,9 +225,11 @@
|
|
|
185
225
|
this.justDragged = false;
|
|
186
226
|
this.DragObject.mouseDown = true;
|
|
187
227
|
this.DragObject.startX = e.clientX;
|
|
228
|
+
this.DragObject.startY = e.clientY;
|
|
188
229
|
this.DragObject.move_type = type;
|
|
189
230
|
this.DragObject.start_width = this.current_data.width;
|
|
190
231
|
this.DragObject.start_left = this.current_data.left;
|
|
232
|
+
this.DragObject.moved = false;
|
|
191
233
|
for (let i in this.th_data) {
|
|
192
234
|
if (this.current_data.params[i] != undefined) {
|
|
193
235
|
if(this.th_data[i].time_mode == 1){
|
|
@@ -222,6 +264,14 @@
|
|
|
222
264
|
// 拖动时间
|
|
223
265
|
doc_move(e){
|
|
224
266
|
if(this.DragObject.mouseDown){
|
|
267
|
+
const moveX = Math.abs(e.clientX - this.DragObject.startX)
|
|
268
|
+
const moveY = Math.abs(e.clientY - this.DragObject.startY)
|
|
269
|
+
if(!this.DragObject.moved){
|
|
270
|
+
if(moveX + moveY < 3){
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
this.DragObject.moved = true;
|
|
274
|
+
}
|
|
225
275
|
this.justDragged = true;
|
|
226
276
|
this.hideToast();
|
|
227
277
|
let move_mode_width = 0, // 宽度基值
|
|
@@ -252,8 +302,7 @@
|
|
|
252
302
|
move_mode_width = -1
|
|
253
303
|
}
|
|
254
304
|
}
|
|
255
|
-
let
|
|
256
|
-
move_unit = move_mode_width * (Math.ceil(moveX/this.DragObject.scale)), // 移动的时间
|
|
305
|
+
let move_unit = move_mode_width * (Math.ceil(moveX/this.DragObject.scale)), // 移动的时间
|
|
257
306
|
time_mode = 60*60*1000 // 时间类型
|
|
258
307
|
let start_time = this.DragObject.start_time,
|
|
259
308
|
end_time = this.DragObject.end_time
|
|
@@ -300,9 +349,14 @@
|
|
|
300
349
|
if (document.getElementsByClassName('gante-toast-liu')[0]) {
|
|
301
350
|
toast = document.getElementsByClassName('gante-toast-liu')[0]
|
|
302
351
|
toast.style.display = 'block';
|
|
303
|
-
const
|
|
304
|
-
if(
|
|
305
|
-
toast.
|
|
352
|
+
const toastInfo = this.buildToastContent();
|
|
353
|
+
if(!toastInfo.canShow){
|
|
354
|
+
toast.style.display = 'none';
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const content = toastInfo.content;
|
|
358
|
+
if(toast.innerHTML != content){
|
|
359
|
+
toast.innerHTML = content;
|
|
306
360
|
}
|
|
307
361
|
}
|
|
308
362
|
}
|
|
@@ -323,7 +377,7 @@
|
|
|
323
377
|
document.removeEventListener('mouseup',this.doc_up,false);
|
|
324
378
|
document.body.classList.remove('unselecttable');
|
|
325
379
|
document.body.style.cursor = null;
|
|
326
|
-
if(this.DragObject.
|
|
380
|
+
if(this.DragObject.moved){
|
|
327
381
|
emitter.$emit('onDragChangeTime',
|
|
328
382
|
{
|
|
329
383
|
gunter_id: this.current_data.gunter_id,
|
|
@@ -338,6 +392,7 @@
|
|
|
338
392
|
}
|
|
339
393
|
this.DragObject = {
|
|
340
394
|
startX: 0, // 开始的位置
|
|
395
|
+
startY: 0,
|
|
341
396
|
mouseDown: false,// 是否按下了鼠标
|
|
342
397
|
scale: 0, // 刻度
|
|
343
398
|
mode: 1, // 默认以小时为单位 1:小时 2 :天
|
|
@@ -348,6 +403,7 @@
|
|
|
348
403
|
startAttr: null,// 开始时间的属性名
|
|
349
404
|
endAttr: null,// 结束时间的属性名
|
|
350
405
|
move_type: null,
|
|
406
|
+
moved: false,
|
|
351
407
|
};
|
|
352
408
|
this.hideToast();
|
|
353
409
|
if(this.justDragged){
|
|
@@ -372,11 +428,23 @@
|
|
|
372
428
|
/*transition: width .5s linear, opacity .2s ease;*/
|
|
373
429
|
opacity: 0.5;
|
|
374
430
|
position: relative;
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
.ganteview-item__progress{
|
|
434
|
+
position: absolute;
|
|
435
|
+
left: 0;
|
|
436
|
+
top: 0;
|
|
437
|
+
height: 100%;
|
|
438
|
+
border-radius: 3px;
|
|
439
|
+
z-index: 0;
|
|
440
|
+
}
|
|
375
441
|
.ganteview-item__label{
|
|
376
442
|
display: block;
|
|
377
443
|
white-space: nowrap;
|
|
378
444
|
overflow: hidden;
|
|
379
445
|
text-overflow: ellipsis;
|
|
446
|
+
position: relative;
|
|
447
|
+
z-index: 1;
|
|
380
448
|
}
|
|
381
449
|
.left-drag-line,.right-drag-line{
|
|
382
450
|
position: absolute;
|
|
@@ -239,30 +239,119 @@
|
|
|
239
239
|
this.todayInfo.left = (new Date(new Date().toLocaleDateString()).getTime() - first_time.getTime())/time;
|
|
240
240
|
|
|
241
241
|
var list = [];
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
if (time_mode == 1) {
|
|
243
|
+
const dayMs = 24 * 60 * 60 * 1000;
|
|
244
|
+
const weekMs = 7 * dayMs;
|
|
245
|
+
const firstDay = new Date(this.first_day);
|
|
246
|
+
let cursor = new Date(first_time);
|
|
247
|
+
const offset = (cursor.getDay() + 6) % 7;
|
|
248
|
+
cursor = new Date(cursor.getFullYear(), cursor.getMonth(), cursor.getDate() - offset);
|
|
249
|
+
while (cursor.getTime() <= all_width) {
|
|
250
|
+
const weekStart = cursor;
|
|
251
|
+
const weekEnd = new Date(weekStart.getTime() + weekMs);
|
|
252
|
+
let partStart = weekStart;
|
|
253
|
+
if (partStart.getTime() < firstDay.getTime()) {
|
|
254
|
+
partStart = new Date(firstDay);
|
|
255
|
+
}
|
|
256
|
+
let partEnd = weekEnd;
|
|
257
|
+
if (partEnd.getTime() > all_width) {
|
|
258
|
+
partEnd = new Date(all_width);
|
|
259
|
+
}
|
|
260
|
+
if (partEnd.getTime() <= partStart.getTime()) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
const monthBoundary = new Date(partStart.getFullYear(), partStart.getMonth() + 1, 1);
|
|
264
|
+
let labelDate = partStart;
|
|
265
|
+
if (monthBoundary.getTime() > partStart.getTime() && monthBoundary.getTime() < partEnd.getTime()) {
|
|
266
|
+
const beforeDays = Math.round((monthBoundary.getTime() - partStart.getTime()) / dayMs);
|
|
267
|
+
const afterDays = Math.round((partEnd.getTime() - monthBoundary.getTime()) / dayMs);
|
|
268
|
+
labelDate = afterDays > beforeDays ? monthBoundary : partStart;
|
|
269
|
+
}
|
|
270
|
+
const width = (partEnd.getTime() - partStart.getTime()) / time;
|
|
271
|
+
this.header_width += width;
|
|
272
|
+
list.push({
|
|
273
|
+
left: (partStart.getTime() - this.first_day.getTime()) / time,
|
|
274
|
+
width: width,
|
|
275
|
+
date: this.format(labelDate, 2)
|
|
276
|
+
});
|
|
277
|
+
cursor = weekEnd;
|
|
278
|
+
this.future_time = partEnd.getTime();
|
|
279
|
+
}
|
|
280
|
+
} else if (time_mode == 2) {
|
|
281
|
+
const weekMs = 7 * 24 * 60 * 60 * 1000;
|
|
282
|
+
let cursor = new Date(first_time);
|
|
283
|
+
while (cursor.getTime() <= all_width) {
|
|
284
|
+
const yearEnd = new Date(cursor.getFullYear() + 1, 0, 1);
|
|
285
|
+
const remainingWeeks = Math.ceil((yearEnd.getTime() - cursor.getTime()) / weekMs);
|
|
286
|
+
if (remainingWeeks < 4 && list.length) {
|
|
287
|
+
const prev = list[list.length - 1];
|
|
288
|
+
const extraWidth = (yearEnd.getTime() - cursor.getTime()) / time;
|
|
289
|
+
prev.width += extraWidth;
|
|
290
|
+
this.header_width += extraWidth;
|
|
291
|
+
cursor = yearEnd;
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
let next = new Date(cursor.getFullYear(), cursor.getMonth(), cursor.getDate() + 28);
|
|
295
|
+
if (next.getTime() > yearEnd.getTime()) {
|
|
296
|
+
next = yearEnd;
|
|
297
|
+
}
|
|
298
|
+
const width = (next.getTime() - cursor.getTime()) / time;
|
|
299
|
+
this.header_width += width;
|
|
300
|
+
list.push({
|
|
301
|
+
left: (cursor.getTime() - this.first_day.getTime()) / time,
|
|
302
|
+
width: width,
|
|
303
|
+
date: this.format(cursor, 5)
|
|
304
|
+
});
|
|
305
|
+
cursor = next;
|
|
306
|
+
this.future_time = cursor.getTime();
|
|
307
|
+
}
|
|
308
|
+
} else if (time_mode == 3) {
|
|
309
|
+
let cursor = new Date(first_time);
|
|
310
|
+
while (cursor.getTime() <= all_width) {
|
|
311
|
+
const yearEnd = new Date(cursor.getFullYear() + 1, 0, 1);
|
|
312
|
+
const remainingMonths = (yearEnd.getFullYear() - cursor.getFullYear()) * 12 + (yearEnd.getMonth() - cursor.getMonth());
|
|
313
|
+
if (remainingMonths < 3 && list.length) {
|
|
314
|
+
const prev = list[list.length - 1];
|
|
315
|
+
const extraWidth = (yearEnd.getTime() - cursor.getTime()) / time;
|
|
316
|
+
prev.width += extraWidth;
|
|
317
|
+
this.header_width += extraWidth;
|
|
318
|
+
cursor = yearEnd;
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
let next = new Date(cursor.getFullYear(), cursor.getMonth() + 3, 1);
|
|
322
|
+
if (next.getTime() > yearEnd.getTime()) {
|
|
323
|
+
next = yearEnd;
|
|
324
|
+
}
|
|
325
|
+
const width = (next.getTime() - cursor.getTime()) / time;
|
|
326
|
+
this.header_width += width;
|
|
327
|
+
list.push({
|
|
328
|
+
left: (cursor.getTime() - this.first_day.getTime()) / time,
|
|
329
|
+
width: width,
|
|
330
|
+
date: this.format(cursor, 5)
|
|
331
|
+
});
|
|
332
|
+
cursor = next;
|
|
333
|
+
this.future_time = cursor.getTime();
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
for (let i = 0; i <= all_width;) {
|
|
337
|
+
var old_time = first_time;
|
|
338
|
+
var date = '';
|
|
245
339
|
|
|
246
|
-
if (time_mode == 1) {
|
|
247
|
-
// 月的形式,保留月份显示
|
|
248
|
-
date = this.format(old_time, 2); // 格式: YYYY-MM
|
|
249
|
-
first_time = new Date(first_time.getFullYear(), first_time.getMonth() + 1, 1);
|
|
250
|
-
} else {
|
|
251
340
|
// 年的形式,只展示年份
|
|
252
341
|
date = this.format(old_time, 5); // 格式: YYYY
|
|
253
342
|
first_time = new Date(first_time.getFullYear() + 1, 0, 1);
|
|
254
|
-
}
|
|
255
343
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
344
|
+
var width = (first_time.getTime() - old_time.getTime()) / time;
|
|
345
|
+
this.header_width += width;
|
|
346
|
+
list.push({
|
|
347
|
+
left: (old_time.getTime() - this.first_day.getTime()) / time,
|
|
348
|
+
width: width,
|
|
349
|
+
date: date
|
|
350
|
+
});
|
|
263
351
|
|
|
264
|
-
|
|
265
|
-
|
|
352
|
+
i = first_time.getTime();
|
|
353
|
+
this.future_time = i;
|
|
354
|
+
}
|
|
266
355
|
}
|
|
267
356
|
|
|
268
357
|
this.top_time_data = list;
|
|
@@ -293,13 +382,13 @@
|
|
|
293
382
|
// | `4` | 星期四 |
|
|
294
383
|
// | `5` | 星期五 |
|
|
295
384
|
// | `6` | 星期六 |
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
385
|
+
// if (old_time.getDay() == 0 || old_time.getDay() == 6) {
|
|
386
|
+
// is_rest = true
|
|
387
|
+
// }
|
|
299
388
|
} else if (mode == 2) {
|
|
300
389
|
first_time = new Date(first_time.getFullYear(), first_time.getMonth(), first_time.getDate() + 7)
|
|
301
390
|
const weekNumber = this.get_week_number(old_time)
|
|
302
|
-
date =
|
|
391
|
+
date = `第${weekNumber}周`
|
|
303
392
|
title = this.format(old_time, 1) + '~' + this.format(new Date(first_time.getFullYear(), first_time.getMonth(), first_time.getDate() - 1), 1)
|
|
304
393
|
} else if (mode == 3) {
|
|
305
394
|
first_time = new Date(first_time.getFullYear(), first_time.getMonth() + 1, 1)
|
|
@@ -404,6 +493,9 @@
|
|
|
404
493
|
line-height: 25px;
|
|
405
494
|
position: relative;
|
|
406
495
|
background: #fff;
|
|
496
|
+
font-size: 14px;
|
|
497
|
+
font-weight: 800;
|
|
498
|
+
color: #000000D9;
|
|
407
499
|
/*display: flex;*/
|
|
408
500
|
/*justify-content: flex-start;*/
|
|
409
501
|
}
|
|
@@ -415,7 +507,7 @@
|
|
|
415
507
|
|
|
416
508
|
.ganteview-toptime .ganteview-headercell {
|
|
417
509
|
padding-left: 4px;
|
|
418
|
-
text-align:
|
|
510
|
+
text-align: center;
|
|
419
511
|
}
|
|
420
512
|
|
|
421
513
|
.ganteview-bottomtime .ganteview-headercell {
|
|
@@ -437,12 +529,11 @@
|
|
|
437
529
|
height: calc(100% - 54px);
|
|
438
530
|
z-index: 0;
|
|
439
531
|
box-sizing: border-box;
|
|
440
|
-
background: #
|
|
532
|
+
background: #5396e2;
|
|
441
533
|
}
|
|
442
534
|
|
|
443
535
|
.ganteview-headercell {
|
|
444
536
|
box-sizing: border-box;
|
|
445
|
-
color: #666;
|
|
446
537
|
border-right: 1px solid #ebeef5;
|
|
447
538
|
border-bottom: 1px solid #ebeef5;
|
|
448
539
|
overflow: hidden;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--中间分割线,分割左侧表格和右侧图表-->
|
|
2
2
|
<template>
|
|
3
|
-
<div @mousedown="down"
|
|
3
|
+
<div @mousedown.prevent="down" ref="split_liu" :style="{left:Number(left)?left+'px':left}" class="gante-split-liu">
|
|
4
4
|
<div v-show="show_split" :style="{left:split_resize_left+'px'}" class="gante-split-liu-resize"></div>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
@@ -232,6 +232,7 @@
|
|
|
232
232
|
this.tTD.current_index = target.dataset.key //记录拖动的是哪个th
|
|
233
233
|
this.proxy_left = this.oldx+3 //必须要加上3像素,不然拖动会有问题
|
|
234
234
|
this.tTD.mouseDown = true
|
|
235
|
+
document.getElementsByTagName('body')[0].classList.add('unselecttable')
|
|
235
236
|
// 给document绑定事件
|
|
236
237
|
document.addEventListener('mousemove',this.doc_move,{passive:false})
|
|
237
238
|
document.addEventListener('mouseup',this.doc_up,{passive:false})
|
|
@@ -267,6 +268,7 @@
|
|
|
267
268
|
this.oldx = 0
|
|
268
269
|
this.old_width = 0
|
|
269
270
|
this.tTD.current_index = null
|
|
271
|
+
document.getElementsByTagName('body')[0].classList.remove('unselecttable')
|
|
270
272
|
// 给document移除绑定事件
|
|
271
273
|
document.removeEventListener('mousemove',this.doc_move,false)
|
|
272
274
|
document.removeEventListener('mouseup',this.doc_up,false)
|
|
@@ -332,8 +334,11 @@
|
|
|
332
334
|
-ms-user-select: none;
|
|
333
335
|
user-select: none;
|
|
334
336
|
text-align: left;
|
|
335
|
-
|
|
336
|
-
|
|
337
|
+
background: #fff;
|
|
338
|
+
box-sizing: border-box;
|
|
339
|
+
font-size: 14px;
|
|
340
|
+
font-weight: 800;
|
|
341
|
+
color: #000000D9;
|
|
337
342
|
}
|
|
338
343
|
/*.gante-tr{*/
|
|
339
344
|
/*display: table-row;*/
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
class="gante-dropdown"
|
|
11
11
|
@input="(val)=> trickMode(val)"
|
|
12
12
|
></dropdown>
|
|
13
|
+
<div @click="toFullScreen" class="fullScreen">
|
|
14
|
+
<img v-if="fullScreen" src="../../assets/outScreen.png" alt="">
|
|
15
|
+
<img v-else src="../../assets/fullScreen.png" alt="">
|
|
16
|
+
</div>
|
|
13
17
|
|
|
14
18
|
</div>
|
|
15
19
|
<!--左边表格-->
|
|
@@ -460,7 +464,7 @@
|
|
|
460
464
|
box-sizing: border-box;
|
|
461
465
|
.gante-menu{
|
|
462
466
|
position: absolute;
|
|
463
|
-
right:
|
|
467
|
+
right: 40px;
|
|
464
468
|
top: 55px;
|
|
465
469
|
display: flex;
|
|
466
470
|
align-items: center;
|
|
@@ -34,9 +34,10 @@ export default {
|
|
|
34
34
|
methods: {
|
|
35
35
|
// 回到今天
|
|
36
36
|
toToday(){
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const container = this.$refs && this.$refs.gante_box ? this.$refs.gante_box : this.$el;
|
|
38
|
+
const today = container ? container.querySelector('#today-ganteview-column') : null;
|
|
39
|
+
const ganteview = container ? container.querySelector('.ganteview') : null;
|
|
40
|
+
if(ganteview && today){
|
|
40
41
|
let left = today.offsetLeft - ganteview.clientHeight/2;
|
|
41
42
|
if(left<0){
|
|
42
43
|
left = 0
|
|
@@ -65,7 +66,7 @@ export default {
|
|
|
65
66
|
},
|
|
66
67
|
//全屏 退出全屏
|
|
67
68
|
toFullScreen(){
|
|
68
|
-
let element =
|
|
69
|
+
let element = this.$refs && this.$refs.gante_box ? this.$refs.gante_box : this.$el;
|
|
69
70
|
// 判断是否已经是全屏
|
|
70
71
|
// 如果是全屏,退出
|
|
71
72
|
if (this.fullScreen) {
|
package/gante.vue
CHANGED
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
class="gante-dropdown"
|
|
11
11
|
@input="(val)=> trickMode(val)"
|
|
12
12
|
></dropdown>
|
|
13
|
-
|
|
13
|
+
<div @click="toFullScreen" class="fullScreen">
|
|
14
|
+
<img v-if="fullScreen" src="../../assets/outScreen.png" alt="">
|
|
15
|
+
<img v-else src="../../assets/fullScreen.png" alt="">
|
|
16
|
+
</div>
|
|
14
17
|
</div>
|
|
15
18
|
<!--左边表格-->
|
|
16
19
|
<div :style="{width: Number(tabe_width)? tabe_width+'px' : tabe_width }" class="gante-table-box">
|
|
@@ -474,12 +477,12 @@
|
|
|
474
477
|
box-sizing: border-box;
|
|
475
478
|
.gante-menu{
|
|
476
479
|
position: absolute;
|
|
477
|
-
right:
|
|
480
|
+
right: 40px;
|
|
478
481
|
top: 55px;
|
|
479
482
|
display: flex;
|
|
480
483
|
align-items: center;
|
|
481
484
|
justify-content: space-between;
|
|
482
|
-
z-index:
|
|
485
|
+
z-index: 999;
|
|
483
486
|
gap: 10px;
|
|
484
487
|
.today{
|
|
485
488
|
padding: 6px 10px;
|