doway-coms 1.7.5 → 1.7.6

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :style="{ height: height-tagHeight-10 + 'px' }">
2
+ <div :style="{ height: height - tagHeight - 10 + 'px' }">
3
3
  <div class="head-tag" v-if="tagData.length" ref="tagView">
4
4
  <a-tag
5
5
  closable
@@ -10,7 +10,11 @@
10
10
  >
11
11
  <span>{{ tagContent(item) }} </span>
12
12
  </a-tag>
13
- <span style="color:#006cd9;cursor:pointer;font-size: 14px;" @click="clearFilter">清空</span>
13
+ <span
14
+ style="color: #006cd9; cursor: pointer; font-size: 14px"
15
+ @click="clearFilter"
16
+ >清空</span
17
+ >
14
18
  </div>
15
19
  <VxeGrid
16
20
  ref="baseGrid"
@@ -29,7 +33,7 @@
29
33
  }"
30
34
  :filter-config="{
31
35
  remote: filterRemote,
32
- filterMethod: filterMethod
36
+ filterMethod: filterMethod,
33
37
  }"
34
38
  :menu-config="menuConfig"
35
39
  @menu-click="contextMenuClickEvent"
@@ -48,6 +52,7 @@
48
52
  @cellValueChange="cellValueChange"
49
53
  @operationButtonClick="operationButtonClick"
50
54
  @preSearch="preSearch"
55
+ :contrasts="scope.column.params.contrasts"
51
56
  @pulldownBtnClick="pulldownBtnClick"
52
57
  @pulldownMultiSelect="pulldownMultiSelect"
53
58
  :edit-rules="validRules"
@@ -82,9 +87,13 @@
82
87
  >
83
88
  <template v-for="item in internalColumns" #[item.field]>
84
89
  <div :key="item.field">
85
- <span v-if="item.visible !== false">{{item.title}}</span>
86
- <Tooltip :title="item.tooltip" v-if="item.tooltip && item.visible !== false" style="margin: 0 2px">
87
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
90
+ <span v-if="item.visible !== false">{{ item.title }}</span>
91
+ <Tooltip
92
+ :title="item.tooltip"
93
+ v-if="item.tooltip && item.visible !== false"
94
+ style="margin: 0 2px"
95
+ >
96
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
88
97
  </Tooltip>
89
98
  </div>
90
99
  </template>
@@ -95,11 +104,11 @@
95
104
  v-if="isSeqPopover"
96
105
  trigger="click"
97
106
  placement="rightTop"
98
- overlayClassName='popover-content-card'
99
- style="top:40px"
107
+ overlayClassName="popover-content-card"
108
+ style="top: 40px"
100
109
  >
101
110
  <template slot="title">
102
- <div style="font-size: 17px;">表头设置</div>
111
+ <div style="font-size: 17px">表头设置</div>
103
112
  </template>
104
113
  <template slot="content" style="padding: 0">
105
114
  <SeqSetting
@@ -111,16 +120,14 @@
111
120
  @saveSeqConfig="saveSeqConfig"
112
121
  />
113
122
  </template>
114
- <div @click="clickHeader" v-if="moduleCode && dataCode" >
123
+ <div @click="clickHeader" v-if="moduleCode && dataCode">
115
124
  <Tooltip placement="topLeft">
116
- <template slot="title">
117
- 表头设置
118
- </template>
125
+ <template slot="title"> 表头设置 </template>
119
126
  <img
120
127
  src="../../styles/icon/seqConfig.svg"
121
128
  alt=""
122
- style="width: 20px;position: relative;right: 1px;"
123
- >
129
+ style="width: 20px; position: relative; right: 1px"
130
+ />
124
131
  </Tooltip>
125
132
  </div>
126
133
  </a-popover>
@@ -182,8 +189,8 @@
182
189
  size="small"
183
190
  @change="cellValueChange(scope)"
184
191
  v-model="scope.row[scope.column.property]"
185
- :formatter="value => numberFormatter(value, scope)"
186
- :parser="value => numberParse(value, scope)"
192
+ :formatter="(value) => numberFormatter(value, scope)"
193
+ :parser="(value) => numberParse(value, scope)"
187
194
  :min="scope.column.numberMin"
188
195
  :max="scope.column.numberMax"
189
196
  />
@@ -351,9 +358,17 @@
351
358
  .displayValues"
352
359
  :key="$index"
353
360
  >
354
- <a-input allowClear v-model="loopFilterValue.value[0]" @keyup.enter.native="filterConfirm(scope.column)" />
361
+ <a-input
362
+ allowClear
363
+ v-model="loopFilterValue.value[0]"
364
+ @keyup.enter.native="filterConfirm(scope.column)"
365
+ />
355
366
  </div>
356
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
367
+ <a-button
368
+ @click="saveFilterTable(scope.column)"
369
+ v-if="moduleCode && dataCode"
370
+ >默认配置</a-button
371
+ >
357
372
  <a-button @click="filterAddExp(scope.column)">添加条件</a-button>
358
373
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
359
374
  </div>
@@ -366,9 +381,17 @@
366
381
  .displayValues"
367
382
  :key="$index"
368
383
  >
369
- <a-input allowClear v-model="loopFilterValue.value[0]" @keyup.enter.native="filterConfirm(scope.column)" />
384
+ <a-input
385
+ allowClear
386
+ v-model="loopFilterValue.value[0]"
387
+ @keyup.enter.native="filterConfirm(scope.column)"
388
+ />
370
389
  </div>
371
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
390
+ <a-button
391
+ @click="saveFilterTable(scope.column)"
392
+ v-if="moduleCode && dataCode"
393
+ >默认配置</a-button
394
+ >
372
395
  <a-button @click="filterAddExp(scope.column)">添加条件</a-button>
373
396
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
374
397
  </div>
@@ -381,9 +404,17 @@
381
404
  .displayValues"
382
405
  :key="$index"
383
406
  >
384
- <a-input allowClear v-model="loopFilterValue.value[0]" @keyup.enter.native="filterConfirm(scope.column)" />
407
+ <a-input
408
+ allowClear
409
+ v-model="loopFilterValue.value[0]"
410
+ @keyup.enter.native="filterConfirm(scope.column)"
411
+ />
385
412
  </div>
386
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
413
+ <a-button
414
+ @click="saveFilterTable(scope.column)"
415
+ v-if="moduleCode && dataCode"
416
+ >默认配置</a-button
417
+ >
387
418
  <a-button @click="filterAddExp(scope.column)">添加条件</a-button>
388
419
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
389
420
  </div>
@@ -409,7 +440,11 @@
409
440
  @keyup.enter.native="filterConfirm(scope.column)"
410
441
  />
411
442
  </div>
412
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
443
+ <a-button
444
+ @click="saveFilterTable(scope.column)"
445
+ v-if="moduleCode && dataCode"
446
+ >默认配置</a-button
447
+ >
413
448
  <a-button @click="filterAddExp(scope.column)">添加条件</a-button>
414
449
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
415
450
  </div>
@@ -420,20 +455,39 @@
420
455
  v-model="scope.column.filters[0].data.displayValues"
421
456
  @keyup.enter.native="filterConfirm(scope.column)"
422
457
  >
423
- <a-input placeholder="请输入搜索内容" @change="displayValueSearchTextChange(scope.column)" v-model="scope.column.filters[0].data.displayValueSearchText" :addon-before="'已选'+scope.column.filters[0].data.displayValues.length"/>
424
- <div style="max-height:200px;overflow-y:scroll">
425
- <div style="text-align:left;" v-for="loopSource in scope.column.params.dataSource" :key="loopSource.value">
458
+ <a-input
459
+ placeholder="请输入搜索内容"
460
+ @change="displayValueSearchTextChange(scope.column)"
461
+ v-model="scope.column.filters[0].data.displayValueSearchText"
462
+ :addon-before="
463
+ '已选' + scope.column.filters[0].data.displayValues.length
464
+ "
465
+ />
466
+ <div style="max-height: 200px; overflow-y: scroll">
467
+ <div
468
+ style="text-align: left"
469
+ v-for="loopSource in scope.column.params.dataSource"
470
+ :key="loopSource.value"
471
+ >
426
472
  <a-checkbox
427
- v-show="loopSource.caption.indexOf(scope.column.filters[0].data.displayValueSearchText)>-1"
473
+ v-show="
474
+ loopSource.caption.indexOf(
475
+ scope.column.filters[0].data.displayValueSearchText
476
+ ) > -1
477
+ "
428
478
  :value="loopSource.value"
429
- style="margin: 5px 0;"
430
- >{{ loopSource.caption }}
479
+ style="margin: 5px 0"
480
+ >{{ loopSource.caption }}
431
481
  </a-checkbox>
432
482
  </div>
433
483
  </div>
434
484
  </a-checkbox-group>
435
- <br>
436
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
485
+ <br />
486
+ <a-button
487
+ @click="saveFilterTable(scope.column)"
488
+ v-if="moduleCode && dataCode"
489
+ >默认配置</a-button
490
+ >
437
491
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
438
492
  </div>
439
493
  </template>
@@ -443,20 +497,32 @@
443
497
  v-model="scope.column.filters[0].data.displayValues"
444
498
  @keyup.enter.native="filterConfirm(scope.column)"
445
499
  >
446
- <div style="max-height:200px;overflow-y:scroll">
447
- <div style="text-align:left;" v-for="loopSource in scope.column.params.dataSource" :key="loopSource.value">
500
+ <div style="max-height: 200px; overflow-y: scroll">
501
+ <div
502
+ style="text-align: left"
503
+ v-for="loopSource in scope.column.params.dataSource"
504
+ :key="loopSource.value"
505
+ >
448
506
  <a-checkbox
449
- v-show="loopSource.caption.indexOf(scope.column.filters[0].data.displayValueSearchText)>-1"
507
+ v-show="
508
+ loopSource.caption.indexOf(
509
+ scope.column.filters[0].data.displayValueSearchText
510
+ ) > -1
511
+ "
450
512
  :value="loopSource.value"
451
- style="margin: 5px 0;"
452
- >{{ loopSource.caption }}
513
+ style="margin: 5px 0"
514
+ >{{ loopSource.caption }}
453
515
  </a-checkbox>
454
516
  </div>
455
517
  </div>
456
518
  </a-checkbox-group>
457
- <br>
458
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
459
- <a-button @click="filterConfirm(scope.column)">确认</a-button>
519
+ <br />
520
+ <a-button
521
+ @click="saveFilterTable(scope.column)"
522
+ v-if="moduleCode && dataCode"
523
+ >默认配置</a-button
524
+ >
525
+ <a-button @click="filterConfirm(scope.column)">确认</a-button>
460
526
  </div>
461
527
  </template>
462
528
  <template #datetime_filter="scope">
@@ -494,7 +560,11 @@
494
560
  @keyup.enter.native="filterConfirm(scope.column)"
495
561
  />
496
562
  </div>
497
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
563
+ <a-button
564
+ @click="saveFilterTable(scope.column)"
565
+ v-if="moduleCode && dataCode"
566
+ >默认配置</a-button
567
+ >
498
568
  <a-button @click="filterAddExp(scope.column)">添加条件</a-button>
499
569
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
500
570
  </div>
@@ -507,13 +577,18 @@
507
577
  .displayValues"
508
578
  :key="$index"
509
579
  >
510
- <a-range-picker v-model:value="loopFilterValue.value"
580
+ <a-range-picker
581
+ v-model:value="loopFilterValue.value"
511
582
  valueFormat="YYYY-MM-DD"
512
583
  format="YYYY-MM-DD"
513
584
  @keyup.enter.native="filterConfirm(scope.column)"
514
585
  />
515
586
  </div>
516
- <a-button @click="saveFilterTable(scope.column)" v-if="moduleCode && dataCode">默认配置</a-button>
587
+ <a-button
588
+ @click="saveFilterTable(scope.column)"
589
+ v-if="moduleCode && dataCode"
590
+ >默认配置</a-button
591
+ >
517
592
  <a-button @click="filterAddExp(scope.column)">添加条件</a-button>
518
593
  <a-button @click="filterConfirm(scope.column)">确认</a-button>
519
594
  </div>
@@ -547,20 +622,20 @@
547
622
  </VxeModal> -->
548
623
  </div>
549
624
  </template>
550
- <script>
625
+ <script>
551
626
  //轻量级剪贴板复制函数
552
- import XEClipboard from "xe-clipboard";
627
+ import XEClipboard from 'xe-clipboard'
553
628
  //引入全局文件
554
- import { controlType } from "../../utils/enum";
629
+ import { controlType } from '../../utils/enum'
555
630
  //日期处理类库
556
- import moment from "moment";
631
+ import moment from 'moment'
557
632
  //拖拽排序功能
558
633
  //辅助函数 将store 中的 getter 映射到局部计算属性
559
- import { mapGetters } from "vuex";
634
+ import { mapGetters } from 'vuex'
560
635
  //xe-utils提供了一套实用的基础函数、任意格式的日期转换函数,浏览器相关操作函数等,详细使用百度
561
- import XEUtils from "xe-utils";
636
+ import XEUtils from 'xe-utils'
562
637
  //VXETable插件
563
- import VXETable from "vxe-table";
638
+ import VXETable from 'vxe-table'
564
639
  import { Tooltip } from 'ant-design-vue'
565
640
  //ant的空状态展示占位图
