doway-coms 1.4.24 → 1.4.25

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.4.24",
3
+ "version": "1.4.25",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -1135,16 +1135,7 @@ export default {
1135
1135
  case "clearFilter":
1136
1136
  // 示例
1137
1137
  const filterList = this.$refs.baseGrid.getCheckedFilters();
1138
-
1139
1138
  filterList.forEach((col) => {
1140
- // if (
1141
- // col.column.params.controlType === "select" ||
1142
- // col.column.params.controlType === "checkbox"
1143
- // ) {
1144
- // col.column.filters = [{ data: [] }];
1145
- // } else {
1146
- // col.column.filters = [{ data: [] }];
1147
- // }
1148
1139
  this.$refs.baseGrid.clearFilter(col.column);
1149
1140
  col.column.filters = [
1150
1141
  {
@@ -2249,24 +2240,34 @@ export default {
2249
2240
  });
2250
2241
  },
2251
2242
  filterConfirm(colInfo) {
2252
- console.log(colInfo);
2253
- colInfo.filters[0].data.bindingValues = [];
2254
- XEUtils.arrayEach(colInfo.filters[0].data.displayValues, (item) => {
2255
- if (colInfo.params.controlType === controlType.select) {
2256
- colInfo.filters[0].data.bindingValues.push(item);
2257
- } else {
2258
- if (item.value[0] || item.value[1]) {
2243
+ if (this.filterRemote) {
2244
+ console.log(colInfo);
2245
+ colInfo.filters[0].data.bindingValues = [];
2246
+ XEUtils.arrayEach(colInfo.filters[0].data.displayValues, (item) => {
2247
+ if (colInfo.params.controlType === controlType.select) {
2259
2248
  colInfo.filters[0].data.bindingValues.push(item);
2249
+ } else {
2250
+ if (item.value[0] || item.value[1]) {
2251
+ colInfo.filters[0].data.bindingValues.push(item);
2252
+ }
2253
+ }
2254
+ });
2255
+ colInfo.filters[0].checked =
2256
+ colInfo.filters[0].data.bindingValues.length > 0;
2257
+ //设置筛选过滤条件
2258
+ this.setFilterExpression();
2259
+ //通知外部筛选改变事件
2260
+ this.$emit("filterChange", { filterCol: colInfo });
2261
+ } else {
2262
+ for (let i = 0; i < colInfo.filters.length; i++) {
2263
+ if (!colInfo.filters[i].value) {
2264
+ colInfo.filters[i].checked = true;
2265
+ } else {
2266
+ colInfo.filters[i].checked = false;
2260
2267
  }
2261
2268
  }
2262
- });
2263
- colInfo.filters[0].checked =
2264
- colInfo.filters[0].data.bindingValues.length > 0;
2265
-
2266
- //设置筛选过滤条件
2267
- this.setFilterExpression();
2268
- //通知外部筛选改变事件
2269
- this.$emit("filterChange", { filterCol: colInfo });
2269
+ this.$refs.baseGrid.updateData();
2270
+ }
2270
2271
  this.$refs.baseGrid.closeFilter()
2271
2272
  },
2272
2273
  setFilterExpression() {