@cimom-ui/standard-ui 1.1.14 → 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/README.md +1 -1
- package/dist/standard-ui.common.js +827 -71
- package/dist/standard-ui.umd.js +827 -71
- package/dist/standard-ui.umd.min.js +3 -3
- package/package.json +1 -1
package/dist/standard-ui.umd.js
CHANGED
|
@@ -3142,12 +3142,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3142
3142
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
3143
3143
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
|
|
3144
3144
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
3145
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4417);
|
|
3146
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
3145
3147
|
// Imports
|
|
3146
3148
|
|
|
3147
3149
|
|
|
3150
|
+
|
|
3151
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(9793), __webpack_require__.b);
|
|
3148
3152
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
3153
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
3149
3154
|
// Module
|
|
3150
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-table-panel{flex:1 1 0%;min-width:0;min-height:0;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);height:100%;overflow:hidden;display:flex;flex-direction:column}.normal-report-table-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 12px}.normal-report-table-wrap .el-table,.normal-report-table-wrap .vxe-table{flex:1;min-height:0}.normal-report-table-actions{flex-shrink:0;display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #edf1f6;margin-bottom:10px}.normal-report-table-actions .el-button+.el-button{margin-left:0}.normal-report-table-actions-left{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.normal-report-table-actions-right{flex-shrink:0;margin-left:auto;display:flex;align-items:center;gap:6px}.standard-toolbar-left,.standard-toolbar-query,.standard-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0}.standard-toolbar-left .el-button+.el-button,.standard-toolbar-query .el-button+.el-button,.standard-toolbar-right .el-button+.el-button{margin-left:0}.normal-report-column-setting-entry,.normal-report-column-setting-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.normal-report-column-setting{min-width:270px}.normal-report-column-setting-header{padding-bottom:8px;border-bottom:1px solid #ebeef5}.normal-report-column-setting-list{max-height:300px;overflow-y:auto;padding:4px 0}.normal-report-column-setting-item{display:flex;align-items:center;gap:2px;padding:5px 4px;border-radius:4px}.normal-report-column-setting-item .el-checkbox{flex:1;min-width:0;margin-right:0;display:flex;align-items:center}.normal-report-column-setting-item .el-checkbox__input{display:flex;align-items:center;flex-shrink:0}.normal-report-column-setting-item .normal-report-column-setting-item-title{cursor:grab}.normal-report-column-setting-item .normal-report-column-setting-item-title:active{cursor:grabbing}.normal-report-column-setting-item .el-checkbox,.normal-report-column-setting-item .el-checkbox__label{-webkit-user-select:none;-moz-user-select:none;user-select:none}.normal-report-column-setting-item .normal-report-column-setting-item-title .el-checkbox__label{flex-shrink:0;width:var(--normal-report-title-width);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.normal-report-column-setting-item .normal-report-column-setting-item-width{flex-shrink:0;width:92px}.normal-report-column-setting-item .el-button+.el-button{margin-left:0}.normal-report-column-setting-item .is-pinned{color:#409eff}.normal-report-column-setting-item .is-sort-off,.normal-report-column-setting-item .is-sort-off:focus,.normal-report-column-setting-item .is-sort-off:hover{color:#c0c4cc}.normal-report-column-setting-item.drag-over{background:#ecf5ff}.normal-report-column-setting-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}.normal-report-table-footer{flex-shrink:0;box-sizing:border-box;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:8px 12px;border-top:1px solid #edf1f6}.normal-report-table-footer .normal-report-table-pagination{padding-top:0}.normal-report-table-footer.is-only-pagination{justify-content:flex-end}.normal-report-footer-empty{margin-top:10px}.normal-report-toolbar-empty{margin-bottom:10px}.normal-report-update-time{font-size:13px;color:#909399;flex-shrink:0}.vxe-table--context-menu-wrapper .vxe-context-menu--option-wrapper+.vxe-context-menu--option-wrapper,.vxe-table--context-menu-wrapper .vxe-table--context-menu-group-wrapper+.vxe-table--context-menu-group-wrapper{border-top:1px solid #e8eaec;margin-top:2px;padding-top:2px}.normal-report-table-pagination{flex-shrink:0;padding-top:10px;text-align:right}.normal-report-op-more{margin-left:10px}.normal-report-main-table.vxe-table .vxe-body--row{transition:transform .22s ease,filter .22s ease}.normal-report-main-table.vxe-table .vxe-body--row:hover{transform:translateY(-3px);filter:drop-shadow(0 8px 16px rgba(31,73,125,.22))}.vxe-table--footer-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--footer-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:active{background-color:#dddee0!important}.vxe-table--footer-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--body-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb:active,.vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover{background-color:#dddee0!important}.vxe-table--body-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table .vxe-header--row{height:36px!important}.vxe-table .vxe-header--column{padding:0!important;color:#636364!important;font-weight:600!important;font-size:13px!important;background-color:#f5f7fa!important}.vxe-table .vxe-header--column,.vxe-table .vxe-header--column>.vxe-cell{height:36px!important;max-height:36px!important;line-height:36px!important}.vxe-table .vxe-header--column>.vxe-cell{padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-body--row{height:34px!important}.vxe-table .vxe-body--row td.vxe-body--column{font-size:12px!important}.vxe-table .vxe-body--column>.vxe-cell,.vxe-table .vxe-body--row td.vxe-body--column{height:34px!important;max-height:34px!important;line-height:34px!important;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-tree-cell{display:flex;align-items:center;height:34px;line-height:34px;overflow:hidden}.vxe-table .vxe-body--column .el-tag--mini{height:26px;line-height:24px;padding:0 4px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column .el-button--mini{height:26px;line-height:24px;padding:0 2px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column.col--active>.vxe-cell{overflow:visible!important;line-height:normal!important}.vxe-table .vxe-body--column.col--active .el-input,.vxe-table .vxe-body--column.col--active .el-input__inner,.vxe-table .vxe-body--column.col--active .vxe-default-input,.vxe-table .vxe-body--column.col--active .vxe-default-select,.vxe-table .vxe-body--column.col--active .vxe-default-textarea,.vxe-table .vxe-body--column.col--active .vxe-input{width:100%;height:34px!important;max-height:34px!important;line-height:32px!important;font-size:12px!important;box-sizing:border-box}.vxe-header--column.nr-header-drag-source{opacity:.45}.vxe-header--column.nr-header-drag-target{background-color:rgba(64,158,255,.08);box-shadow:inset 2px 0 0 #409eff}body.nr-header-dragging{-webkit-user-select:none;-moz-user-select:none;user-select:none}body.nr-header-dragging .vxe-header--column{cursor:grab}`, ""]);
|
|
3155
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-table-panel{flex:1 1 0%;min-width:0;min-height:0;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);height:100%;overflow:hidden;display:flex;flex-direction:column}.normal-report-table-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 12px}.normal-report-table-wrap .el-table,.normal-report-table-wrap .vxe-table{flex:1;min-height:0}.normal-report-table-actions{flex-shrink:0;display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #edf1f6;margin-bottom:10px}.normal-report-table-actions .el-button+.el-button{margin-left:0}.normal-report-table-actions-left{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.normal-report-table-actions-right{flex-shrink:0;margin-left:auto;display:flex;align-items:center;gap:6px}.standard-toolbar-left,.standard-toolbar-query,.standard-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0}.standard-toolbar-left .el-button+.el-button,.standard-toolbar-query .el-button+.el-button,.standard-toolbar-right .el-button+.el-button{margin-left:0}.normal-report-column-setting-entry,.normal-report-column-setting-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.normal-report-column-setting{min-width:270px}.normal-report-column-setting-header{padding-bottom:8px;border-bottom:1px solid #ebeef5}.normal-report-column-setting-list{max-height:300px;overflow-y:auto;padding:4px 0}.normal-report-column-setting-item{display:flex;align-items:center;gap:2px;padding:5px 4px;border-radius:4px}.normal-report-column-setting-item .el-checkbox{flex:1;min-width:0;margin-right:0;display:flex;align-items:center}.normal-report-column-setting-item .el-checkbox__input{display:flex;align-items:center;flex-shrink:0}.normal-report-column-setting-item .normal-report-column-setting-item-title{cursor:grab}.normal-report-column-setting-item .normal-report-column-setting-item-title:active{cursor:grabbing}.normal-report-column-setting-item .el-checkbox,.normal-report-column-setting-item .el-checkbox__label{-webkit-user-select:none;-moz-user-select:none;user-select:none}.normal-report-column-setting-item .normal-report-column-setting-item-title .el-checkbox__label{flex-shrink:0;width:var(--normal-report-title-width);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.normal-report-column-setting-item .normal-report-column-setting-item-width{flex-shrink:0;width:92px}.normal-report-column-setting-item .el-button+.el-button{margin-left:0}.normal-report-column-setting-item .is-pinned{color:#409eff}.normal-report-column-setting-item .is-sort-off,.normal-report-column-setting-item .is-sort-off:focus,.normal-report-column-setting-item .is-sort-off:hover{color:#c0c4cc}.normal-report-column-setting-item.drag-over{background:#ecf5ff}.normal-report-column-setting-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}.normal-report-table-footer{flex-shrink:0;box-sizing:border-box;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:8px 12px;border-top:1px solid #edf1f6}.normal-report-table-footer .normal-report-table-pagination{padding-top:0}.normal-report-table-footer.is-only-pagination{justify-content:flex-end}.normal-report-footer-empty{margin-top:10px}.normal-report-toolbar-empty{margin-bottom:10px}.normal-report-update-time{font-size:13px;color:#909399;flex-shrink:0}.vxe-table--context-menu-wrapper .vxe-context-menu--option-wrapper+.vxe-context-menu--option-wrapper,.vxe-table--context-menu-wrapper .vxe-table--context-menu-group-wrapper+.vxe-table--context-menu-group-wrapper{border-top:1px solid #e8eaec;margin-top:2px;padding-top:2px}.normal-report-table-pagination{flex-shrink:0;padding-top:10px;text-align:right}.normal-report-op-more{margin-left:10px}.normal-report-main-table.vxe-table .vxe-body--row{transition:transform .22s ease,filter .22s ease}.normal-report-main-table.vxe-table .vxe-body--row:hover{transform:translateY(-3px);filter:drop-shadow(0 8px 16px rgba(31,73,125,.22))}.vxe-table--footer-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--footer-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:active{background-color:#dddee0!important}.vxe-table--footer-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--body-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb:active,.vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover{background-color:#dddee0!important}.vxe-table--body-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table .vxe-header--row{height:36px!important}.vxe-table .vxe-header--column{padding:0!important;color:#636364!important;font-weight:600!important;font-size:13px!important;background-color:#f5f7fa!important}.vxe-table .vxe-header--column,.vxe-table .vxe-header--column>.vxe-cell{height:36px!important;max-height:36px!important;line-height:36px!important}.vxe-table .vxe-header--column>.vxe-cell{display:flex;align-items:center;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-body--row{height:34px!important}.vxe-table .vxe-body--row td.vxe-body--column{font-size:12px!important}.vxe-table .vxe-body--column>.vxe-cell,.vxe-table .vxe-body--row td.vxe-body--column{height:34px!important;max-height:34px!important;line-height:34px!important;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-tree-cell{display:flex;align-items:center;height:34px;line-height:34px;overflow:hidden}.vxe-table .vxe-body--column .el-tag--mini{height:26px;line-height:24px;padding:0 4px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column .el-button--mini{height:26px;line-height:24px;padding:0 2px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column.col--active>.vxe-cell{overflow:visible!important;line-height:normal!important}.vxe-table .vxe-body--column.col--active .el-input,.vxe-table .vxe-body--column.col--active .el-input__inner,.vxe-table .vxe-body--column.col--active .vxe-default-input,.vxe-table .vxe-body--column.col--active .vxe-default-select,.vxe-table .vxe-body--column.col--active .vxe-default-textarea,.vxe-table .vxe-body--column.col--active .vxe-input{width:100%;height:34px!important;max-height:34px!important;line-height:32px!important;font-size:12px!important;box-sizing:border-box}.vxe-header--column.nr-header-drag-source{opacity:.45}.vxe-header--column.nr-header-drag-target{background-color:rgba(64,158,255,.08);box-shadow:inset 2px 0 0 #409eff}body.nr-header-dragging{-webkit-user-select:none;-moz-user-select:none;user-select:none}body.nr-header-dragging .vxe-header--column{cursor:grab}.nr-icon-filter{display:inline-block;width:14px;height:14px;background-color:currentColor;vertical-align:-2px;-webkit-mask:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) center/contain no-repeat;mask:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) center/contain no-repeat}.normal-report-column-setting-item .nr-icon-filter{width:12px;height:12px;vertical-align:middle}.normal-report-main-table .vxe-cell--sort{display:none}.normal-report-main-table .vxe-cell--title:has(.nr-col-title){display:flex;flex:1;min-width:0}.normal-report-main-table .nr-col-title{display:flex;align-items:center;width:100%;min-width:0;height:100%;line-height:1}.normal-report-main-table .nr-col-title-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;line-height:36px}.normal-report-main-table .nr-col-tools{display:inline-flex;align-items:center;flex:none;gap:4px;margin-left:auto;padding-left:4px}.normal-report-main-table .nr-col-tool{flex-shrink:0;cursor:pointer;color:#909399;font-size:13px;line-height:1}.normal-report-main-table .nr-col-tool.is-active,.normal-report-main-table .nr-col-tool.is-active:hover{color:#409eff}.normal-report-main-table .nr-col-tool.nr-icon-filter{width:13px;height:13px}.nr-col-tool-popper{padding:10px 12px}.nr-col-filter-select{display:block;width:220px}.nr-col-search-input{width:200px}`, ""]);
|
|
3151
3156
|
// Exports
|
|
3152
3157
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
3153
3158
|
|
|
@@ -3275,6 +3280,39 @@ module.exports = function (cssWithMappingToString) {
|
|
|
3275
3280
|
|
|
3276
3281
|
/***/ },
|
|
3277
3282
|
|
|
3283
|
+
/***/ 4417
|
|
3284
|
+
(module) {
|
|
3285
|
+
|
|
3286
|
+
"use strict";
|
|
3287
|
+
|
|
3288
|
+
|
|
3289
|
+
module.exports = function (url, options) {
|
|
3290
|
+
if (!options) {
|
|
3291
|
+
options = {};
|
|
3292
|
+
}
|
|
3293
|
+
if (!url) {
|
|
3294
|
+
return url;
|
|
3295
|
+
}
|
|
3296
|
+
url = String(url.__esModule ? url.default : url);
|
|
3297
|
+
|
|
3298
|
+
// If url is already wrapped in quotes, remove them
|
|
3299
|
+
if (/^['"].*['"]$/.test(url)) {
|
|
3300
|
+
url = url.slice(1, -1);
|
|
3301
|
+
}
|
|
3302
|
+
if (options.hash) {
|
|
3303
|
+
url += options.hash;
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
// Should url be wrapped?
|
|
3307
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
|
3308
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
|
3309
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
3310
|
+
}
|
|
3311
|
+
return url;
|
|
3312
|
+
};
|
|
3313
|
+
|
|
3314
|
+
/***/ },
|
|
3315
|
+
|
|
3278
3316
|
/***/ 1601
|
|
3279
3317
|
(module) {
|
|
3280
3318
|
|
|
@@ -118151,6 +118189,14 @@ VxeUI.setTheme('light');
|
|
|
118151
118189
|
|
|
118152
118190
|
|
|
118153
118191
|
|
|
118192
|
+
/***/ },
|
|
118193
|
+
|
|
118194
|
+
/***/ 9793
|
|
118195
|
+
(module) {
|
|
118196
|
+
|
|
118197
|
+
"use strict";
|
|
118198
|
+
module.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M1 2h14L9.8 8.2V14l-3.6-1.4V8.2z%27/%3E%3C/svg%3E";
|
|
118199
|
+
|
|
118154
118200
|
/***/ },
|
|
118155
118201
|
|
|
118156
118202
|
/***/ 9274
|
|
@@ -118268,6 +118314,27 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9274__;
|
|
|
118268
118314
|
/******/ return module;
|
|
118269
118315
|
/******/ };
|
|
118270
118316
|
/******/
|
|
118317
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
118318
|
+
/******/ (() => {
|
|
118319
|
+
/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
|
|
118320
|
+
/******/
|
|
118321
|
+
/******/ // no installed chunks
|
|
118322
|
+
/******/
|
|
118323
|
+
/******/ // no chunk on demand loading
|
|
118324
|
+
/******/
|
|
118325
|
+
/******/ // no prefetching
|
|
118326
|
+
/******/
|
|
118327
|
+
/******/ // no preloaded
|
|
118328
|
+
/******/
|
|
118329
|
+
/******/ // no HMR
|
|
118330
|
+
/******/
|
|
118331
|
+
/******/ // no HMR manifest
|
|
118332
|
+
/******/
|
|
118333
|
+
/******/ // no on chunks loaded
|
|
118334
|
+
/******/
|
|
118335
|
+
/******/ // no jsonp function
|
|
118336
|
+
/******/ })();
|
|
118337
|
+
/******/
|
|
118271
118338
|
/************************************************************************/
|
|
118272
118339
|
let __webpack_exports__ = {};
|
|
118273
118340
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
@@ -121532,8 +121599,8 @@ var StandardTimePick_component = normalizeComponent(
|
|
|
121532
121599
|
)
|
|
121533
121600
|
|
|
121534
121601
|
/* harmony default export */ const StandardTimePick = (StandardTimePick_component.exports);
|
|
121535
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=template&id=
|
|
121536
|
-
var
|
|
121602
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=template&id=d9620728
|
|
121603
|
+
var StandardTablevue_type_template_id_d9620728_render = function render() {
|
|
121537
121604
|
var _vm = this,
|
|
121538
121605
|
_c = _vm._self._c;
|
|
121539
121606
|
return _c('section', {
|
|
@@ -121690,6 +121757,39 @@ var StandardTablevue_type_template_id_b1d59d54_render = function render() {
|
|
|
121690
121757
|
return _vm.toggleColumnSortable(col);
|
|
121691
121758
|
}
|
|
121692
121759
|
}
|
|
121760
|
+
}), _c('el-button', {
|
|
121761
|
+
"class": {
|
|
121762
|
+
'is-pinned': col.filterable,
|
|
121763
|
+
'is-sort-off': !col.filterable
|
|
121764
|
+
},
|
|
121765
|
+
attrs: {
|
|
121766
|
+
"type": "text",
|
|
121767
|
+
"size": "mini",
|
|
121768
|
+
"title": "是否显示筛选功能"
|
|
121769
|
+
},
|
|
121770
|
+
on: {
|
|
121771
|
+
"click": function click($event) {
|
|
121772
|
+
return _vm.toggleColumnFilterable(col);
|
|
121773
|
+
}
|
|
121774
|
+
}
|
|
121775
|
+
}, [_c('i', {
|
|
121776
|
+
staticClass: "nr-icon-filter"
|
|
121777
|
+
})]), _c('el-button', {
|
|
121778
|
+
"class": {
|
|
121779
|
+
'is-pinned': col.searchable,
|
|
121780
|
+
'is-sort-off': !col.searchable
|
|
121781
|
+
},
|
|
121782
|
+
attrs: {
|
|
121783
|
+
"type": "text",
|
|
121784
|
+
"size": "mini",
|
|
121785
|
+
"icon": "el-icon-search",
|
|
121786
|
+
"title": "是否显示搜索功能"
|
|
121787
|
+
},
|
|
121788
|
+
on: {
|
|
121789
|
+
"click": function click($event) {
|
|
121790
|
+
return _vm.toggleColumnSearchable(col);
|
|
121791
|
+
}
|
|
121792
|
+
}
|
|
121693
121793
|
}), _c('el-button', {
|
|
121694
121794
|
"class": {
|
|
121695
121795
|
'is-pinned': col.fixed === 'left'
|
|
@@ -121763,7 +121863,7 @@ var StandardTablevue_type_template_id_b1d59d54_render = function render() {
|
|
|
121763
121863
|
"height": _vm.height,
|
|
121764
121864
|
"z-index": _vm.zIndex || undefined,
|
|
121765
121865
|
"loading": _vm.loading,
|
|
121766
|
-
"data": _vm.
|
|
121866
|
+
"data": _vm.displayTableData,
|
|
121767
121867
|
"border": "",
|
|
121768
121868
|
"highlight-current-row": "",
|
|
121769
121869
|
"row-config": _vm.rowConfig,
|
|
@@ -121777,11 +121877,13 @@ var StandardTablevue_type_template_id_b1d59d54_render = function render() {
|
|
|
121777
121877
|
"resizable-config": {
|
|
121778
121878
|
minWidth: 60
|
|
121779
121879
|
},
|
|
121880
|
+
"sort-config": _vm.sortConfig,
|
|
121780
121881
|
"show-footer": !!_vm.footerMethod,
|
|
121781
121882
|
"footer-method": _vm.footerMethod,
|
|
121782
121883
|
"menu-config": _vm.resolvedMenuConfig
|
|
121783
121884
|
},
|
|
121784
121885
|
on: {
|
|
121886
|
+
"sort-change": _vm.onSortChange,
|
|
121785
121887
|
"menu-click": _vm.onMenuClick,
|
|
121786
121888
|
"resizable-change": _vm.onColumnResizableChange,
|
|
121787
121889
|
"checkbox-change": _vm.handleCheckboxChange,
|
|
@@ -121825,6 +121927,135 @@ var StandardTablevue_type_template_id_b1d59d54_render = function render() {
|
|
|
121825
121927
|
"edit-render": col.editRender || undefined
|
|
121826
121928
|
},
|
|
121827
121929
|
scopedSlots: _vm._u([{
|
|
121930
|
+
key: _vm.headerToolSlot,
|
|
121931
|
+
fn: function fn() {
|
|
121932
|
+
return [_c('span', {
|
|
121933
|
+
staticClass: "nr-col-title"
|
|
121934
|
+
}, [_c('span', {
|
|
121935
|
+
staticClass: "nr-col-title-text"
|
|
121936
|
+
}, [_vm._v(_vm._s(col.title))]), col.sortable || col.filterable || col.searchable ? _c('span', {
|
|
121937
|
+
staticClass: "nr-col-tools"
|
|
121938
|
+
}, [col.sortable ? _c('i', {
|
|
121939
|
+
staticClass: "el-icon-sort nr-col-tool",
|
|
121940
|
+
"class": {
|
|
121941
|
+
'is-active': _vm.columnSortOrder(col) !== ''
|
|
121942
|
+
},
|
|
121943
|
+
attrs: {
|
|
121944
|
+
"title": _vm.columnSortTitle(col)
|
|
121945
|
+
},
|
|
121946
|
+
on: {
|
|
121947
|
+
"click": function click($event) {
|
|
121948
|
+
$event.stopPropagation();
|
|
121949
|
+
return _vm.toggleColumnSort(col, $event);
|
|
121950
|
+
},
|
|
121951
|
+
"mousedown": function mousedown($event) {
|
|
121952
|
+
$event.stopPropagation();
|
|
121953
|
+
}
|
|
121954
|
+
}
|
|
121955
|
+
}) : _vm._e(), col.filterable ? _c('el-popover', {
|
|
121956
|
+
attrs: {
|
|
121957
|
+
"placement": "bottom-start",
|
|
121958
|
+
"trigger": "click",
|
|
121959
|
+
"popper-class": "nr-col-tool-popper"
|
|
121960
|
+
},
|
|
121961
|
+
on: {
|
|
121962
|
+
"show": function show($event) {
|
|
121963
|
+
return _vm.openColumnFilter(col);
|
|
121964
|
+
}
|
|
121965
|
+
}
|
|
121966
|
+
}, [_c('el-select', {
|
|
121967
|
+
ref: 'colFilter' + col.uid,
|
|
121968
|
+
refInFor: true,
|
|
121969
|
+
staticClass: "nr-col-filter-select",
|
|
121970
|
+
attrs: {
|
|
121971
|
+
"value": _vm.columnFilterValue(col),
|
|
121972
|
+
"multiple": "",
|
|
121973
|
+
"filterable": "",
|
|
121974
|
+
"clearable": "",
|
|
121975
|
+
"collapse-tags": "",
|
|
121976
|
+
"size": "mini",
|
|
121977
|
+
"placeholder": "请选择",
|
|
121978
|
+
"popper-append-to-body": false
|
|
121979
|
+
},
|
|
121980
|
+
on: {
|
|
121981
|
+
"change": function change(values) {
|
|
121982
|
+
return _vm.setColumnFilter(col, values);
|
|
121983
|
+
}
|
|
121984
|
+
}
|
|
121985
|
+
}, _vm._l(_vm.columnFilterOptions(col), function (opt) {
|
|
121986
|
+
return _c('el-option', {
|
|
121987
|
+
key: opt.key,
|
|
121988
|
+
attrs: {
|
|
121989
|
+
"label": opt.label,
|
|
121990
|
+
"value": opt.value
|
|
121991
|
+
}
|
|
121992
|
+
});
|
|
121993
|
+
}), 1), _c('i', {
|
|
121994
|
+
staticClass: "nr-icon-filter nr-col-tool",
|
|
121995
|
+
"class": {
|
|
121996
|
+
'is-active': _vm.columnFilterActive(col)
|
|
121997
|
+
},
|
|
121998
|
+
attrs: {
|
|
121999
|
+
"slot": "reference",
|
|
122000
|
+
"title": "筛选"
|
|
122001
|
+
},
|
|
122002
|
+
on: {
|
|
122003
|
+
"click": function click($event) {
|
|
122004
|
+
$event.stopPropagation();
|
|
122005
|
+
},
|
|
122006
|
+
"mousedown": function mousedown($event) {
|
|
122007
|
+
$event.stopPropagation();
|
|
122008
|
+
}
|
|
122009
|
+
},
|
|
122010
|
+
slot: "reference"
|
|
122011
|
+
})], 1) : _vm._e(), col.searchable ? _c('el-popover', {
|
|
122012
|
+
attrs: {
|
|
122013
|
+
"placement": "bottom-start",
|
|
122014
|
+
"trigger": "click",
|
|
122015
|
+
"popper-class": "nr-col-tool-popper"
|
|
122016
|
+
},
|
|
122017
|
+
on: {
|
|
122018
|
+
"show": function show($event) {
|
|
122019
|
+
return _vm.focusColumnSearch(col);
|
|
122020
|
+
}
|
|
122021
|
+
}
|
|
122022
|
+
}, [_c('el-input', {
|
|
122023
|
+
ref: 'colSearch' + col.uid,
|
|
122024
|
+
refInFor: true,
|
|
122025
|
+
staticClass: "nr-col-search-input",
|
|
122026
|
+
attrs: {
|
|
122027
|
+
"value": _vm.columnKeyword(col),
|
|
122028
|
+
"size": "mini",
|
|
122029
|
+
"clearable": "",
|
|
122030
|
+
"placeholder": "请输入关键字"
|
|
122031
|
+
},
|
|
122032
|
+
on: {
|
|
122033
|
+
"input": function input(value) {
|
|
122034
|
+
return _vm.setColumnKeyword(col, value);
|
|
122035
|
+
}
|
|
122036
|
+
}
|
|
122037
|
+
}), _c('i', {
|
|
122038
|
+
staticClass: "el-icon-search nr-col-tool",
|
|
122039
|
+
"class": {
|
|
122040
|
+
'is-active': _vm.columnSearchActive(col)
|
|
122041
|
+
},
|
|
122042
|
+
attrs: {
|
|
122043
|
+
"slot": "reference",
|
|
122044
|
+
"title": "搜索"
|
|
122045
|
+
},
|
|
122046
|
+
on: {
|
|
122047
|
+
"click": function click($event) {
|
|
122048
|
+
$event.stopPropagation();
|
|
122049
|
+
},
|
|
122050
|
+
"mousedown": function mousedown($event) {
|
|
122051
|
+
$event.stopPropagation();
|
|
122052
|
+
}
|
|
122053
|
+
},
|
|
122054
|
+
slot: "reference"
|
|
122055
|
+
})], 1) : _vm._e()], 1) : _vm._e()])];
|
|
122056
|
+
},
|
|
122057
|
+
proxy: true
|
|
122058
|
+
}, {
|
|
121828
122059
|
key: "default",
|
|
121829
122060
|
fn: function fn(scope) {
|
|
121830
122061
|
return [_c('normal-report-cell', {
|
|
@@ -121868,7 +122099,7 @@ var StandardTablevue_type_template_id_b1d59d54_render = function render() {
|
|
|
121868
122099
|
}
|
|
121869
122100
|
}) : _vm.getFooterEmptyVisible() ? _c('standard-footer-empty') : _vm._e()], 1);
|
|
121870
122101
|
};
|
|
121871
|
-
var
|
|
122102
|
+
var StandardTablevue_type_template_id_d9620728_staticRenderFns = [];
|
|
121872
122103
|
|
|
121873
122104
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/ToolbarEmpty.vue?vue&type=script&lang=js
|
|
121874
122105
|
/**
|
|
@@ -121960,9 +122191,9 @@ var FooterEmpty_component = normalizeComponent(
|
|
|
121960
122191
|
* 表头配置接口。路径固定,请求方法由业务项目注入。
|
|
121961
122192
|
* IP 和端口来自该请求方法自己的 baseURL,组件库不保存主机地址。
|
|
121962
122193
|
*/
|
|
121963
|
-
var GET_CONFIG = '/api/
|
|
121964
|
-
var SAVE_CONFIG = '/api/
|
|
121965
|
-
var RESET_CONFIG = '/api/
|
|
122194
|
+
var GET_CONFIG = '/api/SYS/UserTableColumn/GetUserTableConfig';
|
|
122195
|
+
var SAVE_CONFIG = '/api/SYS/UserTableColumn/SaveUserTableConfig';
|
|
122196
|
+
var RESET_CONFIG = '/api/SYS/UserTableColumn/ResetUserTableConfig';
|
|
121966
122197
|
var columnConfigApi = null;
|
|
121967
122198
|
var columnModuleCode = '';
|
|
121968
122199
|
|
|
@@ -121974,15 +122205,11 @@ function setColumnConfigRequest(request) {
|
|
|
121974
122205
|
return;
|
|
121975
122206
|
}
|
|
121976
122207
|
columnConfigApi = {
|
|
121977
|
-
|
|
122208
|
+
// 一次取当前用户的全部表头。表格渲染不调用它,由业务程序写入本地 TableSetting
|
|
122209
|
+
get: function get() {
|
|
121978
122210
|
return request({
|
|
121979
122211
|
url: GET_CONFIG,
|
|
121980
|
-
method: 'get'
|
|
121981
|
-
params: {
|
|
121982
|
-
moduleCode: moduleCode,
|
|
121983
|
-
pageCode: pageCode,
|
|
121984
|
-
tableCode: tableCode
|
|
121985
|
-
}
|
|
122212
|
+
method: 'get'
|
|
121986
122213
|
});
|
|
121987
122214
|
},
|
|
121988
122215
|
save: function save(moduleCode, pageCode, tableCode, columns) {
|
|
@@ -122037,6 +122264,9 @@ function releaseTableCode(moduleCode, pageCode, tableCode, owner) {
|
|
|
122037
122264
|
if (tableCodeOwners[key] === owner) delete tableCodeOwners[key];
|
|
122038
122265
|
}
|
|
122039
122266
|
;// ./src/components/StandardTable/columnPersist.js
|
|
122267
|
+
function columnPersist_defineProperty(e, r, t) { return (r = columnPersist_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
122268
|
+
function columnPersist_toPropertyKey(t) { var i = columnPersist_toPrimitive(t, "string"); return "symbol" == columnPersist_typeof(i) ? i : i + ""; }
|
|
122269
|
+
function columnPersist_toPrimitive(t, r) { if ("object" != columnPersist_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != columnPersist_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
122040
122270
|
function columnPersist_typeof(o) { "@babel/helpers - typeof"; return columnPersist_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; }, columnPersist_typeof(o); }
|
|
122041
122271
|
/**
|
|
122042
122272
|
* 表头配置的列主键、合并和提交数据。
|
|
@@ -122078,7 +122308,9 @@ function readSavedColumn(item) {
|
|
|
122078
122308
|
fixed: item.Fixed != null ? item.Fixed : item.fixed,
|
|
122079
122309
|
minWidth: item.MinWidth !== undefined ? item.MinWidth : item.minWidth,
|
|
122080
122310
|
width: item.Width !== undefined ? item.Width : item.width,
|
|
122081
|
-
sortable: item.Sortable !== undefined ? item.Sortable : item.sortable
|
|
122311
|
+
sortable: item.Sortable !== undefined ? item.Sortable : item.sortable,
|
|
122312
|
+
filterable: item.Filterable !== undefined ? item.Filterable : item.filterable,
|
|
122313
|
+
searchable: item.Searchable !== undefined ? item.Searchable : item.searchable
|
|
122082
122314
|
};
|
|
122083
122315
|
}
|
|
122084
122316
|
function savedFixed(value) {
|
|
@@ -122189,7 +122421,9 @@ function mergeColumnConfig(comps, savedColumns) {
|
|
|
122189
122421
|
fixed: savedFixed(row.saved.fixed),
|
|
122190
122422
|
minWidth: savedMinWidth(row.saved.minWidth),
|
|
122191
122423
|
width: savedWidth(row.saved.width),
|
|
122192
|
-
sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable
|
|
122424
|
+
sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable,
|
|
122425
|
+
filterable: row.saved.filterable != null ? !!row.saved.filterable : false,
|
|
122426
|
+
searchable: row.saved.searchable != null ? !!row.saved.searchable : false
|
|
122193
122427
|
}
|
|
122194
122428
|
});
|
|
122195
122429
|
});
|
|
@@ -122219,7 +122453,9 @@ function buildColumnPayload(comps, order, states) {
|
|
|
122219
122453
|
Fixed: savedFixed(st.fixed),
|
|
122220
122454
|
MinWidth: savedMinWidth(st.minWidth),
|
|
122221
122455
|
Width: savedWidth(st.width),
|
|
122222
|
-
Sortable: !!st.sortable
|
|
122456
|
+
Sortable: !!st.sortable,
|
|
122457
|
+
Filterable: !!st.filterable,
|
|
122458
|
+
Searchable: !!st.searchable
|
|
122223
122459
|
});
|
|
122224
122460
|
});
|
|
122225
122461
|
return columns;
|
|
@@ -122238,6 +122474,8 @@ function isDefaultColumnPayload(comps, columns) {
|
|
|
122238
122474
|
if (col.Visible !== true) return false;
|
|
122239
122475
|
if ((col.Fixed || '') !== (comp.fixed || '')) return false;
|
|
122240
122476
|
if (!!col.Sortable !== !!comp.sortable) return false;
|
|
122477
|
+
if (!!col.Filterable) return false;
|
|
122478
|
+
if (!!col.Searchable) return false;
|
|
122241
122479
|
if (col.Width != null) return false;
|
|
122242
122480
|
if (col.MinWidth != null && Number(col.MinWidth) !== Number(comp.resolvedMinWidth)) return false;
|
|
122243
122481
|
}
|
|
@@ -122262,11 +122500,167 @@ function readColumnConfigDatas(res) {
|
|
|
122262
122500
|
var content = res && res.data && res.data.Content;
|
|
122263
122501
|
throw new Error(content || '表头配置请求失败');
|
|
122264
122502
|
}
|
|
122503
|
+
|
|
122504
|
+
// 其它程序把 GetConfig 的响应写入 localStorage.TableSetting。键为「模块/页面/表格」,值为 CLAYOUT 原文。
|
|
122505
|
+
var TABLE_SETTING_STORE = 'TableSetting';
|
|
122506
|
+
function buildColumnSettingKey(moduleCode, pageCode, tableCode) {
|
|
122507
|
+
return moduleCode + '/' + pageCode + '/' + tableCode;
|
|
122508
|
+
}
|
|
122509
|
+
function readTableSettingRoot() {
|
|
122510
|
+
if (typeof window === 'undefined' || !window.localStorage) return {
|
|
122511
|
+
missing: true
|
|
122512
|
+
};
|
|
122513
|
+
try {
|
|
122514
|
+
var raw = window.localStorage.getItem(TABLE_SETTING_STORE);
|
|
122515
|
+
if (raw == null || raw === '') return {
|
|
122516
|
+
missing: true
|
|
122517
|
+
};
|
|
122518
|
+
var root = JSON.parse(raw);
|
|
122519
|
+
// 个别调用方会把已经 stringify 过的响应再存一次
|
|
122520
|
+
if (typeof root === 'string') root = JSON.parse(root);
|
|
122521
|
+
return {
|
|
122522
|
+
missing: false,
|
|
122523
|
+
root: root
|
|
122524
|
+
};
|
|
122525
|
+
} catch (e) {
|
|
122526
|
+
console.warn('[StandardTable] TableSetting 解析失败');
|
|
122527
|
+
return {
|
|
122528
|
+
invalid: true
|
|
122529
|
+
};
|
|
122530
|
+
}
|
|
122531
|
+
}
|
|
122532
|
+
function writeTableSettingRoot(root) {
|
|
122533
|
+
window.localStorage.setItem(TABLE_SETTING_STORE, JSON.stringify(root));
|
|
122534
|
+
}
|
|
122535
|
+
|
|
122536
|
+
// 响应可能整包存入,也可能只存 Datas。沿 code/data/Datas 找到字典数组。
|
|
122537
|
+
function findLayoutArray(node, depth) {
|
|
122538
|
+
if (depth > 5 || node == null) return null;
|
|
122539
|
+
if (Array.isArray(node)) {
|
|
122540
|
+
if (!node.length || node.every(function (item) {
|
|
122541
|
+
return item && columnPersist_typeof(item) === 'object' && !Array.isArray(item);
|
|
122542
|
+
})) return node;
|
|
122543
|
+
return null;
|
|
122544
|
+
}
|
|
122545
|
+
if (columnPersist_typeof(node) !== 'object') return null;
|
|
122546
|
+
var fields = ['Datas', 'datas', 'data'];
|
|
122547
|
+
for (var i = 0; i < fields.length; i++) {
|
|
122548
|
+
if (!Object.prototype.hasOwnProperty.call(node, fields[i])) continue;
|
|
122549
|
+
var found = findLayoutArray(node[fields[i]], depth + 1);
|
|
122550
|
+
if (found) return found;
|
|
122551
|
+
}
|
|
122552
|
+
return null;
|
|
122553
|
+
}
|
|
122554
|
+
function isFlatLayoutMap(node) {
|
|
122555
|
+
if (!node || columnPersist_typeof(node) !== 'object' || Array.isArray(node)) return false;
|
|
122556
|
+
return Object.keys(node).some(function (key) {
|
|
122557
|
+
return key.indexOf('/') >= 0;
|
|
122558
|
+
});
|
|
122559
|
+
}
|
|
122560
|
+
|
|
122561
|
+
// Datas 为 null 的成功响应,补一个空数组后再写入,避免改掉外层结构
|
|
122562
|
+
function ensureLayoutArray(root) {
|
|
122563
|
+
var list = findLayoutArray(root, 0);
|
|
122564
|
+
if (list) return list;
|
|
122565
|
+
if (!root || columnPersist_typeof(root) !== 'object' || Array.isArray(root)) return null;
|
|
122566
|
+
var holder = root.data && columnPersist_typeof(root.data) === 'object' && !Array.isArray(root.data) && ('Datas' in root.data || 'datas' in root.data || 'Success' in root.data) ? root.data : 'Datas' in root || 'Success' in root ? root : null;
|
|
122567
|
+
if (!holder) return null;
|
|
122568
|
+
var field = 'datas' in holder && !('Datas' in holder) ? 'datas' : 'Datas';
|
|
122569
|
+
holder[field] = [];
|
|
122570
|
+
return holder[field];
|
|
122571
|
+
}
|
|
122572
|
+
|
|
122573
|
+
// CLAYOUT 是列数组的 JSON 字符串。兼容已解析的数组,以及旧的 { Columns } 结构。
|
|
122574
|
+
function parseLayoutColumns(value) {
|
|
122575
|
+
var data = value;
|
|
122576
|
+
for (var i = 0; i < 2 && typeof data === 'string'; i++) {
|
|
122577
|
+
var text = data.trim();
|
|
122578
|
+
if (!text) return null;
|
|
122579
|
+
try {
|
|
122580
|
+
data = JSON.parse(text);
|
|
122581
|
+
} catch (e) {
|
|
122582
|
+
return null;
|
|
122583
|
+
}
|
|
122584
|
+
}
|
|
122585
|
+
if (Array.isArray(data)) return data;
|
|
122586
|
+
if (data && columnPersist_typeof(data) === 'object') {
|
|
122587
|
+
var columns = data.Columns != null ? data.Columns : data.columns;
|
|
122588
|
+
if (Array.isArray(columns)) return columns;
|
|
122589
|
+
}
|
|
122590
|
+
return null;
|
|
122591
|
+
}
|
|
122592
|
+
function layoutJson(columns) {
|
|
122593
|
+
return JSON.stringify(Array.isArray(columns) ? columns : []);
|
|
122594
|
+
}
|
|
122595
|
+
function readCachedColumnLayout(moduleCode, pageCode, tableCode) {
|
|
122596
|
+
var stored = readTableSettingRoot();
|
|
122597
|
+
if (stored.missing || stored.invalid) return null;
|
|
122598
|
+
var key = buildColumnSettingKey(moduleCode, pageCode, tableCode);
|
|
122599
|
+
var list = findLayoutArray(stored.root, 0);
|
|
122600
|
+
if (list) {
|
|
122601
|
+
for (var i = list.length - 1; i >= 0; i--) {
|
|
122602
|
+
var item = list[i];
|
|
122603
|
+
if (item && Object.prototype.hasOwnProperty.call(item, key)) return parseLayoutColumns(item[key]);
|
|
122604
|
+
}
|
|
122605
|
+
return null;
|
|
122606
|
+
}
|
|
122607
|
+
if (isFlatLayoutMap(stored.root) && Object.prototype.hasOwnProperty.call(stored.root, key)) {
|
|
122608
|
+
return parseLayoutColumns(stored.root[key]);
|
|
122609
|
+
}
|
|
122610
|
+
return null;
|
|
122611
|
+
}
|
|
122612
|
+
function updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns) {
|
|
122613
|
+
var key = buildColumnSettingKey(moduleCode, pageCode, tableCode);
|
|
122614
|
+
var value = layoutJson(columns);
|
|
122615
|
+
var stored = readTableSettingRoot();
|
|
122616
|
+
if (stored.invalid) return;
|
|
122617
|
+
if (stored.missing) {
|
|
122618
|
+
writeTableSettingRoot([columnPersist_defineProperty({}, key, value)]);
|
|
122619
|
+
return;
|
|
122620
|
+
}
|
|
122621
|
+
var list = ensureLayoutArray(stored.root);
|
|
122622
|
+
if (list) {
|
|
122623
|
+
var hit = null;
|
|
122624
|
+
for (var i = 0; i < list.length; i++) {
|
|
122625
|
+
if (list[i] && Object.prototype.hasOwnProperty.call(list[i], key)) hit = list[i];
|
|
122626
|
+
}
|
|
122627
|
+
if (hit) hit[key] = value;else list.push(columnPersist_defineProperty({}, key, value));
|
|
122628
|
+
writeTableSettingRoot(stored.root);
|
|
122629
|
+
return;
|
|
122630
|
+
}
|
|
122631
|
+
if (isFlatLayoutMap(stored.root)) {
|
|
122632
|
+
stored.root[key] = value;
|
|
122633
|
+
writeTableSettingRoot(stored.root);
|
|
122634
|
+
return;
|
|
122635
|
+
}
|
|
122636
|
+
console.warn('[StandardTable] TableSetting 结构无法识别,未更新本地表头配置');
|
|
122637
|
+
}
|
|
122638
|
+
function removeCachedColumnLayout(moduleCode, pageCode, tableCode) {
|
|
122639
|
+
var key = buildColumnSettingKey(moduleCode, pageCode, tableCode);
|
|
122640
|
+
var stored = readTableSettingRoot();
|
|
122641
|
+
if (stored.missing || stored.invalid) return;
|
|
122642
|
+
var list = findLayoutArray(stored.root, 0);
|
|
122643
|
+
if (list) {
|
|
122644
|
+
for (var i = list.length - 1; i >= 0; i--) {
|
|
122645
|
+
var item = list[i];
|
|
122646
|
+
if (!item || !Object.prototype.hasOwnProperty.call(item, key)) continue;
|
|
122647
|
+
delete item[key];
|
|
122648
|
+
if (!Object.keys(item).length) list.splice(i, 1);
|
|
122649
|
+
}
|
|
122650
|
+
writeTableSettingRoot(stored.root);
|
|
122651
|
+
return;
|
|
122652
|
+
}
|
|
122653
|
+
if (isFlatLayoutMap(stored.root) && Object.prototype.hasOwnProperty.call(stored.root, key)) {
|
|
122654
|
+
delete stored.root[key];
|
|
122655
|
+
writeTableSettingRoot(stored.root);
|
|
122656
|
+
}
|
|
122657
|
+
}
|
|
122265
122658
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=script&lang=js
|
|
122266
122659
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
122267
122660
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
122268
122661
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
122269
122662
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
122663
|
+
function StandardTablevue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return StandardTablevue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, StandardTablevue_type_script_lang_js_typeof(o); }
|
|
122270
122664
|
function StandardTablevue_type_script_lang_js_toConsumableArray(r) { return StandardTablevue_type_script_lang_js_arrayWithoutHoles(r) || StandardTablevue_type_script_lang_js_iterableToArray(r) || StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r) || StandardTablevue_type_script_lang_js_nonIterableSpread(); }
|
|
122271
122665
|
function StandardTablevue_type_script_lang_js_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
122272
122666
|
function StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return StandardTablevue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? StandardTablevue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -122300,6 +122694,41 @@ function formatDateTime(date) {
|
|
|
122300
122694
|
return "".concat(date.getFullYear(), "-").concat(pad(date.getMonth() + 1), "-").concat(pad(date.getDate()), " ").concat(pad(date.getHours()), ":").concat(pad(date.getMinutes()), ":").concat(pad(date.getSeconds()));
|
|
122301
122695
|
}
|
|
122302
122696
|
|
|
122697
|
+
// 表头筛选/搜索按钮放进哪个插槽。
|
|
122698
|
+
// vxe-table 3.6 及更早:普通列只消费 header 插槽,内容画在标题里,排序图标仍拼在后面。
|
|
122699
|
+
// vxe-table 3.24:header 插槽会替换整个表头并丢掉排序图标,title 插槽才画在标题内部。
|
|
122700
|
+
function detectVxeHeaderToolSlot(vm) {
|
|
122701
|
+
var comps = vm && vm.$options && vm.$options.components;
|
|
122702
|
+
var seen = [];
|
|
122703
|
+
while (comps && comps !== Object.prototype && seen.indexOf(comps) === -1) {
|
|
122704
|
+
seen.push(comps);
|
|
122705
|
+
var col = comps.VxeColumn || comps['vxe-column'];
|
|
122706
|
+
var options = col && (col.options || col);
|
|
122707
|
+
var fn = options && options.methods && options.methods.renderHeaderTitle;
|
|
122708
|
+
if (typeof fn === 'function') {
|
|
122709
|
+
return String(fn).indexOf('tableHeadeSlotToTitleSlot') !== -1 ? 'title' : 'header';
|
|
122710
|
+
}
|
|
122711
|
+
comps = Object.getPrototypeOf(comps);
|
|
122712
|
+
}
|
|
122713
|
+
return 'title';
|
|
122714
|
+
}
|
|
122715
|
+
|
|
122716
|
+
// 把插槽渲染结果收成可见文本,供表头筛选和搜索使用。自定义列(如 el-tag)取标签里的文字。
|
|
122717
|
+
function vnodeText(node) {
|
|
122718
|
+
if (node == null || node === false || node === true) return '';
|
|
122719
|
+
if (typeof node === 'string' || typeof node === 'number') return String(node);
|
|
122720
|
+
if (Array.isArray(node)) {
|
|
122721
|
+
var _text = '';
|
|
122722
|
+
for (var i = 0; i < node.length; i++) _text += vnodeText(node[i]);
|
|
122723
|
+
return _text;
|
|
122724
|
+
}
|
|
122725
|
+
var text = node.text ? String(node.text) : '';
|
|
122726
|
+
if (node.children && node.children.length) text += vnodeText(node.children);
|
|
122727
|
+
var opts = node.componentOptions;
|
|
122728
|
+
if (opts && opts.children && opts.children.length) text += vnodeText(opts.children);
|
|
122729
|
+
return text;
|
|
122730
|
+
}
|
|
122731
|
+
|
|
122303
122732
|
/**
|
|
122304
122733
|
* 单元格渲染分发组件(组件内部使用,不对外暴露):
|
|
122305
122734
|
* vxe-table 3.x 的列只能通过 <vxe-column> 子组件 + 作用域插槽声明,
|
|
@@ -122583,7 +123012,20 @@ var NormalReportSlotView = {
|
|
|
122583
123012
|
columnConfigDirty: false,
|
|
122584
123013
|
columnConfigSettled: false,
|
|
122585
123014
|
columnConfigTimer: null,
|
|
122586
|
-
columnConfigSaveTimer: null
|
|
123015
|
+
columnConfigSaveTimer: null,
|
|
123016
|
+
// 表头筛选/搜索按钮使用的插槽名:header(vxe 3.6)或 title(vxe 3.24)
|
|
123017
|
+
headerToolSlot: detectVxeHeaderToolSlot(this),
|
|
123018
|
+
// 表头筛选已选值、搜索关键字、当前排序方向。只作用于当前页面,不写入列配置
|
|
123019
|
+
columnFilters: {},
|
|
123020
|
+
columnKeywords: {},
|
|
123021
|
+
columnSortOrders: {},
|
|
123022
|
+
// 不用 vxe 自带的上下箭头,改由表头里的 el-icon-sort 触发排序
|
|
123023
|
+
sortConfig: {
|
|
123024
|
+
showIcon: false,
|
|
123025
|
+
allowClear: true,
|
|
123026
|
+
trigger: 'default'
|
|
123027
|
+
},
|
|
123028
|
+
filterOptionCache: {}
|
|
122587
123029
|
};
|
|
122588
123030
|
},
|
|
122589
123031
|
computed: {
|
|
@@ -122660,7 +123102,7 @@ var NormalReportSlotView = {
|
|
|
122660
123102
|
// 实际生效的右键菜单配置:
|
|
122661
123103
|
// 优先取 menuConfig prop(自定义模式);
|
|
122662
123104
|
// 否则自动生成:body 第一栏“复制” + 第二栏操作列按钮菜单项(tableOperation 为空时仅“复制”一栏);
|
|
122663
|
-
// header
|
|
123105
|
+
// header 为表头右键菜单(排序 / 筛选 / 搜索 / 固定在左侧 / 固定在右侧);
|
|
122664
123106
|
// 单元格右键菜单默认关闭:showContextMenu=false 时 body 无菜单项,
|
|
122665
123107
|
// 且不阻止浏览器默认右键菜单(显示浏览器原生菜单),表头菜单不受影响
|
|
122666
123108
|
resolvedMenuConfig: function resolvedMenuConfig() {
|
|
@@ -122699,6 +123141,20 @@ var NormalReportSlotView = {
|
|
|
122699
123141
|
},
|
|
122700
123142
|
prefixIcon: 'el-icon-sort',
|
|
122701
123143
|
__isHeaderMenu: true
|
|
123144
|
+
}, {
|
|
123145
|
+
code: '__normal_report_header_filter',
|
|
123146
|
+
name: function name() {
|
|
123147
|
+
return _this.getHeaderFilterMenuName();
|
|
123148
|
+
},
|
|
123149
|
+
prefixIcon: 'nr-icon-filter',
|
|
123150
|
+
__isHeaderMenu: true
|
|
123151
|
+
}, {
|
|
123152
|
+
code: '__normal_report_header_search',
|
|
123153
|
+
name: function name() {
|
|
123154
|
+
return _this.getHeaderSearchMenuName();
|
|
123155
|
+
},
|
|
123156
|
+
prefixIcon: 'el-icon-search',
|
|
123157
|
+
__isHeaderMenu: true
|
|
122702
123158
|
}, {
|
|
122703
123159
|
code: '__normal_report_header_fix_left',
|
|
122704
123160
|
name: function name() {
|
|
@@ -122748,6 +123204,9 @@ var NormalReportSlotView = {
|
|
|
122748
123204
|
align: comp.align,
|
|
122749
123205
|
// 是否显示排序功能:优先取列设置弹层设置的值,未设置时取列组件声明
|
|
122750
123206
|
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
123207
|
+
// 筛选、搜索只来自用户配置,代码列默认不显示
|
|
123208
|
+
filterable: !!(st && st.filterable),
|
|
123209
|
+
searchable: !!(st && st.searchable),
|
|
122751
123210
|
showOverflow: comp.showOverflow,
|
|
122752
123211
|
resizable: comp.resizable,
|
|
122753
123212
|
// 编辑:edit-render 优先;editable 默认文本输入;仅有 #edit 插槽时用空配置打开编辑
|
|
@@ -122770,11 +123229,9 @@ var NormalReportSlotView = {
|
|
|
122770
123229
|
var baseKey = c.field || c.type || '__normal_report_uid_' + c.uid;
|
|
122771
123230
|
var isSeq = c.type === 'seq';
|
|
122772
123231
|
return {
|
|
122773
|
-
// key 中追加 sortable/fixed:vxe-table 3.x
|
|
122774
|
-
//
|
|
122775
|
-
|
|
122776
|
-
// <vxe-column>,使表头排序图标与固定列分组实时更新
|
|
122777
|
-
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || ''),
|
|
123232
|
+
// key 中追加 sortable/fixed/filter/search:vxe-table 3.x 在列创建时固化表头渲染,
|
|
123233
|
+
// 并把当时的插槽函数记在列上。仅改状态不会刷新表头按钮,纳入 key 后强制重建列
|
|
123234
|
+
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || '') + '|filter=' + (c.filterable ? 1 : 0) + '|search=' + (c.searchable ? 1 : 0),
|
|
122778
123235
|
// 列唯一主键(vxe-table col-id → ColumnInfo.id / 表头 th 的 colid 属性):
|
|
122779
123236
|
// 内嵌组件列 uid,用于表头右键菜单与拖拽换列时把 vxe 列映射回组件列;
|
|
122780
123237
|
// 内置列(多选框/操作列)不传 col-id,由 vxe 自动生成普通 id
|
|
@@ -122792,6 +123249,9 @@ var NormalReportSlotView = {
|
|
|
122792
123249
|
fixed: c.fixed || undefined,
|
|
122793
123250
|
align: c.align,
|
|
122794
123251
|
sortable: !!c.sortable,
|
|
123252
|
+
filterable: !!c.filterable,
|
|
123253
|
+
searchable: !!c.searchable,
|
|
123254
|
+
uid: c.uid,
|
|
122795
123255
|
// 序号列排序:按行在原始数据中的索引排序(升序恢复原始顺序,降序反向)
|
|
122796
123256
|
sortBy: isSeq ? function (_ref) {
|
|
122797
123257
|
var row = _ref.row;
|
|
@@ -122847,12 +123307,20 @@ var NormalReportSlotView = {
|
|
|
122847
123307
|
return col.editRender;
|
|
122848
123308
|
});
|
|
122849
123309
|
return editable ? this.defaultEditConfig : null;
|
|
123310
|
+
},
|
|
123311
|
+
// 按已启用列的筛选值和搜索关键字过滤。没有条件时返回原数组,避免表格无故重绘
|
|
123312
|
+
displayTableData: function displayTableData() {
|
|
123313
|
+
var rows = Array.isArray(this.tableData) ? this.tableData : [];
|
|
123314
|
+
var checks = this.buildColumnQueryChecks();
|
|
123315
|
+
if (!checks.length) return rows;
|
|
123316
|
+
return this.filterRowsByQuery(rows, checks);
|
|
122850
123317
|
}
|
|
122851
123318
|
},
|
|
122852
123319
|
watch: {
|
|
122853
123320
|
// 表格数据变化时自动刷新“数据更新时间”
|
|
122854
123321
|
tableData: function tableData() {
|
|
122855
123322
|
this.updateTime = formatDateTime(new Date());
|
|
123323
|
+
this.filterOptionCache = {};
|
|
122856
123324
|
}
|
|
122857
123325
|
},
|
|
122858
123326
|
created: function created() {
|
|
@@ -122873,9 +123341,11 @@ var NormalReportSlotView = {
|
|
|
122873
123341
|
clearTimeout(this.columnConfigTimer);
|
|
122874
123342
|
this.columnConfigTimer = null;
|
|
122875
123343
|
}
|
|
123344
|
+
// 直接改表头的保存还在 3 秒防抖里,离开页面时把最后一次调整写回去
|
|
122876
123345
|
if (this.columnConfigSaveTimer) {
|
|
122877
123346
|
clearTimeout(this.columnConfigSaveTimer);
|
|
122878
123347
|
this.columnConfigSaveTimer = null;
|
|
123348
|
+
this.persistColumnConfig();
|
|
122879
123349
|
}
|
|
122880
123350
|
this.releaseColumnConfigClaim();
|
|
122881
123351
|
this.destroyResizeObserver();
|
|
@@ -122999,7 +123469,9 @@ var NormalReportSlotView = {
|
|
|
122999
123469
|
fixed: comp.fixed || '',
|
|
123000
123470
|
minWidth: null,
|
|
123001
123471
|
width: null,
|
|
123002
|
-
sortable: !!comp.sortable
|
|
123472
|
+
sortable: !!comp.sortable,
|
|
123473
|
+
filterable: false,
|
|
123474
|
+
searchable: false
|
|
123003
123475
|
});
|
|
123004
123476
|
if (this.columnOrder.indexOf(comp._uid) === -1) {
|
|
123005
123477
|
this.columnOrder.push(comp._uid);
|
|
@@ -123015,6 +123487,10 @@ var NormalReportSlotView = {
|
|
|
123015
123487
|
if (this.columnStates[comp._uid]) {
|
|
123016
123488
|
this.$delete(this.columnStates, comp._uid);
|
|
123017
123489
|
}
|
|
123490
|
+
this.$delete(this.columnFilters, comp._uid);
|
|
123491
|
+
this.$delete(this.columnKeywords, comp._uid);
|
|
123492
|
+
this.$delete(this.columnSortOrders, comp._uid);
|
|
123493
|
+
this.$delete(this.filterOptionCache, comp._uid);
|
|
123018
123494
|
this.buildDefaultSnapshot();
|
|
123019
123495
|
},
|
|
123020
123496
|
// 重建默认列快照(注册顺序 + 列组件声明默认值)
|
|
@@ -123029,7 +123505,9 @@ var NormalReportSlotView = {
|
|
|
123029
123505
|
// 默认列最小宽度:resolvedMinWidth(显式 min-width > 显式 width > 按标题自动计算)
|
|
123030
123506
|
minWidth: comp.resolvedMinWidth,
|
|
123031
123507
|
// 默认是否显示排序功能
|
|
123032
|
-
sortable: !!comp.sortable
|
|
123508
|
+
sortable: !!comp.sortable,
|
|
123509
|
+
filterable: false,
|
|
123510
|
+
searchable: false
|
|
123033
123511
|
};
|
|
123034
123512
|
});
|
|
123035
123513
|
},
|
|
@@ -123305,6 +123783,14 @@ var NormalReportSlotView = {
|
|
|
123305
123783
|
var st = this.getHeaderMenuColumnState();
|
|
123306
123784
|
return st && st.sortable ? '取消显示排序按钮' : '显示排序按钮';
|
|
123307
123785
|
},
|
|
123786
|
+
getHeaderFilterMenuName: function getHeaderFilterMenuName() {
|
|
123787
|
+
var st = this.getHeaderMenuColumnState();
|
|
123788
|
+
return st && st.filterable ? '取消显示筛选功能' : '显示筛选功能';
|
|
123789
|
+
},
|
|
123790
|
+
getHeaderSearchMenuName: function getHeaderSearchMenuName() {
|
|
123791
|
+
var st = this.getHeaderMenuColumnState();
|
|
123792
|
+
return st && st.searchable ? '取消显示搜索功能' : '显示搜索功能';
|
|
123793
|
+
},
|
|
123308
123794
|
// 固定列菜单名称(固定在左侧/右侧,已固定时显示取消固定)
|
|
123309
123795
|
getHeaderFixMenuName: function getHeaderFixMenuName(side) {
|
|
123310
123796
|
var st = this.getHeaderMenuColumnState();
|
|
@@ -123319,6 +123805,10 @@ var NormalReportSlotView = {
|
|
|
123319
123805
|
if (uid == null) return;
|
|
123320
123806
|
if (menu.code === '__normal_report_header_sort') {
|
|
123321
123807
|
this.toggleHeaderColumnSort(uid);
|
|
123808
|
+
} else if (menu.code === '__normal_report_header_filter') {
|
|
123809
|
+
this.toggleHeaderColumnFlag(uid, 'filterable');
|
|
123810
|
+
} else if (menu.code === '__normal_report_header_search') {
|
|
123811
|
+
this.toggleHeaderColumnFlag(uid, 'searchable');
|
|
123322
123812
|
} else if (menu.code === '__normal_report_header_fix_left') {
|
|
123323
123813
|
this.toggleHeaderColumnFixed(uid, 'left');
|
|
123324
123814
|
} else if (menu.code === '__normal_report_header_fix_right') {
|
|
@@ -123332,6 +123822,7 @@ var NormalReportSlotView = {
|
|
|
123332
123822
|
var st = this.columnStates[uid];
|
|
123333
123823
|
if (!st) return;
|
|
123334
123824
|
this.$set(st, 'sortable', !st.sortable);
|
|
123825
|
+
if (!st.sortable) this.$delete(this.columnSortOrders, uid);
|
|
123335
123826
|
this.schedulePersistColumnConfig();
|
|
123336
123827
|
this.$nextTick(function () {
|
|
123337
123828
|
return _this13.applyColumnOrder();
|
|
@@ -123349,6 +123840,16 @@ var NormalReportSlotView = {
|
|
|
123349
123840
|
return _this14.applyColumnOrder();
|
|
123350
123841
|
});
|
|
123351
123842
|
},
|
|
123843
|
+
// 表头右键切换筛选或搜索。关掉时清掉该列当前条件,避免按钮消失后仍在过滤
|
|
123844
|
+
toggleHeaderColumnFlag: function toggleHeaderColumnFlag(uid, field) {
|
|
123845
|
+
var st = this.columnStates[uid];
|
|
123846
|
+
if (!st || field !== 'filterable' && field !== 'searchable') return;
|
|
123847
|
+
var next = !st[field];
|
|
123848
|
+
this.$set(st, field, next);
|
|
123849
|
+
if (!next && field === 'filterable') this.$delete(this.columnFilters, uid);
|
|
123850
|
+
if (!next && field === 'searchable') this.$delete(this.columnKeywords, uid);
|
|
123851
|
+
this.schedulePersistColumnConfig();
|
|
123852
|
+
},
|
|
123352
123853
|
// ===== 单元格编辑 =====
|
|
123353
123854
|
onEditActivated: function onEditActivated(params, evnt) {
|
|
123354
123855
|
this.$emit('edit-activated', params, evnt);
|
|
@@ -123370,7 +123871,7 @@ var NormalReportSlotView = {
|
|
|
123370
123871
|
if (!target || typeof target.closest !== 'function') return;
|
|
123371
123872
|
// 列宽拖拽手柄:vxe-table 3.24 起类名由 .vxe-resizable 更名为
|
|
123372
123873
|
// .vxe-table--resizable-col-bar(旧类名保留兼容,3.24 以下版本使用)
|
|
123373
|
-
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar')) return;
|
|
123874
|
+
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar, .nr-col-tool')) return;
|
|
123374
123875
|
var th = target.closest('.vxe-header--column');
|
|
123375
123876
|
if (!th) return;
|
|
123376
123877
|
var uid = this.parseColIdUid(th.getAttribute('colid'));
|
|
@@ -123607,10 +124108,262 @@ var NormalReportSlotView = {
|
|
|
123607
124108
|
xTable.recalculate && xTable.recalculate(true);
|
|
123608
124109
|
});
|
|
123609
124110
|
},
|
|
124111
|
+
// ===== 表头筛选 / 搜索 =====
|
|
124112
|
+
// 当前列已选的筛选值。未选表示不筛选
|
|
124113
|
+
columnFilterValue: function columnFilterValue(col) {
|
|
124114
|
+
var list = col && this.columnFilters[col.uid];
|
|
124115
|
+
return Array.isArray(list) ? list : [];
|
|
124116
|
+
},
|
|
124117
|
+
columnKeyword: function columnKeyword(col) {
|
|
124118
|
+
var text = col && this.columnKeywords[col.uid];
|
|
124119
|
+
return text == null ? '' : String(text);
|
|
124120
|
+
},
|
|
124121
|
+
columnFilterActive: function columnFilterActive(col) {
|
|
124122
|
+
return this.columnFilterValue(col).length > 0;
|
|
124123
|
+
},
|
|
124124
|
+
columnSearchActive: function columnSearchActive(col) {
|
|
124125
|
+
return this.columnKeyword(col).trim() !== '';
|
|
124126
|
+
},
|
|
124127
|
+
columnSortOrder: function columnSortOrder(col) {
|
|
124128
|
+
if (!col) return '';
|
|
124129
|
+
return this.columnSortOrders[col.uid] || '';
|
|
124130
|
+
},
|
|
124131
|
+
columnSortTitle: function columnSortTitle(col) {
|
|
124132
|
+
var order = this.columnSortOrder(col);
|
|
124133
|
+
if (order === 'asc') return '升序,点击切换为降序';
|
|
124134
|
+
if (order === 'desc') return '降序,点击取消排序';
|
|
124135
|
+
return '排序';
|
|
124136
|
+
},
|
|
124137
|
+
// 点击表头排序图标:未排序 → 升序 → 降序 → 取消。走 vxe 的排序,远程排序和 sort-change 保持原样
|
|
124138
|
+
toggleColumnSort: function toggleColumnSort(col, evnt) {
|
|
124139
|
+
var table = this.$refs.xTable;
|
|
124140
|
+
if (!table || !col || typeof table.getColumnById !== 'function' || typeof table.triggerSortEvent !== 'function') return;
|
|
124141
|
+
var column = table.getColumnById(col.colId);
|
|
124142
|
+
if (!column) return;
|
|
124143
|
+
var order = column.order;
|
|
124144
|
+
var next = order === 'asc' ? 'desc' : order === 'desc' ? null : 'asc';
|
|
124145
|
+
table.triggerSortEvent(evnt, column, next);
|
|
124146
|
+
},
|
|
124147
|
+
onSortChange: function onSortChange(params) {
|
|
124148
|
+
var _this19 = this;
|
|
124149
|
+
var list = params && params.sortList || [];
|
|
124150
|
+
var next = {};
|
|
124151
|
+
list.forEach(function (item) {
|
|
124152
|
+
var column = item && item.column;
|
|
124153
|
+
var uid = column ? _this19.parseColIdUid(column.id) : null;
|
|
124154
|
+
if (uid != null && item.order) next[uid] = item.order;
|
|
124155
|
+
});
|
|
124156
|
+
this.columnSortOrders = next;
|
|
124157
|
+
},
|
|
124158
|
+
setColumnFilter: function setColumnFilter(col, values) {
|
|
124159
|
+
if (!col) return;
|
|
124160
|
+
this.$set(this.columnFilters, col.uid, Array.isArray(values) ? values : []);
|
|
124161
|
+
},
|
|
124162
|
+
setColumnKeyword: function setColumnKeyword(col, value) {
|
|
124163
|
+
if (!col) return;
|
|
124164
|
+
this.$set(this.columnKeywords, col.uid, value == null ? '' : String(value));
|
|
124165
|
+
},
|
|
124166
|
+
columnFilterOptions: function columnFilterOptions(col) {
|
|
124167
|
+
if (!col) return [];
|
|
124168
|
+
var cached = this.filterOptionCache[col.uid];
|
|
124169
|
+
return Array.isArray(cached) ? cached : [];
|
|
124170
|
+
},
|
|
124171
|
+
// 打开筛选时按当前表格数据生成可选项,避免每次渲染都扫全表
|
|
124172
|
+
// 固定列会把表头再画一份,同一列的筛选/搜索控件会有多份。只操作当前看得见的那一份。
|
|
124173
|
+
visibleColumnTool: function visibleColumnTool(ref) {
|
|
124174
|
+
var list = Array.isArray(ref) ? ref : ref ? [ref] : [];
|
|
124175
|
+
for (var i = 0; i < list.length; i++) {
|
|
124176
|
+
var el = list[i] && list[i].$el;
|
|
124177
|
+
if (el && el.offsetWidth > 0 && el.offsetHeight > 0) return list[i];
|
|
124178
|
+
}
|
|
124179
|
+
return list[0] || null;
|
|
124180
|
+
},
|
|
124181
|
+
openColumnFilter: function openColumnFilter(col) {
|
|
124182
|
+
var _this20 = this;
|
|
124183
|
+
if (!col || !col.comp) return;
|
|
124184
|
+
this.$set(this.filterOptionCache, col.uid, this.buildColumnFilterOptions(col.comp));
|
|
124185
|
+
this.$nextTick(function () {
|
|
124186
|
+
var select = _this20.visibleColumnTool(_this20.$refs['colFilter' + col.uid]);
|
|
124187
|
+
if (select && typeof select.toggleMenu === 'function' && !select.visible) select.toggleMenu();
|
|
124188
|
+
});
|
|
124189
|
+
},
|
|
124190
|
+
focusColumnSearch: function focusColumnSearch(col) {
|
|
124191
|
+
var _this21 = this;
|
|
124192
|
+
this.$nextTick(function () {
|
|
124193
|
+
var input = _this21.visibleColumnTool(_this21.$refs['colSearch' + (col && col.uid)]);
|
|
124194
|
+
if (input && typeof input.focus === 'function') input.focus();
|
|
124195
|
+
});
|
|
124196
|
+
},
|
|
124197
|
+
// 单元格参与筛选、搜索的文本:自定义插槽的可见文字优先,其次格式化结果,最后是字段值
|
|
124198
|
+
columnCellText: function columnCellText(comp, row, index) {
|
|
124199
|
+
if (!comp) return '';
|
|
124200
|
+
if (comp.type === 'seq') return String(index + 1);
|
|
124201
|
+
var scope = {
|
|
124202
|
+
row: row,
|
|
124203
|
+
column: comp,
|
|
124204
|
+
$index: index,
|
|
124205
|
+
seq: index + 1
|
|
124206
|
+
};
|
|
124207
|
+
if (comp.$scopedSlots && typeof comp.$scopedSlots["default"] === 'function') {
|
|
124208
|
+
try {
|
|
124209
|
+
var text = vnodeText(comp.$scopedSlots["default"](scope)).replace(/\s+/g, ' ').trim();
|
|
124210
|
+
if (text) return text;
|
|
124211
|
+
} catch (e) {
|
|
124212
|
+
// 插槽取值失败时退回字段值
|
|
124213
|
+
}
|
|
124214
|
+
}
|
|
124215
|
+
if (typeof comp.formatter === 'function') {
|
|
124216
|
+
try {
|
|
124217
|
+
var _value = comp.formatter(scope);
|
|
124218
|
+
if (_value != null && StandardTablevue_type_script_lang_js_typeof(_value) !== 'object') {
|
|
124219
|
+
var _text2 = String(_value).trim();
|
|
124220
|
+
if (_text2) return _text2;
|
|
124221
|
+
}
|
|
124222
|
+
} catch (e) {
|
|
124223
|
+
// 格式化失败时退回字段值
|
|
124224
|
+
}
|
|
124225
|
+
}
|
|
124226
|
+
if (!comp.field || !row) return '';
|
|
124227
|
+
var value = row[comp.field];
|
|
124228
|
+
if (value == null || value === '' || StandardTablevue_type_script_lang_js_typeof(value) === 'object') return '';
|
|
124229
|
+
return String(value);
|
|
124230
|
+
},
|
|
124231
|
+
buildColumnFilterOptions: function buildColumnFilterOptions(comp) {
|
|
124232
|
+
var _this22 = this;
|
|
124233
|
+
var seen = Object.create(null);
|
|
124234
|
+
var options = [];
|
|
124235
|
+
this.visitColumnRows(this.tableData, function (row, index) {
|
|
124236
|
+
var text = _this22.columnCellText(comp, row, index);
|
|
124237
|
+
if (seen[text]) return;
|
|
124238
|
+
seen[text] = true;
|
|
124239
|
+
options.push({
|
|
124240
|
+
key: text === '' ? '__empty' : text,
|
|
124241
|
+
value: text,
|
|
124242
|
+
label: text === '' ? '(空)' : text
|
|
124243
|
+
});
|
|
124244
|
+
});
|
|
124245
|
+
options.sort(function (a, b) {
|
|
124246
|
+
return a.label.localeCompare(b.label, 'zh');
|
|
124247
|
+
});
|
|
124248
|
+
return options;
|
|
124249
|
+
},
|
|
124250
|
+
visitColumnRows: function visitColumnRows(rows, visitor) {
|
|
124251
|
+
var list = Array.isArray(rows) ? rows : [];
|
|
124252
|
+
var childrenKey = this.treeConfig && this.treeConfig.children || 'children';
|
|
124253
|
+
var _walk = function walk(nodes) {
|
|
124254
|
+
nodes.forEach(function (row, index) {
|
|
124255
|
+
if (!row) return;
|
|
124256
|
+
visitor(row, index);
|
|
124257
|
+
var children = row[childrenKey];
|
|
124258
|
+
if (Array.isArray(children) && children.length) _walk(children);
|
|
124259
|
+
});
|
|
124260
|
+
};
|
|
124261
|
+
_walk(list);
|
|
124262
|
+
},
|
|
124263
|
+
// 只收集真正会缩小结果的条件。开关打开但还没选值、没输入时不过滤
|
|
124264
|
+
buildColumnQueryChecks: function buildColumnQueryChecks() {
|
|
124265
|
+
var _this23 = this;
|
|
124266
|
+
var checks = [];
|
|
124267
|
+
var compMap = Object.create(null);
|
|
124268
|
+
this.columnComps.forEach(function (comp) {
|
|
124269
|
+
if (comp) compMap[comp._uid] = comp;
|
|
124270
|
+
});
|
|
124271
|
+
this.columnOrder.forEach(function (uid) {
|
|
124272
|
+
var st = _this23.columnStates[uid];
|
|
124273
|
+
var comp = compMap[uid];
|
|
124274
|
+
if (!st || st.visible === false || !comp) return;
|
|
124275
|
+
var selected = _this23.columnFilters[uid];
|
|
124276
|
+
if (st.filterable && Array.isArray(selected) && selected.length) {
|
|
124277
|
+
var set = Object.create(null);
|
|
124278
|
+
selected.forEach(function (value) {
|
|
124279
|
+
set[value] = true;
|
|
124280
|
+
});
|
|
124281
|
+
checks.push(function (row, index) {
|
|
124282
|
+
return !!set[_this23.columnCellText(comp, row, index)];
|
|
124283
|
+
});
|
|
124284
|
+
}
|
|
124285
|
+
var keyword = st.searchable && _this23.columnKeywords[uid] != null ? String(_this23.columnKeywords[uid]).trim().toLowerCase() : '';
|
|
124286
|
+
if (keyword) {
|
|
124287
|
+
checks.push(function (row, index) {
|
|
124288
|
+
return _this23.columnCellText(comp, row, index).toLowerCase().indexOf(keyword) >= 0;
|
|
124289
|
+
});
|
|
124290
|
+
}
|
|
124291
|
+
});
|
|
124292
|
+
return checks;
|
|
124293
|
+
},
|
|
124294
|
+
filterRowsByQuery: function filterRowsByQuery(rows, checks) {
|
|
124295
|
+
var match = function match(row, index) {
|
|
124296
|
+
return checks.every(function (check) {
|
|
124297
|
+
return check(row, index);
|
|
124298
|
+
});
|
|
124299
|
+
};
|
|
124300
|
+
var tree = this.treeConfig;
|
|
124301
|
+
if (tree && tree.transform) return this.filterTransformTree(rows, match, tree);
|
|
124302
|
+
var childrenKey = tree && tree.children || 'children';
|
|
124303
|
+
if (rows.some(function (row) {
|
|
124304
|
+
return row && Array.isArray(row[childrenKey]);
|
|
124305
|
+
})) {
|
|
124306
|
+
return this.filterNestedTree(rows, match, childrenKey);
|
|
124307
|
+
}
|
|
124308
|
+
return rows.filter(function (row, index) {
|
|
124309
|
+
return match(row, index);
|
|
124310
|
+
});
|
|
124311
|
+
},
|
|
124312
|
+
// 扁平树:命中的行保留,同时保留它的上级,避免子节点失去父级后无法显示
|
|
124313
|
+
filterTransformTree: function filterTransformTree(list, match, tree) {
|
|
124314
|
+
var rowField = tree.rowField || 'id';
|
|
124315
|
+
var parentField = tree.parentField || 'parentId';
|
|
124316
|
+
var byId = Object.create(null);
|
|
124317
|
+
var matched = [];
|
|
124318
|
+
list.forEach(function (row, index) {
|
|
124319
|
+
if (!row) return;
|
|
124320
|
+
byId[row[rowField]] = row;
|
|
124321
|
+
if (match(row, index)) matched.push(row[rowField]);
|
|
124322
|
+
});
|
|
124323
|
+
var keep = Object.create(null);
|
|
124324
|
+
matched.forEach(function (id) {
|
|
124325
|
+
var current = id;
|
|
124326
|
+
var guard = Object.create(null);
|
|
124327
|
+
while (current != null && current !== '' && !guard[current]) {
|
|
124328
|
+
guard[current] = true;
|
|
124329
|
+
keep[current] = true;
|
|
124330
|
+
var row = byId[current];
|
|
124331
|
+
if (!row) break;
|
|
124332
|
+
current = row[parentField];
|
|
124333
|
+
}
|
|
124334
|
+
});
|
|
124335
|
+
return list.filter(function (row) {
|
|
124336
|
+
return row && keep[row[rowField]];
|
|
124337
|
+
});
|
|
124338
|
+
},
|
|
124339
|
+
filterNestedTree: function filterNestedTree(list, match, childrenKey) {
|
|
124340
|
+
var _walk2 = function walk(nodes) {
|
|
124341
|
+
var out = [];
|
|
124342
|
+
nodes.forEach(function (row, index) {
|
|
124343
|
+
if (!row) return;
|
|
124344
|
+
var source = Array.isArray(row[childrenKey]) ? row[childrenKey] : null;
|
|
124345
|
+
var children = source ? _walk2(source) : null;
|
|
124346
|
+
if (match(row, index) || children && children.length) {
|
|
124347
|
+
if (source && children !== source) {
|
|
124348
|
+
var copy = {};
|
|
124349
|
+
Object.keys(row).forEach(function (key) {
|
|
124350
|
+
copy[key] = row[key];
|
|
124351
|
+
});
|
|
124352
|
+
copy[childrenKey] = children;
|
|
124353
|
+
out.push(copy);
|
|
124354
|
+
} else {
|
|
124355
|
+
out.push(row);
|
|
124356
|
+
}
|
|
124357
|
+
}
|
|
124358
|
+
});
|
|
124359
|
+
return out;
|
|
124360
|
+
};
|
|
124361
|
+
return _walk2(list);
|
|
124362
|
+
},
|
|
123610
124363
|
// ===== 列设置弹层 =====
|
|
123611
124364
|
// 打开列设置:以当前注册列生成工作副本(每次打开都重新初始化)
|
|
123612
124365
|
openColumnSetting: function openColumnSetting() {
|
|
123613
|
-
var
|
|
124366
|
+
var _this24 = this;
|
|
123614
124367
|
var compMap = {};
|
|
123615
124368
|
this.columnComps.forEach(function (comp) {
|
|
123616
124369
|
compMap[comp._uid] = comp;
|
|
@@ -123630,7 +124383,9 @@ var NormalReportSlotView = {
|
|
|
123630
124383
|
// 用户已设置值 > 列组件 resolvedMinWidth(显式 min-width / width / 按标题自动计算)
|
|
123631
124384
|
minWidth: st && st.minWidth != null ? st.minWidth : comp.resolvedMinWidth,
|
|
123632
124385
|
// 是否显示排序功能:用户已设置值 > 列组件声明
|
|
123633
|
-
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable
|
|
124386
|
+
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
124387
|
+
filterable: !!(st && st.filterable),
|
|
124388
|
+
searchable: !!(st && st.searchable)
|
|
123634
124389
|
};
|
|
123635
124390
|
}).filter(Boolean);
|
|
123636
124391
|
this.dragColField = '';
|
|
@@ -123638,7 +124393,7 @@ var NormalReportSlotView = {
|
|
|
123638
124393
|
// 列标题宽度:按最长列名称计算(中文 25px/字 + 英文 15px/字 + 30px 余量),
|
|
123639
124394
|
// 各列标题统一按该宽度显示,保证输入框与按钮对齐
|
|
123640
124395
|
this.columnTitleWidth = this.columnDraft.reduce(function (max, c) {
|
|
123641
|
-
return Math.max(max,
|
|
124396
|
+
return Math.max(max, _this24.calcColumnTitleWidth(c.title));
|
|
123642
124397
|
}, 0);
|
|
123643
124398
|
},
|
|
123644
124399
|
// 计算单个列标题的显示宽度(px):中文 25px/字 + 英文 15px/字 + 30px 余量
|
|
@@ -123677,6 +124432,12 @@ var NormalReportSlotView = {
|
|
|
123677
124432
|
toggleColumnSortable: function toggleColumnSortable(col) {
|
|
123678
124433
|
col.sortable = !col.sortable;
|
|
123679
124434
|
},
|
|
124435
|
+
toggleColumnFilterable: function toggleColumnFilterable(col) {
|
|
124436
|
+
col.filterable = !col.filterable;
|
|
124437
|
+
},
|
|
124438
|
+
toggleColumnSearchable: function toggleColumnSearchable(col) {
|
|
124439
|
+
col.searchable = !col.searchable;
|
|
124440
|
+
},
|
|
123680
124441
|
// 上下移一列
|
|
123681
124442
|
moveColumnDraft: function moveColumnDraft(index, direction) {
|
|
123682
124443
|
var target = index + direction;
|
|
@@ -123730,24 +124491,29 @@ var NormalReportSlotView = {
|
|
|
123730
124491
|
},
|
|
123731
124492
|
// 确认:将面板副本应用到列状态并刷新表格
|
|
123732
124493
|
confirmColumnSetting: function confirmColumnSetting() {
|
|
123733
|
-
var
|
|
124494
|
+
var _this25 = this;
|
|
123734
124495
|
var order = [];
|
|
123735
124496
|
this.columnDraft.forEach(function (d) {
|
|
123736
|
-
var prev =
|
|
123737
|
-
|
|
124497
|
+
var prev = _this25.columnStates[d.uid] || {};
|
|
124498
|
+
_this25.$set(_this25.columnStates, d.uid, {
|
|
123738
124499
|
visible: d.visible,
|
|
123739
124500
|
fixed: d.fixed || '',
|
|
123740
124501
|
minWidth: d.minWidth != null ? d.minWidth : null,
|
|
123741
124502
|
width: prev.width != null ? prev.width : null,
|
|
123742
|
-
sortable: !!d.sortable
|
|
124503
|
+
sortable: !!d.sortable,
|
|
124504
|
+
filterable: !!d.filterable,
|
|
124505
|
+
searchable: !!d.searchable
|
|
123743
124506
|
});
|
|
124507
|
+
if (!d.filterable) _this25.$delete(_this25.columnFilters, d.uid);
|
|
124508
|
+
if (!d.searchable) _this25.$delete(_this25.columnKeywords, d.uid);
|
|
124509
|
+
if (!d.sortable) _this25.$delete(_this25.columnSortOrders, d.uid);
|
|
123744
124510
|
order.push(d.uid);
|
|
123745
124511
|
});
|
|
123746
124512
|
this.columnOrder = order;
|
|
123747
124513
|
this.columnSettingVisible = false;
|
|
123748
124514
|
this.persistColumnConfigNow();
|
|
123749
124515
|
this.$nextTick(function () {
|
|
123750
|
-
|
|
124516
|
+
_this25.applyColumnOrder();
|
|
123751
124517
|
});
|
|
123752
124518
|
},
|
|
123753
124519
|
// ===== 表头配置持久化 =====
|
|
@@ -123777,12 +124543,12 @@ var NormalReportSlotView = {
|
|
|
123777
124543
|
},
|
|
123778
124544
|
// 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度
|
|
123779
124545
|
scheduleInitialLayout: function scheduleInitialLayout() {
|
|
123780
|
-
var
|
|
124546
|
+
var _this26 = this;
|
|
123781
124547
|
this.$nextTick(function () {
|
|
123782
|
-
|
|
124548
|
+
_this26.resizeRecalculate();
|
|
123783
124549
|
if (typeof requestAnimationFrame === 'function') {
|
|
123784
124550
|
requestAnimationFrame(function () {
|
|
123785
|
-
return
|
|
124551
|
+
return _this26.resizeRecalculate();
|
|
123786
124552
|
});
|
|
123787
124553
|
}
|
|
123788
124554
|
});
|
|
@@ -123800,10 +124566,11 @@ var NormalReportSlotView = {
|
|
|
123800
124566
|
this.columnConfigReady = !!getColumnModuleCode() && !!tableCode && !this.columnConfigDisabled;
|
|
123801
124567
|
this.columnsReady = true;
|
|
123802
124568
|
this.scheduleInitialLayout();
|
|
123803
|
-
|
|
124569
|
+
// 加载完成前已经直接改过表头时,同样等 3 秒再保存,避免和后续拖拽各打一次接口
|
|
124570
|
+
if (this.columnConfigDirty) this.schedulePersistColumnConfig();
|
|
123804
124571
|
},
|
|
123805
124572
|
bootstrapColumnConfig: function bootstrapColumnConfig() {
|
|
123806
|
-
var
|
|
124573
|
+
var _this27 = this;
|
|
123807
124574
|
var tableCode = this.resolveTableCode();
|
|
123808
124575
|
if (!tableCode) {
|
|
123809
124576
|
this.finishColumnConfigLoad();
|
|
@@ -123841,36 +124608,22 @@ var NormalReportSlotView = {
|
|
|
123841
124608
|
this.finishColumnConfigLoad();
|
|
123842
124609
|
return;
|
|
123843
124610
|
}
|
|
124611
|
+
var columns = readCachedColumnLayout(moduleCode, pageCode, tableCode);
|
|
123844
124612
|
var api = getColumnConfigApi();
|
|
123845
|
-
if (!api || typeof api.
|
|
123846
|
-
console.warn('[StandardTable] 未注入 request
|
|
124613
|
+
if (!api || typeof api.save !== 'function') {
|
|
124614
|
+
console.warn('[StandardTable] 未注入 request,表头配置不会保存');
|
|
123847
124615
|
this.columnConfigDisabled = true;
|
|
123848
|
-
this.finishColumnConfigLoad();
|
|
123849
|
-
return;
|
|
123850
124616
|
}
|
|
123851
|
-
this.
|
|
123852
|
-
if (
|
|
123853
|
-
if (_this22.$message) _this22.$message.warning('表头配置加载超时,已使用默认列');
|
|
123854
|
-
_this22.finishColumnConfigLoad();
|
|
123855
|
-
}, 3000);
|
|
123856
|
-
Promise.resolve(api.get(moduleCode, pageCode, tableCode)).then(function (res) {
|
|
123857
|
-
var datas = readColumnConfigDatas(res);
|
|
123858
|
-
var columns = readSavedColumns(datas);
|
|
123859
|
-
_this22.finishColumnConfigLoad(function () {
|
|
123860
|
-
if (columns && columns.length) _this22.applyMergedColumnConfig(columns);
|
|
123861
|
-
});
|
|
123862
|
-
})["catch"](function (err) {
|
|
123863
|
-
if (_this22.columnConfigSettled) return;
|
|
123864
|
-
if (_this22.$message) _this22.$message.warning(err && err.message || '表头配置加载失败,已使用默认列');
|
|
123865
|
-
_this22.finishColumnConfigLoad();
|
|
124617
|
+
this.finishColumnConfigLoad(function () {
|
|
124618
|
+
if (columns && columns.length) _this27.applyMergedColumnConfig(columns);
|
|
123866
124619
|
});
|
|
123867
124620
|
},
|
|
123868
124621
|
applyMergedColumnConfig: function applyMergedColumnConfig(savedColumns) {
|
|
123869
|
-
var
|
|
124622
|
+
var _this28 = this;
|
|
123870
124623
|
var merged = mergeColumnConfig(this.columnComps, savedColumns);
|
|
123871
124624
|
if (!merged) return;
|
|
123872
124625
|
merged.states.forEach(function (item) {
|
|
123873
|
-
|
|
124626
|
+
_this28.$set(_this28.columnStates, item.uid, item.state);
|
|
123874
124627
|
});
|
|
123875
124628
|
this.columnOrder = merged.order;
|
|
123876
124629
|
},
|
|
@@ -123886,15 +124639,17 @@ var NormalReportSlotView = {
|
|
|
123886
124639
|
this.$set(st, 'width', Math.min(width, 2000));
|
|
123887
124640
|
this.schedulePersistColumnConfig();
|
|
123888
124641
|
},
|
|
124642
|
+
// 直接改表头(拖列宽、拖换列、右键改排序或固定)时防抖:停手 3 秒后才保存。
|
|
124643
|
+
// 「调整」弹层点确认走 persistColumnConfigNow,不经过这里。
|
|
123889
124644
|
schedulePersistColumnConfig: function schedulePersistColumnConfig() {
|
|
123890
|
-
var
|
|
124645
|
+
var _this29 = this;
|
|
123891
124646
|
this.columnConfigDirty = true;
|
|
123892
124647
|
if (!this.columnConfigReady) return;
|
|
123893
124648
|
if (this.columnConfigSaveTimer) clearTimeout(this.columnConfigSaveTimer);
|
|
123894
124649
|
this.columnConfigSaveTimer = setTimeout(function () {
|
|
123895
|
-
|
|
123896
|
-
|
|
123897
|
-
},
|
|
124650
|
+
_this29.columnConfigSaveTimer = null;
|
|
124651
|
+
_this29.persistColumnConfig();
|
|
124652
|
+
}, 3000);
|
|
123898
124653
|
},
|
|
123899
124654
|
persistColumnConfigNow: function persistColumnConfigNow() {
|
|
123900
124655
|
this.columnConfigDirty = true;
|
|
@@ -123905,7 +124660,7 @@ var NormalReportSlotView = {
|
|
|
123905
124660
|
this.persistColumnConfig();
|
|
123906
124661
|
},
|
|
123907
124662
|
persistColumnConfig: function persistColumnConfig() {
|
|
123908
|
-
var
|
|
124663
|
+
var _this30 = this;
|
|
123909
124664
|
if (!this.columnConfigReady || this.columnConfigDisabled) return;
|
|
123910
124665
|
var api = getColumnConfigApi();
|
|
123911
124666
|
if (!api) return;
|
|
@@ -123919,10 +124674,11 @@ var NormalReportSlotView = {
|
|
|
123919
124674
|
if (!request) return;
|
|
123920
124675
|
Promise.resolve(request).then(function (res) {
|
|
123921
124676
|
readColumnConfigDatas(res);
|
|
124677
|
+
if (useReset) removeCachedColumnLayout(moduleCode, pageCode, tableCode);else updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns);
|
|
123922
124678
|
var content = res && res.data && res.data.Content || res && res.Content || '表头配置保存成功';
|
|
123923
|
-
if (
|
|
124679
|
+
if (_this30.$message) _this30.$message.success(content);
|
|
123924
124680
|
})["catch"](function (err) {
|
|
123925
|
-
if (
|
|
124681
|
+
if (_this30.$message) _this30.$message.error(err && err.message || '表头配置保存失败');
|
|
123926
124682
|
});
|
|
123927
124683
|
}
|
|
123928
124684
|
}
|
|
@@ -123944,8 +124700,8 @@ var StandardTablevue_type_style_index_0_prod_lang_scss_external = __webpack_requ
|
|
|
123944
124700
|
|
|
123945
124701
|
var StandardTable_component = normalizeComponent(
|
|
123946
124702
|
components_StandardTablevue_type_script_lang_js,
|
|
123947
|
-
|
|
123948
|
-
|
|
124703
|
+
StandardTablevue_type_template_id_d9620728_render,
|
|
124704
|
+
StandardTablevue_type_template_id_d9620728_staticRenderFns,
|
|
123949
124705
|
false,
|
|
123950
124706
|
null,
|
|
123951
124707
|
null,
|