bri-components 1.4.51 → 1.4.53
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/DshNumber/DshNumber.vue +4 -84
- package/src/components/controls/base/DshNumber/DshNumberange.vue +3 -56
- package/src/components/controls/control.less +2 -1
- package/src/components/controls/mixins/cascaderTableMixin.js +130 -0
- package/src/components/controls/mixins/numberMixin.js +108 -0
- package/src/components/controls/senior/cascaderTable.vue +5 -119
- package/src/components/list/DshBox/DshBox.vue +2 -1
- package/src/styles/components/BriTable.less +4 -0
package/package.json
CHANGED
|
@@ -62,20 +62,20 @@
|
|
|
62
62
|
v-else
|
|
63
63
|
:canEdit="canEdit"
|
|
64
64
|
:value="value"
|
|
65
|
-
:propsObj="
|
|
65
|
+
:propsObj="selfPropsObj"
|
|
66
66
|
@change="change"
|
|
67
67
|
></dsh-numberange>
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script>
|
|
71
|
-
import
|
|
71
|
+
import numberMixin from "../../mixins/numberMixin.js";
|
|
72
72
|
import BriInputNumber from "./BriInputNumber/BriInputNumber.vue";
|
|
73
73
|
import DshNumberange from "./DshNumberange.vue";
|
|
74
74
|
|
|
75
75
|
export default {
|
|
76
76
|
name: "DshNumber",
|
|
77
77
|
mixins: [
|
|
78
|
-
|
|
78
|
+
numberMixin
|
|
79
79
|
],
|
|
80
80
|
components: {
|
|
81
81
|
BriInputNumber,
|
|
@@ -85,87 +85,7 @@
|
|
|
85
85
|
data () {
|
|
86
86
|
return {};
|
|
87
87
|
},
|
|
88
|
-
computed: {
|
|
89
|
-
selfPropsObj () {
|
|
90
|
-
return {
|
|
91
|
-
_strokeWidth: 12, // 参数还没配置
|
|
92
|
-
_overflowColor: "#87d068",
|
|
93
|
-
_compeleteColor: "#87d068",
|
|
94
|
-
_lessColor: "#108ee9",
|
|
95
|
-
|
|
96
|
-
...this.propsObj,
|
|
97
|
-
...this.commonDealPropsObj
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
formatterFunc () {
|
|
101
|
-
return this.separator
|
|
102
|
-
? this.$numToSeparator
|
|
103
|
-
: value => `${value}`;
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
maxNum () {
|
|
107
|
-
return this.selfPropsObj._max || this.selfPropsObj._max === 0
|
|
108
|
-
? this.selfPropsObj._max
|
|
109
|
-
: Infinity;
|
|
110
|
-
},
|
|
111
|
-
minNum () {
|
|
112
|
-
return this.selfPropsObj._min || this.selfPropsObj._min === 0
|
|
113
|
-
? this.selfPropsObj._min
|
|
114
|
-
: -Infinity;
|
|
115
|
-
},
|
|
116
|
-
// round, decimal, 为其他值不处理
|
|
117
|
-
round () {
|
|
118
|
-
return this.selfPropsObj._round;
|
|
119
|
-
},
|
|
120
|
-
digit () {
|
|
121
|
-
return this.round === "round"
|
|
122
|
-
? 0
|
|
123
|
-
: this.round === "decimal"
|
|
124
|
-
? Number(this.selfPropsObj._digit || 2)
|
|
125
|
-
: undefined;
|
|
126
|
-
},
|
|
127
|
-
numberFormat () {
|
|
128
|
-
return this.selfPropsObj._numberFormat;
|
|
129
|
-
},
|
|
130
|
-
unit () {
|
|
131
|
-
return this.selfPropsObj._unit;
|
|
132
|
-
},
|
|
133
|
-
unitStr () {
|
|
134
|
-
return this.numberFormat === "percent"
|
|
135
|
-
? "%"
|
|
136
|
-
: this.unit
|
|
137
|
-
? `${this.unit}`
|
|
138
|
-
: "";
|
|
139
|
-
},
|
|
140
|
-
separator () {
|
|
141
|
-
return this.selfPropsObj._separator;
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
// 进度条方式使用(此处先这样,实际是进度条使用要受0-100的数值范围限制)
|
|
145
|
-
strokeWidth () {
|
|
146
|
-
return this.selfPropsObj._strokeWidth;
|
|
147
|
-
},
|
|
148
|
-
statusColor () {
|
|
149
|
-
return this.curVal > 100
|
|
150
|
-
? this.selfPropsObj._overflowColor
|
|
151
|
-
: this.curVal === 100
|
|
152
|
-
? this.selfPropsObj._compeleteColor
|
|
153
|
-
: this.selfPropsObj._lessColor;
|
|
154
|
-
},
|
|
155
|
-
progressNum () {
|
|
156
|
-
return this.$isEmptyData(this.curVal) || this.curVal < 0
|
|
157
|
-
? 0
|
|
158
|
-
: Math.round((this.curVal > 100 ? 100 : this.curVal) * 100) / 100;
|
|
159
|
-
},
|
|
160
|
-
progressStr () {
|
|
161
|
-
return this.$numToStrAndUnit(this.$isEmptyData(this.curVal) ? 0 : this.curVal, this.selfPropsObj);
|
|
162
|
-
},
|
|
163
|
-
showVal () {
|
|
164
|
-
return this.$isEmptyData(this.curVal)
|
|
165
|
-
? this.emptyShowVal
|
|
166
|
-
: this.$numToStrAndUnit(this.curVal, this.selfPropsObj);
|
|
167
|
-
}
|
|
168
|
-
},
|
|
88
|
+
computed: {},
|
|
169
89
|
created () {},
|
|
170
90
|
methods: {}
|
|
171
91
|
};
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script>
|
|
55
|
-
import
|
|
55
|
+
import numberMixin from "../../mixins/numberMixin.js";
|
|
56
56
|
import BriInputNumber from "./BriInputNumber/BriInputNumber.vue";
|
|
57
57
|
|
|
58
58
|
export default {
|
|
59
59
|
name: "DshNumberange",
|
|
60
60
|
mixins: [
|
|
61
|
-
|
|
61
|
+
numberMixin
|
|
62
62
|
],
|
|
63
63
|
components: {
|
|
64
64
|
BriInputNumber
|
|
@@ -67,60 +67,7 @@
|
|
|
67
67
|
data () {
|
|
68
68
|
return {};
|
|
69
69
|
},
|
|
70
|
-
computed: {
|
|
71
|
-
selfPropsObj () {
|
|
72
|
-
return {
|
|
73
|
-
...this.propsObj,
|
|
74
|
-
...this.commonDealPropsObj
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
formatterFunc () {
|
|
79
|
-
if (this.propsObj._separator) {
|
|
80
|
-
return this.$numToSeparator;
|
|
81
|
-
} else {
|
|
82
|
-
return value => `${value}`;
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
maxNum () {
|
|
87
|
-
return this.selfPropsObj._max || this.selfPropsObj._max === 0 ? this.selfPropsObj._max : Infinity;
|
|
88
|
-
},
|
|
89
|
-
minNum () {
|
|
90
|
-
return this.selfPropsObj._min || this.selfPropsObj._min === 0 ? this.selfPropsObj._min : -Infinity;
|
|
91
|
-
},
|
|
92
|
-
// round, decimal, 为其他值不处理
|
|
93
|
-
round () {
|
|
94
|
-
return this.selfPropsObj._round;
|
|
95
|
-
},
|
|
96
|
-
digit () {
|
|
97
|
-
return this.round === "round"
|
|
98
|
-
? 0
|
|
99
|
-
: this.round === "decimal"
|
|
100
|
-
? Number(this.selfPropsObj._digit || 2)
|
|
101
|
-
: undefined;
|
|
102
|
-
},
|
|
103
|
-
numberFormat () {
|
|
104
|
-
return this.selfPropsObj._numberFormat;
|
|
105
|
-
},
|
|
106
|
-
unit () {
|
|
107
|
-
return this.selfPropsObj._unit;
|
|
108
|
-
},
|
|
109
|
-
unitStr () {
|
|
110
|
-
return this.numberFormat === "percent"
|
|
111
|
-
? "%"
|
|
112
|
-
: this.unit
|
|
113
|
-
? `${this.unit}`
|
|
114
|
-
: "";
|
|
115
|
-
},
|
|
116
|
-
separator () {
|
|
117
|
-
return this.selfPropsObj._separator;
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
step () {
|
|
121
|
-
return this.selfPropsObj._step;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
70
|
+
computed: {},
|
|
124
71
|
created () {},
|
|
125
72
|
methods: {}
|
|
126
73
|
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import controlMixin from "./controlMixin.js";
|
|
2
|
+
import DshCascaderTable from "../../list/DshCascaderTable.vue";
|
|
3
|
+
import DshTreeTable from "../../list/DshTreeTable.vue";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
mixins: [
|
|
7
|
+
controlMixin
|
|
8
|
+
],
|
|
9
|
+
components: {
|
|
10
|
+
DshCascaderTable,
|
|
11
|
+
DshTreeTable
|
|
12
|
+
},
|
|
13
|
+
props: {},
|
|
14
|
+
data () {
|
|
15
|
+
return {};
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
selfPropsObj () {
|
|
19
|
+
return {
|
|
20
|
+
_subType: "default", // "default", "cross", "old"
|
|
21
|
+
_subForm: [],
|
|
22
|
+
_treeForm: [],
|
|
23
|
+
_searchList: [], // 作为搜索的字段
|
|
24
|
+
_tableAdvSearch: {
|
|
25
|
+
logic: "and",
|
|
26
|
+
conditions: []
|
|
27
|
+
},
|
|
28
|
+
...this.propsObj
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
defaultPropsObj () {
|
|
32
|
+
return {
|
|
33
|
+
...this.selfPropsObj,
|
|
34
|
+
_tableAdvSearch: {
|
|
35
|
+
logic: "and",
|
|
36
|
+
conditions: []
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
subType () {
|
|
41
|
+
return this.selfPropsObj._subType;
|
|
42
|
+
},
|
|
43
|
+
subForm () {
|
|
44
|
+
return this.selfPropsObj._subForm;
|
|
45
|
+
},
|
|
46
|
+
// 用户态的每条数据的表头配置,都是存的自己的,不用通用配置_treeForm的
|
|
47
|
+
treeForm () {
|
|
48
|
+
return this.curVal && this.curVal._treeForm
|
|
49
|
+
? this.curVal._treeForm
|
|
50
|
+
: this.selfPropsObj._treeForm;
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
searchList () {
|
|
54
|
+
return this.selfPropsObj._searchList;
|
|
55
|
+
},
|
|
56
|
+
searchListMap () {
|
|
57
|
+
return this.$arrToMap(this.searchList, "_key");
|
|
58
|
+
},
|
|
59
|
+
searchListFields () {
|
|
60
|
+
return this.searchList.map(searchItem => searchItem._key);
|
|
61
|
+
},
|
|
62
|
+
tableAdvSearch () {
|
|
63
|
+
return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.allFormList, this.value);
|
|
64
|
+
},
|
|
65
|
+
dftAdvSearch () {
|
|
66
|
+
return {
|
|
67
|
+
logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
|
|
68
|
+
conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
|
|
69
|
+
this.searchListFields.includes(conditionItem.fieldKey)
|
|
70
|
+
)
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
// 配置的默认筛选值里 隐藏的看不到的筛选条件
|
|
74
|
+
hideAdvSearch () {
|
|
75
|
+
return {
|
|
76
|
+
logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
|
|
77
|
+
conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
|
|
78
|
+
!this.searchListFields.includes(conditionItem.fieldKey)
|
|
79
|
+
)
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
// 过滤行数据的 最终的筛选条件
|
|
83
|
+
finalTableAdvSearch () {
|
|
84
|
+
return {
|
|
85
|
+
logic: "and",
|
|
86
|
+
conditions: [
|
|
87
|
+
this.hideAdvSearch,
|
|
88
|
+
this.dftAdvSearch
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
isSearching () {
|
|
93
|
+
return this.$isAdvSearching(this.finalTableAdvSearch);
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
curVal () {
|
|
97
|
+
return this.value[this.controlKey] || {
|
|
98
|
+
tree: []
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
showVal () {
|
|
102
|
+
return `${this.curVal
|
|
103
|
+
? this.$getTreeFlatArr(this.curVal.tree, (row) =>
|
|
104
|
+
(
|
|
105
|
+
this.subType === "old"
|
|
106
|
+
? row.isLeaf === true
|
|
107
|
+
: true
|
|
108
|
+
) && (
|
|
109
|
+
this.isSearching
|
|
110
|
+
? this.$isAdvRelyAccord(this.finalTableAdvSearch, row)
|
|
111
|
+
: true
|
|
112
|
+
)
|
|
113
|
+
).length
|
|
114
|
+
: 0
|
|
115
|
+
} 行`;
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
created () { },
|
|
119
|
+
methods: {
|
|
120
|
+
// 校验方法 -供外部使用
|
|
121
|
+
validate () {
|
|
122
|
+
return this.$refs.table.validate();
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
// 发生变动
|
|
126
|
+
change (...params) {
|
|
127
|
+
this.$emit("change", ...params);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import controlMixin from "./controlMixin.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
mixins: [
|
|
5
|
+
controlMixin
|
|
6
|
+
],
|
|
7
|
+
components: {},
|
|
8
|
+
props: {},
|
|
9
|
+
data () {
|
|
10
|
+
return {};
|
|
11
|
+
},
|
|
12
|
+
computed: {
|
|
13
|
+
selfPropsObj () {
|
|
14
|
+
return {
|
|
15
|
+
_numberFormat: "normal", // 子类型 "normal", "percent"
|
|
16
|
+
|
|
17
|
+
_unit: "", // 常规-单位
|
|
18
|
+
_separator: true, // 常规-千位分隔符
|
|
19
|
+
_showProgress: false, // 百分比-进度条展示(列表)
|
|
20
|
+
_strokeWidth: 12, // 百分比-进度条宽(高)
|
|
21
|
+
_overflowColor: "#87d068", // 百分比-进度条超100%颜色
|
|
22
|
+
_compeleteColor: "#87d068", // 百分比-进度条100%颜色
|
|
23
|
+
_lessColor: "#108ee9", // 百分比-进度条低于100%颜色
|
|
24
|
+
|
|
25
|
+
_round: "decimal", // 取值方式 "decimal", "round", "normal"
|
|
26
|
+
_digit: "2", // 保留小数位数 "1", "2", "3", "4"
|
|
27
|
+
_max: null, // 最大值
|
|
28
|
+
_min: null, // 最小值
|
|
29
|
+
|
|
30
|
+
...this.propsObj,
|
|
31
|
+
...this.commonDealPropsObj
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
subType () {
|
|
35
|
+
return this.selfPropsObj._numberFormat;
|
|
36
|
+
},
|
|
37
|
+
step () {
|
|
38
|
+
return this.selfPropsObj._step;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
unit () {
|
|
42
|
+
return this.selfPropsObj._unit;
|
|
43
|
+
},
|
|
44
|
+
unitStr () {
|
|
45
|
+
return this.subType === "percent"
|
|
46
|
+
? "%"
|
|
47
|
+
: this.unit
|
|
48
|
+
? `${this.unit}`
|
|
49
|
+
: "";
|
|
50
|
+
},
|
|
51
|
+
separator () {
|
|
52
|
+
return this.selfPropsObj._separator;
|
|
53
|
+
},
|
|
54
|
+
formatterFunc () {
|
|
55
|
+
return this.separator
|
|
56
|
+
? this.$numToSeparator
|
|
57
|
+
: value => `${value}`;
|
|
58
|
+
},
|
|
59
|
+
// 进度条方式使用(此处先这样,实际是进度条使用要受0-100的数值范围限制)
|
|
60
|
+
strokeWidth () {
|
|
61
|
+
return this.selfPropsObj._strokeWidth;
|
|
62
|
+
},
|
|
63
|
+
statusColor () {
|
|
64
|
+
return this.curVal > 100
|
|
65
|
+
? this.selfPropsObj._overflowColor
|
|
66
|
+
: this.curVal === 100
|
|
67
|
+
? this.selfPropsObj._compeleteColor
|
|
68
|
+
: this.selfPropsObj._lessColor;
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
round () {
|
|
72
|
+
return this.selfPropsObj._round;
|
|
73
|
+
},
|
|
74
|
+
digit () {
|
|
75
|
+
return this.round === "round"
|
|
76
|
+
? 0
|
|
77
|
+
: this.round === "decimal"
|
|
78
|
+
? Number(this.selfPropsObj._digit || 2)
|
|
79
|
+
: undefined;
|
|
80
|
+
},
|
|
81
|
+
maxNum () {
|
|
82
|
+
return this.selfPropsObj._max || this.selfPropsObj._max === 0
|
|
83
|
+
? this.selfPropsObj._max
|
|
84
|
+
: Infinity;
|
|
85
|
+
},
|
|
86
|
+
minNum () {
|
|
87
|
+
return this.selfPropsObj._min || this.selfPropsObj._min === 0
|
|
88
|
+
? this.selfPropsObj._min
|
|
89
|
+
: -Infinity;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
progressNum () {
|
|
93
|
+
return this.$isEmptyData(this.curVal) || this.curVal < 0
|
|
94
|
+
? 0
|
|
95
|
+
: Math.round((this.curVal > 100 ? 100 : this.curVal) * 100) / 100;
|
|
96
|
+
},
|
|
97
|
+
progressStr () {
|
|
98
|
+
return this.$numToStrAndUnit(this.$isEmptyData(this.curVal) ? 0 : this.curVal, this.selfPropsObj);
|
|
99
|
+
},
|
|
100
|
+
showVal () {
|
|
101
|
+
return this.$isEmptyData(this.curVal)
|
|
102
|
+
? this.emptyShowVal
|
|
103
|
+
: this.$numToStrAndUnit(this.curVal, this.selfPropsObj);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
created () { },
|
|
107
|
+
methods: {}
|
|
108
|
+
};
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
</dsh-modal>
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
|
+
<!-- 编辑 和 查看-表单内 -->
|
|
69
70
|
<template v-else>
|
|
70
71
|
<!-- 配置端 设置默认值用-->
|
|
71
72
|
<dsh-btn-modal v-if="controlKey === '_default'">
|
|
@@ -149,139 +150,24 @@
|
|
|
149
150
|
</template>
|
|
150
151
|
|
|
151
152
|
<script>
|
|
152
|
-
import
|
|
153
|
-
import DshCascaderTable from "../../list/DshCascaderTable.vue";
|
|
154
|
-
import DshTreeTable from "../../list/DshTreeTable.vue";
|
|
153
|
+
import cascaderTableMixin from "../mixins/cascaderTableMixin.js";
|
|
155
154
|
import DshBtnModal from "../../small/DshBtnModal.vue";
|
|
156
155
|
|
|
157
156
|
export default {
|
|
158
157
|
name: "cascaderTable",
|
|
159
158
|
mixins: [
|
|
160
|
-
|
|
159
|
+
cascaderTableMixin
|
|
161
160
|
],
|
|
162
161
|
components: {
|
|
163
|
-
DshCascaderTable,
|
|
164
|
-
DshTreeTable,
|
|
165
162
|
DshBtnModal
|
|
166
163
|
},
|
|
167
164
|
props: {},
|
|
168
165
|
data () {
|
|
169
166
|
return {};
|
|
170
167
|
},
|
|
171
|
-
computed: {
|
|
172
|
-
selfPropsObj () {
|
|
173
|
-
return {
|
|
174
|
-
_subType: "default", // "default", "cross", "old"
|
|
175
|
-
_subForm: [],
|
|
176
|
-
_treeForm: [],
|
|
177
|
-
_searchList: [], // 作为搜索的字段
|
|
178
|
-
_tableAdvSearch: {
|
|
179
|
-
logic: "and",
|
|
180
|
-
conditions: []
|
|
181
|
-
},
|
|
182
|
-
...this.propsObj
|
|
183
|
-
};
|
|
184
|
-
},
|
|
185
|
-
defaultPropsObj () {
|
|
186
|
-
return {
|
|
187
|
-
...this.selfPropsObj,
|
|
188
|
-
_tableAdvSearch: {
|
|
189
|
-
logic: "and",
|
|
190
|
-
conditions: []
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
},
|
|
194
|
-
subType () {
|
|
195
|
-
return this.selfPropsObj._subType;
|
|
196
|
-
},
|
|
197
|
-
subForm () {
|
|
198
|
-
return this.selfPropsObj._subForm;
|
|
199
|
-
},
|
|
200
|
-
// 用户态的每条数据的表头配置,都是存的自己的,不用通用配置_treeForm的
|
|
201
|
-
treeForm () {
|
|
202
|
-
return this.curVal && this.curVal._treeForm
|
|
203
|
-
? this.curVal._treeForm
|
|
204
|
-
: this.selfPropsObj._treeForm;
|
|
205
|
-
},
|
|
206
|
-
|
|
207
|
-
searchList () {
|
|
208
|
-
return this.selfPropsObj._searchList;
|
|
209
|
-
},
|
|
210
|
-
searchListMap () {
|
|
211
|
-
return this.$arrToMap(this.searchList, "_key");
|
|
212
|
-
},
|
|
213
|
-
searchListFields () {
|
|
214
|
-
return this.searchList.map(searchItem => searchItem._key);
|
|
215
|
-
},
|
|
216
|
-
tableAdvSearch () {
|
|
217
|
-
return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.allFormList, this.value);
|
|
218
|
-
},
|
|
219
|
-
dftAdvSearch () {
|
|
220
|
-
return {
|
|
221
|
-
logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
|
|
222
|
-
conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
|
|
223
|
-
this.searchListFields.includes(conditionItem.fieldKey)
|
|
224
|
-
)
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
// 配置的默认筛选值里 隐藏的看不到的筛选条件
|
|
228
|
-
hideAdvSearch () {
|
|
229
|
-
return {
|
|
230
|
-
logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
|
|
231
|
-
conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
|
|
232
|
-
!this.searchListFields.includes(conditionItem.fieldKey)
|
|
233
|
-
)
|
|
234
|
-
};
|
|
235
|
-
},
|
|
236
|
-
// 过滤行数据的 最终的筛选条件
|
|
237
|
-
finalTableAdvSearch () {
|
|
238
|
-
return {
|
|
239
|
-
logic: "and",
|
|
240
|
-
conditions: [
|
|
241
|
-
this.hideAdvSearch,
|
|
242
|
-
this.dftAdvSearch
|
|
243
|
-
]
|
|
244
|
-
};
|
|
245
|
-
},
|
|
246
|
-
isSearching () {
|
|
247
|
-
return this.$isAdvSearching(this.finalTableAdvSearch);
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
curVal () {
|
|
251
|
-
return this.value[this.controlKey] || {
|
|
252
|
-
tree: []
|
|
253
|
-
};
|
|
254
|
-
},
|
|
255
|
-
showVal () {
|
|
256
|
-
return `${
|
|
257
|
-
this.curVal
|
|
258
|
-
? this.$getTreeFlatArr(this.curVal.tree, (row) =>
|
|
259
|
-
(
|
|
260
|
-
this.subType === "old"
|
|
261
|
-
? row.isLeaf === true
|
|
262
|
-
: true
|
|
263
|
-
) && (
|
|
264
|
-
this.isSearching
|
|
265
|
-
? this.$isAdvRelyAccord(this.finalTableAdvSearch, row)
|
|
266
|
-
: true
|
|
267
|
-
)
|
|
268
|
-
).length
|
|
269
|
-
: 0
|
|
270
|
-
} 行`;
|
|
271
|
-
}
|
|
272
|
-
},
|
|
168
|
+
computed: {},
|
|
273
169
|
created () {},
|
|
274
|
-
methods: {
|
|
275
|
-
// 校验方法 -供外部使用
|
|
276
|
-
validate () {
|
|
277
|
-
return this.$refs.table.validate();
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
// 发生变动
|
|
281
|
-
change (...params) {
|
|
282
|
-
this.$emit("change", ...params);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
170
|
+
methods: {}
|
|
285
171
|
};
|
|
286
172
|
</script>
|
|
287
173
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:extraOperationList="extraOperationList"
|
|
12
12
|
:propsObj="listPropsObj"
|
|
13
13
|
:changedFields="changedFields"
|
|
14
|
-
:isLoading="listPropsObj && listPropsObj.isLoading"
|
|
14
|
+
:isLoading="isLoading ? isLoading : listPropsObj && listPropsObj.isLoading"
|
|
15
15
|
:noDataText="listPropsObj && listPropsObj.noDataText || '暂无数据…'"
|
|
16
16
|
@clickRow="clickRow"
|
|
17
17
|
@sortChange="changeSort"
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
return [];
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
+
isLoading: Boolean,
|
|
115
116
|
listPropsObj: Object,
|
|
116
117
|
|
|
117
118
|
pageMode: String,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
height: 100%;
|
|
10
10
|
overflow: auto;
|
|
11
11
|
word-break: break-word;
|
|
12
|
+
position: relative;
|
|
12
13
|
|
|
13
14
|
td {
|
|
14
15
|
white-space: normal !important;
|
|
@@ -144,6 +145,9 @@
|
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
&-empty {
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0px;
|
|
150
|
+
left: 0px;
|
|
147
151
|
width: 100%;
|
|
148
152
|
height: 100%;
|
|
149
153
|
padding: 9px 16px;
|