bri-components 1.3.16 → 1.3.17
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.
- package/package.json +1 -1
- package/src/components/controls/senior/flatTable.vue +3 -3
- package/src/components/controls/senior/selectUsers/selectUsers.vue +16 -10
- package/src/components/list/BriFlatTable.vue +23 -12
- package/src/components/other/BriGantt.vue +12 -1
- package/src/styles/components/other/BriGantt.less +69 -23
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:columns="columns"
|
|
28
28
|
:data="curVal.list"
|
|
29
29
|
:rowDefault="curVal.rowDefault"
|
|
30
|
-
:
|
|
30
|
+
:parentObj="value"
|
|
31
31
|
:propsObj="propsObj"
|
|
32
32
|
@change="change"
|
|
33
33
|
></bri-flat-table>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
:data="curVal.list"
|
|
51
51
|
:oldData="curVal.oldList"
|
|
52
52
|
:rowDefault="curVal.rowDefault"
|
|
53
|
-
:
|
|
53
|
+
:parentObj="value"
|
|
54
54
|
:propsObj="propsObj"
|
|
55
55
|
@change="change"
|
|
56
56
|
></bri-flat-table>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
:data="curVal.list"
|
|
68
68
|
:oldData="curVal.oldList"
|
|
69
69
|
:rowDefault="curVal.rowDefault"
|
|
70
|
-
:
|
|
70
|
+
:parentObj="value"
|
|
71
71
|
:propsObj="propsObj"
|
|
72
72
|
@change="change"
|
|
73
73
|
></bri-flat-table>
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
return this.selfPropsObj._reverseFilter;
|
|
295
295
|
},
|
|
296
296
|
// 禁止显示的部门以及部门下人员
|
|
297
|
-
|
|
297
|
+
listFilterVals () {
|
|
298
298
|
return this.selfPropsObj._userDepartFilterVals || [];
|
|
299
299
|
},
|
|
300
300
|
highSearch () {
|
|
@@ -421,11 +421,13 @@
|
|
|
421
421
|
},
|
|
422
422
|
loadingName: "loading",
|
|
423
423
|
callback: data => {
|
|
424
|
-
this.userList =
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
424
|
+
this.userList = this.listFilterVals.length
|
|
425
|
+
? data.list.filter(item =>
|
|
426
|
+
this.reverseFilter
|
|
427
|
+
? !this.listFilterVals.includes(item.departmentKey)
|
|
428
|
+
: this.listFilterVals.includes(item.departmentKey)
|
|
429
|
+
)
|
|
430
|
+
: data.list;
|
|
429
431
|
this.total = data.total;
|
|
430
432
|
}
|
|
431
433
|
});
|
|
@@ -500,10 +502,14 @@
|
|
|
500
502
|
name: "全部",
|
|
501
503
|
_key: ""
|
|
502
504
|
},
|
|
503
|
-
...
|
|
504
|
-
this.
|
|
505
|
-
?
|
|
506
|
-
|
|
505
|
+
...(
|
|
506
|
+
this.listFilterVals.length
|
|
507
|
+
? data.list.filter(item =>
|
|
508
|
+
this.reverseFilter
|
|
509
|
+
? !this.listFilterVals.includes(item._key)
|
|
510
|
+
: this.listFilterVals.includes(item._key)
|
|
511
|
+
)
|
|
512
|
+
: data.list
|
|
507
513
|
)
|
|
508
514
|
];
|
|
509
515
|
}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
parentObj: {
|
|
61
61
|
type: Object,
|
|
62
62
|
default () {
|
|
63
63
|
return {};
|
|
@@ -181,7 +181,11 @@
|
|
|
181
181
|
return !!this.oldListData.length;
|
|
182
182
|
},
|
|
183
183
|
filterColumns () {
|
|
184
|
-
return this.columns.filter(
|
|
184
|
+
return this.columns.filter(column => {
|
|
185
|
+
return column._isRelyParent
|
|
186
|
+
? this.$isFormItemShow(column, this.parentObj, true)
|
|
187
|
+
: !["hide"].includes(column._displayType);
|
|
188
|
+
});
|
|
185
189
|
},
|
|
186
190
|
showColumns () {
|
|
187
191
|
const operationList = this.$getOperationList(["delete"]);
|
|
@@ -218,10 +222,12 @@
|
|
|
218
222
|
),
|
|
219
223
|
|
|
220
224
|
...this.$transformToColumns(
|
|
221
|
-
this.filterColumns.map(
|
|
225
|
+
this.filterColumns.map(colItem => ({
|
|
222
226
|
filter: undefined,
|
|
223
227
|
sortBy: undefined,
|
|
224
228
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
229
|
+
column = this.$transformFieldProperty(column, row);
|
|
230
|
+
|
|
225
231
|
return [
|
|
226
232
|
this.isShowCompare(column, row, this.oldListData[rowIndex])
|
|
227
233
|
? h("Tooltip", {
|
|
@@ -241,7 +247,7 @@
|
|
|
241
247
|
props: {
|
|
242
248
|
canEdit: this.getUnitCanEdit(column, row),
|
|
243
249
|
formData: row,
|
|
244
|
-
formItem: this.resetCol(
|
|
250
|
+
formItem: this.resetCol(column, row),
|
|
245
251
|
rowIndex: rowIndex,
|
|
246
252
|
parentData: this.listData,
|
|
247
253
|
allFormList: this.columns
|
|
@@ -257,7 +263,7 @@
|
|
|
257
263
|
props: {
|
|
258
264
|
canEdit: this.getUnitCanEdit(column, row),
|
|
259
265
|
formData: row,
|
|
260
|
-
formItem: this.resetCol(
|
|
266
|
+
formItem: this.resetCol(column, row),
|
|
261
267
|
rowIndex: rowIndex,
|
|
262
268
|
parentData: this.listData,
|
|
263
269
|
allFormList: this.columns
|
|
@@ -275,7 +281,7 @@
|
|
|
275
281
|
: undefined
|
|
276
282
|
];
|
|
277
283
|
},
|
|
278
|
-
...
|
|
284
|
+
...colItem
|
|
279
285
|
})),
|
|
280
286
|
{
|
|
281
287
|
showRequired: this.showRequired,
|
|
@@ -363,8 +369,11 @@
|
|
|
363
369
|
validate () {
|
|
364
370
|
this.showRuleMessage = true;
|
|
365
371
|
|
|
366
|
-
return this.listData.every(
|
|
367
|
-
this.filterColumns.every(
|
|
372
|
+
return this.listData.every(row =>
|
|
373
|
+
this.filterColumns.every(column => {
|
|
374
|
+
column = this.$transformFieldProperty(column, row);
|
|
375
|
+
return this.getRuleResult(column, row).bool;
|
|
376
|
+
})
|
|
368
377
|
);
|
|
369
378
|
},
|
|
370
379
|
// 点击 -添加行
|
|
@@ -409,7 +418,7 @@
|
|
|
409
418
|
},
|
|
410
419
|
|
|
411
420
|
/* --------------- 工具方法 ------------- */
|
|
412
|
-
resetCol (col) {
|
|
421
|
+
resetCol (col, row) {
|
|
413
422
|
let resetMap = {
|
|
414
423
|
select: {
|
|
415
424
|
_optionKind: "dropdown"
|
|
@@ -421,15 +430,17 @@
|
|
|
421
430
|
return {
|
|
422
431
|
...col,
|
|
423
432
|
...(resetMap[col._type] || {}),
|
|
424
|
-
|
|
425
|
-
|
|
433
|
+
isShare: this.isShare,
|
|
434
|
+
_heightAuto: this.heightAuto
|
|
435
|
+
// canEdit: this.$isAdvRelyShow(col, row, true)
|
|
426
436
|
};
|
|
427
437
|
},
|
|
428
438
|
getUnitCanEdit (col, row) {
|
|
429
439
|
return this.canEdit && // 是否是编辑状态
|
|
430
440
|
// (!this.disabledOldDataRow || !!this.createRowMap[row._id]) && // 是否让老数据行置灰
|
|
431
441
|
(!this.disabledOldDataRow || !!row.__isCreate__) && // 是否让老数据行置灰
|
|
432
|
-
|
|
442
|
+
(!col.dependRowCanEdit || row.canEdit !== false) &&
|
|
443
|
+
this.$isAdvRelyShow(col, row, true); // 在老数据行里某些列不可编辑; // 在老数据行里某些列不可编辑
|
|
433
444
|
},
|
|
434
445
|
isShowCompare (col, row, oldRow = {}) {
|
|
435
446
|
return this.useCampare && ["number"].includes(col._type) &&
|
|
@@ -186,7 +186,10 @@
|
|
|
186
186
|
background:$getColor(timeItem.style.background),
|
|
187
187
|
minWidth: minTdWidth,
|
|
188
188
|
border: `1px solid ${timeItem.style.background}`,
|
|
189
|
-
padding: timeItem.task.progressField == 100 ? '' : '1px'
|
|
189
|
+
padding: timeItem.task.progressField == 100 ? '' : '1px',
|
|
190
|
+
cursor: canClick ? 'pointer' : ''
|
|
191
|
+
}"
|
|
192
|
+
@click="clickRow(timeItem)"
|
|
190
193
|
>
|
|
191
194
|
<slot
|
|
192
195
|
name="chartCenter"
|
|
@@ -412,6 +415,10 @@
|
|
|
412
415
|
step: {
|
|
413
416
|
type: Number,
|
|
414
417
|
default: 1
|
|
418
|
+
},
|
|
419
|
+
canClick: {
|
|
420
|
+
type: Boolean,
|
|
421
|
+
default: false
|
|
415
422
|
}
|
|
416
423
|
},
|
|
417
424
|
computed: {
|
|
@@ -770,6 +777,10 @@
|
|
|
770
777
|
speedTarget += speed;
|
|
771
778
|
}
|
|
772
779
|
}, 10);
|
|
780
|
+
},
|
|
781
|
+
// 行点击
|
|
782
|
+
clickRow (col) {
|
|
783
|
+
this.canClick && this.$emit("clickRow", col.task, col);
|
|
773
784
|
}
|
|
774
785
|
},
|
|
775
786
|
filters: {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
display: flex;
|
|
9
9
|
overflow: auto;
|
|
10
10
|
flex-direction: column;
|
|
11
|
+
|
|
11
12
|
&-top {
|
|
12
13
|
display: flex;
|
|
13
14
|
height: 100%;
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
justify-content: space-between;
|
|
16
17
|
position: absolute;
|
|
17
18
|
}
|
|
19
|
+
|
|
18
20
|
&-bottom {
|
|
19
21
|
width: 100%;
|
|
20
22
|
overflow: auto;
|
|
@@ -22,6 +24,7 @@
|
|
|
22
24
|
flex-direction: column;
|
|
23
25
|
margin-top: 38px;
|
|
24
26
|
background: @white;
|
|
27
|
+
|
|
25
28
|
&-title {
|
|
26
29
|
text-align: center;
|
|
27
30
|
border: 1px solid #EDEDED;
|
|
@@ -29,21 +32,25 @@
|
|
|
29
32
|
line-height: 27px;
|
|
30
33
|
// margin: 10px 14px 0 14px;
|
|
31
34
|
}
|
|
35
|
+
|
|
32
36
|
&-content {
|
|
33
37
|
flex: 1;
|
|
34
38
|
display: flex;
|
|
35
39
|
overflow: auto;
|
|
36
40
|
}
|
|
37
41
|
}
|
|
42
|
+
|
|
38
43
|
// 表格渲染
|
|
39
44
|
&-tableBox {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
width: 100%;
|
|
46
|
+
text-align: center;
|
|
47
|
+
border-collapse: collapse;
|
|
48
|
+
border-spacing: 0;
|
|
49
|
+
|
|
50
|
+
td,
|
|
51
|
+
th {
|
|
45
52
|
word-break: break-all;
|
|
46
|
-
word-wrap:break-word;
|
|
53
|
+
word-wrap: break-word;
|
|
47
54
|
min-width: 50px;
|
|
48
55
|
height: 29px;
|
|
49
56
|
text-align: center;
|
|
@@ -52,66 +59,82 @@
|
|
|
52
59
|
text-overflow: ellipsis;
|
|
53
60
|
max-width: 200px;
|
|
54
61
|
}
|
|
62
|
+
|
|
55
63
|
.briGantt-chart-td {
|
|
56
64
|
height: 40px;
|
|
57
65
|
}
|
|
58
|
-
|
|
66
|
+
|
|
67
|
+
.briGantt-table-th-now {
|
|
59
68
|
color: @themeColor;
|
|
60
69
|
}
|
|
61
70
|
}
|
|
71
|
+
|
|
62
72
|
&-table {
|
|
63
73
|
&-tr {
|
|
64
74
|
border: 1px solid #EDEDED;
|
|
65
75
|
}
|
|
76
|
+
|
|
66
77
|
&-tr:nth-child(2n) {
|
|
67
|
-
background: rgba(244,246,249,0.5119);
|
|
78
|
+
background: rgba(244, 246, 249, 0.5119);
|
|
68
79
|
}
|
|
80
|
+
|
|
69
81
|
&-th {
|
|
70
82
|
background: #F4F8FF;
|
|
71
|
-
font-weight:400;
|
|
72
|
-
color:rgba(101,101,101,1);
|
|
83
|
+
font-weight: 400;
|
|
84
|
+
color: rgba(101, 101, 101, 1);
|
|
73
85
|
}
|
|
86
|
+
|
|
74
87
|
&-td {
|
|
75
88
|
border-right: 1px solid #EDEDED;
|
|
76
|
-
font-weight:400;
|
|
77
|
-
color:rgba(111,111,111,1);
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
color: rgba(111, 111, 111, 1);
|
|
91
|
+
|
|
78
92
|
&-main {
|
|
79
93
|
height: 28px;
|
|
80
|
-
background:rgba(238,238,238,0.5);
|
|
81
|
-
border:1px solid #f6f6f6;
|
|
94
|
+
background: rgba(238, 238, 238, 0.5);
|
|
95
|
+
border: 1px solid #f6f6f6;
|
|
82
96
|
}
|
|
83
97
|
}
|
|
98
|
+
|
|
84
99
|
&-td:last-of-type {
|
|
85
100
|
border: none;
|
|
86
101
|
}
|
|
87
102
|
}
|
|
103
|
+
|
|
88
104
|
&-chart {
|
|
89
105
|
&-td {
|
|
90
106
|
overflow: visible;
|
|
107
|
+
|
|
91
108
|
&-greyLine {
|
|
92
109
|
border-top: 1px dashed #D5D5D5;
|
|
93
110
|
}
|
|
111
|
+
|
|
94
112
|
&-main {
|
|
95
113
|
display: flex;
|
|
96
114
|
width: 100%;
|
|
97
115
|
height: 100%;
|
|
98
116
|
align-items: center;
|
|
99
117
|
justify-content: center;
|
|
100
|
-
|
|
118
|
+
|
|
119
|
+
&-left,
|
|
120
|
+
&-right {
|
|
101
121
|
height: 100%;
|
|
102
122
|
overflow: hidden;
|
|
103
123
|
}
|
|
124
|
+
|
|
104
125
|
&-right-auto {
|
|
105
126
|
height: 100%;
|
|
106
127
|
overflow: hidden;
|
|
107
128
|
flex: 1;
|
|
108
129
|
}
|
|
130
|
+
|
|
109
131
|
&-center {
|
|
110
132
|
height: 30px;
|
|
111
133
|
border-radius: 4px;
|
|
112
134
|
background: #f6f6f6;
|
|
113
135
|
z-index: 1;
|
|
114
136
|
min-width: 2px;
|
|
137
|
+
|
|
115
138
|
.ms-ellipsis {
|
|
116
139
|
border-radius: 4px;
|
|
117
140
|
height: 100%;
|
|
@@ -122,8 +145,10 @@
|
|
|
122
145
|
text-overflow: ellipsis;
|
|
123
146
|
overflow: hidden;
|
|
124
147
|
}
|
|
148
|
+
|
|
125
149
|
&-tooltip {
|
|
126
150
|
white-space: normal;
|
|
151
|
+
|
|
127
152
|
&-select {
|
|
128
153
|
height: 5px;
|
|
129
154
|
display: inline-block;
|
|
@@ -133,11 +158,12 @@
|
|
|
133
158
|
}
|
|
134
159
|
}
|
|
135
160
|
}
|
|
161
|
+
|
|
136
162
|
&-line {
|
|
137
163
|
width: 100%;
|
|
138
164
|
border-bottom: 1px solid #D5D5D5;
|
|
139
|
-
font-weight:400;
|
|
140
|
-
color:rgba(74,74,74,1);
|
|
165
|
+
font-weight: 400;
|
|
166
|
+
color: rgba(74, 74, 74, 1);
|
|
141
167
|
padding: 0 10px;
|
|
142
168
|
transform: translateY(15px);
|
|
143
169
|
text-align: left;
|
|
@@ -146,11 +172,13 @@
|
|
|
146
172
|
white-space: nowrap;
|
|
147
173
|
text-overflow: ellipsis;
|
|
148
174
|
overflow: hidden;
|
|
175
|
+
|
|
149
176
|
&-circle {
|
|
150
177
|
display: block;
|
|
151
178
|
width: 10px;
|
|
152
179
|
height: 100%;
|
|
153
180
|
min-width: 10px;
|
|
181
|
+
|
|
154
182
|
.circle {
|
|
155
183
|
display: block;
|
|
156
184
|
width: 10px;
|
|
@@ -161,15 +189,19 @@
|
|
|
161
189
|
background: #D5D5D5;
|
|
162
190
|
}
|
|
163
191
|
}
|
|
164
|
-
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
;
|
|
165
195
|
}
|
|
166
196
|
}
|
|
167
197
|
}
|
|
198
|
+
|
|
168
199
|
// 蓝色虚线
|
|
169
200
|
&-line-now {
|
|
170
201
|
z-index: 9;
|
|
171
202
|
text-align: center;
|
|
172
203
|
background: transparent;
|
|
204
|
+
|
|
173
205
|
&::before {
|
|
174
206
|
content: "";
|
|
175
207
|
border-left: 1px dashed @themeColor;
|
|
@@ -178,6 +210,7 @@
|
|
|
178
210
|
bottom: 0px;
|
|
179
211
|
z-index: 9;
|
|
180
212
|
}
|
|
213
|
+
|
|
181
214
|
&::after {
|
|
182
215
|
content: "";
|
|
183
216
|
width: 6px;
|
|
@@ -189,18 +222,21 @@
|
|
|
189
222
|
margin-left: -3px;
|
|
190
223
|
}
|
|
191
224
|
}
|
|
225
|
+
|
|
192
226
|
// 时间轴
|
|
193
227
|
&-timer {
|
|
194
228
|
align-items: center;
|
|
195
229
|
position: relative;
|
|
196
230
|
float: right;
|
|
197
231
|
overflow: hidden;
|
|
232
|
+
|
|
198
233
|
&-main {
|
|
199
234
|
overflow: auto;
|
|
200
235
|
flex: 1;
|
|
201
236
|
height: 100%;
|
|
202
237
|
position: relative;
|
|
203
238
|
}
|
|
239
|
+
|
|
204
240
|
&-bg {
|
|
205
241
|
position: absolute;
|
|
206
242
|
background: #F4F8FF;
|
|
@@ -209,6 +245,7 @@
|
|
|
209
245
|
height: 28px;
|
|
210
246
|
border-radius: 28px;
|
|
211
247
|
}
|
|
248
|
+
|
|
212
249
|
&-icon {
|
|
213
250
|
background: #F4F8FF;
|
|
214
251
|
color: #fff;
|
|
@@ -222,6 +259,11 @@
|
|
|
222
259
|
z-index: 2;
|
|
223
260
|
top: 0px;
|
|
224
261
|
background: #F2F8FF;
|
|
262
|
+
|
|
263
|
+
&:hover {
|
|
264
|
+
color: #fff;
|
|
265
|
+
}
|
|
266
|
+
|
|
225
267
|
i {
|
|
226
268
|
display: block;
|
|
227
269
|
width: 16px;
|
|
@@ -233,11 +275,13 @@
|
|
|
233
275
|
align-items: center;
|
|
234
276
|
justify-content: center;
|
|
235
277
|
}
|
|
278
|
+
|
|
236
279
|
&-left {
|
|
237
280
|
left: -1px;
|
|
238
281
|
border-top-left-radius: 28px;
|
|
239
282
|
border-bottom-left-radius: 28px;
|
|
240
283
|
}
|
|
284
|
+
|
|
241
285
|
&-right {
|
|
242
286
|
right: -1px;
|
|
243
287
|
border-top-right-radius: 28px;
|
|
@@ -245,20 +289,22 @@
|
|
|
245
289
|
}
|
|
246
290
|
}
|
|
247
291
|
}
|
|
292
|
+
|
|
248
293
|
// 区域映射
|
|
249
294
|
&-data {
|
|
250
295
|
flex: 1;
|
|
251
296
|
overflow: auto;
|
|
252
297
|
position: relative;
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
}
|
|
298
|
+
|
|
299
|
+
&-table {}
|
|
300
|
+
|
|
301
|
+
&-chart {}
|
|
302
|
+
|
|
257
303
|
&::-webkit-scrollbar {
|
|
258
304
|
height: 0px;
|
|
259
305
|
}
|
|
260
306
|
}
|
|
261
|
-
|
|
307
|
+
|
|
262
308
|
// table 列表映射
|
|
263
309
|
&-tabledata {
|
|
264
310
|
overflow-y: auto;
|