doway-coms 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -3,12 +3,12 @@
3
3
  <div class="d-control-label">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span v-if="rules && rules['required']" class="d-control-label-required"
10
7
  >*</span
11
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
12
12
  </div>
13
13
  <div class="d-control">
14
14
  <ValidationProvider
@@ -6,12 +6,12 @@
6
6
  >
7
7
  {{ label
8
8
  }}
9
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
- </Tooltip>
12
9
  <span v-if="rules && rules['required']" class="d-control-label-required"
13
10
  >*</span
14
11
  >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
+ </Tooltip>
15
15
  </div>
16
16
  <div class="d-control">
17
17
  <ValidationProvider
@@ -3,12 +3,12 @@
3
3
  <div class="d-control-label">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span v-if="rules && rules['required']" class="d-control-label-required"
10
7
  >*</span
11
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
12
12
  </div>
13
13
  <div class="d-control">
14
14
  <ValidationProvider
@@ -6,12 +6,12 @@
6
6
  >
7
7
  {{ label
8
8
  }}
9
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
- </Tooltip>
12
9
  <span v-if="rules && rules['required']" class="d-control-label-required"
13
10
  >*</span
14
11
  >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
+ </Tooltip>
15
15
  </div>
16
16
  <div class="d-control">
17
17
  <ValidationProvider
@@ -64,6 +64,15 @@
64
64
  :show-footer="showFooter"
65
65
  @scroll="bodyScroll"
66
66
  >
67
+ <template v-for="item in internalColumns" #[item.field]>
68
+ <div :key="item.field">
69
+ <span v-if="item.visible !== false">{{item.title}}</span>
70
+ <Tooltip :title="item.tooltip" v-if="item.tooltip && item.visible !== false" style="margin: 0 2px">
71
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
72
+ </Tooltip>
73
+ <!-- {{item}}-->
74
+ </div>
75
+ </template>
67
76
  <template #toolbar_buttons>
68
77
  <!-- <div>-->
69
78
  <!-- <span v-for="loopFilterStr in filterStr" :key="loopFilterStr.field">-->
@@ -471,6 +480,7 @@ import { mapGetters } from "vuex";
471
480
  import XEUtils from "xe-utils";
472
481
  //VXETable插件
473
482
  import VXETable from "vxe-table";
483
+ import { Tooltip } from 'ant-design-vue'
474
484
  //ant的空状态展示占位图
