bri-components 1.2.50 → 1.2.52

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 (80) hide show
  1. package/package.json +1 -1
  2. package/src/components/controls/BriControlInput.vue +9 -6
  3. package/src/components/controls/base/BriUpload/BriUpload.vue +170 -0
  4. package/src/components/controls/base/BriUpload/BriUploadImage.vue +90 -0
  5. package/src/components/controls/base/BriUpload/uploadList.vue +166 -0
  6. package/src/components/controls/base/DshCascader/DshCascader.vue +51 -0
  7. package/src/components/controls/base/DshCascader/InfoCascader.vue +63 -1
  8. package/src/components/controls/base/DshCoordinates.vue +64 -4
  9. package/src/components/controls/base/DshDate/DshDate.vue +1 -1
  10. package/src/components/controls/base/DshDate/DshDaterange.vue +55 -99
  11. package/src/components/controls/base/DshDivider.vue +163 -36
  12. package/src/components/controls/base/DshEditor.vue +1 -1
  13. package/src/components/controls/base/DshInput/BriInputs.vue +59 -1
  14. package/src/components/controls/base/DshInput/DshInput.vue +17 -3
  15. package/src/components/controls/base/DshNumber/DshNumber.vue +1 -42
  16. package/src/components/controls/base/DshNumber/DshNumberange.vue +9 -9
  17. package/src/components/controls/base/DshSelect/selectMixin.js +1 -3
  18. package/src/components/controls/base/DshSwitch/DshSwitch.vue +0 -5
  19. package/src/components/controls/base/DshSwitch/switchMixin.js +4 -4
  20. package/src/components/controls/controlMap.js +13 -4
  21. package/src/components/controls/controlMixin.js +6 -2
  22. package/src/components/controls/extra/themeColor.vue +115 -0
  23. package/src/components/controls/extra/themeIcon.vue +124 -0
  24. package/src/components/controls/senior/BriLabels.vue +63 -4
  25. package/src/components/controls/senior/DshPackage.vue +30 -32
  26. package/src/components/controls/senior/cascaderTable.vue +25 -4
  27. package/src/components/controls/senior/flatTable.vue +34 -12
  28. package/src/components/controls/senior/selectDepartments.vue +78 -4
  29. package/src/components/controls/senior/selectUsers/DepartmentMenu.vue +120 -29
  30. package/src/components/controls/senior/selectUsers/selectUsers.vue +179 -5
  31. package/src/components/controls/special/DshBack.vue +1 -1
  32. package/src/components/controls/special/DshUndeveloped.vue +1 -1
  33. package/src/components/form/DshDefaultSearch.vue +43 -81
  34. package/src/components/form/DshForm.vue +1 -1
  35. package/src/components/unit/DshFormUnit.vue +11 -10
  36. package/src/index.js +6 -4
  37. package/src/styles/components/index.less +0 -14
  38. package/src/styles/index.less +5 -3
  39. package/src/styles/reset-iview-controls.less +123 -0
  40. package/src/styles/{reset-iview.less → reset-iview-variables.less} +1 -47
  41. package/src/abolish/BriTransfer.less +0 -65
  42. package/src/abolish/BriTransfer.vue +0 -71
  43. package/src/abolish/BriTree.less +0 -57
  44. package/src/abolish/DshCascaders.less +0 -11
  45. package/src/abolish/DshCascaders.vue +0 -151
  46. package/src/abolish/DshCrumbs.less +0 -0
  47. package/src/abolish/DshCrumbs.vue +0 -62
  48. package/src/abolish/DshCrumbsItem.vue +0 -109
  49. package/src/abolish/DshEditPanel.less +0 -70
  50. package/src/abolish/DshEditPanel.vue +0 -152
  51. package/src/abolish/DshFileShow.less +0 -61
  52. package/src/abolish/DshFileShow.vue +0 -0
  53. package/src/abolish/DshFlatTable.less +0 -93
  54. package/src/abolish/DshFlatTable.vue +0 -605
  55. package/src/abolish/DshMenu.less +0 -37
  56. package/src/abolish/DshMenu.vue +0 -133
  57. package/src/abolish/DshTexts.less +0 -13
  58. package/src/abolish/DshTexts.vue +0 -89
  59. package/src/styles/components/controls/.DS_Store +0 -0
  60. package/src/styles/components/controls/base/BriInputs.less +0 -55
  61. package/src/styles/components/controls/base/BriUpload/BriUpload.less +0 -167
  62. package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +0 -87
  63. package/src/styles/components/controls/base/BriUpload/index.less +0 -3
  64. package/src/styles/components/controls/base/BriUpload/uploadList.less +0 -164
  65. package/src/styles/components/controls/base/DshCascader/DshCascader.less +0 -67
  66. package/src/styles/components/controls/base/DshCascader/InfoCascader.less +0 -59
  67. package/src/styles/components/controls/base/DshCascader/index.less +0 -2
  68. package/src/styles/components/controls/base/DshCoordinates.less +0 -67
  69. package/src/styles/components/controls/base/DshDivider.less +0 -115
  70. package/src/styles/components/controls/base/DshInput.less +0 -29
  71. package/src/styles/components/controls/senior/.DS_Store +0 -0
  72. package/src/styles/components/controls/senior/BriLabels.less +0 -66
  73. package/src/styles/components/controls/senior/DshPackage.less +0 -25
  74. package/src/styles/components/controls/senior/cascaderTable.less +0 -19
  75. package/src/styles/components/controls/senior/flatTable.less +0 -20
  76. package/src/styles/components/controls/senior/selectDepartments.less +0 -73
  77. package/src/styles/components/controls/senior/selectUsers/DepartmentMenu.less +0 -37
  78. package/src/styles/components/controls/senior/selectUsers/index.less +0 -2
  79. package/src/styles/components/controls/senior/selectUsers/selectUsers.less +0 -180
  80. /package/src/{abolish/DshCrumbItem.less → styles/reset-iview-other.less} +0 -0
