@cimom-ui/standard-ui 1.1.16 → 1.1.17
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 +651 -41
- package/dist/standard-ui.umd.js +651 -41
- package/dist/standard-ui.umd.min.js +3 -3
- package/package.json +1 -1
|
@@ -3132,12 +3132,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3132
3132
|
/* 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__);
|
|
3133
3133
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
|
|
3134
3134
|
/* 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__);
|
|
3135
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4417);
|
|
3136
|
+
/* 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__);
|
|
3135
3137
|
// Imports
|
|
3136
3138
|
|
|
3137
3139
|
|
|
3140
|
+
|
|
3141
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(9793), __webpack_require__.b);
|
|
3138
3142
|
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()));
|
|
3143
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
3139
3144
|
// Module
|
|
3140
|
-
___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}`, ""]);
|
|
3145
|
+
___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}`, ""]);
|
|
3141
3146
|
// Exports
|
|
3142
3147
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
3143
3148
|
|
|
@@ -3265,6 +3270,39 @@ module.exports = function (cssWithMappingToString) {
|
|
|
3265
3270
|
|
|
3266
3271
|
/***/ },
|
|
3267
3272
|
|
|
3273
|
+
/***/ 4417
|
|
3274
|
+
(module) {
|
|
3275
|
+
|
|
3276
|
+
"use strict";
|
|
3277
|
+
|
|
3278
|
+
|
|
3279
|
+
module.exports = function (url, options) {
|
|
3280
|
+
if (!options) {
|
|
3281
|
+
options = {};
|
|
3282
|
+
}
|
|
3283
|
+
if (!url) {
|
|
3284
|
+
return url;
|
|
3285
|
+
}
|
|
3286
|
+
url = String(url.__esModule ? url.default : url);
|
|
3287
|
+
|
|
3288
|
+
// If url is already wrapped in quotes, remove them
|
|
3289
|
+
if (/^['"].*['"]$/.test(url)) {
|
|
3290
|
+
url = url.slice(1, -1);
|
|
3291
|
+
}
|
|
3292
|
+
if (options.hash) {
|
|
3293
|
+
url += options.hash;
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
// Should url be wrapped?
|
|
3297
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
|
3298
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
|
3299
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
3300
|
+
}
|
|
3301
|
+
return url;
|
|
3302
|
+
};
|
|
3303
|
+
|
|
3304
|
+
/***/ },
|
|
3305
|
+
|
|
3268
3306
|
/***/ 1601
|
|
3269
3307
|
(module) {
|
|
3270
3308
|
|
|
@@ -118141,6 +118179,14 @@ VxeUI.setTheme('light');
|
|
|
118141
118179
|
|
|
118142
118180
|
|
|
118143
118181
|
|
|
118182
|
+
/***/ },
|
|
118183
|
+
|
|
118184
|
+
/***/ 9793
|
|
118185
|
+
(module) {
|
|
118186
|
+
|
|
118187
|
+
"use strict";
|
|
118188
|
+
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";
|
|
118189
|
+
|
|
118144
118190
|
/***/ },
|
|
118145
118191
|
|
|
118146
118192
|
/***/ 4100
|
|
@@ -118258,6 +118304,27 @@ module.exports = require("vue");
|
|
|
118258
118304
|
/******/ return module;
|
|
118259
118305
|
/******/ };
|
|
118260
118306
|
/******/
|
|
118307
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
118308
|
+
/******/ (() => {
|
|
118309
|
+
/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
|
|
118310
|
+
/******/
|
|
118311
|
+
/******/ // no installed chunks
|
|
118312
|
+
/******/
|
|
118313
|
+
/******/ // no chunk on demand loading
|
|
118314
|
+
/******/
|
|
118315
|
+
/******/ // no prefetching
|
|
118316
|
+
/******/
|
|
118317
|
+
/******/ // no preloaded
|
|
118318
|
+
/******/
|
|
118319
|
+
/******/ // no HMR
|
|
118320
|
+
/******/
|
|
118321
|
+
/******/ // no HMR manifest
|
|
118322
|
+
/******/
|
|
118323
|
+
/******/ // no on chunks loaded
|
|
118324
|
+
/******/
|
|
118325
|
+
/******/ // no jsonp function
|
|
118326
|
+
/******/ })();
|
|
118327
|
+
/******/
|
|
118261
118328
|
/************************************************************************/
|
|
118262
118329
|
let __webpack_exports__ = {};
|
|
118263
118330
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
@@ -121522,8 +121589,8 @@ var StandardTimePick_component = normalizeComponent(
|
|
|
121522
121589
|
)
|
|
121523
121590
|
|
|
121524
121591
|
/* harmony default export */ const StandardTimePick = (StandardTimePick_component.exports);
|
|
121525
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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=
|
|
121526
|
-
var
|
|
121592
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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=d9620728
|
|
121593
|
+
var StandardTablevue_type_template_id_d9620728_render = function render() {
|
|
121527
121594
|
var _vm = this,
|
|
121528
121595
|
_c = _vm._self._c;
|
|
121529
121596
|
return _c('section', {
|
|
@@ -121680,6 +121747,39 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121680
121747
|
return _vm.toggleColumnSortable(col);
|
|
121681
121748
|
}
|
|
121682
121749
|
}
|
|
121750
|
+
}), _c('el-button', {
|
|
121751
|
+
"class": {
|
|
121752
|
+
'is-pinned': col.filterable,
|
|
121753
|
+
'is-sort-off': !col.filterable
|
|
121754
|
+
},
|
|
121755
|
+
attrs: {
|
|
121756
|
+
"type": "text",
|
|
121757
|
+
"size": "mini",
|
|
121758
|
+
"title": "是否显示筛选功能"
|
|
121759
|
+
},
|
|
121760
|
+
on: {
|
|
121761
|
+
"click": function click($event) {
|
|
121762
|
+
return _vm.toggleColumnFilterable(col);
|
|
121763
|
+
}
|
|
121764
|
+
}
|
|
121765
|
+
}, [_c('i', {
|
|
121766
|
+
staticClass: "nr-icon-filter"
|
|
121767
|
+
})]), _c('el-button', {
|
|
121768
|
+
"class": {
|
|
121769
|
+
'is-pinned': col.searchable,
|
|
121770
|
+
'is-sort-off': !col.searchable
|
|
121771
|
+
},
|
|
121772
|
+
attrs: {
|
|
121773
|
+
"type": "text",
|
|
121774
|
+
"size": "mini",
|
|
121775
|
+
"icon": "el-icon-search",
|
|
121776
|
+
"title": "是否显示搜索功能"
|
|
121777
|
+
},
|
|
121778
|
+
on: {
|
|
121779
|
+
"click": function click($event) {
|
|
121780
|
+
return _vm.toggleColumnSearchable(col);
|
|
121781
|
+
}
|
|
121782
|
+
}
|
|
121683
121783
|
}), _c('el-button', {
|
|
121684
121784
|
"class": {
|
|
121685
121785
|
'is-pinned': col.fixed === 'left'
|
|
@@ -121753,7 +121853,7 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121753
121853
|
"height": _vm.height,
|
|
121754
121854
|
"z-index": _vm.zIndex || undefined,
|
|
121755
121855
|
"loading": _vm.loading,
|
|
121756
|
-
"data": _vm.
|
|
121856
|
+
"data": _vm.displayTableData,
|
|
121757
121857
|
"border": "",
|
|
121758
121858
|
"highlight-current-row": "",
|
|
121759
121859
|
"row-config": _vm.rowConfig,
|
|
@@ -121767,11 +121867,13 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121767
121867
|
"resizable-config": {
|
|
121768
121868
|
minWidth: 60
|
|
121769
121869
|
},
|
|
121870
|
+
"sort-config": _vm.sortConfig,
|
|
121770
121871
|
"show-footer": !!_vm.footerMethod,
|
|
121771
121872
|
"footer-method": _vm.footerMethod,
|
|
121772
121873
|
"menu-config": _vm.resolvedMenuConfig
|
|
121773
121874
|
},
|
|
121774
121875
|
on: {
|
|
121876
|
+
"sort-change": _vm.onSortChange,
|
|
121775
121877
|
"menu-click": _vm.onMenuClick,
|
|
121776
121878
|
"resizable-change": _vm.onColumnResizableChange,
|
|
121777
121879
|
"checkbox-change": _vm.handleCheckboxChange,
|
|
@@ -121815,6 +121917,135 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121815
121917
|
"edit-render": col.editRender || undefined
|
|
121816
121918
|
},
|
|
121817
121919
|
scopedSlots: _vm._u([{
|
|
121920
|
+
key: _vm.headerToolSlot,
|
|
121921
|
+
fn: function fn() {
|
|
121922
|
+
return [_c('span', {
|
|
121923
|
+
staticClass: "nr-col-title"
|
|
121924
|
+
}, [_c('span', {
|
|
121925
|
+
staticClass: "nr-col-title-text"
|
|
121926
|
+
}, [_vm._v(_vm._s(col.title))]), col.sortable || col.filterable || col.searchable ? _c('span', {
|
|
121927
|
+
staticClass: "nr-col-tools"
|
|
121928
|
+
}, [col.sortable ? _c('i', {
|
|
121929
|
+
staticClass: "el-icon-sort nr-col-tool",
|
|
121930
|
+
"class": {
|
|
121931
|
+
'is-active': _vm.columnSortOrder(col) !== ''
|
|
121932
|
+
},
|
|
121933
|
+
attrs: {
|
|
121934
|
+
"title": _vm.columnSortTitle(col)
|
|
121935
|
+
},
|
|
121936
|
+
on: {
|
|
121937
|
+
"click": function click($event) {
|
|
121938
|
+
$event.stopPropagation();
|
|
121939
|
+
return _vm.toggleColumnSort(col, $event);
|
|
121940
|
+
},
|
|
121941
|
+
"mousedown": function mousedown($event) {
|
|
121942
|
+
$event.stopPropagation();
|
|
121943
|
+
}
|
|
121944
|
+
}
|
|
121945
|
+
}) : _vm._e(), col.filterable ? _c('el-popover', {
|
|
121946
|
+
attrs: {
|
|
121947
|
+
"placement": "bottom-start",
|
|
121948
|
+
"trigger": "click",
|
|
121949
|
+
"popper-class": "nr-col-tool-popper"
|
|
121950
|
+
},
|
|
121951
|
+
on: {
|
|
121952
|
+
"show": function show($event) {
|
|
121953
|
+
return _vm.openColumnFilter(col);
|
|
121954
|
+
}
|
|
121955
|
+
}
|
|
121956
|
+
}, [_c('el-select', {
|
|
121957
|
+
ref: 'colFilter' + col.uid,
|
|
121958
|
+
refInFor: true,
|
|
121959
|
+
staticClass: "nr-col-filter-select",
|
|
121960
|
+
attrs: {
|
|
121961
|
+
"value": _vm.columnFilterValue(col),
|
|
121962
|
+
"multiple": "",
|
|
121963
|
+
"filterable": "",
|
|
121964
|
+
"clearable": "",
|
|
121965
|
+
"collapse-tags": "",
|
|
121966
|
+
"size": "mini",
|
|
121967
|
+
"placeholder": "请选择",
|
|
121968
|
+
"popper-append-to-body": false
|
|
121969
|
+
},
|
|
121970
|
+
on: {
|
|
121971
|
+
"change": function change(values) {
|
|
121972
|
+
return _vm.setColumnFilter(col, values);
|
|
121973
|
+
}
|
|
121974
|
+
}
|
|
121975
|
+
}, _vm._l(_vm.columnFilterOptions(col), function (opt) {
|
|
121976
|
+
return _c('el-option', {
|
|
121977
|
+
key: opt.key,
|
|
121978
|
+
attrs: {
|
|
121979
|
+
"label": opt.label,
|
|
121980
|
+
"value": opt.value
|
|
121981
|
+
}
|
|
121982
|
+
});
|
|
121983
|
+
}), 1), _c('i', {
|
|
121984
|
+
staticClass: "nr-icon-filter nr-col-tool",
|
|
121985
|
+
"class": {
|
|
121986
|
+
'is-active': _vm.columnFilterActive(col)
|
|
121987
|
+
},
|
|
121988
|
+
attrs: {
|
|
121989
|
+
"slot": "reference",
|
|
121990
|
+
"title": "筛选"
|
|
121991
|
+
},
|
|
121992
|
+
on: {
|
|
121993
|
+
"click": function click($event) {
|
|
121994
|
+
$event.stopPropagation();
|
|
121995
|
+
},
|
|
121996
|
+
"mousedown": function mousedown($event) {
|
|
121997
|
+
$event.stopPropagation();
|
|
121998
|
+
}
|
|
121999
|
+
},
|
|
122000
|
+
slot: "reference"
|
|
122001
|
+
})], 1) : _vm._e(), col.searchable ? _c('el-popover', {
|
|
122002
|
+
attrs: {
|
|
122003
|
+
"placement": "bottom-start",
|
|
122004
|
+
"trigger": "click",
|
|
122005
|
+
"popper-class": "nr-col-tool-popper"
|
|
122006
|
+
},
|
|
122007
|
+
on: {
|
|
122008
|
+
"show": function show($event) {
|
|
122009
|
+
return _vm.focusColumnSearch(col);
|
|
122010
|
+
}
|
|
122011
|
+
}
|
|
122012
|
+
}, [_c('el-input', {
|
|
122013
|
+
ref: 'colSearch' + col.uid,
|
|
122014
|
+
refInFor: true,
|
|
122015
|
+
staticClass: "nr-col-search-input",
|
|
122016
|
+
attrs: {
|
|
122017
|
+
"value": _vm.columnKeyword(col),
|
|
122018
|
+
"size": "mini",
|
|
122019
|
+
"clearable": "",
|
|
122020
|
+
"placeholder": "请输入关键字"
|
|
122021
|
+
},
|
|
122022
|
+
on: {
|
|
122023
|
+
"input": function input(value) {
|
|
122024
|
+
return _vm.setColumnKeyword(col, value);
|
|
122025
|
+
}
|
|
122026
|
+
}
|
|
122027
|
+
}), _c('i', {
|
|
122028
|
+
staticClass: "el-icon-search nr-col-tool",
|
|
122029
|
+
"class": {
|
|
122030
|
+
'is-active': _vm.columnSearchActive(col)
|
|
122031
|
+
},
|
|
122032
|
+
attrs: {
|
|
122033
|
+
"slot": "reference",
|
|
122034
|
+
"title": "搜索"
|
|
122035
|
+
},
|
|
122036
|
+
on: {
|
|
122037
|
+
"click": function click($event) {
|
|
122038
|
+
$event.stopPropagation();
|
|
122039
|
+
},
|
|
122040
|
+
"mousedown": function mousedown($event) {
|
|
122041
|
+
$event.stopPropagation();
|
|
122042
|
+
}
|
|
122043
|
+
},
|
|
122044
|
+
slot: "reference"
|
|
122045
|
+
})], 1) : _vm._e()], 1) : _vm._e()])];
|
|
122046
|
+
},
|
|
122047
|
+
proxy: true
|
|
122048
|
+
}, {
|
|
121818
122049
|
key: "default",
|
|
121819
122050
|
fn: function fn(scope) {
|
|
121820
122051
|
return [_c('normal-report-cell', {
|
|
@@ -121858,7 +122089,7 @@ var StandardTablevue_type_template_id_24e29a8b_render = function render() {
|
|
|
121858
122089
|
}
|
|
121859
122090
|
}) : _vm.getFooterEmptyVisible() ? _c('standard-footer-empty') : _vm._e()], 1);
|
|
121860
122091
|
};
|
|
121861
|
-
var
|
|
122092
|
+
var StandardTablevue_type_template_id_d9620728_staticRenderFns = [];
|
|
121862
122093
|
|
|
121863
122094
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/ToolbarEmpty.vue?vue&type=script&lang=js
|
|
121864
122095
|
/**
|
|
@@ -122067,7 +122298,9 @@ function readSavedColumn(item) {
|
|
|
122067
122298
|
fixed: item.Fixed != null ? item.Fixed : item.fixed,
|
|
122068
122299
|
minWidth: item.MinWidth !== undefined ? item.MinWidth : item.minWidth,
|
|
122069
122300
|
width: item.Width !== undefined ? item.Width : item.width,
|
|
122070
|
-
sortable: item.Sortable !== undefined ? item.Sortable : item.sortable
|
|
122301
|
+
sortable: item.Sortable !== undefined ? item.Sortable : item.sortable,
|
|
122302
|
+
filterable: item.Filterable !== undefined ? item.Filterable : item.filterable,
|
|
122303
|
+
searchable: item.Searchable !== undefined ? item.Searchable : item.searchable
|
|
122071
122304
|
};
|
|
122072
122305
|
}
|
|
122073
122306
|
function savedFixed(value) {
|
|
@@ -122178,7 +122411,9 @@ function mergeColumnConfig(comps, savedColumns) {
|
|
|
122178
122411
|
fixed: savedFixed(row.saved.fixed),
|
|
122179
122412
|
minWidth: savedMinWidth(row.saved.minWidth),
|
|
122180
122413
|
width: savedWidth(row.saved.width),
|
|
122181
|
-
sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable
|
|
122414
|
+
sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable,
|
|
122415
|
+
filterable: row.saved.filterable != null ? !!row.saved.filterable : false,
|
|
122416
|
+
searchable: row.saved.searchable != null ? !!row.saved.searchable : false
|
|
122182
122417
|
}
|
|
122183
122418
|
});
|
|
122184
122419
|
});
|
|
@@ -122208,7 +122443,9 @@ function buildColumnPayload(comps, order, states) {
|
|
|
122208
122443
|
Fixed: savedFixed(st.fixed),
|
|
122209
122444
|
MinWidth: savedMinWidth(st.minWidth),
|
|
122210
122445
|
Width: savedWidth(st.width),
|
|
122211
|
-
Sortable: !!st.sortable
|
|
122446
|
+
Sortable: !!st.sortable,
|
|
122447
|
+
Filterable: !!st.filterable,
|
|
122448
|
+
Searchable: !!st.searchable
|
|
122212
122449
|
});
|
|
122213
122450
|
});
|
|
122214
122451
|
return columns;
|
|
@@ -122227,6 +122464,8 @@ function isDefaultColumnPayload(comps, columns) {
|
|
|
122227
122464
|
if (col.Visible !== true) return false;
|
|
122228
122465
|
if ((col.Fixed || '') !== (comp.fixed || '')) return false;
|
|
122229
122466
|
if (!!col.Sortable !== !!comp.sortable) return false;
|
|
122467
|
+
if (!!col.Filterable) return false;
|
|
122468
|
+
if (!!col.Searchable) return false;
|
|
122230
122469
|
if (col.Width != null) return false;
|
|
122231
122470
|
if (col.MinWidth != null && Number(col.MinWidth) !== Number(comp.resolvedMinWidth)) return false;
|
|
122232
122471
|
}
|
|
@@ -122411,6 +122650,7 @@ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLim
|
|
|
122411
122650
|
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."); }
|
|
122412
122651
|
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; } }
|
|
122413
122652
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
122653
|
+
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); }
|
|
122414
122654
|
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(); }
|
|
122415
122655
|
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."); }
|
|
122416
122656
|
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; } }
|
|
@@ -122444,6 +122684,41 @@ function formatDateTime(date) {
|
|
|
122444
122684
|
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()));
|
|
122445
122685
|
}
|
|
122446
122686
|
|
|
122687
|
+
// 表头筛选/搜索按钮放进哪个插槽。
|
|
122688
|
+
// vxe-table 3.6 及更早:普通列只消费 header 插槽,内容画在标题里,排序图标仍拼在后面。
|
|
122689
|
+
// vxe-table 3.24:header 插槽会替换整个表头并丢掉排序图标,title 插槽才画在标题内部。
|
|
122690
|
+
function detectVxeHeaderToolSlot(vm) {
|
|
122691
|
+
var comps = vm && vm.$options && vm.$options.components;
|
|
122692
|
+
var seen = [];
|
|
122693
|
+
while (comps && comps !== Object.prototype && seen.indexOf(comps) === -1) {
|
|
122694
|
+
seen.push(comps);
|
|
122695
|
+
var col = comps.VxeColumn || comps['vxe-column'];
|
|
122696
|
+
var options = col && (col.options || col);
|
|
122697
|
+
var fn = options && options.methods && options.methods.renderHeaderTitle;
|
|
122698
|
+
if (typeof fn === 'function') {
|
|
122699
|
+
return String(fn).indexOf('tableHeadeSlotToTitleSlot') !== -1 ? 'title' : 'header';
|
|
122700
|
+
}
|
|
122701
|
+
comps = Object.getPrototypeOf(comps);
|
|
122702
|
+
}
|
|
122703
|
+
return 'title';
|
|
122704
|
+
}
|
|
122705
|
+
|
|
122706
|
+
// 把插槽渲染结果收成可见文本,供表头筛选和搜索使用。自定义列(如 el-tag)取标签里的文字。
|
|
122707
|
+
function vnodeText(node) {
|
|
122708
|
+
if (node == null || node === false || node === true) return '';
|
|
122709
|
+
if (typeof node === 'string' || typeof node === 'number') return String(node);
|
|
122710
|
+
if (Array.isArray(node)) {
|
|
122711
|
+
var _text = '';
|
|
122712
|
+
for (var i = 0; i < node.length; i++) _text += vnodeText(node[i]);
|
|
122713
|
+
return _text;
|
|
122714
|
+
}
|
|
122715
|
+
var text = node.text ? String(node.text) : '';
|
|
122716
|
+
if (node.children && node.children.length) text += vnodeText(node.children);
|
|
122717
|
+
var opts = node.componentOptions;
|
|
122718
|
+
if (opts && opts.children && opts.children.length) text += vnodeText(opts.children);
|
|
122719
|
+
return text;
|
|
122720
|
+
}
|
|
122721
|
+
|
|
122447
122722
|
/**
|
|
122448
122723
|
* 单元格渲染分发组件(组件内部使用,不对外暴露):
|
|
122449
122724
|
* vxe-table 3.x 的列只能通过 <vxe-column> 子组件 + 作用域插槽声明,
|
|
@@ -122727,7 +123002,20 @@ var NormalReportSlotView = {
|
|
|
122727
123002
|
columnConfigDirty: false,
|
|
122728
123003
|
columnConfigSettled: false,
|
|
122729
123004
|
columnConfigTimer: null,
|
|
122730
|
-
columnConfigSaveTimer: null
|
|
123005
|
+
columnConfigSaveTimer: null,
|
|
123006
|
+
// 表头筛选/搜索按钮使用的插槽名:header(vxe 3.6)或 title(vxe 3.24)
|
|
123007
|
+
headerToolSlot: detectVxeHeaderToolSlot(this),
|
|
123008
|
+
// 表头筛选已选值、搜索关键字、当前排序方向。只作用于当前页面,不写入列配置
|
|
123009
|
+
columnFilters: {},
|
|
123010
|
+
columnKeywords: {},
|
|
123011
|
+
columnSortOrders: {},
|
|
123012
|
+
// 不用 vxe 自带的上下箭头,改由表头里的 el-icon-sort 触发排序
|
|
123013
|
+
sortConfig: {
|
|
123014
|
+
showIcon: false,
|
|
123015
|
+
allowClear: true,
|
|
123016
|
+
trigger: 'default'
|
|
123017
|
+
},
|
|
123018
|
+
filterOptionCache: {}
|
|
122731
123019
|
};
|
|
122732
123020
|
},
|
|
122733
123021
|
computed: {
|
|
@@ -122804,7 +123092,7 @@ var NormalReportSlotView = {
|
|
|
122804
123092
|
// 实际生效的右键菜单配置:
|
|
122805
123093
|
// 优先取 menuConfig prop(自定义模式);
|
|
122806
123094
|
// 否则自动生成:body 第一栏“复制” + 第二栏操作列按钮菜单项(tableOperation 为空时仅“复制”一栏);
|
|
122807
|
-
// header
|
|
123095
|
+
// header 为表头右键菜单(排序 / 筛选 / 搜索 / 固定在左侧 / 固定在右侧);
|
|
122808
123096
|
// 单元格右键菜单默认关闭:showContextMenu=false 时 body 无菜单项,
|
|
122809
123097
|
// 且不阻止浏览器默认右键菜单(显示浏览器原生菜单),表头菜单不受影响
|
|
122810
123098
|
resolvedMenuConfig: function resolvedMenuConfig() {
|
|
@@ -122843,6 +123131,20 @@ var NormalReportSlotView = {
|
|
|
122843
123131
|
},
|
|
122844
123132
|
prefixIcon: 'el-icon-sort',
|
|
122845
123133
|
__isHeaderMenu: true
|
|
123134
|
+
}, {
|
|
123135
|
+
code: '__normal_report_header_filter',
|
|
123136
|
+
name: function name() {
|
|
123137
|
+
return _this.getHeaderFilterMenuName();
|
|
123138
|
+
},
|
|
123139
|
+
prefixIcon: 'nr-icon-filter',
|
|
123140
|
+
__isHeaderMenu: true
|
|
123141
|
+
}, {
|
|
123142
|
+
code: '__normal_report_header_search',
|
|
123143
|
+
name: function name() {
|
|
123144
|
+
return _this.getHeaderSearchMenuName();
|
|
123145
|
+
},
|
|
123146
|
+
prefixIcon: 'el-icon-search',
|
|
123147
|
+
__isHeaderMenu: true
|
|
122846
123148
|
}, {
|
|
122847
123149
|
code: '__normal_report_header_fix_left',
|
|
122848
123150
|
name: function name() {
|
|
@@ -122892,6 +123194,9 @@ var NormalReportSlotView = {
|
|
|
122892
123194
|
align: comp.align,
|
|
122893
123195
|
// 是否显示排序功能:优先取列设置弹层设置的值,未设置时取列组件声明
|
|
122894
123196
|
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
123197
|
+
// 筛选、搜索只来自用户配置,代码列默认不显示
|
|
123198
|
+
filterable: !!(st && st.filterable),
|
|
123199
|
+
searchable: !!(st && st.searchable),
|
|
122895
123200
|
showOverflow: comp.showOverflow,
|
|
122896
123201
|
resizable: comp.resizable,
|
|
122897
123202
|
// 编辑:edit-render 优先;editable 默认文本输入;仅有 #edit 插槽时用空配置打开编辑
|
|
@@ -122914,11 +123219,9 @@ var NormalReportSlotView = {
|
|
|
122914
123219
|
var baseKey = c.field || c.type || '__normal_report_uid_' + c.uid;
|
|
122915
123220
|
var isSeq = c.type === 'seq';
|
|
122916
123221
|
return {
|
|
122917
|
-
// key 中追加 sortable/fixed:vxe-table 3.x
|
|
122918
|
-
//
|
|
122919
|
-
|
|
122920
|
-
// <vxe-column>,使表头排序图标与固定列分组实时更新
|
|
122921
|
-
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || ''),
|
|
123222
|
+
// key 中追加 sortable/fixed/filter/search:vxe-table 3.x 在列创建时固化表头渲染,
|
|
123223
|
+
// 并把当时的插槽函数记在列上。仅改状态不会刷新表头按钮,纳入 key 后强制重建列
|
|
123224
|
+
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || '') + '|filter=' + (c.filterable ? 1 : 0) + '|search=' + (c.searchable ? 1 : 0),
|
|
122922
123225
|
// 列唯一主键(vxe-table col-id → ColumnInfo.id / 表头 th 的 colid 属性):
|
|
122923
123226
|
// 内嵌组件列 uid,用于表头右键菜单与拖拽换列时把 vxe 列映射回组件列;
|
|
122924
123227
|
// 内置列(多选框/操作列)不传 col-id,由 vxe 自动生成普通 id
|
|
@@ -122936,6 +123239,9 @@ var NormalReportSlotView = {
|
|
|
122936
123239
|
fixed: c.fixed || undefined,
|
|
122937
123240
|
align: c.align,
|
|
122938
123241
|
sortable: !!c.sortable,
|
|
123242
|
+
filterable: !!c.filterable,
|
|
123243
|
+
searchable: !!c.searchable,
|
|
123244
|
+
uid: c.uid,
|
|
122939
123245
|
// 序号列排序:按行在原始数据中的索引排序(升序恢复原始顺序,降序反向)
|
|
122940
123246
|
sortBy: isSeq ? function (_ref) {
|
|
122941
123247
|
var row = _ref.row;
|
|
@@ -122991,12 +123297,20 @@ var NormalReportSlotView = {
|
|
|
122991
123297
|
return col.editRender;
|
|
122992
123298
|
});
|
|
122993
123299
|
return editable ? this.defaultEditConfig : null;
|
|
123300
|
+
},
|
|
123301
|
+
// 按已启用列的筛选值和搜索关键字过滤。没有条件时返回原数组,避免表格无故重绘
|
|
123302
|
+
displayTableData: function displayTableData() {
|
|
123303
|
+
var rows = Array.isArray(this.tableData) ? this.tableData : [];
|
|
123304
|
+
var checks = this.buildColumnQueryChecks();
|
|
123305
|
+
if (!checks.length) return rows;
|
|
123306
|
+
return this.filterRowsByQuery(rows, checks);
|
|
122994
123307
|
}
|
|
122995
123308
|
},
|
|
122996
123309
|
watch: {
|
|
122997
123310
|
// 表格数据变化时自动刷新“数据更新时间”
|
|
122998
123311
|
tableData: function tableData() {
|
|
122999
123312
|
this.updateTime = formatDateTime(new Date());
|
|
123313
|
+
this.filterOptionCache = {};
|
|
123000
123314
|
}
|
|
123001
123315
|
},
|
|
123002
123316
|
created: function created() {
|
|
@@ -123145,7 +123459,9 @@ var NormalReportSlotView = {
|
|
|
123145
123459
|
fixed: comp.fixed || '',
|
|
123146
123460
|
minWidth: null,
|
|
123147
123461
|
width: null,
|
|
123148
|
-
sortable: !!comp.sortable
|
|
123462
|
+
sortable: !!comp.sortable,
|
|
123463
|
+
filterable: false,
|
|
123464
|
+
searchable: false
|
|
123149
123465
|
});
|
|
123150
123466
|
if (this.columnOrder.indexOf(comp._uid) === -1) {
|
|
123151
123467
|
this.columnOrder.push(comp._uid);
|
|
@@ -123161,6 +123477,10 @@ var NormalReportSlotView = {
|
|
|
123161
123477
|
if (this.columnStates[comp._uid]) {
|
|
123162
123478
|
this.$delete(this.columnStates, comp._uid);
|
|
123163
123479
|
}
|
|
123480
|
+
this.$delete(this.columnFilters, comp._uid);
|
|
123481
|
+
this.$delete(this.columnKeywords, comp._uid);
|
|
123482
|
+
this.$delete(this.columnSortOrders, comp._uid);
|
|
123483
|
+
this.$delete(this.filterOptionCache, comp._uid);
|
|
123164
123484
|
this.buildDefaultSnapshot();
|
|
123165
123485
|
},
|
|
123166
123486
|
// 重建默认列快照(注册顺序 + 列组件声明默认值)
|
|
@@ -123175,7 +123495,9 @@ var NormalReportSlotView = {
|
|
|
123175
123495
|
// 默认列最小宽度:resolvedMinWidth(显式 min-width > 显式 width > 按标题自动计算)
|
|
123176
123496
|
minWidth: comp.resolvedMinWidth,
|
|
123177
123497
|
// 默认是否显示排序功能
|
|
123178
|
-
sortable: !!comp.sortable
|
|
123498
|
+
sortable: !!comp.sortable,
|
|
123499
|
+
filterable: false,
|
|
123500
|
+
searchable: false
|
|
123179
123501
|
};
|
|
123180
123502
|
});
|
|
123181
123503
|
},
|
|
@@ -123451,6 +123773,14 @@ var NormalReportSlotView = {
|
|
|
123451
123773
|
var st = this.getHeaderMenuColumnState();
|
|
123452
123774
|
return st && st.sortable ? '取消显示排序按钮' : '显示排序按钮';
|
|
123453
123775
|
},
|
|
123776
|
+
getHeaderFilterMenuName: function getHeaderFilterMenuName() {
|
|
123777
|
+
var st = this.getHeaderMenuColumnState();
|
|
123778
|
+
return st && st.filterable ? '取消显示筛选功能' : '显示筛选功能';
|
|
123779
|
+
},
|
|
123780
|
+
getHeaderSearchMenuName: function getHeaderSearchMenuName() {
|
|
123781
|
+
var st = this.getHeaderMenuColumnState();
|
|
123782
|
+
return st && st.searchable ? '取消显示搜索功能' : '显示搜索功能';
|
|
123783
|
+
},
|
|
123454
123784
|
// 固定列菜单名称(固定在左侧/右侧,已固定时显示取消固定)
|
|
123455
123785
|
getHeaderFixMenuName: function getHeaderFixMenuName(side) {
|
|
123456
123786
|
var st = this.getHeaderMenuColumnState();
|
|
@@ -123465,6 +123795,10 @@ var NormalReportSlotView = {
|
|
|
123465
123795
|
if (uid == null) return;
|
|
123466
123796
|
if (menu.code === '__normal_report_header_sort') {
|
|
123467
123797
|
this.toggleHeaderColumnSort(uid);
|
|
123798
|
+
} else if (menu.code === '__normal_report_header_filter') {
|
|
123799
|
+
this.toggleHeaderColumnFlag(uid, 'filterable');
|
|
123800
|
+
} else if (menu.code === '__normal_report_header_search') {
|
|
123801
|
+
this.toggleHeaderColumnFlag(uid, 'searchable');
|
|
123468
123802
|
} else if (menu.code === '__normal_report_header_fix_left') {
|
|
123469
123803
|
this.toggleHeaderColumnFixed(uid, 'left');
|
|
123470
123804
|
} else if (menu.code === '__normal_report_header_fix_right') {
|
|
@@ -123478,6 +123812,7 @@ var NormalReportSlotView = {
|
|
|
123478
123812
|
var st = this.columnStates[uid];
|
|
123479
123813
|
if (!st) return;
|
|
123480
123814
|
this.$set(st, 'sortable', !st.sortable);
|
|
123815
|
+
if (!st.sortable) this.$delete(this.columnSortOrders, uid);
|
|
123481
123816
|
this.schedulePersistColumnConfig();
|
|
123482
123817
|
this.$nextTick(function () {
|
|
123483
123818
|
return _this13.applyColumnOrder();
|
|
@@ -123495,6 +123830,16 @@ var NormalReportSlotView = {
|
|
|
123495
123830
|
return _this14.applyColumnOrder();
|
|
123496
123831
|
});
|
|
123497
123832
|
},
|
|
123833
|
+
// 表头右键切换筛选或搜索。关掉时清掉该列当前条件,避免按钮消失后仍在过滤
|
|
123834
|
+
toggleHeaderColumnFlag: function toggleHeaderColumnFlag(uid, field) {
|
|
123835
|
+
var st = this.columnStates[uid];
|
|
123836
|
+
if (!st || field !== 'filterable' && field !== 'searchable') return;
|
|
123837
|
+
var next = !st[field];
|
|
123838
|
+
this.$set(st, field, next);
|
|
123839
|
+
if (!next && field === 'filterable') this.$delete(this.columnFilters, uid);
|
|
123840
|
+
if (!next && field === 'searchable') this.$delete(this.columnKeywords, uid);
|
|
123841
|
+
this.schedulePersistColumnConfig();
|
|
123842
|
+
},
|
|
123498
123843
|
// ===== 单元格编辑 =====
|
|
123499
123844
|
onEditActivated: function onEditActivated(params, evnt) {
|
|
123500
123845
|
this.$emit('edit-activated', params, evnt);
|
|
@@ -123516,7 +123861,7 @@ var NormalReportSlotView = {
|
|
|
123516
123861
|
if (!target || typeof target.closest !== 'function') return;
|
|
123517
123862
|
// 列宽拖拽手柄:vxe-table 3.24 起类名由 .vxe-resizable 更名为
|
|
123518
123863
|
// .vxe-table--resizable-col-bar(旧类名保留兼容,3.24 以下版本使用)
|
|
123519
|
-
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar')) return;
|
|
123864
|
+
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar, .nr-col-tool')) return;
|
|
123520
123865
|
var th = target.closest('.vxe-header--column');
|
|
123521
123866
|
if (!th) return;
|
|
123522
123867
|
var uid = this.parseColIdUid(th.getAttribute('colid'));
|
|
@@ -123753,10 +124098,262 @@ var NormalReportSlotView = {
|
|
|
123753
124098
|
xTable.recalculate && xTable.recalculate(true);
|
|
123754
124099
|
});
|
|
123755
124100
|
},
|
|
124101
|
+
// ===== 表头筛选 / 搜索 =====
|
|
124102
|
+
// 当前列已选的筛选值。未选表示不筛选
|
|
124103
|
+
columnFilterValue: function columnFilterValue(col) {
|
|
124104
|
+
var list = col && this.columnFilters[col.uid];
|
|
124105
|
+
return Array.isArray(list) ? list : [];
|
|
124106
|
+
},
|
|
124107
|
+
columnKeyword: function columnKeyword(col) {
|
|
124108
|
+
var text = col && this.columnKeywords[col.uid];
|
|
124109
|
+
return text == null ? '' : String(text);
|
|
124110
|
+
},
|
|
124111
|
+
columnFilterActive: function columnFilterActive(col) {
|
|
124112
|
+
return this.columnFilterValue(col).length > 0;
|
|
124113
|
+
},
|
|
124114
|
+
columnSearchActive: function columnSearchActive(col) {
|
|
124115
|
+
return this.columnKeyword(col).trim() !== '';
|
|
124116
|
+
},
|
|
124117
|
+
columnSortOrder: function columnSortOrder(col) {
|
|
124118
|
+
if (!col) return '';
|
|
124119
|
+
return this.columnSortOrders[col.uid] || '';
|
|
124120
|
+
},
|
|
124121
|
+
columnSortTitle: function columnSortTitle(col) {
|
|
124122
|
+
var order = this.columnSortOrder(col);
|
|
124123
|
+
if (order === 'asc') return '升序,点击切换为降序';
|
|
124124
|
+
if (order === 'desc') return '降序,点击取消排序';
|
|
124125
|
+
return '排序';
|
|
124126
|
+
},
|
|
124127
|
+
// 点击表头排序图标:未排序 → 升序 → 降序 → 取消。走 vxe 的排序,远程排序和 sort-change 保持原样
|
|
124128
|
+
toggleColumnSort: function toggleColumnSort(col, evnt) {
|
|
124129
|
+
var table = this.$refs.xTable;
|
|
124130
|
+
if (!table || !col || typeof table.getColumnById !== 'function' || typeof table.triggerSortEvent !== 'function') return;
|
|
124131
|
+
var column = table.getColumnById(col.colId);
|
|
124132
|
+
if (!column) return;
|
|
124133
|
+
var order = column.order;
|
|
124134
|
+
var next = order === 'asc' ? 'desc' : order === 'desc' ? null : 'asc';
|
|
124135
|
+
table.triggerSortEvent(evnt, column, next);
|
|
124136
|
+
},
|
|
124137
|
+
onSortChange: function onSortChange(params) {
|
|
124138
|
+
var _this19 = this;
|
|
124139
|
+
var list = params && params.sortList || [];
|
|
124140
|
+
var next = {};
|
|
124141
|
+
list.forEach(function (item) {
|
|
124142
|
+
var column = item && item.column;
|
|
124143
|
+
var uid = column ? _this19.parseColIdUid(column.id) : null;
|
|
124144
|
+
if (uid != null && item.order) next[uid] = item.order;
|
|
124145
|
+
});
|
|
124146
|
+
this.columnSortOrders = next;
|
|
124147
|
+
},
|
|
124148
|
+
setColumnFilter: function setColumnFilter(col, values) {
|
|
124149
|
+
if (!col) return;
|
|
124150
|
+
this.$set(this.columnFilters, col.uid, Array.isArray(values) ? values : []);
|
|
124151
|
+
},
|
|
124152
|
+
setColumnKeyword: function setColumnKeyword(col, value) {
|
|
124153
|
+
if (!col) return;
|
|
124154
|
+
this.$set(this.columnKeywords, col.uid, value == null ? '' : String(value));
|
|
124155
|
+
},
|
|
124156
|
+
columnFilterOptions: function columnFilterOptions(col) {
|
|
124157
|
+
if (!col) return [];
|
|
124158
|
+
var cached = this.filterOptionCache[col.uid];
|
|
124159
|
+
return Array.isArray(cached) ? cached : [];
|
|
124160
|
+
},
|
|
124161
|
+
// 打开筛选时按当前表格数据生成可选项,避免每次渲染都扫全表
|
|
124162
|
+
// 固定列会把表头再画一份,同一列的筛选/搜索控件会有多份。只操作当前看得见的那一份。
|
|
124163
|
+
visibleColumnTool: function visibleColumnTool(ref) {
|
|
124164
|
+
var list = Array.isArray(ref) ? ref : ref ? [ref] : [];
|
|
124165
|
+
for (var i = 0; i < list.length; i++) {
|
|
124166
|
+
var el = list[i] && list[i].$el;
|
|
124167
|
+
if (el && el.offsetWidth > 0 && el.offsetHeight > 0) return list[i];
|
|
124168
|
+
}
|
|
124169
|
+
return list[0] || null;
|
|
124170
|
+
},
|
|
124171
|
+
openColumnFilter: function openColumnFilter(col) {
|
|
124172
|
+
var _this20 = this;
|
|
124173
|
+
if (!col || !col.comp) return;
|
|
124174
|
+
this.$set(this.filterOptionCache, col.uid, this.buildColumnFilterOptions(col.comp));
|
|
124175
|
+
this.$nextTick(function () {
|
|
124176
|
+
var select = _this20.visibleColumnTool(_this20.$refs['colFilter' + col.uid]);
|
|
124177
|
+
if (select && typeof select.toggleMenu === 'function' && !select.visible) select.toggleMenu();
|
|
124178
|
+
});
|
|
124179
|
+
},
|
|
124180
|
+
focusColumnSearch: function focusColumnSearch(col) {
|
|
124181
|
+
var _this21 = this;
|
|
124182
|
+
this.$nextTick(function () {
|
|
124183
|
+
var input = _this21.visibleColumnTool(_this21.$refs['colSearch' + (col && col.uid)]);
|
|
124184
|
+
if (input && typeof input.focus === 'function') input.focus();
|
|
124185
|
+
});
|
|
124186
|
+
},
|
|
124187
|
+
// 单元格参与筛选、搜索的文本:自定义插槽的可见文字优先,其次格式化结果,最后是字段值
|
|
124188
|
+
columnCellText: function columnCellText(comp, row, index) {
|
|
124189
|
+
if (!comp) return '';
|
|
124190
|
+
if (comp.type === 'seq') return String(index + 1);
|
|
124191
|
+
var scope = {
|
|
124192
|
+
row: row,
|
|
124193
|
+
column: comp,
|
|
124194
|
+
$index: index,
|
|
124195
|
+
seq: index + 1
|
|
124196
|
+
};
|
|
124197
|
+
if (comp.$scopedSlots && typeof comp.$scopedSlots["default"] === 'function') {
|
|
124198
|
+
try {
|
|
124199
|
+
var text = vnodeText(comp.$scopedSlots["default"](scope)).replace(/\s+/g, ' ').trim();
|
|
124200
|
+
if (text) return text;
|
|
124201
|
+
} catch (e) {
|
|
124202
|
+
// 插槽取值失败时退回字段值
|
|
124203
|
+
}
|
|
124204
|
+
}
|
|
124205
|
+
if (typeof comp.formatter === 'function') {
|
|
124206
|
+
try {
|
|
124207
|
+
var _value = comp.formatter(scope);
|
|
124208
|
+
if (_value != null && StandardTablevue_type_script_lang_js_typeof(_value) !== 'object') {
|
|
124209
|
+
var _text2 = String(_value).trim();
|
|
124210
|
+
if (_text2) return _text2;
|
|
124211
|
+
}
|
|
124212
|
+
} catch (e) {
|
|
124213
|
+
// 格式化失败时退回字段值
|
|
124214
|
+
}
|
|
124215
|
+
}
|
|
124216
|
+
if (!comp.field || !row) return '';
|
|
124217
|
+
var value = row[comp.field];
|
|
124218
|
+
if (value == null || value === '' || StandardTablevue_type_script_lang_js_typeof(value) === 'object') return '';
|
|
124219
|
+
return String(value);
|
|
124220
|
+
},
|
|
124221
|
+
buildColumnFilterOptions: function buildColumnFilterOptions(comp) {
|
|
124222
|
+
var _this22 = this;
|
|
124223
|
+
var seen = Object.create(null);
|
|
124224
|
+
var options = [];
|
|
124225
|
+
this.visitColumnRows(this.tableData, function (row, index) {
|
|
124226
|
+
var text = _this22.columnCellText(comp, row, index);
|
|
124227
|
+
if (seen[text]) return;
|
|
124228
|
+
seen[text] = true;
|
|
124229
|
+
options.push({
|
|
124230
|
+
key: text === '' ? '__empty' : text,
|
|
124231
|
+
value: text,
|
|
124232
|
+
label: text === '' ? '(空)' : text
|
|
124233
|
+
});
|
|
124234
|
+
});
|
|
124235
|
+
options.sort(function (a, b) {
|
|
124236
|
+
return a.label.localeCompare(b.label, 'zh');
|
|
124237
|
+
});
|
|
124238
|
+
return options;
|
|
124239
|
+
},
|
|
124240
|
+
visitColumnRows: function visitColumnRows(rows, visitor) {
|
|
124241
|
+
var list = Array.isArray(rows) ? rows : [];
|
|
124242
|
+
var childrenKey = this.treeConfig && this.treeConfig.children || 'children';
|
|
124243
|
+
var _walk = function walk(nodes) {
|
|
124244
|
+
nodes.forEach(function (row, index) {
|
|
124245
|
+
if (!row) return;
|
|
124246
|
+
visitor(row, index);
|
|
124247
|
+
var children = row[childrenKey];
|
|
124248
|
+
if (Array.isArray(children) && children.length) _walk(children);
|
|
124249
|
+
});
|
|
124250
|
+
};
|
|
124251
|
+
_walk(list);
|
|
124252
|
+
},
|
|
124253
|
+
// 只收集真正会缩小结果的条件。开关打开但还没选值、没输入时不过滤
|
|
124254
|
+
buildColumnQueryChecks: function buildColumnQueryChecks() {
|
|
124255
|
+
var _this23 = this;
|
|
124256
|
+
var checks = [];
|
|
124257
|
+
var compMap = Object.create(null);
|
|
124258
|
+
this.columnComps.forEach(function (comp) {
|
|
124259
|
+
if (comp) compMap[comp._uid] = comp;
|
|
124260
|
+
});
|
|
124261
|
+
this.columnOrder.forEach(function (uid) {
|
|
124262
|
+
var st = _this23.columnStates[uid];
|
|
124263
|
+
var comp = compMap[uid];
|
|
124264
|
+
if (!st || st.visible === false || !comp) return;
|
|
124265
|
+
var selected = _this23.columnFilters[uid];
|
|
124266
|
+
if (st.filterable && Array.isArray(selected) && selected.length) {
|
|
124267
|
+
var set = Object.create(null);
|
|
124268
|
+
selected.forEach(function (value) {
|
|
124269
|
+
set[value] = true;
|
|
124270
|
+
});
|
|
124271
|
+
checks.push(function (row, index) {
|
|
124272
|
+
return !!set[_this23.columnCellText(comp, row, index)];
|
|
124273
|
+
});
|
|
124274
|
+
}
|
|
124275
|
+
var keyword = st.searchable && _this23.columnKeywords[uid] != null ? String(_this23.columnKeywords[uid]).trim().toLowerCase() : '';
|
|
124276
|
+
if (keyword) {
|
|
124277
|
+
checks.push(function (row, index) {
|
|
124278
|
+
return _this23.columnCellText(comp, row, index).toLowerCase().indexOf(keyword) >= 0;
|
|
124279
|
+
});
|
|
124280
|
+
}
|
|
124281
|
+
});
|
|
124282
|
+
return checks;
|
|
124283
|
+
},
|
|
124284
|
+
filterRowsByQuery: function filterRowsByQuery(rows, checks) {
|
|
124285
|
+
var match = function match(row, index) {
|
|
124286
|
+
return checks.every(function (check) {
|
|
124287
|
+
return check(row, index);
|
|
124288
|
+
});
|
|
124289
|
+
};
|
|
124290
|
+
var tree = this.treeConfig;
|
|
124291
|
+
if (tree && tree.transform) return this.filterTransformTree(rows, match, tree);
|
|
124292
|
+
var childrenKey = tree && tree.children || 'children';
|
|
124293
|
+
if (rows.some(function (row) {
|
|
124294
|
+
return row && Array.isArray(row[childrenKey]);
|
|
124295
|
+
})) {
|
|
124296
|
+
return this.filterNestedTree(rows, match, childrenKey);
|
|
124297
|
+
}
|
|
124298
|
+
return rows.filter(function (row, index) {
|
|
124299
|
+
return match(row, index);
|
|
124300
|
+
});
|
|
124301
|
+
},
|
|
124302
|
+
// 扁平树:命中的行保留,同时保留它的上级,避免子节点失去父级后无法显示
|
|
124303
|
+
filterTransformTree: function filterTransformTree(list, match, tree) {
|
|
124304
|
+
var rowField = tree.rowField || 'id';
|
|
124305
|
+
var parentField = tree.parentField || 'parentId';
|
|
124306
|
+
var byId = Object.create(null);
|
|
124307
|
+
var matched = [];
|
|
124308
|
+
list.forEach(function (row, index) {
|
|
124309
|
+
if (!row) return;
|
|
124310
|
+
byId[row[rowField]] = row;
|
|
124311
|
+
if (match(row, index)) matched.push(row[rowField]);
|
|
124312
|
+
});
|
|
124313
|
+
var keep = Object.create(null);
|
|
124314
|
+
matched.forEach(function (id) {
|
|
124315
|
+
var current = id;
|
|
124316
|
+
var guard = Object.create(null);
|
|
124317
|
+
while (current != null && current !== '' && !guard[current]) {
|
|
124318
|
+
guard[current] = true;
|
|
124319
|
+
keep[current] = true;
|
|
124320
|
+
var row = byId[current];
|
|
124321
|
+
if (!row) break;
|
|
124322
|
+
current = row[parentField];
|
|
124323
|
+
}
|
|
124324
|
+
});
|
|
124325
|
+
return list.filter(function (row) {
|
|
124326
|
+
return row && keep[row[rowField]];
|
|
124327
|
+
});
|
|
124328
|
+
},
|
|
124329
|
+
filterNestedTree: function filterNestedTree(list, match, childrenKey) {
|
|
124330
|
+
var _walk2 = function walk(nodes) {
|
|
124331
|
+
var out = [];
|
|
124332
|
+
nodes.forEach(function (row, index) {
|
|
124333
|
+
if (!row) return;
|
|
124334
|
+
var source = Array.isArray(row[childrenKey]) ? row[childrenKey] : null;
|
|
124335
|
+
var children = source ? _walk2(source) : null;
|
|
124336
|
+
if (match(row, index) || children && children.length) {
|
|
124337
|
+
if (source && children !== source) {
|
|
124338
|
+
var copy = {};
|
|
124339
|
+
Object.keys(row).forEach(function (key) {
|
|
124340
|
+
copy[key] = row[key];
|
|
124341
|
+
});
|
|
124342
|
+
copy[childrenKey] = children;
|
|
124343
|
+
out.push(copy);
|
|
124344
|
+
} else {
|
|
124345
|
+
out.push(row);
|
|
124346
|
+
}
|
|
124347
|
+
}
|
|
124348
|
+
});
|
|
124349
|
+
return out;
|
|
124350
|
+
};
|
|
124351
|
+
return _walk2(list);
|
|
124352
|
+
},
|
|
123756
124353
|
// ===== 列设置弹层 =====
|
|
123757
124354
|
// 打开列设置:以当前注册列生成工作副本(每次打开都重新初始化)
|
|
123758
124355
|
openColumnSetting: function openColumnSetting() {
|
|
123759
|
-
var
|
|
124356
|
+
var _this24 = this;
|
|
123760
124357
|
var compMap = {};
|
|
123761
124358
|
this.columnComps.forEach(function (comp) {
|
|
123762
124359
|
compMap[comp._uid] = comp;
|
|
@@ -123776,7 +124373,9 @@ var NormalReportSlotView = {
|
|
|
123776
124373
|
// 用户已设置值 > 列组件 resolvedMinWidth(显式 min-width / width / 按标题自动计算)
|
|
123777
124374
|
minWidth: st && st.minWidth != null ? st.minWidth : comp.resolvedMinWidth,
|
|
123778
124375
|
// 是否显示排序功能:用户已设置值 > 列组件声明
|
|
123779
|
-
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable
|
|
124376
|
+
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
124377
|
+
filterable: !!(st && st.filterable),
|
|
124378
|
+
searchable: !!(st && st.searchable)
|
|
123780
124379
|
};
|
|
123781
124380
|
}).filter(Boolean);
|
|
123782
124381
|
this.dragColField = '';
|
|
@@ -123784,7 +124383,7 @@ var NormalReportSlotView = {
|
|
|
123784
124383
|
// 列标题宽度:按最长列名称计算(中文 25px/字 + 英文 15px/字 + 30px 余量),
|
|
123785
124384
|
// 各列标题统一按该宽度显示,保证输入框与按钮对齐
|
|
123786
124385
|
this.columnTitleWidth = this.columnDraft.reduce(function (max, c) {
|
|
123787
|
-
return Math.max(max,
|
|
124386
|
+
return Math.max(max, _this24.calcColumnTitleWidth(c.title));
|
|
123788
124387
|
}, 0);
|
|
123789
124388
|
},
|
|
123790
124389
|
// 计算单个列标题的显示宽度(px):中文 25px/字 + 英文 15px/字 + 30px 余量
|
|
@@ -123823,6 +124422,12 @@ var NormalReportSlotView = {
|
|
|
123823
124422
|
toggleColumnSortable: function toggleColumnSortable(col) {
|
|
123824
124423
|
col.sortable = !col.sortable;
|
|
123825
124424
|
},
|
|
124425
|
+
toggleColumnFilterable: function toggleColumnFilterable(col) {
|
|
124426
|
+
col.filterable = !col.filterable;
|
|
124427
|
+
},
|
|
124428
|
+
toggleColumnSearchable: function toggleColumnSearchable(col) {
|
|
124429
|
+
col.searchable = !col.searchable;
|
|
124430
|
+
},
|
|
123826
124431
|
// 上下移一列
|
|
123827
124432
|
moveColumnDraft: function moveColumnDraft(index, direction) {
|
|
123828
124433
|
var target = index + direction;
|
|
@@ -123876,24 +124481,29 @@ var NormalReportSlotView = {
|
|
|
123876
124481
|
},
|
|
123877
124482
|
// 确认:将面板副本应用到列状态并刷新表格
|
|
123878
124483
|
confirmColumnSetting: function confirmColumnSetting() {
|
|
123879
|
-
var
|
|
124484
|
+
var _this25 = this;
|
|
123880
124485
|
var order = [];
|
|
123881
124486
|
this.columnDraft.forEach(function (d) {
|
|
123882
|
-
var prev =
|
|
123883
|
-
|
|
124487
|
+
var prev = _this25.columnStates[d.uid] || {};
|
|
124488
|
+
_this25.$set(_this25.columnStates, d.uid, {
|
|
123884
124489
|
visible: d.visible,
|
|
123885
124490
|
fixed: d.fixed || '',
|
|
123886
124491
|
minWidth: d.minWidth != null ? d.minWidth : null,
|
|
123887
124492
|
width: prev.width != null ? prev.width : null,
|
|
123888
|
-
sortable: !!d.sortable
|
|
124493
|
+
sortable: !!d.sortable,
|
|
124494
|
+
filterable: !!d.filterable,
|
|
124495
|
+
searchable: !!d.searchable
|
|
123889
124496
|
});
|
|
124497
|
+
if (!d.filterable) _this25.$delete(_this25.columnFilters, d.uid);
|
|
124498
|
+
if (!d.searchable) _this25.$delete(_this25.columnKeywords, d.uid);
|
|
124499
|
+
if (!d.sortable) _this25.$delete(_this25.columnSortOrders, d.uid);
|
|
123890
124500
|
order.push(d.uid);
|
|
123891
124501
|
});
|
|
123892
124502
|
this.columnOrder = order;
|
|
123893
124503
|
this.columnSettingVisible = false;
|
|
123894
124504
|
this.persistColumnConfigNow();
|
|
123895
124505
|
this.$nextTick(function () {
|
|
123896
|
-
|
|
124506
|
+
_this25.applyColumnOrder();
|
|
123897
124507
|
});
|
|
123898
124508
|
},
|
|
123899
124509
|
// ===== 表头配置持久化 =====
|
|
@@ -123923,12 +124533,12 @@ var NormalReportSlotView = {
|
|
|
123923
124533
|
},
|
|
123924
124534
|
// 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度
|
|
123925
124535
|
scheduleInitialLayout: function scheduleInitialLayout() {
|
|
123926
|
-
var
|
|
124536
|
+
var _this26 = this;
|
|
123927
124537
|
this.$nextTick(function () {
|
|
123928
|
-
|
|
124538
|
+
_this26.resizeRecalculate();
|
|
123929
124539
|
if (typeof requestAnimationFrame === 'function') {
|
|
123930
124540
|
requestAnimationFrame(function () {
|
|
123931
|
-
return
|
|
124541
|
+
return _this26.resizeRecalculate();
|
|
123932
124542
|
});
|
|
123933
124543
|
}
|
|
123934
124544
|
});
|
|
@@ -123950,7 +124560,7 @@ var NormalReportSlotView = {
|
|
|
123950
124560
|
if (this.columnConfigDirty) this.schedulePersistColumnConfig();
|
|
123951
124561
|
},
|
|
123952
124562
|
bootstrapColumnConfig: function bootstrapColumnConfig() {
|
|
123953
|
-
var
|
|
124563
|
+
var _this27 = this;
|
|
123954
124564
|
var tableCode = this.resolveTableCode();
|
|
123955
124565
|
if (!tableCode) {
|
|
123956
124566
|
this.finishColumnConfigLoad();
|
|
@@ -123995,15 +124605,15 @@ var NormalReportSlotView = {
|
|
|
123995
124605
|
this.columnConfigDisabled = true;
|
|
123996
124606
|
}
|
|
123997
124607
|
this.finishColumnConfigLoad(function () {
|
|
123998
|
-
if (columns && columns.length)
|
|
124608
|
+
if (columns && columns.length) _this27.applyMergedColumnConfig(columns);
|
|
123999
124609
|
});
|
|
124000
124610
|
},
|
|
124001
124611
|
applyMergedColumnConfig: function applyMergedColumnConfig(savedColumns) {
|
|
124002
|
-
var
|
|
124612
|
+
var _this28 = this;
|
|
124003
124613
|
var merged = mergeColumnConfig(this.columnComps, savedColumns);
|
|
124004
124614
|
if (!merged) return;
|
|
124005
124615
|
merged.states.forEach(function (item) {
|
|
124006
|
-
|
|
124616
|
+
_this28.$set(_this28.columnStates, item.uid, item.state);
|
|
124007
124617
|
});
|
|
124008
124618
|
this.columnOrder = merged.order;
|
|
124009
124619
|
},
|
|
@@ -124022,13 +124632,13 @@ var NormalReportSlotView = {
|
|
|
124022
124632
|
// 直接改表头(拖列宽、拖换列、右键改排序或固定)时防抖:停手 3 秒后才保存。
|
|
124023
124633
|
// 「调整」弹层点确认走 persistColumnConfigNow,不经过这里。
|
|
124024
124634
|
schedulePersistColumnConfig: function schedulePersistColumnConfig() {
|
|
124025
|
-
var
|
|
124635
|
+
var _this29 = this;
|
|
124026
124636
|
this.columnConfigDirty = true;
|
|
124027
124637
|
if (!this.columnConfigReady) return;
|
|
124028
124638
|
if (this.columnConfigSaveTimer) clearTimeout(this.columnConfigSaveTimer);
|
|
124029
124639
|
this.columnConfigSaveTimer = setTimeout(function () {
|
|
124030
|
-
|
|
124031
|
-
|
|
124640
|
+
_this29.columnConfigSaveTimer = null;
|
|
124641
|
+
_this29.persistColumnConfig();
|
|
124032
124642
|
}, 3000);
|
|
124033
124643
|
},
|
|
124034
124644
|
persistColumnConfigNow: function persistColumnConfigNow() {
|
|
@@ -124040,7 +124650,7 @@ var NormalReportSlotView = {
|
|
|
124040
124650
|
this.persistColumnConfig();
|
|
124041
124651
|
},
|
|
124042
124652
|
persistColumnConfig: function persistColumnConfig() {
|
|
124043
|
-
var
|
|
124653
|
+
var _this30 = this;
|
|
124044
124654
|
if (!this.columnConfigReady || this.columnConfigDisabled) return;
|
|
124045
124655
|
var api = getColumnConfigApi();
|
|
124046
124656
|
if (!api) return;
|
|
@@ -124056,9 +124666,9 @@ var NormalReportSlotView = {
|
|
|
124056
124666
|
readColumnConfigDatas(res);
|
|
124057
124667
|
if (useReset) removeCachedColumnLayout(moduleCode, pageCode, tableCode);else updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns);
|
|
124058
124668
|
var content = res && res.data && res.data.Content || res && res.Content || '表头配置保存成功';
|
|
124059
|
-
if (
|
|
124669
|
+
if (_this30.$message) _this30.$message.success(content);
|
|
124060
124670
|
})["catch"](function (err) {
|
|
124061
|
-
if (
|
|
124671
|
+
if (_this30.$message) _this30.$message.error(err && err.message || '表头配置保存失败');
|
|
124062
124672
|
});
|
|
124063
124673
|
}
|
|
124064
124674
|
}
|
|
@@ -124080,8 +124690,8 @@ var StandardTablevue_type_style_index_0_prod_lang_scss_external = __webpack_requ
|
|
|
124080
124690
|
|
|
124081
124691
|
var StandardTable_component = normalizeComponent(
|
|
124082
124692
|
components_StandardTablevue_type_script_lang_js,
|
|
124083
|
-
|
|
124084
|
-
|
|
124693
|
+
StandardTablevue_type_template_id_d9620728_render,
|
|
124694
|
+
StandardTablevue_type_template_id_d9620728_staticRenderFns,
|
|
124085
124695
|
false,
|
|
124086
124696
|
null,
|
|
124087
124697
|
null,
|