475
485
  import {
476
486
  Empty,
@@ -508,6 +518,7 @@ export default {
508
518
  BasePagination,
509
519
  BasePulldown,
510
520
  BaseGridAdjust,
521
+ Tooltip,
511
522
  },
512
523
  data() {
513
524
  return {
@@ -817,6 +828,7 @@ export default {
817
828
  },
818
829
 
819
830
  created() {
831
+
820
832
  //拖动后输入框有错位问题,暂时不启用
821
833
  // this.initColumnDrop()
822
834
 
@@ -826,6 +838,12 @@ export default {
826
838
  // filterMethod:this.sysRowStateFilter,
827
839
  // filters:[{label:'筛选删除行',value:'delete',checked:true}]
828
840
  // })
841
+ for (let i = 0; i < this.columns.length; i++) {
842
+ this.internalColumns.push(this.initColumns(this.columns[i]));
843
+ if(this.columns[i].visible !== false && this.columns[i].controlType !== 'operation') {
844
+ this.internalColumns[i].slots.header = this.columns[i].field;
845
+ }
846
+ }
829
847
  if (this.showSeq) {
830
848
  this.internalColumns.push(
831
849
  // {
@@ -859,9 +877,8 @@ export default {
859
877
  },
860
878
  });
861
879
  }
862
- for (let i = 0; i < this.columns.length; i++) {
863
- this.internalColumns.push(this.initColumns(this.columns[i]));
864
- }
880
+
881
+ console.log(this.internalColumns)
865
882
  this.gridEdit = this.edit;
866
883
  },
867
884
 
@@ -1182,6 +1199,7 @@ export default {
1182
1199
  let colInfo = {
1183
1200
  field: originCol.field,
1184
1201
  title: originCol.title,
1202
+ tooltip: originCol.tooltip,
1185
1203
  visible: true,
1186
1204
  };
1187
1205
 
@@ -3,12 +3,12 @@
3
3
  <div class="d-control-label">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span v-if="rules && rules['required']" class="d-control-label-required"
10
7
  >*
11
8
  </span>
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
12
12
  </div>
13
13
  <div class="d-control">
14
14
  <ValidationProvider
@@ -3,14 +3,14 @@
3
3
  <div class="d-control-label">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span
10
7
  v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
11
8
  class="d-control-label-required"
12
9
  >*</span
13
10
  >
11
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
12
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
13
+ </Tooltip>
14
14
  </div>
15
15
  <div class="d-control" style="font-size:12px">
16
16
  <ValidationProvider
@@ -7,14 +7,14 @@
7
7
  >
8
8
  {{ label
9
9
  }}
10
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
11
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
12
- </Tooltip>
13
10
  <span
14
11
  v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
15
12
  class="d-control-label-required"
16
13
  >*</span
17
14
  >
15
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
16
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
17
+ </Tooltip>
18
18
  </div>
19
19
  <div
20
20
  :class="{
@@ -7,12 +7,12 @@
7
7
  >
8
8
  {{ label
9
9
  }}
10
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
11
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
12
- </Tooltip>
13
10
  <span v-if="rules && rules['required']" class="d-control-label-required"
14
11
  >*</span
15
12
  >
13
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
14
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
15
+ </Tooltip>
16
16
  </div>
17
17
  <div
18
18
  :class="{
@@ -6,12 +6,12 @@
6
6
  >
7
7
  {{ label
8
8
  }}
9
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
- </Tooltip>
12
9
  <span v-if="rules && rules['required']" class="d-control-label-required"
13
10
  >*</span
14
11
  >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
14
+ </Tooltip>
15
15
  </div>
16
16
  <div class="d-control">
17
17
  <ValidationProvider
@@ -3,12 +3,12 @@
3
3
  <div class="d-control-label">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span v-if="rules && rules['required']" class="d-control-label-required"
10
7
  >*</span
11
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
12
12
  </div>
13
13
  <div class="d-control">
14
14
  <ValidationProvider
@@ -3,12 +3,12 @@
3
3
  <div class="d-control-label" v-if="showLabel === true">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span v-if="rules && rules['required']" class="d-control-label-required"
10
7
  >*</span
11
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
12
12
  </div>
13
13
  <div
14
14
  :style="{ width: width ? width : '100%', height: height ? height : '' }"
@@ -3,12 +3,12 @@
3
3
  <div class="d-control-label">
4
4
  {{ label
5
5
  }}
6
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
7
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
8
- </Tooltip>
9
6
  <span v-if="rules && rules['required']" class="d-control-label-required"
10
7
  >*</span
11
8
  >
9
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
+ </Tooltip>
12
12
  </div>
13
13
  <div class="d-control">
14
14
  <ValidationProvider
@@ -483,9 +483,12 @@ export function custUnitPriceNotTaxAmount(rowInfo, taxRate, colInfo) {
483
483
  export function setIndustryVersionFields(fields){
484
484
  let length = fields.length
485
485
  for(let i=length-1;i>=0;i--){
486
- if(XEUtils.isArray(fields[i].versions) && XEUtils.indexOf(fields[i].versions,store.getters.industryVersion)<0){
487
- XEUtils.remove(fields,i)
486
+ if(XEUtils.isArray(fields[i].versions)){
487
+ let tempValue = XEUtils.find(fields[i].versions,p=>store.getters.industryVersion.includes(p))
488
+ if(tempValue){
489
+ continue
490
+ }
491
+ XEUtils.remove(fields,i)
488
492
  }
489
-
490
493
  }
491
494
  }