bri-components 1.2.49 → 1.2.50

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 (47) hide show
  1. package/package.json +2 -2
  2. package/src/components/controls/BriControlInput.vue +4 -3
  3. package/src/components/controls/base/DshCascader/DshCascader.vue +40 -23
  4. package/src/components/controls/base/DshCascader/InfoCascader.vue +7 -15
  5. package/src/components/controls/base/DshDate/DshDate.vue +146 -0
  6. package/src/components/controls/base/{DshDaterange.vue → DshDate/DshDaterange.vue} +55 -1
  7. package/src/components/controls/base/{BriInputs.vue → DshInput/BriInputs.vue} +1 -1
  8. package/src/components/controls/base/{DshInput.vue → DshInput/DshInput.vue} +24 -5
  9. package/src/components/controls/base/DshNumber/DshNumber.vue +74 -2
  10. package/src/components/controls/base/{DshNumberange.vue → DshNumber/DshNumberange.vue} +37 -2
  11. package/src/components/controls/base/DshSelect/DshCheckbox.vue +280 -0
  12. package/src/components/controls/base/DshSelect/DshSelect.vue +319 -0
  13. package/src/components/controls/base/DshSelect/selectMixin.js +241 -0
  14. package/src/components/controls/base/DshSwitch/DshSwitch.vue +84 -0
  15. package/src/components/controls/base/DshSwitch/switchMixin.js +73 -0
  16. package/src/components/controls/controlMap.js +8 -11
  17. package/src/components/controls/controlMixin.js +33 -5
  18. package/src/components/controls/senior/BriLabels.vue +1 -1
  19. package/src/components/controls/senior/selectDepartments.vue +9 -13
  20. package/src/components/controls/senior/selectUsers/selectUsers.vue +23 -21
  21. package/src/components/form/DshAdvSearch.vue +155 -3
  22. package/src/components/form/DshDefaultSearch.vue +94 -12
  23. package/src/components/form/DshForm.vue +24 -0
  24. package/src/components/form/searchMixin.js +5 -18
  25. package/src/components/other/BriGantt.vue +2 -2
  26. package/src/components/unit/DshFormUnit.vue +108 -0
  27. package/src/components/unit/DshListUnit.vue +6 -0
  28. package/src/index.js +10 -10
  29. package/src/styles/components/index.less +0 -14
  30. package/src/styles/components/other/BriGantt.less +1 -12
  31. package/src/styles/reset-iview.less +47 -1
  32. package/src/components/controls/base/DshCheckbox.vue +0 -213
  33. package/src/components/controls/base/DshDate.vue +0 -122
  34. package/src/components/controls/base/DshSelect.vue +0 -242
  35. package/src/components/controls/base/DshSwitch.vue +0 -70
  36. package/src/components/controls/base/selectMixin.js +0 -110
  37. package/src/styles/components/controls/base/DshCheckbox.less +0 -115
  38. package/src/styles/components/controls/base/DshDate.less +0 -15
  39. package/src/styles/components/controls/base/DshDaterange.less +0 -49
  40. package/src/styles/components/controls/base/DshNumber.less +0 -55
  41. package/src/styles/components/controls/base/DshNumberange.less +0 -29
  42. package/src/styles/components/controls/base/DshSelect.less +0 -190
  43. package/src/styles/components/form/DshAdvSearch.less +0 -149
  44. package/src/styles/components/form/DshDefaultSearch.less +0 -82
  45. package/src/styles/components/form/DshForm.less +0 -18
  46. package/src/styles/components/unit/DshFormUnit.less +0 -105
  47. package/src/styles/components/unit/DshListUnit.less +0 -3
