@weitutech/by-components 1.1.128 → 1.1.130
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/by-components.common.js +124 -28
- package/lib/by-components.umd.js +124 -28
- package/lib/by-components.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -60751,8 +60751,8 @@ var component = normalizeComponent(
|
|
|
60751
60751
|
)
|
|
60752
60752
|
|
|
60753
60753
|
/* harmony default export */ var pager = (component.exports);
|
|
60754
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60755
|
-
var
|
|
60754
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=3aefd0b0
|
|
60755
|
+
var tablevue_type_template_id_3aefd0b0_render = function render() {
|
|
60756
60756
|
var _vm = this,
|
|
60757
60757
|
_c = _vm._self._c;
|
|
60758
60758
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60826,7 +60826,7 @@ var tablevue_type_template_id_d8d0f56a_render = function render() {
|
|
|
60826
60826
|
}
|
|
60827
60827
|
}) : _vm._e()], 1);
|
|
60828
60828
|
};
|
|
60829
|
-
var
|
|
60829
|
+
var tablevue_type_template_id_3aefd0b0_staticRenderFns = [];
|
|
60830
60830
|
|
|
60831
60831
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60832
60832
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -61874,6 +61874,9 @@ var custom_column_component = normalizeComponent(
|
|
|
61874
61874
|
this.checkDeviceType();
|
|
61875
61875
|
this.initResizeListener();
|
|
61876
61876
|
}
|
|
61877
|
+
|
|
61878
|
+
// 前端分页模式下初始化默认排序
|
|
61879
|
+
this.initDefaultSortForFrontendPagination();
|
|
61877
61880
|
},
|
|
61878
61881
|
beforeDestroy() {
|
|
61879
61882
|
// 确保只在客户端环境中移除事件监听
|
|
@@ -61896,6 +61899,7 @@ var custom_column_component = normalizeComponent(
|
|
|
61896
61899
|
handler() {
|
|
61897
61900
|
this.$nextTick(() => {
|
|
61898
61901
|
setTimeout(() => {
|
|
61902
|
+
var _this$gridOptions$pag;
|
|
61899
61903
|
if (this.$refs.xGrid && this.$refs.xGrid.refreshScroll) {
|
|
61900
61904
|
this.$refs.xGrid.refreshScroll(); // 刷新滚动布局
|
|
61901
61905
|
}
|
|
@@ -61905,13 +61909,19 @@ var custom_column_component = normalizeComponent(
|
|
|
61905
61909
|
left: 0
|
|
61906
61910
|
});
|
|
61907
61911
|
}
|
|
61908
|
-
|
|
61909
|
-
|
|
61910
|
-
|
|
61911
|
-
|
|
61912
|
-
|
|
61913
|
-
|
|
61914
|
-
|
|
61912
|
+
|
|
61913
|
+
// 前端分页模式下,数据变化时确保默认排序高亮
|
|
61914
|
+
if ((_this$gridOptions$pag = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag !== void 0 && _this$gridOptions$pag.frontendPagination) {
|
|
61915
|
+
this.ensureDefaultSortHighlight();
|
|
61916
|
+
} else {
|
|
61917
|
+
// 非前端分页模式,恢复之前的排序高亮
|
|
61918
|
+
if (this.sortState.field && this.sortState.order && this.$refs.xGrid) {
|
|
61919
|
+
setTimeout(() => {
|
|
61920
|
+
this.$refs.xGrid.sort(this.sortState.field, this.sortState.order, {
|
|
61921
|
+
silent: true
|
|
61922
|
+
});
|
|
61923
|
+
}, 100);
|
|
61924
|
+
}
|
|
61915
61925
|
}
|
|
61916
61926
|
}, 0);
|
|
61917
61927
|
});
|
|
@@ -62121,9 +62131,9 @@ var custom_column_component = normalizeComponent(
|
|
|
62121
62131
|
* @param values 分页参数
|
|
62122
62132
|
*/
|
|
62123
62133
|
pageChange(values) {
|
|
62124
|
-
var _this$gridOptions$
|
|
62134
|
+
var _this$gridOptions$pag2;
|
|
62125
62135
|
// 前端分页
|
|
62126
|
-
if ((_this$gridOptions$
|
|
62136
|
+
if ((_this$gridOptions$pag2 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag2 !== void 0 && _this$gridOptions$pag2.frontendPagination) {
|
|
62127
62137
|
setTimeout(() => {
|
|
62128
62138
|
const newData = this.spliteListData(this.allData, values.page, values.limit);
|
|
62129
62139
|
this.$refs.xGrid.reloadData(newData);
|
|
@@ -62347,19 +62357,19 @@ var custom_column_component = normalizeComponent(
|
|
|
62347
62357
|
* @param event
|
|
62348
62358
|
*/
|
|
62349
62359
|
handleSortChange(event) {
|
|
62350
|
-
var _this$gridOptions$
|
|
62360
|
+
var _this$gridOptions$pag3, _this$gridOptions$sor;
|
|
62351
62361
|
const {
|
|
62352
62362
|
property,
|
|
62353
62363
|
order
|
|
62354
62364
|
} = event;
|
|
62355
|
-
const shouldHandleSort = ((_this$gridOptions$
|
|
62365
|
+
const shouldHandleSort = ((_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination) || ((_this$gridOptions$sor = this.gridOptions.sortConfig) === null || _this$gridOptions$sor === void 0 ? void 0 : _this$gridOptions$sor.frontendSort);
|
|
62356
62366
|
|
|
62357
62367
|
// 无论前端还是后端分页,都保存排序状态用于恢复箭头高亮
|
|
62358
62368
|
this.sortState.field = property;
|
|
62359
62369
|
this.sortState.order = order;
|
|
62360
62370
|
if (shouldHandleSort) {
|
|
62361
|
-
var _this$gridOptions$
|
|
62362
|
-
const newData = this.spliteListData(this.allData, (_this$gridOptions$
|
|
62371
|
+
var _this$gridOptions$pag4, _this$gridOptions$pag5;
|
|
62372
|
+
const newData = this.spliteListData(this.allData, (_this$gridOptions$pag4 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag4 !== void 0 && _this$gridOptions$pag4.frontendPagination ? this.gridOptions.pagerConfig.currentPage : null, (_this$gridOptions$pag5 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag5 !== void 0 && _this$gridOptions$pag5.frontendPagination ? this.gridOptions.pagerConfig.pageSize : null);
|
|
62363
62373
|
if (this.$refs.xGrid) {
|
|
62364
62374
|
this.$refs.xGrid.reloadData(newData);
|
|
62365
62375
|
this.$nextTick(() => {
|
|
@@ -62372,8 +62382,8 @@ var custom_column_component = normalizeComponent(
|
|
|
62372
62382
|
}, 100);
|
|
62373
62383
|
}
|
|
62374
62384
|
setTimeout(() => {
|
|
62375
|
-
var _this$gridOptions$
|
|
62376
|
-
if ((_this$gridOptions$
|
|
62385
|
+
var _this$gridOptions$pag6;
|
|
62386
|
+
if ((_this$gridOptions$pag6 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag6 !== void 0 && _this$gridOptions$pag6.frontendPagination && this.$refs.xGrid) {
|
|
62377
62387
|
// 前端分页时,排序状态变化,回到第一页
|
|
62378
62388
|
const currentPage = this.gridOptions.pagerConfig.currentPage;
|
|
62379
62389
|
if (currentPage !== 1) {
|
|
@@ -62416,6 +62426,58 @@ var custom_column_component = normalizeComponent(
|
|
|
62416
62426
|
silent: true
|
|
62417
62427
|
});
|
|
62418
62428
|
}, 100);
|
|
62429
|
+
},
|
|
62430
|
+
/**
|
|
62431
|
+
* 前端分页模式下初始化默认排序
|
|
62432
|
+
*/
|
|
62433
|
+
initDefaultSortForFrontendPagination() {
|
|
62434
|
+
var _this$gridOptions$pag7, _this$gridOptions$sor2;
|
|
62435
|
+
// 只在前端分页模式下处理默认排序
|
|
62436
|
+
if (!((_this$gridOptions$pag7 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag7 !== void 0 && _this$gridOptions$pag7.frontendPagination)) {
|
|
62437
|
+
return;
|
|
62438
|
+
}
|
|
62439
|
+
const defaultSort = (_this$gridOptions$sor2 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor2 === void 0 ? void 0 : _this$gridOptions$sor2.defaultSort;
|
|
62440
|
+
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62441
|
+
// 设置排序状态
|
|
62442
|
+
this.sortState.field = defaultSort.field;
|
|
62443
|
+
this.sortState.order = defaultSort.order;
|
|
62444
|
+
|
|
62445
|
+
// 在下一个tick中应用排序高亮
|
|
62446
|
+
this.$nextTick(() => {
|
|
62447
|
+
if (this.$refs.xGrid) {
|
|
62448
|
+
setTimeout(() => {
|
|
62449
|
+
// 只高亮排序图标,不触发排序事件
|
|
62450
|
+
this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
|
|
62451
|
+
silent: true
|
|
62452
|
+
});
|
|
62453
|
+
}, 100);
|
|
62454
|
+
}
|
|
62455
|
+
});
|
|
62456
|
+
}
|
|
62457
|
+
},
|
|
62458
|
+
/**
|
|
62459
|
+
* 确保默认排序高亮(前端分页模式下数据变化时调用)
|
|
62460
|
+
*/
|
|
62461
|
+
ensureDefaultSortHighlight() {
|
|
62462
|
+
var _this$gridOptions$pag8, _this$gridOptions$sor3;
|
|
62463
|
+
if (!((_this$gridOptions$pag8 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag8 !== void 0 && _this$gridOptions$pag8.frontendPagination)) {
|
|
62464
|
+
return;
|
|
62465
|
+
}
|
|
62466
|
+
const defaultSort = (_this$gridOptions$sor3 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor3 === void 0 ? void 0 : _this$gridOptions$sor3.defaultSort;
|
|
62467
|
+
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62468
|
+
// 确保排序状态与默认排序一致
|
|
62469
|
+
this.sortState.field = defaultSort.field;
|
|
62470
|
+
this.sortState.order = defaultSort.order;
|
|
62471
|
+
|
|
62472
|
+
// 应用排序高亮
|
|
62473
|
+
if (this.$refs.xGrid) {
|
|
62474
|
+
setTimeout(() => {
|
|
62475
|
+
this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
|
|
62476
|
+
silent: true
|
|
62477
|
+
});
|
|
62478
|
+
}, 100);
|
|
62479
|
+
}
|
|
62480
|
+
}
|
|
62419
62481
|
}
|
|
62420
62482
|
}
|
|
62421
62483
|
});
|
|
@@ -62431,8 +62493,8 @@ var custom_column_component = normalizeComponent(
|
|
|
62431
62493
|
;
|
|
62432
62494
|
var table_component = normalizeComponent(
|
|
62433
62495
|
components_tablevue_type_script_lang_js,
|
|
62434
|
-
|
|
62435
|
-
|
|
62496
|
+
tablevue_type_template_id_3aefd0b0_render,
|
|
62497
|
+
tablevue_type_template_id_3aefd0b0_staticRenderFns,
|
|
62436
62498
|
false,
|
|
62437
62499
|
null,
|
|
62438
62500
|
null,
|
|
@@ -74979,8 +75041,8 @@ var ByCommonSelector_component = normalizeComponent(
|
|
|
74979
75041
|
)
|
|
74980
75042
|
|
|
74981
75043
|
/* harmony default export */ var ByCommonSelector = (ByCommonSelector_component.exports);
|
|
74982
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=
|
|
74983
|
-
var
|
|
75044
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=ae023dca
|
|
75045
|
+
var BatchQuerySelectorvue_type_template_id_ae023dca_render = function render() {
|
|
74984
75046
|
var _vm = this,
|
|
74985
75047
|
_c = _vm._self._c;
|
|
74986
75048
|
return _c('div', {
|
|
@@ -75126,6 +75188,9 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_render = function render() {
|
|
|
75126
75188
|
"disabled": _vm.disabled || _vm.loading,
|
|
75127
75189
|
"size": _vm.size
|
|
75128
75190
|
},
|
|
75191
|
+
on: {
|
|
75192
|
+
"click": _vm.handleBatchButtonClick
|
|
75193
|
+
},
|
|
75129
75194
|
slot: "reference"
|
|
75130
75195
|
}, [_c('i', {
|
|
75131
75196
|
staticClass: "el-icon-edit-outline",
|
|
@@ -75135,7 +75200,7 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_render = function render() {
|
|
|
75135
75200
|
}
|
|
75136
75201
|
})])], 1)], 1)]);
|
|
75137
75202
|
};
|
|
75138
|
-
var
|
|
75203
|
+
var BatchQuerySelectorvue_type_template_id_ae023dca_staticRenderFns = [];
|
|
75139
75204
|
|
|
75140
75205
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=script&lang=js
|
|
75141
75206
|
|
|
@@ -75376,9 +75441,23 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75376
75441
|
// 处理下拉框显示/隐藏
|
|
75377
75442
|
handleDropdownVisibleChange(visible) {
|
|
75378
75443
|
this.dropdownVisible = visible;
|
|
75444
|
+
if (visible) {
|
|
75445
|
+
// 下拉框打开时,重置搜索关键词,确保显示所有选项
|
|
75446
|
+
this.keyword = '';
|
|
75447
|
+
this.filteredOptions = [...this.optionsList];
|
|
75448
|
+
this.currentPage = this.initialPageCount;
|
|
75449
|
+
this.updateVisibleOptions();
|
|
75379
75450
|
|
|
75380
|
-
|
|
75381
|
-
|
|
75451
|
+
// 清空 el-select 的搜索输入框
|
|
75452
|
+
this.$nextTick(() => {
|
|
75453
|
+
var _this$$refs$elSelect, _this$$refs$elSelect$, _this$$refs$elSelect$2, _this$$refs$elSelect$3;
|
|
75454
|
+
const selectInput = (_this$$refs$elSelect = this.$refs.elSelect) === null || _this$$refs$elSelect === void 0 ? void 0 : (_this$$refs$elSelect$ = _this$$refs$elSelect.$refs) === null || _this$$refs$elSelect$ === void 0 ? void 0 : (_this$$refs$elSelect$2 = _this$$refs$elSelect$.input) === null || _this$$refs$elSelect$2 === void 0 ? void 0 : (_this$$refs$elSelect$3 = _this$$refs$elSelect$2.$refs) === null || _this$$refs$elSelect$3 === void 0 ? void 0 : _this$$refs$elSelect$3.input;
|
|
75455
|
+
if (selectInput) {
|
|
75456
|
+
selectInput.value = '';
|
|
75457
|
+
}
|
|
75458
|
+
});
|
|
75459
|
+
} else {
|
|
75460
|
+
// 如果下拉框关闭,重置hasFocused标记,以便下次打开时能够正确触发focus事件
|
|
75382
75461
|
this.hasFocused = false;
|
|
75383
75462
|
}
|
|
75384
75463
|
},
|
|
@@ -75505,8 +75584,14 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75505
75584
|
this.updateVisibleOptions();
|
|
75506
75585
|
}, 200);
|
|
75507
75586
|
},
|
|
75587
|
+
// 处理批量按钮点击 (为了在还未加载过数据的情况下触发加载数据)
|
|
75588
|
+
handleBatchButtonClick(e) {
|
|
75589
|
+
if (this.optionsList.length === 0 && !this.loadOptions) {
|
|
75590
|
+
this.$emit('batch-selector-focus', e);
|
|
75591
|
+
}
|
|
75592
|
+
},
|
|
75508
75593
|
// 处理批量输入
|
|
75509
|
-
handleBatchInput() {
|
|
75594
|
+
async handleBatchInput() {
|
|
75510
75595
|
if (!this.batchInputContent.trim()) {
|
|
75511
75596
|
this.popoverVisible = false;
|
|
75512
75597
|
return;
|
|
@@ -75519,6 +75604,17 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75519
75604
|
return;
|
|
75520
75605
|
}
|
|
75521
75606
|
|
|
75607
|
+
// 如果optionsList为空且提供了loadOptions,先加载数据
|
|
75608
|
+
if (this.optionsList.length === 0 && this.loadOptions) {
|
|
75609
|
+
try {
|
|
75610
|
+
await this.fetchOptions();
|
|
75611
|
+
} catch (error) {
|
|
75612
|
+
console.error('批量查询时加载选项失败:', error);
|
|
75613
|
+
this.popoverVisible = false;
|
|
75614
|
+
return;
|
|
75615
|
+
}
|
|
75616
|
+
}
|
|
75617
|
+
|
|
75522
75618
|
// 根据输入类型匹配数据
|
|
75523
75619
|
let matchedValues = [];
|
|
75524
75620
|
let matchedItems = [];
|
|
@@ -75621,8 +75717,8 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75621
75717
|
;
|
|
75622
75718
|
var BatchQuerySelector_component = normalizeComponent(
|
|
75623
75719
|
batch_query_selector_BatchQuerySelectorvue_type_script_lang_js,
|
|
75624
|
-
|
|
75625
|
-
|
|
75720
|
+
BatchQuerySelectorvue_type_template_id_ae023dca_render,
|
|
75721
|
+
BatchQuerySelectorvue_type_template_id_ae023dca_staticRenderFns,
|
|
75626
75722
|
false,
|
|
75627
75723
|
null,
|
|
75628
75724
|
null,
|
package/lib/by-components.umd.js
CHANGED
|
@@ -60761,8 +60761,8 @@ var component = normalizeComponent(
|
|
|
60761
60761
|
)
|
|
60762
60762
|
|
|
60763
60763
|
/* harmony default export */ var pager = (component.exports);
|
|
60764
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60765
|
-
var
|
|
60764
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=3aefd0b0
|
|
60765
|
+
var tablevue_type_template_id_3aefd0b0_render = function render() {
|
|
60766
60766
|
var _vm = this,
|
|
60767
60767
|
_c = _vm._self._c;
|
|
60768
60768
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60836,7 +60836,7 @@ var tablevue_type_template_id_d8d0f56a_render = function render() {
|
|
|
60836
60836
|
}
|
|
60837
60837
|
}) : _vm._e()], 1);
|
|
60838
60838
|
};
|
|
60839
|
-
var
|
|
60839
|
+
var tablevue_type_template_id_3aefd0b0_staticRenderFns = [];
|
|
60840
60840
|
|
|
60841
60841
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60842
60842
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -61884,6 +61884,9 @@ var custom_column_component = normalizeComponent(
|
|
|
61884
61884
|
this.checkDeviceType();
|
|
61885
61885
|
this.initResizeListener();
|
|
61886
61886
|
}
|
|
61887
|
+
|
|
61888
|
+
// 前端分页模式下初始化默认排序
|
|
61889
|
+
this.initDefaultSortForFrontendPagination();
|
|
61887
61890
|
},
|
|
61888
61891
|
beforeDestroy() {
|
|
61889
61892
|
// 确保只在客户端环境中移除事件监听
|
|
@@ -61906,6 +61909,7 @@ var custom_column_component = normalizeComponent(
|
|
|
61906
61909
|
handler() {
|
|
61907
61910
|
this.$nextTick(() => {
|
|
61908
61911
|
setTimeout(() => {
|
|
61912
|
+
var _this$gridOptions$pag;
|
|
61909
61913
|
if (this.$refs.xGrid && this.$refs.xGrid.refreshScroll) {
|
|
61910
61914
|
this.$refs.xGrid.refreshScroll(); // 刷新滚动布局
|
|
61911
61915
|
}
|
|
@@ -61915,13 +61919,19 @@ var custom_column_component = normalizeComponent(
|
|
|
61915
61919
|
left: 0
|
|
61916
61920
|
});
|
|
61917
61921
|
}
|
|
61918
|
-
|
|
61919
|
-
|
|
61920
|
-
|
|
61921
|
-
|
|
61922
|
-
|
|
61923
|
-
|
|
61924
|
-
|
|
61922
|
+
|
|
61923
|
+
// 前端分页模式下,数据变化时确保默认排序高亮
|
|
61924
|
+
if ((_this$gridOptions$pag = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag !== void 0 && _this$gridOptions$pag.frontendPagination) {
|
|
61925
|
+
this.ensureDefaultSortHighlight();
|
|
61926
|
+
} else {
|
|
61927
|
+
// 非前端分页模式,恢复之前的排序高亮
|
|
61928
|
+
if (this.sortState.field && this.sortState.order && this.$refs.xGrid) {
|
|
61929
|
+
setTimeout(() => {
|
|
61930
|
+
this.$refs.xGrid.sort(this.sortState.field, this.sortState.order, {
|
|
61931
|
+
silent: true
|
|
61932
|
+
});
|
|
61933
|
+
}, 100);
|
|
61934
|
+
}
|
|
61925
61935
|
}
|
|
61926
61936
|
}, 0);
|
|
61927
61937
|
});
|
|
@@ -62131,9 +62141,9 @@ var custom_column_component = normalizeComponent(
|
|
|
62131
62141
|
* @param values 分页参数
|
|
62132
62142
|
*/
|
|
62133
62143
|
pageChange(values) {
|
|
62134
|
-
var _this$gridOptions$
|
|
62144
|
+
var _this$gridOptions$pag2;
|
|
62135
62145
|
// 前端分页
|
|
62136
|
-
if ((_this$gridOptions$
|
|
62146
|
+
if ((_this$gridOptions$pag2 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag2 !== void 0 && _this$gridOptions$pag2.frontendPagination) {
|
|
62137
62147
|
setTimeout(() => {
|
|
62138
62148
|
const newData = this.spliteListData(this.allData, values.page, values.limit);
|
|
62139
62149
|
this.$refs.xGrid.reloadData(newData);
|
|
@@ -62357,19 +62367,19 @@ var custom_column_component = normalizeComponent(
|
|
|
62357
62367
|
* @param event
|
|
62358
62368
|
*/
|
|
62359
62369
|
handleSortChange(event) {
|
|
62360
|
-
var _this$gridOptions$
|
|
62370
|
+
var _this$gridOptions$pag3, _this$gridOptions$sor;
|
|
62361
62371
|
const {
|
|
62362
62372
|
property,
|
|
62363
62373
|
order
|
|
62364
62374
|
} = event;
|
|
62365
|
-
const shouldHandleSort = ((_this$gridOptions$
|
|
62375
|
+
const shouldHandleSort = ((_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination) || ((_this$gridOptions$sor = this.gridOptions.sortConfig) === null || _this$gridOptions$sor === void 0 ? void 0 : _this$gridOptions$sor.frontendSort);
|
|
62366
62376
|
|
|
62367
62377
|
// 无论前端还是后端分页,都保存排序状态用于恢复箭头高亮
|
|
62368
62378
|
this.sortState.field = property;
|
|
62369
62379
|
this.sortState.order = order;
|
|
62370
62380
|
if (shouldHandleSort) {
|
|
62371
|
-
var _this$gridOptions$
|
|
62372
|
-
const newData = this.spliteListData(this.allData, (_this$gridOptions$
|
|
62381
|
+
var _this$gridOptions$pag4, _this$gridOptions$pag5;
|
|
62382
|
+
const newData = this.spliteListData(this.allData, (_this$gridOptions$pag4 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag4 !== void 0 && _this$gridOptions$pag4.frontendPagination ? this.gridOptions.pagerConfig.currentPage : null, (_this$gridOptions$pag5 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag5 !== void 0 && _this$gridOptions$pag5.frontendPagination ? this.gridOptions.pagerConfig.pageSize : null);
|
|
62373
62383
|
if (this.$refs.xGrid) {
|
|
62374
62384
|
this.$refs.xGrid.reloadData(newData);
|
|
62375
62385
|
this.$nextTick(() => {
|
|
@@ -62382,8 +62392,8 @@ var custom_column_component = normalizeComponent(
|
|
|
62382
62392
|
}, 100);
|
|
62383
62393
|
}
|
|
62384
62394
|
setTimeout(() => {
|
|
62385
|
-
var _this$gridOptions$
|
|
62386
|
-
if ((_this$gridOptions$
|
|
62395
|
+
var _this$gridOptions$pag6;
|
|
62396
|
+
if ((_this$gridOptions$pag6 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag6 !== void 0 && _this$gridOptions$pag6.frontendPagination && this.$refs.xGrid) {
|
|
62387
62397
|
// 前端分页时,排序状态变化,回到第一页
|
|
62388
62398
|
const currentPage = this.gridOptions.pagerConfig.currentPage;
|
|
62389
62399
|
if (currentPage !== 1) {
|
|
@@ -62426,6 +62436,58 @@ var custom_column_component = normalizeComponent(
|
|
|
62426
62436
|
silent: true
|
|
62427
62437
|
});
|
|
62428
62438
|
}, 100);
|
|
62439
|
+
},
|
|
62440
|
+
/**
|
|
62441
|
+
* 前端分页模式下初始化默认排序
|
|
62442
|
+
*/
|
|
62443
|
+
initDefaultSortForFrontendPagination() {
|
|
62444
|
+
var _this$gridOptions$pag7, _this$gridOptions$sor2;
|
|
62445
|
+
// 只在前端分页模式下处理默认排序
|
|
62446
|
+
if (!((_this$gridOptions$pag7 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag7 !== void 0 && _this$gridOptions$pag7.frontendPagination)) {
|
|
62447
|
+
return;
|
|
62448
|
+
}
|
|
62449
|
+
const defaultSort = (_this$gridOptions$sor2 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor2 === void 0 ? void 0 : _this$gridOptions$sor2.defaultSort;
|
|
62450
|
+
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62451
|
+
// 设置排序状态
|
|
62452
|
+
this.sortState.field = defaultSort.field;
|
|
62453
|
+
this.sortState.order = defaultSort.order;
|
|
62454
|
+
|
|
62455
|
+
// 在下一个tick中应用排序高亮
|
|
62456
|
+
this.$nextTick(() => {
|
|
62457
|
+
if (this.$refs.xGrid) {
|
|
62458
|
+
setTimeout(() => {
|
|
62459
|
+
// 只高亮排序图标,不触发排序事件
|
|
62460
|
+
this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
|
|
62461
|
+
silent: true
|
|
62462
|
+
});
|
|
62463
|
+
}, 100);
|
|
62464
|
+
}
|
|
62465
|
+
});
|
|
62466
|
+
}
|
|
62467
|
+
},
|
|
62468
|
+
/**
|
|
62469
|
+
* 确保默认排序高亮(前端分页模式下数据变化时调用)
|
|
62470
|
+
*/
|
|
62471
|
+
ensureDefaultSortHighlight() {
|
|
62472
|
+
var _this$gridOptions$pag8, _this$gridOptions$sor3;
|
|
62473
|
+
if (!((_this$gridOptions$pag8 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag8 !== void 0 && _this$gridOptions$pag8.frontendPagination)) {
|
|
62474
|
+
return;
|
|
62475
|
+
}
|
|
62476
|
+
const defaultSort = (_this$gridOptions$sor3 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor3 === void 0 ? void 0 : _this$gridOptions$sor3.defaultSort;
|
|
62477
|
+
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62478
|
+
// 确保排序状态与默认排序一致
|
|
62479
|
+
this.sortState.field = defaultSort.field;
|
|
62480
|
+
this.sortState.order = defaultSort.order;
|
|
62481
|
+
|
|
62482
|
+
// 应用排序高亮
|
|
62483
|
+
if (this.$refs.xGrid) {
|
|
62484
|
+
setTimeout(() => {
|
|
62485
|
+
this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
|
|
62486
|
+
silent: true
|
|
62487
|
+
});
|
|
62488
|
+
}, 100);
|
|
62489
|
+
}
|
|
62490
|
+
}
|
|
62429
62491
|
}
|
|
62430
62492
|
}
|
|
62431
62493
|
});
|
|
@@ -62441,8 +62503,8 @@ var custom_column_component = normalizeComponent(
|
|
|
62441
62503
|
;
|
|
62442
62504
|
var table_component = normalizeComponent(
|
|
62443
62505
|
components_tablevue_type_script_lang_js,
|
|
62444
|
-
|
|
62445
|
-
|
|
62506
|
+
tablevue_type_template_id_3aefd0b0_render,
|
|
62507
|
+
tablevue_type_template_id_3aefd0b0_staticRenderFns,
|
|
62446
62508
|
false,
|
|
62447
62509
|
null,
|
|
62448
62510
|
null,
|
|
@@ -74989,8 +75051,8 @@ var ByCommonSelector_component = normalizeComponent(
|
|
|
74989
75051
|
)
|
|
74990
75052
|
|
|
74991
75053
|
/* harmony default export */ var ByCommonSelector = (ByCommonSelector_component.exports);
|
|
74992
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=
|
|
74993
|
-
var
|
|
75054
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=template&id=ae023dca
|
|
75055
|
+
var BatchQuerySelectorvue_type_template_id_ae023dca_render = function render() {
|
|
74994
75056
|
var _vm = this,
|
|
74995
75057
|
_c = _vm._self._c;
|
|
74996
75058
|
return _c('div', {
|
|
@@ -75136,6 +75198,9 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_render = function render() {
|
|
|
75136
75198
|
"disabled": _vm.disabled || _vm.loading,
|
|
75137
75199
|
"size": _vm.size
|
|
75138
75200
|
},
|
|
75201
|
+
on: {
|
|
75202
|
+
"click": _vm.handleBatchButtonClick
|
|
75203
|
+
},
|
|
75139
75204
|
slot: "reference"
|
|
75140
75205
|
}, [_c('i', {
|
|
75141
75206
|
staticClass: "el-icon-edit-outline",
|
|
@@ -75145,7 +75210,7 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_render = function render() {
|
|
|
75145
75210
|
}
|
|
75146
75211
|
})])], 1)], 1)]);
|
|
75147
75212
|
};
|
|
75148
|
-
var
|
|
75213
|
+
var BatchQuerySelectorvue_type_template_id_ae023dca_staticRenderFns = [];
|
|
75149
75214
|
|
|
75150
75215
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/batch-query-selector/BatchQuerySelector.vue?vue&type=script&lang=js
|
|
75151
75216
|
|
|
@@ -75386,9 +75451,23 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75386
75451
|
// 处理下拉框显示/隐藏
|
|
75387
75452
|
handleDropdownVisibleChange(visible) {
|
|
75388
75453
|
this.dropdownVisible = visible;
|
|
75454
|
+
if (visible) {
|
|
75455
|
+
// 下拉框打开时,重置搜索关键词,确保显示所有选项
|
|
75456
|
+
this.keyword = '';
|
|
75457
|
+
this.filteredOptions = [...this.optionsList];
|
|
75458
|
+
this.currentPage = this.initialPageCount;
|
|
75459
|
+
this.updateVisibleOptions();
|
|
75389
75460
|
|
|
75390
|
-
|
|
75391
|
-
|
|
75461
|
+
// 清空 el-select 的搜索输入框
|
|
75462
|
+
this.$nextTick(() => {
|
|
75463
|
+
var _this$$refs$elSelect, _this$$refs$elSelect$, _this$$refs$elSelect$2, _this$$refs$elSelect$3;
|
|
75464
|
+
const selectInput = (_this$$refs$elSelect = this.$refs.elSelect) === null || _this$$refs$elSelect === void 0 ? void 0 : (_this$$refs$elSelect$ = _this$$refs$elSelect.$refs) === null || _this$$refs$elSelect$ === void 0 ? void 0 : (_this$$refs$elSelect$2 = _this$$refs$elSelect$.input) === null || _this$$refs$elSelect$2 === void 0 ? void 0 : (_this$$refs$elSelect$3 = _this$$refs$elSelect$2.$refs) === null || _this$$refs$elSelect$3 === void 0 ? void 0 : _this$$refs$elSelect$3.input;
|
|
75465
|
+
if (selectInput) {
|
|
75466
|
+
selectInput.value = '';
|
|
75467
|
+
}
|
|
75468
|
+
});
|
|
75469
|
+
} else {
|
|
75470
|
+
// 如果下拉框关闭,重置hasFocused标记,以便下次打开时能够正确触发focus事件
|
|
75392
75471
|
this.hasFocused = false;
|
|
75393
75472
|
}
|
|
75394
75473
|
},
|
|
@@ -75515,8 +75594,14 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75515
75594
|
this.updateVisibleOptions();
|
|
75516
75595
|
}, 200);
|
|
75517
75596
|
},
|
|
75597
|
+
// 处理批量按钮点击 (为了在还未加载过数据的情况下触发加载数据)
|
|
75598
|
+
handleBatchButtonClick(e) {
|
|
75599
|
+
if (this.optionsList.length === 0 && !this.loadOptions) {
|
|
75600
|
+
this.$emit('batch-selector-focus', e);
|
|
75601
|
+
}
|
|
75602
|
+
},
|
|
75518
75603
|
// 处理批量输入
|
|
75519
|
-
handleBatchInput() {
|
|
75604
|
+
async handleBatchInput() {
|
|
75520
75605
|
if (!this.batchInputContent.trim()) {
|
|
75521
75606
|
this.popoverVisible = false;
|
|
75522
75607
|
return;
|
|
@@ -75529,6 +75614,17 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75529
75614
|
return;
|
|
75530
75615
|
}
|
|
75531
75616
|
|
|
75617
|
+
// 如果optionsList为空且提供了loadOptions,先加载数据
|
|
75618
|
+
if (this.optionsList.length === 0 && this.loadOptions) {
|
|
75619
|
+
try {
|
|
75620
|
+
await this.fetchOptions();
|
|
75621
|
+
} catch (error) {
|
|
75622
|
+
console.error('批量查询时加载选项失败:', error);
|
|
75623
|
+
this.popoverVisible = false;
|
|
75624
|
+
return;
|
|
75625
|
+
}
|
|
75626
|
+
}
|
|
75627
|
+
|
|
75532
75628
|
// 根据输入类型匹配数据
|
|
75533
75629
|
let matchedValues = [];
|
|
75534
75630
|
let matchedItems = [];
|
|
@@ -75631,8 +75727,8 @@ var BatchQuerySelectorvue_type_template_id_39d784a5_staticRenderFns = [];
|
|
|
75631
75727
|
;
|
|
75632
75728
|
var BatchQuerySelector_component = normalizeComponent(
|
|
75633
75729
|
batch_query_selector_BatchQuerySelectorvue_type_script_lang_js,
|
|
75634
|
-
|
|
75635
|
-
|
|
75730
|
+
BatchQuerySelectorvue_type_template_id_ae023dca_render,
|
|
75731
|
+
BatchQuerySelectorvue_type_template_id_ae023dca_staticRenderFns,
|
|
75636
75732
|
false,
|
|
75637
75733
|
null,
|
|
75638
75734
|
null,
|