@@ -25,13 +25,11 @@ export default {
25
25
  ...this.commonDealPropsObj,
26
26
 
27
27
  _openText: this.propsObj._openText || "是", // 此行放在 ...this.propsObj的下面目的是,处理_openText为空字符串的情况
28
- _closeText: this.propsObj._closeText || "否",
29
- _disabled: this.propsObj._disabled || !this.finalCanEdit
28
+ _closeText: this.propsObj._closeText || "否"
30
29
  };
31
30
  },
32
31
  mulPropsObj () {
33
32
  return {
34
- ...this.propsObj,
35
33
  _optionKind: "flat",
36
34
  _data: [
37
35
  {
@@ -44,7 +42,9 @@ export default {
44
42
  name: this.selfPropsObj._closeText,
45
43
  color: this.selfPropsObj._closeColor
46
44
  }
47
- ]
45
+ ],
46
+
47
+ ...this.propsObj
48
48
  };
49
49
  },
50
50
  showStyle () {
@@ -44,6 +44,9 @@ const componentNameMap = {
44
44
  back: "DshBack",
45
45
  undefined: "DshUndeveloped",
46
46
 
47
+ themeColor: "themeColor",
48
+ themeIcon: "themeIcon",
49
+
47
50
  ...controlConfig.componentNameMap
48
51
  };
49
52
 
@@ -60,17 +63,23 @@ const pathMap = {
60
63
  BriUpload: "./base/BriUpload/BriUpload.vue",
61
64
  DshCoordinates: "./base/DshCoordinates.vue",
62
65
  DshEditor: "./base/DshEditor.vue",
63
- DshDivider: "./base/DshDivider.vue",
64
-
66
+ DshDivider: "./base/DshDivider.vue"
67
+ },
68
+ senior: {
65
69
  selectUsers: "./senior/selectUsers/selectUsers.vue",
66
70
  selectDepartments: "./senior/selectDepartments.vue",
67
71
  BriLabels: "./senior/BriLabels.vue",
68
72
  DshPackage: "./senior/DshPackage.vue",
69
73
  flatTable: "./senior/flatTable.vue",
70
- cascaderTable: "./senior/cascaderTable",
71
-
74
+ cascaderTable: "./senior/cascaderTable"
75
+ },
76
+ special: {
72
77
  DshBack: "./special/DshBack.vue",
73
78
  DshUndeveloped: "./special/DshUndeveloped.vue"
79
+ },
80
+ extra: {
81
+ themeColor: "./extra/themeColor.vue",
82
+ themeIcon: "./extra/themeIcon.vue"
74
83
  }
75
84
  };