566
641
  import {
@@ -578,32 +653,32 @@ import {
578
653
  Icon,
579
654
  Popover,
580
655
  Tag,
581
- } from "ant-design-vue";
582
- import BasePagination from "../../BasePagination/index";
583
- import BasePulldown from "../../BasePulldown/index";
584
- import BaseGridAdjust from "../../BaseGridAdjust/index";
585
- import { saveUserModuleDataFieldApi } from "../../utils/api";
586
- import { gridDefaultValueDisplay } from "../../utils/filters";
587
- import SeqSetting from "./SeqSetting";
656
+ } from 'ant-design-vue'
657
+ import BasePagination from '../../BasePagination/index'
658
+ import BasePulldown from '../../BasePulldown/index'
659
+ import BaseGridAdjust from '../../BaseGridAdjust/index'
660
+ import { saveUserModuleDataFieldApi } from '../../utils/api'
661
+ import { gridDefaultValueDisplay } from '../../utils/filters'
662
+ import SeqSetting from './SeqSetting'
588
663
  export default {
589
- name: "BaseGrid",
664
+ name: 'BaseGrid',
590
665
  components: {
591
- "a-tag": Tag,
592
- "a-popover": Popover,
593
- "a-empty": Empty,
594
- "a-icon": Icon,
595
- "a-row": Row,
596
- "a-col": Col,
597
- "a-space": Space,
598
- "a-input": Input,
599
- "a-select": Select,
600
- "a-select-option": Select.Option,
601
- "a-date-picker": DatePicker,
602
- "a-checkbox": Checkbox,
603
- "a-input-number": InputNumber,
604
- "a-time-picker": TimePicker,
605
- "a-button": Button,
606
- 'a-checkbox-group':Checkbox.Group,
666
+ 'a-tag': Tag,
667
+ 'a-popover': Popover,
668
+ 'a-empty': Empty,
669
+ 'a-icon': Icon,
670
+ 'a-row': Row,
671
+ 'a-col': Col,
672
+ 'a-space': Space,
673
+ 'a-input': Input,
674
+ 'a-select': Select,
675
+ 'a-select-option': Select.Option,
676
+ 'a-date-picker': DatePicker,
677
+ 'a-checkbox': Checkbox,
678
+ 'a-input-number': InputNumber,
679
+ 'a-time-picker': TimePicker,
680
+ 'a-button': Button,
681
+ 'a-checkbox-group': Checkbox.Group,
607
682
  BasePagination,
608
683
  BasePulldown,
609
684
  BaseGridAdjust,
@@ -628,17 +703,17 @@ export default {
628
703
  simpleImage: null,
629
704
  dragOptions: {
630
705
  animation: 0,
631
- group: "description",
706
+ group: 'description',
632
707
  disabled: false,
633
- ghostClass: "ghost",
708
+ ghostClass: 'ghost',
634
709
  },
635
710
  menuConfig: {
636
711
  header: {
637
712
  options: [
638
713
  [
639
714
  {
640
- code: "clearFilter",
641
- name: "清空筛选",
715
+ code: 'clearFilter',
716
+ name: '清空筛选',
642
717
  visible: true,
643
718
  disabled: false,
644
719
  },
@@ -649,31 +724,31 @@ export default {
649
724
  options: [
650
725
  [
651
726
  {
652
- code: "refresh",
653
- name: "刷新",
727
+ code: 'refresh',
728
+ name: '刷新',
654
729
  visible: true,
655
730
  },
656
731
  {
657
- code: "copy",
658
- name: "复制",
732
+ code: 'copy',
733
+ name: '复制',
659
734
  visible: true,
660
735
  disabled: false,
661
736
  },
662
737
  {
663
- code: "sort",
664
- name: "排序",
665
- prefixIcon: "fa fa-sort color-blue",
738
+ code: 'sort',
739
+ name: '排序',
740
+ prefixIcon: 'fa fa-sort color-blue',
666
741
  children: [
667
- { code: "clearSort", name: "清除排序" },
742
+ { code: 'clearSort', name: '清除排序' },
668
743
  {
669
- code: "asc",
670
- name: "升序",
671
- prefixIcon: "fa fa-sort-alpha-asc color-orange",
744
+ code: 'asc',
745
+ name: '升序',
746
+ prefixIcon: 'fa fa-sort-alpha-asc color-orange',
672
747
  },
673
748
  {
674
- code: "desc",
675
- name: "倒序",
676
- prefixIcon: "fa fa-sort-alpha-desc color-orange",
749
+ code: 'desc',
750
+ name: '倒序',
751
+ prefixIcon: 'fa fa-sort-alpha-desc color-orange',
677
752
  },
678
753
  ],
679
754
  },
@@ -683,7 +758,7 @@ export default {
683
758
  },
684
759
  toolBarConfig: {
685
760
  custom: true,
686
- slots: { buttons: "toolbar_buttons" },
761
+ slots: { buttons: 'toolbar_buttons' },
687
762
  enabled: false,
688
763
  },
689
764
  filterExpression: [],
@@ -697,11 +772,11 @@ export default {
697
772
  },
698
773
  computed: {
699
774
  //使用对象展开运算符 将 getter 混入 computer 对象中
700
- ...mapGetters(["controlSize"]),
775
+ ...mapGetters(['controlSize']),
701
776
  // selectFilterChecked(){
702
777
  // return function(colInfo,checkValue){
703
778
  // //计算多选下拉筛选
704
-
779
+
705
780
  // let tempValue = XEUtils.indexOf(colInfo.filters[0].data.displayValues,checkValue)>-1
706
781
  // console.debug(tempValue)
707
782
  // return tempValue
@@ -710,43 +785,43 @@ export default {
710
785
  },
711
786
  filters: {
712
787
  displayText: function (row, column) {
713
- if (column.params.controlType === "select") {
788
+ if (column.params.controlType === 'select') {
714
789
  let tempItem = XEUtils.find(
715
790
  column.params.dataSource,
716
791
  (p) => p.value === row[column.property]
717
- );
792
+ )
718
793
  // let tempItems = column.params.dataSource.filter(filterItem => {
719
794
  // return filterItem.value === row[column.property]
720
795
  // })
721
796
  if (tempItem) {
722
- return tempItem.caption;
797
+ return tempItem.caption
723
798
  } else {
724
- return row[column.property];
799
+ return row[column.property]
725
800
  }
726
801
  }
727
802
 
728
- let linkField = column.property.split(".");
803
+ let linkField = column.property.split('.')
729
804
  if (linkField.length > 1) {
730
- let fieldValue = row;
805
+ let fieldValue = row
731
806
  for (let i = 0; i < linkField.length; i++) {
732
807
  if (
733
808
  fieldValue[linkField[i]] === undefined ||
734
809
  fieldValue[linkField[i]] === null
735
810
  ) {
736
- return null;
811
+ return null
737
812
  }
738
- fieldValue = fieldValue[linkField[i]];
813
+ fieldValue = fieldValue[linkField[i]]
739
814
  }
740
- return fieldValue;
815
+ return fieldValue
741
816
  }
742
- if (column.params.controlType === "checkbox") {
743
- return row[column.property] === true ? "" : "";
817
+ if (column.params.controlType === 'checkbox') {
818
+ return row[column.property] === true ? '' : ''
744
819
  }
745
820
 
746
821
  if (column.params.displayField) {
747
- return row[column.params.displayField];
822
+ return row[column.params.displayField]
748
823
  }
749
- return row[column.property];
824
+ return row[column.property]
750
825
  },
751
826
  },
752
827
  props: {
@@ -761,7 +836,7 @@ export default {
761
836
  defaultSort: {
762
837
  type: Array,
763
838
  default: function () {
764
- return [];
839
+ return []
765
840
  },
766
841
  },
767
842
  showFilter: {
@@ -779,41 +854,41 @@ export default {
779
854
  sortRemote: {
780
855
  type: Boolean,
781
856
  default: () => {
782
- return true;
857
+ return true
783
858
  },
784
859
  },
785
860
  //筛选判断是否远程
786
861
  filterRemote: {
787
862
  type: Boolean,
788
863
  default: () => {
789
- return false;
864
+ return false
790
865
  },
791
866
  },
792
867
  checkboxConfig: {
793
868
  type: Object,
794
869
  default: () => {
795
- return null;
870
+ return null
796
871
  },
797
872
  deep: true,
798
873
  },
799
874
  treeConfig: {
800
875
  type: Object,
801
876
  default: () => {
802
- return null;
877
+ return null
803
878
  },
804
879
  deep: true,
805
880
  },
806
881
  rowConfig: {
807
882
  type: Object,
808
883
  default: () => {
809
- return null;
884
+ return null
810
885
  },
811
886
  deep: true,
812
887
  },
813
888
  expandConfig: {
814
889
  type: Object,
815
890
  default: () => {
816
- return null;
891
+ return null
817
892
  },
818
893
  deep: true,
819
894
  },
@@ -834,51 +909,51 @@ export default {
834
909
  pager: {
835
910
  type: Object,
836
911
  default: () => {
837
- return null;
912
+ return null
838
913
  },
839
914
  deep: true,
840
915
  },
841
916
  showSeq: {
842
917
  type: Boolean,
843
918
  default: () => {
844
- return true;
919
+ return true
845
920
  },
846
921
  },
847
922
  showMenu: {
848
923
  type: Boolean,
849
924
  default: () => {
850
- return true;
925
+ return true
851
926
  },
852
927
  },
853
928
  showExpand: {
854
929
  type: Boolean,
855
930
  default: () => {
856
- return false;
931
+ return false
857
932
  },
858
933
  },
859
934
  isOld: {
860
935
  type: Boolean,
861
936
  default: () => {
862
- return false;
937
+ return false
863
938
  },
864
939
  },
865
940
  emptyText: {
866
941
  type: String,
867
942
  default: () => {
868
- return "";
943
+ return ''
869
944
  },
870
945
  },
871
946
  columns: {
872
947
  type: Array,
873
948
  default: () => {
874
- return [];
949
+ return []
875
950
  },
876
951
  deep: true,
877
952
  },
878
953
  editStates: {
879
954
  type: Array,
880
955
  default: () => {
881
- return null;
956
+ return null
882
957
  },
883
958
  deep: true,
884
959
  },
@@ -889,14 +964,14 @@ export default {
889
964
  formRow: {
890
965
  type: Object,
891
966
  default: () => {
892
- return {};
967
+ return {}
893
968
  },
894
969
  deep: true,
895
970
  },
896
971
  editStatuss: {
897
972
  type: Array,
898
973
  default: () => {
899
- return null;
974
+ return null
900
975
  },
901
976
  deep: true,
902
977
  },
@@ -914,66 +989,69 @@ export default {
914
989
  // },
915
990
  dataName: {
916
991
  type: String,
917
- default: "",
992
+ default: '',
918
993
  },
919
994
  moduleCode: {
920
995
  type: String,
921
- default: "",
996
+ default: '',
922
997
  },
923
998
  dataCode: {
924
999
  type: String,
925
- default: "",
1000
+ default: '',
926
1001
  },
927
1002
  rows: {
928
1003
  type: Array,
929
1004
  default: () => {
930
- return [];
1005
+ return []
931
1006
  },
932
1007
  deep: true,
933
1008
  },
934
1009
  },
935
1010
  beforeCreate() {
936
- this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
1011
+ this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE
937
1012
  },
938
1013
  watch: {
939
1014
  tagData: {
940
- handler: function(newVal) {
941
- this.$nextTick(()=>{
1015
+ handler: function (newVal) {
1016
+ this.$nextTick(() => {
942
1017
  this.tagChange()
943
1018
  })
944
1019
  },
945
- deep: true
946
- }
1020
+ deep: true,
1021
+ },
947
1022
  },
948
1023
  created() {
949
- try{
950
- if(this.pager && this.pager.sizeOptions) {
951
- this.pager.sizeOptions = XEUtils.map(this.pager.sizeOptions, item => {
1024
+ try {
1025
+ if (this.pager && this.pager.sizeOptions) {
1026
+ this.pager.sizeOptions = XEUtils.map(this.pager.sizeOptions, (item) => {
952
1027
  return Number(item)
953
1028
  })
954
1029
  }
955
- } catch(err) {
1030
+ } catch (err) {
956
1031
  console.debug(err)
957
1032
  }
958
1033
  //拖动后输入框有错位问题,暂时不启用
959
1034
  // this.initColumnDrop()
960
1035
  for (let i = 0; i < this.columns.length; i++) {
961
- this.internalColumns.push(this.initColumns(this.columns[i]));
962
- if(this.columns[i].visible !== false && this.columns[i].controlType !== 'operation') {
963
- this.internalColumns[i].slots.header = this.columns[i].field;
1036
+ this.internalColumns.push(this.initColumns(this.columns[i]))
1037
+ if (
1038
+ this.columns[i].visible !== false &&
1039
+ this.columns[i].controlType !== 'operation'
1040
+ ) {
1041
+ this.internalColumns[i].slots.header = this.columns[i].field
964
1042
  }
965
1043
  }
966
1044
 
967
1045
  // 初始化排序和筛选
968
1046
  if (this.sortRemote) {
969
- let data = []
970
- this.defaultSort.forEach(x => {
971
- data.push([x.field, x.order])
972
- })
973
- this.$emit("sortModify", data);
1047
+ let data = []
1048
+ this.defaultSort.forEach((x) => {
1049
+ data.push([x.field, x.order])
1050
+ })
1051
+ this.$emit('sortModify', data)
974
1052
 
975
- //设置筛选过滤条件
976
- this.setFilterExpression(this.internalColumns);
1053
+ //设置筛选过滤条件
1054
+ this.setFilterExpression(this.internalColumns)
977
1055
  }
978
1056
 
979
1057
  if (this.showSeq) {
@@ -981,11 +1059,11 @@ export default {
981
1059
  // {
982
1060
  // children: [
983
1061
  {
984
- type: "seq",
985
- fixed: "left",
1062
+ type: 'seq',
1063
+ fixed: 'left',
986
1064
  width: 50,
987
1065
  slots: {
988
- header: "seqHeader",
1066
+ header: 'seqHeader',
989
1067
  },
990
1068
  params: {
991
1069
  disableUserVisible: true,
@@ -996,43 +1074,47 @@ export default {
996
1074
  // header: 'seqHeader'
997
1075
  // }
998
1076
  // }
999
- );
1077
+ )
1000
1078
  }
1001
1079
 
1002
1080
  if (this.showCheckBox) {
1003
1081
  this.internalColumns.push({
1004
- type: "checkbox",
1005
- fixed: "left",
1082
+ type: 'checkbox',
1083
+ fixed: 'left',
1006
1084
  width: 40,
1007
1085
  params: {
1008
1086
  disableUserVisible: true,
1009
1087
  },
1010
- });
1088
+ })
1011
1089
  }
1012
- this.gridEdit = this.edit;
1090
+ this.gridEdit = this.edit
1013
1091
  },
1014
1092
  mounted() {
1015
1093
  // 头部筛选条件标签数据
1016
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
1094
+ this.tagData = JSON.parse(
1095
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
1096
+ )
1017
1097
  // 默认配置数据
1018
1098
  this.defaultPostData = {
1019
1099
  moduleCode: this.moduleCode,
1020
1100
  dataCode: this.dataCode,
1021
1101
  fields: [],
1022
1102
  }
1023
- let defaultColumns =
1024
- this.$refs.baseGrid.getTableColumn().collectColumn
1025
- .filter(x => (x.field !== "operation") && (x.field !== undefined))
1103
+ let defaultColumns = this.$refs.baseGrid
1104
+ .getTableColumn()
1105
+ .collectColumn.filter(
1106
+ (x) => x.field !== 'operation' && x.field !== undefined
1107
+ )
1026
1108
  defaultColumns.forEach((item, index) => {
1027
1109
  let tempData = {
1028
1110
  field: item.field,
1029
1111
  sort: index + 1,
1030
1112
  hidden: !item.visible,
1031
1113
  width: item.width,
1032
- extraInfo:{}
1114
+ extraInfo: {},
1033
1115
  }
1034
1116
  if (item.filters && item.filters[0].data.bindingValues.length) {
1035
- item.filters[0].checked = true;
1117
+ item.filters[0].checked = true
1036
1118
  tempData.extraInfo.filterExpression = item.filters
1037
1119
  }
1038
1120
  if (item.order) {
@@ -1048,54 +1130,59 @@ export default {
1048
1130
  },
1049
1131
  // 取消当前字段筛选
1050
1132
  tagClosable(colInfo) {
1051
- colInfo.filters[0].data.bindingValues = [];
1052
- colInfo.filters[0].data.displayValues = [];
1133
+ colInfo.filters[0].data.bindingValues = []
1134
+ colInfo.filters[0].data.displayValues = []
1053
1135
  colInfo.filters[0].checked =
1054
- colInfo.filters[0].data.bindingValues.length > 0;
1136
+ colInfo.filters[0].data.bindingValues.length > 0
1055
1137
  // 关联更改表格字段筛选,因为setFilterExpression获取当前表格列表数据
1056
- this.$refs.baseGrid.getCheckedFilters().forEach(x=>{
1057
- if (x.column.field == colInfo.field && x.column.title == colInfo.title) {
1058
- x.column.filters[0].data.bindingValues = [];
1059
- x.column.filters[0].data.displayValues = [];
1138
+ this.$refs.baseGrid.getCheckedFilters().forEach((x) => {
1139
+ if (
1140
+ x.column.field == colInfo.field &&
1141
+ x.column.title == colInfo.title
1142
+ ) {
1143
+ x.column.filters[0].data.bindingValues = []
1144
+ x.column.filters[0].data.displayValues = []
1060
1145
  x.column.filters[0].checked =
1061
- x.column.filters[0].data.bindingValues.length > 0;
1146
+ x.column.filters[0].data.bindingValues.length > 0
1062
1147
  }
1063
1148
  })
1064
1149
  if (this.filterRemote) {
1065
1150
  //设置筛选过滤条件
1066
- this.setFilterExpression();
1151
+ this.setFilterExpression()
1067
1152
  //通知外部筛选改变事件
1068
- this.$emit("filterChange", { filterCol: colInfo });
1153
+ this.$emit('filterChange', { filterCol: colInfo })
1069
1154
  } else {
1070
1155
  // 手动触发重新筛选filterMethod()方法
1071
1156
  this.$refs.baseGrid.updateData()
1072
1157
  }
1073
1158
  // 初始标签
1074
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
1159
+ this.tagData = JSON.parse(
1160
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
1161
+ )
1075
1162
  },
1076
- exportDataEvent () {
1163
+ exportDataEvent() {
1077
1164
  this.$refs.baseGrid.exportData({ type: 'csv' })
1078
1165
  },
1079
1166
  getExpTags(filterList) {
1080
1167
  //构造查询条件
1081
- let returnExp = [];
1168
+ let returnExp = []
1082
1169
  for (let loopProp in filterList) {
1083
1170
  let tempExpTag = {
1084
1171
  expressions: [],
1085
- operator: "or",
1086
- };
1087
- let tempControlType = filterList[loopProp].column.params.controlType;
1088
- let tempIsAddTime = filterList[loopProp].isAddTime;
1172
+ operator: 'or',
1173
+ }
1174
+ let tempControlType = filterList[loopProp].column.params.controlType
1175
+ let tempIsAddTime = filterList[loopProp].isAddTime
1089
1176
  for (let i = 0; i < filterList[loopProp].column.filters.length; i++) {
1090
- let tempValue = filterList[loopProp].column.filters[i];
1177
+ let tempValue = filterList[loopProp].column.filters[i]
1091
1178
 
1092
1179
  if (tempControlType === controlType.text) {
1093
1180
  // 文本框
1094
1181
  tempExpTag.expressions.push({
1095
1182
  field: filterList[loopProp].property,
1096
- operator: "CO",
1183
+ operator: 'CO',
1097
1184
  value: tempValue.value,
1098
- });
1185
+ })
1099
1186
  }
1100
1187
  // if (tempControlType === controlType.date)
1101
1188
  // {
@@ -1113,9 +1200,9 @@ export default {
1113
1200
  // 数字范围
1114
1201
  tempExpTag.expressions.push({
1115
1202
  field: filterList[loopProp].property,
1116
- operator: "RA",
1203
+ operator: 'RA',
1117
1204
  value: [tempValue.value.min, tempValue.value.max],
1118
- });
1205
+ })
1119
1206
  } else if (
1120
1207
  tempControlType === controlType.datetime ||
1121
1208
  tempControlType === controlType.date
@@ -1124,14 +1211,14 @@ export default {
1124
1211
  // if (tempIsAddTime === true) {
1125
1212
  tempExpTag.expressions.push({
1126
1213
  field: filterList[loopProp].property,
1127
- operator: "RA",
1214
+ operator: 'RA',
1128
1215
  value: [
1129
1216
  // tempValue.value[0] + ' 00:00:00',
1130
1217
  // tempValue.value[1] + ' 23:59:59'
1131
1218
  tempValue.value[0],
1132
1219
  tempValue.value[1],
1133
1220
  ],
1134
- });
1221
+ })
1135
1222
  // } else {
1136
1223
  // tempExpTag.expressions.push({
1137
1224
  // field: filterList[loopProp].property,
@@ -1146,232 +1233,234 @@ export default {
1146
1233
  //下拉多选
1147
1234
  tempExpTag.expressions.push({
1148
1235
  field: filterList[loopProp].property,
1149
- operator: "IN",
1236
+ operator: 'IN',
1150
1237
  value: filterList[loopProp].datas[0],
1151
- });
1238
+ })
1152
1239
  } else if (tempControlType === controlType.checkbox) {
1153
1240
  //实际上checkbox的value数组里就一个值 这边是为了兼容select的结构
1154
1241
  tempExpTag.expressions.push({
1155
1242
  field: filterList[loopProp].property,
1156
- operator: "EQ",
1157
- value: tempValue.value.indexOf("true") >= 0 ? true : false,
1158
- });
1243
+ operator: 'EQ',
1244
+ value: tempValue.value.indexOf('true') >= 0 ? true : false,
1245
+ })
1159
1246
  } else {
1160
1247
  // 文本框
1161
1248
  tempExpTag.expressions.push({
1162
1249
  field: filterList[loopProp].property,
1163
- operator: "CO",
1250
+ operator: 'CO',
1164
1251
  value: tempValue.value,
1165
- });
1252
+ })
1166
1253
  }
1167
1254
  }
1168
1255
  if (tempExpTag.expressions.length > 0 || tempExpTag.field) {
1169
- returnExp.push(tempExpTag);
1256
+ returnExp.push(tempExpTag)
1170
1257
  }
1171
1258
  }
1172
- return returnExp;
1259
+ return returnExp
1173
1260
  },
1174
1261
  rangeChange(column) {
1175
- let vm = this;
1262
+ let vm = this
1176
1263
  if (vm.filterRemote) {
1177
1264
  column.filters.forEach((f) => {
1178
- f.checked = true;
1179
- });
1265
+ f.checked = true
1266
+ })
1180
1267
  vm.$refs.baseGrid.setFilter(column.field, column.filters).then(() => {
1181
- this.$emit("filterChange");
1182
- });
1268
+ this.$emit('filterChange')
1269
+ })
1183
1270
  } else {
1184
- const xTable = this.$refs.baseGrid;
1271
+ const xTable = this.$refs.baseGrid
1185
1272
  // 设置为选中状态
1186
1273
  for (let i = 0; i < column.filters.length; i++) {
1187
1274
  if (!column.filters[i].value) {
1188
- column.filters[i].checked = false;
1275
+ column.filters[i].checked = false
1189
1276
  } else {
1190
- column.filters[i].checked = true;
1277
+ column.filters[i].checked = true
1191
1278
  }
1192
1279
  }
1193
1280
  // 修改条件之后,需要手动调用 updateData 处理表格数据
1194
- xTable.updateData();
1281
+ xTable.updateData()
1195
1282
  }
1196
1283
  },
1197
1284
  //日期筛选变化
1198
1285
  dateChange(column, dates) {
1199
- let vm = this;
1286
+ let vm = this
1200
1287
  if (vm.filterRemote) {
1201
1288
  if (dates.length > 0) {
1202
- column.filters[0].checked = true;
1203
- column.filters[0].data.range = dates; //显示的值
1204
- column.filters[0].data.beginDate = dates[0];
1205
- column.filters[0].data.endDate = dates[1];
1206
- vm.$refs.baseGrid.setFilter(column.field, column.filters);
1289
+ column.filters[0].checked = true
1290
+ column.filters[0].data.range = dates //显示的值
1291
+ column.filters[0].data.beginDate = dates[0]
1292
+ column.filters[0].data.endDate = dates[1]
1293
+ vm.$refs.baseGrid.setFilter(column.field, column.filters)
1207
1294
  } else {
1208
- column.filters[0].checked = false;
1209
- column.filters[0].data.range = dates;
1295
+ column.filters[0].checked = false
1296
+ column.filters[0].data.range = dates
1210
1297
  vm.$refs.baseGrid
1211
1298
  .setFilter(column.field, column.filters)
1212
1299
  .then((res) => {
1213
- this.$emit("filterChange");
1214
- });
1300
+ this.$emit('filterChange')
1301
+ })
1215
1302
  }
1216
1303
  } else {
1217
- const xTable = this.$refs.baseGrid;
1304
+ const xTable = this.$refs.baseGrid
1218
1305
  // 设置为选中状态
1219
1306
  for (let i = 0; i < column.filters.length; i++) {
1220
1307
  if (!column.filters[i].value) {
1221
- column.filters[i].checked = false;
1308
+ column.filters[i].checked = false
1222
1309
  } else {
1223
- column.filters[i].checked = true;
1310
+ column.filters[i].checked = true
1224
1311
  }
1225
1312
  }
1226
1313
  // 修改条件之后,需要手动调用 updateData 处理表格数据
1227
- xTable.updateData();
1314
+ xTable.updateData()
1228
1315
  }
1229
1316
  },
1230
1317
  inputChange(column) {
1231
- let vm = this;
1318
+ let vm = this
1232
1319
  if (vm.filterRemote) {
1233
1320
  for (let i = 0; i < column.filters.length; i++) {
1234
1321
  if (!column.filters[i].value) {
1235
- column.filters[i].checked = false;
1322
+ column.filters[i].checked = false
1236
1323
  } else {
1237
- column.filters[i].checked = true;
1324
+ column.filters[i].checked = true
1238
1325
  }
1239
1326
  }
1240
1327
  vm.$refs.baseGrid
1241
1328
  .setFilter(column.field, column.filters)
1242
1329
  .then((res) => {
1243
- this.$emit("filterChange");
1244
- });
1330
+ this.$emit('filterChange')
1331
+ })
1245
1332
  } else {
1246
- const xTable = this.$refs.baseGrid;
1333
+ const xTable = this.$refs.baseGrid
1247
1334
  // 设置为选中状态
1248
1335
  for (let i = 0; i < column.filters.length; i++) {
1249
1336
  if (!column.filters[i].value) {
1250
- column.filters[i].checked = false;
1337
+ column.filters[i].checked = false
1251
1338
  } else {
1252
- column.filters[i].checked = true;
1339
+ column.filters[i].checked = true
1253
1340
  }
1254
1341
  }
1255
1342
  // 修改条件之后,需要手动调用 updateData 处理表格数据
1256
- xTable.updateData();
1343
+ xTable.updateData()
1257
1344
  }
1258
1345
  },
1259
1346
  textEditEnter(valueInfo) {
1260
1347
  if (this.textValue) {
1261
- valueInfo.visible = false;
1262
- valueInfo.value = this.textValue;
1263
- this.textValue = "";
1348
+ valueInfo.visible = false
1349
+ valueInfo.value = this.textValue
1350
+ this.textValue = ''
1264
1351
  }
1265
- this.$emit("searchBtnClick", null);
1352
+ this.$emit('searchBtnClick', null)
1266
1353
  },
1267
1354
  editPopupVisibleChange(editKey, originValue, valueIndex, visible) {
1268
1355
  if (visible === true) {
1269
- let vm = this;
1270
- this.textValue = originValue.value;
1356
+ let vm = this
1357
+ this.textValue = originValue.value
1271
1358
  setTimeout(() => {
1272
- vm.$refs[editKey + "_edit_" + valueIndex][0].$el.focus();
1273
- vm.$refs[editKey + "_edit_" + valueIndex][0].$el.select();
1274
- }, 10);
1359
+ vm.$refs[editKey + '_edit_' + valueIndex][0].$el.focus()
1360
+ vm.$refs[editKey + '_edit_' + valueIndex][0].$el.select()
1361
+ }, 10)
1275
1362
  }
1276
1363
  },
1277
1364
  closeTagPreventDefault(colValue, valueIndex, event) {
1278
- colValue.values.splice(valueIndex, 1);
1279
- event.preventDefault();
1280
- this.$emit("searchBtnClick", null);
1365
+ colValue.values.splice(valueIndex, 1)
1366
+ event.preventDefault()
1367
+ this.$emit('searchBtnClick', null)
1281
1368
  },
1282
1369
  //右键菜单事件
1283
1370
  contextMenuClickEvent({ menu, row, column }) {
1284
- let vm = this;
1285
- const $table = this.$refs.baseGrid;
1371
+ let vm = this
1372
+ const $table = this.$refs.baseGrid
1286
1373
  if (column && column.field) {
1287
1374
  if (
1288
- menu.code !== "sort" &&
1289
- menu.code !== "copy" &&
1290
- menu.code !== "refresh" &&
1291
- menu.code !== "clearFilter"
1375
+ menu.code !== 'sort' &&
1376
+ menu.code !== 'copy' &&
1377
+ menu.code !== 'refresh' &&
1378
+ menu.code !== 'clearFilter'
1292
1379
  ) {
1293
- $table.sort(column.field, menu.code);
1380
+ $table.sort(column.field, menu.code)
1294
1381
  }
1295
1382
  }
1296
1383
  switch (menu.code) {
1297
- case "copy":
1384
+ case 'copy':
1298
1385
  // 示例
1299
1386
  if (row && column) {
1300
1387
  if (XEClipboard.copy(row[column.property])) {
1301
1388
  VXETable.modal.message({
1302
- content: "已复制到剪贴板!",
1303
- status: "success",
1304
- });
1389
+ content: '已复制到剪贴板!',
1390
+ status: 'success',
1391
+ })
1305
1392
  }
1306
1393
  }
1307
- break;
1308
- case "clearFilter":
1394
+ break
1395
+ case 'clearFilter':
1309
1396
  // 示例
1310
- const filterList = this.$refs.baseGrid.getCheckedFilters();
1397
+ const filterList = this.$refs.baseGrid.getCheckedFilters()
1311
1398
  filterList.forEach((col) => {
1312
- this.$refs.baseGrid.clearFilter(col.column);
1313
- this.internalColumns.forEach(column => {
1314
- if(column.field==col.property){
1315
- this.$set(column.filters[0].data,'displayValues',[])
1316
- this.$set(column.filters[0].data,'bindingValues',[])
1317
- }
1318
- });
1319
- //这个col和 internalColumn之间没有绑定上
1320
- col.column.filters = [
1321
- {
1322
- data: {
1323
- bindingValues: [],
1324
- displayValues: [],
1325
- displayValueSearchText:''
1326
- }
1327
- }
1328
- ]
1329
- });
1330
- // this.$refs.baseGrid.clearFilter();
1331
- XEUtils.clear(this.filterExpression)
1332
- // 初始标签
1333
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
1334
- vm.$emit("filterChange");
1335
- break;
1336
- case "desc":
1399
+ this.$refs.baseGrid.clearFilter(col.column)
1400
+ this.internalColumns.forEach((column) => {
1401
+ if (column.field == col.property) {
1402
+ this.$set(column.filters[0].data, 'displayValues', [])
1403
+ this.$set(column.filters[0].data, 'bindingValues', [])
1404
+ }
1405
+ })
1406
+ //这个col和 internalColumn之间没有绑定上
1407
+ col.column.filters = [
1408
+ {
1409
+ data: {
1410
+ bindingValues: [],
1411
+ displayValues: [],
1412
+ displayValueSearchText: '',
1413
+ },
1414
+ },
1415
+ ]
1416
+ })
1417
+ // this.$refs.baseGrid.clearFilter();
1418
+ XEUtils.clear(this.filterExpression)
1419
+ // 初始标签
1420
+ this.tagData = JSON.parse(
1421
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
1422
+ )
1423
+ vm.$emit('filterChange')
1424
+ break
1425
+ case 'desc':
1337
1426
  if (this.sortRemote) {
1338
1427
  let data = []
1339
- $table.getSortColumns().forEach(x=> {
1340
- data.push([x.field,x.order])
1428
+ $table.getSortColumns().forEach((x) => {
1429
+ data.push([x.field, x.order])
1341
1430
  })
1342
- this.$emit("sortChange", data);
1431
+ this.$emit('sortChange', data)
1343
1432
  }
1344
- break;
1345
- case "asc":
1433
+ break
1434
+ case 'asc':
1346
1435
  if (this.sortRemote) {
1347
1436
  let data = []
1348
- $table.getSortColumns().forEach(x=> {
1349
- data.push([x.field,x.order])
1437
+ $table.getSortColumns().forEach((x) => {
1438
+ data.push([x.field, x.order])
1350
1439
  })
1351
- this.$emit("sortChange", data);
1440
+ this.$emit('sortChange', data)
1352
1441
  }
1353
- break;
1354
- case "clearSort":
1355
- let sortColumns = $table.getSortColumns();
1442
+ break
1443
+ case 'clearSort':
1444
+ let sortColumns = $table.getSortColumns()
1356
1445
  sortColumns.forEach((col) => {
1357
- col.column.order = "";
1358
- });
1446
+ col.column.order = ''
1447
+ })
1359
1448
  if (this.sortRemote) {
1360
- this.$emit("sortChange", []);
1449
+ this.$emit('sortChange', [])
1361
1450
  }
1362
- break;
1363
- case "refresh":
1451
+ break
1452
+ case 'refresh':
1364
1453
  let data = []
1365
- $table.getSortColumns().forEach(x=> {
1366
- data.push([x.field,x.order])
1454
+ $table.getSortColumns().forEach((x) => {
1455
+ data.push([x.field, x.order])
1367
1456
  })
1368
- this.$emit("sortChange", data);
1369
- break;
1457
+ this.$emit('sortChange', data)
1458
+ break
1370
1459
  default:
1371
1460
  }
1372
1461
  },
1373
1462
  getFiltersList() {
1374
- return this.filterExpression;
1463
+ return this.filterExpression
1375
1464
  // let vm = this
1376
1465
  // const filterList = vm.$refs.baseGrid.getCheckedFilters()
1377
1466
 
@@ -1380,49 +1469,48 @@ export default {
1380
1469
  // return expList
1381
1470
  },
1382
1471
  getSorts() {
1383
- return this.defaultSort.map(item=> [item.field,item.order]);
1472
+ return this.defaultSort.map((item) => [item.field, item.order])
1384
1473
  },
1385
1474
  filterChange({ column, property, values, datas, filterList, $event }) {
1386
- let vm = this;
1475
+ let vm = this
1387
1476
  //如果不是远程筛选 就不emit了
1388
1477
  if (!this.filterRemote) {
1389
- return;
1478
+ return
1390
1479
  }
1391
- vm.$emit("filterChange");
1480
+ vm.$emit('filterChange')
1392
1481
  },
1393
1482
  // sysRowStateFilter(scope){
1394
1483
  // return scope.row.sysRowState!==scope.value
1395
1484
  // },
1396
1485
  initColumns(originCol) {
1397
- let vm = this;
1398
- let colParams = {};
1486
+ let vm = this
1487
+ let colParams = {}
1399
1488
 
1400
1489
  let colInfo = {
1401
1490
  field: originCol.field,
1402
1491
  title: originCol.title,
1403
1492
  tooltip: originCol.tooltip,
1404
1493
  visible: true,
1405
- };
1494
+ }
1406
1495
 
1407
- if(XEUtils.has(originCol,'showOverflow')){
1496
+ if (XEUtils.has(originCol, 'showOverflow')) {
1408
1497
  colInfo['showOverflow'] = originCol.showOverflow
1409
1498
  }
1410
1499
 
1411
-
1412
1500
  let customSlot = {
1413
- default: "default",
1414
- };
1501
+ default: 'default',
1502
+ }
1415
1503
 
1416
1504
  if (originCol.slots) {
1417
- customSlot = originCol.slots;
1505
+ customSlot = originCol.slots
1418
1506
  }
1419
1507
 
1420
1508
  if (originCol.treeNode === true) {
1421
- colInfo["treeNode"] = true;
1509
+ colInfo['treeNode'] = true
1422
1510
  }
1423
1511
  if (originCol.isMerge === true) {
1424
1512
  //合并行
1425
- this.mergeFields.push(originCol.field);
1513
+ this.mergeFields.push(originCol.field)
1426
1514
  }
1427
1515
  //判断originCol的showHeaderOverflow是否为true
1428
1516
  // if (originCol.showHeaderOverflow) {
@@ -1437,83 +1525,83 @@ export default {
1437
1525
  //判断originCol的filters是否为数组 暂时不知道是否有被用到
1438
1526
  if (XEUtils.isArray(originCol.filters)) {
1439
1527
  //是就给colInfo加一个属性filters并把传入的形参传给新加的属性
1440
- colInfo["filters"] = originCol.filters;
1528
+ colInfo['filters'] = originCol.filters
1441
1529
  }
1442
1530
  //vxe-table列配置
1443
1531
  //判断originCol的filterMethod是否为true
1444
1532
  if (originCol.filterMethod) {
1445
1533
  //是就给colInfo加一个属性filterMethod并把形参赋值给新加的属性,这样
1446
- colInfo["filterMethod"] = originCol.filterMethod;
1534
+ colInfo['filterMethod'] = originCol.filterMethod
1447
1535
  }
1448
1536
  if (originCol.align) {
1449
- colInfo["align"] = originCol.align;
1537
+ colInfo['align'] = originCol.align
1450
1538
  }
1451
1539
  if (originCol.visible === false) {
1452
- colInfo.visible = false;
1540
+ colInfo.visible = false
1453
1541
  }
1454
1542
  //在不启用 筛选框的情况下 可以显示 因为 表头分组的关系
1455
1543
  if (originCol.sortable === true) {
1456
- colInfo["sortable"] = true;
1457
- colInfo["sortType"] = "auto";
1458
- if (originCol.order){
1459
- this.defaultSort.push({
1460
- field: originCol.field,
1461
- order: originCol.order
1462
- })
1544
+ colInfo['sortable'] = true
1545
+ colInfo['sortType'] = 'auto'
1546
+ if (originCol.order) {
1547
+ this.defaultSort.push({
1548
+ field: originCol.field,
1549
+ order: originCol.order,
1550
+ })
1463
1551
  }
1464
1552
  }
1465
1553
  if (originCol.fixed) {
1466
- colInfo["fixed"] = originCol.fixed === "left" ? "left" : "right";
1554
+ colInfo['fixed'] = originCol.fixed === 'left' ? 'left' : 'right'
1467
1555
  }
1468
1556
  if (originCol.formatter) {
1469
- colInfo["formatter"] = originCol.formatter;
1557
+ colInfo['formatter'] = originCol.formatter
1470
1558
  }
1471
1559
  if (originCol.params) {
1472
- colParams = originCol.params;
1560
+ colParams = originCol.params
1473
1561
  }
1474
1562
 
1475
1563
  if (originCol.footerSum === true) {
1476
- this.showFooter = true;
1477
- this.footerSum.push(colInfo.field);
1564
+ this.showFooter = true
1565
+ this.footerSum.push(colInfo.field)
1478
1566
  }
1479
1567
  if (originCol.route) {
1480
- colParams["route"] = originCol.route;
1481
- customSlot["default"] = "linkCell";
1568
+ colParams['route'] = originCol.route
1569
+ customSlot['default'] = 'linkCell'
1482
1570
  }
1483
1571
  //默认text
1484
1572
  if (!originCol.controlType) {
1485
- originCol.controlType = controlType.text;
1573
+ originCol.controlType = controlType.text
1486
1574
  }
1487
1575
  if (originCol.controlType === controlType.checkbox) {
1488
1576
  originCol.dataSource = [
1489
- {caption:'是',value: true},
1490
- {caption:'否',value: false}
1577
+ { caption: '是', value: true },
1578
+ { caption: '否', value: false },
1491
1579
  ]
1492
1580
  }
1493
1581
  if (originCol.controlType === controlType.customRadio) {
1494
- colInfo["type"] = "radio";
1495
- customSlot["radio"] = "customRadio";
1496
- customSlot["footer"] = "customFooter";
1582
+ colInfo['type'] = 'radio'
1583
+ customSlot['radio'] = 'customRadio'
1584
+ customSlot['footer'] = 'customFooter'
1497
1585
  }
1498
1586
  if (originCol.isExpand === true) {
1499
- colInfo["type"] = "expand";
1500
- customSlot["content"] = "expandContent";
1501
- customSlot["default"] = "expandDefault";
1587
+ colInfo['type'] = 'expand'
1588
+ customSlot['content'] = 'expandContent'
1589
+ customSlot['default'] = 'expandDefault'
1502
1590
  }
1503
1591
  if (originCol.controlType === controlType.customCell) {
1504
- customSlot["default"] = "customCell";
1505
- customSlot["footer"] = "customFooter";
1592
+ customSlot['default'] = 'customCell'
1593
+ customSlot['footer'] = 'customFooter'
1506
1594
  }
1507
1595
  if (originCol.isCheckbox === true) {
1508
- colInfo["type"] = "checkbox";
1596
+ colInfo['type'] = 'checkbox'
1509
1597
  // colInfo['field'] = 'matCode'
1510
1598
  }
1511
- colParams.dataSource = originCol.dataSource;
1599
+ colParams.dataSource = originCol.dataSource
1512
1600
  if (originCol.rules) {
1513
- this.validRules[colInfo.field] = originCol.rules;
1601
+ this.validRules[colInfo.field] = originCol.rules
1514
1602
  }
1515
1603
  if (originCol.precision) {
1516
- colParams["precision"] = originCol.precision;
1604
+ colParams['precision'] = originCol.precision
1517
1605
  //加入验证逻辑
1518
1606
  // if(!this.validRules[colInfo.field]){
1519
1607
  // this.validRules[colInfo.field] = []
@@ -1523,32 +1611,32 @@ export default {
1523
1611
  // })
1524
1612
  }
1525
1613
  if (XEUtils.isInteger(originCol.min)) {
1526
- colParams["min"] = originCol.min;
1614
+ colParams['min'] = originCol.min
1527
1615
  }
1528
1616
  if (XEUtils.isInteger(originCol.max)) {
1529
- colParams["max"] = originCol.max;
1617
+ colParams['max'] = originCol.max
1530
1618
  }
1531
1619
  // else{
1532
1620
  // colParams['precision'] = 10 //默认十位小数
1533
1621
  // }
1534
- colParams["le"] = originCol.le;
1535
- colParams["controlType"] = originCol.controlType;
1536
- colParams["filterControlType"] =colParams["controlType"];
1537
- colParams["edit"] = false;
1622
+ colParams['le'] = originCol.le
1623
+ colParams['controlType'] = originCol.controlType
1624
+ colParams['filterControlType'] = colParams['controlType']
1625
+ colParams['edit'] = false
1538
1626
  if (originCol.editStates) {
1539
- colParams["editStates"] = originCol.editStates;
1627
+ colParams['editStates'] = originCol.editStates
1540
1628
  }
1541
1629
  if (originCol.editStatuss) {
1542
- colParams["editStatuss"] = originCol.editStatuss;
1630
+ colParams['editStatuss'] = originCol.editStatuss
1543
1631
  }
1544
1632
  if (originCol.width) {
1545
- colInfo.width = originCol.width;
1633
+ colInfo.width = originCol.width
1546
1634
  } else {
1547
- colInfo.width = 100;
1635
+ colInfo.width = 100
1548
1636
  }
1549
1637
 
1550
- if (originCol.controlType === "operation") {
1551
- customSlot["default"] = "operation_edit";
1638
+ if (originCol.controlType === 'operation') {
1639
+ customSlot['default'] = 'operation_edit'
1552
1640
  }
1553
1641
 
1554
1642
  if (
@@ -1556,28 +1644,28 @@ export default {
1556
1644
  originCol.editStates.length > 0 &&
1557
1645
  originCol.edit === true
1558
1646
  ) {
1559
- let tempAutoSelect = true;
1560
- let tempAutoFocus = ".inner-cell-control";
1647
+ let tempAutoSelect = true
1648
+ let tempAutoFocus = '.inner-cell-control'
1561
1649
  switch (originCol.controlType) {
1562
1650
  case controlType.number:
1563
- tempAutoFocus = ".ant-input-number-input";
1564
- break;
1651
+ tempAutoFocus = '.ant-input-number-input'
1652
+ break
1565
1653
  case controlType.pulldown:
1566
- tempAutoFocus = ".inner-cell-control>input";
1567
- break;
1654
+ tempAutoFocus = '.inner-cell-control>input'
1655
+ break
1568
1656
  case controlType.date:
1569
- tempAutoFocus = ".ant-calendar-picker-input";
1570
- break;
1657
+ tempAutoFocus = '.ant-calendar-picker-input'
1658
+ break
1571
1659
  case controlType.time:
1572
- tempAutoFocus = ".ant-time-picker-input";
1573
- tempAutoSelect = false;
1574
- break;
1660
+ tempAutoFocus = '.ant-time-picker-input'
1661
+ tempAutoSelect = false
1662
+ break
1575
1663
  case controlType.checkbox:
1576
- tempAutoFocus = ".ant-checkbox-input";
1577
- break;
1664
+ tempAutoFocus = '.ant-checkbox-input'
1665
+ break
1578
1666
  case controlType.select:
1579
- tempAutoSelect = false;
1580
- break;
1667
+ tempAutoSelect = false
1668
+ break
1581
1669
  }
1582
1670
 
1583
1671
  //可以编辑
@@ -1585,9 +1673,9 @@ export default {
1585
1673
  // autofocus: tempAutoSelect,
1586
1674
  // autoselect:tempAutoSelect,
1587
1675
  // name:'$input' //originCol.controlType + '_edit',
1588
- };
1676
+ }
1589
1677
  //编辑插槽
1590
- customSlot["edit"] = originCol.controlType + "_edit";
1678
+ customSlot['edit'] = originCol.controlType + '_edit'
1591
1679
  // colInfo['editRender'] = {
1592
1680
  // name: originCol.controlType + '_edit',
1593
1681
  // autofocus: tempAutoFocus,
@@ -1599,43 +1687,44 @@ export default {
1599
1687
  // }
1600
1688
  }
1601
1689
  if (originCol.controlType === controlType.pulldown) {
1602
- colParams["api"] = originCol.api;
1603
- colParams["defaultExpression"] = originCol.defaultExpression;
1604
- colParams["pageSize"] = originCol.pageSize;
1605
- colParams["optBtns"] = originCol.optBtns;
1606
- colParams["displayField"] = originCol.displayField;
1607
- colParams["popupAddName"] = originCol.popupAddName;
1608
- colParams["popupAddPath"] = originCol.popupAddPath;
1609
- colParams["columns"] = originCol.columns;
1610
- colParams["isLocalData"] = originCol.isLocalData;
1611
- colParams["isMultiSelect"] = originCol.isMultiSelect;
1612
- colParams["controlEdit"] = true;
1690
+ colParams['api'] = originCol.api
1691
+ colParams['defaultExpression'] = originCol.defaultExpression
1692
+ colParams['pageSize'] = originCol.pageSize
1693
+ colParams['optBtns'] = originCol.optBtns
1694
+ colParams['displayField'] = originCol.displayField
1695
+ colParams['popupAddName'] = originCol.popupAddName
1696
+ colParams['popupAddPath'] = originCol.popupAddPath
1697
+ colParams['columns'] = originCol.columns
1698
+ colParams['isLocalData'] = originCol.isLocalData
1699
+ colParams['isMultiSelect'] = originCol.isMultiSelect
1700
+ colParams['contrasts'] = originCol.contrasts || []
1701
+ colParams['controlEdit'] = true
1613
1702
  }
1614
1703
  if (originCol.controlType === controlType.text) {
1615
- colParams["controlEdit"] = true;
1704
+ colParams['controlEdit'] = true
1616
1705
  }
1617
1706
  if (originCol.controlType === controlType.select) {
1618
- colParams["controlEdit"] = true;
1707
+ colParams['controlEdit'] = true
1619
1708
  }
1620
1709
  if (originCol.controlType === controlType.checkbox) {
1621
- colParams["controlEdit"] = true;
1710
+ colParams['controlEdit'] = true
1622
1711
  }
1623
1712
  if (originCol.controlType === controlType.date) {
1624
- colParams["pastDate"] = originCol.pastDate;
1713
+ colParams['pastDate'] = originCol.pastDate
1625
1714
  }
1626
- colParams["disableUserVisible"] = originCol.disableUserVisible === true;
1627
- colInfo["params"] = colParams;
1628
- colInfo["params"]["sysOriValue"] = {};
1715
+ colParams['disableUserVisible'] = originCol.disableUserVisible === true
1716
+ colInfo['params'] = colParams
1717
+ colInfo['params']['sysOriValue'] = {}
1629
1718
 
1630
1719
  //是否系统显示还是系统隐藏
1631
- colParams["sysVisible"] = true
1632
- if(!originCol.sysVisible){
1633
- colParams["sysVisible"] = false
1720
+ colParams['sysVisible'] = true
1721
+ if (!originCol.sysVisible) {
1722
+ colParams['sysVisible'] = false
1634
1723
  }
1635
1724
  if (originCol.children) {
1636
- colInfo["children"] = [];
1725
+ colInfo['children'] = []
1637
1726
  for (let x = 0; x < originCol.children.length; x++) {
1638
- colInfo["children"].push(this.initColumns(originCol.children[i]));
1727
+ colInfo['children'].push(this.initColumns(originCol.children[i]))
1639
1728
  }
1640
1729
  }
1641
1730
  //防止报错 有slots值就走前面 没有slots这个键key就走后面
@@ -1643,169 +1732,178 @@ export default {
1643
1732
  originCol.controlType !== controlType.operation &&
1644
1733
  originCol.filters === true
1645
1734
  ) {
1646
- let filterTypeName = `${originCol.controlType}_filter`;
1647
- if(originCol.filterControlType){
1648
- colParams["filterControlType"] = originCol.filterControlType
1649
- filterTypeName = `${originCol.filterControlType}_filter`;
1735
+ let filterTypeName = `${originCol.controlType}_filter`
1736
+ if (originCol.filterControlType) {
1737
+ colParams['filterControlType'] = originCol.filterControlType
1738
+ filterTypeName = `${originCol.filterControlType}_filter`
1650
1739
  }
1651
1740
  //网格筛选
1652
- colInfo["filters"] = [
1653
- { data: { bindingValues: [], displayValues: [],displayValueSearchText:'' }, checked: false },
1654
- ];
1741
+ colInfo['filters'] = [
1742
+ {
1743
+ data: {
1744
+ bindingValues: [],
1745
+ displayValues: [],
1746
+ displayValueSearchText: '',
1747
+ },
1748
+ checked: false,
1749
+ },
1750
+ ]
1655
1751
  if (originCol.filterExpression) {
1656
- colInfo["filters"] = originCol.filterExpression
1752
+ colInfo['filters'] = originCol.filterExpression
1657
1753
  }
1658
- colInfo["filterMultiple"] = false;
1754
+ colInfo['filterMultiple'] = false
1659
1755
  // colInfo['filterRender'] ={name: filterTypeName,showFilterFooter:false}
1660
- customSlot["filter"] = filterTypeName;
1756
+ customSlot['filter'] = filterTypeName
1661
1757
  }
1662
1758
  // console.debug(customSlot)
1663
- colInfo.slots = customSlot;
1759
+ colInfo.slots = customSlot
1664
1760
  // console.debug(colInfo)
1665
- return colInfo;
1761
+ return colInfo
1666
1762
  },
1667
1763
  validPrecision({ cellValue, column }) {
1668
1764
  if (XEUtils.isNumber(cellValue)) {
1669
1765
  let reg = new RegExp(
1670
- "^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0," +
1766
+ '^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,' +
1671
1767
  column.params.precision +
1672
- "})?$"
1673
- );
1768
+ '})?$'
1769
+ )
1674
1770
  if (!reg.test(cellValue)) {
1675
- return new Error("超过小数点" + column.params.precision + "");
1771
+ return new Error('超过小数点' + column.params.precision + '')
1676
1772
  }
1677
1773
  }
1678
1774
  },
1679
1775
  numberInputKeyDown(scope, event) {
1680
- let rowTag = scope.row;
1681
- let columnTag = scope.column;
1682
- let ROW_XIDS = scope.data.map((mapItem) => mapItem._XID);
1683
- let currentRowIndex = ROW_XIDS.indexOf(rowTag._XID);
1684
- let targetRow;
1776
+ let rowTag = scope.row
1777
+ let columnTag = scope.column
1778
+ let ROW_XIDS = scope.data.map((mapItem) => mapItem._XID)
1779
+ let currentRowIndex = ROW_XIDS.indexOf(rowTag._XID)
1780
+ let targetRow
1685
1781
  switch (event.keyCode) {
1686
1782
  case 39: //向右
1687
1783
  //当前光标已在输入文本末尾,向右找到第一个可编辑的列,设为编辑状态
1688
- break;
1784
+ break
1689
1785
  case 37: //向左
1690
1786
  //当前光标已在输入文本开头,向左找到第一个可编辑的列,设为编辑状态
1691
- break;
1787
+ break
1692
1788
  case 38: //向上
1693
1789
  if (0 < currentRowIndex - 1) {
1694
- targetRow = scope.data[currentRowIndex - 1];
1695
- this.$refs.baseGrid.setActiveCell(targetRow, columnTag);
1790
+ targetRow = scope.data[currentRowIndex - 1]
1791
+ this.$refs.baseGrid.setActiveCell(targetRow, columnTag)
1696
1792
  }
1697
- break;
1793
+ break
1698
1794
  case 40: //向下
1699
1795
  if (scope.data.length > currentRowIndex + 1) {
1700
- targetRow = scope.data[currentRowIndex + 1];
1701
- this.$refs.baseGrid.setActiveCell(targetRow, columnTag);
1796
+ targetRow = scope.data[currentRowIndex + 1]
1797
+ this.$refs.baseGrid.setActiveCell(targetRow, columnTag)
1702
1798
  }
1703
- break;
1799
+ break
1704
1800
  }
1705
1801
  },
1706
1802
  getValid(column, row) {
1707
1803
  if (column.params.rules) {
1708
1804
  v.verify(row[column.property], column.params.rules).then(
1709
1805
  (validData) => {
1710
- return "davis";
1806
+ return 'davis'
1711
1807
  }
1712
- );
1808
+ )
1713
1809
  }
1714
1810
  },
1715
1811
  getGridView() {
1716
- return this.$refs.baseGrid;
1812
+ return this.$refs.baseGrid
1717
1813
  },
1718
1814
  //拖动输入框功能 未启用
1719
1815
  initColumnDrop() {
1720
1816
  this.$nextTick(() => {
1721
- const $table = this.$refs.baseGrid;
1817
+ const $table = this.$refs.baseGrid
1722
1818
  this.sortable2 = Sortable.create(
1723
1819
  $table.$el.querySelector(
1724
- ".body--wrapper>.vxe-table--header .vxe-header--row"
1820
+ '.body--wrapper>.vxe-table--header .vxe-header--row'
1725
1821
  ),
1726
1822
  {
1727
- handle: ".vxe-header--column:not(.col--fixed)",
1823
+ handle: '.vxe-header--column:not(.col--fixed)',
1728
1824
  onEnd: ({ item, newIndex, oldIndex }) => {
1729
- const { fullColumn, tableColumn } = $table.getTableColumn();
1730
- const targetThElem = item;
1731
- const wrapperElem = targetThElem.parentNode;
1732
- const newColumn = fullColumn[newIndex];
1825
+ const { fullColumn, tableColumn } = $table.getTableColumn()
1826
+ const targetThElem = item
1827
+ const wrapperElem = targetThElem.parentNode
1828
+ const newColumn = fullColumn[newIndex]
1733
1829
  if (newColumn.fixed) {
1734
1830
  // 错误的移动
1735
1831
  if (newIndex > oldIndex) {
1736
1832
  wrapperElem.insertBefore(
1737
1833
  targetThElem,
1738
1834
  wrapperElem.children[oldIndex]
1739
- );
1835
+ )
1740
1836
  } else {
1741
1837
  wrapperElem.insertBefore(
1742
1838
  wrapperElem.children[oldIndex],
1743
1839
  targetThElem
1744
- );
1840
+ )
1745
1841
  }
1746
1842
  return this.$XModal.message({
1747
- content: "固定列不允许拖动!",
1748
- status: "error",
1749
- });
1843
+ content: '固定列不允许拖动!',
1844
+ status: 'error',
1845
+ })
1750
1846
  }
1751
1847
  // 转换真实索引
1752
1848
  const oldColumnIndex = $table.getColumnIndex(
1753
1849
  tableColumn[oldIndex]
1754
- );
1850
+ )
1755
1851
  const newColumnIndex = $table.getColumnIndex(
1756
1852
  tableColumn[newIndex]
1757
- );
1853
+ )
1758
1854
  // 移动到目标列
1759
- const currRow = fullColumn.splice(oldColumnIndex, 1)[0];
1760
- fullColumn.splice(newColumnIndex, 0, currRow);
1761
- $table.loadColumn(fullColumn);
1855
+ const currRow = fullColumn.splice(oldColumnIndex, 1)[0]
1856
+ fullColumn.splice(newColumnIndex, 0, currRow)
1857
+ $table.loadColumn(fullColumn)
1762
1858
  },
1763
1859
  }
1764
- );
1765
- });
1860
+ )
1861
+ })
1766
1862
  },
1767
1863
  sortChange({ column, property, order, sortBy, sortList, $event }) {
1768
1864
  if (this.filterRemote) {
1769
- let tempSortList = [];
1865
+ let tempSortList = []
1770
1866
  XEUtils.arrayEach(sortList, (loopSort) => {
1771
- tempSortList.push([loopSort.field, loopSort.order]);
1772
- });
1773
- this.$emit("sortChange", tempSortList);
1867
+ tempSortList.push([loopSort.field, loopSort.order])
1868
+ })
1869
+ this.$emit('sortChange', tempSortList)
1774
1870
  }
1775
1871
  },
1776
1872
  currentChange(scope) {
1777
- this.$emit("currentChange", scope.row);
1873
+ this.$emit('currentChange', scope.row)
1778
1874
  },
1779
1875
  pageSizeChange(page, pageSize) {
1780
- this.$emit("pageSizeChange", page, pageSize);
1876
+ this.$emit('pageSizeChange', page, pageSize)
1781
1877
  },
1782
1878
  pageChange(page, pageSize) {
1783
- this.$emit("pageChange", page, pageSize);
1879
+ this.$emit('pageChange', page, pageSize)
1784
1880
  },
1785
1881
  getCheckboxRecords() {
1786
- return this.$refs.baseGrid.getCheckboxRecords(true);
1882
+ return this.$refs.baseGrid.getCheckboxRecords(true)
1787
1883
  },
1788
1884
  setCheckboxRow(rows, checked) {
1789
- this.$refs.baseGrid.setCheckboxRow(rows, checked);
1885
+ this.$refs.baseGrid.setCheckboxRow(rows, checked)
1790
1886
  },
1791
1887
  setAllCheckboxRow(checked) {
1792
- return this.$refs.baseGrid.setAllCheckboxRow(checked);
1888
+ return this.$refs.baseGrid.setAllCheckboxRow(checked)
1793
1889
  },
1794
1890
  reloadRow(rows, record) {
1795
- return this.$refs.baseGrid.reloadRow(rows, record);
1891
+ return this.$refs.baseGrid.reloadRow(rows, record)
1796
1892
  },
1797
1893
  /**
1798
1894
  * 确认保存用户自定义表格信息
1799
1895
  */
1800
1896
  confirmUserDefineColumn() {
1801
- let vm = this;
1897
+ let vm = this
1802
1898
  let postData = {
1803
1899
  moduleCode: this.moduleCode,
1804
1900
  dataCode: this.dataCode,
1805
1901
  fields: [],
1806
- };
1807
- let tableCollectColumn = this.$refs.baseGrid.getTableColumn().collectColumn;
1808
- const baseAdjustGridColumn = this.$refs.baseAdjustGridView.getTableColumn();
1902
+ }
1903
+ let tableCollectColumn =
1904
+ this.$refs.baseGrid.getTableColumn().collectColumn
1905
+ const baseAdjustGridColumn =
1906
+ this.$refs.baseAdjustGridView.getTableColumn()
1809
1907
 
1810
1908
  XEUtils.arrayEach(baseAdjustGridColumn, (loopCol) => {
1811
1909
  let tempData = {
@@ -1813,76 +1911,83 @@ export default {
1813
1911
  sort: postData.fields.length + 1,
1814
1912
  hidden: loopCol.visible !== true,
1815
1913
  width: loopCol.width,
1816
- extraInfo:{}
1817
- };
1914
+ extraInfo: {},
1915
+ }
1818
1916
  if (loopCol.filters && loopCol.filters[0].data.bindingValues.length) {
1819
- loopCol.filters[0].checked = true;
1820
- tempData.extraInfo.filterExpression = loopCol.filters
1917
+ loopCol.filters[0].checked = true
1918
+ tempData.extraInfo.filterExpression = loopCol.filters
1821
1919
  }
1822
1920
  if (loopCol.order) {
1823
- tempData.extraInfo.order = loopCol.order
1921
+ tempData.extraInfo.order = loopCol.order
1824
1922
  }
1825
1923
 
1826
- postData.fields.push(tempData);
1924
+ postData.fields.push(tempData)
1827
1925
  let tempCol = XEUtils.findTree(
1828
1926
  tableCollectColumn,
1829
1927
  (p) => p.field === loopCol.field
1830
- ).item;
1831
- tempCol.visible = loopCol.params.show;
1832
- tempCol.width = loopCol.width;
1928
+ ).item
1929
+ tempCol.visible = loopCol.params.show
1930
+ tempCol.width = loopCol.width
1833
1931
  //设置顺序
1834
- tempCol.params["tempCustomSort"] = tempData.sort;
1932
+ tempCol.params['tempCustomSort'] = tempData.sort
1835
1933
  this.setCustomGridParentSort(
1836
1934
  tableCollectColumn,
1837
1935
  tempCol.parentId,
1838
1936
  tempData.sort
1839
- );
1840
- });
1937
+ )
1938
+ })
1841
1939
  saveUserModuleDataFieldApi(postData)
1842
1940
  .then((res) => {
1843
1941
  //设置表格顺序
1844
1942
  tableCollectColumn = XEUtils.orderBy(
1845
1943
  tableCollectColumn,
1846
1944
  (p) => p.params.tempCustomSort
1847
- );
1848
- vm.$refs.baseGrid.reloadColumn(tableCollectColumn);
1945
+ )
1946
+ vm.$refs.baseGrid.reloadColumn(tableCollectColumn)
1849
1947
  XEUtils.arrayEach(tableCollectColumn, (loopCol) => {
1850
- const find = XEUtils.find(baseAdjustGridColumn, item => loopCol.field === item.field)
1851
- if (find) {
1852
- loopCol.order = find.order
1853
- loopCol.filters = find.filters
1854
- }
1948
+ const find = XEUtils.find(
1949
+ baseAdjustGridColumn,
1950
+ (item) => loopCol.field === item.field
1951
+ )
1952
+ if (find) {
1953
+ loopCol.order = find.order
1954
+ loopCol.filters = find.filters
1955
+ }
1855
1956
  })
1856
1957
  //设置筛选过滤条件
1857
- this.setFilterExpression();
1958
+ this.setFilterExpression()
1858
1959
  let data = []
1859
- this.$refs.baseGrid.getSortColumns().forEach(x=> {
1860
- data.push([x.field,x.order])
1960
+ this.$refs.baseGrid.getSortColumns().forEach((x) => {
1961
+ data.push([x.field, x.order])
1861
1962
  })
1862
- this.$emit("sortChange", data);
1963
+ this.$emit('sortChange', data)
1863
1964
 
1864
1965
  //清空store缓存
1865
- vm.$store.commit(
1866
- "SET_MODULE_VIEW_INFO",{
1867
- moduleCode:this.moduleCode,
1868
- info:res.content
1869
- }
1870
- );
1966
+ vm.$store.commit('SET_MODULE_VIEW_INFO', {
1967
+ moduleCode: this.moduleCode,
1968
+ info: res.content,
1969
+ })
1871
1970
  // 初始标签
1872
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
1873
- vm.showGridColumnUserDefine = false;
1971
+ this.tagData = JSON.parse(
1972
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
1973
+ )
1974
+ vm.showGridColumnUserDefine = false
1874
1975
  })
1875
- .catch((err) => console.error(err));
1976
+ .catch((err) => console.error(err))
1876
1977
  },
1877
1978
  // 确认保存自定义表格信息,更新表格
1878
1979
  saveSeqConfig(emitColumns, resData) {
1879
1980
  // 深拷贝一份参数用来初始化后赋值筛选排序
1880
1981
  let seqColumns = JSON.parse(JSON.stringify(emitColumns))
1881
1982
  // 获取表格字段数据
1882
- let tableCollectColumn = this.$refs.baseGrid.getTableColumn().collectColumn;
1983
+ let tableCollectColumn =
1984
+ this.$refs.baseGrid.getTableColumn().collectColumn
1883
1985
  // 表格排序信息更新
1884
1986
  XEUtils.arrayEach(tableCollectColumn, (loopCol) => {
1885
- const find = XEUtils.find(emitColumns.fields, item => loopCol.field === item.field)
1987
+ const find = XEUtils.find(
1988
+ emitColumns.fields,
1989
+ (item) => loopCol.field === item.field
1990
+ )
1886
1991
  if (find) {
1887
1992
  loopCol.params.sort = find.sort
1888
1993
  loopCol.visible = !find.hidden
@@ -1892,131 +1997,139 @@ export default {
1892
1997
  tableCollectColumn = XEUtils.orderBy(
1893
1998
  tableCollectColumn,
1894
1999
  (p) => p.params.sort
1895
- );
2000
+ )
1896
2001
  // 更新表格
1897
2002
  this.$refs.baseGrid.reloadColumn(tableCollectColumn)
1898
2003
  tableCollectColumn.forEach((loopCol) => {
1899
- const find = XEUtils.find(seqColumns.fields, item => loopCol.field === item.field)
2004
+ const find = XEUtils.find(
2005
+ seqColumns.fields,
2006
+ (item) => loopCol.field === item.field
2007
+ )
1900
2008
  if (!find) {
1901
2009
  return
1902
2010
  }
1903
- find.extraInfo.filterExpression ?
1904
- loopCol.filters = find.extraInfo.filterExpression :
1905
- loopCol.filters[0].data = {
1906
- bindingValues: [],
1907
- displayValues: [],
1908
- displayValueSearchText:''
1909
- }
1910
- find.extraInfo.order ?
1911
- loopCol.order = find.extraInfo.order :
1912
- loopCol.order = null
2011
+ find.extraInfo.filterExpression
2012
+ ? (loopCol.filters = find.extraInfo.filterExpression)
2013
+ : (loopCol.filters[0].data = {
2014
+ bindingValues: [],
2015
+ displayValues: [],
2016
+ displayValueSearchText: '',
2017
+ })
2018
+ find.extraInfo.order
2019
+ ? (loopCol.order = find.extraInfo.order)
2020
+ : (loopCol.order = null)
1913
2021
  loopCol.visible = !find.hidden
1914
2022
  })
1915
2023
  this.$refs.baseAdjustGridView.updateColumns(tableCollectColumn)
1916
2024
  //清空store缓存
1917
- this.$store.commit(
1918
- "SET_MODULE_VIEW_INFO",{
1919
- moduleCode:this.moduleCode,
1920
- info: resData
1921
- }
1922
- );
2025
+ this.$store.commit('SET_MODULE_VIEW_INFO', {
2026
+ moduleCode: this.moduleCode,
2027
+ info: resData,
2028
+ })
1923
2029
  },
1924
2030
  setCustomGridParentSort(tableCollectColumn, parentId, sort) {
1925
2031
  let tempParentCol = XEUtils.findTree(
1926
2032
  tableCollectColumn,
1927
2033
  (p) => p.id === parentId
1928
- );
2034
+ )
1929
2035
  if (tempParentCol) {
1930
- tempParentCol.item.params["tempCustomSort"] = sort;
2036
+ tempParentCol.item.params['tempCustomSort'] = sort
1931
2037
  this.setCustomGridParentSort(
1932
2038
  tableCollectColumn,
1933
2039
  tempParentCol.item.parentId,
1934
2040
  sort
1935
- );
2041
+ )
1936
2042
  }
1937
2043
  },
1938
2044
  getFetchField() {
1939
- let tempStr = "";
1940
- let tempFullColumn = this.$refs.baseGrid.getTableColumn().fullColumn;
2045
+ let tempStr = ''
2046
+ let tempFullColumn = this.$refs.baseGrid.getTableColumn().fullColumn
1941
2047
  XEUtils.arrayEach(tempFullColumn, (loopCol) => {
1942
2048
  if (!loopCol.field) {
1943
- return;
2049
+ return
1944
2050
  }
1945
2051
  if (
1946
2052
  loopCol.visible === true ||
1947
- loopCol.params.disableUserVisible === true
1948
- || loopCol.params.sysVisible === false
2053
+ loopCol.params.disableUserVisible === true ||
2054
+ loopCol.params.sysVisible === false
1949
2055
  ) {
1950
- tempStr = tempStr + loopCol.field + ",";
2056
+ tempStr = tempStr + loopCol.field + ','
1951
2057
  }
1952
- });
1953
- return tempStr.substring(0, tempStr.length - 1);
2058
+ })
2059
+ return tempStr.substring(0, tempStr.length - 1)
1954
2060
  },
1955
2061
  clickHeader() {
1956
2062
  let tableCollectColumn = XEUtils.toTreeArray(
1957
2063
  this.$refs.baseGrid.getTableColumn().collectColumn
1958
- );
2064
+ )
1959
2065
  if (this.isSeqPopover) {
1960
2066
  this.userDefineColumns = tableCollectColumn
1961
2067
  } else {
1962
2068
  this.userDefineColumns = XEUtils.filter(
1963
2069
  tableCollectColumn,
1964
- (p) => !p.children && p.params.disableUserVisible !== true && p.params.sysVisible===true && p.field !== 'operation'
1965
- );
1966
- this.showGridColumnUserDefine = true;
2070
+ (p) =>
2071
+ !p.children &&
2072
+ p.params.disableUserVisible !== true &&
2073
+ p.params.sysVisible === true &&
2074
+ p.field !== 'operation'
2075
+ )
2076
+ this.showGridColumnUserDefine = true
1967
2077
  }
