bri-components 1.1.0 → 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 +154 -12
- package/src/components/controls/base/DshCascader.vue +1 -5
- package/src/components/controls/base/DshCoordinates.vue +89 -81
- package/src/components/controls/base/DshEditor.vue +23 -7
- package/src/components/controls/base/DshInput.vue +7 -0
- package/src/components/controls/base/controlShow.vue +5 -5
- 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/controls/senior/flatTable.vue +58 -53
- package/src/components/form/DshForm.vue +8 -17
- package/src/components/list/BriFlatTable.vue +15 -12
- package/src/components/list/BriTable.vue +11 -5
- package/src/components/list/DshBox/DshBox.vue +1 -1
- package/src/components/list/DshBox/DshCard.vue +1 -1
- package/src/components/list/DshBox/DshCrossTable.vue +1 -1
- package/src/components/list/DshBox/DshList.vue +3 -3
- package/src/components/list/DshBox/DshPanel.vue +1 -1
- package/src/components/list/DshBox/DshSingleData.vue +1 -8
- package/src/components/list/DshCascaderTable.vue +4 -4
- package/src/components/list/DshFlatTable.vue +1 -1
- package/src/components/list/ZTree.vue +1 -1
- package/src/components/list/easyTable/v-table/src/table.vue +3 -3
- package/src/components/list/evTable/EvTable.vue +1 -1
- package/src/components/other/BriTransfer.vue +1 -1
- package/src/components/other/ZGantt.vue +2 -2
- 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 +2 -1
- package/src/components/small/DshDropdown.vue +1 -1
- package/src/components/small/DshModal.vue +25 -1
- package/src/components/small/DshTdRender.js +1 -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 +2 -0
- package/src/styles/components/controls/BriLabels.less +113 -3
- package/src/styles/components/controls/DshCascader.less +7 -3
- package/src/styles/components/controls/DshCoordinates.less +6 -1
- package/src/styles/components/controls/DshInput.less +6 -0
- package/src/styles/components/controls/DshLabels.less +3 -3
- package/src/styles/components/controls/controlShow.less +0 -2
- package/src/styles/components/index.less +2 -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 +15 -36
- package/src/styles/components/small/DshDropdown.less +11 -8
- package/src/styles/components/small/DshTitle.less +1 -4
- package/src/styles/components/unit/DshFormItem.less +7 -5
- package/src/styles/iconfont/iconfont.css +254 -0
- package/src/styles/iconfont/iconfont.eot +0 -0
- package/src/styles/iconfont/iconfont.js +1 -0
- package/src/styles/iconfont/iconfont.json +422 -0
- package/src/styles/iconfont/iconfont.svg +137 -0
- package/src/styles/iconfont/iconfont.ttf +0 -0
- package/src/styles/iconfont/iconfont.woff +0 -0
- package/src/styles/iconfont/iconfont.woff2 +0 -0
- package/src/styles/index.less +1 -0
- package/src/styles/plugin/iview.less +7 -2
- package/src/styles/reset.less +2 -2
- package/src/utils/table.js +3 -4
|
@@ -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>
|
|
@@ -1,64 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flatTable">
|
|
3
|
-
<span
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<span
|
|
4
|
+
v-if="isUnit"
|
|
5
|
+
class="flatTable-unit"
|
|
6
|
+
>
|
|
7
|
+
<dsh-icons :list="$getOperationList(['link'])"></dsh-icons>
|
|
7
8
|
<span class="flatTable-unit-text">
|
|
8
|
-
{{ val.list.length
|
|
9
|
+
{{ val.list.length }}行
|
|
9
10
|
</span>
|
|
10
11
|
</span>
|
|
11
12
|
|
|
12
|
-
<!-- 设置默认值所用的控件 -->
|
|
13
|
-
<dsh-btn-modal v-else-if="propsObj._key === '_default'">
|
|
14
|
-
<bri-flat-table
|
|
15
|
-
:canEdit="finalCanEdit"
|
|
16
|
-
:columns="columns"
|
|
17
|
-
:data="val.list"
|
|
18
|
-
:rowDefault="val.rowDefault"
|
|
19
|
-
:propsObj="propsObj"
|
|
20
|
-
@change="change"
|
|
21
|
-
></bri-flat-table>
|
|
22
|
-
</dsh-btn-modal>
|
|
23
|
-
|
|
24
|
-
<!-- 操作按钮 -->
|
|
25
13
|
<template v-else>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
<!-- 设置默认值所用的控件 -->
|
|
15
|
+
<dsh-btn-modal v-if="propsObj._key === '_default'">
|
|
16
|
+
<bri-flat-table
|
|
17
|
+
:canEdit="finalCanEdit"
|
|
18
|
+
:columns="columns"
|
|
19
|
+
:data="val.list"
|
|
20
|
+
:rowDefault="val.rowDefault"
|
|
21
|
+
:outObj="value"
|
|
22
|
+
:propsObj="propsObj"
|
|
23
|
+
@change="change"
|
|
24
|
+
></bri-flat-table>
|
|
25
|
+
</dsh-btn-modal>
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
:propsObj="propsObj"
|
|
42
|
-
@change="change"
|
|
43
|
-
></bri-flat-table>
|
|
27
|
+
<!-- 操作按钮 -->
|
|
28
|
+
<template v-else>
|
|
29
|
+
<dsh-buttons
|
|
30
|
+
class="flatTable-btns"
|
|
31
|
+
itemClass="flatTable-btns-item"
|
|
32
|
+
:list="$getOperationList(['canEnlarge'])"
|
|
33
|
+
@click="$dispatchEvent($event)"
|
|
34
|
+
></dsh-buttons>
|
|
44
35
|
|
|
45
|
-
<dsh-modal
|
|
46
|
-
v-model="isEnlarge"
|
|
47
|
-
mode="custom"
|
|
48
|
-
:propsObj="modalPropsObj"
|
|
49
|
-
>
|
|
50
36
|
<bri-flat-table
|
|
51
|
-
|
|
37
|
+
ref="dshFatTable"
|
|
52
38
|
:canEdit="finalCanEdit"
|
|
53
39
|
:columns="columns"
|
|
54
40
|
:data="val.list"
|
|
55
41
|
:oldData="val.oldList"
|
|
56
42
|
:rowDefault="val.rowDefault"
|
|
57
|
-
:
|
|
43
|
+
:outObj="value"
|
|
58
44
|
:propsObj="propsObj"
|
|
59
45
|
@change="change"
|
|
60
46
|
></bri-flat-table>
|
|
61
|
-
|
|
47
|
+
|
|
48
|
+
<dsh-modal
|
|
49
|
+
v-model="isEnlarge"
|
|
50
|
+
mode="custom"
|
|
51
|
+
:propsObj="modalPropsObj"
|
|
52
|
+
>
|
|
53
|
+
<bri-flat-table
|
|
54
|
+
v-if="value[controlKey] && isEnlarge"
|
|
55
|
+
:canEdit="finalCanEdit"
|
|
56
|
+
:columns="columns"
|
|
57
|
+
:data="val.list"
|
|
58
|
+
:oldData="val.oldList"
|
|
59
|
+
:rowDefault="val.rowDefault"
|
|
60
|
+
:outObj="value"
|
|
61
|
+
:propsObj="propsObj"
|
|
62
|
+
@change="change"
|
|
63
|
+
></bri-flat-table>
|
|
64
|
+
</dsh-modal>
|
|
65
|
+
</template>
|
|
62
66
|
</template>
|
|
63
67
|
</div>
|
|
64
68
|
</template>
|
|
@@ -68,12 +72,15 @@
|
|
|
68
72
|
|
|
69
73
|
export default {
|
|
70
74
|
name: "flatTable",
|
|
71
|
-
mixins: [
|
|
75
|
+
mixins: [
|
|
76
|
+
controlMixin
|
|
77
|
+
],
|
|
72
78
|
components: {},
|
|
73
|
-
props: {
|
|
74
|
-
},
|
|
79
|
+
props: {},
|
|
75
80
|
data () {
|
|
76
81
|
return {
|
|
82
|
+
isEnlarge: false,
|
|
83
|
+
|
|
77
84
|
operationMap: {
|
|
78
85
|
canEnlarge: {
|
|
79
86
|
name: "全屏展示",
|
|
@@ -86,8 +93,7 @@
|
|
|
86
93
|
link: {
|
|
87
94
|
customIcon: "bico-internaltable"
|
|
88
95
|
}
|
|
89
|
-
}
|
|
90
|
-
isEnlarge: false
|
|
96
|
+
}
|
|
91
97
|
};
|
|
92
98
|
},
|
|
93
99
|
computed: {
|
|
@@ -117,14 +123,13 @@
|
|
|
117
123
|
validate () {
|
|
118
124
|
return this.$refs.dshFatTable.validate();
|
|
119
125
|
},
|
|
120
|
-
|
|
121
|
-
change (...params) {
|
|
122
|
-
this.$emit("change", ...params);
|
|
123
|
-
},
|
|
124
|
-
|
|
125
126
|
// 打开全屏模态框
|
|
126
127
|
enlarge () {
|
|
127
128
|
this.isEnlarge = true;
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
change (...params) {
|
|
132
|
+
this.$emit("change", ...params);
|
|
128
133
|
}
|
|
129
134
|
}
|
|
130
135
|
};
|
|
@@ -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,14 @@
|
|
|
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
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
320
|
+
}
|
|
321
|
+
.ivu-form-item-error-tip {
|
|
322
|
+
top: 90%;
|
|
323
|
+
left: 15px;
|
|
333
324
|
}
|
|
334
325
|
}
|
|
335
326
|
</style>
|
|
@@ -63,8 +63,7 @@
|
|
|
63
63
|
default () {
|
|
64
64
|
return {};
|
|
65
65
|
}
|
|
66
|
-
}
|
|
67
|
-
isShare: Boolean
|
|
66
|
+
}
|
|
68
67
|
},
|
|
69
68
|
model: {
|
|
70
69
|
prop: "data",
|
|
@@ -106,6 +105,8 @@
|
|
|
106
105
|
|
|
107
106
|
selfPropsObj () {
|
|
108
107
|
return {
|
|
108
|
+
isShare: false, // 是否是分享页在用
|
|
109
|
+
|
|
109
110
|
_contentHeight: 500,
|
|
110
111
|
_useSelection: false, // 使用选择列
|
|
111
112
|
_useIndex: true, // 使用序号列
|
|
@@ -117,6 +118,9 @@
|
|
|
117
118
|
...this.propsObj
|
|
118
119
|
};
|
|
119
120
|
},
|
|
121
|
+
isShare () {
|
|
122
|
+
return this.selfPropsObj.isShare;
|
|
123
|
+
},
|
|
120
124
|
contentHeight () {
|
|
121
125
|
return this.selfPropsObj._contentHeight;
|
|
122
126
|
},
|
|
@@ -195,13 +199,11 @@
|
|
|
195
199
|
scopedSlots: {
|
|
196
200
|
default: props => h("dsh-unit", {
|
|
197
201
|
props: {
|
|
198
|
-
|
|
199
|
-
parentData: this.listData,
|
|
202
|
+
isUnit: !this.getUnitCanEdit(column, row),
|
|
200
203
|
formData: row,
|
|
201
204
|
formItem: this.resetCol(item),
|
|
202
|
-
isShare: this.isShare,
|
|
203
205
|
rowIndex: rowIndex,
|
|
204
|
-
|
|
206
|
+
parentData: this.listData
|
|
205
207
|
},
|
|
206
208
|
on: {
|
|
207
209
|
blur: () => this.controlBlur(null, column, row, arguments),
|
|
@@ -212,13 +214,11 @@
|
|
|
212
214
|
})
|
|
213
215
|
: h("dsh-unit", {
|
|
214
216
|
props: {
|
|
215
|
-
|
|
216
|
-
parentData: this.listData,
|
|
217
|
+
isUnit: !this.getUnitCanEdit(column, row),
|
|
217
218
|
formData: row,
|
|
218
219
|
formItem: this.resetCol(item),
|
|
219
|
-
isShare: this.isShare,
|
|
220
220
|
rowIndex: rowIndex,
|
|
221
|
-
|
|
221
|
+
parentData: this.listData
|
|
222
222
|
},
|
|
223
223
|
on: {
|
|
224
224
|
blur: () => this.controlBlur(null, column, row, arguments),
|
|
@@ -343,7 +343,6 @@
|
|
|
343
343
|
};
|
|
344
344
|
const newRowIndex = index == null ? list.length : index + 1;
|
|
345
345
|
list.splice(newRowIndex, 0, newRow);
|
|
346
|
-
|
|
347
346
|
this.$forceUpdate(); // 自定义页中点击添加一行没有更新页面
|
|
348
347
|
|
|
349
348
|
this.change("createRow", null, newRow, newRowIndex);
|
|
@@ -387,7 +386,11 @@
|
|
|
387
386
|
_optionKind: "dropdown"
|
|
388
387
|
}
|
|
389
388
|
};
|
|
390
|
-
return {
|
|
389
|
+
return {
|
|
390
|
+
...col,
|
|
391
|
+
...(obj[col._type] || {}),
|
|
392
|
+
isShare: this.isShare
|
|
393
|
+
};
|
|
391
394
|
},
|
|
392
395
|
getUnitCanEdit (col, row) {
|
|
393
396
|
return this.canEdit && // 是否是编辑状态
|
|
@@ -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>
|
|
@@ -56,7 +63,7 @@
|
|
|
56
63
|
isLoading: Boolean,
|
|
57
64
|
noDataText: {
|
|
58
65
|
type: String,
|
|
59
|
-
default: "
|
|
66
|
+
default: "暂无内容"
|
|
60
67
|
},
|
|
61
68
|
columns: Array,
|
|
62
69
|
data: Array,
|
|
@@ -177,8 +184,7 @@
|
|
|
177
184
|
};
|
|
178
185
|
}
|
|
179
186
|
},
|
|
180
|
-
mounted () {
|
|
181
|
-
},
|
|
187
|
+
mounted () {},
|
|
182
188
|
methods: {}
|
|
183
189
|
};
|
|
184
190
|
</script>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:propsObj="listPropsObj"
|
|
14
14
|
:changedFields="changedFields"
|
|
15
15
|
:isLoading="listPropsObj && listPropsObj.isLoading"
|
|
16
|
-
:noDataText="listPropsObj && listPropsObj.noDataText || '
|
|
16
|
+
:noDataText="listPropsObj && listPropsObj.noDataText || '暂无内容...'"
|
|
17
17
|
@clickRow="clickRow"
|
|
18
18
|
@sortChange="changeSort"
|
|
19
19
|
@selectChange="changeSelect"
|
|
@@ -133,12 +133,12 @@
|
|
|
133
133
|
>
|
|
134
134
|
<div class="row-item-inner dsh-ellipsis">
|
|
135
135
|
<dsh-td-render
|
|
136
|
-
v-if="col.
|
|
136
|
+
v-if="col.renderBodyCell"
|
|
137
137
|
class="ms-ellipsis"
|
|
138
138
|
:row="row"
|
|
139
139
|
:column="col"
|
|
140
140
|
:index="index"
|
|
141
|
-
:render="col.
|
|
141
|
+
:render="col.renderBodyCell"
|
|
142
142
|
></dsh-td-render>
|
|
143
143
|
<template v-else-if="col.formatter">
|
|
144
144
|
<div v-html="col.formatter(row, index)"></div>
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
},
|
|
226
226
|
noDataText: {
|
|
227
227
|
type: String,
|
|
228
|
-
default: "
|
|
228
|
+
default: "暂无内容..."
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
231
|
data () {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:formList="columns"
|
|
9
9
|
></dsh-form>
|
|
10
10
|
|
|
11
|
-
<!--
|
|
11
|
+
<!-- 暂无内容 -->
|
|
12
12
|
<div
|
|
13
13
|
v-else
|
|
14
14
|
class="DshSingleData-nodata"
|
|
@@ -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: {
|