76
85
 
@@ -90,7 +90,7 @@ export default {
90
90
  },
91
91
  // 是否为多选模式
92
92
  multipleMode () {
93
- return ["numberange", "daterange", "checkbox", "regions", "cascaders"].includes(this.controlType) || !!this.propsObj._multiple;
93
+ return ["texts", "numberange", "daterange", "checkbox", "regions", "cascaders"].includes(this.controlType) || !!this.propsObj._multiple;
94
94
  },
95
95
  commonDealPropsObj () {
96
96
  const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
@@ -99,7 +99,8 @@ export default {
99
99
  _placeholder: this.canEdit && this.propsObj._enterType !== "calculate"
100
100
  ? (this.propsObj._placeholder || `请${selectControlTypes.includes(this.controlType) ? "选择" : "输入"}${this.propsObj._name}`)
101
101
  : undefined,
102
- _clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable)
102
+ _clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable),
103
+ _disabled: this.propsObj._disabled || ["serialNumber"].includes(this.controlType) || !this.finalCanEdit
103
104
  };
104
105
  },
105
106
  commonClass () {
@@ -133,6 +134,9 @@ export default {
133
134
  isOnSearch () {
134
135
  return !!this.propsObj.onSearch;
135
136
  },
137
+ isOnDftSearch () {
138
+ return !!this.propsObj.onDftSearch;
139
+ },
136
140
  isUnitUpdate () {
137
141
  return this.isInTable && !!this.canEdit;
138
142
  },
@@ -0,0 +1,115 @@
1
+ <template>
2
+ <div class="themeColor">
3
+ <div class="themeColor-colors">
4
+ <div
5
+ v-for="(colorItem, colorKey) in themeColorMap"
6
+ :key="colorKey"
7
+ class="item"
8
+ @click="curVal = colorKey"
9
+ >
10
+ <div
11
+ class="item-content"
12
+ :style="{
13
+ backgroundColor: colorItem.color
14
+ }"
15
+ ></div>
16
+ <Icon
17
+ v-if="colorKey === curVal"
18
+ class="item-icon"
19
+ type="ios-checkmark-circle"
20
+ size="16"
21
+ />
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import controlMixin from "../controlMixin.js";
29
+
30
+ export default {
31
+ name: "themeColor",
32
+ mixins: [
33
+ controlMixin
34
+ ],
35
+ components: {},
36
+ props: {},
37
+ data () {
38
+ return {};
39
+ },
40
+ computed: {
41
+ selfPropsObj () {
42
+ return {
43
+ _relateColorkey: "colorType",
44
+
45
+ ...this.propsObj,
46
+ ...this.commonDealPropsObj
47
+ };
48
+ },
49
+ themeColorMap () {
50
+ return this.$appData.themeColors || {};
51
+ },
52
+
53
+ // 值为不是[]类型用的
54
+ curVal: {
55
+ get () {
56
+ return this.value[this.controlKey];
57
+ },
58
+ set (val) {
59
+ this.value[this.controlKey] = val;
60
+ this.change();
61
+ }
62
+ }
63
+ },
64
+ created () {
65
+ this.init();
66
+ },
67
+ methods: {
68
+ init () {
69
+ if (!this.curVal) {
70
+ this.curVal = Object.keys(this.themeColorMap)[0];
71
+ }
72
+ }
73
+ }
74
+ };
75
+ </script>
76
+
77
+ <style lang="less" scoped>
78
+ .themeColor {
79
+ width: 100%;
80
+
81
+ &-colors {
82
+ display: flex;
83
+
84
+ .item {
85
+ display: inlile-block;
86
+ width: 54px;
87
+ height: 54px;
88
+ margin-right: 7px;
89
+ cursor: pointer;
90
+ position: relative;
91
+
92
+ &-content {
93
+ width: 38px;
94
+ height: 38px;
95
+ margin: 8px auto;
96
+ border-radius: 50%;
97
+ }
98
+
99
+ &-icon {
100
+ position: absolute;
101
+ bottom: 7px;
102
+ right: 7px;
103
+
104
+ border-radius: 50%;
105
+ background-color: rgba(255, 255, 255, 0.85);
106
+ color: @themeColor;
107
+ }
108
+
109
+ &:last-of-type {
110
+ margin-right: 0px;
111
+ }
112
+ }
113
+ }
114
+ }
115
+ </style>
@@ -0,0 +1,124 @@
1
+ <template>
2
+ <div class="themeIcon">
3
+ <div class="themeIcon-icons">
4
+ <div
5
+ v-for="(iconItem, iconKey) in iconMap"
6
+ :key="iconKey"
7
+ :class="{
8
+ 'item': true,
9
+ 'item-active': iconKey === curVal
10
+ }"
11
+ :style="{
12
+ 'borderColor': iconKey === curVal ? bgColor : undefined
13
+ }"
14
+ @click="curVal = iconKey"
15
+ >
16
+ <div
17
+ class="item-content"
18
+ :style="{
19
+ 'backgroundColor': bgColor
20
+ }"
21
+ >
22
+ <Icon :custom="'bico-font ' + iconItem" />
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ import controlMixin from "../controlMixin.js";
31
+
32
+ export default {
33
+ name: "themeIcon",
34
+ mixins: [
35
+ controlMixin
36
+ ],
37
+ components: {},
38
+ props: {},
39
+ data () {
40
+ return {};
41
+ },
42
+ computed: {
43
+ selfPropsObj () {
44
+ return {
45
+ _relateColorkey: "colorType",
46
+
47
+ ...this.propsObj,
48
+ ...this.commonDealPropsObj
49
+ };
50
+ },
51
+ iconMap () {
52
+ return this.$appData.themeIcons || {};
53
+ },
54
+ relateColorkey () {
55
+ return this.selfPropsObj._relateColorkey;
56
+ },
57
+ themeColorMap () {
58
+ return this.$appData.themeColors || {};
59
+ },
60
+ bgColor () {
61
+ return (this.themeColorMap[this.value[this.relateColorkey]] || {}).bgColor;
62
+ },
63
+
64
+ // 值为不是[]类型用的
65
+ curVal: {
66
+ get () {
67
+ return this.value[this.controlKey];
68
+ },
69
+ set (val) {
70
+ this.value[this.controlKey] = val;
71
+ this.change();
72
+ }
73
+ }
74
+ },
75
+ created () {
76
+ this.init();
77
+ },
78
+ methods: {
79
+ init () {
80
+ if (!this.curVal) {
81
+ this.curVal = Object.keys(this.iconMap)[0];
82
+ }
83
+ }
84
+ }
85
+ };
86
+ </script>
87
+
88
+ <style lang="less" scoped>
89
+ .themeIcon {
90
+ width: 100%;
91
+
92
+ &-icons {
93
+ display: flex;
94
+
95
+ .item {
96
+ min-width: 54px;
97
+ height: 54px;
98
+ margin-right: 7px;
99
+ border: 1px solid transparent;
100
+ border-radius: 8px;
101
+ cursor: pointer;
102
+
103
+ &-content {
104
+ width: 38px;
105
+ height: 38px;
106
+ margin: 8px auto;
107
+ border-radius: 38px;
108
+ line-height: 38px;
109
+ text-align: center;
110
+
111
+ i {
112
+ font-size: 20px;
113
+ color: #ffffff;
114
+ }
115
+ }
116
+
117
+ &:hover,
118
+ &-active {
119
+ border-color: @themeColor;
120
+ }
121
+ }
122
+ }
123
+ }
124
+ </style>
@@ -14,8 +14,7 @@
14
14
  <!-- 可编辑 -->
