bri-components 1.2.51 → 1.2.53

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 (49) hide show
  1. package/package.json +1 -1
  2. package/src/components/controls/BriControlInput.vue +10 -2
  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 +55 -4
  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/DshDivider.vue +163 -36
  10. package/src/components/controls/base/DshInput/BriInputs.vue +59 -1
  11. package/src/components/controls/base/DshInput/DshInput.vue +16 -0
  12. package/src/components/controls/base/DshNumber/DshNumber.vue +1 -1
  13. package/src/components/controls/controlMap.js +13 -4
  14. package/src/components/controls/extra/themeColor.vue +115 -0
  15. package/src/components/controls/extra/themeIcon.vue +124 -0
  16. package/src/components/controls/senior/BriLabels.vue +63 -4
  17. package/src/components/controls/senior/DshPackage.vue +30 -32
  18. package/src/components/controls/senior/cascaderTable.vue +25 -4
  19. package/src/components/controls/senior/flatTable.vue +34 -12
  20. package/src/components/controls/senior/selectDepartments.vue +78 -4
  21. package/src/components/controls/senior/selectUsers/DepartmentMenu.vue +120 -29
  22. package/src/components/controls/senior/selectUsers/selectUsers.vue +179 -5
  23. package/src/components/form/DshForm.vue +1 -1
  24. package/src/components/list/DshBox/DshCrossTable.vue +2 -2
  25. package/src/components/unit/DshFormUnit.vue +1 -1
  26. package/src/index.js +8 -4
  27. package/src/styles/components/index.less +0 -14
  28. package/src/styles/reset-iview-controls.less +19 -0
  29. package/src/styles/components/controls/.DS_Store +0 -0
  30. package/src/styles/components/controls/base/BriInputs.less +0 -55
  31. package/src/styles/components/controls/base/BriUpload/BriUpload.less +0 -167
  32. package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +0 -87
  33. package/src/styles/components/controls/base/BriUpload/index.less +0 -3
  34. package/src/styles/components/controls/base/BriUpload/uploadList.less +0 -164
  35. package/src/styles/components/controls/base/DshCascader/DshCascader.less +0 -67
  36. package/src/styles/components/controls/base/DshCascader/InfoCascader.less +0 -59
  37. package/src/styles/components/controls/base/DshCascader/index.less +0 -2
  38. package/src/styles/components/controls/base/DshCoordinates.less +0 -67
  39. package/src/styles/components/controls/base/DshDivider.less +0 -115
  40. package/src/styles/components/controls/base/DshInput.less +0 -13
  41. package/src/styles/components/controls/senior/.DS_Store +0 -0
  42. package/src/styles/components/controls/senior/BriLabels.less +0 -66
  43. package/src/styles/components/controls/senior/DshPackage.less +0 -25
  44. package/src/styles/components/controls/senior/cascaderTable.less +0 -19
  45. package/src/styles/components/controls/senior/flatTable.less +0 -20
  46. package/src/styles/components/controls/senior/selectDepartments.less +0 -73
  47. package/src/styles/components/controls/senior/selectUsers/DepartmentMenu.less +0 -37
  48. package/src/styles/components/controls/senior/selectUsers/index.less +0 -2
  49. package/src/styles/components/controls/senior/selectUsers/selectUsers.less +0 -180
@@ -1,43 +1,42 @@
1
1
  <template>
2
- <div class="DshDivider">
3
- <!-- <div class="DshDivider-divider-cli">
2
+ <div
3
+ class="DshDivider"
4
+ :style="propsObj._tagKind === 'flag' ? { marginRight:'36px' } : {}"
5
+ >
6
+ <!-- <div class="DshDivider-cli">
4
7
  <p>{{ propsObj._name }}</p>
5
8
  </div> -->
9
+
10
+ <div
11
+ v-if="propsObj._tagKind === 'flag'"
12
+ class="DshDivider-flag"
13
+ >
14
+ <Icon
15
+ size="15"
16
+ style="margin-top: -1px"
17
+ :custom="'bico-font ' + propsObj._tagIcon"
18
+ />
19
+ <p>{{ propsObj._name }}</p>
20
+ <span class="triangle-topleft"></span>
21
+ <span class="triangle-topright"></span>
22
+ </div>
23
+
6
24
  <div