1968
2078
  },
1969
2079
  operationButtonClick(btn, scope) {
1970
2080
  if (btn.edit === false) {
1971
- return;
2081
+ return
1972
2082
  }
1973
- this.$emit("operationBtnClick", btn, scope.row, this);
2083
+ this.$emit('operationBtnClick', btn, scope.row, this)
1974
2084
  },
1975
2085
  operationEdit(item, scope) {
1976
- if (Reflect.has(scope.row,'operationVisible') && !scope.row.operationVisible){
2086
+ if (
2087
+ Reflect.has(scope.row, 'operationVisible') &&
2088
+ !scope.row.operationVisible
2089
+ ) {
1977
2090
  return false
1978
2091
  }
1979
2092
  let isShow =
1980
2093
  item.visible === true &&
1981
- !(scope.row["sysOperationDisVisible_" + item.field] === true) &&
2094
+ !(scope.row['sysOperationDisVisible_' + item.field] === true) &&
1982
2095
  (item.visibleState != undefined &&
1983
2096
  item.visibleState.field != undefined &&
1984
2097
  item.visibleState.visibleStatuss != undefined
1985
2098
  ? item.visibleState.visibleStatuss.indexOf(
1986
2099
  scope.row[item.visibleState.field]
1987
2100
  ) != -1
1988
- : true);
1989
- return isShow;
2101
+ : true)
2102
+ return isShow
1990
2103
  },
