doway-coms 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
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">-->
@@ -330,7 +339,7 @@
330
339
  :style="{
331
340
  display: 'flex',
332
341
  flexWrap: 'wrap',
333
- justifyContent: 'center',
342
+ justifyContent: 'left',
334
343
  alignItems: 'center',
335
344
  maxHeight: '150px',
336
345
  overflow: 'auto',
@@ -342,10 +351,9 @@
342
351
  v-for="loopSource in scope.column.params.dataSource"
343
352
  :key="loopSource.value"
344
353
  :value="loopSource.value"
345
- style="margin: 5px 0"
354
+ style="margin: 5px 0;"
346
355
  >{{ loopSource.caption }}
347
356
  </a-checkbox>
348
-
349
357
  </a-checkbox-group>
350
358
  <!-- <a-select-->
351
359
  <!-- v-model="scope.column.filters[0].data.displayValues"-->
@@ -471,6 +479,7 @@ import { mapGetters } from "vuex";
471
479
  import XEUtils from "xe-utils";
472
480
  //VXETable插件
473
481
  import VXETable from "vxe-table";
482
+ import { Tooltip } from 'ant-design-vue'
474
483
  //ant的空状态展示占位图
475
484
  import {
476
485
  Empty,
@@ -508,6 +517,7 @@ export default {
508
517
  BasePagination,
509
518
  BasePulldown,
510
519
  BaseGridAdjust,
520
+ Tooltip,
511
521
  },
512
522
  data() {
513
523
  return {
@@ -817,6 +827,7 @@ export default {
817
827
  },
818
828
 
819
829
  created() {
830
+
820
831
  //拖动后输入框有错位问题,暂时不启用
821
832
  // this.initColumnDrop()
822
833
 
@@ -826,6 +837,12 @@ export default {
826
837
  // filterMethod:this.sysRowStateFilter,
827
838
  // filters:[{label:'筛选删除行',value:'delete',checked:true}]
828
839
  // })
840
+ for (let i = 0; i < this.columns.length; i++) {
841
+ this.internalColumns.push(this.initColumns(this.columns[i]));
842
+ if(this.columns[i].visible !== false && this.columns[i].controlType !== 'operation') {
843
+ this.internalColumns[i].slots.header = this.columns[i].field;
844
+ }
845
+ }
829
846
  if (this.showSeq) {
830
847
  this.internalColumns.push(
831
848
  // {
@@ -859,9 +876,7 @@ export default {
859
876
  },
860
877
  });
861
878
  }
862
- for (let i = 0; i < this.columns.length; i++) {
863
- this.internalColumns.push(this.initColumns(this.columns[i]));
864
- }
879
+ // console.log(this.internalColumns)
865
880
  this.gridEdit = this.edit;
866
881
  },
867
882
 
@@ -1182,6 +1197,7 @@ export default {
1182
1197
  let colInfo = {
1183
1198
  field: originCol.field,
1184
1199
  title: originCol.title,
1200
+ tooltip: originCol.tooltip,
1185
1201
  visible: true,
1186
1202
  };
1187
1203
 
@@ -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
  }