@cimom-ui/standard-ui 1.1.16 → 1.1.18
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/dist/standard-ui.common.js +671 -53
- package/dist/standard-ui.umd.js +671 -53
- package/dist/standard-ui.umd.min.js +3 -3
- package/package.json +1 -1
package/dist/standard-ui.umd.js
CHANGED
|
@@ -3142,12 +3142,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3142
3142
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
3143
3143
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
|
|
3144
3144
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
3145
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4417);
|
|
3146
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
3145
3147
|
// Imports
|
|
3146
3148
|
|
|
3147
3149
|
|
|
3150
|
+
|
|
3151
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(9793), __webpack_require__.b);
|
|
3148
3152
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
3153
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
3149
3154
|
// Module
|
|
3150
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-table-panel{flex:1 1 0%;min-width:0;min-height:0;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);height:100%;overflow:hidden;display:flex;flex-direction:column}.normal-report-table-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 12px}.normal-report-table-wrap .el-table,.normal-report-table-wrap .vxe-table{flex:1;min-height:0}.normal-report-table-actions{flex-shrink:0;display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #edf1f6;margin-bottom:10px}.normal-report-table-actions .el-button+.el-button{margin-left:0}.normal-report-table-actions-left{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.normal-report-table-actions-right{flex-shrink:0;margin-left:auto;display:flex;align-items:center;gap:6px}.standard-toolbar-left,.standard-toolbar-query,.standard-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0}.standard-toolbar-left .el-button+.el-button,.standard-toolbar-query .el-button+.el-button,.standard-toolbar-right .el-button+.el-button{margin-left:0}.normal-report-column-setting-entry,.normal-report-column-setting-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.normal-report-column-setting{min-width:270px}.normal-report-column-setting-header{padding-bottom:8px;border-bottom:1px solid #ebeef5}.normal-report-column-setting-list{max-height:300px;overflow-y:auto;padding:4px 0}.normal-report-column-setting-item{display:flex;align-items:center;gap:2px;padding:5px 4px;border-radius:4px}.normal-report-column-setting-item .el-checkbox{flex:1;min-width:0;margin-right:0;display:flex;align-items:center}.normal-report-column-setting-item .el-checkbox__input{display:flex;align-items:center;flex-shrink:0}.normal-report-column-setting-item .normal-report-column-setting-item-title{cursor:grab}.normal-report-column-setting-item .normal-report-column-setting-item-title:active{cursor:grabbing}.normal-report-column-setting-item .el-checkbox,.normal-report-column-setting-item .el-checkbox__label{-webkit-user-select:none;-moz-user-select:none;user-select:none}.normal-report-column-setting-item .normal-report-column-setting-item-title .el-checkbox__label{flex-shrink:0;width:var(--normal-report-title-width);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.normal-report-column-setting-item .normal-report-column-setting-item-width{flex-shrink:0;width:92px}.normal-report-column-setting-item .el-button+.el-button{margin-left:0}.normal-report-column-setting-item .is-pinned{color:#409eff}.normal-report-column-setting-item .is-sort-off,.normal-report-column-setting-item .is-sort-off:focus,.normal-report-column-setting-item .is-sort-off:hover{color:#c0c4cc}.normal-report-column-setting-item.drag-over{background:#ecf5ff}.normal-report-column-setting-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}.normal-report-table-footer{flex-shrink:0;box-sizing:border-box;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:8px 12px;border-top:1px solid #edf1f6}.normal-report-table-footer .normal-report-table-pagination{padding-top:0}.normal-report-table-footer.is-only-pagination{justify-content:flex-end}.normal-report-footer-empty{margin-top:10px}.normal-report-toolbar-empty{margin-bottom:10px}.normal-report-update-time{font-size:13px;color:#909399;flex-shrink:0}.vxe-table--context-menu-wrapper .vxe-context-menu--option-wrapper+.vxe-context-menu--option-wrapper,.vxe-table--context-menu-wrapper .vxe-table--context-menu-group-wrapper+.vxe-table--context-menu-group-wrapper{border-top:1px solid #e8eaec;margin-top:2px;padding-top:2px}.normal-report-table-pagination{flex-shrink:0;padding-top:10px;text-align:right}.normal-report-op-more{margin-left:10px}.normal-report-main-table.vxe-table .vxe-body--row{transition:transform .22s ease,filter .22s ease}.normal-report-main-table.vxe-table .vxe-body--row:hover{transform:translateY(-3px);filter:drop-shadow(0 8px 16px rgba(31,73,125,.22))}.vxe-table--footer-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--footer-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:active{background-color:#dddee0!important}.vxe-table--footer-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--body-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb:active,.vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover{background-color:#dddee0!important}.vxe-table--body-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table .vxe-header--row{height:36px!important}.vxe-table .vxe-header--column{padding:0!important;color:#636364!important;font-weight:600!important;font-size:13px!important;background-color:#f5f7fa!important}.vxe-table .vxe-header--column,.vxe-table .vxe-header--column>.vxe-cell{height:36px!important;max-height:36px!important;line-height:36px!important}.vxe-table .vxe-header--column>.vxe-cell{padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-body--row{height:34px!important}.vxe-table .vxe-body--row td.vxe-body--column{font-size:12px!important}.vxe-table .vxe-body--column>.vxe-cell,.vxe-table .vxe-body--row td.vxe-body--column{height:34px!important;max-height:34px!important;line-height:34px!important;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-tree-cell{display:flex;align-items:center;height:34px;line-height:34px;overflow:hidden}.vxe-table .vxe-body--column .el-tag--mini{height:26px;line-height:24px;padding:0 4px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column .el-button--mini{height:26px;line-height:24px;padding:0 2px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column.col--active>.vxe-cell{overflow:visible!important;line-height:normal!important}.vxe-table .vxe-body--column.col--active .el-input,.vxe-table .vxe-body--column.col--active .el-input__inner,.vxe-table .vxe-body--column.col--active .vxe-default-input,.vxe-table .vxe-body--column.col--active .vxe-default-select,.vxe-table .vxe-body--column.col--active .vxe-default-textarea,.vxe-table .vxe-body--column.col--active .vxe-input{width:100%;height:34px!important;max-height:34px!important;line-height:32px!important;font-size:12px!important;box-sizing:border-box}.vxe-header--column.nr-header-drag-source{opacity:.45}.vxe-header--column.nr-header-drag-target{background-color:rgba(64,158,255,.08);box-shadow:inset 2px 0 0 #409eff}body.nr-header-dragging{-webkit-user-select:none;-moz-user-select:none;user-select:none}body.nr-header-dragging .vxe-header--column{cursor:grab}`, ""]);
|
|
3155
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-table-panel{flex:1 1 0%;min-width:0;min-height:0;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);height:100%;overflow:hidden;display:flex;flex-direction:column}.normal-report-table-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 12px}.normal-report-table-wrap .el-table,.normal-report-table-wrap .vxe-table{flex:1;min-height:0}.normal-report-table-actions{flex-shrink:0;display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #edf1f6;margin-bottom:10px}.normal-report-table-actions .el-button+.el-button{margin-left:0}.normal-report-table-actions-left{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.normal-report-table-actions-right{flex-shrink:0;margin-left:auto;display:flex;align-items:center;gap:6px}.standard-toolbar-left,.standard-toolbar-query,.standard-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0}.standard-toolbar-left .el-button+.el-button,.standard-toolbar-query .el-button+.el-button,.standard-toolbar-right .el-button+.el-button{margin-left:0}.normal-report-column-setting-entry,.normal-report-column-setting-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.normal-report-column-setting{min-width:270px}.normal-report-column-setting-header{padding-bottom:8px;border-bottom:1px solid #ebeef5}.normal-report-column-setting-list{max-height:300px;overflow-y:auto;padding:4px 0}.normal-report-column-setting-item{display:flex;align-items:center;gap:2px;padding:5px 4px;border-radius:4px}.normal-report-column-setting-item .el-checkbox{flex:1;min-width:0;margin-right:0;display:flex;align-items:center}.normal-report-column-setting-item .el-checkbox__input{display:flex;align-items:center;flex-shrink:0}.normal-report-column-setting-item .normal-report-column-setting-item-title{cursor:grab}.normal-report-column-setting-item .normal-report-column-setting-item-title:active{cursor:grabbing}.normal-report-column-setting-item .el-checkbox,.normal-report-column-setting-item .el-checkbox__label{-webkit-user-select:none;-moz-user-select:none;user-select:none}.normal-report-column-setting-item .normal-report-column-setting-item-title .el-checkbox__label{flex-shrink:0;width:var(--normal-report-title-width);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.normal-report-column-setting-item .normal-report-column-setting-item-width{flex-shrink:0;width:92px}.normal-report-column-setting-item .el-button+.el-button{margin-left:0}.normal-report-column-setting-item .is-pinned{color:#409eff}.normal-report-column-setting-item .is-sort-off,.normal-report-column-setting-item .is-sort-off:focus,.normal-report-column-setting-item .is-sort-off:hover{color:#c0c4cc}.normal-report-column-setting-item.drag-over{background:#ecf5ff}.normal-report-column-setting-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}.normal-report-table-footer{flex-shrink:0;box-sizing:border-box;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:8px 12px;border-top:1px solid #edf1f6}.normal-report-table-footer .normal-report-table-pagination{padding-top:0}.normal-report-table-footer.is-only-pagination{justify-content:flex-end}.normal-report-footer-empty{margin-top:10px}.normal-report-toolbar-empty{margin-bottom:10px}.normal-report-update-time{font-size:13px;color:#909399;flex-shrink:0}.vxe-table--context-menu-wrapper .vxe-context-menu--option-wrapper+.vxe-context-menu--option-wrapper,.vxe-table--context-menu-wrapper .vxe-table--context-menu-group-wrapper+.vxe-table--context-menu-group-wrapper{border-top:1px solid #e8eaec;margin-top:2px;padding-top:2px}.normal-report-table-pagination{flex-shrink:0;padding-top:10px;text-align:right}.normal-report-op-more{margin-left:10px}.normal-report-main-table.vxe-table .vxe-body--row{transition:transform .22s ease,filter .22s ease}.normal-report-main-table.vxe-table .vxe-body--row:hover{transform:translateY(-3px);filter:drop-shadow(0 8px 16px rgba(31,73,125,.22))}.vxe-table--footer-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--footer-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:active{background-color:#dddee0!important}.vxe-table--footer-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--body-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb:active,.vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover{background-color:#dddee0!important}.vxe-table--body-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table .vxe-header--row{height:36px!important}.vxe-table .vxe-header--column{padding:0!important;color:#636364!important;font-weight:600!important;font-size:13px!important;background-color:#f5f7fa!important}.vxe-table .vxe-header--column,.vxe-table .vxe-header--column>.vxe-cell{height:36px!important;max-height:36px!important;line-height:36px!important}.vxe-table .vxe-header--column>.vxe-cell{display:flex;align-items:center;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-body--row{height:34px!important}.vxe-table .vxe-body--row td.vxe-body--column{font-size:12px!important}.vxe-table .vxe-body--column>.vxe-cell,.vxe-table .vxe-body--row td.vxe-body--column{height:34px!important;max-height:34px!important;line-height:34px!important;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-tree-cell{display:flex;align-items:center;height:34px;line-height:34px;overflow:hidden}.vxe-table .vxe-body--column .el-tag--mini{height:26px;line-height:24px;padding:0 4px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column .el-button--mini{height:26px;line-height:24px;padding:0 2px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column.col--active>.vxe-cell{overflow:visible!important;line-height:normal!important}.vxe-table .vxe-body--column.col--active .el-input,.vxe-table .vxe-body--column.col--active .el-input__inner,.vxe-table .vxe-body--column.col--active .vxe-default-input,.vxe-table .vxe-body--column.col--active .vxe-default-select,.vxe-table .vxe-body--column.col--active .vxe-default-textarea,.vxe-table .vxe-body--column.col--active .vxe-input{width:100%;height:34px!important;max-height:34px!important;line-height:32px!important;font-size:12px!important;box-sizing:border-box}.vxe-header--column.nr-header-drag-source{opacity:.45}.vxe-header--column.nr-header-drag-target{background-color:rgba(64,158,255,.08);box-shadow:inset 2px 0 0 #409eff}body.nr-header-dragging{-webkit-user-select:none;-moz-user-select:none;user-select:none}body.nr-header-dragging .vxe-header--column{cursor:grab}.nr-icon-filter{display:inline-block;width:14px;height:14px;background-color:currentColor;vertical-align:-2px;-webkit-mask:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) center/contain no-repeat;mask:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) center/contain no-repeat}.normal-report-column-setting-item .nr-icon-filter{width:12px;height:12px;vertical-align:middle}.normal-report-main-table .vxe-cell--sort{display:none}.normal-report-main-table .vxe-cell--title:has(.nr-col-title){display:flex;flex:1;min-width:0}.normal-report-main-table .nr-col-title{display:flex;align-items:center;width:100%;min-width:0;height:100%;line-height:1}.normal-report-main-table .nr-col-title-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;line-height:36px}.normal-report-main-table .nr-col-tools{display:inline-flex;align-items:center;flex:none;gap:4px;margin-left:auto;padding-left:4px}.normal-report-main-table .nr-col-tool{flex-shrink:0;cursor:pointer;color:#909399;font-size:13px;line-height:1}.normal-report-main-table .nr-col-tool.is-active,.normal-report-main-table .nr-col-tool.is-active:hover{color:#409eff}.normal-report-main-table .nr-col-tool.nr-icon-filter{width:13px;height:13px}.nr-col-tool-popper{padding:10px 12px}.nr-col-filter-select{display:block;width:220px}.nr-col-search-input{width:200px}`, ""]);
|
|
3151
3156
|
// Exports
|
|
3152
3157
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
3153
3158
|
|
|
@@ -3275,6 +3280,39 @@ module.exports = function (cssWithMappingToString) {
|
|
|
3275
3280
|
|
|
3276
3281
|
/***/ },
|
|
3277
3282
|
|
|
3283
|
+
/***/ 4417
|
|
3284
|
+
(module) {
|
|
3285
|
+
|
|
3286
|
+
"use strict";
|
|
3287
|
+
|
|
3288
|
+
|
|
3289
|
+
module.exports = function (url, options) {
|
|
3290
|
+
if (!options) {
|
|
3291
|
+
options = {};
|
|
3292
|
+
}
|
|
3293
|
+
if (!url) {
|
|
3294
|
+
return url;
|
|
3295
|
+
}
|
|
3296
|
+
url = String(url.__esModule ? url.default : url);
|
|
3297
|
+
|
|
3298
|
+
// If url is already wrapped in quotes, remove them
|
|
3299
|
+
if (/^['"].*['"]$/.test(url)) {
|
|
3300
|
+
url = url.slice(1, -1);
|
|
3301
|
+
}
|
|
3302
|
+
if (options.hash) {
|
|
3303
|
+
url += options.hash;
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
// Should url be wrapped?
|
|
3307
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
|
3308
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
|
3309
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
3310
|
+
}
|
|
3311
|
+
return url;
|
|
3312
|
+
};
|
|
3313
|
+
|
|
3314
|
+
/***/ },
|
|
3315
|
+
|
|
3278
3316
|
/***/ 1601
|
|
3279
3317
|
(module) {
|
|
3280
3318
|
|
|
@@ -118151,6 +118189,14 @@ VxeUI.setTheme('light');
|
|
|
118151
118189
|
|
|
118152
118190
|
|
|
118153
118191
|
|
|
118192
|
+
/***/ },
|
|
118193
|
+
|
|
118194
|
+
/***/ 9793
|
|
118195
|
+
(module) {
|
|
118196
|
+
|
|
118197
|
+
"use strict";
|
|
118198
|
+
module.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M1 2h14L9.8 8.2V14l-3.6-1.4V8.2z%27/%3E%3C/svg%3E";
|
|
118199
|
+
|
|
118154
118200
|
/***/ },
|
|
118155
118201
|
|
|
118156
118202
|
/***/ 9274
|
|
@@ -118268,6 +118314,27 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9274__;
|
|
|
118268
118314
|
/******/ return module;
|
|
118269
118315
|
/******/ };
|
|
118270
118316
|
/******/
|
|
118317
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
118318
|
+
/******/ (() => {
|
|
118319
|
+
/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
|
|
118320
|
+
/******/
|
|
118321
|
+
/******/ // no installed chunks
|
|
118322
|
+
/******/
|
|
118323
|
+
/******/ // no chunk on demand loading
|
|
118324
|
+
/******/
|
|
118325
|
+
/******/ // no prefetching
|
|
118326
|
+
/******/
|
|
118327
|
+
/******/ // no preloaded
|
|
118328
|
+
/******/
|
|
118329
|
+
/******/ // no HMR
|
|
118330
|
+
/******/
|
|
118331
|
+
/******/ // no HMR manifest
|
|
118332
|
+
/******/
|
|
118333
|
+
/******/ // no on chunks loaded
|
|
118334
|
+
/******/
|
|
118335
|
+
/******/ // no jsonp function
|
|
118336
|
+
/******/ })();
|
|
118337
|
+
/******/
|
|
118271
118338
|
/************************************************************************/
|
|
118272
118339
|
let __webpack_exports__ = {};
|
|
118273
118340
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
@@ -121532,8 +121599,8 @@ var StandardTimePick_component = normalizeComponent(
|
|
|
121532
121599
|
)
|
|
121533
121600
|
|
|
121534
121601
|
/* harmony default export */ const StandardTimePick = (StandardTimePick_component.exports);
|
|
121535
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=template&id=
|
|
121536
|
-
var
|
|
121602
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=template&id=d034e982
|
|
121603
|
+
var StandardTablevue_type_template_id_d034e982_render = function render() {
|
|
121537
121604
|
var _vm = this,
|
|
121538
121605
|
_c = _vm._self._c;
|
|
121539
121606
|
return _c('section', {
|
|
@@ -121690,6 +121757,39 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121690
121757
|
return _vm.toggleColumnSortable(col);
|
|
121691
121758
|
}
|
|
121692
121759
|
}
|
|
121760
|
+
}), _c('el-button', {
|
|
121761
|
+
"class": {
|
|
121762
|
+
'is-pinned': col.filterable,
|
|
121763
|
+
'is-sort-off': !col.filterable
|
|
121764
|
+
},
|
|
121765
|
+
attrs: {
|
|
121766
|
+
"type": "text",
|
|
121767
|
+
"size": "mini",
|
|
121768
|
+
"title": "是否显示筛选功能"
|
|
121769
|
+
},
|
|
121770
|
+
on: {
|
|
121771
|
+
"click": function click($event) {
|
|
121772
|
+
return _vm.toggleColumnFilterable(col);
|
|
121773
|
+
}
|
|
121774
|
+
}
|
|
121775
|
+
}, [_c('i', {
|
|
121776
|
+
staticClass: "nr-icon-filter"
|
|
121777
|
+
})]), _c('el-button', {
|
|
121778
|
+
"class": {
|
|
121779
|
+
'is-pinned': col.searchable,
|
|
121780
|
+
'is-sort-off': !col.searchable
|
|
121781
|
+
},
|
|
121782
|
+
attrs: {
|
|
121783
|
+
"type": "text",
|
|
121784
|
+
"size": "mini",
|
|
121785
|
+
"icon": "el-icon-search",
|
|
121786
|
+
"title": "是否显示搜索功能"
|
|
121787
|
+
},
|
|
121788
|
+
on: {
|
|
121789
|
+
"click": function click($event) {
|
|
121790
|
+
return _vm.toggleColumnSearchable(col);
|
|
121791
|
+
}
|
|
121792
|
+
}
|
|
121693
121793
|
}), _c('el-button', {
|
|
121694
121794
|
"class": {
|
|
121695
121795
|
'is-pinned': col.fixed === 'left'
|
|
@@ -121763,7 +121863,7 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121763
121863
|
"height": _vm.height,
|
|
121764
121864
|
"z-index": _vm.zIndex || undefined,
|
|
121765
121865
|
"loading": _vm.loading,
|
|
121766
|
-
"data": _vm.
|
|
121866
|
+
"data": _vm.displayTableData,
|
|
121767
121867
|
"border": "",
|
|
121768
121868
|
"highlight-current-row": "",
|
|
121769
121869
|
"row-config": _vm.rowConfig,
|
|
@@ -121777,11 +121877,13 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121777
121877
|
"resizable-config": {
|
|
121778
121878
|
minWidth: 60
|
|
121779
121879
|
},
|
|
121880
|
+
"sort-config": _vm.sortConfig,
|
|
121780
121881
|
"show-footer": !!_vm.footerMethod,
|
|
121781
121882
|
"footer-method": _vm.footerMethod,
|
|
121782
121883
|
"menu-config": _vm.resolvedMenuConfig
|
|
121783
121884
|
},
|
|
121784
121885
|
on: {
|
|
121886
|
+
"sort-change": _vm.onSortChange,
|
|
121785
121887
|
"menu-click": _vm.onMenuClick,
|
|
121786
121888
|
"resizable-change": _vm.onColumnResizableChange,
|
|
121787
121889
|
"checkbox-change": _vm.handleCheckboxChange,
|
|
@@ -121825,6 +121927,135 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121825
121927
|
"edit-render": col.editRender || undefined
|
|
121826
121928
|
},
|
|
121827
121929
|
scopedSlots: _vm._u([{
|
|
121930
|
+
key: _vm.headerToolSlot,
|
|
121931
|
+
fn: function fn() {
|
|
121932
|
+
return [_c('span', {
|
|
121933
|
+
staticClass: "nr-col-title"
|
|
121934
|
+
}, [_c('span', {
|
|
121935
|
+
staticClass: "nr-col-title-text"
|
|
121936
|
+
}, [_vm._v(_vm._s(col.title))]), col.sortable || col.filterable || col.searchable ? _c('span', {
|
|
121937
|
+
staticClass: "nr-col-tools"
|
|
121938
|
+
}, [col.sortable ? _c('i', {
|
|
121939
|
+
staticClass: "el-icon-sort nr-col-tool",
|
|
121940
|
+
"class": {
|
|
121941
|
+
'is-active': _vm.columnSortOrder(col) !== ''
|
|
121942
|
+
},
|
|
121943
|
+
attrs: {
|
|
121944
|
+
"title": _vm.columnSortTitle(col)
|
|
121945
|
+
},
|
|
121946
|
+
on: {
|
|
121947
|
+
"click": function click($event) {
|
|
121948
|
+
$event.stopPropagation();
|
|
121949
|
+
return _vm.toggleColumnSort(col, $event);
|
|
121950
|
+
},
|
|
121951
|
+
"mousedown": function mousedown($event) {
|
|
121952
|
+
$event.stopPropagation();
|
|
121953
|
+
}
|
|
121954
|
+
}
|
|
121955
|
+
}) : _vm._e(), col.filterable ? _c('el-popover', {
|
|
121956
|
+
attrs: {
|
|
121957
|
+
"placement": "bottom-start",
|
|
121958
|
+
"trigger": "click",
|
|
121959
|
+
"popper-class": "nr-col-tool-popper"
|
|
121960
|
+
},
|
|
121961
|
+
on: {
|
|
121962
|
+
"show": function show($event) {
|
|
121963
|
+
return _vm.openColumnFilter(col);
|
|
121964
|
+
}
|
|
121965
|
+
}
|
|
121966
|
+
}, [_c('el-select', {
|
|
121967
|
+
ref: 'colFilter' + col.uid,
|
|
121968
|
+
refInFor: true,
|
|
121969
|
+
staticClass: "nr-col-filter-select",
|
|
121970
|
+
attrs: {
|
|
121971
|
+
"value": _vm.columnFilterValue(col),
|
|
121972
|
+
"multiple": "",
|
|
121973
|
+
"filterable": "",
|
|
121974
|
+
"clearable": "",
|
|
121975
|
+
"collapse-tags": "",
|
|
121976
|
+
"size": "mini",
|
|
121977
|
+
"placeholder": "请选择",
|
|
121978
|
+
"popper-append-to-body": false
|
|
121979
|
+
},
|
|
121980
|
+
on: {
|
|
121981
|
+
"change": function change(values) {
|
|
121982
|
+
return _vm.setColumnFilter(col, values);
|
|
121983
|
+
}
|
|
121984
|
+
}
|
|
121985
|
+
}, _vm._l(_vm.columnFilterOptions(col), function (opt) {
|
|
121986
|
+
return _c('el-option', {
|
|
121987
|
+
key: opt.key,
|
|
121988
|
+
attrs: {
|
|
121989
|
+
"label": opt.label,
|
|
121990
|
+
"value": opt.value
|
|
121991
|
+
}
|
|
121992
|
+
});
|
|
121993
|
+
}), 1), _c('i', {
|
|
121994
|
+
staticClass: "nr-icon-filter nr-col-tool",
|
|
121995
|
+
"class": {
|
|
121996
|
+
'is-active': _vm.columnFilterActive(col)
|
|
121997
|
+
},
|
|
121998
|
+
attrs: {
|
|
121999
|
+
"slot": "reference",
|
|
122000
|
+
"title": "筛选"
|
|
122001
|
+
},
|
|
122002
|
+
on: {
|
|
122003
|
+
"click": function click($event) {
|
|
122004
|
+
$event.stopPropagation();
|
|
122005
|
+
},
|
|
122006
|
+
"mousedown": function mousedown($event) {
|
|
122007
|
+
$event.stopPropagation();
|
|
122008
|
+
}
|
|
122009
|
+
},
|
|
122010
|
+
slot: "reference"
|
|
122011
|
+
})], 1) : _vm._e(), col.searchable ? _c('el-popover', {
|
|
122012
|
+
attrs: {
|
|
122013
|
+
"placement": "bottom-start",
|
|
122014
|
+
"trigger": "click",
|
|
122015
|
+
"popper-class": "nr-col-tool-popper"
|
|
122016
|
+
},
|
|
122017
|
+
on: {
|
|
122018
|
+
"show": function show($event) {
|
|
122019
|
+
return _vm.focusColumnSearch(col);
|
|
122020
|
+
}
|
|
122021
|
+
}
|
|
122022
|
+
}, [_c('el-input', {
|
|
122023
|
+
ref: 'colSearch' + col.uid,
|
|
122024
|
+
refInFor: true,
|
|
122025
|
+
staticClass: "nr-col-search-input",
|
|
122026
|
+
attrs: {
|
|
122027
|
+
"value": _vm.columnKeyword(col),
|
|
122028
|
+
"size": "mini",
|
|
122029
|
+
"clearable": "",
|
|
122030
|
+
"placeholder": "请输入关键字"
|
|
122031
|
+
},
|
|
122032
|
+
on: {
|
|
122033
|
+
"input": function input(value) {
|
|
122034
|
+
return _vm.setColumnKeyword(col, value);
|
|
122035
|
+
}
|
|
122036
|
+
}
|
|
122037
|
+
}), _c('i', {
|
|
122038
|
+
staticClass: "el-icon-search nr-col-tool",
|
|
122039
|
+
"class": {
|
|
122040
|
+
'is-active': _vm.columnSearchActive(col)
|
|
122041
|
+
},
|
|
122042
|
+
attrs: {
|
|
122043
|
+
"slot": "reference",
|
|
122044
|
+
"title": "搜索"
|
|
122045
|
+
},
|
|
122046
|
+
on: {
|
|
122047
|
+
"click": function click($event) {
|
|
122048
|
+
$event.stopPropagation();
|
|
122049
|
+
},
|
|
122050
|
+
"mousedown": function mousedown($event) {
|
|
122051
|
+
$event.stopPropagation();
|
|
122052
|
+
}
|
|
122053
|
+
},
|
|
122054
|
+
slot: "reference"
|
|
122055
|
+
})], 1) : _vm._e()], 1) : _vm._e()])];
|
|
122056
|
+
},
|
|
122057
|
+
proxy: true
|
|
122058
|
+
}, {
|
|
121828
122059
|
key: "default",
|
|
121829
122060
|
fn: function fn(scope) {
|
|
121830
122061
|
return [_c('normal-report-cell', {
|
|
@@ -121868,7 +122099,7 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121868
122099
|
}
|
|
121869
122100
|
}) : _vm.getFooterEmptyVisible() ? _c('standard-footer-empty') : _vm._e()], 1);
|
|
121870
122101
|
};
|
|
121871
|
-
var
|
|
122102
|
+
var StandardTablevue_type_template_id_d034e982_staticRenderFns = [];
|
|
121872
122103
|
|
|
121873
122104
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/ToolbarEmpty.vue?vue&type=script&lang=js
|
|
121874
122105
|
/**
|
|
@@ -122077,7 +122308,9 @@ function readSavedColumn(item) {
|
|
|
122077
122308
|
fixed: item.Fixed != null ? item.Fixed : item.fixed,
|
|
122078
122309
|
minWidth: item.MinWidth !== undefined ? item.MinWidth : item.minWidth,
|
|
122079
122310
|
width: item.Width !== undefined ? item.Width : item.width,
|
|
122080
|
-
sortable: item.Sortable !== undefined ? item.Sortable : item.sortable
|
|
122311
|
+
sortable: item.Sortable !== undefined ? item.Sortable : item.sortable,
|
|
122312
|
+
filterable: item.Filterable !== undefined ? item.Filterable : item.filterable,
|
|
122313
|
+
searchable: item.Searchable !== undefined ? item.Searchable : item.searchable
|
|
122081
122314
|
};
|
|
122082
122315
|
}
|
|
122083
122316
|
function savedFixed(value) {
|
|
@@ -122188,7 +122421,9 @@ function mergeColumnConfig(comps, savedColumns) {
|
|
|
122188
122421
|
fixed: savedFixed(row.saved.fixed),
|
|
122189
122422
|
minWidth: savedMinWidth(row.saved.minWidth),
|
|
122190
122423
|
width: savedWidth(row.saved.width),
|
|
122191
|
-
sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable
|
|
122424
|
+
sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable,
|
|
122425
|
+
filterable: row.saved.filterable != null ? !!row.saved.filterable : false,
|
|
122426
|
+
searchable: row.saved.searchable != null ? !!row.saved.searchable : false
|
|
122192
122427
|
}
|
|
122193
122428
|
});
|
|
122194
122429
|
});
|
|
@@ -122218,7 +122453,9 @@ function buildColumnPayload(comps, order, states) {
|
|
|
122218
122453
|
Fixed: savedFixed(st.fixed),
|
|
122219
122454
|
MinWidth: savedMinWidth(st.minWidth),
|
|
122220
122455
|
Width: savedWidth(st.width),
|
|
122221
|
-
Sortable: !!st.sortable
|
|
122456
|
+
Sortable: !!st.sortable,
|
|
122457
|
+
Filterable: !!st.filterable,
|
|
122458
|
+
Searchable: !!st.searchable
|
|
122222
122459
|
});
|
|
122223
122460
|
});
|
|
122224
122461
|
return columns;
|
|
@@ -122237,6 +122474,8 @@ function isDefaultColumnPayload(comps, columns) {
|
|
|
122237
122474
|
if (col.Visible !== true) return false;
|
|
122238
122475
|
if ((col.Fixed || '') !== (comp.fixed || '')) return false;
|
|
122239
122476
|
if (!!col.Sortable !== !!comp.sortable) return false;
|
|
122477
|
+
if (!!col.Filterable) return false;
|
|
122478
|
+
if (!!col.Searchable) return false;
|
|
122240
122479
|
if (col.Width != null) return false;
|
|
122241
122480
|
if (col.MinWidth != null && Number(col.MinWidth) !== Number(comp.resolvedMinWidth)) return false;
|
|
122242
122481
|
}
|
|
@@ -122421,6 +122660,7 @@ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLim
|
|
|
122421
122660
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
122422
122661
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
122423
122662
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
122663
|
+
function StandardTablevue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return StandardTablevue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, StandardTablevue_type_script_lang_js_typeof(o); }
|
|
122424
122664
|
function StandardTablevue_type_script_lang_js_toConsumableArray(r) { return StandardTablevue_type_script_lang_js_arrayWithoutHoles(r) || StandardTablevue_type_script_lang_js_iterableToArray(r) || StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r) || StandardTablevue_type_script_lang_js_nonIterableSpread(); }
|
|
122425
122665
|
function StandardTablevue_type_script_lang_js_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
122426
122666
|
function StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return StandardTablevue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? StandardTablevue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -122454,6 +122694,41 @@ function formatDateTime(date) {
|
|
|
122454
122694
|
return "".concat(date.getFullYear(), "-").concat(pad(date.getMonth() + 1), "-").concat(pad(date.getDate()), " ").concat(pad(date.getHours()), ":").concat(pad(date.getMinutes()), ":").concat(pad(date.getSeconds()));
|
|
122455
122695
|
}
|
|
122456
122696
|
|
|
122697
|
+
// 表头筛选/搜索按钮放进哪个插槽。
|
|
122698
|
+
// vxe-table 3.6 及更早:普通列只消费 header 插槽,内容画在标题里,排序图标仍拼在后面。
|
|
122699
|
+
// vxe-table 3.24:header 插槽会替换整个表头并丢掉排序图标,title 插槽才画在标题内部。
|
|
122700
|
+
function detectVxeHeaderToolSlot(vm) {
|
|
122701
|
+
var comps = vm && vm.$options && vm.$options.components;
|
|
122702
|
+
var seen = [];
|
|
122703
|
+
while (comps && comps !== Object.prototype && seen.indexOf(comps) === -1) {
|
|
122704
|
+
seen.push(comps);
|
|
122705
|
+
var col = comps.VxeColumn || comps['vxe-column'];
|
|
122706
|
+
var options = col && (col.options || col);
|
|
122707
|
+
var fn = options && options.methods && options.methods.renderHeaderTitle;
|
|
122708
|
+
if (typeof fn === 'function') {
|
|
122709
|
+
return String(fn).indexOf('tableHeadeSlotToTitleSlot') !== -1 ? 'title' : 'header';
|
|
122710
|
+
}
|
|
122711
|
+
comps = Object.getPrototypeOf(comps);
|
|
122712
|
+
}
|
|
122713
|
+
return 'title';
|
|
122714
|
+
}
|
|
122715
|
+
|
|
122716
|
+
// 把插槽渲染结果收成可见文本,供表头筛选和搜索使用。自定义列(如 el-tag)取标签里的文字。
|
|
122717
|
+
function vnodeText(node) {
|
|
122718
|
+
if (node == null || node === false || node === true) return '';
|
|
122719
|
+
if (typeof node === 'string' || typeof node === 'number') return String(node);
|
|
122720
|
+
if (Array.isArray(node)) {
|
|
122721
|
+
var _text = '';
|
|
122722
|
+
for (var i = 0; i < node.length; i++) _text += vnodeText(node[i]);
|
|
122723
|
+
return _text;
|
|
122724
|
+
}
|
|
122725
|
+
var text = node.text ? String(node.text) : '';
|
|
122726
|
+
if (node.children && node.children.length) text += vnodeText(node.children);
|
|
122727
|
+
var opts = node.componentOptions;
|
|
122728
|
+
if (opts && opts.children && opts.children.length) text += vnodeText(opts.children);
|
|
122729
|
+
return text;
|
|
122730
|
+
}
|
|
122731
|
+
|
|
122457
122732
|
/**
|
|
122458
122733
|
* 单元格渲染分发组件(组件内部使用,不对外暴露):
|
|
122459
122734
|
* vxe-table 3.x 的列只能通过 <vxe-column> 子组件 + 作用域插槽声明,
|
|
@@ -122737,7 +123012,20 @@ var NormalReportSlotView = {
|
|
|
122737
123012
|
columnConfigDirty: false,
|
|
122738
123013
|
columnConfigSettled: false,
|
|
122739
123014
|
columnConfigTimer: null,
|
|
122740
|
-
columnConfigSaveTimer: null
|
|
123015
|
+
columnConfigSaveTimer: null,
|
|
123016
|
+
// 表头筛选/搜索按钮使用的插槽名:header(vxe 3.6)或 title(vxe 3.24)
|
|
123017
|
+
headerToolSlot: detectVxeHeaderToolSlot(this),
|
|
123018
|
+
// 表头筛选已选值、搜索关键字、当前排序方向。只作用于当前页面,不写入列配置
|
|
123019
|
+
columnFilters: {},
|
|
123020
|
+
columnKeywords: {},
|
|
123021
|
+
columnSortOrders: {},
|
|
123022
|
+
// 不用 vxe 自带的上下箭头,改由表头里的 el-icon-sort 触发排序
|
|
123023
|
+
sortConfig: {
|
|
123024
|
+
showIcon: false,
|
|
123025
|
+
allowClear: true,
|
|
123026
|
+
trigger: 'default'
|
|
123027
|
+
},
|
|
123028
|
+
filterOptionCache: {}
|
|
122741
123029
|
};
|
|
122742
123030
|
},
|
|
122743
123031
|
computed: {
|
|
@@ -122814,7 +123102,7 @@ var NormalReportSlotView = {
|
|
|
122814
123102
|
// 实际生效的右键菜单配置:
|
|
122815
123103
|
// 优先取 menuConfig prop(自定义模式);
|
|
122816
123104
|
// 否则自动生成:body 第一栏“复制” + 第二栏操作列按钮菜单项(tableOperation 为空时仅“复制”一栏);
|
|
122817
|
-
// header
|
|
123105
|
+
// header 为表头右键菜单(排序 / 筛选 / 搜索 / 固定在左侧 / 固定在右侧);
|
|
122818
123106
|
// 单元格右键菜单默认关闭:showContextMenu=false 时 body 无菜单项,
|
|
122819
123107
|
// 且不阻止浏览器默认右键菜单(显示浏览器原生菜单),表头菜单不受影响
|
|
122820
123108
|
resolvedMenuConfig: function resolvedMenuConfig() {
|
|
@@ -122824,8 +123112,8 @@ var NormalReportSlotView = {
|
|
|
122824
123112
|
if (this.opButtons.length) options.push(this.autoMenuItems);
|
|
122825
123113
|
return {
|
|
122826
123114
|
// vxe-table 菜单显示前回调(menu-config 顶层 visibleMethod,对 body/header 均生效):
|
|
122827
|
-
//
|
|
122828
|
-
//
|
|
123115
|
+
// 表头菜单名称要按当前右键的列变化。3.24 起菜单项 name 只接受字符串,
|
|
123116
|
+
// 传入函数会被原样显示成函数源码,所以在菜单打开前写成当前文案。
|
|
122829
123117
|
// 内置列(多选框/操作列)未绑定 col-id,解析不到组件列时不给表头菜单
|
|
122830
123118
|
visibleMethod: function visibleMethod(params) {
|
|
122831
123119
|
if (!params || params.type !== 'header') return true;
|
|
@@ -122835,6 +123123,7 @@ var NormalReportSlotView = {
|
|
|
122835
123123
|
uid: uid,
|
|
122836
123124
|
column: params.column
|
|
122837
123125
|
};
|
|
123126
|
+
_this.syncHeaderMenuNames(params.options);
|
|
122838
123127
|
return true;
|
|
122839
123128
|
},
|
|
122840
123129
|
// 单元格右键菜单:默认关闭(showContextMenu=false 时不提供菜单项,
|
|
@@ -122844,27 +123133,31 @@ var NormalReportSlotView = {
|
|
|
122844
123133
|
} : {
|
|
122845
123134
|
options: []
|
|
122846
123135
|
},
|
|
122847
|
-
//
|
|
123136
|
+
// 表头右键快捷菜单。name 必须是字符串,具体文案在 visibleMethod 里按当前列改写
|
|
122848
123137
|
header: {
|
|
122849
123138
|
options: [[{
|
|
122850
123139
|
code: '__normal_report_header_sort',
|
|
122851
|
-
name:
|
|
122852
|
-
return _this.getHeaderSortMenuName();
|
|
122853
|
-
},
|
|
123140
|
+
name: '显示排序按钮',
|
|
122854
123141
|
prefixIcon: 'el-icon-sort',
|
|
122855
123142
|
__isHeaderMenu: true
|
|
123143
|
+
}, {
|
|
123144
|
+
code: '__normal_report_header_filter',
|
|
123145
|
+
name: '显示筛选功能',
|
|
123146
|
+
prefixIcon: 'nr-icon-filter',
|
|
123147
|
+
__isHeaderMenu: true
|
|
123148
|
+
}, {
|
|
123149
|
+
code: '__normal_report_header_search',
|
|
123150
|
+
name: '显示搜索功能',
|
|
123151
|
+
prefixIcon: 'el-icon-search',
|
|
123152
|
+
__isHeaderMenu: true
|
|
122856
123153
|
}, {
|
|
122857
123154
|
code: '__normal_report_header_fix_left',
|
|
122858
|
-
name:
|
|
122859
|
-
return _this.getHeaderFixMenuName('left');
|
|
122860
|
-
},
|
|
123155
|
+
name: '固定在左侧',
|
|
122861
123156
|
prefixIcon: 'el-icon-d-arrow-left',
|
|
122862
123157
|
__isHeaderMenu: true
|
|
122863
123158
|
}, {
|
|
122864
123159
|
code: '__normal_report_header_fix_right',
|
|
122865
|
-
name:
|
|
122866
|
-
return _this.getHeaderFixMenuName('right');
|
|
122867
|
-
},
|
|
123160
|
+
name: '固定在右侧',
|
|
122868
123161
|
prefixIcon: 'el-icon-d-arrow-right',
|
|
122869
123162
|
__isHeaderMenu: true
|
|
122870
123163
|
}]]
|
|
@@ -122902,6 +123195,9 @@ var NormalReportSlotView = {
|
|
|
122902
123195
|
align: comp.align,
|
|
122903
123196
|
// 是否显示排序功能:优先取列设置弹层设置的值,未设置时取列组件声明
|
|
122904
123197
|
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
123198
|
+
// 筛选、搜索只来自用户配置,代码列默认不显示
|
|
123199
|
+
filterable: !!(st && st.filterable),
|
|
123200
|
+
searchable: !!(st && st.searchable),
|
|
122905
123201
|
showOverflow: comp.showOverflow,
|
|
122906
123202
|
resizable: comp.resizable,
|
|
122907
123203
|
// 编辑:edit-render 优先;editable 默认文本输入;仅有 #edit 插槽时用空配置打开编辑
|
|
@@ -122924,11 +123220,9 @@ var NormalReportSlotView = {
|
|
|
122924
123220
|
var baseKey = c.field || c.type || '__normal_report_uid_' + c.uid;
|
|
122925
123221
|
var isSeq = c.type === 'seq';
|
|
122926
123222
|
return {
|
|
122927
|
-
// key 中追加 sortable/fixed:vxe-table 3.x
|
|
122928
|
-
//
|
|
122929
|
-
|
|
122930
|
-
// <vxe-column>,使表头排序图标与固定列分组实时更新
|
|
122931
|
-
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || ''),
|
|
123223
|
+
// key 中追加 sortable/fixed/filter/search:vxe-table 3.x 在列创建时固化表头渲染,
|
|
123224
|
+
// 并把当时的插槽函数记在列上。仅改状态不会刷新表头按钮,纳入 key 后强制重建列
|
|
123225
|
+
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || '') + '|filter=' + (c.filterable ? 1 : 0) + '|search=' + (c.searchable ? 1 : 0),
|
|
122932
123226
|
// 列唯一主键(vxe-table col-id → ColumnInfo.id / 表头 th 的 colid 属性):
|
|
122933
123227
|
// 内嵌组件列 uid,用于表头右键菜单与拖拽换列时把 vxe 列映射回组件列;
|
|
122934
123228
|
// 内置列(多选框/操作列)不传 col-id,由 vxe 自动生成普通 id
|
|
@@ -122946,6 +123240,9 @@ var NormalReportSlotView = {
|
|
|
122946
123240
|
fixed: c.fixed || undefined,
|
|
122947
123241
|
align: c.align,
|
|
122948
123242
|
sortable: !!c.sortable,
|
|
123243
|
+
filterable: !!c.filterable,
|
|
123244
|
+
searchable: !!c.searchable,
|
|
123245
|
+
uid: c.uid,
|
|
122949
123246
|
// 序号列排序:按行在原始数据中的索引排序(升序恢复原始顺序,降序反向)
|
|
122950
123247
|
sortBy: isSeq ? function (_ref) {
|
|
122951
123248
|
var row = _ref.row;
|
|
@@ -123001,12 +123298,20 @@ var NormalReportSlotView = {
|
|
|
123001
123298
|
return col.editRender;
|
|
123002
123299
|
});
|
|
123003
123300
|
return editable ? this.defaultEditConfig : null;
|
|
123301
|
+
},
|
|
123302
|
+
// 按已启用列的筛选值和搜索关键字过滤。没有条件时返回原数组,避免表格无故重绘
|
|
123303
|
+
displayTableData: function displayTableData() {
|
|
123304
|
+
var rows = Array.isArray(this.tableData) ? this.tableData : [];
|
|
123305
|
+
var checks = this.buildColumnQueryChecks();
|
|
123306
|
+
if (!checks.length) return rows;
|
|
123307
|
+
return this.filterRowsByQuery(rows, checks);
|
|
123004
123308
|
}
|
|
123005
123309
|
},
|
|
123006
123310
|
watch: {
|
|
123007
123311
|
// 表格数据变化时自动刷新“数据更新时间”
|
|
123008
123312
|
tableData: function tableData() {
|
|
123009
123313
|
this.updateTime = formatDateTime(new Date());
|
|
123314
|
+
this.filterOptionCache = {};
|
|
123010
123315
|
}
|
|
123011
123316
|
},
|
|
123012
123317
|
created: function created() {
|
|
@@ -123155,7 +123460,9 @@ var NormalReportSlotView = {
|
|
|
123155
123460
|
fixed: comp.fixed || '',
|
|
123156
123461
|
minWidth: null,
|
|
123157
123462
|
width: null,
|
|
123158
|
-
sortable: !!comp.sortable
|
|
123463
|
+
sortable: !!comp.sortable,
|
|
123464
|
+
filterable: false,
|
|
123465
|
+
searchable: false
|
|
123159
123466
|
});
|
|
123160
123467
|
if (this.columnOrder.indexOf(comp._uid) === -1) {
|
|
123161
123468
|
this.columnOrder.push(comp._uid);
|
|
@@ -123171,6 +123478,10 @@ var NormalReportSlotView = {
|
|
|
123171
123478
|
if (this.columnStates[comp._uid]) {
|
|
123172
123479
|
this.$delete(this.columnStates, comp._uid);
|
|
123173
123480
|
}
|
|
123481
|
+
this.$delete(this.columnFilters, comp._uid);
|
|
123482
|
+
this.$delete(this.columnKeywords, comp._uid);
|
|
123483
|
+
this.$delete(this.columnSortOrders, comp._uid);
|
|
123484
|
+
this.$delete(this.filterOptionCache, comp._uid);
|
|
123174
123485
|
this.buildDefaultSnapshot();
|
|
123175
123486
|
},
|
|
123176
123487
|
// 重建默认列快照(注册顺序 + 列组件声明默认值)
|
|
@@ -123185,7 +123496,9 @@ var NormalReportSlotView = {
|
|
|
123185
123496
|
// 默认列最小宽度:resolvedMinWidth(显式 min-width > 显式 width > 按标题自动计算)
|
|
123186
123497
|
minWidth: comp.resolvedMinWidth,
|
|
123187
123498
|
// 默认是否显示排序功能
|
|
123188
|
-
sortable: !!comp.sortable
|
|
123499
|
+
sortable: !!comp.sortable,
|
|
123500
|
+
filterable: false,
|
|
123501
|
+
searchable: false
|
|
123189
123502
|
};
|
|
123190
123503
|
});
|
|
123191
123504
|
},
|
|
@@ -123456,11 +123769,36 @@ var NormalReportSlotView = {
|
|
|
123456
123769
|
var ctx = this.headerMenuCtx;
|
|
123457
123770
|
return ctx && this.columnStates[ctx.uid] ? this.columnStates[ctx.uid] : null;
|
|
123458
123771
|
},
|
|
123772
|
+
// 菜单打开前把表头项的 name 写成当前列的文案。vxe-table 3.24 的 getFuncText 不再调用函数
|
|
123773
|
+
syncHeaderMenuNames: function syncHeaderMenuNames(options) {
|
|
123774
|
+
var groups = Array.isArray(options) ? options : [];
|
|
123775
|
+
var names = {
|
|
123776
|
+
__normal_report_header_sort: this.getHeaderSortMenuName(),
|
|
123777
|
+
__normal_report_header_filter: this.getHeaderFilterMenuName(),
|
|
123778
|
+
__normal_report_header_search: this.getHeaderSearchMenuName(),
|
|
123779
|
+
__normal_report_header_fix_left: this.getHeaderFixMenuName('left'),
|
|
123780
|
+
__normal_report_header_fix_right: this.getHeaderFixMenuName('right')
|
|
123781
|
+
};
|
|
123782
|
+
groups.forEach(function (group) {
|
|
123783
|
+
if (!Array.isArray(group)) return;
|
|
123784
|
+
group.forEach(function (item) {
|
|
123785
|
+
if (item && names[item.code]) item.name = names[item.code];
|
|
123786
|
+
});
|
|
123787
|
+
});
|
|
123788
|
+
},
|
|
123459
123789
|
// “是否显示排序按钮”菜单名称(按当前列状态动态生成)
|
|
123460
123790
|
getHeaderSortMenuName: function getHeaderSortMenuName() {
|
|
123461
123791
|
var st = this.getHeaderMenuColumnState();
|
|
123462
123792
|
return st && st.sortable ? '取消显示排序按钮' : '显示排序按钮';
|
|
123463
123793
|
},
|
|
123794
|
+
getHeaderFilterMenuName: function getHeaderFilterMenuName() {
|
|
123795
|
+
var st = this.getHeaderMenuColumnState();
|
|
123796
|
+
return st && st.filterable ? '取消显示筛选功能' : '显示筛选功能';
|
|
123797
|
+
},
|
|
123798
|
+
getHeaderSearchMenuName: function getHeaderSearchMenuName() {
|
|
123799
|
+
var st = this.getHeaderMenuColumnState();
|
|
123800
|
+
return st && st.searchable ? '取消显示搜索功能' : '显示搜索功能';
|
|
123801
|
+
},
|
|
123464
123802
|
// 固定列菜单名称(固定在左侧/右侧,已固定时显示取消固定)
|
|
123465
123803
|
getHeaderFixMenuName: function getHeaderFixMenuName(side) {
|
|
123466
123804
|
var st = this.getHeaderMenuColumnState();
|
|
@@ -123475,6 +123813,10 @@ var NormalReportSlotView = {
|
|
|
123475
123813
|
if (uid == null) return;
|
|
123476
123814
|
if (menu.code === '__normal_report_header_sort') {
|
|
123477
123815
|
this.toggleHeaderColumnSort(uid);
|
|
123816
|
+
} else if (menu.code === '__normal_report_header_filter') {
|
|
123817
|
+
this.toggleHeaderColumnFlag(uid, 'filterable');
|
|
123818
|
+
} else if (menu.code === '__normal_report_header_search') {
|
|
123819
|
+
this.toggleHeaderColumnFlag(uid, 'searchable');
|
|
123478
123820
|
} else if (menu.code === '__normal_report_header_fix_left') {
|
|
123479
123821
|
this.toggleHeaderColumnFixed(uid, 'left');
|
|
123480
123822
|
} else if (menu.code === '__normal_report_header_fix_right') {
|
|
@@ -123488,6 +123830,7 @@ var NormalReportSlotView = {
|
|
|
123488
123830
|
var st = this.columnStates[uid];
|
|
123489
123831
|
if (!st) return;
|
|
123490
123832
|
this.$set(st, 'sortable', !st.sortable);
|
|
123833
|
+
if (!st.sortable) this.$delete(this.columnSortOrders, uid);
|
|
123491
123834
|
this.schedulePersistColumnConfig();
|
|
123492
123835
|
this.$nextTick(function () {
|
|
123493
123836
|
return _this13.applyColumnOrder();
|
|
@@ -123505,6 +123848,16 @@ var NormalReportSlotView = {
|
|
|
123505
123848
|
return _this14.applyColumnOrder();
|
|
123506
123849
|
});
|
|
123507
123850
|
},
|
|
123851
|
+
// 表头右键切换筛选或搜索。关掉时清掉该列当前条件,避免按钮消失后仍在过滤
|
|
123852
|
+
toggleHeaderColumnFlag: function toggleHeaderColumnFlag(uid, field) {
|
|
123853
|
+
var st = this.columnStates[uid];
|
|
123854
|
+
if (!st || field !== 'filterable' && field !== 'searchable') return;
|
|
123855
|
+
var next = !st[field];
|
|
123856
|
+
this.$set(st, field, next);
|
|
123857
|
+
if (!next && field === 'filterable') this.$delete(this.columnFilters, uid);
|
|
123858
|
+
if (!next && field === 'searchable') this.$delete(this.columnKeywords, uid);
|
|
123859
|
+
this.schedulePersistColumnConfig();
|
|
123860
|
+
},
|
|
123508
123861
|
// ===== 单元格编辑 =====
|
|
123509
123862
|
onEditActivated: function onEditActivated(params, evnt) {
|
|
123510
123863
|
this.$emit('edit-activated', params, evnt);
|
|
@@ -123526,7 +123879,7 @@ var NormalReportSlotView = {
|
|
|
123526
123879
|
if (!target || typeof target.closest !== 'function') return;
|
|
123527
123880
|
// 列宽拖拽手柄:vxe-table 3.24 起类名由 .vxe-resizable 更名为
|
|
123528
123881
|
// .vxe-table--resizable-col-bar(旧类名保留兼容,3.24 以下版本使用)
|
|
123529
|
-
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar')) return;
|
|
123882
|
+
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar, .nr-col-tool')) return;
|
|
123530
123883
|
var th = target.closest('.vxe-header--column');
|
|
123531
123884
|
if (!th) return;
|
|
123532
123885
|
var uid = this.parseColIdUid(th.getAttribute('colid'));
|
|
@@ -123763,10 +124116,262 @@ var NormalReportSlotView = {
|
|
|
123763
124116
|
xTable.recalculate && xTable.recalculate(true);
|
|
123764
124117
|
});
|
|
123765
124118
|
},
|
|
124119
|
+
// ===== 表头筛选 / 搜索 =====
|
|
124120
|
+
// 当前列已选的筛选值。未选表示不筛选
|
|
124121
|
+
columnFilterValue: function columnFilterValue(col) {
|
|
124122
|
+
var list = col && this.columnFilters[col.uid];
|
|
124123
|
+
return Array.isArray(list) ? list : [];
|
|
124124
|
+
},
|
|
124125
|
+
columnKeyword: function columnKeyword(col) {
|
|
124126
|
+
var text = col && this.columnKeywords[col.uid];
|
|
124127
|
+
return text == null ? '' : String(text);
|
|
124128
|
+
},
|
|
124129
|
+
columnFilterActive: function columnFilterActive(col) {
|
|
124130
|
+
return this.columnFilterValue(col).length > 0;
|
|
124131
|
+
},
|
|
124132
|
+
columnSearchActive: function columnSearchActive(col) {
|
|
124133
|
+
return this.columnKeyword(col).trim() !== '';
|
|
124134
|
+
},
|
|
124135
|
+
columnSortOrder: function columnSortOrder(col) {
|
|
124136
|
+
if (!col) return '';
|
|
124137
|
+
return this.columnSortOrders[col.uid] || '';
|
|
124138
|
+
},
|
|
124139
|
+
columnSortTitle: function columnSortTitle(col) {
|
|
124140
|
+
var order = this.columnSortOrder(col);
|
|
124141
|
+
if (order === 'asc') return '升序,点击切换为降序';
|
|
124142
|
+
if (order === 'desc') return '降序,点击取消排序';
|
|
124143
|
+
return '排序';
|
|
124144
|
+
},
|
|
124145
|
+
// 点击表头排序图标:未排序 → 升序 → 降序 → 取消。走 vxe 的排序,远程排序和 sort-change 保持原样
|
|
124146
|
+
toggleColumnSort: function toggleColumnSort(col, evnt) {
|
|
124147
|
+
var table = this.$refs.xTable;
|
|
124148
|
+
if (!table || !col || typeof table.getColumnById !== 'function' || typeof table.triggerSortEvent !== 'function') return;
|
|
124149
|
+
var column = table.getColumnById(col.colId);
|
|
124150
|
+
if (!column) return;
|
|
124151
|
+
var order = column.order;
|
|
124152
|
+
var next = order === 'asc' ? 'desc' : order === 'desc' ? null : 'asc';
|
|
124153
|
+
table.triggerSortEvent(evnt, column, next);
|
|
124154
|
+
},
|
|
124155
|
+
onSortChange: function onSortChange(params) {
|
|
124156
|
+
var _this19 = this;
|
|
124157
|
+
var list = params && params.sortList || [];
|
|
124158
|
+
var next = {};
|
|
124159
|
+
list.forEach(function (item) {
|
|
124160
|
+
var column = item && item.column;
|
|
124161
|
+
var uid = column ? _this19.parseColIdUid(column.id) : null;
|
|
124162
|
+
if (uid != null && item.order) next[uid] = item.order;
|
|
124163
|
+
});
|
|
124164
|
+
this.columnSortOrders = next;
|
|
124165
|
+
},
|
|
124166
|
+
setColumnFilter: function setColumnFilter(col, values) {
|
|
124167
|
+
if (!col) return;
|
|
124168
|
+
this.$set(this.columnFilters, col.uid, Array.isArray(values) ? values : []);
|
|
124169
|
+
},
|
|
124170
|
+
setColumnKeyword: function setColumnKeyword(col, value) {
|
|
124171
|
+
if (!col) return;
|
|
124172
|
+
this.$set(this.columnKeywords, col.uid, value == null ? '' : String(value));
|
|
124173
|
+
},
|
|
124174
|
+
columnFilterOptions: function columnFilterOptions(col) {
|
|
124175
|
+
if (!col) return [];
|
|
124176
|
+
var cached = this.filterOptionCache[col.uid];
|
|
124177
|
+
return Array.isArray(cached) ? cached : [];
|
|
124178
|
+
},
|
|
124179
|
+
// 打开筛选时按当前表格数据生成可选项,避免每次渲染都扫全表
|
|
124180
|
+
// 固定列会把表头再画一份,同一列的筛选/搜索控件会有多份。只操作当前看得见的那一份。
|
|
124181
|
+
visibleColumnTool: function visibleColumnTool(ref) {
|
|
124182
|
+
var list = Array.isArray(ref) ? ref : ref ? [ref] : [];
|
|
124183
|
+
for (var i = 0; i < list.length; i++) {
|
|
124184
|
+
var el = list[i] && list[i].$el;
|
|
124185
|
+
if (el && el.offsetWidth > 0 && el.offsetHeight > 0) return list[i];
|
|
124186
|
+
}
|
|
124187
|
+
return list[0] || null;
|
|
124188
|
+
},
|
|
124189
|
+
openColumnFilter: function openColumnFilter(col) {
|
|
124190
|
+
var _this20 = this;
|
|
124191
|
+
if (!col || !col.comp) return;
|
|
124192
|
+
this.$set(this.filterOptionCache, col.uid, this.buildColumnFilterOptions(col.comp));
|
|
124193
|
+
this.$nextTick(function () {
|
|
124194
|
+
var select = _this20.visibleColumnTool(_this20.$refs['colFilter' + col.uid]);
|
|
124195
|
+
if (select && typeof select.toggleMenu === 'function' && !select.visible) select.toggleMenu();
|
|
124196
|
+
});
|
|
124197
|
+
},
|
|
124198
|
+
focusColumnSearch: function focusColumnSearch(col) {
|
|
124199
|
+
var _this21 = this;
|
|
124200
|
+
this.$nextTick(function () {
|
|
124201
|
+
var input = _this21.visibleColumnTool(_this21.$refs['colSearch' + (col && col.uid)]);
|
|
124202
|
+
if (input && typeof input.focus === 'function') input.focus();
|
|
124203
|
+
});
|
|
124204
|
+
},
|
|
124205
|
+
// 单元格参与筛选、搜索的文本:自定义插槽的可见文字优先,其次格式化结果,最后是字段值
|
|
124206
|
+
columnCellText: function columnCellText(comp, row, index) {
|
|
124207
|
+
if (!comp) return '';
|
|
124208
|
+
if (comp.type === 'seq') return String(index + 1);
|
|
124209
|
+
var scope = {
|
|
124210
|
+
row: row,
|
|
124211
|
+
column: comp,
|
|
124212
|
+
$index: index,
|
|
124213
|
+
seq: index + 1
|
|
124214
|
+
};
|
|
124215
|
+
if (comp.$scopedSlots && typeof comp.$scopedSlots["default"] === 'function') {
|
|
124216
|
+
try {
|
|
124217
|
+
var text = vnodeText(comp.$scopedSlots["default"](scope)).replace(/\s+/g, ' ').trim();
|
|
124218
|
+
if (text) return text;
|
|
124219
|
+
} catch (e) {
|
|
124220
|
+
// 插槽取值失败时退回字段值
|
|
124221
|
+
}
|
|
124222
|
+
}
|
|
124223
|
+
if (typeof comp.formatter === 'function') {
|
|
124224
|
+
try {
|
|
124225
|
+
var _value = comp.formatter(scope);
|
|
124226
|
+
if (_value != null && StandardTablevue_type_script_lang_js_typeof(_value) !== 'object') {
|
|
124227
|
+
var _text2 = String(_value).trim();
|
|
124228
|
+
if (_text2) return _text2;
|
|
124229
|
+
}
|
|
124230
|
+
} catch (e) {
|
|
124231
|
+
// 格式化失败时退回字段值
|
|
124232
|
+
}
|
|
124233
|
+
}
|
|
124234
|
+
if (!comp.field || !row) return '';
|
|
124235
|
+
var value = row[comp.field];
|
|
124236
|
+
if (value == null || value === '' || StandardTablevue_type_script_lang_js_typeof(value) === 'object') return '';
|
|
124237
|
+
return String(value);
|
|
124238
|
+
},
|
|
124239
|
+
buildColumnFilterOptions: function buildColumnFilterOptions(comp) {
|
|
124240
|
+
var _this22 = this;
|
|
124241
|
+
var seen = Object.create(null);
|
|
124242
|
+
var options = [];
|
|
124243
|
+
this.visitColumnRows(this.tableData, function (row, index) {
|
|
124244
|
+
var text = _this22.columnCellText(comp, row, index);
|
|
124245
|
+
if (seen[text]) return;
|
|
124246
|
+
seen[text] = true;
|
|
124247
|
+
options.push({
|
|
124248
|
+
key: text === '' ? '__empty' : text,
|
|
124249
|
+
value: text,
|
|
124250
|
+
label: text === '' ? '(空)' : text
|
|
124251
|
+
});
|
|
124252
|
+
});
|
|
124253
|
+
options.sort(function (a, b) {
|
|
124254
|
+
return a.label.localeCompare(b.label, 'zh');
|
|
124255
|
+
});
|
|
124256
|
+
return options;
|
|
124257
|
+
},
|
|
124258
|
+
visitColumnRows: function visitColumnRows(rows, visitor) {
|
|
124259
|
+
var list = Array.isArray(rows) ? rows : [];
|
|
124260
|
+
var childrenKey = this.treeConfig && this.treeConfig.children || 'children';
|
|
124261
|
+
var _walk = function walk(nodes) {
|
|
124262
|
+
nodes.forEach(function (row, index) {
|
|
124263
|
+
if (!row) return;
|
|
124264
|
+
visitor(row, index);
|
|
124265
|
+
var children = row[childrenKey];
|
|
124266
|
+
if (Array.isArray(children) && children.length) _walk(children);
|
|
124267
|
+
});
|
|
124268
|
+
};
|
|
124269
|
+
_walk(list);
|
|
124270
|
+
},
|
|
124271
|
+
// 只收集真正会缩小结果的条件。开关打开但还没选值、没输入时不过滤
|
|
124272
|
+
buildColumnQueryChecks: function buildColumnQueryChecks() {
|
|
124273
|
+
var _this23 = this;
|
|
124274
|
+
var checks = [];
|
|
124275
|
+
var compMap = Object.create(null);
|
|
124276
|
+
this.columnComps.forEach(function (comp) {
|
|
124277
|
+
if (comp) compMap[comp._uid] = comp;
|
|
124278
|
+
});
|
|
124279
|
+
this.columnOrder.forEach(function (uid) {
|
|
124280
|
+
var st = _this23.columnStates[uid];
|
|
124281
|
+
var comp = compMap[uid];
|
|
124282
|
+
if (!st || st.visible === false || !comp) return;
|
|
124283
|
+
var selected = _this23.columnFilters[uid];
|
|
124284
|
+
if (st.filterable && Array.isArray(selected) && selected.length) {
|
|
124285
|
+
var set = Object.create(null);
|
|
124286
|
+
selected.forEach(function (value) {
|
|
124287
|
+
set[value] = true;
|
|
124288
|
+
});
|
|
124289
|
+
checks.push(function (row, index) {
|
|
124290
|
+
return !!set[_this23.columnCellText(comp, row, index)];
|
|
124291
|
+
});
|
|
124292
|
+
}
|
|
124293
|
+
var keyword = st.searchable && _this23.columnKeywords[uid] != null ? String(_this23.columnKeywords[uid]).trim().toLowerCase() : '';
|
|
124294
|
+
if (keyword) {
|
|
124295
|
+
checks.push(function (row, index) {
|
|
124296
|
+
return _this23.columnCellText(comp, row, index).toLowerCase().indexOf(keyword) >= 0;
|
|
124297
|
+
});
|
|
124298
|
+
}
|
|
124299
|
+
});
|
|
124300
|
+
return checks;
|
|
124301
|
+
},
|
|
124302
|
+
filterRowsByQuery: function filterRowsByQuery(rows, checks) {
|
|
124303
|
+
var match = function match(row, index) {
|
|
124304
|
+
return checks.every(function (check) {
|
|
124305
|
+
return check(row, index);
|
|
124306
|
+
});
|
|
124307
|
+
};
|
|
124308
|
+
var tree = this.treeConfig;
|
|
124309
|
+
if (tree && tree.transform) return this.filterTransformTree(rows, match, tree);
|
|
124310
|
+
var childrenKey = tree && tree.children || 'children';
|
|
124311
|
+
if (rows.some(function (row) {
|
|
124312
|
+
return row && Array.isArray(row[childrenKey]);
|
|
124313
|
+
})) {
|
|
124314
|
+
return this.filterNestedTree(rows, match, childrenKey);
|
|
124315
|
+
}
|
|
124316
|
+
return rows.filter(function (row, index) {
|
|
124317
|
+
return match(row, index);
|
|
124318
|
+
});
|
|
124319
|
+
},
|
|
124320
|
+
// 扁平树:命中的行保留,同时保留它的上级,避免子节点失去父级后无法显示
|
|
124321
|
+
filterTransformTree: function filterTransformTree(list, match, tree) {
|
|
124322
|
+
var rowField = tree.rowField || 'id';
|
|
124323
|
+
var parentField = tree.parentField || 'parentId';
|
|
124324
|
+
var byId = Object.create(null);
|
|
124325
|
+
var matched = [];
|
|
124326
|
+
list.forEach(function (row, index) {
|
|
124327
|
+
if (!row) return;
|
|
124328
|
+
byId[row[rowField]] = row;
|
|
124329
|
+
if (match(row, index)) matched.push(row[rowField]);
|
|
124330
|
+
});
|
|
124331
|
+
var keep = Object.create(null);
|
|
124332
|
+
matched.forEach(function (id) {
|
|
124333
|
+
var current = id;
|
|
124334
|
+
var guard = Object.create(null);
|
|
124335
|
+
while (current != null && current !== '' && !guard[current]) {
|
|
124336
|
+
guard[current] = true;
|
|
124337
|
+
keep[current] = true;
|
|
124338
|
+
var row = byId[current];
|
|
124339
|
+
if (!row) break;
|
|
124340
|
+
current = row[parentField];
|
|
124341
|
+
}
|
|
124342
|
+
});
|
|
124343
|
+
return list.filter(function (row) {
|
|
124344
|
+
return row && keep[row[rowField]];
|
|
124345
|
+
});
|
|
124346
|
+
},
|
|
124347
|
+
filterNestedTree: function filterNestedTree(list, match, childrenKey) {
|
|
124348
|
+
var _walk2 = function walk(nodes) {
|
|
124349
|
+
var out = [];
|
|
124350
|
+
nodes.forEach(function (row, index) {
|
|
124351
|
+
if (!row) return;
|
|
124352
|
+
var source = Array.isArray(row[childrenKey]) ? row[childrenKey] : null;
|
|
124353
|
+
var children = source ? _walk2(source) : null;
|
|
124354
|
+
if (match(row, index) || children && children.length) {
|
|
124355
|
+
if (source && children !== source) {
|
|
124356
|
+
var copy = {};
|
|
124357
|
+
Object.keys(row).forEach(function (key) {
|
|
124358
|
+
copy[key] = row[key];
|
|
124359
|
+
});
|
|
124360
|
+
copy[childrenKey] = children;
|
|
124361
|
+
out.push(copy);
|
|
124362
|
+
} else {
|
|
124363
|
+
out.push(row);
|
|
124364
|
+
}
|
|
124365
|
+
}
|
|
124366
|
+
});
|
|
124367
|
+
return out;
|
|
124368
|
+
};
|
|
124369
|
+
return _walk2(list);
|
|
124370
|
+
},
|
|
123766
124371
|
// ===== 列设置弹层 =====
|
|
123767
124372
|
// 打开列设置:以当前注册列生成工作副本(每次打开都重新初始化)
|
|
123768
124373
|
openColumnSetting: function openColumnSetting() {
|
|
123769
|
-
var
|
|
124374
|
+
var _this24 = this;
|
|
123770
124375
|
var compMap = {};
|
|
123771
124376
|
this.columnComps.forEach(function (comp) {
|
|
123772
124377
|
compMap[comp._uid] = comp;
|
|
@@ -123786,7 +124391,9 @@ var NormalReportSlotView = {
|
|
|
123786
124391
|
// 用户已设置值 > 列组件 resolvedMinWidth(显式 min-width / width / 按标题自动计算)
|
|
123787
124392
|
minWidth: st && st.minWidth != null ? st.minWidth : comp.resolvedMinWidth,
|
|
123788
124393
|
// 是否显示排序功能:用户已设置值 > 列组件声明
|
|
123789
|
-
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable
|
|
124394
|
+
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
124395
|
+
filterable: !!(st && st.filterable),
|
|
124396
|
+
searchable: !!(st && st.searchable)
|
|
123790
124397
|
};
|
|
123791
124398
|
}).filter(Boolean);
|
|
123792
124399
|
this.dragColField = '';
|
|
@@ -123794,7 +124401,7 @@ var NormalReportSlotView = {
|
|
|
123794
124401
|
// 列标题宽度:按最长列名称计算(中文 25px/字 + 英文 15px/字 + 30px 余量),
|
|
123795
124402
|
// 各列标题统一按该宽度显示,保证输入框与按钮对齐
|
|
123796
124403
|
this.columnTitleWidth = this.columnDraft.reduce(function (max, c) {
|
|
123797
|
-
return Math.max(max,
|
|
124404
|
+
return Math.max(max, _this24.calcColumnTitleWidth(c.title));
|
|
123798
124405
|
}, 0);
|
|
123799
124406
|
},
|
|
123800
124407
|
// 计算单个列标题的显示宽度(px):中文 25px/字 + 英文 15px/字 + 30px 余量
|
|
@@ -123833,6 +124440,12 @@ var NormalReportSlotView = {
|
|
|
123833
124440
|
toggleColumnSortable: function toggleColumnSortable(col) {
|
|
123834
124441
|
col.sortable = !col.sortable;
|
|
123835
124442
|
},
|
|
124443
|
+
toggleColumnFilterable: function toggleColumnFilterable(col) {
|
|
124444
|
+
col.filterable = !col.filterable;
|
|
124445
|
+
},
|
|
124446
|
+
toggleColumnSearchable: function toggleColumnSearchable(col) {
|
|
124447
|
+
col.searchable = !col.searchable;
|
|
124448
|
+
},
|
|
123836
124449
|
// 上下移一列
|
|
123837
124450
|
moveColumnDraft: function moveColumnDraft(index, direction) {
|
|
123838
124451
|
var target = index + direction;
|
|
@@ -123886,24 +124499,29 @@ var NormalReportSlotView = {
|
|
|
123886
124499
|
},
|
|
123887
124500
|
// 确认:将面板副本应用到列状态并刷新表格
|
|
123888
124501
|
confirmColumnSetting: function confirmColumnSetting() {
|
|
123889
|
-
var
|
|
124502
|
+
var _this25 = this;
|
|
123890
124503
|
var order = [];
|
|
123891
124504
|
this.columnDraft.forEach(function (d) {
|
|
123892
|
-
var prev =
|
|
123893
|
-
|
|
124505
|
+
var prev = _this25.columnStates[d.uid] || {};
|
|
124506
|
+
_this25.$set(_this25.columnStates, d.uid, {
|
|
123894
124507
|
visible: d.visible,
|
|
123895
124508
|
fixed: d.fixed || '',
|
|
123896
124509
|
minWidth: d.minWidth != null ? d.minWidth : null,
|
|
123897
124510
|
width: prev.width != null ? prev.width : null,
|
|
123898
|
-
sortable: !!d.sortable
|
|
124511
|
+
sortable: !!d.sortable,
|
|
124512
|
+
filterable: !!d.filterable,
|
|
124513
|
+
searchable: !!d.searchable
|
|
123899
124514
|
});
|
|
124515
|
+
if (!d.filterable) _this25.$delete(_this25.columnFilters, d.uid);
|
|
124516
|
+
if (!d.searchable) _this25.$delete(_this25.columnKeywords, d.uid);
|
|
124517
|
+
if (!d.sortable) _this25.$delete(_this25.columnSortOrders, d.uid);
|
|
123900
124518
|
order.push(d.uid);
|
|
123901
124519
|
});
|
|
123902
124520
|
this.columnOrder = order;
|
|
123903
124521
|
this.columnSettingVisible = false;
|
|
123904
124522
|
this.persistColumnConfigNow();
|
|
123905
124523
|
this.$nextTick(function () {
|
|
123906
|
-
|
|
124524
|
+
_this25.applyColumnOrder();
|
|
123907
124525
|
});
|
|
123908
124526
|
},
|
|
123909
124527
|
// ===== 表头配置持久化 =====
|
|
@@ -123933,12 +124551,12 @@ var NormalReportSlotView = {
|
|
|
123933
124551
|
},
|
|
123934
124552
|
// 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度
|
|
123935
124553
|
scheduleInitialLayout: function scheduleInitialLayout() {
|
|
123936
|
-
var
|
|
124554
|
+
var _this26 = this;
|
|
123937
124555
|
this.$nextTick(function () {
|
|
123938
|
-
|
|
124556
|
+
_this26.resizeRecalculate();
|
|
123939
124557
|
if (typeof requestAnimationFrame === 'function') {
|
|
123940
124558
|
requestAnimationFrame(function () {
|
|
123941
|
-
return
|
|
124559
|
+
return _this26.resizeRecalculate();
|
|
123942
124560
|
});
|
|
123943
124561
|
}
|
|
123944
124562
|
});
|
|
@@ -123960,7 +124578,7 @@ var NormalReportSlotView = {
|
|
|
123960
124578
|
if (this.columnConfigDirty) this.schedulePersistColumnConfig();
|
|
123961
124579
|
},
|
|
123962
124580
|
bootstrapColumnConfig: function bootstrapColumnConfig() {
|
|
123963
|
-
var
|
|
124581
|
+
var _this27 = this;
|
|
123964
124582
|
var tableCode = this.resolveTableCode();
|
|
123965
124583
|
if (!tableCode) {
|
|
123966
124584
|
this.finishColumnConfigLoad();
|
|
@@ -124005,15 +124623,15 @@ var NormalReportSlotView = {
|
|
|
124005
124623
|
this.columnConfigDisabled = true;
|
|
124006
124624
|
}
|
|
124007
124625
|
this.finishColumnConfigLoad(function () {
|
|
124008
|
-
if (columns && columns.length)
|
|
124626
|
+
if (columns && columns.length) _this27.applyMergedColumnConfig(columns);
|
|
124009
124627
|
});
|
|
124010
124628
|
},
|
|
124011
124629
|
applyMergedColumnConfig: function applyMergedColumnConfig(savedColumns) {
|
|
124012
|
-
var
|
|
124630
|
+
var _this28 = this;
|
|
124013
124631
|
var merged = mergeColumnConfig(this.columnComps, savedColumns);
|
|
124014
124632
|
if (!merged) return;
|
|
124015
124633
|
merged.states.forEach(function (item) {
|
|
124016
|
-
|
|
124634
|
+
_this28.$set(_this28.columnStates, item.uid, item.state);
|
|
124017
124635
|
});
|
|
124018
124636
|
this.columnOrder = merged.order;
|
|
124019
124637
|
},
|
|
@@ -124032,13 +124650,13 @@ var NormalReportSlotView = {
|
|
|
124032
124650
|
// 直接改表头(拖列宽、拖换列、右键改排序或固定)时防抖:停手 3 秒后才保存。
|
|
124033
124651
|
// 「调整」弹层点确认走 persistColumnConfigNow,不经过这里。
|
|
124034
124652
|
schedulePersistColumnConfig: function schedulePersistColumnConfig() {
|
|
124035
|
-
var
|
|
124653
|
+
var _this29 = this;
|
|
124036
124654
|
this.columnConfigDirty = true;
|
|
124037
124655
|
if (!this.columnConfigReady) return;
|
|
124038
124656
|
if (this.columnConfigSaveTimer) clearTimeout(this.columnConfigSaveTimer);
|
|
124039
124657
|
this.columnConfigSaveTimer = setTimeout(function () {
|
|
124040
|
-
|
|
124041
|
-
|
|
124658
|
+
_this29.columnConfigSaveTimer = null;
|
|
124659
|
+
_this29.persistColumnConfig();
|
|
124042
124660
|
}, 3000);
|
|
124043
124661
|
},
|
|
124044
124662
|
persistColumnConfigNow: function persistColumnConfigNow() {
|
|
@@ -124050,7 +124668,7 @@ var NormalReportSlotView = {
|
|
|
124050
124668
|
this.persistColumnConfig();
|
|
124051
124669
|
},
|
|
124052
124670
|
persistColumnConfig: function persistColumnConfig() {
|
|
124053
|
-
var
|
|
124671
|
+
var _this30 = this;
|
|
124054
124672
|
if (!this.columnConfigReady || this.columnConfigDisabled) return;
|
|
124055
124673
|
var api = getColumnConfigApi();
|
|
124056
124674
|
if (!api) return;
|
|
@@ -124066,9 +124684,9 @@ var NormalReportSlotView = {
|
|
|
124066
124684
|
readColumnConfigDatas(res);
|
|
124067
124685
|
if (useReset) removeCachedColumnLayout(moduleCode, pageCode, tableCode);else updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns);
|
|
124068
124686
|
var content = res && res.data && res.data.Content || res && res.Content || '表头配置保存成功';
|
|
124069
|
-
if (
|
|
124687
|
+
if (_this30.$message) _this30.$message.success(content);
|
|
124070
124688
|
})["catch"](function (err) {
|
|
124071
|
-
if (
|
|
124689
|
+
if (_this30.$message) _this30.$message.error(err && err.message || '表头配置保存失败');
|
|
124072
124690
|
});
|
|
124073
124691
|
}
|
|
124074
124692
|
}
|
|
@@ -124090,8 +124708,8 @@ var StandardTablevue_type_style_index_0_prod_lang_scss_external = __webpack_requ
|
|
|
124090
124708
|
|
|
124091
124709
|
var StandardTable_component = normalizeComponent(
|
|
124092
124710
|
components_StandardTablevue_type_script_lang_js,
|
|
124093
|
-
|
|
124094
|
-
|
|
124711
|
+
StandardTablevue_type_template_id_d034e982_render,
|
|
124712
|
+
StandardTablevue_type_template_id_d034e982_staticRenderFns,
|
|
124095
124713
|
false,
|
|
124096
124714
|
null,
|
|
124097
124715
|
null,
|