bri-components 1.4.11 → 1.4.13
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/base/BriUpload/uploadList.vue +12 -3
- package/src/components/controls/mixins/controlMixin.js +2 -2
- package/src/components/list/DshCascaderTable.vue +2 -8
- package/src/components/list/DshFlatTable.vue +3 -3
- package/src/components/list/DshTreeTable.vue +3 -3
- package/src/components/list/mixins/DshCascaderTableMixin.js +10 -0
- package/src/components/list/mixins/DshFlatTableMixin.js +1 -1
- package/src/components/list/mixins/tableBaseMixin.js +9 -1
package/package.json
CHANGED
|
@@ -433,9 +433,18 @@
|
|
|
433
433
|
}
|
|
434
434
|
},
|
|
435
435
|
getBtns (fileItem) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
if (["image", "application/pdf", "text/plain"].some(type => fileItem.mimetype.includes(type)) ||
|
|
437
|
+
fileItem.mimetype.includes("wordprocessingml.document") ||
|
|
438
|
+
fileItem.mimetype.includes("application/msword") ||
|
|
439
|
+
fileItem.mimetype.includes("presentationml.presentation") ||
|
|
440
|
+
fileItem.mimetype.includes("application/vnd.ms-powerpoint") ||
|
|
441
|
+
fileItem.mimetype.includes("spreadsheetml.sheet"))
|
|
442
|
+
{
|
|
443
|
+
return undefined;
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
["canDelete", "canEdit", "canDownload"];
|
|
447
|
+
}
|
|
439
448
|
}
|
|
440
449
|
}
|
|
441
450
|
};
|
|
@@ -99,11 +99,11 @@ export default {
|
|
|
99
99
|
const selectControlTypes = ["coordinates", "date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "users", "departments", "reference"];
|
|
100
100
|
return {
|
|
101
101
|
// TODO: 此处的请输入可能还有请选择之类的,待处理
|
|
102
|
-
_placeholder: this.canEdit && this.propsObj._enterType !== "calculate"
|
|
102
|
+
_placeholder: this.canEdit && this.propsObj._enterType !== "calculate" && this.propsObj._disabled !== true
|
|
103
103
|
? (this.propsObj._placeholder || `${selectControlTypes.includes(this.controlType) ? "选择" : "输入"}${this.propsObj._name}`)
|
|
104
104
|
: undefined,
|
|
105
105
|
_clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable),
|
|
106
|
-
_disabled: this.propsObj._disabled ||
|
|
106
|
+
_disabled: this.propsObj._disabled || !this.finalCanEdit
|
|
107
107
|
};
|
|
108
108
|
},
|
|
109
109
|
// 是否为多选模式
|
|
@@ -53,13 +53,7 @@
|
|
|
53
53
|
<dsh-render :render="topSearchRender"></dsh-render>
|
|
54
54
|
|
|
55
55
|
<div class="DshCasTable-fullscreen-inner-main DshCasTable-main">
|
|
56
|
-
<div
|
|
57
|
-
class="DshCasTable-main-center"
|
|
58
|
-
:style="{
|
|
59
|
-
maxHeight: `${contentHeight}px`,
|
|
60
|
-
height: `${contentHeight}px`
|
|
61
|
-
}"
|
|
62
|
-
>
|
|
56
|
+
<div class="DshCasTable-main-center">
|
|
63
57
|
<!-- 表头 -->
|
|
64
58
|
<dsh-render :render="tableHeadRender"></dsh-render>
|
|
65
59
|
|
|
@@ -158,7 +152,7 @@
|
|
|
158
152
|
|
|
159
153
|
&-main {
|
|
160
154
|
flex: 1;
|
|
161
|
-
min-
|
|
155
|
+
min-height: 0px;
|
|
162
156
|
}
|
|
163
157
|
}
|
|
164
158
|
}
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
:columns="showColumns"
|
|
104
104
|
:data="renderedListData"
|
|
105
105
|
:footer-data="footerData"
|
|
106
|
-
:propsObj="
|
|
106
|
+
:propsObj="tableInModalPropsObj"
|
|
107
107
|
@changeSelect="changeSelect"
|
|
108
108
|
@selectAll="changeSelect"
|
|
109
109
|
></bri-table>
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
:columns="showColumns"
|
|
114
114
|
:data="showListData"
|
|
115
115
|
:footer-data="footerData"
|
|
116
|
-
:propsObj="
|
|
116
|
+
:propsObj="tableInModalPropsObj"
|
|
117
117
|
@changeSelect="changeSelect"
|
|
118
118
|
@selectAll="changeSelect"
|
|
119
119
|
></bri-table>
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
|
|
227
227
|
&-main {
|
|
228
228
|
flex: 1;
|
|
229
|
-
min-
|
|
229
|
+
min-height: 0px;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
:columns="showColumns"
|
|
63
63
|
:data="renderedListData"
|
|
64
64
|
:footer-data="footerData"
|
|
65
|
-
:propsObj="
|
|
65
|
+
:propsObj="tableInModalPropsObj"
|
|
66
66
|
@changeSelect="changeSelect"
|
|
67
67
|
@selectAll="changeSelect"
|
|
68
68
|
></bri-table>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:columns="showColumns"
|
|
73
73
|
:data="showListData"
|
|
74
74
|
:footer-data="footerData"
|
|
75
|
-
:propsObj="
|
|
75
|
+
:propsObj="tableInModalPropsObj"
|
|
76
76
|
@changeSelect="changeSelect"
|
|
77
77
|
@selectAll="changeSelect"
|
|
78
78
|
></bri-table>
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
&-main {
|
|
127
127
|
flex: 1;
|
|
128
|
-
min-
|
|
128
|
+
min-height: 0px;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -73,6 +73,16 @@ export default {
|
|
|
73
73
|
// this.$set(treeFormItem, "canDelete", true);
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
|
+
// 点开模态框后处理 -表头跟着内容行滚动
|
|
77
|
+
dealingOpenModal () {
|
|
78
|
+
if (this.isEnlargeFlag) {
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
document.querySelector(".DshCasTable-fullscreen-inner-main .DshCasTable-main-center-list").addEventListener("scroll", (e) => {
|
|
81
|
+
document.querySelector(".DshCasTable-fullscreen-inner-main .DshCasTable-main-center-top").scrollLeft = e.srcElement.scrollLeft;
|
|
82
|
+
}, false);
|
|
83
|
+
}, 0);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
76
86
|
|
|
77
87
|
/* ----------- 渲染函数(声明:为了代码更加规范清晰,return的是h相关的函数,则函数名get开头;return的是h的直接调用,函数名不要get开头)---------- */
|
|
78
88
|
// 表格表头渲染函数
|
|
@@ -282,7 +282,7 @@ export default {
|
|
|
282
282
|
},
|
|
283
283
|
changeVal (operationItem, row, rowIndex, column, params) {
|
|
284
284
|
this.$set(this.ruleRecordMap, this.getMixKey(row, column), { showRuleMessage: true });
|
|
285
|
-
if (!["text", "textarea", "idcard", "email", "phone", "url", "password"
|
|
285
|
+
if (!["text", "textarea", "idcard", "email", "phone", "url", "password"].includes(column._key)) {
|
|
286
286
|
this.dealSameRowsVal({ row, rowIndex, column });
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
showImportModal: false,
|
|
103
103
|
exportTimer: null,
|
|
104
104
|
isEnlarge: false,
|
|
105
|
-
isEnlargeFlag:
|
|
105
|
+
isEnlargeFlag: false, // 为重渲染膜态框内容而用
|
|
106
106
|
|
|
107
107
|
baseOperationMap: {
|
|
108
108
|
canCreate: {
|
|
@@ -565,6 +565,12 @@ export default {
|
|
|
565
565
|
}
|
|
566
566
|
};
|
|
567
567
|
},
|
|
568
|
+
tableInModalPropsObj () {
|
|
569
|
+
return {
|
|
570
|
+
...this.tablePropsObj,
|
|
571
|
+
maxHeight: undefined
|
|
572
|
+
};
|
|
573
|
+
},
|
|
568
574
|
|
|
569
575
|
hideColKeys () {
|
|
570
576
|
return this.selfPropsObj._hideColKeys;
|
|
@@ -712,6 +718,7 @@ export default {
|
|
|
712
718
|
isEnlarge (bool) {
|
|
713
719
|
setTimeout(() => {
|
|
714
720
|
this.isEnlargeFlag = bool;
|
|
721
|
+
this.dealingOpenModal && this.dealingOpenModal();
|
|
715
722
|
}, 0);
|
|
716
723
|
}
|
|
717
724
|
},
|
|
@@ -1417,6 +1424,7 @@ export default {
|
|
|
1417
1424
|
!(["cascaderTable"].includes(this.controlType) && ["level", "children"].includes(column._key)) && // 层级表格的固定字段不可编辑
|
|
1418
1425
|
column._enterType !== "calculate" && // 计算的不可编辑
|
|
1419
1426
|
column._readonly !== true && // 只读
|
|
1427
|
+
column._disabled !== true && // 只读
|
|
1420
1428
|
column.canEdit !== false; // 字段本身编辑权限 考虑为undefined时候
|
|
1421
1429
|
},
|
|
1422
1430
|
|