bri-components 1.0.3 → 1.1.0

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.
Files changed (99) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/2.bri-components.min.js +1 -1
  4. package/lib/3.bri-components.min.js +1 -1
  5. package/lib/4.bri-components.min.js +1 -1
  6. package/lib/5.bri-components.min.js +1 -1
  7. package/lib/6.bri-components.min.js +1 -1
  8. package/lib/7.bri-components.min.js +1 -0
  9. package/lib/8.bri-components.min.js +1 -0
  10. package/lib/9.bri-components.min.js +1 -0
  11. package/lib/bri-components.min.js +16 -6
  12. package/lib/styles/bundle.css +0 -2
  13. package/package.json +121 -120
  14. package/src/components/controls/base/BriLabels.vue +117 -0
  15. package/src/components/controls/base/DshCascader.vue +23 -38
  16. package/src/components/controls/base/DshCascaderMultiple.vue +1 -1
  17. package/src/components/controls/base/DshCheckbox.vue +14 -4
  18. package/src/components/controls/base/DshCoordinates.vue +5 -9
  19. package/src/components/controls/base/DshDate.vue +10 -34
  20. package/src/components/controls/base/DshDivider.vue +1 -1
  21. package/src/components/controls/base/DshEditor.vue +52 -44
  22. package/src/components/controls/base/DshInput.vue +18 -45
  23. package/src/components/controls/base/DshLabels.vue +8 -4
  24. package/src/components/controls/base/DshNumber/DshNumber.vue +6 -20
  25. package/src/components/controls/base/DshNumberange.vue +1 -1
  26. package/src/components/controls/base/DshPackage.vue +7 -1
  27. package/src/components/controls/base/DshSelect.vue +15 -5
  28. package/src/components/controls/base/DshSwitch.vue +2 -6
  29. package/src/components/controls/base/YSerialNumber.vue +0 -1
  30. package/src/components/controls/base/ZUpload/index.vue +16 -10
  31. package/src/components/controls/base/ZUpload/upload-list.vue +17 -12
  32. package/src/components/controls/base/ZUpload/uploadMixin.js +1 -5
  33. package/src/components/controls/base/controlShow.vue +52 -0
  34. package/src/components/controls/base/textMultiple/DshTextMultiple.vue +1 -1
  35. package/src/components/controls/controlMap.js +4 -0
  36. package/src/components/controls/controlMixin.js +21 -20
  37. package/src/components/controls/senior/cascaderTable.vue +188 -0
  38. package/src/components/controls/senior/flatTable.vue +131 -0
  39. package/src/components/form/DshForm.vue +0 -5
  40. package/src/components/list/BriFlatTable.vue +430 -0
  41. package/src/components/list/BriTable.vue +184 -0
  42. package/src/components/list/DshBox/DshPanel.vue +63 -79
  43. package/src/components/list/DshBox/DshTable.vue +29 -39
  44. package/src/components/list/DshCascaderTable.vue +6 -11
  45. package/src/components/list/DshFlatTable.vue +9 -17
  46. package/src/components/other/BriTransfer.vue +71 -0
  47. package/src/components/small/BriButton.vue +65 -0
  48. package/src/components/small/BriTree.vue +42 -0
  49. package/src/components/small/Ctooltip.vue +1 -1
  50. package/src/components/small/DshButtons.vue +12 -42
  51. package/src/components/unit/DshFormItem.vue +11 -6
  52. package/src/components/unit/DshUnit.vue +1 -3
  53. package/src/components/unit/unitMixin.js +4 -1
  54. package/src/index.js +24 -4
  55. package/src/styles/bundle.css +0 -2
  56. package/src/styles/common/common.less +2 -2
  57. package/src/styles/common/control.less +53 -0
  58. package/src/styles/common/index.less +1 -0
  59. package/src/styles/components/controls/BriLabels.less +23 -0
  60. package/src/styles/components/controls/DshCascader.less +3 -3
  61. package/src/styles/components/controls/DshCheckbox.less +1 -1
  62. package/src/styles/components/controls/DshCoordinates.less +3 -3
  63. package/src/styles/components/controls/DshDate.less +54 -0
  64. package/src/styles/components/controls/DshDaterange.less +1 -1
  65. package/src/styles/components/controls/DshEditor.less +27 -9
  66. package/src/styles/components/controls/DshInput.less +5 -5
  67. package/src/styles/components/controls/DshLabels.less +1 -1
  68. package/src/styles/components/controls/DshSelect.less +46 -30
  69. package/src/styles/components/controls/ZUpload.less +82 -91
  70. package/src/styles/components/controls/cascaderTable.less +33 -0
  71. package/src/styles/components/controls/controlShow.less +12 -0
  72. package/src/styles/components/controls/flatTable.less +33 -0
  73. package/src/styles/components/form/DshAdvSearchForm.less +6 -6
  74. package/src/styles/components/index.less +10 -0
  75. package/src/styles/components/list/BriFlatTable.less +8 -0
  76. package/src/styles/components/list/BriTable.less +155 -0
  77. package/src/styles/components/list/DshFlatTable.less +3 -8
  78. package/src/styles/components/list/evTable.less +1 -1
  79. package/src/styles/components/other/BriTransfer.less +65 -0
  80. package/src/styles/components/other/DshEditPanel.less +2 -2
  81. package/src/styles/components/other/DshMenuNav.less +5 -5
  82. package/src/styles/components/other/ZGantt.less +5 -5
  83. package/src/styles/components/small/BriButton.less +259 -0
  84. package/src/styles/components/small/BriTree.less +57 -0
  85. package/src/styles/components/small/Ctooltip.less +14 -0
  86. package/src/styles/components/small/DshButtons.less +1 -1
  87. package/src/styles/components/small/DshControlDefine.less +2 -2
  88. package/src/styles/components/small/DshDropdown.less +1 -1
  89. package/src/styles/components/small/DshPage.less +1 -1
  90. package/src/styles/components/small/DshTabs.less +2 -2
  91. package/src/styles/components/unit/DshFormItem.less +5 -6
  92. package/src/styles/index.less +1 -5
  93. package/src/styles/plugin/easytable.less +22 -0
  94. package/src/styles/plugin/index.less +2 -0
  95. package/src/styles/plugin/iview.less +33 -0
  96. package/src/styles/variables.less +71 -88
  97. package/src/utils/table.js +72 -978
  98. package/src/styles/define.less +0 -374
  99. package/src/styles/view_reset.less +0 -452
