bri-components 1.2.52 → 1.2.54

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.
@@ -1,16 +1,16 @@
1
1
  <template>
2
- <div class="DepartmentMenu">
2
+ <div class="departMenu">
3
3
  <div
4
4
  v-if="!parent && canEdit"
5
5
  :class="{
6
- 'DepartmentMenu-item': true,
7
- 'DepartmentMenu-item-select': departSelected._key === 'noDepart' || departSelected === null
6
+ 'departMenu-item': true,
7
+ 'departMenu-item-select': departSelected._key === 'noDepart' || departSelected === null
8
8
  }"
9
9
  >
10
10
  <div
11
11
  :class="{
12
- 'DepartmentMenu-item-name': true,
13
- 'DepartmentMenu-item-name-select': departSelected._key === 'noDepart' || departSelected === null
12
+ 'departMenu-item-name': true,
13
+ 'departMenu-item-name-select': departSelected._key === 'noDepart' || departSelected === null
14
14
  }"
15
15
  @click="departClick({'_key': 'noDepart'})"
16
16
  >
@@ -22,14 +22,14 @@
22
22
  v-for="(depart, departIndex) in list"
23
23
  :key="depart._key"
24
24
  :class="{
25
- 'DepartmentMenu-item': true,
26
- 'DepartmentMenu-item-select': departSelected._key === depart._key
25
+ 'departMenu-item': true,
26
+ 'departMenu-item-select': departSelected._key === depart._key
27
27
  }"
28
28
  >
29
29
  <div
30
30
  :class="{
31
- 'DepartmentMenu-item-name': true,
32
- 'DepartmentMenu-item-name-select': departSelected._key === depart._key
31
+ 'departMenu-item-name': true,
32
+ 'departMenu-item-name-select': departSelected._key === depart._key
33
33
  }"
34
34
  @click.stop="departClick(depart)"
35
35
  >
@@ -39,8 +39,11 @@
39
39
  :type="getIcon(depart)"
40
40
  @click.stop="toggleChildren(depart)"
41
41
  />
42
- <Icon custom="bico-font bri-qiye bico-qiye" />
43
- <span class="DepartmentMenu-item-name-text">
42
+ <Icon
43
+ v-if="useIcon"
44
+ custom="bico-font bri-qiye bico-qiye"
45
+ />
46
+ <span class="departMenu-item-name-text">
44
47
  {{ depart.name }}
45
48
  </span>
46
49
  </span>
@@ -54,7 +57,7 @@
54
57
  </div>
55
58
 
56
59
  <template v-if="depart.isShowChildren">
57
- <department-menu
60
+ <depart-menu
58
61
  style="margin-left: 15px"
59
62
  :canEdit="canEdit"
60
63
  :list="depart.children"
@@ -68,7 +71,7 @@
68
71
  @departClick="departClick"
69
72
  @removeDepartment="removeDepartment"
70
73
  @upDownDepartment="upDownDepartment"
71
- ></department-menu>
74
+ ></depart-menu>
72
75
  </template>
73
76
  </div>
74
77
  </div>
@@ -76,12 +79,17 @@
76
79
 
77
80
  <script>