1991
2104
  activeCellMethod({ row, column }) {
1992
- let emitData ={
1993
- row:row,
1994
- column:column,
1995
- edit:column.params.edit
2105
+ let emitData = {
2106
+ row: row,
2107
+ column: column,
2108
+ edit: column.params.edit,
1996
2109
  }
1997
- this.$emit('activeCellMethod',emitData)
2110
+ this.$emit('activeCellMethod', emitData)
1998
2111
 
1999
- if (row["sysDisableEdit"] === true) {
2112
+ if (row['sysDisableEdit'] === true) {
2000
2113
  //禁止编辑
2001
- return false;
2114
+ return false
2002
2115
  }
2003
- return emitData.edit;
2116
+ return emitData.edit
2004
2117
  },
2005
2118
  editActived(scope) {
2006
- let colElId = scope.column.id;
2007
- let rowElId = scope.row._X_ROW_KEY;
2119
+ let colElId = scope.column.id
2120
+ let rowElId = scope.row._X_ROW_KEY
2008
2121
  //延迟设置输入框自动获取焦点以及选中
2009
2122
  this.$nextTick(() => {
2010
2123
  let cellEl = scope.$table.$el.querySelector(
2011
2124
  '[rowid="' + rowElId + '"]>[colid="' + colElId + '"]'
2012
- );
2013
- let inputEl = cellEl.querySelector("input");
2125
+ )
2126
+ let inputEl = cellEl.querySelector('input')
2014
2127
  if (inputEl) {
2015
- inputEl.focus();
2016
- inputEl.select();
2128
+ inputEl.focus()
2129
+ inputEl.select()
2017
2130
  }
2018
- });
2019
- this.$emit("editActived", scope);
2131
+ })
2132
+ this.$emit('editActived', scope)
2020
2133
  },