@@ -1,16 +1,16 @@
1
1
  <template>
2
2
  <div class="DshPanel">
3
3
  <div
4
- class="DshPanel-group"
5
4
  v-for="(groupItem, groupIndex) in data"
6
5
  :key="groupIndex"
6
+ class="DshPanel-group"
7
7
  >
8
8
  <!-- 组 标头 -->
9
9
  <div
10
10
  class="DshPanel-group-title"
11
11
  :style="{
12
12
  backgroundColor: getBgColor(groupItem),
13
- color: colorMap[getBgColor(groupItem)] || '#fff'
13
+ color: '#ffffff'
14
14
  }"
15
15
  >
16
16
  <span class="DshPanel-group-title-name">
@@ -45,7 +45,7 @@
45
45
  class="dsh-tip"
46
46
  style="position: absolute; top: 0px; left: 0px; width: 100%;"
47
47
  >
48
- {{noDataText}}
48
+ {{ noDataText }}
49
49
  </div>
50
50
 
51
51
  <!-- 拖拽 -->
@@ -64,15 +64,15 @@
64
64
  @scroll.native="groupScroll(groupItem, groupIndex, $event)"
65
65
  >
66
66
  <div
67
- class="list-item"
68
67
  v-for="(dataItem, dataIndex) in groupItem.list"
69
68
  :key="dataItem._id"
70
69
  :id="dataItem._id"
70
+ class="item"
71
71
  @click="clickRow(dataItem, dataIndex)"
72
72
  >
73
73
  <!-- 下拉操作 -->
74
74
  <dsh-dropdown
75
- class="list-item-dropdown"
75
+ class="item-dropdown"
76
76
  :dropdownObj="dropdownObj"
77
77
  :list="operationList"
78
78
  @click="$dshEmit($event, dataItem, dataIndex)"
@@ -80,11 +80,11 @@
80
80
  ></dsh-dropdown>
81
81
 
82
82
  <!-- 标题 -->
83
- <div class="list-item-title dsh-ellipsis">{{ dataItem[titleField] }}</div>
83
+ <div class="item-title dsh-ellipsis">{{ dataItem[titleField] }}</div>
84
84
 
