doway-coms 1.7.5 → 1.7.7

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