bri-components 1.1.1 → 1.1.3
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/10.bri-components.min.js +1 -0
- 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/DshCascader.vue +14 -11
- package/src/components/controls/base/DshCascaderMultiple.vue +13 -4
- package/src/components/controls/base/DshCheckbox.vue +16 -19
- package/src/components/controls/base/DshCoordinates.vue +15 -11
- package/src/components/controls/base/DshDate.vue +24 -37
- package/src/components/controls/base/DshDaterange.vue +3 -1
- package/src/components/controls/base/DshEditor.vue +73 -49
- package/src/components/controls/base/DshInput.vue +66 -52
- package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +1 -1
- package/src/components/controls/base/DshNumber/DshNumber.vue +50 -48
- package/src/components/controls/base/DshNumberange.vue +11 -21
- package/src/components/controls/base/DshSelect.vue +12 -16
- package/src/components/controls/base/YSerialNumber.vue +10 -3
- package/src/components/controls/base/ZUpload/index.vue +16 -12
- package/src/components/controls/base/ZUpload/upload-list.vue +20 -13
- package/src/components/controls/base/ZUpload/uploadMixin.js +5 -1
- package/src/components/controls/base/textMultiple/DshTextMultiple.vue +13 -5
- package/src/components/controls/base/textMultiple/MultipleInput.vue +5 -5
- package/src/components/controls/controlMap.js +7 -5
- package/src/components/controls/controlMixin.js +54 -30
- package/src/components/controls/controlShow.vue +44 -0
- package/src/components/controls/{base → senior}/BriLabels.vue +55 -24
- package/src/components/controls/{base → senior}/DshPackage.vue +6 -25
- package/src/components/controls/senior/cascaderTable.vue +91 -84
- package/src/components/controls/senior/flatTable.vue +20 -17
- package/src/components/controls/{base → special}/DshBack.vue +4 -4
- package/src/components/controls/{base → special}/DshUndeveloped.vue +3 -1
- package/src/components/form/DshAdvSearchForm.vue +10 -1
- package/src/components/form/DshForm.vue +14 -20
- package/src/components/list/BriFlatTable.vue +5 -7
- package/src/components/list/BriTable.vue +12 -8
- package/src/components/list/DshBox/DshCard.vue +2 -2
- package/src/components/list/DshBox/DshCrossTable.vue +4 -8
- 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/DshControlDefine.vue +1 -1
- package/src/components/small/DshModal.vue +0 -110
- package/src/components/unit/DshFormItem.vue +42 -46
- package/src/components/unit/DshUnit.vue +10 -13
- package/src/components/unit/unitMixin.js +4 -9
- package/src/index.js +12 -14
- package/src/styles/common/box.less +29 -0
- package/src/styles/common/control.less +50 -12
- package/src/styles/components/controls/BriLabels.less +33 -17
- package/src/styles/components/controls/DshCascader.less +7 -3
- package/src/styles/components/controls/DshCheckbox.less +45 -42
- package/src/styles/components/controls/DshCoordinates.less +24 -27
- package/src/styles/components/controls/DshDate.less +1 -52
- package/src/styles/components/controls/DshEditor.less +51 -34
- package/src/styles/components/controls/DshInput.less +13 -34
- package/src/styles/components/controls/DshNumber.less +33 -0
- package/src/styles/components/controls/DshNumberange.less +8 -3
- package/src/styles/components/controls/DshSelect.less +78 -92
- package/src/styles/components/controls/ZUpload.less +1 -2
- package/src/styles/components/controls/cascaderTable.less +10 -24
- package/src/styles/components/controls/controlShow.less +3 -1
- package/src/styles/components/controls/flatTable.less +10 -23
- package/src/styles/components/form/DshAdvSearchForm.less +0 -9
- package/src/styles/components/form/DshDefaultSearch.less +0 -20
- package/src/styles/components/index.less +3 -2
- 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 +6 -8
- package/src/styles/components/small/DshDropdown.less +12 -8
- package/src/styles/components/small/DshModal.less +207 -0
- package/src/styles/components/small/DshTitle.less +1 -1
- package/src/styles/components/unit/DshFormItem.less +7 -3
- package/src/styles/plugin/iview.less +7 -3
- package/src/styles/reset.less +16 -2
- package/src/utils/table.js +5 -6
- package/src/components/controls/base/DshLabels.vue +0 -309
- package/src/components/controls/base/controlShow.vue +0 -52
- package/src/styles/components/controls/DshLabels.less +0 -187
|
@@ -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
|
-
:canEdit="canEdit
|
|
152
|
+
:canEdit="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>
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
>
|
|
10
10
|
<div class="ZLoading-main">
|
|
11
11
|
<slot>
|
|
12
|
-
<
|
|
12
|
+
<div class="ZLoading-main-content">
|
|
13
|
+
<div class="ZLoading-main-loading" :style="getStyle">
|
|
14
|
+
</div>
|
|
15
|
+
<div v-if="showLoadingText" class="ZLoading-main-loadingText">
|
|
16
|
+
加载中...
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
13
19
|
</slot>
|
|
14
20
|
</div>
|
|
15
21
|
</div>
|
|
@@ -37,7 +43,12 @@
|
|
|
37
43
|
},
|
|
38
44
|
kongImg: {
|
|
39
45
|
type: String
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
mode: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "large" // small middle
|
|
50
|
+
},
|
|
51
|
+
showLoadingText: Boolean
|
|
41
52
|
},
|
|
42
53
|
data () {
|
|
43
54
|
return {};
|
|
@@ -51,9 +62,27 @@
|
|
|
51
62
|
} else {
|
|
52
63
|
return undefined;
|
|
53
64
|
}
|
|
65
|
+
},
|
|
66
|
+
getStyle () {
|
|
67
|
+
let styleMap = {
|
|
68
|
+
large: {
|
|
69
|
+
width: "49px",
|
|
70
|
+
height: "49px"
|
|
71
|
+
},
|
|
72
|
+
middle: {
|
|
73
|
+
width: "35px",
|
|
74
|
+
height: "35px"
|
|
75
|
+
},
|
|
76
|
+
small: {
|
|
77
|
+
width: "16px",
|
|
78
|
+
height: "16px"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return styleMap[this.mode];
|
|
54
82
|
}
|
|
55
83
|
},
|
|
56
84
|
created () {},
|
|
57
|
-
methods: {
|
|
85
|
+
methods: {
|
|
86
|
+
}
|
|
58
87
|
};
|
|
59
88
|
</script>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Drawer
|
|
3
|
+
class="BriDrawer"
|
|
4
|
+
v-model="showModal"
|
|
5
|
+
:title="selfPropsObj.title"
|
|
6
|
+
:width="selfPropsObj.width"
|
|
7
|
+
:height="selfPropsObj.height"
|
|
8
|
+
:closable="selfPropsObj.closable"
|
|
9
|
+
:mask-closable="selfPropsObj.maskClosable"
|
|
10
|
+
:mask="selfPropsObj.mask"
|
|
11
|
+
:mask-style="selfPropsObj.maskStyle"
|
|
12
|
+
:styles="selfPropsObj.styles"
|
|
13
|
+
:scrollable="selfPropsObj.scrollable"
|
|
14
|
+
:placement="selfPropsObj.placement"
|
|
15
|
+
:transfer="selfPropsObj.transfer"
|
|
16
|
+
:class-name="selfPropsObj.className"
|
|
17
|
+
:inner="selfPropsObj.inner"
|
|
18
|
+
:draggable="selfPropsObj.draggable"
|
|
19
|
+
:before-close="selfPropsObj.beforeClose"
|
|
20
|
+
:lock-scroll="selfPropsObj.lockScroll"
|
|
21
|
+
@on-close="close"
|
|
22
|
+
@on-visible-change="visibleChange"
|
|
23
|
+
@on-resize-width="resizeChange"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
slot="header"
|
|
27
|
+
class="BriDrawer-header"
|
|
28
|
+
>
|
|
29
|
+
<slot name="header">
|
|
30
|
+
{{ selfPropsObj.title }}
|
|
31
|
+
</slot>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- 删除按钮 -->
|
|
35
|
+
<Icon
|
|
36
|
+
v-if="selfPropsObj.closable"
|
|
37
|
+
slot="close"
|
|
38
|
+
class="BriDrawer-close"
|
|
39
|
+
type="md-close"
|
|
40
|
+
size="20"
|
|
41
|
+
@click.stop="clickClose"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<slot
|
|
45
|
+
slot="trigger"
|
|
46
|
+
name="trigger"
|
|
47
|
+
></slot>
|
|
48
|
+
|
|
49
|
+
<div class="BriDrawer-main">
|
|
50
|
+
<div class="BriDrawer-body">
|
|
51
|
+
<slot></slot>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div
|
|
55
|
+
v-if="selfPropsObj.footer"
|
|
56
|
+
class="BriDrawer-footer"
|
|
57
|
+
>
|
|
58
|
+
<slot name="footer">
|
|
59
|
+
<dsh-buttons
|
|
60
|
+
:list="list"
|
|
61
|
+
@click="$dshEmit($event)"
|
|
62
|
+
></dsh-buttons>
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</Drawer>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
export default {
|
|
71
|
+
name: "BriDrawer",
|
|
72
|
+
props: {
|
|
73
|
+
value: Boolean,
|
|
74
|
+
propsObj: {
|
|
75
|
+
type: Object,
|
|
76
|
+
default () {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
list: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default () {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
model: {
|
|
88
|
+
prop: "value",
|
|
89
|
+
event: "input"
|
|
90
|
+
},
|
|
91
|
+
data () {
|
|
92
|
+
return {};
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
showModal: {
|
|
96
|
+
get () {
|
|
97
|
+
return this.value;
|
|
98
|
+
},
|
|
99
|
+
set (bool) {
|
|
100
|
+
this.input(bool);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
selfPropsObj () {
|
|
104
|
+
return {
|
|
105
|
+
width: 320,
|
|
106
|
+
closable: true,
|
|
107
|
+
transfer: true,
|
|
108
|
+
footer: true,
|
|
109
|
+
...this.propsObj
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
created () {},
|
|
114
|
+
methods: {
|
|
115
|
+
input (bool) {
|
|
116
|
+
this.$emit("input", bool);
|
|
117
|
+
},
|
|
118
|
+
clickClose () {
|
|
119
|
+
this.showModal = false;
|
|
120
|
+
},
|
|
121
|
+
close (...parmas) {
|
|
122
|
+
this.$emit("on-close", ...parmas);
|
|
123
|
+
},
|
|
124
|
+
resizeChange (...parmas) {
|
|
125
|
+
this.$emit("on-resize-change", ...parmas);
|
|
126
|
+
},
|
|
127
|
+
visibleChange (bool = false) {
|
|
128
|
+
this.$emit("on-visible-change", bool);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
</script>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:key="operationItem.type"
|
|
15
15
|
:style="operationItem.style"
|
|
16
16
|
:class="[
|
|
17
|
-
index ? 'dsh-margin-
|
|
17
|
+
index ? 'dsh-margin-left8' : undefined,
|
|
18
18
|
!operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
|
|
19
19
|
itemClass,
|
|
20
20
|
]"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
:key="operationItem.type"
|
|
60
60
|
:style="operationItem.style"
|
|
61
61
|
:class="[
|
|
62
|
-
index ? 'dsh-margin-
|
|
62
|
+
index ? 'dsh-margin-left8' : undefined,
|
|
63
63
|
!operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
|
|
64
64
|
itemClass,
|
|
65
65
|
]"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
:key="operationItem.type"
|
|
83
83
|
:style="operationItem.style"
|
|
84
84
|
:class="[
|
|
85
|
-
index ? 'dsh-margin-
|
|
85
|
+
index ? 'dsh-margin-left8' : undefined,
|
|
86
86
|
!operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
|
|
87
87
|
itemClass,
|
|
88
88
|
...(Array.isArray(operationItem.class) ? operationItem.class : [operationItem.class])
|
|
@@ -143,113 +143,3 @@
|
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
</script>
|
|
146
|
-
|
|
147
|
-
<style lang="less">
|
|
148
|
-
.DshModal {
|
|
149
|
-
&-header {
|
|
150
|
-
width: 100%;
|
|
151
|
-
height: 100%;
|
|
152
|
-
}
|
|
153
|
-
&-close {
|
|
154
|
-
padding: 2px;
|
|
155
|
-
position: absolute;
|
|
156
|
-
top: 10px;
|
|
157
|
-
right: 10px;
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&-default,
|
|
162
|
-
&-middle,
|
|
163
|
-
&-large,
|
|
164
|
-
&-small {
|
|
165
|
-
.ivu-modal-wrap {
|
|
166
|
-
.ivu-modal {
|
|
167
|
-
padding: 20px;
|
|
168
|
-
margin: auto;
|
|
169
|
-
position: absolute;
|
|
170
|
-
top: 0px;
|
|
171
|
-
bottom: 0px;
|
|
172
|
-
left: 0px;
|
|
173
|
-
right: 0px;
|
|
174
|
-
.ivu-modal-content {
|
|
175
|
-
width: 100%;
|
|
176
|
-
height: 100%;
|
|
177
|
-
display: flex;
|
|
178
|
-
flex-direction: column;
|
|
179
|
-
.ivu-modal-close {}
|
|
180
|
-
|
|
181
|
-
.ivu-modal-header {
|
|
182
|
-
width: 100%;
|
|
183
|
-
height: 44px;
|
|
184
|
-
padding: 10px 40px 10px 16px;
|
|
185
|
-
}
|
|
186
|
-
.ivu-modal-body {
|
|
187
|
-
width: 100%;
|
|
188
|
-
flex: 1;
|
|
189
|
-
min-height: 200px;
|
|
190
|
-
padding: 0px;
|
|
191
|
-
overflow: auto;
|
|
192
|
-
}
|
|
193
|
-
.ivu-modal-footer {
|
|
194
|
-
width: 100%;
|
|
195
|
-
height: 50px;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&-default {
|
|
203
|
-
.ivu-modal-wrap {
|
|
204
|
-
.ivu-modal {
|
|
205
|
-
width: 750px !important;
|
|
206
|
-
height: 550px !important;
|
|
207
|
-
max-height: 100%;
|
|
208
|
-
max-width: 100%;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
&-small {
|
|
213
|
-
.ivu-modal-wrap {
|
|
214
|
-
.ivu-modal {
|
|
215
|
-
width: 500px !important;
|
|
216
|
-
height: 400px !important;
|
|
217
|
-
max-height: 100%;
|
|
218
|
-
max-width: 100%;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
&-middle {
|
|
223
|
-
.ivu-modal-wrap {
|
|
224
|
-
.ivu-modal {
|
|
225
|
-
width: 1000px !important;
|
|
226
|
-
height: 800px !important;
|
|
227
|
-
max-height: 100%;
|
|
228
|
-
max-width: 100%;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
&-large {
|
|
233
|
-
.ivu-modal-wrap {
|
|
234
|
-
.ivu-modal {
|
|
235
|
-
width: 80% !important;
|
|
236
|
-
height: 90% !important;
|
|
237
|
-
min-width: 1000px !important;
|
|
238
|
-
max-height: 100%;
|
|
239
|
-
max-width: 100%;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
&-auto {
|
|
244
|
-
.ivu-modal-wrap {
|
|
245
|
-
display: flex;
|
|
246
|
-
align-items: center;
|
|
247
|
-
justify-content: center;
|
|
248
|
-
.ivu-modal {
|
|
249
|
-
top: 0px;
|
|
250
|
-
max-height: 100%;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
</style>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
{
|
|
5
|
+
'DshFormItem': true,
|
|
6
|
+
'DshFormItem-required': canEdit && formItem._required,
|
|
7
|
+
'DshFormItem-line': formItem._line,
|
|
8
|
+
},
|
|
8
9
|
formControlClass,
|
|
10
|
+
formItem.formControlClass
|
|
9
11
|
]"
|
|
10
12
|
:style="{
|
|
11
13
|
width: `calc(${(formItem._br ? (formItem._span || 24)/24 : 1) * 100}% - 12px)`,
|
|
12
14
|
height: formItem._br || (formItem._span || 24) === 24 ? undefined : `${height}px`,
|
|
13
15
|
minHeight: `${46}px`,
|
|
14
|
-
alignItems: formItem._labelAlignItems || 'center',
|
|
15
16
|
...rowStyle
|
|
16
17
|
}"
|
|
17
18
|
>
|
|
@@ -19,26 +20,30 @@
|
|
|
19
20
|
<div
|
|
20
21
|
v-if="!formItem._noLabel"
|
|
21
22
|
class="DshFormItem-label"
|
|
22
|
-
:style="
|
|
23
|
-
selfLabelStyle,
|
|
24
|
-
{ justifyContent: formItem._labelAlign }
|
|
25
|
-
]"
|
|
23
|
+
:style="labelStyle"
|
|
26
24
|
>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:style="labelLeftStyle"
|
|
30
|
-
>
|
|
25
|
+
<!-- 左 -->
|
|
26
|
+
<span class="DshFormItem-label-left">
|
|
31
27
|
<Ctooltip
|
|
32
28
|
:content="formItem._name"
|
|
33
29
|
transfer
|
|
34
30
|
>
|
|
35
|
-
<span class="
|
|
31
|
+
<span :class="{
|
|
32
|
+
'DshFormItem-label-name': true,
|
|
33
|
+
'DshFormItem-label-name-edit': canEdit,
|
|
34
|
+
'DshFormItem-label-name-show': !canEdit
|
|
35
|
+
}">
|
|
36
36
|
<slot name="label">
|
|
37
37
|
{{ formItem._name }}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
|
|
39
|
+
<!-- 有更新标记-->
|
|
40
|
+
<span
|
|
41
|
+
v-if="changedFields.includes(formItem._key)"
|
|
42
|
+
class="DshFormItem-label-name-sign"
|
|
43
|
+
>!有更新</span>
|
|
41
44
|
</slot>
|
|
45
|
+
|
|
46
|
+
<!-- label后可自定义内容 -->
|
|
42
47
|
<dsh-render
|
|
43
48
|
v-if="formItem._tipsRender"
|
|
44
49
|
:render="tipsRender(formItem,formData)"
|
|
@@ -47,8 +52,9 @@
|
|
|
47
52
|
</Ctooltip>
|
|
48
53
|
</span>
|
|
49
54
|
|
|
55
|
+
<!-- 右 -->
|
|
50
56
|
<span
|
|
51
|
-
v-if="canEdit
|
|
57
|
+
v-if="canEdit"
|
|
52
58
|
class="DshFormItem-label-right"
|
|
53
59
|
>
|
|
54
60
|
<slot name="extra">
|
|
@@ -66,12 +72,7 @@
|
|
|
66
72
|
</div>
|
|
67
73
|
|
|
68
74
|
<!-- 控件 -->
|
|
69
|
-
<div
|
|
70
|
-
class="DshFormItem-control"
|
|
71
|
-
:style="{
|
|
72
|
-
justifyContent: formItem._controlAlign
|
|
73
|
-
}"
|
|
74
|
-
>
|
|
75
|
+
<div class="DshFormItem-control">
|
|
75
76
|
<!-- 控件位置放置的dom -->
|
|
76
77
|
<slot name="control"></slot>
|
|
77
78
|
|
|
@@ -100,10 +101,22 @@
|
|
|
100
101
|
|
|
101
102
|
export default {
|
|
102
103
|
name: "DshFormItem",
|
|
103
|
-
mixins: [
|
|
104
|
+
mixins: [
|
|
105
|
+
unitMixin
|
|
106
|
+
],
|
|
104
107
|
props: {
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
allFormList: {
|
|
109
|
+
type: Array,
|
|
110
|
+
default () {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
changedFields: {
|
|
115
|
+
type: Array,
|
|
116
|
+
default () {
|
|
117
|
+
return [];
|
|
118
|
+
}
|
|
119
|
+
},
|
|
107
120
|
// 实际最精确值是74px(label:30px, control:32px, 上下padding各: 6px,因为ivu-form-item-content里line-height: 32px导致有问题,故先76px
|
|
108
121
|
height: {
|
|
109
122
|
type: [String, Number],
|
|
@@ -121,29 +134,12 @@
|
|
|
121
134
|
return {};
|
|
122
135
|
}
|
|
123
136
|
},
|
|
124
|
-
|
|
125
|
-
labelWidth: [String, Number],
|
|
126
137
|
formControlClass: String
|
|
127
138
|
},
|
|
128
139
|
data () {
|
|
129
|
-
return {
|
|
130
|
-
showTipModal: false
|
|
131
|
-
};
|
|
132
|
-
},
|
|
133
|
-
computed: {
|
|
134
|
-
selfLabelStyle () {
|
|
135
|
-
return {
|
|
136
|
-
width: this.labelWidth + "px",
|
|
137
|
-
...this.labelStyle
|
|
138
|
-
// marginRight: "20px"
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
labelLeftStyle () {
|
|
142
|
-
return {
|
|
143
|
-
minWidth: this.labelWidth + "px"
|
|
144
|
-
};
|
|
145
|
-
}
|
|
140
|
+
return {};
|
|
146
141
|
},
|
|
142
|
+
computed: {},
|
|
147
143
|
created () {},
|
|
148
144
|
methods: {
|
|
149
145
|
// 校验方法 -供外部使用
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
<component
|
|
18
18
|
:is="componentNameMap[formItem._type]"
|
|
19
19
|
:canEdit="canEdit"
|
|
20
|
-
:isUnit="isUnit"
|
|
21
|
-
:parentData="parentData"
|
|
22
20
|
:value="formData"
|
|
23
21
|
:propsObj="{
|
|
24
22
|
...formItem,
|
|
25
23
|
size: 'default',
|
|
26
24
|
inTable: true
|
|
27
25
|
}"
|
|
26
|
+
:parentData="parentData"
|
|
28
27
|
@blur="blur"
|
|
29
28
|
@change="change"
|
|
30
29
|
></component>
|
|
@@ -37,11 +36,18 @@
|
|
|
37
36
|
|
|
38
37
|
export default {
|
|
39
38
|
name: "DshUnit",
|
|
40
|
-
mixins: [
|
|
39
|
+
mixins: [
|
|
40
|
+
unitMixin
|
|
41
|
+
],
|
|
41
42
|
props: {
|
|
42
43
|
indexStr: String,
|
|
43
44
|
rowIndex: Number,
|
|
44
|
-
parentData:
|
|
45
|
+
parentData: {
|
|
46
|
+
type: Array,
|
|
47
|
+
default () {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
45
51
|
},
|
|
46
52
|
data () {
|
|
47
53
|
return {};
|
|
@@ -52,19 +58,10 @@
|
|
|
52
58
|
};
|
|
53
59
|
</script>
|
|
54
60
|
|
|
55
|
-
<style lang="less" scoped>
|
|
56
|
-
.DshUnit {}
|
|
57
|
-
</style>
|
|
58
61
|
<style lang="less">
|
|
59
62
|
.DshUnit {
|
|
60
63
|
.ivu-input {
|
|
61
64
|
font-size: 12px;
|
|
62
65
|
}
|
|
63
|
-
|
|
64
|
-
.DshLabels-searchResult{
|
|
65
|
-
position:absolute;
|
|
66
|
-
top: 32px !important;
|
|
67
|
-
left:0;
|
|
68
|
-
}
|
|
69
66
|
}
|
|
70
67
|
</style>
|
|
@@ -7,22 +7,17 @@ export default {
|
|
|
7
7
|
type: Boolean,
|
|
8
8
|
default: true
|
|
9
9
|
},
|
|
10
|
-
formData:
|
|
11
|
-
formItem: {
|
|
10
|
+
formData: {
|
|
12
11
|
type: Object,
|
|
13
12
|
default () {
|
|
14
13
|
return {};
|
|
15
14
|
}
|
|
16
15
|
},
|
|
17
|
-
|
|
18
|
-
type:
|
|
16
|
+
formItem: {
|
|
17
|
+
type: Object,
|
|
19
18
|
default () {
|
|
20
|
-
return
|
|
19
|
+
return {};
|
|
21
20
|
}
|
|
22
|
-
},
|
|
23
|
-
isUnit: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false
|
|
26
21
|
}
|
|
27
22
|
},
|
|
28
23
|
data () {
|