85
85
  <!-- 显示字段 -->
86
86
  <div
87
- class="list-item-cols unit"
87
+ class="item-cols unit"
88
88
  v-for="colItem in selfColumns"
89
89
  :key="colItem._key"
90
90
  >
@@ -124,33 +124,21 @@
124
124
  </div>
125
125
  </transition-group>
126
126
  </dsh-draggable>
127
+
127
128
  <!-- 组 操作按钮(添加) -->
128
129
  <dsh-buttons
129
- class="DshPanel-group-list-btns"
130
+ class="list-btns"
130
131
  :list="groupBtnOperationList"
131
132
  @click="$dshEmit($event, { [groupField]: groupItem._key })"
132
133
  ></dsh-buttons>
133
134
  </div>
134
-
135
135
  </div>
136
136
  </div>
137
137
  </template>
138
138
 
139
139
  <script>
140
- // 浅色转化为对应深色
141
- const colorMap = {
142
- "#CDE6FF": "#6DAEF2",
143
- "#C1FCFF": "#40CBD2",
144
- "#C5FFD9": "#50C979",
145
- "#FFEDC8": "#FFC53B",
146
- "#FFDCAC": "#FF9300",
147
- "#FFD3B6": "#FA6400",
148
- "#EEB0FF": "#B620E0",
149
- "#D1B3FF": "#7E41DF",
150
- "#B1C7FF": "#25428D",
151
- "#DCDCDC": "#5D5D5D"
140
+ import { resourceData } from "bri-datas";
152
141
 
153
- };
154
142
  export default {
155
143
  name: "DshPanel",
156
144
  props: {
@@ -204,10 +192,9 @@
204
192
 
205
193
  getBgColor (groupItem) {
206
194
  return this.groupFieldObj._useColor
207
- ? (this.groupFieldObj._data.find(item => item._key === groupItem._key) || { color: "#ccc" }).color
208
- : "#ccc";
209
- },
210
- colorMap
195
+ ? resourceData.colorMap[(this.groupFieldObj._data.find(item => item._key === groupItem._key) || { color: "color-default" }).color]
196
+ : resourceData.colorMap["color-default"];
197
+ }
211
198
  };
212
199
  },
213
200
  computed: {
@@ -293,7 +280,7 @@
293
280
  };
294
281
  </script>
295
282
 
296
- <style lang="less" scoped>
283
+ <style lang="less">
297
284
  .DshPanel {
298
285
  min-width: 100%;
299
286
  height: 100%;
@@ -317,6 +304,7 @@
317
304
  display: flex;
318
305
  border-radius: 10px 10px 0px 0px;
319
306
  font-size: 14px;
307
+
320
308
  &-name {
321
309
  max-width: 120px;
322
310
  }
@@ -330,78 +318,74 @@
330
318
  flex: 1;
331
319
  min-height: 0px;
332
320
  border: 1px dashed #cccccc;
333
- padding: 10px 10px 40px;
334
321
  border-top: none;
335
- position: relative;
322
+ display: flex;
323
+ flex-direction: column;
336
324
 
337
325
  .list-drag {
338
326
  width: 100%;
339
- height: 100%;
327
+ flex: 1;
328
+ min-height: 0px;
329
+
340
330
  &-transition {
341
331
  display: block;
342
332
  width: 100%;
343
333
  height: 100%;
334
+ padding: 10px;
344
335
  overflow: auto;
345
- }
346
- }
347
- .list-item {
348
- margin-bottom: 10px;
349
- height: 60px;
350
- background: #FFFFFF;
351
- border: 1px solid rgba(102, 110, 126, 0.1);
352
- border-radius: 4px;
353
- cursor: pointer;
354
- position: relative;
355
- padding: 10px 17px;
356
336
 
357
- &-dropdown {
358
- position: absolute;
359
- top: 5px;
360
- right: 5px;
361
- }
337
+ .item {
338
+ height: 60px;
339
+ padding: 10px 17px;
340
+ margin-bottom: 10px;
341
+ border: 1px solid rgba(102, 110, 126, 0.1);
342
+ border-radius: 4px;
343
+ background: #FFFFFF;
344
+ cursor: pointer;
345
+ position: relative;
362
346
 
363
- &-title {
364
- width: calc(100% - 22px);
365
- font-size: 14px;
366
- font-family: Source Han Sans CN;
367
- font-weight: 500;
368
- color: #515A6E;
369
- margin-bottom: 2px;
370
- }
347
+ &-dropdown {
348
+ position: absolute;
349
+ top: 5px;
350
+ right: 5px;
351
+ }
371
352
 
372
- &-cols {
373
- }
374
- .unit {
375
- display: flex;
376
- flex-direction: row;
377
- color: #515A6E;
378
- &-label {
379
- max-width: 60px;
380
- }
381
- &-colon {
353
+ &-title {
354
+ width: calc(100% - 22px);
355
+ margin-bottom: 2px;
356
+ font-family: Source Han Sans CN;
357
+ font-size: 14px;
358
+ font-weight: 500;
359
+ color: #515A6E;
360
+ }
382
361
 
383
- }
384
- &-value {
385
- flex: 1;
362
+ &-cols {}
363
+
364
+ .unit {
365
+ display: flex;
366
+ flex-direction: row;
367
+ color: #515A6E;
368
+ &-label {
369
+ max-width: 60px;
370
+ }
371
+ &-colon {
372
+
373
+ }
374
+ &-value {
375
+ flex: 1;
376
+ }
377
+ }
386
378
  }
387
379
  }
388
380
  }
389
- &-btns {
381
+
382
+ .list-btns {
390
383
  width: 100%;
384
+ height: 40px;
385
+ padding: 0px 10px;
391
386
  text-align: center;
392
- height: 33px;
393
387
  }
394
388
  }
395
-
396
- }
397
- }
398
- </style>
399
- <style lang="less">
400
- .DshPanel {
401
- &-group-list-btns {
402
- .ivu-btn {
403
- background: transparent;
404
- }
405
389
  }
406
390
  }