15
15
  <bri-control-input
16
16
  :class="{
17
- ...commonClass,
18
- 'BriLabels-edit': true
17
+ ...commonClass
19
18
  }"
20
19
  :canEdit="finalCanEdit"
21
20
  :value="curValList"
@@ -103,8 +102,7 @@
103
102
  :transfer="true"
104
103
  >
105
104
  <div :class="{
106
- ...commonClass,
107
- 'BriLabels-show': true
105
+ ...commonClass
108
106
  }">
109
107
  <dsh-tags
110
108
  v-if="!$isEmptyData(curValList)"
@@ -255,3 +253,64 @@
255
253
  }
256
254
  };
257
255
  </script>
256
+
257
+ <style lang="less">
258
+ .BriLabels {
259
+ width: 100%;
260
+
261
+ &-dropdown {
262
+ width: 100%;
263
+
264
+ &-menu {
265
+ .item {
266
+ margin: 4px 8px;
267
+ border-radius: @borderRadius;
268
+
269
+ &-active {
270
+ background-color: @theme-focus;
271
+ color: @themeColor;
272
+ }
273
+
274
+ &-edit {
275
+
276
+ }
277
+
278
+ &-show {
279
+
280
+ }
281
+ }
282
+
283
+ .btns {
284
+ border-top: 1px solid #E7E7E7;
285
+ margin: 12px 8px 0;
286
+ padding-top: 8px;
287
+
288
+ &-add {
289
+ width: 100%;
290
+ margin-bottom: 8px;
291
+ }
292
+ }
293
+ }
294
+ }
295
+
296
+ .ivu-select-dropdown {
297
+ width: fit-content;
298
+ }
299
+
300
+ .ivu-input-suffix {
301
+ display: flex;
302
+ align-items: center;
303
+
304
+ i {
305
+ width: 24px;
306
+ height: 24px;
307
+ line-height: 24px;
308
+
309
+ &:hover {
310
+ background-color: @btn-hover;
311
+ border-radius: @borderRadius;
312
+ }
313
+ }
314
+ }
315
+ }
316
+ </style>
@@ -1,40 +1,19 @@
1
1
  <!-- 动态表单 -->