7
- class="DshDivider-divider"
8
- :style="propsObj._tagKind === 'flag' ? { marginRight:'36px' } : {}"
25
+ v-else-if="propsObj._tagKind === 'line'"
26
+ class="DshDivider-line"
9
27
  >
10
- <div
11
- v-if="propsObj._tagKind === 'flag'"
12
- class="DshDivider-divider-flag"
13
- >
14
- <Icon
15
- size="15"
16
- style="margin-top: -1px"
17
- :custom="'bico-font ' + propsObj._tagIcon"
18
- />
19
- <p>{{ propsObj._name }}</p>
20
- <span class="triangle-topleft"></span>
21
- <span class="triangle-topright"></span>
22
- </div>
23
-
24
- <div
25
- v-else-if="propsObj._tagKind === 'line'"
26
- class="DshDivider-divider-line"
27
- >
28
- <p>{{ propsObj._name }}</p>
29
- <span></span>
30
- </div>
31
-
32
- <div
33
- v-else-if="propsObj._tagKind === 'circle'"
34
- class="DshDivider-divider-circle"
35
- >
36
- <span class="DshDivider-divider-circle-icon">
37
- <Icon :custom="'bico-font ' + propsObj._tagIcon" />
38
- </span>
39
- <p>{{ propsObj._name }}</p>
40
- </div>
28
+ <p>{{ propsObj._name }}</p>
29
+ <span></span>
30
+ </div>
31
+
32
+ <div
33
+ v-else-if="propsObj._tagKind === 'circle'"
34
+ class="DshDivider-circle"
35
+ >
36
+ <span class="DshDivider-circle-icon">
37
+ <Icon :custom="'bico-font ' + propsObj._tagIcon" />
38
+ </span>
39
+ <p>{{ propsObj._name }}</p>
41
40
  </div>
42
41
  </div>
43
42
  </template>
@@ -47,7 +46,9 @@
47
46
 
48
47
  export default {
49
48
  name: "DshDivider",
50
- mixins: [controlMixin],
49
+ mixins: [
50
+ controlMixin
51
+ ],
51
52
  props: {},
52
53
  data () {
53
54
  return {};
@@ -57,3 +58,129 @@
57
58
  methods: {}
58
59
  };
59
60
  </script>
61
+
62
+ <style lang="less">
63
+ .DshDivider {
64
+ margin-right: 20px;
65
+ font-family: SourceHanSansCN-Medium,SourceHanSansCN;
66
+ font-weight: 500;
67
+ font-size: 14px;
68
+
69
+ p {
70
+ margin-left: 10px;
71
+ white-space: nowrap;
72
+ text-overflow: ellipsis;
73
+ overflow: hidden;
74
+ }
75
+
76
+ // &-cli {
77
+ // margin-right: 20px;
78
+ // line-height: 32px;
79
+ // font-family:SourceHanSansCN-Medium,SourceHanSansCN;
80
+ // font-weight:700;
81
+ // font-size:16px;
82
+ // color: #333333;
83
+
84
+ // p {
85
+ // overflow: hidden;
86
+ // white-space: nowrap;
87
+ // text-overflow: ellipsis;
88
+ // }
89
+ // }
90
+
91
+ &-flag {
92
+ min-width: 130px;
93
+ max-width: 100%;
94
+ height: 38px;
95
+ margin-bottom: 4px;
96
+ background: linear-gradient(57deg, #3DB8C5 0%, #85CBED 100%);
97
+ line-height:38px;
98
+ display: inline-flex;
99
+ align-items: center;
100
+ padding: 0 10px;
101
+ color:rgba(255,255,255,1);
102
+ position: relative;
103
+
104
+ .triangle-topleft {
105
+ /* 左上三角 */
106
+ position: absolute;
107
+ top: 38px;
108
+ left: 0;
109
+ width: 0;
110
+ height: 0;
111
+ border-right: 14px solid transparent;
112
+ border-top: 4px solid #457FBB;
113
+ }
114
+
115
+ .triangle-topright {
116
+ /* 右上三角 */
117
+ position: absolute;
118
+ top: 0px;
119
+ right: -25px;
120
+ width: 0;
121
+ height: 0;
122
+ border-right: 25px solid transparent;
123
+ border-bottom: 38px solid #82c7ed;
124
+ }
125
+ }
126
+
127
+ &-circle {
128
+ min-width: 142px;
129
+ max-width: 100%;
130
+ height: 32px;
131
+ background-repeat: no-repeat;
132
+ background-position: center left;
133
+ display: inline-flex;
134
+ align-items: center;
135
+ line-height: 32px;
136
+ color:rgba(255,255,255,1);
137
+ background:linear-gradient(270deg,rgba(166,215,250,1) 0%,rgba(109,174,242,1) 47%,rgba(109,174,242,1) 100%);
138
+ border-radius:16px;
139
+ padding: 0 20px;
140
+
141
+ &-icon {
142
+ display: block;
143
+ font-size: 18px;
144
+ border: 4px solid #fff;
145
+ height: 40px;
146
+ min-width: 40px;
147
+ border-radius: 20px;
148
+ line-height: 28px;
149
+ text-align: center;
150
+ }
151
+ }
152
+
153
+ &-line {
154
+ color: @themeColor;
155
+ min-width:130px;
156
+ height: 32px;
157
+ max-width: 100%;
158
+ display: inline-block;
159
+ flex-direction:column;
160
+
161
+ p {
162
+ height: 32px;
163
+ line-height: 32px;
164
+ font-size:14px;
165
+ }
166
+
167
+ span {
168
+ display: block;
169
+ width: 100%;
170
+ background:linear-gradient(270deg,rgba(166,215,250,0) 0%,rgba(109,174,242,1) 100%) bottom left no-repeat;
171
+ height: 1px;
172
+ position: relative;
173
+ &::before {
174
+ content: "";
175
+ width: 5px;
176
+ height: 5px;
177
+ position: absolute;
178
+ border-radius: 5px;
179
+ background: #6DAEF2;
180
+ left: 0px;
181
+ top: -2px;
182
+ }
183
+ }
184
+ }
185
+ }
186
+ </style>
@@ -3,8 +3,8 @@
3
3
  <Input
4
4
  v-show="status === 'edit'"
5
5
  v-model="curInputVal"
6
- icon="ios-search"
7
6
  :placeholder="selfPropsObj._placeholder"
7
+ icon="ios-search"
8
8
  @on-enter="clickConfirm"
9
9
  @on-click="clickConfirm"
10
10
  ></Input>
@@ -106,3 +106,61 @@
106
106
  }
107
107
  };
