gunter-kgd 1.0.0 → 1.0.2

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.
@@ -0,0 +1,894 @@
1
+ <template>
2
+ <div class="ganteLiuBox">
3
+ <div ref="gante_box" :style="{height:Number(height) ? height+'px': height}" class="gante-box">
4
+ <div class="gante-menu">
5
+ <div class="today" @click="toToday">今天</div>
6
+ <dropdown
7
+ :value="time_mode"
8
+ :options="dropdownOptions"
9
+ placeholder="请选择"
10
+ class="gante-dropdown"
11
+ @input="(val)=> trickMode(val)"
12
+ ></dropdown>
13
+
14
+ </div>
15
+ <!--左边表格-->
16
+ <div :style="{width: Number(tabe_width)? tabe_width+'px' : tabe_width }" class="gante-table-box">
17
+ <gante-table
18
+ @sort="sortGunter"
19
+ :th_data="th_data"
20
+ :showLoading="showLoading"
21
+ :data="ganteData">
22
+
23
+ </gante-table>
24
+ </div>
25
+ <!--右边时间-->
26
+ <div class="gante-gc-box"
27
+ :style="{left:Number(tabe_width) ? tabe_width+'px': tabe_width,width: `calc(100% - ${Number(tabe_width) ? tabe_width +'px': tabe_width}) `}">
28
+ <gante-gc
29
+ ref="gante_gc"
30
+ :start_time="start_time"
31
+ :end_time="end_time"
32
+ :th_data="th_data"
33
+ :gante_data="ganteData"
34
+ :toast-render="toastRender"
35
+ :toast-class="toastClass"></gante-gc>
36
+ </div>
37
+ <gante-split :left="tabe_width" :th_data="th_data"></gante-split>
38
+ </div>
39
+ <!--日历-->
40
+ <calendar :left="calendar_left" :choose_date="checkDate" v-model="show_calendar" @change="chooseDate"
41
+ :top="calendar_top"></calendar>
42
+ </div>
43
+ </template>
44
+ <script>
45
+ import ganteTable from '../gante_test/gante-table.vue'
46
+ import ganteGc from '../gante_test/gante-gc.vue'
47
+ import ganteSplit from '../gante_test/gante-split.vue'
48
+ import commitEmit from './commit'
49
+ import calendar from './calendar.vue'
50
+ import searchLastWidth from './search_last_width';
51
+ import ganteOp from './gante_op';
52
+ import myPublic from '../../../utils/public'
53
+ import dropdown from '../common/dropdown.vue'
54
+ let number = 0 //序号
55
+ export default {
56
+ mixins: [searchLastWidth,ganteOp],
57
+ data() {
58
+ return {
59
+ checkModel: 1,
60
+ tabe_width: 0, //表格的宽度
61
+ time_mode: 1,//时间刻度 1:日,2周,3月,4季,5年
62
+ th_data: {}, //表格头部数据
63
+ ganteData: [],//甘特图的数据
64
+ toastRender: null, // 自定义 toast 渲染函数
65
+ toastClass: '', // 追加在默认 toast 上的类名
66
+ beforeTaskInfoList:[], // 前置任务关系
67
+ _filterBeforeGunterData: [],//排序之前的数据
68
+ height: 300,
69
+ open: true,
70
+ calendar_left: 0, //日期选择的位置
71
+ calendar_top: 0,//日期选择的位置
72
+ show_calendar: false,
73
+ checkDate: new Date(),//选中的日期
74
+ change_id: '', //修改数据的id,修改时间用到
75
+ change_value: '',//修改数据的值,修改时间用到
76
+ start_time: 0, //最小的开始时间
77
+ end_time: 0, //最大的结束时间
78
+ edit_data: {},//修改后传递出的数据
79
+ showLoading: false,
80
+ onEdit: () => {},
81
+ onClick: () => {},
82
+ onLoad: () => {},//懒加载
83
+ onDragChangeTime: () => {}, // 拖动改变时间
84
+ dropdownOptions: [
85
+ { value: 1, label: '日' },
86
+ { value: 2, label: '周' },
87
+ { value: 3, label: '月' },
88
+ { value: 4, label: '季' },
89
+ { value: 5, label: '年' },
90
+ ],
91
+ }
92
+ },
93
+ created() {
94
+ commitEmit.$off('change')
95
+ commitEmit.$on('change', (data) => {
96
+ this.change(data)
97
+ });
98
+ commitEmit.$off('change-calendar')
99
+ commitEmit.$on('change-calendar', (data) => {
100
+ this.change_calendar(data)
101
+ });
102
+ // 某个单元格的点击事件
103
+ commitEmit.$off('on-click')
104
+ commitEmit.$on('on-click', (data) => {
105
+ this.onclick(data)
106
+ });
107
+ // 拖动改变时间
108
+ commitEmit.$off('onDragChangeTime')
109
+ commitEmit.$on('onDragChangeTime', (oldData,data) => {
110
+ const resolves = (bol)=>{
111
+ if(!bol){
112
+ this.resetTask(this.ganteData,oldData);
113
+ }
114
+ }
115
+ this.onDragChangeTime(data,resolves)
116
+ });
117
+
118
+
119
+ //懒加载
120
+ commitEmit.$off('on-load')
121
+ commitEmit.$on('on-load', () => {
122
+ /**
123
+ *
124
+ * @type {Function}
125
+ * requestBol: 是否显示加载图标
126
+ * data: 加载的数据
127
+ * start_time: 最小开始时间
128
+ * end_time: 最大的结束时间
129
+ */
130
+ const resolve = ((requestBol, data, start_time, end_time) => {
131
+ if (!requestBol) {
132
+ this.showLoading = false
133
+ }
134
+ this.ganteData.push(...data)
135
+ this.start_time = start_time
136
+ this.end_time = end_time
137
+ this.init({ganteData: this.ganteData, start_time: this.start_time, end_time: this.end_time},false)
138
+ this.$nextTick(function () {
139
+ this.$refs.gante_gc.requestBol = requestBol
140
+ })
141
+ })
142
+ this.onLoad(resolve)
143
+ });
144
+
145
+
146
+ commitEmit.$off('triggerInit');
147
+ commitEmit.$on('triggerInit', (start_time,end_time) =>{
148
+ this.init({start_time: start_time, end_time: end_time},false)
149
+ })
150
+ },
151
+ mounted() {
152
+ this.$nextTick(function () {
153
+ setTimeout(() => {
154
+ // 获取到左边表格所有td加起来的宽度
155
+ this.find_attr(document.getElementsByClassName('gante-table-box')[0].clientWidth, this.th_data)
156
+ })
157
+ })
158
+
159
+ },
160
+ methods: {
161
+ //设置加载提示
162
+ setShowLoading(data) {
163
+ this.showLoading = data
164
+ this.$refs.gante_gc.requestBol = data
165
+ },
166
+ /**
167
+ * 排序
168
+ * @param key 要排序的key值
169
+ * @param mode 是正序还是倒叙 asc:正 desc:倒
170
+ */
171
+ sortGunter(key, mode) {
172
+ console.log(mode)
173
+ if (!key) {
174
+ this.ganteData = JSON.parse(JSON.stringify(this._filterBeforeGunterData))
175
+ return;
176
+ }
177
+ sortNum(this.ganteData, key, mode)
178
+ number = 0
179
+ formate_number(this.ganteData)
180
+ function sortNum(data) {
181
+ data.sort(compare(key))
182
+ for (let i of data) {
183
+ if (i.children) {
184
+ sortNum(i.children, key)
185
+ }
186
+ }
187
+
188
+ }
189
+
190
+ function compare(property) {
191
+ return function (a, b) {
192
+ if (mode == 'asc') {
193
+ return (a[property] - b[property])
194
+ } else {
195
+ console.log(b,property)
196
+ return (b[property] - a[property])
197
+ }
198
+ }
199
+ }
200
+
201
+ function formate_number(data) {
202
+ for (let i of data) {
203
+ if (i.children) {
204
+ number++
205
+ i.params['number'] = number
206
+ formate_number(i.children)
207
+ } else {
208
+ number++
209
+ i.params['number'] = number
210
+ }
211
+ }
212
+ }
213
+
214
+ console.log(key)
215
+ console.log(this.ganteData)
216
+ },
217
+ // 选择日期
218
+ chooseDate(date) {
219
+ if (date) {
220
+ var year = date.getFullYear()
221
+ var month = date.getMonth() + 1
222
+ var day = date.getDate()
223
+ var time = year + '-' + (month < 10 ? ('0' + month) : month) + '-' + (day < 10 ? ('0' + day) : day)
224
+ this.change_value[0].value = time
225
+ this.change_value[1].value = new Date(year, month - 1, day).getTime()
226
+ this.change({
227
+ change_value: {
228
+ id: this.change_id,
229
+ value: this.change_value
230
+ }
231
+ })
232
+ this.init({ganteData: this.ganteData, start_time: this.start_time, end_time: this.end_time},false)
233
+ }
234
+ },
235
+ // 点击显示日历
236
+ change_calendar(data) {
237
+ console.log('展开', data.show_calendar)
238
+ if (data.changeDate) {
239
+ this.checkDate = data.changeDate
240
+ }
241
+ this.show_calendar = data.show_calendar
242
+ console.log(this.show_calendar)
243
+ if (data.calendar_left != undefined) {
244
+ this.calendar_left = data.calendar_left
245
+ }
246
+ if (data.calendar_top != undefined) {
247
+ this.calendar_top = data.calendar_top
248
+ }
249
+ if (data.change_value != undefined) {
250
+ this.change_id = data.change_value.id
251
+ this.change_value = data.change_value.argument
252
+ }
253
+ },
254
+ // 监听点击事件
255
+ onclick(data) {
256
+ if (typeof this.onClick === 'function') {
257
+ for (let i in data.data) {
258
+ //返回数据的时候去掉没用的数据
259
+ if (i == 'width' || i == 'left' || i == 'open') {
260
+ delete data.data[i]
261
+ }
262
+ }
263
+ this.onClick(data)
264
+ }
265
+ },
266
+ // 统一改变数据
267
+ change(data) {
268
+ //修改数据
269
+ if (data.change_value) {
270
+ this.gunter_data_change(data.change_value.id, data.change_value.value, this.ganteData)
271
+ if (typeof this.onEdit === 'function') {
272
+ for (let i in this.edit_data.data) {
273
+ if (i == 'width' || i == 'left' || i == 'open') {
274
+ delete this.edit_data.data[i]
275
+ }
276
+ }
277
+ this.onEdit(this.edit_data)
278
+ }
279
+ }
280
+ },
281
+ /**
282
+ * 统一修改甘特图数据的方法
283
+ * @param id 修改的甘特图数据的id
284
+ * @param value 修改的甘特图数据的值(argument: 修改的是哪个参数,value:值)
285
+ * @param data 甘特图数据
286
+ */
287
+ gunter_data_change(id, value, data) {
288
+ for (let i of data) {
289
+ if (i.gunter_id == id) {
290
+ for (let s of value) {
291
+ //修改时间用到的
292
+ if (s.mode) {
293
+ this.$set(i, s.argument, s.value)
294
+ } else {
295
+ this.$set(i['params'], s.argument, s.value)
296
+ }
297
+
298
+ }
299
+ this.edit_data['data'] = JSON.parse(JSON.stringify(i))
300
+ this.edit_data['argument'] = value[0].argument
301
+ this.edit_data['value'] = value[0].value
302
+ }
303
+ // 判断最小开始时间和最大结束时间
304
+ if (this.start_time > i.start_time && (i.start_time)) {
305
+ this.start_time = i.start_time
306
+ }
307
+ if (this.end_time < i.end_time && i.end_time) {
308
+ this.end_time = i.end_time
309
+ }
310
+ if (i.children) {
311
+ this.gunter_data_change(id, value, i.children)
312
+ }
313
+ }
314
+ },
315
+ // 重置任务,在拖动时间后如果没有权限后重置任务
316
+ resetTask(ganteData,oldData){
317
+ for(let i of ganteData){
318
+ if(i.gunter_id == oldData.gunter_id){
319
+ this.$set(i,'start_time',new Date(myPublic.dateFormat.dateReplace(oldData.start_time)).getTime());
320
+ this.$set(i,'end_time',new Date(myPublic.dateFormat.dateReplace(oldData.end_time)).getTime());
321
+ this.$set(i.params,oldData.startAttr,oldData.start_time);
322
+ this.$set(i.params,oldData.endAttr,oldData.end_time);
323
+ this.$set(i,'width',oldData.width);
324
+ this.$set(i,'left',oldData.left);
325
+ break;
326
+ }
327
+ if(i.children){
328
+ this.resetTask(i.children,oldData)
329
+ }
330
+ }
331
+ },
332
+ // 初始化
333
+ init(params,mode = true) {
334
+
335
+ Object.assign(this.$data, params);
336
+
337
+ if(params.ganteData == undefined){
338
+ let ganteData = JSON.parse(JSON.stringify(this.ganteData));
339
+ this.ganteData = [];
340
+ this.ganteData = ganteData;
341
+ }else{
342
+ this.ganteData = JSON.parse(JSON.stringify(params.ganteData));
343
+ }
344
+
345
+ if(!params.openLoad && mode){
346
+ this.showLoading = false
347
+ this.$nextTick(function () {
348
+ this.$refs.gante_gc.requestBol = false
349
+ })
350
+ }
351
+ if(!this.th_data.number){
352
+ let number = {number:{value:'序号',width:50,showToast:false,listen_click:false,weight:true}}
353
+ this.th_data = Object.assign(number,this.th_data)
354
+ }
355
+ let current_date = new Date().getTime();
356
+ if (current_date < this.start_time) {
357
+ this.start_time = current_date;
358
+ }
359
+ if (current_date > this.end_time) {
360
+ this.end_time = current_date;
361
+ }
362
+
363
+ this.$nextTick(function () {
364
+ let data = this.$refs.gante_gc.init(this.time_mode);
365
+ number = 0;
366
+ format_gante_data(this.ganteData, data.time, data.start_time)
367
+ this._filterBeforeGunterData = JSON.parse(JSON.stringify(this.ganteData))
368
+ if (mode) {
369
+ if (params.tabe_width != undefined) {
370
+ this.tabe_width = params.tabe_width
371
+ } else {
372
+ let _width = this.$refs.gante_box.clientWidth
373
+ this.tabe_width = _width / 2
374
+ }
375
+ }
376
+ })
377
+ let self = this;
378
+
379
+ /**
380
+ * 处理甘特图数据
381
+ * @param gante_data 甘特图的数据
382
+ * @param time 1px代表的时间
383
+ * @param start_time 开始时间
384
+ * @param parent_gunter_id 父元素的id
385
+ */
386
+ function format_gante_data(gante_data, time, start_time,parent_gunter_id = null) {
387
+ for (let i of gante_data) {
388
+ if (i.open == undefined) {
389
+ self.$set(i, 'open', self.open)
390
+ }
391
+ if (i.start_time || i.end_time) {
392
+ i['left'] = (i.start_time - start_time) / time
393
+ if (i.end_time && i.end_time >= i.start_time && i.start_time) {
394
+ let width = (i.end_time - i.start_time) / time
395
+ // let width = (new Date(new Date(i.end_time).getFullYear(),new Date(i.end_time).getMonth(),new Date(i.end_time).getDate()+1) - i.start_time)/time
396
+ if (width >= 0 && width <= 1) {
397
+ width = 1
398
+ }
399
+ i['width'] = width
400
+ } else {
401
+ i['width'] = 0
402
+ }
403
+ }
404
+ i['parent_gunter_id'] = parent_gunter_id
405
+
406
+ i['showLoading'] = false
407
+ if (i.children) {
408
+ number++
409
+ self.$set(i.params,'number',number)
410
+ format_gante_data(i.children, time, start_time,i.gunter_id)
411
+ }else{
412
+ number++
413
+ self.$set(i.params,'number',number)
414
+ }
415
+ }
416
+ }
417
+
418
+ },
419
+ },
420
+ components: {
421
+ ganteTable,
422
+ ganteGc,
423
+ ganteSplit,
424
+ calendar,
425
+ dropdown
426
+ }
427
+ }
428
+ </script>
429
+ <style lang="less">
430
+ li {
431
+ list-style: none;
432
+ }
433
+
434
+ .ganteLiuBox {
435
+ height: 100%;
436
+ }
437
+
438
+ .gante-box {
439
+ position: relative;
440
+ width: 100%;
441
+ overflow: hidden;
442
+ border-radius: 5px;
443
+ background: #fff;
444
+ border: 1px solid #ccc;
445
+ box-sizing: border-box;
446
+ .gante-menu{
447
+ position: absolute;
448
+ right: 20px;
449
+ top: 55px;
450
+ display: flex;
451
+ align-items: center;
452
+ justify-content: space-between;
453
+ z-index: 99999;
454
+ gap: 10px;
455
+ .today{
456
+ padding: 6px 10px;
457
+ border: 1px solid #dcdfe6;
458
+ border-radius: 4px;
459
+ background-color: #fff;
460
+ cursor: pointer;
461
+ font-size: 14px;
462
+ &:hover{
463
+ border-color: #00a578;
464
+ }
465
+ &:focus {
466
+ outline: none;
467
+ border-color: #00a578;
468
+ box-shadow: 0 0 0 2px rgba(0, 165, 120, 0.2);
469
+ }
470
+ &.dropdown-active {
471
+ border-color: #00a578;
472
+ border-radius: 4px 4px 0 0;
473
+ }
474
+ }
475
+
476
+ }
477
+ .gante-top-op{
478
+ height: 54px;
479
+ padding: 0 10px 0 20px;
480
+ box-sizing: border-box;
481
+ display: flex;
482
+ align-items: center;
483
+ justify-content: space-between;
484
+ position: relative;
485
+ z-index: 3;
486
+ .btns{
487
+ /deep/.el-button-group{
488
+ width: 140px!important;
489
+ }
490
+ /deep/.btn-one{
491
+ text-align: left!important;
492
+ }
493
+ /deep/.el-button{
494
+ &:first-child{
495
+ width:86px!important;
496
+ border-radius: 17px 0 0 17px;
497
+ }
498
+ &:nth-child(2){
499
+ border-radius: 0 17px 17px 0 ;
500
+ padding: 10px 11px!important;
501
+ }
502
+ }
503
+ }
504
+ .filter{
505
+ display: flex;
506
+ .filter-one{
507
+ position: relative;
508
+ margin-left: 15px;
509
+ .projectName{
510
+ display: flex;
511
+ align-items: center;
512
+ cursor: pointer;
513
+ &:hover{
514
+ color: #3396fb;
515
+ }
516
+ .name{
517
+ margin-right: 5px;
518
+ }
519
+ }
520
+ }
521
+ .opens{
522
+ position: relative;
523
+ cursor: pointer;
524
+ &:hover{
525
+ color: #3396fb;
526
+ }
527
+ &:after{
528
+ content: '';
529
+ position: absolute;
530
+ left: -18px;
531
+ top: 2px;
532
+ height: 17px;
533
+ width: 1px;
534
+ background: #ccc;
535
+ }
536
+ }
537
+ .batch{
538
+ cursor: pointer;
539
+ &:hover{
540
+ color: #3396fb;
541
+ }
542
+ }
543
+ }
544
+ /*级联选择框*/
545
+ .cascade-content{
546
+ position: relative;
547
+ height: 19px;
548
+ line-height: 20px;
549
+ padding-right: 25px;
550
+ .text{
551
+ cursor: pointer;
552
+ &:hover{
553
+ color: #3396fb;
554
+ }
555
+ }
556
+ .icon-right{
557
+ position: absolute;
558
+ right: 5px;
559
+ top: 3px;
560
+ }
561
+ .cascade-menu{
562
+ background: #fff;
563
+ position: absolute;
564
+ max-height: 275px;
565
+ overflow-y: overlay;
566
+ right: 0;
567
+ box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
568
+ top: 32px;
569
+ display: flex;
570
+ border-radius: 4px;
571
+ .cascade-menu-one{
572
+ height: 100%;
573
+ max-height: 275px;
574
+ overflow-y: overlay;
575
+ border-right: 1px solid #ccc;
576
+ box-sizing: border-box;
577
+ min-width: 140px;
578
+ padding: 10px;
579
+ border-right: 1px solid #e4e7ed;
580
+ &:last-child{
581
+ border-right: none;
582
+ }
583
+ .menu-one{
584
+ padding: 8px 16px;
585
+ border-radius: 4px;
586
+ cursor: pointer;
587
+ display: flex;
588
+ justify-content: space-between;
589
+ align-items: center;
590
+ &:hover{
591
+ background: #eee;
592
+ }
593
+ }
594
+ .menu-one.active{
595
+ color: #3396fb;
596
+ }
597
+ }
598
+ }
599
+ &:before{
600
+ content: " ";
601
+ position: absolute;
602
+ display: block;
603
+ width: 0;height: 0;
604
+ top: 24px;
605
+ left: calc(50% - 20px);
606
+ border-left: 8px solid transparent;
607
+ border-right: 8px solid transparent;
608
+ border-bottom: 8px solid rgba(0,0,0,.1);
609
+ }
610
+ &:after{
611
+ content: " ";
612
+ position: absolute;
613
+ display: block;
614
+ width: 0;
615
+ height: 0;
616
+ top:24px;
617
+ left:calc(50% - 20px);
618
+ border-left: 8px solid transparent;
619
+ border-right: 8px solid transparent;
620
+ border-bottom: 8px solid #fff;
621
+ }
622
+ }
623
+ }
624
+ }
625
+
626
+ .gante-table-box {
627
+ overflow-x: auto;
628
+ overflow-y: hidden;
629
+ width: 50%;
630
+ height: 100%;
631
+ left: 0;
632
+ bottom: 0;
633
+ position: absolute;
634
+ }
635
+
636
+ .gante-gc-box {
637
+ overflow: auto;
638
+ width: 50%;
639
+ position: absolute;
640
+ top: 0;
641
+ border-left: 5px solid transparent;
642
+ height: 100%;
643
+ box-sizing: border-box;
644
+ padding-right: 2px;
645
+ }
646
+
647
+ .change-mode {
648
+ width: 65px;
649
+ height: 30px;
650
+ line-height: 30px;
651
+ text-align: center;
652
+ display: inline-block;
653
+ background: #00b0ff;
654
+ border-radius: 3px;
655
+ color: #fff;
656
+ margin-top: 10px;
657
+ cursor: pointer;
658
+ }
659
+
660
+ .gante-toast-liu {
661
+ position: fixed;
662
+ z-index: 10000;
663
+ width: 300px;
664
+ height: auto;
665
+ font-size: 13px;
666
+ line-height: 1.5;
667
+ font-family: "Microsoft Yahei", Arial, sans-serif;
668
+ border-radius: 8px;
669
+ transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
670
+ background-color: #fff;
671
+ padding: 14px 16px;
672
+ color: #1f2933;
673
+ border: 1px solid #e6ebf1;
674
+ box-shadow: 0 8px 20px rgba(16, 24, 40, 0.12);
675
+ }
676
+
677
+ .toast-card {
678
+ display: flex;
679
+ flex-direction: column;
680
+ gap: 12px;
681
+ }
682
+ .toast-card__header {
683
+ display: flex;
684
+ align-items: center;
685
+ justify-content: flex-start;
686
+ gap: 8px;
687
+ }
688
+ .toast-card__title {
689
+ font-size: 20px;
690
+ font-weight: bold;
691
+ color: rgba(0, 0, 0, 0.65);
692
+ overflow: hidden;
693
+ text-overflow: ellipsis;
694
+ white-space: nowrap;
695
+ }
696
+ .toast-card__tag {
697
+ display: inline-flex;
698
+ align-items: center;
699
+ gap: 6px;
700
+ padding: 4px 10px;
701
+ border-radius: 14px;
702
+ background: #ffcccc;
703
+ color: #ff0000;
704
+ font-size: 12px;
705
+ font-weight: 600;
706
+ }
707
+ .toast-card__dot {
708
+ width: 8px;
709
+ height: 8px;
710
+ border-radius: 50%;
711
+ background: #ff0000;
712
+ display: inline-block;
713
+ }
714
+ .toast-card__body {
715
+ display: flex;
716
+ align-items: center;
717
+ justify-content: space-between;
718
+ gap: 12px;
719
+ }
720
+ .toast-card__meta {
721
+ display: flex;
722
+ flex-direction: column;
723
+ gap: 6px;
724
+ }
725
+ .toast-card__label {
726
+ color: #7a869a;
727
+ font-size: 18px;
728
+ }
729
+ .toast-card__value {
730
+ color: #1f2933;
731
+ font-size: 14px;
732
+ }
733
+ .toast-card__progress {
734
+ display: flex;
735
+ flex-direction: column;
736
+ align-items: center;
737
+ gap: 6px;
738
+ min-width: 90px;
739
+ }
740
+ .toast-card__progress-ring {
741
+ width: 48px;
742
+ height: 48px;
743
+ border-radius: 50%;
744
+ border: 6px solid var(--ring-color, #2bae73);
745
+ display: flex;
746
+ align-items: center;
747
+ justify-content: center;
748
+ box-shadow: inset 0 0 0 6px #f1faf5, 0 4px 12px rgba(0, 0, 0, 0.1);
749
+ background: #fff;
750
+ }
751
+ .toast-card__progress-ring-inner {
752
+ width: 46px;
753
+ height: 46px;
754
+ border-radius: 50%;
755
+ background: #fff;
756
+ display: flex;
757
+ align-items: center;
758
+ justify-content: center;
759
+ font-size: 13px;
760
+ font-weight: 700;
761
+ color: var(--ring-color, #2bae73);
762
+ }
763
+ .toast-card__progress-text {
764
+ color: #7a869a;
765
+ font-size: 12px;
766
+ }
767
+
768
+ .unselecttable {
769
+ -webkit-touch-callout: none; /*系统默认菜单被禁用*/
770
+ -webkit-user-select: none; /*webkit浏览器*/
771
+ -khtml-user-select: none; /*早期浏览器*/
772
+ -moz-user-select: none; /*火狐*/
773
+ -ms-user-select: none; /*IE10*/
774
+ user-select: none;
775
+ }
776
+
777
+ .gante-out-op {
778
+ display: flex;
779
+ z-index: 10;
780
+ .gante-trigger, .to-today {
781
+ margin-right: 20px;
782
+ border-radius: 3px;
783
+ padding: 5px 12px;
784
+ background: #fff;
785
+ border: 1px solid #ccc;
786
+ cursor: pointer;
787
+ &:hover {
788
+ background: #f5f5f5;
789
+ color: #3396fb;
790
+ }
791
+ }
792
+
793
+ .reOrde {
794
+ display: flex;
795
+ align-items: center;
796
+ margin-right: 20px;
797
+ border: 1px solid #ccc;
798
+ .icons{
799
+ padding: 8px 8px;
800
+ cursor: pointer;
801
+ background: #fff;
802
+ &:hover {
803
+ background: #f5f5f5;
804
+ color: #3396fb!important;
805
+ }
806
+ &:first-child{
807
+ border-radius: 3px 0 0 3px;
808
+ border-right: 1px solid rgba(0,0,0,0.05);
809
+ }
810
+ &:last-child{
811
+ border-radius: 0 3px 3px 0;
812
+ padding: 8px 12px;
813
+ }
814
+ }
815
+ }
816
+ .fullScreen{
817
+ border-radius: 3px;
818
+ padding: 5px 12px;
819
+ background: #fff;
820
+ border: 1px solid #ccc;
821
+ cursor: pointer;
822
+ img{
823
+ width: 20px;
824
+ height: 20px;
825
+ }
826
+ &:hover{
827
+ background: #f5f5f5;
828
+ color: #3396fb;
829
+ }
830
+ }
831
+ }
832
+ .project_op_drop .el-dropdown-menu__item{
833
+ letter-spacing: 0!important;
834
+ }
835
+ </style>
836
+ <style scoped lang="less">
837
+ .projectTabs{
838
+ position: absolute;
839
+ width: 170px;
840
+ left: -75px;
841
+ top: 25px;
842
+ min-width: 80px!important;
843
+ background: #fff;
844
+ box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
845
+ padding: 10px;
846
+ border-radius: 4px;
847
+ .mode-one{
848
+ line-height: 30px;
849
+ cursor: pointer;
850
+ padding: 0 5px;
851
+ border-radius: 4px;
852
+ transition: all .2s ease;
853
+ display: flex;
854
+ justify-content: space-between;
855
+ align-items: center;
856
+ &:hover{
857
+ background: #eee;
858
+ }
859
+ }
860
+ .mode-one.active{
861
+ color: #3396fb;
862
+ }
863
+ }
864
+ /*拖动排序*/
865
+ .gu-transit {
866
+ opacity: 0.2;
867
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
868
+ filter: alpha(opacity=20);
869
+ }
870
+ .gu-mirror {
871
+ position: fixed !important;
872
+ margin: 0 !important;
873
+ z-index: 9999 !important;
874
+ opacity: 1!important;
875
+ border-radius: 5px!important;
876
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"!important;
877
+ filter: alpha(opacity=80)!important;
878
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.1);
879
+ background: #fff;
880
+ &:hover{
881
+ background: #fff;
882
+ cursor: grabbing!important;
883
+ }
884
+ }
885
+ .gu-hide {
886
+ display: none !important;
887
+ }
888
+ .gu-unselectable {
889
+ -webkit-user-select: none !important;
890
+ -moz-user-select: none !important;
891
+ -ms-user-select: none !important;
892
+ user-select: none !important;
893
+ }
894
+ </style>