407
391
  </style>
@@ -3,26 +3,18 @@
3
3
  class="DshTable"
4
4
  style="width: 100%; height: 100%;"
5
5
  >
6
- <ev-table
6
+ <bri-table
7
7
  :className="propsObj.className"
8
8
  :data="data"
9
- :columnsList="selfColumns"
10
- :fixTitle="fixTitle"
11
- :showSort="propsObj.showSort"
12
- :tableBgColor="propsObj.tableBgColor"
13
- :title-bg-color="propsObj.titleBgColor"
14
- :title-font-color="propsObj.titleFontColor"
15
- :odd-bg-color="propsObj.oddBgColor"
16
- :even-bg-color="propsObj.evenBgColor"
17
- :row-hover-color="propsObj.rowHoverColor"
18
- :row-click-color="propsObj.rowClickColor"
19
- :noDataText="propsObj.noDataText"
20
- :is-loading="propsObj.isLoading"
21
- :selectChange="changeSelect"
22
- :selectAll="changeSelect"
9
+ :columns="selfColumns"
10
+ :propsObj="propsObj"
11
+ :isLoading="isLoading"
12
+ :noDataText="noDataText"
13
+ @selectChange="changeSelect"
14
+ @selectAll="changeSelect"
23
15
  @click-row="clickRow"
24
16
  @sort-change="changeSort"
25
- ></ev-table>
17
+ ></bri-table>
26
18
  </div>
27
19
  </template>
28
20
 
@@ -59,7 +51,9 @@
59
51
  default () {
60
52
  return {};
61
53
  }
62
- }
54
+ },
55
+ isLoading: Boolean,
56
+ noDataText: String
63
57
  },