78
81
  export default {
79
- name: "DepartmentMenu",
82
+ name: "departMenu",
80
83
  props: {
81
84
  canEdit: {
82
85
  type: Boolean,
83
86
  default: false
84
87
  },
88
+ useIcon: {
89
+ type: Boolean,
90
+ default: true
91
+ },
92
+
85
93
  parent: Object,
86
94
  list: {
87
95
  type: Array,
@@ -92,7 +100,9 @@
92
100
  propSelect: {
93
101
  type: Object,
94
102
  default: () => {
95
- return {_key: "noDepart"};
103
+ return {
104
+ _key: "noDepart"
105
+ };
96
106
  }
97
107
  },
98
108
  company: {
@@ -228,7 +238,7 @@
228
238
  </script>
229
239
 
230
240
  <style lang="less">
231
- .DepartmentMenu {
241
+ .departMenu {
232
242
  font-size: 14px;
233
243
 
234
244
  &-item {
@@ -98,13 +98,14 @@
98
98
  <!-- 下 -->
99
99
  <div class="content">
100
100
  <!-- 左 部门 -->
101
- <department-menu
101
+ <depart-menu
102
102
  v-if="showModal"
103
103
  class="content-menu"
104
104
  :canEdit="false"
105
+ :useIcon="false"
105
106
  :list="departmentList"
106
107
  @departClick="changeDepartment"
107
- ></department-menu>
108
+ ></depart-menu>
108
109
 
109
110
  <!-- 右 部门对应的成员 -->
110
111
  <div class="content-users">
@@ -203,7 +204,7 @@
203
204
 
204
205
  <script>
205
206
  import controlMixin from "../../controlMixin.js";
206
- import departmentMenu from "./DepartmentMenu.vue";
207
+ import departMenu from "./departMenu.vue";
207
208
 
208
209
  export default {
209
210
  name: "selectUsers",
@@ -211,7 +212,7 @@
211
212
  controlMixin
212
213
  ],
213
214
  components: {
214
- departmentMenu
215
+ departMenu
215
216
  },
216
217
  props: {},
217
218
  data () {
@@ -309,14 +310,6 @@
309
310
  },
310
311
  created () {},
311
312
  methods: {
312
- // 外部也在使用
313
- openModal () {
314
- this.showModal = true;
315
- },
316
- closeModal () {
317
- this.showModal = false;
318
- },
319
-
320
313
  clickInput () {
321
314
  if (this.finalCanEdit) {
322
315
  this.openModal();
@@ -3,7 +3,7 @@
3
3
  <!-- 左 表头列 -->
4
4
  <div
5
5
  class="DshCrossTable-left"
6
- :style="renderTableBoxStyle"
6
+ :style="renderTableBoxStyle + `;width: ${propsObj.titleWidth ? propsObj.titleWidth : 160}px`"
7
7
  >
8
8
  <!-- 多选框 和 序号 -->
9
9
  <div
@@ -540,13 +540,13 @@
540
540
  erd.listenTo(document.getElementById("DshCrossTable-right"), function (element) {
541
541
  // 计算宽度
542
542
  let tableWidth = that.$refs["DshCrossTable-right"].clientWidth;
543
- let nums = tableWidth / 240;
543
+ let nums = tableWidth / 200;
544
544
  let dataTotal = that.data.length;
545
545
  if (nums >= dataTotal) {
546
546
  that.rowWidth = tableWidth;
547
547
  that.colWidth = (tableWidth - 10) / dataTotal;
548
548
  } else {
549
- that.rowWidth = dataTotal * 240;
549
+ that.rowWidth = dataTotal * 200;
550
550
  }
551
551
 
552
552
  // that.rowWidth = 200 * that.data.length;
@@ -79,3 +79,9 @@
79
79
  }
80
80
  };
81
81
  </script>
82
+
83
+ <style lang="less" scoped>
84
+ .BriTooltip {
85
+ display: flex;
86
+ }
87
+ </style>
@@ -166,7 +166,7 @@
166
166
  padding: 0px 10px 10px;
167
167
 
168
168
  &-label {
169
- min-width: 0px;
169
+ min-width: 50px;
170
170
  padding: 5px 0px 5px;
171
171
  line-height: 20px;
172
172
  font-size: @smallSize;
package/src/index.js CHANGED
@@ -14,6 +14,7 @@ import DshBox from "./components/list/DshBox/DshBox.vue";
14
14
  import DshList from "./components/list/DshBox/DshList.vue";
15
15
  import DshTable from "./components/list/DshBox/DshTable.vue";
16
16
  import DshPage from "./components/list/DshPage.vue";
17
+ import DshCrossTable from "./components/list/DshBox/DshCrossTable.vue";
17
18
  // import DshCascaderTable from "./components/list/DshCascaderTable.vue";
18
19
 
19
20
  // form
@@ -78,7 +79,7 @@ import DshDivider from "./components/controls/base/DshDivider.vue";
78
79
 
79
80
  import DshPackage from "./components/controls/senior/DshPackage.vue";
80
81
  import selectUsers from "./components/controls/senior/selectUsers/selectUsers.vue";
81
- import DepartmentMenu from "./components/controls/senior/selectUsers/DepartmentMenu.vue";
82
+ import departMenu from "./components/controls/senior/selectUsers/departMenu.vue";
82
83
  import selectDepartments from "./components/controls/senior/selectDepartments.vue";
83
84
 
84
85
  // import DshBack from "./components/controls/special/DshBack.vue";
@@ -184,6 +185,7 @@ export {
184
185
  DshList,
185
186
  DshTable,
186
187
  DshPage,
188
+ DshCrossTable,
187
189
 
188
190
  // form
189
191
  DshForm,
@@ -247,7 +249,7 @@ export {
247
249
  // DshBack,
248
250
  // DshUndeveloped,
249
251
  selectUsers,
250
- DepartmentMenu,
252
+ departMenu,
251
253
  selectDepartments,
252
254
 
253
255
  DshMenuNav,
@@ -29,7 +29,6 @@
29
29
  // small
30
30
  @import "./small/BriButton.less";
31
31
  @import "./small/BriDrawer.less";
32
- @import "./small/BriTooltip.less";
33
32
  @import "./small/DshButtons.less";
34
33
  @import "./small/DshDropdown.less";
35
34
  @import "./small/DshIcons.less";
@@ -15,12 +15,14 @@
15
15
  &-header {
16
16
  width: 100%;
17
17
  }
18
+
18
19
  &-body {
19
20
  width: 100%;
20
21
  flex: 1;
21
22
  min-height: 0px;
22
23
  overflow: scroll;
23
24
  }
25
+
24
26
  &-footer {
25
27
  width: 100%;
26
28
  height: 38px;
@@ -38,9 +40,15 @@
38
40
  &-header {
39
41
  overflow: hidden;
40
42
  }
43
+
41
44
  &-body {
42
45
  overflow: hidden;
46
+
47
+ td {
48
+ width: 100% !important;
49
+ }
43
50
  }
51
+
44
52
  &-footer {
45
53
  overflow: hidden;
46
54
  }
@@ -55,9 +63,11 @@
55
63
  &-header {
56
64
  overflow: hidden;
57
65
  }
66
+
58
67
  &-body {
59
68
  overflow: scroll;
60
69
  }
70
+
61
71
  &-footer {
62
72
  overflow: hidden;
63
73
  }
@@ -66,21 +76,20 @@
66
76
  &-row {
67
77
  // height: 40px;
68
78
  }
79
+
69
80
  &-col {
70
- width: 160px!important;
81
+ width: 160px !important;
71
82
  font-weight: bold;
72
83
  color: #5D5D5D;
84
+
73
85
  &-checkbox,
74
86
  &-index,
75
- &-operation {
76
- }
87
+ &-operation {}
77
88
 
78
- &-Checkbox {
89
+ &-Checkbox {}
79
90
 
80
- }
81
- &-index {
91
+ &-index {}
82
92
 
83
- }
84
93
  &-content {
85
94
  .crossTable-col {
86
95
  width: 100%;
@@ -98,36 +107,33 @@
98
107
  }
99
108
  }
100
109
  }
101
- &-operation {
102
110
 
103
- }
111
+ &-operation {}
104
112
  }
113
+
105
114
  &-td {
115
+
106
116
  &-checkbox,
107
117
  &-index,
108
- &-operation {
109
- }
110
-
111
- &-Checkbox {
118
+ &-operation {}
112
119
 
113
- }
114
- &-index {
120
+ &-Checkbox {}
115
121
 
116
- }
117
- &-content {
122
+ &-index {}
118
123
 
119
- }
120
- &-operation {
124
+ &-content {}
121
125
 
122
- }
126
+ &-operation {}
123
127
  }
124
128
 
125
129
  table {
126
130
  width: 100%;
131
+
127
132
  tr {
128
133
  height: 39px;
129
134
  font-size: 12px;
130
135
  overflow: hidden;
136
+
131
137
  td {
132
138
  display: inline-block;
133
139
  width: 200px;
@@ -138,6 +144,7 @@
138
144
  border-bottom: 1px solid #EDEDED;
139
145
  cursor: pointer;
140
146
  overflow: hidden;
147
+
141
148
  .td-content {
142
149
  width: 100%;
143
150
  height: 100%;
@@ -148,14 +155,16 @@
148
155
  }
149
156
  }
150
157
  }
158
+
151
159
  .cross-table-box {
152
160
  height: 38px;
153
161
  padding: 7px 0;
162
+
154
163
  &-content {
155
164
  width: auto;
156
165
  border-radius: 2px;
157
166
  border: 1px solid #6daef2;
158
- font-size: 12px!important;
167
+ font-size: 12px !important;
159
168
  color: #6DAEF2;
160
169
  cursor: pointer;
161
170
  height: 24px;
@@ -166,9 +175,10 @@
166
175
  word-break: keep-all;
167
176
  white-space: nowrap;
168
177
  text-overflow: ellipsis;
178
+
169
179
  i {
170
180
  margin-right: 5px;
171
- font-size: 12px!important;
181
+ font-size: 12px !important;
172
182
  }
173
183
  }
174
184
  }
@@ -1,25 +0,0 @@
1
- .BriTooltip {
2
- display: flex;
3
- }
4
-
5
- .ivu-tooltip {
6
- &-arrow {
7
- border-bottom-color: @textColor !important;
8
- }
9
-
10
- &-inner {
11
- padding: 5px 8px;
12
- border-radius: 4px;
13
- line-height: 22px;
14
- background: @textColor;
15
- font-size: 14px;
16
- font-weight: 400;
17
- color: @textWhColor;
18
- max-height: 350px;
19
- overflow: auto;
20
- }
21
-
22
- &-rel {
23
- width: 100%;
24
- }
25
- }
@@ -42,14 +42,14 @@
42
42
  padding: 20px 10px;
43
43
  text-align: center;
44
44
  font-size: 14px;
45
- color: @textColor;
45
+ color: @placeholderColor;
46
46
  }
47
47
 
48
48
  #btn-style {
49
49
  background: #F4F8FF;
50
- color: @themeColor;
50
+ border: 1px solid #6694ED;
51
51
  border-radius: 4px;
52
52
  font-weight: bold;
53
53
  font-family: titleFontFamily;
54
- border: 1px solid #6694ED;
54
+ color: @themeColor;
55
55
  }
@@ -3,15 +3,15 @@
3
3
  border: 1px solid @borderColor;
4
4
  border-radius: @borderRadius;
5
5
  background: @inputBg;
6
- cursor: pointer;
7
6
  color: @textColor;
7
+ cursor: pointer;
8
8
  }
9
9
  .bri-control-disabled {
10
10
  border: 1px solid @border-disabled;
11
11
  border-radius: @borderRadius;
12
12
  background: @inputBg-disabled;
13
- cursor: not-allowed;
14
13
  color: @textColor;
14
+ cursor: not-allowed;
15
15
 
16
16
  &.bri-control-nodata {
17
17
  color: @placeholder-disabled-color;
@@ -21,8 +21,8 @@
21
21
  // border: 1px solid @border-readonly;
22
22
  // border-radius: @borderRadius;
23
23
  // background: @inputBg-readonly;
24
- // cursor: not-allowed;
25
24
  // color: @textColor-readonly;
25
+ // cursor: not-allowed;
26
26
 
27
27
  // .ivu-icon {
28
28
  // color: @textColor-readonly;
@@ -0,0 +1,21 @@
1
+ .ivu-tooltip {
2
+ &-arrow {
3
+ border-bottom-color: @textColor !important;
4
+ }
5
+
6
+ &-inner {
7
+ padding: 5px 8px;
8
+ border-radius: 4px;
9
+ line-height: 22px;
10
+ background: @textColor;
11
+ font-size: 14px;
12
+ font-weight: 400;
13
+ color: @textWhColor;
14
+ max-height: 350px;
15
+ overflow: auto;
16
+ }
17
+
18
+ &-rel {
19
+ width: 100%;
20
+ }
21
+ }