@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
|
@@ -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=d034e982
|
|
121593
|
+
var StandardTablevue_type_template_id_d034e982_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_d034e982_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() {
|
|
@@ -122814,8 +123102,8 @@ var NormalReportSlotView = {
|
|
|
122814
123102
|
if (this.opButtons.length) options.push(this.autoMenuItems);
|
|
122815
123103
|
return {
|
|
122816
123104
|
// vxe-table 菜单显示前回调(menu-config 顶层 visibleMethod,对 body/header 均生效):
|
|
122817
|
-
//
|
|
122818
|
-
//
|
|
123105
|
+
// 表头菜单名称要按当前右键的列变化。3.24 起菜单项 name 只接受字符串,
|
|
123106
|
+
// 传入函数会被原样显示成函数源码,所以在菜单打开前写成当前文案。
|
|
122819
123107
|
// 内置列(多选框/操作列)未绑定 col-id,解析不到组件列时不给表头菜单
|
|
122820
123108
|
visibleMethod: function visibleMethod(params) {
|
|
122821
123109
|
if (!params || params.type !== 'header') return true;
|
|
@@ -122825,6 +123113,7 @@ var NormalReportSlotView = {
|
|
|
122825
123113
|
uid: uid,
|
|
122826
123114
|
column: params.column
|
|
122827
123115
|
};
|
|
123116
|
+
_this.syncHeaderMenuNames(params.options);
|
|
122828
123117
|
return true;
|
|
122829
123118
|
},
|
|
122830
123119
|
// 单元格右键菜单:默认关闭(showContextMenu=false 时不提供菜单项,
|
|
@@ -122834,27 +123123,31 @@ var NormalReportSlotView = {
|
|
|
122834
123123
|
} : {
|
|
122835
123124
|
options: []
|
|
122836
123125
|
},
|
|
122837
|
-
//
|
|
123126
|
+
// 表头右键快捷菜单。name 必须是字符串,具体文案在 visibleMethod 里按当前列改写
|
|
122838
123127
|
header: {
|
|
122839
123128
|
options: [[{
|
|
122840
123129
|
code: '__normal_report_header_sort',
|
|
122841
|
-
name:
|
|
122842
|
-
return _this.getHeaderSortMenuName();
|
|
122843
|
-
},
|
|
123130
|
+
name: '显示排序按钮',
|
|
122844
123131
|
prefixIcon: 'el-icon-sort',
|
|
122845
123132
|
__isHeaderMenu: true
|
|
123133
|
+
}, {
|
|
123134
|
+
code: '__normal_report_header_filter',
|
|
123135
|
+
name: '显示筛选功能',
|
|
123136
|
+
prefixIcon: 'nr-icon-filter',
|
|
123137
|
+
__isHeaderMenu: true
|
|
123138
|
+
}, {
|
|
123139
|
+
code: '__normal_report_header_search',
|
|
123140
|
+
name: '显示搜索功能',
|
|
123141
|
+
prefixIcon: 'el-icon-search',
|
|
123142
|
+
__isHeaderMenu: true
|
|
122846
123143
|
}, {
|
|
122847
123144
|
code: '__normal_report_header_fix_left',
|
|
122848
|
-
name:
|
|
122849
|
-
return _this.getHeaderFixMenuName('left');
|
|
122850
|
-
},
|
|
123145
|
+
name: '固定在左侧',
|
|
122851
123146
|
prefixIcon: 'el-icon-d-arrow-left',
|
|
122852
123147
|
__isHeaderMenu: true
|
|
122853
123148
|
}, {
|
|
122854
123149
|
code: '__normal_report_header_fix_right',
|
|
122855
|
-
name:
|
|
122856
|
-
return _this.getHeaderFixMenuName('right');
|
|
122857
|
-
},
|
|
123150
|
+
name: '固定在右侧',
|
|
122858
123151
|
prefixIcon: 'el-icon-d-arrow-right',
|
|
122859
123152
|
__isHeaderMenu: true
|
|
122860
123153
|
}]]
|
|
@@ -122892,6 +123185,9 @@ var NormalReportSlotView = {
|
|
|
122892
123185
|
align: comp.align,
|
|
122893
123186
|
// 是否显示排序功能:优先取列设置弹层设置的值,未设置时取列组件声明
|
|
122894
123187
|
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
123188
|
+
// 筛选、搜索只来自用户配置,代码列默认不显示
|
|
123189
|
+
filterable: !!(st && st.filterable),
|
|
123190
|
+
searchable: !!(st && st.searchable),
|
|
122895
123191
|
showOverflow: comp.showOverflow,
|
|
122896
123192
|
resizable: comp.resizable,
|
|
122897
123193
|
// 编辑:edit-render 优先;editable 默认文本输入;仅有 #edit 插槽时用空配置打开编辑
|
|
@@ -122914,11 +123210,9 @@ var NormalReportSlotView = {
|
|
|
122914
123210
|
var baseKey = c.field || c.type || '__normal_report_uid_' + c.uid;
|
|
122915
123211
|
var isSeq = c.type === 'seq';
|
|
122916
123212
|
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 || ''),
|
|
123213
|
+
// key 中追加 sortable/fixed/filter/search:vxe-table 3.x 在列创建时固化表头渲染,
|
|
123214
|
+
// 并把当时的插槽函数记在列上。仅改状态不会刷新表头按钮,纳入 key 后强制重建列
|
|
123215
|
+
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || '') + '|filter=' + (c.filterable ? 1 : 0) + '|search=' + (c.searchable ? 1 : 0),
|
|
122922
123216
|
// 列唯一主键(vxe-table col-id → ColumnInfo.id / 表头 th 的 colid 属性):
|
|
122923
123217
|
// 内嵌组件列 uid,用于表头右键菜单与拖拽换列时把 vxe 列映射回组件列;
|
|
122924
123218
|
// 内置列(多选框/操作列)不传 col-id,由 vxe 自动生成普通 id
|
|
@@ -122936,6 +123230,9 @@ var NormalReportSlotView = {
|
|
|
122936
123230
|
fixed: c.fixed || undefined,
|
|
122937
123231
|
align: c.align,
|
|
122938
123232
|
sortable: !!c.sortable,
|
|
123233
|
+
filterable: !!c.filterable,
|
|
123234
|
+
searchable: !!c.searchable,
|
|
123235
|
+
uid: c.uid,
|
|
122939
123236
|
// 序号列排序:按行在原始数据中的索引排序(升序恢复原始顺序,降序反向)
|
|
122940
123237
|
sortBy: isSeq ? function (_ref) {
|
|
122941
123238
|
var row = _ref.row;
|
|
@@ -122991,12 +123288,20 @@ var NormalReportSlotView = {
|
|
|
122991
123288
|
return col.editRender;
|
|
122992
123289
|
});
|
|
122993
123290
|
return editable ? this.defaultEditConfig : null;
|
|
123291
|
+
},
|
|
123292
|
+
// 按已启用列的筛选值和搜索关键字过滤。没有条件时返回原数组,避免表格无故重绘
|
|
123293
|
+
displayTableData: function displayTableData() {
|
|
123294
|
+
var rows = Array.isArray(this.tableData) ? this.tableData : [];
|
|
123295
|
+
var checks = this.buildColumnQueryChecks();
|
|
123296
|
+
if (!checks.length) return rows;
|
|
123297
|
+
return this.filterRowsByQuery(rows, checks);
|
|
122994
123298
|
}
|
|
122995
123299
|
},
|
|
122996
123300
|
watch: {
|
|
122997
123301
|
// 表格数据变化时自动刷新“数据更新时间”
|
|
122998
123302
|
tableData: function tableData() {
|
|
122999
123303
|
this.updateTime = formatDateTime(new Date());
|
|
123304
|
+
this.filterOptionCache = {};
|
|
123000
123305
|
}
|
|
123001
123306
|
},
|
|
123002
123307
|
created: function created() {
|
|
@@ -123145,7 +123450,9 @@ var NormalReportSlotView = {
|
|
|
123145
123450
|
fixed: comp.fixed || '',
|
|
123146
123451
|
minWidth: null,
|
|
123147
123452
|
width: null,
|
|
123148
|
-
sortable: !!comp.sortable
|
|
123453
|
+
sortable: !!comp.sortable,
|
|
123454
|
+
filterable: false,
|
|
123455
|
+
searchable: false
|
|
123149
123456
|
});
|
|
123150
123457
|
if (this.columnOrder.indexOf(comp._uid) === -1) {
|
|
123151
123458
|
this.columnOrder.push(comp._uid);
|
|
@@ -123161,6 +123468,10 @@ var NormalReportSlotView = {
|
|
|
123161
123468
|
if (this.columnStates[comp._uid]) {
|
|
123162
123469
|
this.$delete(this.columnStates, comp._uid);
|
|
123163
123470
|
}
|
|
123471
|
+
this.$delete(this.columnFilters, comp._uid);
|
|
123472
|
+
this.$delete(this.columnKeywords, comp._uid);
|
|
123473
|
+
this.$delete(this.columnSortOrders, comp._uid);
|
|
123474
|
+
this.$delete(this.filterOptionCache, comp._uid);
|
|
123164
123475
|
this.buildDefaultSnapshot();
|
|
123165
123476
|
},
|
|
123166
123477
|
// 重建默认列快照(注册顺序 + 列组件声明默认值)
|
|
@@ -123175,7 +123486,9 @@ var NormalReportSlotView = {
|
|
|
123175
123486
|
// 默认列最小宽度:resolvedMinWidth(显式 min-width > 显式 width > 按标题自动计算)
|
|
123176
123487
|
minWidth: comp.resolvedMinWidth,
|
|
123177
123488
|
// 默认是否显示排序功能
|
|
123178
|
-
sortable: !!comp.sortable
|
|
123489
|
+
sortable: !!comp.sortable,
|
|
123490
|
+
filterable: false,
|
|
123491
|
+
searchable: false
|
|
123179
123492
|
};
|
|
123180
123493
|
});
|
|
123181
123494
|
},
|
|
@@ -123446,11 +123759,36 @@ var NormalReportSlotView = {
|
|
|
123446
123759
|
var ctx = this.headerMenuCtx;
|
|
123447
123760
|
return ctx && this.columnStates[ctx.uid] ? this.columnStates[ctx.uid] : null;
|
|
123448
123761
|
},
|
|
123762
|
+
// 菜单打开前把表头项的 name 写成当前列的文案。vxe-table 3.24 的 getFuncText 不再调用函数
|
|
123763
|
+
syncHeaderMenuNames: function syncHeaderMenuNames(options) {
|
|
123764
|
+
var groups = Array.isArray(options) ? options : [];
|
|
123765
|
+
var names = {
|
|
123766
|
+
__normal_report_header_sort: this.getHeaderSortMenuName(),
|
|
123767
|
+
__normal_report_header_filter: this.getHeaderFilterMenuName(),
|
|
123768
|
+
__normal_report_header_search: this.getHeaderSearchMenuName(),
|
|
123769
|
+
__normal_report_header_fix_left: this.getHeaderFixMenuName('left'),
|
|
123770
|
+
__normal_report_header_fix_right: this.getHeaderFixMenuName('right')
|
|
123771
|
+
};
|
|
123772
|
+
groups.forEach(function (group) {
|
|
123773
|
+
if (!Array.isArray(group)) return;
|
|
123774
|
+
group.forEach(function (item) {
|
|
123775
|
+
if (item && names[item.code]) item.name = names[item.code];
|
|
123776
|
+
});
|
|
123777
|
+
});
|
|
123778
|
+
},
|
|
123449
123779
|
// “是否显示排序按钮”菜单名称(按当前列状态动态生成)
|
|
123450
123780
|
getHeaderSortMenuName: function getHeaderSortMenuName() {
|
|
123451
123781
|
var st = this.getHeaderMenuColumnState();
|
|
123452
123782
|
return st && st.sortable ? '取消显示排序按钮' : '显示排序按钮';
|
|
123453
123783
|
},
|
|
123784
|
+
getHeaderFilterMenuName: function getHeaderFilterMenuName() {
|
|
123785
|
+
var st = this.getHeaderMenuColumnState();
|
|
123786
|
+
return st && st.filterable ? '取消显示筛选功能' : '显示筛选功能';
|
|
123787
|
+
},
|
|
123788
|
+
getHeaderSearchMenuName: function getHeaderSearchMenuName() {
|
|
123789
|
+
var st = this.getHeaderMenuColumnState();
|
|
123790
|
+
return st && st.searchable ? '取消显示搜索功能' : '显示搜索功能';
|
|
123791
|
+
},
|
|
123454
123792
|
// 固定列菜单名称(固定在左侧/右侧,已固定时显示取消固定)
|
|
123455
123793
|
getHeaderFixMenuName: function getHeaderFixMenuName(side) {
|
|
123456
123794
|
var st = this.getHeaderMenuColumnState();
|
|
@@ -123465,6 +123803,10 @@ var NormalReportSlotView = {
|
|
|
123465
123803
|
if (uid == null) return;
|
|
123466
123804
|
if (menu.code === '__normal_report_header_sort') {
|
|
123467
123805
|
this.toggleHeaderColumnSort(uid);
|
|
123806
|
+
} else if (menu.code === '__normal_report_header_filter') {
|
|
123807
|
+
this.toggleHeaderColumnFlag(uid, 'filterable');
|
|
123808
|
+
} else if (menu.code === '__normal_report_header_search') {
|
|
123809
|
+
this.toggleHeaderColumnFlag(uid, 'searchable');
|
|
123468
123810
|
} else if (menu.code === '__normal_report_header_fix_left') {
|
|
123469
123811
|
this.toggleHeaderColumnFixed(uid, 'left');
|
|
123470
123812
|
} else if (menu.code === '__normal_report_header_fix_right') {
|
|
@@ -123478,6 +123820,7 @@ var NormalReportSlotView = {
|
|
|
123478
123820
|
var st = this.columnStates[uid];
|
|
123479
123821
|
if (!st) return;
|
|
123480
123822
|
this.$set(st, 'sortable', !st.sortable);
|
|
123823
|
+
if (!st.sortable) this.$delete(this.columnSortOrders, uid);
|
|
123481
123824
|
this.schedulePersistColumnConfig();
|
|
123482
123825
|
this.$nextTick(function () {
|
|
123483
123826
|
return _this13.applyColumnOrder();
|
|
@@ -123495,6 +123838,16 @@ var NormalReportSlotView = {
|
|
|
123495
123838
|
return _this14.applyColumnOrder();
|
|
123496
123839
|
});
|
|
123497
123840
|
},
|
|
123841
|
+
// 表头右键切换筛选或搜索。关掉时清掉该列当前条件,避免按钮消失后仍在过滤
|
|
123842
|
+
toggleHeaderColumnFlag: function toggleHeaderColumnFlag(uid, field) {
|
|
123843
|
+
var st = this.columnStates[uid];
|
|
123844
|
+
if (!st || field !== 'filterable' && field !== 'searchable') return;
|
|
123845
|
+
var next = !st[field];
|
|
123846
|
+
this.$set(st, field, next);
|
|
123847
|
+
if (!next && field === 'filterable') this.$delete(this.columnFilters, uid);
|
|
123848
|
+
if (!next && field === 'searchable') this.$delete(this.columnKeywords, uid);
|
|
123849
|
+
this.schedulePersistColumnConfig();
|
|
123850
|
+
},
|
|
123498
123851
|
// ===== 单元格编辑 =====
|
|
123499
123852
|
onEditActivated: function onEditActivated(params, evnt) {
|
|
123500
123853
|
this.$emit('edit-activated', params, evnt);
|
|
@@ -123516,7 +123869,7 @@ var NormalReportSlotView = {
|
|
|
123516
123869
|
if (!target || typeof target.closest !== 'function') return;
|
|
123517
123870
|
// 列宽拖拽手柄:vxe-table 3.24 起类名由 .vxe-resizable 更名为
|
|
123518
123871
|
// .vxe-table--resizable-col-bar(旧类名保留兼容,3.24 以下版本使用)
|
|
123519
|
-
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar')) return;
|
|
123872
|
+
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar, .nr-col-tool')) return;
|
|
123520
123873
|
var th = target.closest('.vxe-header--column');
|
|
123521
123874
|
if (!th) return;
|
|
123522
123875
|
var uid = this.parseColIdUid(th.getAttribute('colid'));
|
|
@@ -123753,10 +124106,262 @@ var NormalReportSlotView = {
|
|
|
123753
124106
|
xTable.recalculate && xTable.recalculate(true);
|
|
123754
124107
|
});
|
|
123755
124108
|
},
|
|
124109
|
+
// ===== 表头筛选 / 搜索 =====
|
|
124110
|
+
// 当前列已选的筛选值。未选表示不筛选
|
|
124111
|
+
columnFilterValue: function columnFilterValue(col) {
|
|
124112
|
+
var list = col && this.columnFilters[col.uid];
|
|
124113
|
+
return Array.isArray(list) ? list : [];
|
|
124114
|
+
},
|
|
124115
|
+
columnKeyword: function columnKeyword(col) {
|
|
124116
|
+
var text = col && this.columnKeywords[col.uid];
|
|
124117
|
+
return text == null ? '' : String(text);
|
|
124118
|
+
},
|
|
124119
|
+
columnFilterActive: function columnFilterActive(col) {
|
|
124120
|
+
return this.columnFilterValue(col).length > 0;
|
|
124121
|
+
},
|
|
124122
|
+
columnSearchActive: function columnSearchActive(col) {
|
|
124123
|
+
return this.columnKeyword(col).trim() !== '';
|
|
124124
|
+
},
|
|
124125
|
+
columnSortOrder: function columnSortOrder(col) {
|
|
124126
|
+
if (!col) return '';
|
|
124127
|
+
return this.columnSortOrders[col.uid] || '';
|
|
124128
|
+
},
|
|
124129
|
+
columnSortTitle: function columnSortTitle(col) {
|
|
124130
|
+
var order = this.columnSortOrder(col);
|
|
124131
|
+
if (order === 'asc') return '升序,点击切换为降序';
|
|
124132
|
+
if (order === 'desc') return '降序,点击取消排序';
|
|
124133
|
+
return '排序';
|
|
124134
|
+
},
|
|
124135
|
+
// 点击表头排序图标:未排序 → 升序 → 降序 → 取消。走 vxe 的排序,远程排序和 sort-change 保持原样
|
|
124136
|
+
toggleColumnSort: function toggleColumnSort(col, evnt) {
|
|
124137
|
+
var table = this.$refs.xTable;
|
|
124138
|
+
if (!table || !col || typeof table.getColumnById !== 'function' || typeof table.triggerSortEvent !== 'function') return;
|
|
124139
|
+
var column = table.getColumnById(col.colId);
|
|
124140
|
+
if (!column) return;
|
|
124141
|
+
var order = column.order;
|
|
124142
|
+
var next = order === 'asc' ? 'desc' : order === 'desc' ? null : 'asc';
|
|
124143
|
+
table.triggerSortEvent(evnt, column, next);
|
|
124144
|
+
},
|
|
124145
|
+
onSortChange: function onSortChange(params) {
|
|
124146
|
+
var _this19 = this;
|
|
124147
|
+
var list = params && params.sortList || [];
|
|
124148
|
+
var next = {};
|
|
124149
|
+
list.forEach(function (item) {
|
|
124150
|
+
var column = item && item.column;
|
|
124151
|
+
var uid = column ? _this19.parseColIdUid(column.id) : null;
|
|
124152
|
+
if (uid != null && item.order) next[uid] = item.order;
|
|
124153
|
+
});
|
|
124154
|
+
this.columnSortOrders = next;
|
|
124155
|
+
},
|
|
124156
|
+
setColumnFilter: function setColumnFilter(col, values) {
|
|
124157
|
+
if (!col) return;
|
|
124158
|
+
this.$set(this.columnFilters, col.uid, Array.isArray(values) ? values : []);
|
|
124159
|
+
},
|
|
124160
|
+
setColumnKeyword: function setColumnKeyword(col, value) {
|
|
124161
|
+
if (!col) return;
|
|
124162
|
+
this.$set(this.columnKeywords, col.uid, value == null ? '' : String(value));
|
|
124163
|
+
},
|
|
124164
|
+
columnFilterOptions: function columnFilterOptions(col) {
|
|
124165
|
+
if (!col) return [];
|
|
124166
|
+
var cached = this.filterOptionCache[col.uid];
|
|
124167
|
+
return Array.isArray(cached) ? cached : [];
|
|
124168
|
+
},
|
|
124169
|
+
// 打开筛选时按当前表格数据生成可选项,避免每次渲染都扫全表
|
|
124170
|
+
// 固定列会把表头再画一份,同一列的筛选/搜索控件会有多份。只操作当前看得见的那一份。
|
|
124171
|
+
visibleColumnTool: function visibleColumnTool(ref) {
|
|
124172
|
+
var list = Array.isArray(ref) ? ref : ref ? [ref] : [];
|
|
124173
|
+
for (var i = 0; i < list.length; i++) {
|
|
124174
|
+
var el = list[i] && list[i].$el;
|
|
124175
|
+
if (el && el.offsetWidth > 0 && el.offsetHeight > 0) return list[i];
|
|
124176
|
+
}
|
|
124177
|
+
return list[0] || null;
|
|
124178
|
+
},
|
|
124179
|
+
openColumnFilter: function openColumnFilter(col) {
|
|
124180
|
+
var _this20 = this;
|
|
124181
|
+
if (!col || !col.comp) return;
|
|
124182
|
+
this.$set(this.filterOptionCache, col.uid, this.buildColumnFilterOptions(col.comp));
|
|
124183
|
+
this.$nextTick(function () {
|
|
124184
|
+
var select = _this20.visibleColumnTool(_this20.$refs['colFilter' + col.uid]);
|
|
124185
|
+
if (select && typeof select.toggleMenu === 'function' && !select.visible) select.toggleMenu();
|
|
124186
|
+
});
|
|
124187
|
+
},
|
|
124188
|
+
focusColumnSearch: function focusColumnSearch(col) {
|
|
124189
|
+
var _this21 = this;
|
|
124190
|
+
this.$nextTick(function () {
|
|
124191
|
+
var input = _this21.visibleColumnTool(_this21.$refs['colSearch' + (col && col.uid)]);
|
|
124192
|
+
if (input && typeof input.focus === 'function') input.focus();
|
|
124193
|
+
});
|
|
124194
|
+
},
|
|
124195
|
+
// 单元格参与筛选、搜索的文本:自定义插槽的可见文字优先,其次格式化结果,最后是字段值
|
|
124196
|
+
columnCellText: function columnCellText(comp, row, index) {
|
|
124197
|
+
if (!comp) return '';
|
|
124198
|
+
if (comp.type === 'seq') return String(index + 1);
|
|
124199
|
+
var scope = {
|
|
124200
|
+
row: row,
|
|
124201
|
+
column: comp,
|
|
124202
|
+
$index: index,
|
|
124203
|
+
seq: index + 1
|
|
124204
|
+
};
|
|
124205
|
+
if (comp.$scopedSlots && typeof comp.$scopedSlots["default"] === 'function') {
|
|
124206
|
+
try {
|
|
124207
|
+
var text = vnodeText(comp.$scopedSlots["default"](scope)).replace(/\s+/g, ' ').trim();
|
|
124208
|
+
if (text) return text;
|
|
124209
|
+
} catch (e) {
|
|
124210
|
+
// 插槽取值失败时退回字段值
|
|
124211
|
+
}
|
|
124212
|
+
}
|
|
124213
|
+
if (typeof comp.formatter === 'function') {
|
|
124214
|
+
try {
|
|
124215
|
+
var _value = comp.formatter(scope);
|
|
124216
|
+
if (_value != null && StandardTablevue_type_script_lang_js_typeof(_value) !== 'object') {
|
|
124217
|
+
var _text2 = String(_value).trim();
|
|
124218
|
+
if (_text2) return _text2;
|
|
124219
|
+
}
|
|
124220
|
+
} catch (e) {
|
|
124221
|
+
// 格式化失败时退回字段值
|
|
124222
|
+
}
|
|
124223
|
+
}
|
|
124224
|
+
if (!comp.field || !row) return '';
|
|
124225
|
+
var value = row[comp.field];
|
|
124226
|
+
if (value == null || value === '' || StandardTablevue_type_script_lang_js_typeof(value) === 'object') return '';
|
|
124227
|
+
return String(value);
|
|
124228
|
+
},
|
|
124229
|
+
buildColumnFilterOptions: function buildColumnFilterOptions(comp) {
|
|
124230
|
+
var _this22 = this;
|
|
124231
|
+
var seen = Object.create(null);
|
|
124232
|
+
var options = [];
|
|
124233
|
+
this.visitColumnRows(this.tableData, function (row, index) {
|
|
124234
|
+
var text = _this22.columnCellText(comp, row, index);
|
|
124235
|
+
if (seen[text]) return;
|
|
124236
|
+
seen[text] = true;
|
|
124237
|
+
options.push({
|
|
124238
|
+
key: text === '' ? '__empty' : text,
|
|
124239
|
+
value: text,
|
|
124240
|
+
label: text === '' ? '(空)' : text
|
|
124241
|
+
});
|
|
124242
|
+
});
|
|
124243
|
+
options.sort(function (a, b) {
|
|
124244
|
+
return a.label.localeCompare(b.label, 'zh');
|
|
124245
|
+
});
|
|
124246
|
+
return options;
|
|
124247
|
+
},
|
|
124248
|
+
visitColumnRows: function visitColumnRows(rows, visitor) {
|
|
124249
|
+
var list = Array.isArray(rows) ? rows : [];
|
|
124250
|
+
var childrenKey = this.treeConfig && this.treeConfig.children || 'children';
|
|
124251
|
+
var _walk = function walk(nodes) {
|
|
124252
|
+
nodes.forEach(function (row, index) {
|
|
124253
|
+
if (!row) return;
|
|
124254
|
+
visitor(row, index);
|
|
124255
|
+
var children = row[childrenKey];
|
|
124256
|
+
if (Array.isArray(children) && children.length) _walk(children);
|
|
124257
|
+
});
|
|
124258
|
+
};
|
|
124259
|
+
_walk(list);
|
|
124260
|
+
},
|
|
124261
|
+
// 只收集真正会缩小结果的条件。开关打开但还没选值、没输入时不过滤
|
|
124262
|
+
buildColumnQueryChecks: function buildColumnQueryChecks() {
|
|
124263
|
+
var _this23 = this;
|
|
124264
|
+
var checks = [];
|
|
124265
|
+
var compMap = Object.create(null);
|
|
124266
|
+
this.columnComps.forEach(function (comp) {
|
|
124267
|
+
if (comp) compMap[comp._uid] = comp;
|
|
124268
|
+
});
|
|
124269
|
+
this.columnOrder.forEach(function (uid) {
|
|
124270
|
+
var st = _this23.columnStates[uid];
|
|
124271
|
+
var comp = compMap[uid];
|
|
124272
|
+
if (!st || st.visible === false || !comp) return;
|
|
124273
|
+
var selected = _this23.columnFilters[uid];
|
|
124274
|
+
if (st.filterable && Array.isArray(selected) && selected.length) {
|
|
124275
|
+
var set = Object.create(null);
|
|
124276
|
+
selected.forEach(function (value) {
|
|
124277
|
+
set[value] = true;
|
|
124278
|
+
});
|
|
124279
|
+
checks.push(function (row, index) {
|
|
124280
|
+
return !!set[_this23.columnCellText(comp, row, index)];
|
|
124281
|
+
});
|
|
124282
|
+
}
|
|
124283
|
+
var keyword = st.searchable && _this23.columnKeywords[uid] != null ? String(_this23.columnKeywords[uid]).trim().toLowerCase() : '';
|
|
124284
|
+
if (keyword) {
|
|
124285
|
+
checks.push(function (row, index) {
|
|
124286
|
+
return _this23.columnCellText(comp, row, index).toLowerCase().indexOf(keyword) >= 0;
|
|
124287
|
+
});
|
|
124288
|
+
}
|
|
124289
|
+
});
|
|
124290
|
+
return checks;
|
|
124291
|
+
},
|
|
124292
|
+
filterRowsByQuery: function filterRowsByQuery(rows, checks) {
|
|
124293
|
+
var match = function match(row, index) {
|
|
124294
|
+
return checks.every(function (check) {
|
|
124295
|
+
return check(row, index);
|
|
124296
|
+
});
|
|
124297
|
+
};
|
|
124298
|
+
var tree = this.treeConfig;
|
|
124299
|
+
if (tree && tree.transform) return this.filterTransformTree(rows, match, tree);
|
|
124300
|
+
var childrenKey = tree && tree.children || 'children';
|
|
124301
|
+
if (rows.some(function (row) {
|
|
124302
|
+
return row && Array.isArray(row[childrenKey]);
|
|
124303
|
+
})) {
|
|
124304
|
+
return this.filterNestedTree(rows, match, childrenKey);
|
|
124305
|
+
}
|
|
124306
|
+
return rows.filter(function (row, index) {
|
|
124307
|
+
return match(row, index);
|
|
124308
|
+
});
|
|
124309
|
+
},
|
|
124310
|
+
// 扁平树:命中的行保留,同时保留它的上级,避免子节点失去父级后无法显示
|
|
124311
|
+
filterTransformTree: function filterTransformTree(list, match, tree) {
|
|
124312
|
+
var rowField = tree.rowField || 'id';
|
|
124313
|
+
var parentField = tree.parentField || 'parentId';
|
|
124314
|
+
var byId = Object.create(null);
|
|
124315
|
+
var matched = [];
|
|
124316
|
+
list.forEach(function (row, index) {
|
|
124317
|
+
if (!row) return;
|
|
124318
|
+
byId[row[rowField]] = row;
|
|
124319
|
+
if (match(row, index)) matched.push(row[rowField]);
|
|
124320
|
+
});
|
|
124321
|
+
var keep = Object.create(null);
|
|
124322
|
+
matched.forEach(function (id) {
|
|
124323
|
+
var current = id;
|
|
124324
|
+
var guard = Object.create(null);
|
|
124325
|
+
while (current != null && current !== '' && !guard[current]) {
|
|
124326
|
+
guard[current] = true;
|
|
124327
|
+
keep[current] = true;
|
|
124328
|
+
var row = byId[current];
|
|
124329
|
+
if (!row) break;
|
|
124330
|
+
current = row[parentField];
|
|
124331
|
+
}
|
|
124332
|
+
});
|
|
124333
|
+
return list.filter(function (row) {
|
|
124334
|
+
return row && keep[row[rowField]];
|
|
124335
|
+
});
|
|
124336
|
+
},
|
|
124337
|
+
filterNestedTree: function filterNestedTree(list, match, childrenKey) {
|
|
124338
|
+
var _walk2 = function walk(nodes) {
|
|
124339
|
+
var out = [];
|
|
124340
|
+
nodes.forEach(function (row, index) {
|
|
124341
|
+
if (!row) return;
|
|
124342
|
+
var source = Array.isArray(row[childrenKey]) ? row[childrenKey] : null;
|
|
124343
|
+
var children = source ? _walk2(source) : null;
|
|
124344
|
+
if (match(row, index) || children && children.length) {
|
|
124345
|
+
if (source && children !== source) {
|
|
124346
|
+
var copy = {};
|
|
124347
|
+
Object.keys(row).forEach(function (key) {
|
|
124348
|
+
copy[key] = row[key];
|
|
124349
|
+
});
|
|
124350
|
+
copy[childrenKey] = children;
|
|
124351
|
+
out.push(copy);
|
|
124352
|
+
} else {
|
|
124353
|
+
out.push(row);
|
|
124354
|
+
}
|
|
124355
|
+
}
|
|
124356
|
+
});
|
|
124357
|
+
return out;
|
|
124358
|
+
};
|
|
124359
|
+
return _walk2(list);
|
|
124360
|
+
},
|
|
123756
124361
|
// ===== 列设置弹层 =====
|
|
123757
124362
|
// 打开列设置:以当前注册列生成工作副本(每次打开都重新初始化)
|
|
123758
124363
|
openColumnSetting: function openColumnSetting() {
|
|
123759
|
-
var
|
|
124364
|
+
var _this24 = this;
|
|
123760
124365
|
var compMap = {};
|
|
123761
124366
|
this.columnComps.forEach(function (comp) {
|
|
123762
124367
|
compMap[comp._uid] = comp;
|
|
@@ -123776,7 +124381,9 @@ var NormalReportSlotView = {
|
|
|
123776
124381
|
// 用户已设置值 > 列组件 resolvedMinWidth(显式 min-width / width / 按标题自动计算)
|
|
123777
124382
|
minWidth: st && st.minWidth != null ? st.minWidth : comp.resolvedMinWidth,
|
|
123778
124383
|
// 是否显示排序功能:用户已设置值 > 列组件声明
|
|
123779
|
-
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable
|
|
124384
|
+
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
124385
|
+
filterable: !!(st && st.filterable),
|
|
124386
|
+
searchable: !!(st && st.searchable)
|
|
123780
124387
|
};
|
|
123781
124388
|
}).filter(Boolean);
|
|
123782
124389
|
this.dragColField = '';
|
|
@@ -123784,7 +124391,7 @@ var NormalReportSlotView = {
|
|
|
123784
124391
|
// 列标题宽度:按最长列名称计算(中文 25px/字 + 英文 15px/字 + 30px 余量),
|
|
123785
124392
|
// 各列标题统一按该宽度显示,保证输入框与按钮对齐
|
|
123786
124393
|
this.columnTitleWidth = this.columnDraft.reduce(function (max, c) {
|
|
123787
|
-
return Math.max(max,
|
|
124394
|
+
return Math.max(max, _this24.calcColumnTitleWidth(c.title));
|
|
123788
124395
|
}, 0);
|
|
123789
124396
|
},
|
|
123790
124397
|
// 计算单个列标题的显示宽度(px):中文 25px/字 + 英文 15px/字 + 30px 余量
|
|
@@ -123823,6 +124430,12 @@ var NormalReportSlotView = {
|
|
|
123823
124430
|
toggleColumnSortable: function toggleColumnSortable(col) {
|
|
123824
124431
|
col.sortable = !col.sortable;
|
|
123825
124432
|
},
|
|
124433
|
+
toggleColumnFilterable: function toggleColumnFilterable(col) {
|
|
124434
|
+
col.filterable = !col.filterable;
|
|
124435
|
+
},
|
|
124436
|
+
toggleColumnSearchable: function toggleColumnSearchable(col) {
|
|
124437
|
+
col.searchable = !col.searchable;
|
|
124438
|
+
},
|
|
123826
124439
|
// 上下移一列
|
|
123827
124440
|
moveColumnDraft: function moveColumnDraft(index, direction) {
|
|
123828
124441
|
var target = index + direction;
|
|
@@ -123876,24 +124489,29 @@ var NormalReportSlotView = {
|
|
|
123876
124489
|
},
|
|
123877
124490
|
// 确认:将面板副本应用到列状态并刷新表格
|
|
123878
124491
|
confirmColumnSetting: function confirmColumnSetting() {
|
|
123879
|
-
var
|
|
124492
|
+
var _this25 = this;
|
|
123880
124493
|
var order = [];
|
|
123881
124494
|
this.columnDraft.forEach(function (d) {
|
|
123882
|
-
var prev =
|
|
123883
|
-
|
|
124495
|
+
var prev = _this25.columnStates[d.uid] || {};
|
|
124496
|
+
_this25.$set(_this25.columnStates, d.uid, {
|
|
123884
124497
|
visible: d.visible,
|
|
123885
124498
|
fixed: d.fixed || '',
|
|
123886
124499
|
minWidth: d.minWidth != null ? d.minWidth : null,
|
|
123887
124500
|
width: prev.width != null ? prev.width : null,
|
|
123888
|
-
sortable: !!d.sortable
|
|
124501
|
+
sortable: !!d.sortable,
|
|
124502
|
+
filterable: !!d.filterable,
|
|
124503
|
+
searchable: !!d.searchable
|
|
123889
124504
|
});
|
|
124505
|
+
if (!d.filterable) _this25.$delete(_this25.columnFilters, d.uid);
|
|
124506
|
+
if (!d.searchable) _this25.$delete(_this25.columnKeywords, d.uid);
|
|
124507
|
+
if (!d.sortable) _this25.$delete(_this25.columnSortOrders, d.uid);
|
|
123890
124508
|
order.push(d.uid);
|
|
123891
124509
|
});
|
|
123892
124510
|
this.columnOrder = order;
|
|
123893
124511
|
this.columnSettingVisible = false;
|
|
123894
124512
|
this.persistColumnConfigNow();
|
|
123895
124513
|
this.$nextTick(function () {
|
|
123896
|
-
|
|
124514
|
+
_this25.applyColumnOrder();
|
|
123897
124515
|
});
|
|
123898
124516
|
},
|
|
123899
124517
|
// ===== 表头配置持久化 =====
|
|
@@ -123923,12 +124541,12 @@ var NormalReportSlotView = {
|
|
|
123923
124541
|
},
|
|
123924
124542
|
// 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度
|
|
123925
124543
|
scheduleInitialLayout: function scheduleInitialLayout() {
|
|
123926
|
-
var
|
|
124544
|
+
var _this26 = this;
|
|
123927
124545
|
this.$nextTick(function () {
|
|
123928
|
-
|
|
124546
|
+
_this26.resizeRecalculate();
|
|
123929
124547
|
if (typeof requestAnimationFrame === 'function') {
|
|
123930
124548
|
requestAnimationFrame(function () {
|
|
123931
|
-
return
|
|
124549
|
+
return _this26.resizeRecalculate();
|
|
123932
124550
|
});
|
|
123933
124551
|
}
|
|
123934
124552
|
});
|
|
@@ -123950,7 +124568,7 @@ var NormalReportSlotView = {
|
|
|
123950
124568
|
if (this.columnConfigDirty) this.schedulePersistColumnConfig();
|
|
123951
124569
|
},
|
|
123952
124570
|
bootstrapColumnConfig: function bootstrapColumnConfig() {
|
|
123953
|
-
var
|
|
124571
|
+
var _this27 = this;
|
|
123954
124572
|
var tableCode = this.resolveTableCode();
|
|
123955
124573
|
if (!tableCode) {
|
|
123956
124574
|
this.finishColumnConfigLoad();
|
|
@@ -123995,15 +124613,15 @@ var NormalReportSlotView = {
|
|
|
123995
124613
|
this.columnConfigDisabled = true;
|
|
123996
124614
|
}
|
|
123997
124615
|
this.finishColumnConfigLoad(function () {
|
|
123998
|
-
if (columns && columns.length)
|
|
124616
|
+
if (columns && columns.length) _this27.applyMergedColumnConfig(columns);
|
|
123999
124617
|
});
|
|
124000
124618
|
},
|
|
124001
124619
|
applyMergedColumnConfig: function applyMergedColumnConfig(savedColumns) {
|
|
124002
|
-
var
|
|
124620
|
+
var _this28 = this;
|
|
124003
124621
|
var merged = mergeColumnConfig(this.columnComps, savedColumns);
|
|
124004
124622
|
if (!merged) return;
|
|
124005
124623
|
merged.states.forEach(function (item) {
|
|
124006
|
-
|
|
124624
|
+
_this28.$set(_this28.columnStates, item.uid, item.state);
|
|
124007
124625
|
});
|
|
124008
124626
|
this.columnOrder = merged.order;
|
|
124009
124627
|
},
|
|
@@ -124022,13 +124640,13 @@ var NormalReportSlotView = {
|
|
|
124022
124640
|
// 直接改表头(拖列宽、拖换列、右键改排序或固定)时防抖:停手 3 秒后才保存。
|
|
124023
124641
|
// 「调整」弹层点确认走 persistColumnConfigNow,不经过这里。
|
|
124024
124642
|
schedulePersistColumnConfig: function schedulePersistColumnConfig() {
|
|
124025
|
-
var
|
|
124643
|
+
var _this29 = this;
|
|
124026
124644
|
this.columnConfigDirty = true;
|
|
124027
124645
|
if (!this.columnConfigReady) return;
|
|
124028
124646
|
if (this.columnConfigSaveTimer) clearTimeout(this.columnConfigSaveTimer);
|
|
124029
124647
|
this.columnConfigSaveTimer = setTimeout(function () {
|
|
124030
|
-
|
|
124031
|
-
|
|
124648
|
+
_this29.columnConfigSaveTimer = null;
|
|
124649
|
+
_this29.persistColumnConfig();
|
|
124032
124650
|
}, 3000);
|
|
124033
124651
|
},
|
|
124034
124652
|
persistColumnConfigNow: function persistColumnConfigNow() {
|
|
@@ -124040,7 +124658,7 @@ var NormalReportSlotView = {
|
|
|
124040
124658
|
this.persistColumnConfig();
|
|
124041
124659
|
},
|
|
124042
124660
|
persistColumnConfig: function persistColumnConfig() {
|
|
124043
|
-
var
|
|
124661
|
+
var _this30 = this;
|
|
124044
124662
|
if (!this.columnConfigReady || this.columnConfigDisabled) return;
|
|
124045
124663
|
var api = getColumnConfigApi();
|
|
124046
124664
|
if (!api) return;
|
|
@@ -124056,9 +124674,9 @@ var NormalReportSlotView = {
|
|
|
124056
124674
|
readColumnConfigDatas(res);
|
|
124057
124675
|
if (useReset) removeCachedColumnLayout(moduleCode, pageCode, tableCode);else updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns);
|
|
124058
124676
|
var content = res && res.data && res.data.Content || res && res.Content || '表头配置保存成功';
|
|
124059
|
-
if (
|
|
124677
|
+
if (_this30.$message) _this30.$message.success(content);
|
|
124060
124678
|
})["catch"](function (err) {
|
|
124061
|
-
if (
|
|
124679
|
+
if (_this30.$message) _this30.$message.error(err && err.message || '表头配置保存失败');
|
|
124062
124680
|
});
|
|
124063
124681
|
}
|
|
124064
124682
|
}
|
|
@@ -124080,8 +124698,8 @@ var StandardTablevue_type_style_index_0_prod_lang_scss_external = __webpack_requ
|
|
|
124080
124698
|
|
|
124081
124699
|
var StandardTable_component = normalizeComponent(
|
|
124082
124700
|
components_StandardTablevue_type_script_lang_js,
|
|
124083
|
-
|
|
124084
|
-
|
|
124701
|
+
StandardTablevue_type_template_id_d034e982_render,
|
|
124702
|
+
StandardTablevue_type_template_id_d034e982_staticRenderFns,
|
|
124085
124703
|
false,
|
|
124086
124704
|
null,
|
|
124087
124705
|
null,
|