64
58
  data () {
65
59
  return {};
@@ -99,26 +93,24 @@
99
93
  ...(
100
94
  this.multiple
101
95
  ? [{
102
- title: "多选",
103
- _name: "多选",
104
- type: "selection",
105
- width: 45,
106
- titleAlign: "left",
107
- columnAlign: "left",
108
- isFrozen: true
96
+ field: "selection",
97
+ key: "selection",
98
+ type: "checkbox",
99
+ width: 66,
100
+ align: "center",
101
+ fixed: "left"
109
102
  }]
110
103
  : []
111
104
  ),
112
105
  {
113
- field: "custome",
114
106
  title: "序号",
115
- _name: "序号",
116
- width: 67,
117
- titleAlign: "center",
118
- columnAlign: "center",
119
- isFrozen: true,
120
- formatter: function (rowData, rowIndex, pagingIndex, field) {
121
- return rowIndex + 1;
107
+ field: "custome",
108
+ key: "customes",
109
+ width: 78,
110
+ align: "center",
111
+ fixed: "left",
112
+ renderBodyCell: ({ row, column, rowIndex }, h) => {
113
+ return ++rowIndex;
122
114
  }
123
115
  },
124
116
 
@@ -129,8 +121,10 @@
129
121
  ? [
130
122
  {
131
123
  title: "操作",
132
- _name: "操作",
133
- type: "expend",
124
+ field: "operation",
125
+ key: "operation",
126
+ align: "center",
127
+ fixed: "right",
134
128
  width: Math.max(
135
129
  // 漏在外部按钮的宽度
136
130
  this.selfOperationList
@@ -141,11 +135,7 @@
141
135
  4 // 留出4px空间,避免麻烦问题
142
136
  , 80
143
137
  ),
144
- titleAlign: "center",
145
- columnAlign: "center",
146
- componentName: "dsh-td-render",
147
- isFrozenRight: true,
148
- render: (h, params) => {
138
+ renderBodyCell: (params, h) => {
149
139
  const totalOperationList = this.selfOperationList.map(operationItem => {
150
140
  return {
151
141
  ...operationItem,
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- :class="`DshCascaderTable control-${mode}`"
3
+ class="DshCascaderTable"
4
4
  ref="DshCascaderTable"
5
5
  >
6
6
  <div :class="{
@@ -149,7 +149,6 @@
149
149
  :style="getTdStyle(col, row)"
150
150
  >
151
151
  <dsh-unit
152
- :mode="mode"
153
152
  :canEdit="canEdit && (col.canEdit === undefined ? true : col.canEdit)"
154
153
  :formData="row[col.nodeKey]"
155
154
  :formItem="col"
@@ -186,10 +185,6 @@
186
185
  DshUnit
187
186
  },
188
187
  props: {
189
- mode: {
190
- type: String,
191
- default: "default"
192
- },
193
188
  useCol: {
194
189
  type: Boolean,
195
190
  default: false
@@ -232,7 +227,7 @@
232
227
  },
233
228
  data () {
234
229
  return {
235
- widthMap: this.$getModFieldPropertyMap("unitWidth"),
230
+ widthMap: this.$getModFieldPropertyMap("width"),
236
231
  boxWidth: 0,
237
232
  getColOperationNames (col) {
238
233
  return [
@@ -342,7 +337,7 @@
342
337
  },
343
338
 
344
339
  treeData () {
345
- return this.transformTreeData();
340
+ return this.transforBriTreeData();
346
341
  },
347
342
  columns () {
348
343
  return this.transformColumns(this.treeColumns);
@@ -520,7 +515,7 @@
520
515
  deleteSelfAndChildNodes (operationItem, row, rowIndex, col) {
521
516
  let nodeData = this.getNodeData(row, rowIndex, col);
522
517
  nodeData.brotherList.splice(nodeData.index, 1);
523
- // 此处应该判断子节点是否是最后一个,是的话就要添加一个一直到叶子节点,不过现在只需要添加一个子节点,transformTreeData会捎带着处理了
518
+ // 此处应该判断子节点是否是最后一个,是的话就要添加一个一直到叶子节点,不过现在只需要添加一个子节点,transforBriTreeData会捎带着处理了
524
519
  if (!nodeData.brotherList.length) {
525
520
  let newNode = this.getNewNode(nodeData.level, nodeData.brotherList);
526
521
  nodeData.brotherList.push(newNode);
@@ -532,7 +527,7 @@
532
527
  deleteChildNodes (operationItem, row, rowIndex, col) {
533
528
  let nodeData = this.getNodeData(row, rowIndex, col);
534
529
  nodeData.childList.splice(0);
535
- // 删除完应该添加一个子节点一直到叶子节点,不过现在只需要添加一个子节点,transformTreeData会捎带着处理了
530
+ // 删除完应该添加一个子节点一直到叶子节点,不过现在只需要添加一个子节点,transforBriTreeData会捎带着处理了
536
531
  let newNode = this.getNewNode(nodeData.level + 1, nodeData.childList);
537
532
  nodeData.childList.push(newNode);
538
533
 
@@ -589,7 +584,7 @@
589
584
  );
590
585
  },
591
586
  // 转化树数据
592
- transformTreeData (treeForm = this.treeColumns, subForm = this.subColumns) {
587
+ transforBriTreeData (treeForm = this.treeColumns, subForm = this.subColumns) {
593
588
  treeForm.forEach((treeFormItem, treeFormIndex) => {
594
589
  treeFormItem.canDelete = true; // 每次计算,重置一下
595
590
  treeFormItem.level = treeFormIndex + 1; // treeColumns更新,缺少level
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="`DshFlatTable control-${mode}`">
2
+ <div :class="`DshFlatTable control-default`">
3
3
  <!-- 表格内容 -->
4
4
  <div class="DshFlatTable-block">
5
5
  <table
@@ -74,8 +74,6 @@
74
74
  class="td-inner"
75
75
  :style="{
76
76
  padding: '5px 8px 16px'
77
- // margin: isShowCompare(col, row, oldListData[rowIndex]) ? '-1px' : undefined,
78
- // border: isShowCompare(col, row, oldListData[rowIndex]) ? '1px solid #ed4014' : undefined
79
77
  }"
80
78
  >
81
79
  <!--对比值 -->
@@ -89,12 +87,10 @@
89
87
  >
90
88
  <dsh-unit
91
89
  class="td-inner-compare-unit"
92
- :mode="mode"
93
90
  :canEdit="getUnitCanEdit(col, row)"
94
91
  :parentData="listData"
95
92
  :formData="row"
96
93
  :formItem="col"
97
- :isShare="isShare"
98
94
  :rowIndex="rowIndex"
99
95
  @blur="controlBlur(null, col, row, arguments)"
100
96
  @change="$dispatchEvent(operationMap.changeVal, col, row, rowIndex, arguments)"
@@ -103,12 +99,10 @@
103
99
 
104
100
  <dsh-unit
105
101
  v-else
106
- :mode="mode"
107
102
  :canEdit="getUnitCanEdit(col, row)"
108
103
  :parentData="listData"
109
104
  :formData="row"
110
105
  :formItem="col"
111
- :isShare="isShare"
112
106
  :rowIndex="rowIndex"
113
107
  @blur="controlBlur(null, col, row, arguments)"
114
108
  @change="$dispatchEvent(operationMap.changeVal, col, row, rowIndex, arguments)"
@@ -184,11 +178,6 @@
184
178
  DshUnit
185
179
  },
186
180
  props: {
187
- mode: {
188
- type: String,
189
- default: "default"
190
- },
191
-
192
181
  canEdit: {
193
182
  type: Boolean,
194
183
  default: true
@@ -229,8 +218,7 @@
229
218
  default () {
230
219
  return {};
231
220
  }
232
- },
233
- isShare: Boolean
221
+ }
234
222
  },
235
223
  data () {
236
224
  return {
@@ -257,6 +245,7 @@
257
245
 
258
246
  selfPropsObj () {
259
247
  return {
248
+ isShare: false, // 是否是分享页在用
260
249
  _contentHeight: 500,
261
250
  _useSelection: false, // 使用选择列
262
251
  _useIndex: true, // 使用序号列
@@ -268,6 +257,9 @@
268
257
  ...this.propsObj
269
258
  };
270
259
  },
260
+ isShare () {
261
+ return this.selfPropsObj.isShare;
262
+ },
271
263
  contentHeight () {
272
264
  return this.selfPropsObj._contentHeight;
273
265
  },
@@ -289,10 +281,10 @@
289
281
  disabledOldDataRow () {
290
282
  return this.selfPropsObj._disabledOldDataRow;
291
283
  },
292
- useCampare () {
284
+
285
+ useCompare () {
293
286
  return !!this.oldListData.length;
294
287
  },
295
-
296
288
  showColumns () {
297
289
  const operationList = this.$getOperationList(["delete"]);
298
290
  const showColumns = [
@@ -507,7 +499,7 @@
507
499
  (!col.dependRowCanEdit || row.canEdit !== false); // 在老数据行里某些列不可编辑
508
500
  },
509
501
  isShowCompare (col, row, oldRow = {}) {
510
- return this.useCampare && ["number"].includes(col._type) &&
502
+ return this.useCompare && ["number"].includes(col._type) &&
511
503
  !(this.$isEmptyData(row[col._key]) && this.$isEmptyData(oldRow[col._key])) &&
512
504
  row[col._key] !== oldRow[col._key];
513
505
  },
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <div class="BriTransfer">
3
+ <Transfer
4
+ :data="selfData"
5
+ :target-keys="targetKeys"
6
+ :filterable="filterable"
7
+ :filter-method="filterMethod"
8
+ :titles="titles"
9
+ not-found-text="暂无数据"
10
+ @on-change="handleChange"
11
+ ></Transfer>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: "BriTransfer",
18
+ props: {
19
+ data: {
20
+ type: Array,
21
+ default: () => {
22
+ return [];
23
+ }
24
+ },
25
+ value: {
26
+ type: Array,
27
+ default: () => {
28
+ return [];
29
+ }
30
+ },
31
+ filterMethod: {
32
+ type: Function,
33
+ default: () => {
34
+ return {};
35
+ }
36
+ },
37
+ titles: {
38
+ type: Array,
39
+ default: () => {
40
+ return ["源列表", "目的列表"];
41
+ }
42
+ },
43
+ filterable: Boolean
44
+ },
45
+ data () {
46
+ return {
47
+ targetKeys: []
48
+ };
49
+ },
50
+ computed: {
51
+ selfData () {
52
+ return this.data.map(item => {
53
+ return {
54
+ key: item._key,
55
+ label: item._name || item.name || item.realname
56
+ };
57
+ });
58
+ }
59
+ },
60
+ created () {
61
+ this.targetKeys = this.value;
62
+ },
63
+ methods: {
64
+ handleChange (newTargetKeys) {
65
+ this.targetKeys = newTargetKeys;
66
+ this.$emit("input", this.targetKeys);
67
+ this.$emit("change", this.targetKeys);
68
+ }
69
+ }
70
+ };
71
+ </script>
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <Button
3
+ class="BriButton"
4
+ :class="selfPropsObj.class"
5
+ :type="selfPropsObj.btnType"
6
+ :shape="selfPropsObj.shape || shape"
7
+ :size="selfPropsObj.size || size"
8
+ :loading="selfPropsObj.loading"
9
+ :disabled="selfPropsObj.disabled"
10
+ :htmlType="selfPropsObj.htmlType"
11
+ :icon="selfPropsObj.icon || icon"
12
+ :customIcon="selfPropsObj.customIcon || customIcon"
13
+ :long="selfPropsObj.long"
14
+ :ghost="selfPropsObj.ghost"
15
+ @click="dispatchEvent"
16
+ >
17
+ <slot></slot>
18
+ </Button>
19
+ </template>
20
+
21
+ <script>
22
+ import controlMixin from "../controls/controlMixin.js";
23
+ export default {
24
+ name: "BriButton",
25
+ mixins: [controlMixin],
26
+ props: {
27
+ type: {
28
+ type: String,
29
+ default: "primary"
30
+ },
31
+ icon: String,
32
+ shape: String,
33
+ size: String,
34
+ customIcon: String
35
+ },
36
+ data () {
37
+ return {};
38
+ },
39
+ computed: {
40
+ selfPropsObj () {
41
+ let defaultType = this.propsObj.btnType || this.type;
42
+ let setType = this.propsObj.btnType || this.type;
43
+ if (["cancel"].includes(defaultType)) {
44
+ setType = "primary";
45
+ } else if (["errorLine"].includes(defaultType)) {
46
+ setType = "default";
47
+ } else if (["linkText", "primaryText", "errorText"].includes(defaultType)) {
48
+ setType = "text";
49
+ }
50
+ return {
51
+ class: ["cancel", "linkText", "primaryText", "errorLine", "errorText"].includes(defaultType) ? `ivu-btn-${defaultType}` : "",
52
+ ...this.propsObj,
53
+ btnType: setType,
54
+ customIcon: this.propsObj.customIcon ? `bico-font ${this.propsObj.customIcon}` : undefined
55
+ };
56
+ }
57
+ },
58
+ created () {},
59
+ methods: {
60
+ dispatchEvent () {
61
+ this.$emit("click", this.selfPropsObj);
62
+ }
63
+ }
64
+ };
65
+ </script>