bri-components 1.1.1 → 1.1.2
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -1
- package/lib/8.bri-components.min.js +1 -1
- package/lib/9.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +6 -6
- package/package.json +1 -1
- package/src/components/controls/base/BriLabels.vue +49 -13
- package/src/components/controls/base/DshCoordinates.vue +7 -4
- package/src/components/controls/base/DshEditor.vue +16 -5
- package/src/components/controls/base/DshInput.vue +7 -0
- package/src/components/controls/controlMap.js +2 -2
- package/src/components/controls/controlMixin.js +39 -25
- package/src/components/controls/senior/cascaderTable.vue +47 -41
- package/src/components/form/DshForm.vue +4 -17
- package/src/components/list/BriFlatTable.vue +4 -6
- package/src/components/list/BriTable.vue +10 -4
- package/src/components/list/DshBox/DshSingleData.vue +0 -7
- package/src/components/list/DshCascaderTable.vue +3 -4
- package/src/components/list/ZTree.vue +1 -1
- package/src/components/other/ZLoading.vue +32 -3
- package/src/components/small/BriDrawer.vue +132 -0
- package/src/components/small/DshButtons.vue +3 -3
- package/src/components/small/DshModal.vue +25 -1
- package/src/components/unit/DshFormItem.vue +40 -41
- package/src/components/unit/DshUnit.vue +15 -8
- package/src/components/unit/unitMixin.js +0 -8
- package/src/index.js +7 -4
- package/src/styles/common/box.less +29 -0
- package/src/styles/common/control.less +1 -0
- package/src/styles/components/controls/BriLabels.less +32 -18
- package/src/styles/components/controls/DshCascader.less +7 -3
- package/src/styles/components/controls/DshLabels.less +3 -3
- package/src/styles/components/index.less +1 -1
- package/src/styles/components/other/InfoCascader.less +4 -0
- package/src/styles/components/other/ZLoading.less +23 -7
- package/src/styles/components/small/BriDrawer.less +34 -0
- package/src/styles/components/small/DshControlDefine.less +2 -1
- package/src/styles/components/small/DshDropdown.less +11 -8
- package/src/styles/components/small/DshTitle.less +1 -1
- package/src/styles/components/unit/DshFormItem.less +6 -4
- package/src/styles/plugin/iview.less +7 -3
- package/src/styles/reset.less +2 -2
- package/src/utils/table.js +3 -4
package/package.json
CHANGED
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
14
|
:class="{
|
|
15
|
+
'control-edit': true,
|
|
15
16
|
'BriLabels-dropdown-show':true,
|
|
16
17
|
'BriLabels-dropdown-show-active':listVisible
|
|
17
18
|
}"
|
|
18
19
|
@click="clickInput"
|
|
19
20
|
>
|
|
20
|
-
<div>
|
|
21
|
+
<div class="BriLabels-dropdown-show-list">
|
|
21
22
|
<Tag
|
|
22
23
|
v-for="item in val"
|
|
23
24
|
:key="item._key"
|
|
@@ -51,14 +52,16 @@
|
|
|
51
52
|
{{item.name}}
|
|
52
53
|
<span class="BriLabels-dropdown-item-show-icons">
|
|
53
54
|
<Icon
|
|
55
|
+
v-if="!item.coreLabel"
|
|
54
56
|
class="BriLabels-dropdown-item-show-icons-edit"
|
|
55
57
|
custom="bri bri-bianji"
|
|
56
58
|
@click.stop="clickEdit(item)"
|
|
57
59
|
/>
|
|
58
|
-
|
|
60
|
+
<!-- 暂时不需要删除 -->
|
|
61
|
+
<!-- <Icon
|
|
59
62
|
class="BriLabels-dropdown-item-show-icons-del"
|
|
60
63
|
custom="bri bri-shanchu"
|
|
61
|
-
/>
|
|
64
|
+
/> -->
|
|
62
65
|
</span>
|
|
63
66
|
</div>
|
|
64
67
|
<div
|
|
@@ -79,7 +82,18 @@
|
|
|
79
82
|
</Input>
|
|
80
83
|
</div>
|
|
81
84
|
</DropdownItem>
|
|
82
|
-
|
|
85
|
+
<div class="BriLabels-dropdown-btnWrap">
|
|
86
|
+
<bri-button
|
|
87
|
+
class="BriLabels-dropdown-add"
|
|
88
|
+
:propsObj="{
|
|
89
|
+
btnType: 'default',
|
|
90
|
+
icon:'md-add'
|
|
91
|
+
}"
|
|
92
|
+
@click="addLabel"
|
|
93
|
+
>
|
|
94
|
+
添加选项
|
|
95
|
+
</bri-button>
|
|
96
|
+
</div>
|
|
83
97
|
</DropdownMenu>
|
|
84
98
|
</template>
|
|
85
99
|
</Dropdown>
|
|
@@ -89,14 +103,23 @@
|
|
|
89
103
|
class="BriLabels-view"
|
|
90
104
|
>
|
|
91
105
|
<template v-if="val.length">
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
:
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
<Ctooltip
|
|
107
|
+
placement="top"
|
|
108
|
+
:transfer="true"
|
|
109
|
+
maxWidth="200"
|
|
110
|
+
:content="showValStr"
|
|
97
111
|
>
|
|
98
|
-
|
|
99
|
-
|
|
112
|
+
<div class="dsh-ellipsis">
|
|
113
|
+
<div
|
|
114
|
+
v-for="item in val"
|
|
115
|
+
:key="item._key"
|
|
116
|
+
size="medium"
|
|
117
|
+
class="BriLabels-view-item"
|
|
118
|
+
>
|
|
119
|
+
{{ item.name }}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</Ctooltip>
|
|
100
123
|
</template>
|
|
101
124
|
|
|
102
125
|
<div
|
|
@@ -124,7 +147,8 @@
|
|
|
124
147
|
return {
|
|
125
148
|
listData: [],
|
|
126
149
|
listVisible: false,
|
|
127
|
-
inputIcon: "ios-arrow-down"
|
|
150
|
+
inputIcon: "ios-arrow-down",
|
|
151
|
+
renderList: false
|
|
128
152
|
};
|
|
129
153
|
},
|
|
130
154
|
computed: {
|
|
@@ -151,7 +175,6 @@
|
|
|
151
175
|
}
|
|
152
176
|
},
|
|
153
177
|
created () {
|
|
154
|
-
this.init();
|
|
155
178
|
},
|
|
156
179
|
methods: {
|
|
157
180
|
init () {
|
|
@@ -188,6 +211,10 @@
|
|
|
188
211
|
},
|
|
189
212
|
clickInput () {
|
|
190
213
|
if (!this.finalCanEdit) return;
|
|
214
|
+
if (!this.renderList) {
|
|
215
|
+
this.init();
|
|
216
|
+
}
|
|
217
|
+
this.renderList = true;
|
|
191
218
|
this.listVisible = !this.listVisible;
|
|
192
219
|
if (this.listVisible) {
|
|
193
220
|
this.inputIcon = "ios-arrow-up";
|
|
@@ -210,11 +237,20 @@
|
|
|
210
237
|
e.stopPropagation();
|
|
211
238
|
},
|
|
212
239
|
confirmEdit (item) {
|
|
240
|
+
if (item.name == "") return;
|
|
213
241
|
item.isEdit = false;
|
|
214
242
|
this.$forceUpdate();
|
|
215
243
|
},
|
|
216
244
|
handleCancel (item) {
|
|
217
245
|
this.val = this.val.filter(i => i._key != item._key);
|
|
246
|
+
},
|
|
247
|
+
addLabel () {
|
|
248
|
+
this.listData.push({
|
|
249
|
+
_key: this.$randomB36("Labels"),
|
|
250
|
+
isEdit: true,
|
|
251
|
+
name: "",
|
|
252
|
+
labelType: this.selfPropsObj._labelType
|
|
253
|
+
});
|
|
218
254
|
}
|
|
219
255
|
},
|
|
220
256
|
watch: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshCoordinates">
|
|
3
3
|
<Ctooltip
|
|
4
|
+
:content="curValName"
|
|
4
5
|
placement="top"
|
|
5
6
|
:transfer="true"
|
|
6
7
|
maxWidth="200"
|
|
7
|
-
:content="currentVal"
|
|
8
8
|
>
|
|
9
9
|
<!-- 编辑模式 -->
|
|
10
10
|
<div
|
|
@@ -37,10 +37,13 @@
|
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
39
|
<!-- 查看模式 -->
|
|
40
|
-
<span
|
|
40
|
+
<span
|
|
41
|
+
v-else
|
|
42
|
+
:class="{
|
|
41
43
|
...commonClass,
|
|
42
44
|
'DshCoordinates-show': !isUnit
|
|
43
|
-
}"
|
|
45
|
+
}"
|
|
46
|
+
>
|
|
44
47
|
{{ showText }}
|
|
45
48
|
</span>
|
|
46
49
|
</Ctooltip>
|
|
@@ -178,7 +181,7 @@
|
|
|
178
181
|
this.value[this.controlKey] = val;
|
|
179
182
|
}
|
|
180
183
|
},
|
|
181
|
-
|
|
184
|
+
curValName () {
|
|
182
185
|
return this.curVal && this.curVal.name;
|
|
183
186
|
},
|
|
184
187
|
curLnglat: {
|
|
@@ -2,24 +2,34 @@
|
|
|
2
2
|
<div class="DshEditor">
|
|
3
3
|
<!-- 有值、无值 可编辑 -->
|
|
4
4
|
<template v-if="isUnit">
|
|
5
|
-
<div
|
|
5
|
+
<div
|
|
6
|
+
v-if="value[controlKey]"
|
|
7
|
+
class="DshEditor-unit"
|
|
8
|
+
>
|
|
6
9
|
<span class="DshEditor-unit-text">
|
|
7
10
|
富文本
|
|
8
11
|
</span>
|
|
9
12
|
</div>
|
|
10
|
-
<span
|
|
13
|
+
<span
|
|
14
|
+
v-else
|
|
15
|
+
class="control-notext"
|
|
16
|
+
>
|
|
11
17
|
-
|
|
12
18
|
</span>
|
|
13
19
|
</template>
|
|
14
20
|
|
|
15
21
|
<template v-else-if="finalCanEdit">
|
|
16
|
-
<div
|
|
22
|
+
<div
|
|
23
|
+
class="DshEditor-show DshEditor-edit"
|
|
17
24
|
:class="value[controlKey] ? '': 'DshEditor-edit-placeholder'"
|
|
18
25
|
v-show="showType === 'show'"
|
|
19
26
|
v-html="editVal"
|
|
20
27
|
@click="handleEdit"
|
|
21
28
|
></div>
|
|
22
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
v-show="showType=='edit'"
|
|
31
|
+
class="DshEditor-wrap"
|
|
32
|
+
>
|
|
23
33
|
<div
|
|
24
34
|
ref="toolbar"
|
|
25
35
|
class="toolbar"
|
|
@@ -37,7 +47,8 @@
|
|
|
37
47
|
</div>
|
|
38
48
|
</template>
|
|
39
49
|
|
|
40
|
-
<div
|
|
50
|
+
<div
|
|
51
|
+
v-else
|
|
41
52
|
class="DshEditor-show"
|
|
42
53
|
:class="$isDisabled(canEdit, selfPropsObj) ? 'DshEditor-show-disabled' : value[controlKey] ? '' : 'DshEditor-show-nodata'"
|
|
43
54
|
v-show="showType === 'show'"
|
|
@@ -32,6 +32,13 @@
|
|
|
32
32
|
slot="append"
|
|
33
33
|
>{{ selfPropsObj._append }}</span>
|
|
34
34
|
</Input>
|
|
35
|
+
<!-- textarea特殊处理 -->
|
|
36
|
+
<p
|
|
37
|
+
v-else-if="subType === 'textarea' && showVal"
|
|
38
|
+
:class="['control-show-text', 'DshInput-textarea-show']"
|
|
39
|
+
v-text="showVal"
|
|
40
|
+
>
|
|
41
|
+
</p>
|
|
35
42
|
|
|
36
43
|
<!-- 查看模式 -->
|
|
37
44
|
<control-show
|
|
@@ -33,7 +33,7 @@ const componentNameMap = {
|
|
|
33
33
|
coordinates: "DshCoordinates",
|
|
34
34
|
editor: "DshEditor",
|
|
35
35
|
tag: "DshDivider",
|
|
36
|
-
labels: "
|
|
36
|
+
labels: "BriLabels",
|
|
37
37
|
package: "DshPackage",
|
|
38
38
|
flatTable: "flatTable",
|
|
39
39
|
cascaderTable: "cascaderTable",
|
|
@@ -62,7 +62,7 @@ const pathMap = {
|
|
|
62
62
|
DshCoordinates: "./base/DshCoordinates.vue",
|
|
63
63
|
DshEditor: "./base/DshEditor.vue",
|
|
64
64
|
DshDivider: "./base/DshDivider.vue",
|
|
65
|
-
|
|
65
|
+
BriLabels: "./base/BriLabels.vue",
|
|
66
66
|
DshPackage: "./base/DshPackage.vue",
|
|
67
67
|
flatTable: "./senior/flatTable.vue",
|
|
68
68
|
cascaderTable: "./senior/cascaderTable",
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
canEdit: {
|
|
4
|
-
type: Boolean,
|
|
5
|
-
default: true
|
|
6
|
-
},
|
|
7
3
|
value: {
|
|
8
4
|
type: Object,
|
|
9
5
|
default () {
|
|
@@ -16,33 +12,37 @@ export default {
|
|
|
16
12
|
return {};
|
|
17
13
|
}
|
|
18
14
|
},
|
|
15
|
+
|
|
16
|
+
/* 表单形式用到的 */
|
|
17
|
+
canEdit: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true
|
|
20
|
+
},
|
|
21
|
+
/* 列表形式用到的 */
|
|
19
22
|
isUnit: {
|
|
20
23
|
type: Boolean,
|
|
21
24
|
default: false
|
|
25
|
+
},
|
|
26
|
+
parentData: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default () {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
},
|
|
24
33
|
data () {
|
|
25
34
|
return {};
|
|
26
35
|
},
|
|
27
36
|
computed: {
|
|
28
|
-
compKey () {
|
|
29
|
-
return this.propsObj.compKey;
|
|
30
|
-
},
|
|
31
|
-
appKey () {
|
|
32
|
-
return this.propsObj.appKey;
|
|
33
|
-
},
|
|
34
|
-
entityKey () {
|
|
35
|
-
return this.propsObj.entityKey;
|
|
36
|
-
},
|
|
37
|
-
inTable () {
|
|
38
|
-
return !!this.propsObj.inTable;
|
|
39
|
-
},
|
|
40
|
-
isShare () {
|
|
41
|
-
return !!this.propsObj.isShare;
|
|
42
|
-
},
|
|
43
37
|
controlKey () {
|
|
44
38
|
return this.propsObj._key;
|
|
45
39
|
},
|
|
40
|
+
curVal () {
|
|
41
|
+
return this.value[this.controlKey];
|
|
42
|
+
},
|
|
43
|
+
showText () {
|
|
44
|
+
return this.curVal || (this.isUnit ? "-" : "暂无内容");
|
|
45
|
+
},
|
|
46
46
|
|
|
47
47
|
finalCanEdit () {
|
|
48
48
|
return this.$canEdit(this.canEdit, this.propsObj);
|
|
@@ -57,9 +57,6 @@ export default {
|
|
|
57
57
|
_clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable)
|
|
58
58
|
};
|
|
59
59
|
},
|
|
60
|
-
currentVal () {
|
|
61
|
-
return this.value[this.controlKey];
|
|
62
|
-
},
|
|
63
60
|
commonClass () {
|
|
64
61
|
return {
|
|
65
62
|
"dsh-ellipsis": true,
|
|
@@ -67,11 +64,28 @@ export default {
|
|
|
67
64
|
"control-disabled": this.$isDisabled(this.canEdit, this.propsObj),
|
|
68
65
|
// "control-readonly": this.$isReadonly(this.canEdit, this.propsObj),
|
|
69
66
|
"control-show": !this.canEdit,
|
|
70
|
-
"control-notext": !this.
|
|
67
|
+
"control-notext": !this.curVal
|
|
71
68
|
};
|
|
72
69
|
},
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
|
|
71
|
+
// 部分控件或部分条件下 才使用的属性
|
|
72
|
+
compKey () {
|
|
73
|
+
return this.propsObj.compKey;
|
|
74
|
+
},
|
|
75
|
+
appKey () {
|
|
76
|
+
return this.propsObj.appKey;
|
|
77
|
+
},
|
|
78
|
+
entityKey () {
|
|
79
|
+
return this.propsObj.entityKey;
|
|
80
|
+
},
|
|
81
|
+
inTable () {
|
|
82
|
+
return !!this.propsObj.inTable;
|
|
83
|
+
},
|
|
84
|
+
stopModInit () {
|
|
85
|
+
return this.inTable;
|
|
86
|
+
},
|
|
87
|
+
isShare () {
|
|
88
|
+
return !!this.propsObj.isShare;
|
|
75
89
|
}
|
|
76
90
|
},
|
|
77
91
|
methods: {
|
|
@@ -1,54 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="cascaderTable"
|
|
4
|
+
:id="`cascaderTable${controlKey}`"
|
|
5
|
+
>
|
|
3
6
|
<!-- 表格查看 -->
|
|
4
|
-
<span
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<span
|
|
8
|
+
v-if="isUnit"
|
|
9
|
+
class="cascaderTable-unit"
|
|
10
|
+
>
|
|
11
|
+
<dsh-icons :list="$getOperationList(['link'])"></dsh-icons>
|
|
8
12
|
<span class="cascaderTable-unit-text">
|
|
9
13
|
{{ value[controlKey] && value[controlKey].tree.length || 0 }}行
|
|
10
14
|
</span>
|
|
11
15
|
</span>
|
|
12
16
|
|
|
13
|
-
<!-- 配置端默认模式-->
|
|
14
|
-
<dsh-btn-modal v-else-if="propsObj._key === '_default'">
|
|
15
|
-
<dsh-cascader-table
|
|
16
|
-
:canEdit="finalCanEdit"
|
|
17
|
-
:treeColumns="treeColumns"
|
|
18
|
-
:subColumns="subColumns"
|
|
19
|
-
:data="value[controlKey]"
|
|
20
|
-
:propsObj="propsObj"
|
|
21
|
-
@change="change"
|
|
22
|
-
></dsh-cascader-table>
|
|
23
|
-
</dsh-btn-modal>
|
|
24
|
-
|
|
25
17
|
<template v-else>
|
|
26
|
-
<!--
|
|
27
|
-
<dsh-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
<!-- 配置端默认模式-->
|
|
19
|
+
<dsh-btn-modal v-if="propsObj._key === '_default'">
|
|
20
|
+
<dsh-cascader-table
|
|
21
|
+
:canEdit="finalCanEdit"
|
|
22
|
+
:treeColumns="treeColumns"
|
|
23
|
+
:subColumns="subColumns"
|
|
24
|
+
:data="value[controlKey]"
|
|
25
|
+
:propsObj="propsObj"
|
|
26
|
+
@change="change"
|
|
27
|
+
></dsh-cascader-table>
|
|
28
|
+
</dsh-btn-modal>
|
|
33
29
|
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
@change="change"
|
|
43
|
-
></dsh-cascader-table>
|
|
30
|
+
<template v-else>
|
|
31
|
+
<!-- 操作按钮 -->
|
|
32
|
+
<dsh-buttons
|
|
33
|
+
class="cascaderTable-btns"
|
|
34
|
+
itemClass="cascaderTable-btns-item"
|
|
35
|
+
:list="$getOperationList(operationFieldList)"
|
|
36
|
+
@click="$dispatchEvent($event)"
|
|
37
|
+
></dsh-buttons>
|
|
44
38
|
|
|
45
|
-
<dsh-modal
|
|
46
|
-
v-model="isEnlarge"
|
|
47
|
-
mode="custom"
|
|
48
|
-
:propsObj="modalPropsObj"
|
|
49
|
-
>
|
|
50
39
|
<dsh-cascader-table
|
|
51
|
-
v-if="value[controlKey]
|
|
40
|
+
v-if="value[controlKey]"
|
|
52
41
|
useCol
|
|
53
42
|
:canEdit="finalCanEdit"
|
|
54
43
|
:treeColumns="treeColumns"
|
|
@@ -57,7 +46,24 @@
|
|
|
57
46
|
:propsObj="propsObj"
|
|
58
47
|
@change="change"
|
|
59
48
|
></dsh-cascader-table>
|
|
60
|
-
|
|
49
|
+
|
|
50
|
+
<dsh-modal
|
|
51
|
+
v-model="isEnlarge"
|
|
52
|
+
mode="custom"
|
|
53
|
+
:propsObj="modalPropsObj"
|
|
54
|
+
>
|
|
55
|
+
<dsh-cascader-table
|
|
56
|
+
v-if="value[controlKey] && isEnlarge"
|
|
57
|
+
useCol
|
|
58
|
+
:canEdit="finalCanEdit"
|
|
59
|
+
:treeColumns="treeColumns"
|
|
60
|
+
:subColumns="subColumns"
|
|
61
|
+
:data="value[controlKey]"
|
|
62
|
+
:propsObj="propsObj"
|
|
63
|
+
@change="change"
|
|
64
|
+
></dsh-cascader-table>
|
|
65
|
+
</dsh-modal>
|
|
66
|
+
</template>
|
|
61
67
|
</template>
|
|
62
68
|
</div>
|
|
63
69
|
</template>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:span="formItem._br ? 24 : (formItem._span || 24)"
|
|
17
17
|
>
|
|
18
18
|
<FormItem
|
|
19
|
-
|
|
19
|
+
class="DshForm-item-FormItem"
|
|
20
20
|
:prop="formItem._key"
|
|
21
21
|
@click.native="clickControl(formItem)"
|
|
22
22
|
>
|
|
@@ -27,10 +27,9 @@
|
|
|
27
27
|
:formItem="formItem"
|
|
28
28
|
:allFormList="allFormList"
|
|
29
29
|
:changedFields="changedFields"
|
|
30
|
+
:height="height"
|
|
30
31
|
:rowStyle="rowStyle"
|
|
31
32
|
:labelStyle="labelStyle"
|
|
32
|
-
:height="height"
|
|
33
|
-
:label-width="labelWidth"
|
|
34
33
|
:formControlClass="formControlClass"
|
|
35
34
|
@change="change(formItem, arguments)"
|
|
36
35
|
@refChange="refChange(formItem, arguments)"
|
|
@@ -120,6 +119,7 @@
|
|
|
120
119
|
},
|
|
121
120
|
changedFields: Array,
|
|
122
121
|
|
|
122
|
+
height: [String, Number],
|
|
123
123
|
rowStyle: {
|
|
124
124
|
type: Object,
|
|
125
125
|
default () {
|
|
@@ -132,10 +132,6 @@
|
|
|
132
132
|
return {};
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
|
-
|
|
136
|
-
height: [String, Number],
|
|
137
|
-
labelWidth: [String, Number],
|
|
138
|
-
formItemClass: String,
|
|
139
135
|
formControlClass: String,
|
|
140
136
|
showRules: {
|
|
141
137
|
type: Boolean,
|
|
@@ -194,7 +190,7 @@
|
|
|
194
190
|
} else {
|
|
195
191
|
bool = true;
|
|
196
192
|
}
|
|
197
|
-
callback &&
|
|
193
|
+
callback && callback(bool, errorRefs.map(errorRefItem => errorRefItem.formItem));
|
|
198
194
|
|
|
199
195
|
return bool;
|
|
200
196
|
},
|
|
@@ -317,19 +313,10 @@
|
|
|
317
313
|
};
|
|
318
314
|
</script>
|
|
319
315
|
|
|
320
|
-
<style lang="less" scoped>
|
|
321
|
-
.DshForm {
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
</style>
|
|
325
316
|
<style lang="less">
|
|
326
317
|
.DshForm {
|
|
327
318
|
&-item-FormItem {
|
|
328
319
|
margin-bottom: 0px!important;
|
|
329
|
-
// .ivu-form-item-content {
|
|
330
|
-
// line-height: 1.5;
|
|
331
|
-
// font-size: 18px;
|
|
332
|
-
// }
|
|
333
320
|
}
|
|
334
321
|
.ivu-form-item-error-tip {
|
|
335
322
|
top: 90%;
|
|
@@ -199,12 +199,11 @@
|
|
|
199
199
|
scopedSlots: {
|
|
200
200
|
default: props => h("dsh-unit", {
|
|
201
201
|
props: {
|
|
202
|
-
|
|
203
|
-
parentData: this.listData,
|
|
202
|
+
isUnit: !this.getUnitCanEdit(column, row),
|
|
204
203
|
formData: row,
|
|
205
204
|
formItem: this.resetCol(item),
|
|
206
205
|
rowIndex: rowIndex,
|
|
207
|
-
|
|
206
|
+
parentData: this.listData
|
|
208
207
|
},
|
|
209
208
|
on: {
|
|
210
209
|
blur: () => this.controlBlur(null, column, row, arguments),
|
|
@@ -215,12 +214,11 @@
|
|
|
215
214
|
})
|
|
216
215
|
: h("dsh-unit", {
|
|
217
216
|
props: {
|
|
218
|
-
|
|
219
|
-
parentData: this.listData,
|
|
217
|
+
isUnit: !this.getUnitCanEdit(column, row),
|
|
220
218
|
formData: row,
|
|
221
219
|
formItem: this.resetCol(item),
|
|
222
220
|
rowIndex: rowIndex,
|
|
223
|
-
|
|
221
|
+
parentData: this.listData
|
|
224
222
|
},
|
|
225
223
|
on: {
|
|
226
224
|
blur: () => this.controlBlur(null, column, row, arguments),
|
|
@@ -32,12 +32,19 @@
|
|
|
32
32
|
:clipboardOption="selfPropsObj.clipboardOption"
|
|
33
33
|
:columnWidthResizeOption="columnWidthResizeOption"
|
|
34
34
|
></ve-table>
|
|
35
|
+
|
|
35
36
|
<!-- loading -->
|
|
36
|
-
<div
|
|
37
|
+
<div
|
|
38
|
+
v-if="isLoading"
|
|
39
|
+
class="bri-table-empty bri-table-loading"
|
|
40
|
+
>
|
|
37
41
|
<slot name="loading">正在加载中,请稍后...</slot>
|
|
38
42
|
</div>
|
|
39
43
|
<!-- empty -->
|
|
40
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
v-else-if="!data.length"
|
|
46
|
+
class="bri-table-empty"
|
|
47
|
+
>
|
|
41
48
|
<slot name="empty">{{ noDataText }}</slot>
|
|
42
49
|
</div>
|
|
43
50
|
</div>
|
|
@@ -177,8 +184,7 @@
|
|
|
177
184
|
};
|
|
178
185
|
}
|
|
179
186
|
},
|
|
180
|
-
mounted () {
|
|
181
|
-
},
|
|
187
|
+
mounted () {},
|
|
182
188
|
methods: {}
|
|
183
189
|
};
|
|
184
190
|
</script>
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script>
|
|
30
|
-
|
|
31
30
|
export default {
|
|
32
31
|
name: "DshSingleData",
|
|
33
32
|
components: {},
|
|
@@ -55,12 +54,6 @@
|
|
|
55
54
|
default () {
|
|
56
55
|
return [];
|
|
57
56
|
}
|
|
58
|
-
},
|
|
59
|
-
extraOperationList: {
|
|
60
|
-
type: Array,
|
|
61
|
-
default () {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
57
|
}
|
|
65
58
|
},
|
|
66
59
|
computed: {
|
|
@@ -145,15 +145,14 @@
|
|
|
145
145
|
<!-- 普通单元格 -->
|
|
146
146
|
<td
|
|
147
147
|
v-else
|
|
148
|
-
:key="col._key"
|
|
148
|
+
:key="col._key + ''"
|
|
149
149
|
:style="getTdStyle(col, row)"
|
|
150
150
|
>
|
|
151
151
|
<dsh-unit
|
|
152
|
-
:
|
|
152
|
+
:isUnit="!canEdit"
|
|
153
|
+
:rowIndex="rowIndex"
|
|
153
154
|
:formData="row[col.nodeKey]"
|
|
154
155
|
:formItem="col"
|
|
155
|
-
:rowIndex="rowIndex"
|
|
156
|
-
:isUnit="!canEdit"
|
|
157
156
|
@change="$dispatchEvent(operationMap.changeVal, col, row, arguments)"
|
|
158
157
|
></dsh-unit>
|
|
159
158
|
</td>
|