2
2
  <template>
3
3
  <div class="DshPackage">
4
+ <dsh-form
5
+ v-if="curVal"
6
+ class="DshPackage-form"
7
+ :canEdit="finalCanEdit"
8
+ :formData="curVal.data || {}"
9
+ :formList="curVal.form || []"
10
+ @click.native="clickRow(val)"
11
+ ></dsh-form>
4
12
  <div
5
- v-if="canEdit"
6
- class="DshPackage-edit"
13
+ v-else
14
+ class="DshPackage-nodata"
7
15
  >
8
- <dsh-form
9
- v-if="value[propsObj._key]"
10
- class="reference-single-content-form"
11
- :canEdit="finalCanEdit"
12
- :formData="value[propsObj._key].data || {}"
13
- :formList="value[propsObj._key].form || []"
14
- @click.native="clickRow(val)"
15
- ></dsh-form>
16
- <div
17
- v-else
18
- class="DshPackage-edit-nodata"
19
- ><span>暂无字段</span>
20
- </div>
21
- </div>
22
-
23
- <div v-else>
24
- <dsh-form
25
- v-if="value[propsObj._key]"
26
- class="reference-single-content-form"
27
- :canEdit="finalCanEdit"
28
- :formData="value[propsObj._key].data || {}"
29
- :formList="value[propsObj._key].form || []"
30
- @click.native="clickRow(val)"
31
- ></dsh-form>
32
- <div
33
- v-else
34
- class="DshPackage-nodata"
35
- >
36
- {{ emptyShowVal }}
37
- </div>
16
+ {{ emptyShowVal }}
38
17
  </div>
