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
|
@@ -1,54 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="cascaderTable"
|
|
3
|
-
<!--
|
|
4
|
-
<span
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div class="cascaderTable">
|
|
3
|
+
<!-- 在表格内的查看 -->
|
|
4
|
+
<span
|
|
5
|
+
v-if="isUnitShow"
|
|
6
|
+
class="cascaderTable-unit"
|
|
7
|
+
>
|
|
8
|
+
<dsh-icons :list="$getOperationList(['link'])"></dsh-icons>
|
|
8
9
|
<span class="cascaderTable-unit-text">
|
|
9
10
|
{{ value[controlKey] && value[controlKey].tree.length || 0 }}行
|
|
10
11
|
</span>
|
|
11
12
|
</span>
|
|
12
13
|
|
|
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
14
|
<template v-else>
|
|
26
|
-
<!--
|
|
27
|
-
<dsh-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
<!-- 配置端 设置默认值用-->
|
|
16
|
+
<dsh-btn-modal v-if="propsObj._key === '_default'">
|
|
17
|
+
<dsh-cascader-table
|
|
18
|
+
:canEdit="finalCanEdit"
|
|
19
|
+
:treeColumns="treeColumns"
|
|
20
|
+
:subColumns="subColumns"
|
|
21
|
+
:data="value[controlKey]"
|
|
22
|
+
:propsObj="propsObj"
|
|
23
|
+
@change="change"
|
|
24
|
+
></dsh-cascader-table>
|
|
25
|
+
</dsh-btn-modal>
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
></dsh-cascader-table>
|
|
27
|
+
<!-- 正常使用 -->
|
|
28
|
+
<template v-else>
|
|
29
|
+
<!-- 操作按钮 -->
|
|
30
|
+
<dsh-buttons
|
|
31
|
+
class="cascaderTable-btns"
|
|
32
|
+
itemClass="cascaderTable-btns-item"
|
|
33
|
+
:list="$getOperationList(operationBtns)"
|
|
34
|
+
@click="$dispatchEvent($event)"
|
|
35
|
+
></dsh-buttons>
|
|
44
36
|
|
|
45
|
-
<dsh-modal
|
|
46
|
-
v-model="isEnlarge"
|
|
47
|
-
mode="custom"
|
|
48
|
-
:propsObj="modalPropsObj"
|
|
49
|
-
>
|
|
50
37
|
<dsh-cascader-table
|
|
51
|
-
v-if="value[controlKey] && isEnlarge"
|
|
52
38
|
useCol
|
|
53
39
|
:canEdit="finalCanEdit"
|
|
54
40
|
:treeColumns="treeColumns"
|
|
@@ -57,7 +43,25 @@
|
|
|
57
43
|
:propsObj="propsObj"
|
|
58
44
|
@change="change"
|
|
59
45
|
></dsh-cascader-table>
|
|
60
|
-
|
|
46
|
+
|
|
47
|
+
<!-- 全屏查看 -->
|
|
48
|
+
<dsh-modal
|
|
49
|
+
v-model="isEnlarge"
|
|
50
|
+
mode="custom"
|
|
51
|
+
:propsObj="modalPropsObj"
|
|
52
|
+
>
|
|
53
|
+
<dsh-cascader-table
|
|
54
|
+
v-if="value[controlKey] && isEnlarge"
|
|
55
|
+
useCol
|
|
56
|
+
:canEdit="finalCanEdit"
|
|
57
|
+
:treeColumns="treeColumns"
|
|
58
|
+
:subColumns="subColumns"
|
|
59
|
+
:data="value[controlKey]"
|
|
60
|
+
:propsObj="propsObj"
|
|
61
|
+
@change="change"
|
|
62
|
+
></dsh-cascader-table>
|
|
63
|
+
</dsh-modal>
|
|
64
|
+
</template>
|
|
61
65
|
</template>
|
|
62
66
|
</div>
|
|
63
67
|
</template>
|
|
@@ -67,11 +71,15 @@
|
|
|
67
71
|
|
|
68
72
|
export default {
|
|
69
73
|
name: "cascaderTable",
|
|
70
|
-
mixins: [
|
|
74
|
+
mixins: [
|
|
75
|
+
controlMixin
|
|
76
|
+
],
|
|
71
77
|
components: {},
|
|
72
78
|
props: {},
|
|
73
79
|
data () {
|
|
74
80
|
return {
|
|
81
|
+
isEnlarge: false,
|
|
82
|
+
timer: null,
|
|
75
83
|
operationMap: {
|
|
76
84
|
canExport: {
|
|
77
85
|
name: "导出",
|
|
@@ -79,7 +87,7 @@
|
|
|
79
87
|
icon: "md-share-alt",
|
|
80
88
|
size: "small",
|
|
81
89
|
btnType: "text",
|
|
82
|
-
event: "
|
|
90
|
+
event: "clickExport"
|
|
83
91
|
},
|
|
84
92
|
canEnlarge: {
|
|
85
93
|
name: "全屏展示",
|
|
@@ -87,17 +95,29 @@
|
|
|
87
95
|
icon: "md-expand",
|
|
88
96
|
size: "small",
|
|
89
97
|
btnType: "text",
|
|
90
|
-
event: "
|
|
98
|
+
event: "clickEnlarge"
|
|
91
99
|
},
|
|
92
100
|
link: {
|
|
93
101
|
customIcon: "bico-Cascadetable"
|
|
94
102
|
}
|
|
95
|
-
}
|
|
96
|
-
isEnlarge: false,
|
|
97
|
-
timer: null
|
|
103
|
+
}
|
|
98
104
|
};
|
|
99
105
|
},
|
|
100
106
|
computed: {
|
|
107
|
+
treeColumns () {
|
|
108
|
+
return this.value[this.controlKey] && this.value[this.controlKey]._treeForm
|
|
109
|
+
? this.value[this.controlKey]._treeForm
|
|
110
|
+
: this.propsObj._treeForm;
|
|
111
|
+
},
|
|
112
|
+
subColumns () {
|
|
113
|
+
return this.propsObj._subForm;
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
operationBtns () {
|
|
117
|
+
return this.propsObj._isExport
|
|
118
|
+
? ["canExport", "canEnlarge"]
|
|
119
|
+
: ["canEnlarge"];
|
|
120
|
+
},
|
|
101
121
|
modalPropsObj () {
|
|
102
122
|
return {
|
|
103
123
|
title: this.propsObj._name,
|
|
@@ -105,56 +125,44 @@
|
|
|
105
125
|
showSlotClose: false,
|
|
106
126
|
closable: true
|
|
107
127
|
};
|
|
108
|
-
},
|
|
109
|
-
operationFieldList () {
|
|
110
|
-
return this.propsObj._isExport ? ["canExport", "canEnlarge"] : ["canEnlarge"];
|
|
111
|
-
},
|
|
112
|
-
treeColumns () {
|
|
113
|
-
return this.value[this.controlKey]._treeForm
|
|
114
|
-
? this.value[this.controlKey]._treeForm
|
|
115
|
-
: this.propsObj._treeForm;
|
|
116
|
-
},
|
|
117
|
-
subColumns () {
|
|
118
|
-
return this.propsObj._subForm;
|
|
119
128
|
}
|
|
120
129
|
},
|
|
121
130
|
created () {},
|
|
122
131
|
methods: {
|
|
132
|
+
// 点击导出
|
|
133
|
+
clickExport (operationItem) {
|
|
134
|
+
operationItem.disabled = true;
|
|
135
|
+
this.handleExport(operationItem);
|
|
136
|
+
},
|
|
137
|
+
// 打开全屏模态框
|
|
138
|
+
clickEnlarge () {
|
|
139
|
+
this.isEnlarge = true;
|
|
140
|
+
},
|
|
123
141
|
// 发生变动
|
|
124
142
|
change (...params) {
|
|
125
143
|
this.$emit("change", ...params);
|
|
126
144
|
},
|
|
127
145
|
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
operationItem.disabled = true;
|
|
146
|
+
// 接口 -导出级联表
|
|
147
|
+
handleExport (operationItem) {
|
|
131
148
|
this.$https({
|
|
132
149
|
url: {
|
|
133
150
|
module: "sheet",
|
|
134
|
-
name: "exportCascaderTableExcel"
|
|
135
|
-
params: {
|
|
136
|
-
modKey: this.modKey
|
|
137
|
-
}
|
|
151
|
+
name: "exportCascaderTableExcel"
|
|
138
152
|
},
|
|
139
153
|
params: {
|
|
140
154
|
_key: this.controlKey,
|
|
141
155
|
_id: this.value._id
|
|
142
156
|
},
|
|
143
157
|
callback: data => {
|
|
144
|
-
|
|
145
|
-
operationItem.
|
|
146
|
-
},
|
|
147
|
-
this.timer = setInterval(this.getTransitStatus(data.jobId, data.excel_url), 1000);
|
|
158
|
+
this.timer = setInterval(() => {
|
|
159
|
+
this.getJobStatusData(operationItem, data.jobId, data.excel_url);
|
|
160
|
+
}, 1000);
|
|
148
161
|
}
|
|
149
162
|
});
|
|
150
163
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return function () {
|
|
154
|
-
that.getJobStatus(id, url);
|
|
155
|
-
};
|
|
156
|
-
},
|
|
157
|
-
getJobStatus (id, url) {
|
|
164
|
+
// 接口 -
|
|
165
|
+
getJobStatusData (operationItem, id, url) {
|
|
158
166
|
this.$https({
|
|
159
167
|
url: {
|
|
160
168
|
module: "sheet",
|
|
@@ -164,24 +172,23 @@
|
|
|
164
172
|
jobId: id
|
|
165
173
|
},
|
|
166
174
|
callback: data => {
|
|
175
|
+
operationItem.disabled = false;
|
|
176
|
+
|
|
167
177
|
if (data.status === "completed") {
|
|
168
178
|
clearInterval(this.timer);
|
|
169
179
|
window.location.href = data.url;
|
|
170
180
|
} else if (data.status === "failed") {
|
|
171
181
|
clearInterval(this.timer);
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
this.$Message.info({
|
|
183
|
+
content: "操作失败,请稍后再试"
|
|
184
|
+
});
|
|
174
185
|
}
|
|
175
186
|
},
|
|
176
187
|
error: data => {
|
|
188
|
+
operationItem.disabled = false;
|
|
177
189
|
this.timer = null;
|
|
178
190
|
}
|
|
179
191
|
});
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
// 打开全屏模态框
|
|
183
|
-
enlarge () {
|
|
184
|
-
this.isEnlarge = true;
|
|
185
192
|
}
|
|
186
193
|
}
|
|
187
194
|
};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flatTable">
|
|
3
|
+
<!-- 在表格内的查看 -->
|
|
3
4
|
<span
|
|
4
|
-
v-if="
|
|
5
|
+
v-if="isUnitShow"
|
|
5
6
|
class="flatTable-unit"
|
|
6
7
|
>
|
|
7
|
-
<dsh-icons :list="
|
|
8
|
+
<dsh-icons :list="[{
|
|
9
|
+
customIcon: 'bico-internaltable'
|
|
10
|
+
}]"></dsh-icons>
|
|
8
11
|
<span class="flatTable-unit-text">
|
|
9
12
|
{{ val.list.length }}行
|
|
10
13
|
</span>
|
|
11
14
|
</span>
|
|
12
15
|
|
|
13
16
|
<template v-else>
|
|
14
|
-
<!--
|
|
17
|
+
<!-- 配置端 设置默认值用-->
|
|
15
18
|
<dsh-btn-modal v-if="propsObj._key === '_default'">
|
|
16
19
|
<bri-flat-table
|
|
17
20
|
:canEdit="finalCanEdit"
|
|
@@ -24,8 +27,9 @@
|
|
|
24
27
|
></bri-flat-table>
|
|
25
28
|
</dsh-btn-modal>
|
|
26
29
|
|
|
27
|
-
<!--
|
|
30
|
+
<!-- 正常使用 -->
|
|
28
31
|
<template v-else>
|
|
32
|
+
<!-- 操作按钮 -->
|
|
29
33
|
<dsh-buttons
|
|
30
34
|
class="flatTable-btns"
|
|
31
35
|
itemClass="flatTable-btns-item"
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
@change="change"
|
|
46
50
|
></bri-flat-table>
|
|
47
51
|
|
|
52
|
+
<!-- 全屏查看 -->
|
|
48
53
|
<dsh-modal
|
|
49
54
|
v-model="isEnlarge"
|
|
50
55
|
mode="custom"
|
|
@@ -89,24 +94,13 @@
|
|
|
89
94
|
size: "small",
|
|
90
95
|
btnType: "text",
|
|
91
96
|
event: "enlarge"
|
|
92
|
-
},
|
|
93
|
-
link: {
|
|
94
|
-
customIcon: "bico-internaltable"
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
100
|
},
|
|
99
101
|
computed: {
|
|
100
|
-
modalPropsObj () {
|
|
101
|
-
return {
|
|
102
|
-
title: this.propsObj._name,
|
|
103
|
-
fullscreen: true,
|
|
104
|
-
showSlotClose: false,
|
|
105
|
-
closable: true
|
|
106
|
-
};
|
|
107
|
-
},
|
|
108
102
|
val () {
|
|
109
|
-
//
|
|
103
|
+
// TODO: 待定处理
|
|
110
104
|
return this.value[this.controlKey] || {
|
|
111
105
|
list: [],
|
|
112
106
|
oldList: [],
|
|
@@ -115,6 +109,15 @@
|
|
|
115
109
|
},
|
|
116
110
|
columns () {
|
|
117
111
|
return this.propsObj._subForm;
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
modalPropsObj () {
|
|
115
|
+
return {
|
|
116
|
+
title: this.propsObj._name,
|
|
117
|
+
fullscreen: true,
|
|
118
|
+
showSlotClose: false,
|
|
119
|
+
closable: true
|
|
120
|
+
};
|
|
118
121
|
}
|
|
119
122
|
},
|
|
120
123
|
created () {},
|
|
@@ -123,11 +126,11 @@
|
|
|
123
126
|
validate () {
|
|
124
127
|
return this.$refs.dshFatTable.validate();
|
|
125
128
|
},
|
|
129
|
+
|
|
126
130
|
// 打开全屏模态框
|
|
127
131
|
enlarge () {
|
|
128
132
|
this.isEnlarge = true;
|
|
129
133
|
},
|
|
130
|
-
|
|
131
134
|
change (...params) {
|
|
132
135
|
this.$emit("change", ...params);
|
|
133
136
|
}
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
class="extra-dynamic"
|
|
104
104
|
:value="conditionItem"
|
|
105
105
|
:propsObj="parameterPropsObj"
|
|
106
|
-
@change="
|
|
106
|
+
@change="parameterChange(conditionItem, arguments)"
|
|
107
107
|
></dsh-select>
|
|
108
108
|
|
|
109
109
|
<!-- operators 筛选条件 -->
|
|
@@ -328,6 +328,15 @@
|
|
|
328
328
|
|
|
329
329
|
this.change(conditionItem);
|
|
330
330
|
},
|
|
331
|
+
// 动态文本和固定文本切换类型
|
|
332
|
+
parameterChange (conditionItem) {
|
|
333
|
+
if (conditionItem.parameterType === "fixedText") {
|
|
334
|
+
conditionItem.fieldParams = [];
|
|
335
|
+
} else if (conditionItem.parameterType === "dynamicText") {
|
|
336
|
+
conditionItem.fieldValue = [];
|
|
337
|
+
}
|
|
338
|
+
this.change();
|
|
339
|
+
},
|
|
331
340
|
// 发生改动
|
|
332
341
|
change (conditionItem) {
|
|
333
342
|
const advSearchObj = {
|
|
@@ -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)"
|
|
@@ -111,15 +110,20 @@
|
|
|
111
110
|
return [];
|
|
112
111
|
}
|
|
113
112
|
},
|
|
114
|
-
|
|
113
|
+
|
|
115
114
|
allFormList: {
|
|
116
115
|
type: Array,
|
|
117
116
|
default () {
|
|
118
117
|
return [];
|
|
119
118
|
}
|
|
120
119
|
},
|
|
121
|
-
changedFields:
|
|
122
|
-
|
|
120
|
+
changedFields: {
|
|
121
|
+
type: Array,
|
|
122
|
+
default () {
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
height: [String, Number],
|
|
123
127
|
rowStyle: {
|
|
124
128
|
type: Object,
|
|
125
129
|
default () {
|
|
@@ -132,11 +136,10 @@
|
|
|
132
136
|
return {};
|
|
133
137
|
}
|
|
134
138
|
},
|
|
135
|
-
|
|
136
|
-
height: [String, Number],
|
|
137
|
-
labelWidth: [String, Number],
|
|
138
|
-
formItemClass: String,
|
|
139
139
|
formControlClass: String,
|
|
140
|
+
|
|
141
|
+
/* 本组件使用的 */
|
|
142
|
+
monitorFormList: Array,
|
|
140
143
|
showRules: {
|
|
141
144
|
type: Boolean,
|
|
142
145
|
default: true
|
|
@@ -194,7 +197,7 @@
|
|
|
194
197
|
} else {
|
|
195
198
|
bool = true;
|
|
196
199
|
}
|
|
197
|
-
callback &&
|
|
200
|
+
callback && callback(bool, errorRefs.map(errorRefItem => errorRefItem.formItem));
|
|
198
201
|
|
|
199
202
|
return bool;
|
|
200
203
|
},
|
|
@@ -317,19 +320,10 @@
|
|
|
317
320
|
};
|
|
318
321
|
</script>
|
|
319
322
|
|
|
320
|
-
<style lang="less" scoped>
|
|
321
|
-
.DshForm {
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
</style>
|
|
325
323
|
<style lang="less">
|
|
326
324
|
.DshForm {
|
|
327
325
|
&-item-FormItem {
|
|
328
326
|
margin-bottom: 0px!important;
|
|
329
|
-
// .ivu-form-item-content {
|
|
330
|
-
// line-height: 1.5;
|
|
331
|
-
// font-size: 18px;
|
|
332
|
-
// }
|
|
333
327
|
}
|
|
334
328
|
.ivu-form-item-error-tip {
|
|
335
329
|
top: 90%;
|
|
@@ -200,11 +200,10 @@
|
|
|
200
200
|
default: props => h("dsh-unit", {
|
|
201
201
|
props: {
|
|
202
202
|
canEdit: this.getUnitCanEdit(column, row),
|
|
203
|
-
parentData: this.listData,
|
|
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),
|
|
@@ -216,11 +215,10 @@
|
|
|
216
215
|
: h("dsh-unit", {
|
|
217
216
|
props: {
|
|
218
217
|
canEdit: this.getUnitCanEdit(column, row),
|
|
219
|
-
parentData: this.listData,
|
|
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),
|
|
@@ -269,7 +267,7 @@
|
|
|
269
267
|
},
|
|
270
268
|
on: {
|
|
271
269
|
click: (operationItem) => {
|
|
272
|
-
this.$dispatchEvent(operationItem, params.row, params.
|
|
270
|
+
this.$dispatchEvent(operationItem, params.row, params.rowIndex, this.listData);
|
|
273
271
|
}
|
|
274
272
|
}
|
|
275
273
|
});
|
|
@@ -380,7 +378,7 @@
|
|
|
380
378
|
|
|
381
379
|
/* --------------- 工具方法 ------------- */
|
|
382
380
|
resetCol (col) {
|
|
383
|
-
let
|
|
381
|
+
let resetMap = {
|
|
384
382
|
select: {
|
|
385
383
|
_optionKind: "dropdown"
|
|
386
384
|
},
|
|
@@ -390,7 +388,7 @@
|
|
|
390
388
|
};
|
|
391
389
|
return {
|
|
392
390
|
...col,
|
|
393
|
-
...(
|
|
391
|
+
...(resetMap[col._type] || {}),
|
|
394
392
|
isShare: this.isShare
|
|
395
393
|
};
|
|
396
394
|
},
|
|
@@ -32,12 +32,14 @@
|
|
|
32
32
|
:clipboardOption="selfPropsObj.clipboardOption"
|
|
33
33
|
:columnWidthResizeOption="columnWidthResizeOption"
|
|
34
34
|
></ve-table>
|
|
35
|
+
|
|
35
36
|
<!-- loading -->
|
|
36
|
-
<
|
|
37
|
-
<slot name="loading">正在加载中,请稍后...</slot>
|
|
38
|
-
</div>
|
|
37
|
+
<ZLoading v-if="isLoading" />
|
|
39
38
|
<!-- empty -->
|
|
40
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
v-else-if="!data.length"
|
|
41
|
+
class="bri-table-empty"
|
|
42
|
+
>
|
|
41
43
|
<slot name="empty">{{ noDataText }}</slot>
|
|
42
44
|
</div>
|
|
43
45
|
</div>
|
|
@@ -116,10 +118,12 @@
|
|
|
116
118
|
// 自定义表格事件,也可配置鼠标事件
|
|
117
119
|
eventCustomOption () {
|
|
118
120
|
return {
|
|
119
|
-
|
|
121
|
+
bodyCellEvents: ({ row, column, rowIndex }) => {
|
|
120
122
|
return {
|
|
121
123
|
click: (event) => {
|
|
122
|
-
|
|
124
|
+
if (!["checkbox"].includes(column.type)) {
|
|
125
|
+
this.$emit("click-row", row, rowIndex, event);
|
|
126
|
+
}
|
|
123
127
|
},
|
|
124
128
|
dblclick: (event) => {
|
|
125
129
|
this.$emit("db-click-row", row, rowIndex, event);
|
|
@@ -132,6 +136,7 @@
|
|
|
132
136
|
// 全选配置项
|
|
133
137
|
checkboxOption () {
|
|
134
138
|
return {
|
|
139
|
+
selectedRowKeys: [],
|
|
135
140
|
// 行选择改变事件
|
|
136
141
|
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
|
|
137
142
|
this.$emit(
|
|
@@ -177,8 +182,7 @@
|
|
|
177
182
|
};
|
|
178
183
|
}
|
|
179
184
|
},
|
|
180
|
-
mounted () {
|
|
181
|
-
},
|
|
185
|
+
mounted () {},
|
|
182
186
|
methods: {}
|
|
183
187
|
};
|
|
184
188
|
</script>
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
<!-- 右 val -->
|
|
62
62
|
<div class="unit-value dsh-ellipsis">
|
|
63
63
|
<dsh-td-render
|
|
64
|
-
v-if="colItem.
|
|
64
|
+
v-if="colItem.renderBodyCell"
|
|
65
65
|
:row="dataItem"
|
|
66
66
|
:column="colItem"
|
|
67
67
|
:index="0"
|
|
68
|
-
:render="colItem.
|
|
68
|
+
:render="colItem.renderBodyCell"
|
|
69
69
|
></dsh-td-render>
|
|
70
70
|
|
|
71
71
|
<div
|
|
@@ -273,13 +273,13 @@
|
|
|
273
273
|
@click="clickRow(dataItem, dataIndex)"
|
|
274
274
|
>
|
|
275
275
|
<div
|
|
276
|
-
v-if="colItem.
|
|
276
|
+
v-if="colItem.renderBodyCell"
|
|
277
277
|
class="td-content"
|
|
278
278
|
>
|
|
279
279
|
<dsh-td-render
|
|
280
280
|
:row="dataItem"
|
|
281
281
|
:index="dataIndex"
|
|
282
|
-
:render="colItem.
|
|
282
|
+
:render="colItem.renderBodyCell"
|
|
283
283
|
></dsh-td-render>
|
|
284
284
|
</div>
|
|
285
285
|
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
<dsh-td-render
|
|
324
324
|
:row="dataItem"
|
|
325
325
|
:index="dataIndex"
|
|
326
|
-
:render="operationCol.
|
|
326
|
+
:render="operationCol.renderBodyCell"
|
|
327
327
|
></dsh-td-render>
|
|
328
328
|
</div>
|
|
329
329
|
</td>
|
|
@@ -413,11 +413,7 @@
|
|
|
413
413
|
_name: "操作",
|
|
414
414
|
type: "expend",
|
|
415
415
|
width: 150,
|
|
416
|
-
|
|
417
|
-
columnAlign: "center",
|
|
418
|
-
componentName: "dsh-td-render",
|
|
419
|
-
isFrozenRight: true,
|
|
420
|
-
render: (h, params) => {
|
|
416
|
+
renderBodyCell: (params, h) => {
|
|
421
417
|
return this.operationList.length < 3
|
|
422
418
|
? h("dsh-buttons", {
|
|
423
419
|
props: {
|