@@ -1,110 +0,0 @@
1
- export default {
2
- data () {
3
- return {
4
- initListData: [],
5
- showTipTpl: false,
6
- showTipModal: false,
7
- dynamicContent: ""
8
- };
9
- },
10
- computed: {
11
- modalTipContent () {
12
- return this.propsObj._tipContent || this.dynamicContent || "暂无信息";
13
- }
14
- },
15
- created () {
16
- this.getTipData();
17
- },
18
- methods: {
19
- getTipData () {
20
- if (
21
- (this.propsObj._key !== "_default") &&
22
- this.finalCanEdit &&
23
- this.propsObj._openTip
24
- ) {
25
- let tipObj = {
26
- _key: "openTip",
27
- _name: this.propsObj._tipName || "其他",
28
- __isTip__: true,
29
- _disabled: true,
30
- color: "#6991cc",
31
- class: `Dsh${this.propsObj._type}-tip`
32
- };
33
- this.initListData.push(tipObj);
34
- }
35
- },
36
- // 是否打开tip弹窗
37
- clickOpenTip (item) {
38
- if (item.__isTip__) {
39
- if (this.propsObj._tipKind === "dynamic" && !this.propsObj._tipContent) {
40
- this.getTipUrl();
41
- } else {
42
- this.showTipTpl = true;
43
- this.showTipModal = true;
44
- }
45
- }
46
- },
47
- getTipUrl () {
48
- if (this.propsObj._tipUrl) {
49
- this.$https({
50
- url: {
51
- module: "customPath",
52
- name: this.propsObj._tipUrl
53
- },
54
- params: {
55
- formData: this.value,
56
- propsObj: this.propsObj
57
- },
58
- callback: res => {
59
- this.dynamicContent = res;
60
- this.showTipTpl = true;
61
- this.showTipModal = true;
62
- }
63
- });
64
- } else {
65
- this.$Message.info("请配置接口路径!");
66
- }
67
- },
68
- tipModalRender (h) {
69
- return this.showTipTpl
70
- ? h("dsh-modal", {
71
- props: {
72
- value: this.showTipModal,
73
- mode: "custom",
74
- propsObj: {
75
- title: "温馨提示",
76
- maskClosable: true,
77
- class: "DshSelect-modal"
78
- }
79
- },
80
- on: {
81
- input: bool => {
82
- this.showTipModal = bool;
83
- }
84
- }
85
- }, [
86
- h("div", {
87
- class: "DshSelect-modal-content",
88
- domProps: {
89
- innerHTML: this.modalTipContent
90
- }
91
- }),
92
- h("div", {
93
- class: "DshSelect-modal-footer"
94
- }, [
95
- h("Button", {
96
- props: {
97
- type: "primary"
98
- },
99
- on: {
100
- click: () => {
101
- this.showTipModal = false;
102
- }
103
- }
104
- }, "我知道了")
105
- ])
106
- ])
107
- : undefined;
108
- }
109
- }
110
- };
@@ -1,115 +0,0 @@
1
- .DshCheckbox {
2
- width: 100%;
3
-
4
- &-group {
5
- width: 100%;
6
-
7
- // 选中时背景为白色
8
- .ivu-checkbox-checked .ivu-checkbox-inner {
9
- background-color: @themeColor;
10
- }
11
-
12
- &-color {
13
- .ivu-checkbox-border {
14
- margin-right: 16px;
15
- height: 32px;
16
- border: none;
17
- border-radius: 4px;
18
- line-height: 32px;
19
- color: #FFF;
20
- }
21
-
22
- .ivu-checkbox {
23
- .ivu-checkbox-inner {
24
- border: 2px solid @themeColor;
25
- background-color: transparent;
26
- }
27
-
28
- .ivu-checkbox-focus {
29
- box-shadow: 0 0 0 0;
30
- }
31
- }
32
-
33
- .ivu-checkbox-disabled+span {
34
- color: inherit;
35
- }
36
-
37
- each(@resourceColor, {
38
- .color-@{index} {
39
- .ivu-checkbox {
40
- .ivu-checkbox-inner {
41
- border-color: @value;
42
- }
43
- }
44
-
45
- .ivu-checkbox-checked {
46
- .ivu-checkbox-inner {
47
- background-color: @value;
48
- }
49
- }
50
- }
51
- });
52
- }
53
-
54
- &-disabled {
55
- .ivu-checkbox-disabled+span {
56
- color: #515a6e;
57
- }
58
- }
59
-
60
- &-scroll {
61
- overflow-x: auto;
62
- overflow-y: hidden;
63
- white-space: nowrap;
64
-
65
- &::-webkit-scrollbar {
66
- height: 6px;
67
- }
68
-
69
- &:-webkit-scrollbar-thumb {
70
- border-radius: 3px;
71
- background: rgba(51, 51, 51, .1);
72
- background-clip: border-box;
73
- }
74
- }
75
- }
76
-
77
- &-item {}
78
-
79
- &-show {}
80
-
81
- .ivu-select-multiple {
82
- .ivu-select-selection {
83
- height: 32px;
84
- .dsh-flex-row-between-center();
85
-
86
- & > div {
87
- width: 100%;
88
- height: 100%;
89
- word-break: keep-all;
90
- white-space: nowrap;
91
- overflow: auto;
92
- .bri-scrollbar3();
93
-
94
- .ivu-tag {
95
- margin: 2px 4px 0px 0px;
96
- background-color: @borderColor;
97
- }
98
- }
99
- }
100
-
101
- &.ivu-select-disabled {
102
- .ivu-select-selection {
103
- & > div {
104
- .ivu-tag {
105
- background-color: @border-disabled;
106
- }
107
- }
108
- }
109
- }
110
-
111
- .ivu-select-item-selected:after {
112
- content: none;
113
- }
114
- }
115
- }
@@ -1,15 +0,0 @@
1
- .DshDate {
2
- width: 100%;
3
-
4
- &-edit {
5
- width: 100%;
6
- }
7
-
8
- &-unit {
9
-
10
- }
11
-
12
- &-show {
13
-
14
- }
15
- }
@@ -1,49 +0,0 @@
1
- .DshDaterange {
2
- width: 100%;
3
-
4
- &-left,
5
- &-right {
6
- width: 47%;
7
- float: left;
8
- background-color: #ffffff;
9
- }
10
-
11
- &-center {
12
- width: 3%;
13
- text-align: center;
14
- color: @textColor;
15
- overflow: hidden;
16
- line-height: 30px;
17
- float: left;
18
- margin: 0 1.5%;
19
- }
20
-
21
- &-item {
22
- height: 32px;
23
- border: 1px solid @borderColor;
24
- border-radius: 4px;
25
- overflow: hidden;
26
- position: relative;
27
- &-name {
28
- display: inline-block;
29
- width: 100%;
30
- height: 100%;
31
- line-height: 30px;
32
- overflow: hidden;
33
- padding-right: 32px;
34
- padding-left: 7px;
35
- white-space: nowrap;
36
- text-overflow: ellipsis;
37
- }
38
- &-icon {
39
- display: inline-block;
40
- position: absolute;
41
- right: 0px;
42
- top: 0px;
43
- width: 32px;
44
- height: 100%;
45
- text-align: center;
46
- line-height: 30px;
47
- }
48
- }
49
- }
@@ -1,55 +0,0 @@
1
- .DshNumber {
2
- width: 100%;
3
-
4
- &-edit {
5
- &-suffix {
6
- min-width: 32px;
7
- border-left: 1px solid @borderColor;
8
- background-color: #F0F0F0;
9
- text-align: center;
10
- color: @textColor;
11
- }
12
- }
13
- }
14
-
15
- .ivu-input-number {
16
- width: 100%;
17
-
18
- // .bri-control-edit();
19
- .ivu-input-number-input {
20
- color: @textColor;
21
- }
22
-
23
- &-disabled {
24
- // .bri-control-disabled();
25
- .ivu-input-number-input {
26
- opacity: 1;
27
- background: @inputBg-disabled;
28
- color: @textColor;
29
- &::-webkit-input-placeholder {
30
- color: @placeholder-disabled-color;
31
- }
32
- }
33
- }
34
-
35
- &-handler {
36
- &-wrap {
37
- border-left: none;
38
- }
39
- &-down {
40
- border: none;
41
- }
42
- &:hover {
43
- background-color: @hoverBg;
44
-
45
- .ivu-input-number-handler-down-inner,
46
- .ivu-input-number-handler-up-inner {
47
- color: @textColor;
48
- }
49
- }
50
- &-down-inner,
51
- &-up-inner {
52
- color: @contentColor;
53
- }
54
- }
55
- }
@@ -1,29 +0,0 @@
1
- .DshNumberange {
2
- width: 100%;
3
- display: flex;
4
- align-items: center;
5
-
6
- &-left,
7
- &-right {
8
- flex: 1;
9
- }
10
-
11
- &-center {
12
- width: 30px;
13
- text-align: center;
14
- color: @textColor;
15
- }
16
-
17
- &-suffix {
18
- padding-right: 24px;
19
- padding-left: 8px;
20
- line-height: 30px;
21
- white-space: nowrap;
22
- }
23
-
24
- input {
25
- text-overflow: ellipsis;
26
- overflow: hidden;
27
- white-space: nowrap;
28
- }
29
- }
@@ -1,190 +0,0 @@
1
- .DshSelect {
2
- width: 100%;
3
-
4
- &-radioGroup {
5
- width: 100%;
6
-
7
- &-useColor {
8
- .ivu-radio-border {
9
- height: 32px;
10
- line-height: 32px;
11
- border-radius: 4px;
12
- border: none;
13
- color: #FFF;
14
- margin-right: 16px;
15
- }
16
-
17
- .ivu-radio {
18
- .ivu-radio-inner {
19
- border: 2px solid @themeColor;
20
- background-color: transparent;
21
- width: 14px;
22
- height: 14px;
23
-
24
- &::after {
25
- width: 6px;
26
- height: 6px;
27
- left: 2px;
28
- top: 2px;
29
- background-color: transparent;
30
- opacity: 1;
31
- transform: scale(1);
32
- }
33
- }
34
-
35
- .ivu-radio-focus {
36
- box-shadow: 0 0 0 0;
37
- }
38
- }
39
-
40
- .ivu-radio-checked {
41
- .ivu-radio-inner {
42
- &::after {
43
- background-color: @themeColor;
44
- }
45
- }
46
- }
47
-
48
- each(@resourceColor, {
49
- .color-@{index} {
50
- .ivu-radio {
51
- .ivu-radio-inner {
52
- border-color: @value;
53
- }
54
- }
55
-
56
- .ivu-radio-checked {
57
- .ivu-radio-inner {
58
- &::after {
59
- background-color: @value;
60
- }
61
- }
62
- }
63
- }
64
- });
65
- }
66
-
67
- &-scroll {
68
- overflow-x: auto;
69
- overflow-y: hidden;
70
- white-space: nowrap;
71
-
72
- &::-webkit-scrollbar {
73
- height: 6px;
74
- }
75
-
76
- &:-webkit-scrollbar-thumb {
77
- border-radius: 3px;
78
- background: rgba(51, 51, 51, .1);
79
- background-clip: border-box;
80
- }
81
- }
82
- }
83
-
84
- &-modal {
85
- .ivu-modal-wrap {
86
- display: flex;
87
- align-items: center;
88
- justify-content: center;
89
- }
90
-
91
- .ivu-modal {
92
- width: 544px !important;
93
- position: static;
94
- }
95
-
96
- .ivu-modal-content {
97
- border-radius: 8px;
98
- }
99
-
100
- .ivu-modal-header {
101
- border-bottom: none;
102
- padding: 32px 32px 0;
103
-
104
- .ivu-modal-header-inner {
105
- font-size: 18px;
106
- font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
107
- font-weight: 600;
108
- color: #252F36;
109
- }
110
- }
111
-
112
-
113
- .DshModal-close {
114
- right: 30px !important;
115
- top: 30px !important;
116
- background: #F4F6F8;
117
- border-radius: 4px 4px 4px 4px;
118
- }
119
-
120
- .ivu-modal-body {
121
- padding: 24px 32px 32px;
122
- }
123
-
124
- &-footer {
125
- margin-top: 24px;
126
- text-align: right;
127
-
128
- .ivu-btn {
129
- font-size: 16px;
130
- font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
131
- font-weight: 600;
132
- border-radius: 4px;
133
- }
134
- }
135
- }
136
-
137
- &-tip {
138
- cursor: pointer;
139
-
140
- .ivu-radio {
141
- display: none;
142
- }
143
- }
144
- }
145
-
146
- .ivu-select {
147
- .ivu-select-selection {
148
- // .bri-control-edit();
149
- }
150
-
151
- &-disabled {
152
- .ivu-select-selection {
153
- .bri-control-disabled();
154
-
155
- &:hover {
156
- border-color: @border-disabled;
157
- }
158
- }
159
-
160
- .ivu-select-input[disabled] {
161
- color: @textColor;
162
- -webkit-text-fill-color: @placeholder-disabled-color;
163
- }
164
- }
165
-
166
- &-item {
167
- margin: 4px 8px;
168
- border-radius: @borderRadius;
169
-
170
- &:hover {
171
- background: @bgColor;
172
- }
173
-
174
- &-selected {
175
- background-color: @theme-focus;
176
- color: @themeColor;
177
- }
178
-
179
- &-disabled {
180
- .ivu-select-selection {
181
- .bri-control-disabled();
182
- }
183
- }
184
-
185
- &-input[disabled] {
186
- color: @textColor-disabled;
187
- -webkit-text-fill-color: @textColor-disabled;
188
- }
189
- }
190
- }
@@ -1,149 +0,0 @@
1
- .DshAdvSearch {
2
- #title {
3
- font-weight: 400;
4
- color: #999999;
5
- font-size: 14px;
6
- }
7
-
8
- &-title {
9
- #title();
10
- }
11
-
12
- &-logic {
13
- margin: 5px 0px 10px;
14
- .dsh-flex-row-start-center();
15
-
16
- &-title {
17
- #title();
18
- }
19
- &-option {
20
- flex: 1;
21
- min-width: 100px;
22
- margin-left: 20px;
23
- }
24
- }
25
-
26
- &-conditions {
27
- &-delete {
28
- display: none;
29
- padding: 3px;
30
- position: absolute;
31
- top: 6px;
32
- right: 2px;
33
- color: red;
34
- }
35
-
36
- &-loop,
37
- &-item {
38
- position: relative;
39
-
40
- &:hover,
41
- &-active {
42
- .DshAdvSearch-conditions-delete {
43
- display: inline-block;
44
- }
45
- }
46
- }
47
-
48
- &-loop {
49
- padding: 10px;
50
- margin: 6px;
51
- border: 1px solid @placeholderColor;
52
- background-color: #F4F8FF;
53
- }
54
-
55
- &-item {
56
- padding: 0!important;
57
- margin-bottom: 10px!important;
58
- cursor: pointer;
59
-
60
- .DshFormUnit-label-right {
61
- flex: 6;
62
- }
63
-
64
- &-loading {
65
- margin: 5px 0px;
66
- text-align: center;
67
- font-size: 16px;
68
- color: @textColor;
69
- }
70
-
71
- &-control {
72
- .dsh-margin-bottom5();
73
- }
74
-
75
- &-blank {
76
- text-align: center;
77
- line-height: 30px;
78
- color: @placeholderColor;
79
- }
80
-
81
- &-extra {
82
- text-align: right;
83
- padding-right: 10px;
84
-
85
- .extra {
86
- &-dynamic {
87
- width: 90px;
88
- display: inline-block;
89
- }
90
-
91
- &-operator {
92
- .dsh-margin-right10();
93
-
94
- &-wrap {
95
- display: inline-block;
96
- padding: 5px;
97
- &:hover {
98
- background-color: #E8F3FD;
99
- }
100
- }
101
-
102
- &-name {
103
- display: inline-block;
104
- min-width: 36px;
105
- }
106
-
107
- &-icon {
108
- .dsh-margin-left5();
109
- }
110
- }
111
- }
112
- }
113
- }
114
- }
115
-
116
- &-btns {
117
- width: 100%;
118
- margin-top: 15px;
119
- .dsh-flex-row-start-center();
120
-
121
- &-field {
122
- flex: 3;
123
-
124
- &-list {
125
- width: 330px;
126
- }
127
-
128
- &-create {
129
- #btn-style();
130
- }
131
- }
132
-
133
- &-loop {
134
- flex: 1;
135
- margin-left: 12px;
136
-
137
- &-create {
138
- #btn-style();
139
- }
140
- }
141
- }
142
-
143
- &-nodata {
144
- margin: 20px 0px;
145
- text-align: center;
146
- font-size: 16px;
147
- color: #B8BECC;
148
- }
149
- }