108
108
  </script>
109
+
110
+ <style lang="less">
111
+ .BriInputs {
112
+ width: 100%;
113
+
114
+ i {
115
+ font-size: 16px;
116
+ cursor: pointer;
117
+ }
118
+
119
+ &-show {
120
+ display: flex;
121
+ align-items: center;
122
+ border: 1px solid #e5e5e5;
123
+ border-radius: 4px;
124
+ color: #515a6e;
125
+ padding-left: 5px;
126
+ height: 34px;
127
+
128
+ &-content {
129
+ display: flex;
130
+ width: calc(100% - 30px);
131
+ overflow: hidden;
132
+
133
+ &-item {
134
+ display: flex;
135
+ margin: 2px 4px 2px 0;
136
+ padding-left: 8px;
137
+ border: 1px solid #e8eaec;
138
+ border-radius: 3px;
139
+ background: #f7f7f7;
140
+ font-size: 14px;
141
+ max-width: 50%;
142
+ cursor: pointer;
143
+
144
+ &-content {
145
+ vertical-align: middle;
146
+ display: inline-block;
147
+ width: calc(100% - 20px);
148
+ .dsh-ellipsis();
149
+ }
150
+
151
+ &-del {
152
+ display: inline-block;
153
+ width: 20px;
154
+ vertical-align: middle;
155
+ }
156
+ }
157
+ }
158
+
159
+ &-add {
160
+ flex: 1;
161
+ height: 34px;
162
+ line-height: 34px;
163
+ }
164
+ }
165
+ }
166
+ </style>
@@ -180,3 +180,19 @@
180
180
  }
181
181
  };
182
182
  </script>
183
+
184
+ <style lang="less">
185
+ .DshInput {
186
+ width: 100%;
187
+
188
+ &-show {
189
+ &-textarea {
190
+ display: inline-block;
191
+ width: 100%;
192
+ height: auto;
193
+ white-space: pre-wrap;
194
+ min-height: 32px;
195
+ }
196
+ }
197
+ }
198
+ </style>
@@ -163,4 +163,4 @@
163
163
  }
164
164
  }
165
165
  }
166
- </style>
166
+ </style>
@@ -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
 
@@ -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>