2021
2134
  setColumnEdit(field, edit) {
2022
2135
  for (let i = 0; i < this.internalColumns.length; i++) {
@@ -2030,12 +2143,13 @@ export default {
2030
2143
  }
2031
2144
  this.$refs.baseGrid.refreshColumn()
2032
2145
  },
2033
- setColumnFormatter(fields,formatterName){
2146
+ setColumnFormatter(fields, formatterName) {
2034
2147
  for (let i = 0; i < this.internalColumns.length; i++) {
2035
2148
  let tempFieldName = this.internalColumns[i].field
2036
- if (XEUtils.arrayIndexOf(fields,tempFieldName)>-1) {
2037
- this.internalColumns[i].formatter = formatterName
2038
- this.$refs.baseGrid.getColumnByField(tempFieldName).formatter = formatterName
2149
+ if (XEUtils.arrayIndexOf(fields, tempFieldName) > -1) {
2150
+ this.internalColumns[i].formatter = formatterName
2151
+ this.$refs.baseGrid.getColumnByField(tempFieldName).formatter =
2152
+ formatterName
2039
2153
  }
2040
2154
  }
2041
2155
  this.$refs.baseGrid.refreshColumn()
@@ -2052,10 +2166,10 @@ export default {
2052
2166
  this.pager.buttons[i].editStatuss,
2053
2167
  this.pager.buttons[i].visibleStates,
2054
2168
  this.pager.buttons[i].visibleStatuss
2055
- );
2056
- this.$set(this.pager.buttons[i], "visible", editVisible.visible);
2057
- this.$set(this.pager.buttons[i], "edit", editVisible.edit);
2058
- this.$forceUpdate();
2169
+ )
2170
+ this.$set(this.pager.buttons[i], 'visible', editVisible.visible)
2171
+ this.$set(this.pager.buttons[i], 'edit', editVisible.edit)
2172
+ this.$forceUpdate()
2059
2173
  }
2060
2174
  }
2061
2175
  // if (this.pager.add) {
@@ -2071,22 +2185,22 @@ export default {
2071
2185
  //设置网格可编辑状态
2072
2186
 
2073
2187
  if (this.editStates.indexOf(currentState) > -1) {
2074
- this.gridEdit = true;
2188
+ this.gridEdit = true
2075
2189
  } else {
2076
- this.gridEdit = false;
2190
+ this.gridEdit = false
2077
2191
  }
2078
2192
  if (currentStatus && this.editStatuss) {
2079
2193
  if (this.editStatuss.indexOf(currentStatus) > -1) {
2080
- this.gridEdit = true;
2194
+ this.gridEdit = true
2081
2195
  } else {
2082
- this.gridEdit = false;
2196
+ this.gridEdit = false
2083
2197
  }
2084
2198
  }
2085
2199
  for (let i = 0; i < this.internalColumns.length; i++) {
2086
2200
  if (!this.internalColumns[i].params) {
2087
- continue;
2201
+ continue
2088
2202
  }
2089
- this.internalColumns[i].params.edit = false;
2203
+ this.internalColumns[i].params.edit = false
2090
2204
  if (
2091
2205
  this.internalColumns[i].params.controlType === controlType.operation
2092
2206
  ) {
@@ -2095,7 +2209,7 @@ export default {
2095
2209
  j < this.internalColumns[i].params.columns.length;
2096
2210
  j++
2097
2211
  ) {
2098
- this.internalColumns[i].params.columns[j].edit = false;
2212
+ this.internalColumns[i].params.columns[j].edit = false
2099
2213
  //设置工具栏可编辑状态
2100
2214
  let editVisible = this.getColumnEdit(
2101
2215
  this.internalColumns[i].params.columns[j].edit,
@@ -2105,19 +2219,19 @@ export default {
2105
2219
  this.internalColumns[i].params.columns[j].editStatuss,
2106
2220
  this.internalColumns[i].params.columns[j].visibleStates,
2107
2221
  this.internalColumns[i].params.columns[j].visibleStatuss
2108
- );
2222
+ )
2109
2223
  this.$set(
2110
2224
  this.internalColumns[i].params.columns[j],
2111
- "visible",
2225
+ 'visible',
2112
2226
  editVisible.visible
2113
- );
2227
+ )
2114
2228
  this.$set(
2115
2229
  this.internalColumns[i].params.columns[j],
2116
- "edit",
2230
+ 'edit',
2117
2231
  editVisible.edit
2118
- );
2232
+ )
2119
2233
  }
2120
- continue;
2234
+ continue
2121
2235
  }
2122
2236
  //设置网格列编辑状态
2123
2237
  if (this.gridEdit === true) {
@@ -2129,10 +2243,10 @@ export default {
2129
2243
  this.internalColumns[i].params.editStatuss,
2130
2244
  this.internalColumns[i].params.visibleStates,
2131
2245
  this.internalColumns[i].params.visibleStatuss
2132
- );
2133
- this.internalColumns[i].params.edit = editVisible.edit;
2246
+ )
2247
+ this.internalColumns[i].params.edit = editVisible.edit
2134
2248
  if (this.internalColumns[i].editRender) {
2135
- this.internalColumns[i].editRender.enabled = editVisible.edit;
2249
+ this.internalColumns[i].editRender.enabled = editVisible.edit
2136
2250
  }
2137
2251
  }
2138
2252
  }
@@ -2147,142 +2261,142 @@ export default {
2147
2261
  visibleStatuss
2148
2262
  ) {
2149
2263
  //显示状态控制
2150
- let fieldVisible = true;
2264
+ let fieldVisible = true
2151
2265
  if (currentState && visibleStates && visibleStates.length > 0) {
2152
2266
  //有显示状态控制
2153
2267
  if (visibleStates.indexOf(currentState) < 0) {
2154
- fieldVisible = false;
2268
+ fieldVisible = false
2155
2269
  }
2156
2270
  }
2157
2271
  if (currentStatus && visibleStatuss && visibleStatuss.length > 0) {
2158
2272
  if (visibleStatuss.indexOf(currentStatus) < 0) {
2159
- fieldVisible = false;
2273
+ fieldVisible = false
2160
2274
  }
2161
2275
  }
2162
2276
 
2163
2277
  //编辑状态控制
2164
2278
  if (currentState && editStates) {
2165
- originEdit = editStates.indexOf(currentState) > -1;
2279
+ originEdit = editStates.indexOf(currentState) > -1
2166
2280
  }
2167
2281
  if (currentStatus && editStatuss) {
2168
- originEdit = editStatuss.indexOf(currentStatus) > -1;
2282
+ originEdit = editStatuss.indexOf(currentStatus) > -1
2169
2283
  }
2170
- return { visible: fieldVisible, edit: originEdit };
2284
+ return { visible: fieldVisible, edit: originEdit }
2171
2285
  },
2172
2286
  cellValueChange(scope, e) {
2173
- console.debug(scope.column.field + "value change");
2287
+ console.debug(scope.column.field + 'value change')
2174
2288
  if (
2175
- scope.row["sysRowState"] !== "add" &&
2176
- scope.row["sysRowState"] !== "delete"
2289
+ scope.row['sysRowState'] !== 'add' &&
2290
+ scope.row['sysRowState'] !== 'delete'
2177
2291
  ) {
2178
- scope.row["sysRowState"] = "update";
2292
+ scope.row['sysRowState'] = 'update'
2179
2293
  }
2180
- this.$emit("valueChange", scope, this.dataName);
2181
- this.$refs.baseGrid.updateStatus(scope);
2294
+ this.$emit('valueChange', scope, this.dataName)
2295
+ this.$refs.baseGrid.updateStatus(scope)
2182
2296
  },
2183
2297
  /**
2184
2298
  * 异步插入
2185
2299
  */
