bri-components 1.4.34 → 1.4.36
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/DshCoordinates.vue +0 -7
- package/src/components/controls/mixins/cascaderMixin.js +0 -4
- package/src/components/controls/mixins/controlMixin.js +30 -2
- package/src/components/controls/mixins/selectMixin.js +0 -4
- package/src/components/controls/mixins/userAndDepartMixin.js +0 -10
- package/src/components/controls/senior/BriLabels.vue +0 -4
- package/src/components/controls/senior/cascaderTable.vue +90 -11
- package/src/components/controls/senior/flatTable.vue +65 -10
- package/src/components/list/DshCascaderTable.vue +1 -0
- package/src/components/list/DshFlatTable.vue +1 -0
- package/src/components/list/DshTreeTable.vue +1 -0
- package/src/components/list/mixins/tableBaseMixin.js +2 -2
package/package.json
CHANGED
|
@@ -54,6 +54,7 @@ export default {
|
|
|
54
54
|
data () {
|
|
55
55
|
return {
|
|
56
56
|
showModal: false,
|
|
57
|
+
showUnitModal: false,
|
|
57
58
|
|
|
58
59
|
tagStyle: {
|
|
59
60
|
display: "inline-block",
|
|
@@ -75,6 +76,12 @@ export default {
|
|
|
75
76
|
typeInfoData () {
|
|
76
77
|
return this.$modFieldMap[this.controlType] || {};
|
|
77
78
|
},
|
|
79
|
+
unitModalPropsObj () {
|
|
80
|
+
return {
|
|
81
|
+
mode: "fullscreen",
|
|
82
|
+
title: this.controlName
|
|
83
|
+
};
|
|
84
|
+
},
|
|
78
85
|
|
|
79
86
|
/* ----- 基本 ----- */
|
|
80
87
|
finalCanEdit () {
|
|
@@ -110,7 +117,7 @@ export default {
|
|
|
110
117
|
multipleMode () {
|
|
111
118
|
return this.isOnDftSearch || this.isOnSearch
|
|
112
119
|
? true
|
|
113
|
-
: ["checkbox", "regions", "cascaders"].includes(this.controlType)
|
|
120
|
+
: ["checkbox", "regions", "cascaders", "labels", "refCheckbox"].includes(this.controlType)
|
|
114
121
|
? true
|
|
115
122
|
: !!this.selfPropsObj && !!this.selfPropsObj._multiple;
|
|
116
123
|
},
|
|
@@ -122,7 +129,7 @@ export default {
|
|
|
122
129
|
},
|
|
123
130
|
// 是否为tag显示
|
|
124
131
|
isTagShow () {
|
|
125
|
-
return ["
|
|
132
|
+
return ["switch", "select", "checkbox", "regions", "cascaders", "users", "departments", "labels", "refSelect", "refCheckbox"].includes(this.controlType);
|
|
126
133
|
},
|
|
127
134
|
|
|
128
135
|
/* ----- 表单相关 ----- */
|
|
@@ -325,6 +332,21 @@ export default {
|
|
|
325
332
|
this.openModal();
|
|
326
333
|
}
|
|
327
334
|
},
|
|
335
|
+
// 点击清除
|
|
336
|
+
clickClear () {
|
|
337
|
+
if (this.controlType === "coordinates") {
|
|
338
|
+
this.curVal = {
|
|
339
|
+
name: "",
|
|
340
|
+
lnglat: []
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
else if (this.typeInfoData.dataType === "array" || this.multipleMode) {
|
|
344
|
+
this.curValList = [];
|
|
345
|
+
} else {
|
|
346
|
+
this.curVal = "";
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
|
|
328
350
|
/* ----- 工具方法 ------- */
|
|
329
351
|
// 切换弹框
|
|
330
352
|
toggleModal (bool) {
|
|
@@ -337,6 +359,12 @@ export default {
|
|
|
337
359
|
// 关闭弹框 ---!!!!pc端的selectUsers、selectDepartments控件,外部调用组件时也在使用,不能轻易删除
|
|
338
360
|
closeModal () {
|
|
339
361
|
this.showModal = false;
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
// 单元格展示 -打开列表模态框
|
|
365
|
+
openUnitModal (event) {
|
|
366
|
+
this.showUnitModal = true;
|
|
367
|
+
event.stopPropagation();
|
|
340
368
|
}
|
|
341
369
|
}
|
|
342
370
|
};
|
|
@@ -110,20 +110,10 @@ export default {
|
|
|
110
110
|
},
|
|
111
111
|
created () { },
|
|
112
112
|
methods: {
|
|
113
|
-
// 点击输入框 打开选择模态框
|
|
114
|
-
clickInput () {
|
|
115
|
-
if (!this.disabled) {
|
|
116
|
-
this.openModal();
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
113
|
// 点击删除某项
|
|
120
114
|
clickDeleteItem (selectItem) {
|
|
121
115
|
this.curValList = this.curValList.filter(item => item._key !== selectItem._key);
|
|
122
116
|
},
|
|
123
|
-
// 点击清除选择项
|
|
124
|
-
clickClear () {
|
|
125
|
-
this.curValList = [];
|
|
126
|
-
},
|
|
127
117
|
clickItem (item, index) {
|
|
128
118
|
this.itemTipRender = this.getItemTipRender(item, index);
|
|
129
119
|
},
|
|
@@ -1,17 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cascaderTable">
|
|
3
|
-
<!--
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
<!-- 查看 单元格内 -->
|
|
4
|
+
<template v-if="isUnitShow">
|
|
5
|
+
<span
|
|
6
|
+
class="cascaderTable-unit"
|
|
7
|
+
@click.stop="openUnitModal"
|
|
8
|
+
>
|
|
9
|
+
<dsh-icons :list="[{
|
|
10
|
+
customIcon: 'bico-Cascadetable'
|
|
11
|
+
}]"></dsh-icons>
|
|
12
|
+
<span class="cascaderTable-unit-text">
|
|
13
|
+
{{ showVal }}
|
|
14
|
+
</span>
|
|
13
15
|
</span>
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
<dsh-modal
|
|
18
|
+
class="cascaderTable-unit-fullscreen"
|
|
19
|
+
v-model="showUnitModal"
|
|
20
|
+
:mode="unitModalPropsObj.mode"
|
|
21
|
+
:propsObj="unitModalPropsObj"
|
|
22
|
+
@click.stop="0"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
v-if="showUnitModal"
|
|
26
|
+
class="cascaderTable-unit-fullscreen-inner"
|
|
27
|
+
>
|
|
28
|
+
<!-- 老版级联表格 -->
|
|
29
|
+
<dsh-cascader-table
|
|
30
|
+
v-if="subType === 'old'"
|
|
31
|
+
:canEdit="false"
|
|
32
|
+
:tableDataObj="curVal"
|
|
33
|
+
:data="curVal.tree"
|
|
34
|
+
:rowDefault="curVal.rowDefault"
|
|
35
|
+
:columns="subForm"
|
|
36
|
+
:propsObj="{
|
|
37
|
+
...selfPropsObj,
|
|
38
|
+
_useEnlarge: false
|
|
39
|
+
}"
|
|
40
|
+
:allFormList="allFormList"
|
|
41
|
+
:parentObj="value"
|
|
42
|
+
:treeColumns="treeForm"
|
|
43
|
+
></dsh-cascader-table>
|
|
44
|
+
|
|
45
|
+
<!-- 横向层级表格 -->
|
|
46
|
+
<div v-else-if="subType === 'cross'">
|
|
47
|
+
横向层级表格还未开发……
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- 层级表格 -->
|
|
51
|
+
<dsh-tree-table
|
|
52
|
+
v-else
|
|
53
|
+
:canEdit="false"
|
|
54
|
+
:tableDataObj="curVal"
|
|
55
|
+
:data="curVal.tree"
|
|
56
|
+
:rowDefault="curVal.rowDefault"
|
|
57
|
+
:columns="subForm"
|
|
58
|
+
:propsObj="{
|
|
59
|
+
...selfPropsObj,
|
|
60
|
+
_useEnlarge: false
|
|
61
|
+
}"
|
|
62
|
+
:allFormList="allFormList"
|
|
63
|
+
:parentObj="value"
|
|
64
|
+
></dsh-tree-table>
|
|
65
|
+
</div>
|
|
66
|
+
</dsh-modal>
|
|
67
|
+
</template>
|
|
15
68
|
|
|
16
69
|
<template v-else>
|
|
17
70
|
<!-- 配置端 设置默认值用-->
|
|
@@ -194,6 +247,11 @@
|
|
|
194
247
|
return this.$isAdvSearching(this.finalTableAdvSearch);
|
|
195
248
|
},
|
|
196
249
|
|
|
250
|
+
curVal () {
|
|
251
|
+
return this.value[this.controlKey] || {
|
|
252
|
+
tree: []
|
|
253
|
+
};
|
|
254
|
+
},
|
|
197
255
|
showVal () {
|
|
198
256
|
return `${
|
|
199
257
|
this.curVal
|
|
@@ -235,6 +293,27 @@
|
|
|
235
293
|
&-text {
|
|
236
294
|
|
|
237
295
|
}
|
|
296
|
+
|
|
297
|
+
&-fullscreen {
|
|
298
|
+
&-inner {
|
|
299
|
+
width: 100%;
|
|
300
|
+
height: 100%;
|
|
301
|
+
padding: 10px 20px;
|
|
302
|
+
|
|
303
|
+
.DshCasTable,
|
|
304
|
+
.DshTreeTable {
|
|
305
|
+
width: 100%;
|
|
306
|
+
height: 100%;
|
|
307
|
+
display: flex;
|
|
308
|
+
flex-direction: column;
|
|
309
|
+
|
|
310
|
+
&-main {
|
|
311
|
+
flex: 1;
|
|
312
|
+
min-height: 0px;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
238
317
|
}
|
|
239
318
|
}
|
|
240
319
|
</style>
|
|
@@ -1,17 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flatTable">
|
|
3
3
|
<!-- 查看 单元格内 -->
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
<template v-if="isUnitShow">
|
|
5
|
+
<span
|
|
6
|
+
class="flatTable-unit"
|
|
7
|
+
@click.stop="openUnitModal"
|
|
8
|
+
>
|
|
9
|
+
<dsh-icons :list="[{
|
|
10
|
+
customIcon: 'bico-internaltable'
|
|
11
|
+
}]"></dsh-icons>
|
|
12
|
+
<span class="flatTable-unit-text">
|
|
13
|
+
{{ showVal }}
|
|
14
|
+
</span>
|
|
13
15
|
</span>
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
<dsh-modal
|
|
18
|
+
class="flatTable-unit-fullscreen"
|
|
19
|
+
v-model="showUnitModal"
|
|
20
|
+
:mode="unitModalPropsObj.mode"
|
|
21
|
+
:propsObj="unitModalPropsObj"
|
|
22
|
+
@click.stop="0"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
v-if="showUnitModal"
|
|
26
|
+
class="flatTable-unit-fullscreen-inner"
|
|
27
|
+
>
|
|
28
|
+
<dsh-flat-table
|
|
29
|
+
:canEdit="false"
|
|
30
|
+
:tableDataObj="curVal"
|
|
31
|
+
:data="curVal.list"
|
|
32
|
+
:rowDefault="curVal.rowDefault"
|
|
33
|
+
:compareData="curVal.oldList"
|
|
34
|
+
:columns="subForm"
|
|
35
|
+
:propsObj="{
|
|
36
|
+
...propsObj,
|
|
37
|
+
_useEnlarge: false
|
|
38
|
+
}"
|
|
39
|
+
:allFormList="allFormList"
|
|
40
|
+
:parentObj="value"
|
|
41
|
+
></dsh-flat-table>
|
|
42
|
+
</div>
|
|
43
|
+
</dsh-modal>
|
|
44
|
+
</template>
|
|
15
45
|
|
|
16
46
|
<!-- 编辑、查看(查看页内) -->
|
|
17
47
|
<template v-else>
|
|
@@ -135,6 +165,11 @@
|
|
|
135
165
|
return this.$isAdvSearching(this.finalTableAdvSearch);
|
|
136
166
|
},
|
|
137
167
|
|
|
168
|
+
curVal () {
|
|
169
|
+
return this.value[this.controlKey] || {
|
|
170
|
+
list: []
|
|
171
|
+
};
|
|
172
|
+
},
|
|
138
173
|
showVal () {
|
|
139
174
|
return `${
|
|
140
175
|
this.curVal
|
|
@@ -171,6 +206,26 @@
|
|
|
171
206
|
&-text {
|
|
172
207
|
|
|
173
208
|
}
|
|
209
|
+
|
|
210
|
+
&-fullscreen {
|
|
211
|
+
&-inner {
|
|
212
|
+
width: 100%;
|
|
213
|
+
height: 100%;
|
|
214
|
+
padding: 10px 20px;
|
|
215
|
+
|
|
216
|
+
.DshFlatTable {
|
|
217
|
+
width: 100%;
|
|
218
|
+
height: 100%;
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-direction: column;
|
|
221
|
+
|
|
222
|
+
&-main {
|
|
223
|
+
flex: 1;
|
|
224
|
+
min-height: 0px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
174
229
|
}
|
|
175
230
|
}
|
|
176
231
|
</style>
|
|
@@ -1135,7 +1135,7 @@ export default {
|
|
|
1135
1135
|
e.stopPropagation();
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
|
-
|
|
1138
|
+
});
|
|
1139
1139
|
},
|
|
1140
1140
|
topSearchRender (h) {
|
|
1141
1141
|
return this.searchFormList.length
|
|
@@ -1425,7 +1425,7 @@ export default {
|
|
|
1425
1425
|
getRowDelBtnCanEdit (row, rowIndex) {
|
|
1426
1426
|
return row.__readonly__ !== true && // 不能为只读数据
|
|
1427
1427
|
(this.disabledDeleteDftRow ? row.__isDefault__ !== true : true) && // 默认数据可删除
|
|
1428
|
-
|
|
1428
|
+
(this.disabledDeleteOldRow ? row.__old__ !== true : true); // 老数据可删除
|
|
1429
1429
|
},
|
|
1430
1430
|
// 行内容是否可编辑
|
|
1431
1431
|
getRowCanEdit (row, rowIndex) {
|