39
18
  </div>
40
19
  </template>
@@ -57,3 +36,22 @@
57
36
  methods: {}
58
37
  };
59
38
  </script>
39
+
40
+ <style lang="less">
41
+ .DshPackage {
42
+ width: 100%;
43
+
44
+ &-form {
45
+
46
+ }
47
+
48
+ &-nodata {
49
+ height: 100%;
50
+ padding: 0 10px;
51
+ border: 1px #eee solid;
52
+ border-radius: 4px;
53
+ background: #fff;
54
+ line-height: 32px;
55
+ }
56
+ }
57
+ </style>
@@ -5,7 +5,9 @@
5
5
  v-if="isUnitShow"
6
6
  class="cascaderTable-unit"
7
7
  >
8
- <dsh-icons :list="$getOperationList(['canLink'])"></dsh-icons>
8
+ <dsh-icons :list="[{
9
+ customIcon: 'bico-Cascadetable'
10
+ }]"></dsh-icons>
9
11
  <span class="cascaderTable-unit-text">
10
12
  {{ curVal && curVal.tree.length }}行
11
13
  </span>
@@ -84,6 +86,7 @@
84
86
  return {
85
87
  isEnlarge: false,
86
88
  timer: null,
89
+
87
90
  operationMap: {
88
91
  canExport: {
89
92
  name: "导出",
@@ -100,9 +103,6 @@
100
103
  size: "small",
101
104
  btnType: "text",
102
105
  event: "clickEnlarge"
103
- },
104
- canLink: {
105
- customIcon: "bico-Cascadetable"
106
106
  }
107
107
  }
108
108
  };
@@ -198,3 +198,24 @@
198
198
  }
199
199
  };
200
200
  </script>
201
+
202
+ <style lang="less">
203
+ .cascaderTable {
204
+ &-unit {
205
+ .bri-unit-show();
206
+
207
+ &-text {
208
+
209
+ }
210
+ }
211
+
212
+ &-btns {
213
+ text-align: right;
214
+ color: @textColor;
215
+
216
+ &-item {
217
+
218
+ }
219
+ }
220
+ }
221
+ </style>
@@ -1,23 +1,22 @@
1
1
  <template>
2
2
  <div class="flatTable">
3
3
  <!-- 多选模式 -->
4
- <template v-if="multipleMode">
5
- <!-- 暂时不写内容 -->
6
- </template>
4
+ <template v-if="multipleMode"></template>
7
5
 
8
6
  <!-- 单选模式 -->
9
7
  <template v-else>
10
8
  <!-- 查看 单元格内 -->
11
- <template v-if="isUnitShow">
12
- <span class="flatTable-unit">
13
- <dsh-icons :list="[{
14
- customIcon: 'bico-internaltable'
15
- }]"></dsh-icons>
16
- <span class="flatTable-unit-text">
17
- {{ curVal.list.length }}行
18
- </span>
9
+ <span
10
+ v-if="isUnitShow"
11
+ class="flatTable-unit"
12
+ >
13
+ <dsh-icons :list="[{
14
+ customIcon: 'bico-internaltable'
15
+ }]"></dsh-icons>
16
+ <span class="flatTable-unit-text">
17
+ {{ curVal.list.length }}行
19
18
  </span>
20
- </template>
19
+ </span>
21
20
 
22
21
  <!-- 编辑、查看(查看页内) -->
23
22
  <template v-else>
@@ -149,3 +148,26 @@
149
148
  }
150
149
  };
151
150
  </script>
151
+
152
+ <style lang="less">
153
+ .flatTable {
154
+ width: 100%;
155
+
156
+ &-unit {
157
+ .bri-unit-show();
158
+
159
+ &-text {
160
+
161
+ }
162
+ }
163
+
164
+ &-btns {
165
+ text-align: right;
166
+ color: @textColor;
167
+
168
+ &-item {
169
+
170
+ }
171
+ }
172
+ }
173
+ </style>