2186
2300
  async insertAtAsync(row, index, autoSelect = true) {
2187
- let vm = this;
2188
- row["sysRowState"] = "add";
2189
- if (!row["id"]) {
2190
- row["id"] = this.$store.getters.newId() + "";
2301
+ let vm = this
2302
+ row['sysRowState'] = 'add'
2303
+ if (!row['id']) {
2304
+ row['id'] = this.$store.getters.newId() + ''
2191
2305
  }
2192
- let insertRow = await this.$refs.baseGrid.insertAt(row, index);
2306
+ let insertRow = await this.$refs.baseGrid.insertAt(row, index)
2193
2307
  if (autoSelect === true) {
2194
- this.$refs.baseGrid.setActiveRow(row);
2195
- this.$refs.baseGrid.setCurrentRow(row);
2196
- this.$emit("currentChange", row);
2308
+ this.$refs.baseGrid.setActiveRow(row)
2309
+ this.$refs.baseGrid.setCurrentRow(row)
2310
+ this.$emit('currentChange', row)
2197
2311
  }
2198
- return insertRow;
2312
+ return insertRow
2199
2313
  },
2200
2314
  insertAt(row, index, autoSelect = true, callback) {
2201
- let vm = this;
2202
- row["sysRowState"] = "add";
2203
- if (!row["id"]) {
2204
- row["id"] = this.$store.getters.newId() + "";
2315
+ let vm = this
2316
+ row['sysRowState'] = 'add'
2317
+ if (!row['id']) {
2318
+ row['id'] = this.$store.getters.newId() + ''
2205
2319
  }
2206
2320
  this.$refs.baseGrid.insertAt(row, index).then(({ row }) => {
2207
2321
  if (callback) {
2208
- callback(row);
2322
+ callback(row)
2209
2323
  }
2210
2324
 
2211
2325
  if (autoSelect === true) {
2212
- vm.$refs.baseGrid.setActiveRow(row);
2213
- vm.$refs.baseGrid.setCurrentRow(row);
2326
+ vm.$refs.baseGrid.setActiveRow(row)
2327
+ vm.$refs.baseGrid.setCurrentRow(row)
2214
2328
  // vm.rows.push(row)
2215
- vm.$emit("currentChange", row);
2329
+ vm.$emit('currentChange', row)
2216
2330
  }
2217
- });
2331
+ })
2218
2332
  },
2219
2333
  // insertTree(row,)
2220
2334
  setCurrentRow(rowInfo) {
2221
- let vm = this;
2335
+ let vm = this
2222
2336
  this.$refs.baseGrid.setCurrentRow(rowInfo).then(() => {
2223
- vm.$emit("currentChange", vm.$refs.baseGrid.getCurrentRecord());
2224
- });
2337
+ vm.$emit('currentChange', vm.$refs.baseGrid.getCurrentRecord())
2338
+ })
2225
2339
  },
2226
2340
  getCurrentRow() {
2227
- return this.$refs.baseGrid.getCurrentRecord();
2341
+ return this.$refs.baseGrid.getCurrentRecord()
2228
2342
  },
2229
2343
  checkBoxChanged({ checked, records, row }) {
2230
- this.$emit("checkBoxChanged", checked, records, row);
2344
+ this.$emit('checkBoxChanged', checked, records, row)
2231
2345
  },
2232
2346
  checkBoxAllChanged({ checked, records }) {
2233
- this.$emit("checkBoxAllChanged", checked, records);
2347
+ this.$emit('checkBoxAllChanged', checked, records)
2234
2348
  },
2235
2349
  clearCurrentRow() {
2236
- this.$refs.baseGrid.clearCurrentRow();
2350
+ this.$refs.baseGrid.clearCurrentRow()
2237
2351
  },
2238
2352
  clearCheckboxReserve() {
2239
- this.$refs.baseGrid.clearCheckboxReserve();
2353
+ this.$refs.baseGrid.clearCheckboxReserve()
2240
2354
  },
2241
2355
  /**
2242
2356
  * 表尾按钮操作
2243
2357
  */
2244
2358
  pagerBtnClick(pagerBtnInfo) {
2245
- this.$emit("pagerButtonClick", pagerBtnInfo, this);
2359
+ this.$emit('pagerButtonClick', pagerBtnInfo, this)
2246
2360
  },
2247
2361
  /**
2248
2362
  * 删除行
2249
2363
  */
2250
2364
  removeRow(row) {
2251
- return this.$refs.baseGrid.remove(row);
2365
+ return this.$refs.baseGrid.remove(row)
2252
2366
  },
2253
2367
  /**
2254
2368
  * 删除所有行
2255
2369
  */
2256
2370
  removeAll() {
2257
- return this.$refs.baseGrid.remove();
2371
+ return this.$refs.baseGrid.remove()
2258
2372
  },
2259
2373
  getTableData() {
2260
- return this.$refs.baseGrid.getTableData().fullData;
2374
+ return this.$refs.baseGrid.getTableData().fullData
2261
2375
  },
2262
2376
  getVisibleData() {
2263
- return this.$refs.baseGrid.getTableData().visibleData;
2377
+ return this.$refs.baseGrid.getTableData().visibleData
2264
2378
  },
2265
2379
  /**
2266
2380
  * 获取更新的行
2267
2381
  */
2268
2382
  getUpdateRows() {
2269
- let tempRows = [];
2383
+ let tempRows = []
2270
2384
  //先获取删除数据,因为前台删除一个明细后又添加相同的明细后台会
2271
2385
  //报唯一索引错误,因为后台也是先添加然后再是删除的会照成问题
2272
2386
  //所有就要把删除的放在数组的第一个传递过去,这样后台就先删除然后再新增了
2273
- let tempRemoveRows = this.$refs.baseGrid.getRemoveRecords();
2387
+ let tempRemoveRows = this.$refs.baseGrid.getRemoveRecords()
2274
2388
  for (let i = 0; i < tempRemoveRows.length; i++) {
2275
- let tempRow = tempRemoveRows[i];
2276
- tempRow["sysRowState"] = "delete";
2277
- tempRows.push(tempRow);
2389
+ let tempRow = tempRemoveRows[i]
2390
+ tempRow['sysRowState'] = 'delete'
2391
+ tempRows.push(tempRow)
2278
2392
  }
2279
2393
 
2280
- let tempTableData = this.$refs.baseGrid.getTableData().fullData;
2394
+ let tempTableData = this.$refs.baseGrid.getTableData().fullData
2281
2395
  for (let i = 0; i < tempTableData.length; i++) {
2282
- let tempRow = tempTableData[i];
2396
+ let tempRow = tempTableData[i]
2283
2397
  if (this.$refs.baseGrid.isInsertByRow(tempRow) === true) {
2284
- tempRow["sysRowState"] = "add";
2285
- tempRows.push(tempRow);
2398
+ tempRow['sysRowState'] = 'add'
2399
+ tempRows.push(tempRow)
2286
2400
  }
2287
2401
  //判断子项
2288
2402
  // if(tempRow.children && tempRow.children.length>0){
@@ -2295,58 +2409,58 @@ export default {
2295
2409
  // })
2296
2410
  // }
2297
2411
  }
2298
-
2299
- let tempUpdateRows = this.$refs.baseGrid.getUpdateRecords();
2412
+
2413
+ let tempUpdateRows = this.$refs.baseGrid.getUpdateRecords()
2300
2414
  for (let i = 0; i < tempUpdateRows.length; i++) {
2301
- let tempRow = tempUpdateRows[i];
2302
- tempRow["sysRowState"] = "update";
2303
- tempRows.push(tempRow);
2415
+ let tempRow = tempUpdateRows[i]
2416
+ tempRow['sysRowState'] = 'update'
2417
+ tempRows.push(tempRow)
2304
2418
  }
2305
2419
 
2306
- return tempRows;
2420
+ return tempRows
2307
2421
  },
2308
2422
  async fullValidate() {
2309
2423
  const errMap = await this.$refs.baseGrid
2310
2424
  .fullValidate(true)
2311
- .catch((errMap) => errMap);
2312
- let errorMsgList = [];
2425
+ .catch((errMap) => errMap)
2426
+ let errorMsgList = []
2313
2427
  if (errMap) {
2314
2428
  Object.values(errMap).forEach((errList) => {
2315
2429
  errList.forEach((params) => {
2316
- const { rowIndex, column, rules, row } = params;
2317
- let tempRowIndex = this.$refs.baseGrid.getVTRowIndex(row);
2430
+ const { rowIndex, column, rules, row } = params
2431
+ let tempRowIndex = this.$refs.baseGrid.getVTRowIndex(row)
2318
2432
  rules.forEach((rule) => {
2319
2433
  errorMsgList.push(
2320
2434
  `第 ${tempRowIndex + 1} 行 ${column.title} 校验错误:${
2321
2435
  rule.message
2322
2436
  }`
2323
- );
2324
- });
2325
- });
2326
- });
2437
+ )
2438
+ })
2439
+ })
2440
+ })
2327
2441
  }
2328
2442
 
2329
- return errorMsgList;
2443
+ return errorMsgList
2330
2444
  },
2331
2445
  preSearch(searchInfo, scope) {
2332
- this.$emit("preSearch", searchInfo, scope);
2446
+ this.$emit('preSearch', searchInfo, scope)
2333
2447
  },
2334
2448
  pulldownBtnClick(btn) {
2335
- this.$emit("pulldownBtnClick", btn);
2449
+ this.$emit('pulldownBtnClick', btn)
2336
2450
  },
2337
2451
  pulldownMultiSelect(scope, pulldownView, selectRows) {
2338
2452
  //第一行选中
2339
- pulldownView.setLinkValue(selectRows[0], scope.row);
2340
- this.cellValueChange(scope);
2341
- let vm = this;
2453
+ pulldownView.setLinkValue(selectRows[0], scope.row)
2454
+ this.cellValueChange(scope)
2455
+ let vm = this
2342
2456
  for (let i = 1; i < selectRows.length; i++) {
2343
- let tempSelectRow = selectRows[i];
2344
- this.$emit("defaultRow", (newRow) => {
2345
- pulldownView.setLinkValue(tempSelectRow, newRow);
2457
+ let tempSelectRow = selectRows[i]
2458
+ this.$emit('defaultRow', (newRow) => {
2459
+ pulldownView.setLinkValue(tempSelectRow, newRow)
2346
2460
  vm.insertAt(newRow, -1, false, (insertRow) => {
2347
- vm.cellValueChange({ row: insertRow, column: scope.column });
2348
- });
2349
- });
2461
+ vm.cellValueChange({ row: insertRow, column: scope.column })
2462
+ })
2463
+ })
2350
2464
  }
2351
2465
  },
2352
2466
  resizableChange(scope) {
@@ -2354,53 +2468,53 @@ export default {
2354
2468
  if (this.moduleCode && this.dataCode) {
2355
2469
  this.saveTableHeight()
2356
2470
  }
2357
- this.$emit("resizableChange", scope);
2471
+ this.$emit('resizableChange', scope)
2358
2472
  },
2359
2473
  setVisiable(fields, visible) {
2360
2474
  fields.forEach((field) => {
2361
- let column = this.$refs.baseGrid.getColumnByField(field);
2362
- column.visible = visible;
2363
- });
2364
- this.$refs.baseGrid.refreshColumn();
2475
+ let column = this.$refs.baseGrid.getColumnByField(field)
2476
+ column.visible = visible
2477
+ })
2478
+ this.$refs.baseGrid.refreshColumn()
2365
2479
  },
2366
2480
  reloadColumn(columns) {
2367
- this.internalColumns = [];
2481
+ this.internalColumns = []
2368
2482
  if (this.showSeq) {
2369
2483
  this.internalColumns.push({
2370
- type: "seq",
2371
- fixed: "left",
2484
+ type: 'seq',
2485
+ fixed: 'left',
2372
2486
  width: 50,
2373
2487
  slots: {
2374
- header: "seqHeader",
2488
+ header: 'seqHeader',
2375
2489
  },
2376
2490
  params: {
2377
2491
  disableUserVisible: true,
2378
2492
  },
2379
- });
2493
+ })
2380
2494
  }
2381
2495
  if (this.showCheckBox) {
2382
2496
  this.internalColumns.push({
2383
- type: "checkbox",
2384
- fixed: "left",
2497
+ type: 'checkbox',
2498
+ fixed: 'left',
2385
2499
  width: 40,
2386
2500
  params: {
2387
2501
  disableUserVisible: true,
2388
2502
  },
2389
- });
2503
+ })
2390
2504
  }
2391
2505
  columns.forEach((column) => {
2392
- this.internalColumns.push(this.initColumns(column));
2393
- });
2394
- this.$refs.baseGrid.refreshColumn();
2506
+ this.internalColumns.push(this.initColumns(column))
2507
+ })
2508
+ this.$refs.baseGrid.refreshColumn()
2395
2509
  },
2396
2510
  addRules(fields, rules) {
2397
2511
  fields.forEach((field) => {
2398
- this.$set(this.validRules, field, rules);
2399
- });
2400
- this.$refs.baseGrid.refreshColumn();
2512
+ this.$set(this.validRules, field, rules)
2513
+ })
2514
+ this.$refs.baseGrid.refreshColumn()
2401
2515
  },
2402
- displayValueSearchTextChange(colInfo){
2403
- console.debug(colInfo.filters[0].data.displayValueSearchText)
2516
+ displayValueSearchTextChange(colInfo) {
2517
+ console.debug(colInfo.filters[0].data.displayValueSearchText)
2404
2518
  },
2405
2519
  /**
2406
2520
  * 表尾
@@ -2410,43 +2524,43 @@ export default {
2410
2524
  return [
2411
2525
  columns.map((column, columnIndex) => {
2412
2526
  if (columnIndex === 0) {
2413
- return "合计";
2527
+ return '合计'
2414
2528
  }
2415
2529
  if (this.footerSum.includes(column.property)) {
2416
- let tempSumVal = XEUtils.sum(data, column.property);
2530
+ let tempSumVal = XEUtils.sum(data, column.property)
2417
2531
  if (
2418
2532
  column.formatter &&
2419
- column.formatter !== "defaultFormat" &&
2533
+ column.formatter !== 'defaultFormat' &&
2420
2534
  VXETable.formats.store[column.formatter]
2421
2535
  ) {
2422
2536
  tempSumVal = VXETable.formats.store[column.formatter]({
2423
2537
  cellValue: tempSumVal,
2424
- });
2538
+ })
2425
2539
  }
2426
- return tempSumVal;
2540
+ return tempSumVal
2427
2541
  }
2428
- return null;
2542
+ return null
2429
2543
  }),
2430
- ];
2544
+ ]
2431
2545
  } else {
2432
- return [];
2546
+ return []
2433
2547
  }
2434
2548
  },
2435
2549
  cellClick({ row, column }) {
2436
- this.$emit("cellClick", { row, column });
2550
+ this.$emit('cellClick', { row, column })
2437
2551
  //判断是否可以跳转
2438
2552
  if (
2439
2553
  this.gridEdit != true ||
2440
2554
  !(column.editRender && column.editRender.enabled === true)
2441
2555
  ) {
2442
2556
  if (column.params && column.params.route) {
2443
- let tempRouteName = column.params.route.name;
2557
+ let tempRouteName = column.params.route.name
2444
2558
  if (XEUtils.isArray(tempRouteName)) {
2445
2559
  //需要不同条件跳转不同页面
2446
2560
  for (let i = 0; i < tempRouteName.length; i++) {
2447
2561
  if (tempRouteName[i].value === row[tempRouteName[i].field]) {
2448
- tempRouteName = tempRouteName[i].name;
2449
- break;
2562
+ tempRouteName = tempRouteName[i].name
2563
+ break
2450
2564
  }
2451
2565
  }
2452
2566
  }
@@ -2454,37 +2568,37 @@ export default {
2454
2568
  this.$router.pushRoute({
2455
2569
  name: tempRouteName,
2456
2570
  query: { id: row[column.params.route.field] },
2457
- });
2458
- return;
2571
+ })
2572
+ return
2459
2573
  }
2460
2574
  }
2461
2575
  // 判断当前网格是否可以编辑状态
2462
2576
  if (this.gridEdit !== true) {
2463
- return;
2577
+ return
2464
2578
  }
2465
2579
  if (this.$refs.baseGrid.isActiveByRow(row) === true) {
2466
2580
  //判断当前行是否是编辑行
2467
- return;
2581
+ return
2468
2582
  }
2469
2583
  // column.editRender.enabled = false
2470
2584
  if (column.editRender && column.editRender.enabled === true) {
2471
- this.$refs.baseGrid.setActiveCell(row, column);
2585
+ this.$refs.baseGrid.setActiveCell(row, column)
2472
2586
  } else {
2473
- this.$refs.baseGrid.setActiveRow(row);
2587
+ this.$refs.baseGrid.setActiveRow(row)
2474
2588
  }
2475
2589
  },
2476
2590
  customSetActive(id) {
2477
- let fullData = this.$refs.baseGrid.getTableData().fullData;
2478
- let row = fullData.find((x) => x.id == id);
2479
- this.$refs.baseGrid.setCurrentRow(row);
2591
+ let fullData = this.$refs.baseGrid.getTableData().fullData
2592
+ let row = fullData.find((x) => x.id == id)
2593
+ this.$refs.baseGrid.setCurrentRow(row)
2480
2594
  },
2481
2595
  gridRowStyle(scope) {
2482
2596
  if (scope.row.sysRepeat === true) {
2483
- return "row--pending";
2597
+ return 'row--pending'
2484
2598
  }
2485
2599
  },
2486
2600
  bodyScroll(scrollInfo) {
2487
- this.$emit("scroll", scrollInfo);
2601
+ this.$emit('scroll', scrollInfo)
2488
2602
  // if (scrollInfo.isX === true) {
2489
2603
  // // this.$refs.lineArea.style.marginLeft =
2490
2604
  // // (scrollInfo.scrollLeft-(this.fixedColWidth-this.colWidth)) * -1 + 'px'
@@ -2495,10 +2609,10 @@ export default {
2495
2609
  // }
2496
2610
  },
2497
2611
  getRadioRecord(isFull) {
2498
- return this.$refs.baseGrid.getRadioRecord(isFull);
2612
+ return this.$refs.baseGrid.getRadioRecord(isFull)
2499
2613
  },
2500
2614
  setRadioRow(rowInfo) {
2501
- this.$refs.baseGrid.setRadioRow(rowInfo);
2615
+ this.$refs.baseGrid.setRadioRow(rowInfo)
2502
2616
  },
2503
2617
  editClosedEvent({ row, column }) {
2504
2618
  // const $table = this.$refs.baseGrid
@@ -2521,95 +2635,115 @@ export default {
2521
2635
  // 通用行合并函数(将相同多列数据合并为一行)
2522
2636
  rowspanMethod({ row, _rowIndex, column, visibleData }) {
2523
2637
  // let fields = ['role']
2524
- let cellValue = row[column.property];
2638
+ let cellValue = row[column.property]
2525
2639
  if (cellValue && this.mergeFields.includes(column.property)) {
2526
- let prevRow = visibleData[_rowIndex - 1];
2527
- let nextRow = visibleData[_rowIndex + 1];
2640
+ let prevRow = visibleData[_rowIndex - 1]
2641
+ let nextRow = visibleData[_rowIndex + 1]
2528
2642
  if (prevRow && prevRow[column.property] === cellValue) {
2529
- return { rowspan: 0, colspan: 0 };
2643
+ return { rowspan: 0, colspan: 0 }
2530
2644
  } else {
2531
- let countRowspan = 1;
2645
+ let countRowspan = 1
2532
2646
  while (nextRow && nextRow[column.property] === cellValue) {
2533
- nextRow = visibleData[++countRowspan + _rowIndex];
2647
+ nextRow = visibleData[++countRowspan + _rowIndex]
2534
2648
  }
2535
2649
  if (countRowspan > 1) {
2536
- return { rowspan: countRowspan, colspan: 1 };
2650
+ return { rowspan: countRowspan, colspan: 1 }
2537
2651
  }
2538
2652
  }
2539
2653
  }
2540
2654
  },
2541
2655
  clearAll() {
2542
- let vm = this;
2543
- vm.$refs.baseGrid.clearAll();
2656
+ let vm = this
2657
+ vm.$refs.baseGrid.clearAll()
2544
2658
  },
2545
2659
  reloadData(data) {
2546
- let vm = this;
2547
- vm.$refs.baseGrid.reloadData(data);
2660
+ let vm = this
2661
+ vm.$refs.baseGrid.reloadData(data)
2548
2662
  },
2549
2663
  setLoading(e) {
2550
- this.loading = e;
2664
+ this.loading = e
2551
2665
  },
2552
2666
  //清空筛选
2553
2667
  clearFilter() {
2554
2668
  let vm = this
2555
- const filterList = vm.$refs.baseGrid.getCheckedFilters();
2669
+ const filterList = vm.$refs.baseGrid.getCheckedFilters()
2556
2670
  filterList.forEach((col) => {
2557
- vm.$refs.baseGrid.clearFilter(col.column);
2558
- vm.internalColumns.forEach(column => {
2559
- if(column.field==col.property){
2560
- this.$set(column.filters[0].data,'displayValues',[])
2561
- this.$set(column.filters[0].data,'bindingValues',[])
2671
+ vm.$refs.baseGrid.clearFilter(col.column)
2672
+ vm.internalColumns.forEach((column) => {
2673
+ if (column.field == col.property) {
2674
+ this.$set(column.filters[0].data, 'displayValues', [])
2675
+ this.$set(column.filters[0].data, 'bindingValues', [])
2562
2676
  }
2563
- });
2677
+ })
2564
2678
  //这个col和 internalColumn之间没有绑定上
2565
2679
  col.column.filters = [
2566
2680
  {
2567
2681
  data: {
2568
2682
  bindingValues: [],
2569
2683
  displayValues: [],
2570
- displayValueSearchText:''
2571
- }
2572
- }
2684
+ displayValueSearchText: '',
2685
+ },
2686
+ },
2573
2687
  ]
2574
- });
2688
+ })
2575
2689
  XEUtils.clear(vm.filterExpression)
2576
2690
  // 初始标签
2577
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
2578
- vm.$emit("filterChange");
2691
+ this.tagData = JSON.parse(
2692
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
2693
+ )
2694
+ vm.$emit('filterChange')
2579
2695
  },
2580
2696
  filterAddExp(colInfo) {
2581
2697
  colInfo.filters[0].data.displayValues.push({
2582
2698
  value: [null, null],
2583
- });
2699
+ })
2584
2700
  },
2585
2701
  filterConfirm(colInfo) {
2586
- let col = this.internalColumns.find(x=>x.field==colInfo.property)
2587
- this.$set(col.filters[0].data,'bindingValues',[])
2588
- colInfo.filters[0].data.bindingValues = [];
2702
+ let col = this.internalColumns.find((x) => x.field == colInfo.property)
2703
+ this.$set(col.filters[0].data, 'bindingValues', [])
2704
+ colInfo.filters[0].data.bindingValues = []
2589
2705
  XEUtils.arrayEach(colInfo.filters[0].data.displayValues, (item) => {
2590
- if (colInfo.params.controlType === controlType.select || colInfo.params.controlType === controlType.checkbox) {
2591
- colInfo.filters[0].data.bindingValues.push(item);
2592
- this.$set(col.filters[0].data,'bindingValues',colInfo.filters[0].data.bindingValues)
2706
+ if (
2707
+ colInfo.params.controlType === controlType.select ||
2708
+ colInfo.params.controlType === controlType.checkbox
2709
+ ) {
2710
+ colInfo.filters[0].data.bindingValues.push(item)
2711
+ this.$set(
2712
+ col.filters[0].data,
2713
+ 'bindingValues',
2714
+ colInfo.filters[0].data.bindingValues
2715
+ )
2593
2716
  } else {
2594
- if (item.value[0] || item.value[1]||item.value[0]===0||item.value[1]===0) {
2595
- colInfo.filters[0].data.bindingValues.push(item);
2596
- this.$set(col.filters[0].data,'bindingValues',colInfo.filters[0].data.bindingValues)
2717
+ if (
2718
+ item.value[0] ||
2719
+ item.value[1] ||
2720
+ item.value[0] === 0 ||
2721
+ item.value[1] === 0
2722
+ ) {
2723
+ colInfo.filters[0].data.bindingValues.push(item)
2724
+ this.$set(
2725
+ col.filters[0].data,
2726
+ 'bindingValues',
2727
+ colInfo.filters[0].data.bindingValues
2728
+ )
2597
2729
  }
2598
2730
  }
2599
2731
  })
2600
2732
  colInfo.filters[0].checked =
2601
- colInfo.filters[0].data.bindingValues.length > 0;
2733
+ colInfo.filters[0].data.bindingValues.length > 0
2602
2734
  if (this.filterRemote) {
2603
2735
  //设置筛选过滤条件
2604
- this.setFilterExpression();
2736
+ this.setFilterExpression()
2605
2737
  //通知外部筛选改变事件
2606
- this.$emit("filterChange", { filterCol: colInfo });
2738
+ this.$emit('filterChange', { filterCol: colInfo })
2607
2739
  } else {
2608
2740
  // 手动触发重新筛选filterMethod()方法
2609
2741
  this.$refs.baseGrid.updateData()
2610
2742
  }
2611
2743
  // 初始标签
2612
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
2744
+ this.tagData = JSON.parse(
2745
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
2746
+ )
2613
2747
  this.$refs.baseGrid.closeFilter()
2614
2748
  },
2615
2749
  filterMethod({ options, values, cellValue, row, column }) {
@@ -2618,13 +2752,13 @@ export default {
2618
2752
  // 获取所有筛选数据,加入data数组进行比对
2619
2753
  const data = []
2620
2754
  XEUtils.arrayEach(options[0].data.displayValues, (item) => {
2621
- if(column.params.controlType === controlType.number) {
2755
+ if (column.params.controlType === controlType.number) {
2622
2756
  // 数字范围选择
2623
- item.value.sort((a,b)=> a-b)
2624
- if ( item.value[0] <= cellValue && cellValue <= item.value[1]) {
2757
+ item.value.sort((a, b) => a - b)
2758
+ if (item.value[0] <= cellValue && cellValue <= item.value[1]) {
2625
2759
  currentVisible = true
2626
2760
  }
2627
- } else if(
2761
+ } else if (
2628
2762
  column.params.controlType === controlType.date ||
2629
2763
  column.params.controlType === controlType.datetime ||
2630
2764
  column.params.controlType === controlType.time
@@ -2632,10 +2766,10 @@ export default {
2632
2766
  // 日期范围选择
2633
2767
  let tempDate = []
2634
2768
  tempDate.push(XEUtils.timestamp(item.value[0])),
2635
- tempDate.push(XEUtils.timestamp(item.value[1])),
2636
- cellValue = XEUtils.timestamp(cellValue)
2637
- tempDate.sort((a,b)=> a-b)
2638
- if ( tempDate[0] <= cellValue && cellValue <= tempDate[1]) {
2769
+ tempDate.push(XEUtils.timestamp(item.value[1])),
2770
+ (cellValue = XEUtils.timestamp(cellValue))
2771
+ tempDate.sort((a, b) => a - b)
2772
+ if (tempDate[0] <= cellValue && cellValue <= tempDate[1]) {
2639
2773
  currentVisible = true
2640
2774
  }
2641
2775
  } else if (column.params.controlType === controlType.select) {
@@ -2643,141 +2777,148 @@ export default {
2643
2777
  data.push(item)
2644
2778
  } else if (column.params.controlType === controlType.checkbox) {
2645
2779
  // 单选
2646
- cellValue = cellValue?'是':'否'
2647
- data.push(item?'是':'否')
2780
+ cellValue = cellValue ? '是' : '否'
2781
+ data.push(item ? '是' : '否')
2648
2782
  } else {
2649
2783
  // 其余字符串
2650
- let tempData = item.value.find(x => x !== null)
2784
+ let tempData = item.value.find((x) => x !== null)
2651
2785
  if (tempData) {
2652
2786
  data.push(tempData)
2653
2787
  }
2654
2788
  }
2655
- });
2789
+ })
2656
2790
  if (cellValue && !currentVisible) {
2657
- currentVisible = data.find(x => cellValue.indexOf(x) > -1)?true:false
2791
+ currentVisible = data.find((x) => cellValue.indexOf(x) > -1)
2792
+ ? true
2793
+ : false
2658
2794
  }
2659
2795
  return currentVisible
2660
2796
  },
2661
- setFilterExpression(columns = this.$refs.baseGrid.getTableColumn().collectColumn) {
2662
- XEUtils.clear(this.filterExpression);
2663
- XEUtils.clear(this.filterStr);
2797
+ setFilterExpression(
2798
+ columns = this.$refs.baseGrid.getTableColumn().collectColumn
2799
+ ) {
2800
+ XEUtils.clear(this.filterExpression)
2801
+ XEUtils.clear(this.filterStr)
2664
2802
  XEUtils.arrayEach(columns, (loopColInfo) => {
2665
2803
  if (!loopColInfo.filters) {
2666
- return;
2804
+ return
2667
2805
  }
2668
2806
  if (loopColInfo.filters[0].data.bindingValues.length === 0) {
2669
- return;
2807
+ return
2670
2808
  }
2671
2809
  //开始构造条件
2672
2810
  let tempStr = {
2673
2811
  field: loopColInfo.field,
2674
2812
  title: loopColInfo.title,
2675
- exp: "",
2676
- };
2677
- let expStr = "";
2678
- let filterBindingValues = loopColInfo.filters[0].data.bindingValues;
2813
+ exp: '',
2814
+ }
2815
+ let expStr = ''
2816
+ let filterBindingValues = loopColInfo.filters[0].data.bindingValues
2679
2817
  //筛选条件过滤
2680
- let colFilterExpression = { operator: "or", expressions: [] };
2818
+ let colFilterExpression = { operator: 'or', expressions: [] }
2681
2819
 
2682
- if (loopColInfo.params.controlType === controlType.select || loopColInfo.params.controlType === controlType.checkbox) {
2820
+ if (
2821
+ loopColInfo.params.controlType === controlType.select ||
2822
+ loopColInfo.params.controlType === controlType.checkbox
2823
+ ) {
2683
2824
  colFilterExpression.expressions.push({
2684
2825
  field: loopColInfo.field,
2685
- operator: "IN",
2826
+ operator: 'IN',
2686
2827
  value: filterBindingValues,
2687
- });
2688
- this.filterExpression.push(colFilterExpression);
2689
- tempStr.exp = "存在于 " + filterBindingValues;
2690
- this.filterStr.push(tempStr);
2691
- return;
2828
+ })
2829
+ this.filterExpression.push(colFilterExpression)
2830
+ tempStr.exp = '存在于 ' + filterBindingValues
2831
+ this.filterStr.push(tempStr)
2832
+ return
2692
2833
  }
2693
2834
 
2694
2835
  XEUtils.arrayEach(filterBindingValues, (loopBindingValue) => {
2695
2836
  let tempPushExp = {
2696
2837
  field: loopColInfo.field,
2697
- operator: "CO",
2838
+ operator: 'CO',
2698
2839
  value: [],
2699
- };
2840
+ }
2700
2841
  let tempControlType = loopColInfo.params.controlType
2701
- if(loopColInfo.params.filterControlType){
2842
+ if (loopColInfo.params.filterControlType) {
2702
2843
  tempControlType = loopColInfo.params.filterControlType
2703
2844
  }
2704
2845
  switch (tempControlType) {
2705
2846
  case controlType.date:
2706
2847
  case controlType.datetime:
2707
2848
  if (loopBindingValue.value[0] && loopBindingValue.value[1]) {
2708
- tempPushExp.operator = "RA";
2709
- tempPushExp.value = loopBindingValue.value;
2710
- expStr = "范围";
2849
+ tempPushExp.operator = 'RA'
2850
+ tempPushExp.value = loopBindingValue.value
2851
+ expStr = '范围'
2711
2852
  tempStr.exp =
2712
2853
  tempStr.exp +
2713
2854
  loopBindingValue.value[0] +
2714
- "" +
2855
+ '' +
2715
2856
  loopBindingValue.value[1] +
2716
- "";
2857
+ ''
2717
2858
  } else if (loopBindingValue.value[0]) {
2718
- tempPushExp.operator = "GE";
2719
- tempPushExp.value = loopBindingValue.value[0];
2720
- tempStr.exp = tempStr.exp + tempPushExp.value + "";
2721
- expStr = "大于等于";
2859
+ tempPushExp.operator = 'GE'
2860
+ tempPushExp.value = loopBindingValue.value[0]
2861
+ tempStr.exp = tempStr.exp + tempPushExp.value + ''
2862
+ expStr = '大于等于'
2722
2863
  } else {
2723
- tempPushExp.operator = "LE";
2724
- tempPushExp.value = loopBindingValue.value[1];
2725
- tempStr.exp = tempStr.exp + tempPushExp.value + "";
2726
- expStr = "小于等于";
2864
+ tempPushExp.operator = 'LE'
2865
+ tempPushExp.value = loopBindingValue.value[1]
2866
+ tempStr.exp = tempStr.exp + tempPushExp.value + ''
2867
+ expStr = '小于等于'
2727
2868
  }
2728
- break;
2869
+ break
2729
2870
  case controlType.number:
2730
- tempPushExp.operator = "RA";
2731
- tempPushExp.value = loopBindingValue.value;
2732
- expStr = "范围";
2871
+ tempPushExp.operator = 'RA'
2872
+ tempPushExp.value = loopBindingValue.value
2873
+ expStr = '范围'
2733
2874
  tempStr.exp =
2734
2875
  tempStr.exp +
2735
2876
  loopBindingValue.value[0] +
2736
- "" +
2877
+ '' +
2737
2878
  loopBindingValue.value[1] +
2738
- "";
2739
- break;
2879
+ ''
2880
+ break
2740
2881
  default:
2741
- tempPushExp.value = loopBindingValue.value[0];
2742
- expStr = "包含";
2743
- tempStr.exp = tempStr.exp + loopBindingValue.value[0] + "";
2882
+ tempPushExp.value = loopBindingValue.value[0]
2883
+ expStr = '包含'
2884
+ tempStr.exp = tempStr.exp + loopBindingValue.value[0] + ''
2744
2885
  }
2745
- colFilterExpression.expressions.push(tempPushExp);
2746
- });
2747
- this.filterExpression.push(colFilterExpression);
2748
- tempStr.exp = expStr + tempStr.exp.substring(0, tempStr.exp.length - 1);
2749
- this.filterStr.push(tempStr);
2750
- });
2886
+ colFilterExpression.expressions.push(tempPushExp)
2887
+ })
2888
+ this.filterExpression.push(colFilterExpression)
2889
+ tempStr.exp = expStr + tempStr.exp.substring(0, tempStr.exp.length - 1)
2890
+ this.filterStr.push(tempStr)
2891
+ })
2751
2892
 
2752
- this.toolBarConfig.enabled = this.filterExpression.length > 0;
2893
+ this.toolBarConfig.enabled = this.filterExpression.length > 0
2753
2894
  },
2754
2895
  filterVisible({ column, visible }) {
2755
2896
  if (visible) {
2756
2897
  //重新赋值过滤的显示值
2757
- column.filters[0].data.displayValues = [];
2898
+ column.filters[0].data.displayValues = []
2758
2899
  column.filters[0].data.displayValueSearchText = ''
2759
2900
  XEUtils.arrayEach(column.filters[0].data.bindingValues, (item) => {
2760
- column.filters[0].data.displayValues.push(item);
2761
- });
2901
+ column.filters[0].data.displayValues.push(item)
2902
+ })
2762
2903
  if (column.params.controlType !== controlType.select) {
2763
2904
  column.filters[0].data.displayValues.push({
2764
2905
  value: [null, null],
2765
- });
2906
+ })
2766
2907
  }
2767
2908
  //设置第一个输入框光标选中
2768
- let tempClassName = column.field + "_filter_0";
2909
+ let tempClassName = column.field + '_filter_0'
2769
2910
  setTimeout(() => {
2770
2911
  // document
2771
2912
  // .getElementsByClassName(tempClassName)[0]
2772
2913
  // .children[0].select();
2773
2914
  // document.getElementsByClassName(tempClassName)[0].children[0].focus();
2774
- }, 10);
2915
+ }, 10)
2775
2916
  }
2776
2917
  },
2777
- numberFormatter(value, scope){
2918
+ numberFormatter(value, scope) {
2778
2919
  return value
2779
2920
  },
2780
- numberParse(value, scope){
2921
+ numberParse(value, scope) {
2781
2922
  if (scope.column.params.le) {
2782
2923
  //小于等于
2783
2924
  if (value > scope.row[scope.column.params.le]) {
@@ -2787,7 +2928,9 @@ export default {
2787
2928
  let returnValue = value
2788
2929
  let tempPrecision = XEUtils.toNumber(scope.column.params.precision)
2789
2930
  let reg = new RegExp(
2790
- '^((-?)|(-?([1-9]{1}\\d*)|-?([0]{1})))(\\.(\\d){0,' + tempPrecision + '})?$'
2931
+ '^((-?)|(-?([1-9]{1}\\d*)|-?([0]{1})))(\\.(\\d){0,' +
2932
+ tempPrecision +
2933
+ '})?$'
2791
2934
  )
2792
2935
  if (!reg.test(value)) {
2793
2936
  //小数点验证不通过
@@ -2812,12 +2955,13 @@ export default {
2812
2955
  saveTableHeight() {
2813
2956
  let vm = this
2814
2957
  // 去除操作列和序号、多选框列
2815
- let resizeColumns = JSON.parse(JSON.stringify(
2816
- vm.$refs.baseGrid.getTableColumn().collectColumn
2817
- .filter(x=>
2818
- (x.field !== "operation") &&
2819
- (x.field !== undefined)
2820
- )
2958
+ let resizeColumns = JSON.parse(
2959
+ JSON.stringify(
2960
+ vm.$refs.baseGrid
2961
+ .getTableColumn()
2962
+ .collectColumn.filter(
2963
+ (x) => x.field !== 'operation' && x.field !== undefined
2964
+ )
2821
2965
  )
2822
2966
  )
2823
2967
  // 保存参数
@@ -2826,23 +2970,26 @@ export default {
2826
2970
  dataCode: vm.dataCode,
2827
2971
  fields: [],
2828
2972
  }
2829
- resizeColumns.forEach((item, index)=> {
2973
+ resizeColumns.forEach((item, index) => {
2830
2974
  item.width = item.resizeWidth ? item.resizeWidth : item.width
2831
2975
  // 获取初始字段筛选条件,用于避免赋值宽度将普通筛选条件加入默认筛选
2832
- let tempObject = vm.defaultPostData.fields.find(x => x.field == item.field)
2976
+ let tempObject = vm.defaultPostData.fields.find(
2977
+ (x) => x.field == item.field
2978
+ )
2833
2979
  let tempData = {
2834
2980
  field: item.field,
2835
2981
  sort: index + 1,
2836
2982
  hidden: !item.visible,
2837
2983
  width: item.width,
2838
- extraInfo:{}
2984
+ extraInfo: {},
2839
2985
  }
2840
2986
  if (
2841
2987
  tempObject.extraInfo.filterExpression &&
2842
2988
  tempObject.extraInfo.filterExpression[0].data.bindingValues.length
2843
2989
  ) {
2844
- item.filters[0].checked = true;
2845
- tempData.extraInfo.filterExpression = tempObject.extraInfo.filterExpression
2990
+ item.filters[0].checked = true
2991
+ tempData.extraInfo.filterExpression =
2992
+ tempObject.extraInfo.filterExpression
2846
2993
  }
2847
2994
  if (tempObject.extraInfo.order) {
2848
2995
  tempData.extraInfo.order = tempObject.extraInfo.order
@@ -2850,7 +2997,7 @@ export default {
2850
2997
  postData.fields.push(tempData)
2851
2998
  })
2852
2999
  saveUserModuleDataFieldApi(postData)
2853
- .then(res => {
3000
+ .then((res) => {
2854
3001
  // 更新默认参数
2855
3002
  vm.defaultPostData = postData
2856
3003
  // 更新拖拽弹窗数据,避免宽度改变失效
@@ -2869,18 +3016,17 @@ export default {
2869
3016
  let returnOperator = null
2870
3017
  // 筛选条件重组数组
2871
3018
  let curretnArr = []
2872
- if(info.column.params.controlType === controlType.number) {
3019
+ if (info.column.params.controlType === controlType.number) {
2873
3020
  returnOperator = '范围'
2874
3021
  // 数字范围选择
2875
3022
  // 去除空值
2876
- displayValues = displayValues.filter(f=>f.value[0])
2877
- displayValues.forEach(x=> {
3023
+ displayValues = displayValues.filter((f) => f.value[0])
3024
+ displayValues.forEach((x) => {
2878
3025
  let tempNumber = []
2879
- tempNumber.push(x.value[0]),
2880
- tempNumber.push(x.value[1])
3026
+ tempNumber.push(x.value[0]), tempNumber.push(x.value[1])
2881
3027
  curretnArr.push(tempNumber.join('~'))
2882
3028
  })
2883
- } else if(
3029
+ } else if (
2884
3030
  info.column.params.controlType === controlType.date ||
2885
3031
  info.column.params.controlType === controlType.datetime ||
2886
3032
  info.column.params.controlType === controlType.time
@@ -2888,30 +3034,31 @@ export default {
2888
3034
  // 日期范围选择
2889
3035
  // 去除空值
2890
3036
  returnOperator = '范围'
2891
- displayValues = displayValues.filter(f=>f.value[0])
2892
- displayValues.forEach(x=> {
3037
+ displayValues = displayValues.filter((f) => f.value[0])
3038
+ displayValues.forEach((x) => {
2893
3039
  let tempDate = []
2894
- tempDate.push(x.value[0]),
2895
- tempDate.push(x.value[1])
3040
+ tempDate.push(x.value[0]), tempDate.push(x.value[1])
2896
3041
  curretnArr.push(tempDate.join('~'))
2897
3042
  })
2898
3043
  } else if (info.column.params.controlType === controlType.select) {
2899
3044
  // 下拉
2900
3045
  returnOperator = '包含'
2901
- displayValues.forEach(x=> {
2902
- let findValue = info.column.params.dataSource.find(f=>f.value == x)
2903
- curretnArr.push(findValue?findValue.caption : x)
3046
+ displayValues.forEach((x) => {
3047
+ let findValue = info.column.params.dataSource.find(
3048
+ (f) => f.value == x
3049
+ )
3050
+ curretnArr.push(findValue ? findValue.caption : x)
2904
3051
  })
2905
3052
  } else if (info.column.params.controlType === controlType.checkbox) {
2906
3053
  returnOperator = '包含'
2907
3054
  // 单选
2908
- displayValues.forEach(x=> curretnArr.push(x?'是':'否'))
3055
+ displayValues.forEach((x) => curretnArr.push(x ? '是' : '否'))
2909
3056
  } else {
2910
3057
  // 其余字符串
2911
3058
  // 去除空值
2912
3059
  returnOperator = '包含'
2913
- displayValues = displayValues.filter(f=>f.value[0])
2914
- displayValues.forEach(display=> {
3060
+ displayValues = displayValues.filter((f) => f.value[0])
3061
+ displayValues.forEach((display) => {
2915
3062
  curretnArr.push(display.value[0])
2916
3063
  })
2917
3064
  }
@@ -2926,7 +3073,7 @@ export default {
2926
3073
  },
2927
3074
  // 保存默认配置条件
2928
3075
  saveFilterTable(colInfo) {
2929
- colInfo.filters[0].data.bindingValues = [];
3076
+ colInfo.filters[0].data.bindingValues = []
2930
3077
  XEUtils.arrayEach(colInfo.filters[0].data.displayValues, (item) => {
2931
3078
  if (
2932
3079
  colInfo.params.controlType === controlType.select ||
@@ -2934,18 +3081,23 @@ export default {
2934
3081
  ) {
2935
3082
  // 复选清空筛选初始数据过滤
2936
3083
  if (!item.value) {
2937
- colInfo.filters[0].data.bindingValues.push(item);
3084
+ colInfo.filters[0].data.bindingValues.push(item)
2938
3085
  }
2939
3086
  } else {
2940
- if (item.value[0] || item.value[1]||item.value[0]===0||item.value[1]===0) {
2941
- colInfo.filters[0].data.bindingValues.push(item);
3087
+ if (
3088
+ item.value[0] ||
3089
+ item.value[1] ||
3090
+ item.value[0] === 0 ||
3091
+ item.value[1] === 0
3092
+ ) {
3093
+ colInfo.filters[0].data.bindingValues.push(item)
2942
3094
  }
2943
3095
  }
2944
3096
  })
2945
3097
  colInfo.filters[0].checked =
2946
- colInfo.filters[0].data.bindingValues.length > 0;
3098
+ colInfo.filters[0].data.bindingValues.length > 0
2947
3099
  let postData = JSON.parse(JSON.stringify(this.defaultPostData))
2948
- postData.fields.forEach(item => {
3100
+ postData.fields.forEach((item) => {
2949
3101
  if (item.field == colInfo.field) {
2950
3102
  item.extraInfo = {}
2951
3103
  if (colInfo.filters && colInfo.filters[0].data.bindingValues.length) {
@@ -2956,45 +3108,45 @@ export default {
2956
3108
  }
2957
3109
  }
2958
3110
  })
2959
- let tableCollectColumn = this.$refs.baseGrid.getTableColumn().collectColumn;
3111
+ let tableCollectColumn =
3112
+ this.$refs.baseGrid.getTableColumn().collectColumn
2960
3113
  saveUserModuleDataFieldApi(postData)
2961
- .then(res => {
3114
+ .then((res) => {
2962
3115
  // 更新默认参数
2963
3116
  this.defaultPostData = postData
2964
3117
  this.$refs.baseGrid.closeFilter()
2965
3118
  // 初始标签
2966
- this.tagData = JSON.parse(JSON.stringify(this.$refs.baseGrid.getCheckedFilters()))
3119
+ this.tagData = JSON.parse(
3120
+ JSON.stringify(this.$refs.baseGrid.getCheckedFilters())
3121
+ )
2967
3122
  // 设置表格顺序
2968
3123
  tableCollectColumn = XEUtils.orderBy(
2969
3124
  tableCollectColumn,
2970
3125
  (p) => p.params.tempCustomSort
2971
- );
3126
+ )
2972
3127
  //设置筛选过滤条件及排序,用于保存后回调刷新
2973
- this.setFilterExpression();
3128
+ this.setFilterExpression()
2974
3129
  let data = []
2975
- this.$refs.baseGrid.getSortColumns().forEach(x=> {
2976
- data.push([x.field,x.order])
3130
+ this.$refs.baseGrid.getSortColumns().forEach((x) => {
3131
+ data.push([x.field, x.order])
2977
3132
  })
2978
- this.$emit("sortChange", data);
2979
-
3133
+ this.$emit('sortChange', data)
3134
+
2980
3135
  //清空store缓存
2981
- this.$store.commit(
2982
- "SET_MODULE_VIEW_INFO",{
2983
- moduleCode:this.moduleCode,
2984
- info:res.content
2985
- }
2986
- )
3136
+ this.$store.commit('SET_MODULE_VIEW_INFO', {
3137
+ moduleCode: this.moduleCode,
3138
+ info: res.content,
3139
+ })
2987
3140
  })
2988
3141
  .catch((err) => {
2989
3142
  console.debug(err)
2990
3143
  })
2991
- .finally(() => {
2992
- })
3144
+ .finally(() => {})
2993
3145
  },
2994
3146
  },
2995
- };
3147
+ }
2996
3148
  </script>
2997
-
3149
+
2998
3150
  <style>
2999
3151
  .base-grid-view .ant-btn-link {
3000
3152
  padding: 0 6px;
@@ -3021,10 +3173,10 @@ export default {
3021
3173
  }
3022
3174
 
3023
3175
  .base-grid-view .vxe-icon--caret-top {
3024
- color: "#c0c4cc" !important;
3176
+ color: '#c0c4cc' !important;
3025
3177
  }
3026
3178
  .base-grid-view .vxe-icon--caret-bottom {
3027
- color: "#c0c4cc" !important;
3179
+ color: '#c0c4cc' !important;
3028
3180
  }
3029
3181
  .vxe-icon--caret-top:hover {
3030
3182
  color: #409eff;
@@ -3038,130 +3190,129 @@ export default {
3038
3190
  }
3039
3191
  .popover-content-card .ant-popover-inner-content {
3040
3192
  padding: 0px;
3041
- border:none;
3193
+ border: none;
3042
3194
  }
3043
3195
  </style>
3044
3196
  <style lang="scss" scoped>
3045
- .base-grid-view .vxe-header--row .vxe-header--column.sortable-ghost,
3046
- .base-grid-view .vxe-header--row .vxe-header--column.sortable-chosen {
3047
- background-color: #dfecfb;
3048
- }
3049
- .base-grid-view .vxe-header--row .vxe-header--column.col--fixed {
3050
- cursor: no-drop;
3051
- }
3052
- .inner-cell-control {
3053
- width: 100% !important;
3054
- min-width:unset!important;
3055
- }
3056
- .input-box {
3057
- width: 100%;
3058
- border: 1px solid;
3059
- min-height: 24px;
3060
- border-radius: 4px;
3061
- border-color: rgb(217, 217, 217);
3062
- padding-left: 5px;
3063
- line-height: 24px !important;
3064
- }
3065
- .test_filter {
3066
- text-align: left;
3067
- // display: inline-block;
3068
- // width:90%
3069
- }
3070
- .test_filter_title {
3071
- margin-left: 2%;
3072
- }
3073
- /*滚动条整体部分*/
3074
- .base-grid-view ::-webkit-scrollbar {
3075
- width: 10px;
3076
- height: 10px;
3077
- z-index: 10;
3078
- }
3079
- /*滚动条的轨道*/
3080
- .base-grid-view ::-webkit-scrollbar-track {
3081
- background-color: #ffffff;
3082
- z-index: 10;
3083
- }
3084
- /*滚动条里面的小方块,能向上向下移动*/
3085
- .base-grid-view ::-webkit-scrollbar-thumb {
3086
- background-color: #bfbfbf;
3087
- border-radius: 5px;
3088
- border: 1px solid #f1f1f1;
3089
- box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
3090
- z-index: 10;
3091
- }
3092
- .base-grid-view ::-webkit-scrollbar-thumb:hover {
3093
- background-color: #a8a8a8;
3094
- z-index: 10;
3095
- }
3096
- .base-grid-view ::-webkit-scrollbar-thumb:active {
3097
- background-color: #787878;
3098
- z-index: 10;
3099
- }
3100
- /*边角,即两个滚动条的交汇处*/
3101
- .base-grid-view ::-webkit-scrollbar-corner {
3102
- background-color: #ffffff;
3103
- z-index: 10;
3104
- }
3105
- .draggableItem {
3106
- display: inline-block;
3107
- height: 100%;
3108
- line-height: 30px;
3109
- border: 1.3px solid #e8eaec;
3110
- margin: 0 !important;
3111
- margin: 0 10px;
3112
- // overflow: hidden;
3113
- // text-overflow: ellipsis;
3114
- // white-space: nowrap;
3115
- }
3116
- .sortable-column-demo .vxe-header--row .vxe-header--column.sortable-ghost,
3117
- .sortable-column-demo .vxe-header--row .vxe-header--column.sortable-chosen {
3118
- background-color: #dfecfb;
3119
- }
3120
- .sortable-column-demo .vxe-header--row .vxe-header--column.col--fixed {
3121
- cursor: no-drop;
3122
- }
3197
+ .base-grid-view .vxe-header--row .vxe-header--column.sortable-ghost,
3198
+ .base-grid-view .vxe-header--row .vxe-header--column.sortable-chosen {
3199
+ background-color: #dfecfb;
3200
+ }
3201
+ .base-grid-view .vxe-header--row .vxe-header--column.col--fixed {
3202
+ cursor: no-drop;
3203
+ }
3204
+ .inner-cell-control {
3205
+ width: 100% !important;
3206
+ min-width: unset !important;
3207
+ }
3208
+ .input-box {
3209
+ width: 100%;
3210
+ border: 1px solid;
3211
+ min-height: 24px;
3212
+ border-radius: 4px;
3213
+ border-color: rgb(217, 217, 217);
3214
+ padding-left: 5px;
3215
+ line-height: 24px !important;
3216
+ }
3217
+ .test_filter {
3218
+ text-align: left;
3219
+ // display: inline-block;
3220
+ // width:90%
3221
+ }
3222
+ .test_filter_title {
3223
+ margin-left: 2%;
3224
+ }
3225
+ /*滚动条整体部分*/
3226
+ .base-grid-view ::-webkit-scrollbar {
3227
+ width: 10px;
3228
+ height: 10px;
3229
+ z-index: 10;
3230
+ }
3231
+ /*滚动条的轨道*/
3232
+ .base-grid-view ::-webkit-scrollbar-track {
3233
+ background-color: #ffffff;
3234
+ z-index: 10;
3235
+ }
3236
+ /*滚动条里面的小方块,能向上向下移动*/
3237
+ .base-grid-view ::-webkit-scrollbar-thumb {
3238
+ background-color: #bfbfbf;
3239
+ border-radius: 5px;
3240
+ border: 1px solid #f1f1f1;
3241
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
3242
+ z-index: 10;
3243
+ }
3244
+ .base-grid-view ::-webkit-scrollbar-thumb:hover {
3245
+ background-color: #a8a8a8;
3246
+ z-index: 10;
3247
+ }
3248
+ .base-grid-view ::-webkit-scrollbar-thumb:active {
3249
+ background-color: #787878;
3250
+ z-index: 10;
3251
+ }
3252
+ /*边角,即两个滚动条的交汇处*/
3253
+ .base-grid-view ::-webkit-scrollbar-corner {
3254
+ background-color: #ffffff;
3255
+ z-index: 10;
3256
+ }
3257
+ .draggableItem {
3258
+ display: inline-block;
3259
+ height: 100%;
3260
+ line-height: 30px;
3261
+ border: 1.3px solid #e8eaec;
3262
+ margin: 0 !important;
3263
+ margin: 0 10px;
3264
+ // overflow: hidden;
3265
+ // text-overflow: ellipsis;
3266
+ // white-space: nowrap;
3267
+ }
3268
+ .sortable-column-demo .vxe-header--row .vxe-header--column.sortable-ghost,
3269
+ .sortable-column-demo .vxe-header--row .vxe-header--column.sortable-chosen {
3270
+ background-color: #dfecfb;
3271
+ }
3272
+ .sortable-column-demo .vxe-header--row .vxe-header--column.col--fixed {
3273
+ cursor: no-drop;
3274
+ }
3123
3275
 
3124
- .interceptor-class {
3125
- padding: 10px;
3126
- ::v-deep .ant-btn {
3127
- margin: 10px 10px 0;
3128
- }
3129
- ::v-deep .ant-calendar-picker {
3130
- margin: 0 5px;
3131
- }
3276
+ .interceptor-class {
3277
+ padding: 10px;
3278
+ ::v-deep .ant-btn {
3279
+ margin: 10px 10px 0;
3132
3280
  }
3133
- .grid-setting {
3134
- font-size: 25px;
3135
- cursor: pointer;
3281
+ ::v-deep .ant-calendar-picker {
3282
+ margin: 0 5px;
3283
+ }
3284
+ }
3285
+ .grid-setting {
3286
+ font-size: 25px;
3287
+ cursor: pointer;
3136
3288
 
3137
- :hover {
3138
- color: #219bff
3139
- }
3289
+ :hover {
3290
+ color: #219bff;
3140
3291
  }
3141
- .svgclass {
3142
- fill: antiquewhite;
3143
- :hover {
3144
- fill: #219bff;
3145
- }
3292
+ }
3293
+ .svgclass {
3294
+ fill: antiquewhite;
3295
+ :hover {
3296
+ fill: #219bff;
3146
3297
  }
3147
- // 头部筛选条件显示
3148
- .head-tag {
3149
- padding: 5px;
3150
- text-align: left;
3151
- .ant-tag {
3298
+ }
3299
+ // 头部筛选条件显示
3300
+ .head-tag {
3301
+ padding: 5px;
3302
+ text-align: left;
3303
+ .ant-tag {
3304
+ font-size: 14px;
3305
+ margin-bottom: 2px;
3306
+ padding: 4px 8px;
3307
+ border-radius: 0;
3308
+ border: 0;
3309
+ background-color: #f6f7f9;
3310
+ .anticon-close {
3152
3311
  font-size: 14px;
3153
- margin-bottom: 2px;
3154
- padding: 4px 8px;
3155
- border-radius: 0;
3156
- border: 0;
3157
- background-color: #f6f7f9;
3158
- .anticon-close {
3159
- font-size: 14px;
3160
- }
3161
3312
  }
3162
3313
  }
3163
- ::v-deep .ant-tag .anticon-close{
3164
- font-size: 14px;
3165
- }
3166
-
3167
- </style>
3314
+ }
3315
+ ::v-deep .ant-tag .anticon-close {
3316
+ font-size: 14px;
3317
+ }
3318
+ </style>