@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
|
@@ -3132,12 +3132,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3132
3132
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
3133
3133
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6314);
|
|
3134
3134
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
3135
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4417);
|
|
3136
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
3135
3137
|
// Imports
|
|
3136
3138
|
|
|
3137
3139
|
|
|
3140
|
+
|
|
3141
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(9793), __webpack_require__.b);
|
|
3138
3142
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
3143
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
3139
3144
|
// Module
|
|
3140
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-table-panel{flex:1 1 0%;min-width:0;min-height:0;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);height:100%;overflow:hidden;display:flex;flex-direction:column}.normal-report-table-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 12px}.normal-report-table-wrap .el-table,.normal-report-table-wrap .vxe-table{flex:1;min-height:0}.normal-report-table-actions{flex-shrink:0;display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #edf1f6;margin-bottom:10px}.normal-report-table-actions .el-button+.el-button{margin-left:0}.normal-report-table-actions-left{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.normal-report-table-actions-right{flex-shrink:0;margin-left:auto;display:flex;align-items:center;gap:6px}.standard-toolbar-left,.standard-toolbar-query,.standard-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0}.standard-toolbar-left .el-button+.el-button,.standard-toolbar-query .el-button+.el-button,.standard-toolbar-right .el-button+.el-button{margin-left:0}.normal-report-column-setting-entry,.normal-report-column-setting-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.normal-report-column-setting{min-width:270px}.normal-report-column-setting-header{padding-bottom:8px;border-bottom:1px solid #ebeef5}.normal-report-column-setting-list{max-height:300px;overflow-y:auto;padding:4px 0}.normal-report-column-setting-item{display:flex;align-items:center;gap:2px;padding:5px 4px;border-radius:4px}.normal-report-column-setting-item .el-checkbox{flex:1;min-width:0;margin-right:0;display:flex;align-items:center}.normal-report-column-setting-item .el-checkbox__input{display:flex;align-items:center;flex-shrink:0}.normal-report-column-setting-item .normal-report-column-setting-item-title{cursor:grab}.normal-report-column-setting-item .normal-report-column-setting-item-title:active{cursor:grabbing}.normal-report-column-setting-item .el-checkbox,.normal-report-column-setting-item .el-checkbox__label{-webkit-user-select:none;-moz-user-select:none;user-select:none}.normal-report-column-setting-item .normal-report-column-setting-item-title .el-checkbox__label{flex-shrink:0;width:var(--normal-report-title-width);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.normal-report-column-setting-item .normal-report-column-setting-item-width{flex-shrink:0;width:92px}.normal-report-column-setting-item .el-button+.el-button{margin-left:0}.normal-report-column-setting-item .is-pinned{color:#409eff}.normal-report-column-setting-item .is-sort-off,.normal-report-column-setting-item .is-sort-off:focus,.normal-report-column-setting-item .is-sort-off:hover{color:#c0c4cc}.normal-report-column-setting-item.drag-over{background:#ecf5ff}.normal-report-column-setting-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}.normal-report-table-footer{flex-shrink:0;box-sizing:border-box;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:8px 12px;border-top:1px solid #edf1f6}.normal-report-table-footer .normal-report-table-pagination{padding-top:0}.normal-report-table-footer.is-only-pagination{justify-content:flex-end}.normal-report-footer-empty{margin-top:10px}.normal-report-toolbar-empty{margin-bottom:10px}.normal-report-update-time{font-size:13px;color:#909399;flex-shrink:0}.vxe-table--context-menu-wrapper .vxe-context-menu--option-wrapper+.vxe-context-menu--option-wrapper,.vxe-table--context-menu-wrapper .vxe-table--context-menu-group-wrapper+.vxe-table--context-menu-group-wrapper{border-top:1px solid #e8eaec;margin-top:2px;padding-top:2px}.normal-report-table-pagination{flex-shrink:0;padding-top:10px;text-align:right}.normal-report-op-more{margin-left:10px}.normal-report-main-table.vxe-table .vxe-body--row{transition:transform .22s ease,filter .22s ease}.normal-report-main-table.vxe-table .vxe-body--row:hover{transform:translateY(-3px);filter:drop-shadow(0 8px 16px rgba(31,73,125,.22))}.vxe-table--footer-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--footer-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:active{background-color:#dddee0!important}.vxe-table--footer-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--body-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb:active,.vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover{background-color:#dddee0!important}.vxe-table--body-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table .vxe-header--row{height:36px!important}.vxe-table .vxe-header--column{padding:0!important;color:#636364!important;font-weight:600!important;font-size:13px!important;background-color:#f5f7fa!important}.vxe-table .vxe-header--column,.vxe-table .vxe-header--column>.vxe-cell{height:36px!important;max-height:36px!important;line-height:36px!important}.vxe-table .vxe-header--column>.vxe-cell{padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-body--row{height:34px!important}.vxe-table .vxe-body--row td.vxe-body--column{font-size:12px!important}.vxe-table .vxe-body--column>.vxe-cell,.vxe-table .vxe-body--row td.vxe-body--column{height:34px!important;max-height:34px!important;line-height:34px!important;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-tree-cell{display:flex;align-items:center;height:34px;line-height:34px;overflow:hidden}.vxe-table .vxe-body--column .el-tag--mini{height:26px;line-height:24px;padding:0 4px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column .el-button--mini{height:26px;line-height:24px;padding:0 2px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column.col--active>.vxe-cell{overflow:visible!important;line-height:normal!important}.vxe-table .vxe-body--column.col--active .el-input,.vxe-table .vxe-body--column.col--active .el-input__inner,.vxe-table .vxe-body--column.col--active .vxe-default-input,.vxe-table .vxe-body--column.col--active .vxe-default-select,.vxe-table .vxe-body--column.col--active .vxe-default-textarea,.vxe-table .vxe-body--column.col--active .vxe-input{width:100%;height:34px!important;max-height:34px!important;line-height:32px!important;font-size:12px!important;box-sizing:border-box}.vxe-header--column.nr-header-drag-source{opacity:.45}.vxe-header--column.nr-header-drag-target{background-color:rgba(64,158,255,.08);box-shadow:inset 2px 0 0 #409eff}body.nr-header-dragging{-webkit-user-select:none;-moz-user-select:none;user-select:none}body.nr-header-dragging .vxe-header--column{cursor:grab}`, ""]);
|
|
3145
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-table-panel{flex:1 1 0%;min-width:0;min-height:0;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);height:100%;overflow:hidden;display:flex;flex-direction:column}.normal-report-table-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 12px}.normal-report-table-wrap .el-table,.normal-report-table-wrap .vxe-table{flex:1;min-height:0}.normal-report-table-actions{flex-shrink:0;display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #edf1f6;margin-bottom:10px}.normal-report-table-actions .el-button+.el-button{margin-left:0}.normal-report-table-actions-left{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.normal-report-table-actions-right{flex-shrink:0;margin-left:auto;display:flex;align-items:center;gap:6px}.standard-toolbar-left,.standard-toolbar-query,.standard-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0}.standard-toolbar-left .el-button+.el-button,.standard-toolbar-query .el-button+.el-button,.standard-toolbar-right .el-button+.el-button{margin-left:0}.normal-report-column-setting-entry,.normal-report-column-setting-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.normal-report-column-setting{min-width:270px}.normal-report-column-setting-header{padding-bottom:8px;border-bottom:1px solid #ebeef5}.normal-report-column-setting-list{max-height:300px;overflow-y:auto;padding:4px 0}.normal-report-column-setting-item{display:flex;align-items:center;gap:2px;padding:5px 4px;border-radius:4px}.normal-report-column-setting-item .el-checkbox{flex:1;min-width:0;margin-right:0;display:flex;align-items:center}.normal-report-column-setting-item .el-checkbox__input{display:flex;align-items:center;flex-shrink:0}.normal-report-column-setting-item .normal-report-column-setting-item-title{cursor:grab}.normal-report-column-setting-item .normal-report-column-setting-item-title:active{cursor:grabbing}.normal-report-column-setting-item .el-checkbox,.normal-report-column-setting-item .el-checkbox__label{-webkit-user-select:none;-moz-user-select:none;user-select:none}.normal-report-column-setting-item .normal-report-column-setting-item-title .el-checkbox__label{flex-shrink:0;width:var(--normal-report-title-width);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.normal-report-column-setting-item .normal-report-column-setting-item-width{flex-shrink:0;width:92px}.normal-report-column-setting-item .el-button+.el-button{margin-left:0}.normal-report-column-setting-item .is-pinned{color:#409eff}.normal-report-column-setting-item .is-sort-off,.normal-report-column-setting-item .is-sort-off:focus,.normal-report-column-setting-item .is-sort-off:hover{color:#c0c4cc}.normal-report-column-setting-item.drag-over{background:#ecf5ff}.normal-report-column-setting-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}.normal-report-table-footer{flex-shrink:0;box-sizing:border-box;min-height:49px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:8px 12px;border-top:1px solid #edf1f6}.normal-report-table-footer .normal-report-table-pagination{padding-top:0}.normal-report-table-footer.is-only-pagination{justify-content:flex-end}.normal-report-footer-empty{margin-top:10px}.normal-report-toolbar-empty{margin-bottom:10px}.normal-report-update-time{font-size:13px;color:#909399;flex-shrink:0}.vxe-table--context-menu-wrapper .vxe-context-menu--option-wrapper+.vxe-context-menu--option-wrapper,.vxe-table--context-menu-wrapper .vxe-table--context-menu-group-wrapper+.vxe-table--context-menu-group-wrapper{border-top:1px solid #e8eaec;margin-top:2px;padding-top:2px}.normal-report-table-pagination{flex-shrink:0;padding-top:10px;text-align:right}.normal-report-op-more{margin-left:10px}.normal-report-main-table.vxe-table .vxe-body--row{transition:transform .22s ease,filter .22s ease}.normal-report-main-table.vxe-table .vxe-body--row:hover{transform:translateY(-3px);filter:drop-shadow(0 8px 16px rgba(31,73,125,.22))}.vxe-table--footer-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--footer-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8!important}.vxe-table--footer-wrapper::-webkit-scrollbar-thumb:active{background-color:#dddee0!important}.vxe-table--footer-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar{width:8px!important;height:8px!important}.vxe-table--body-wrapper::-webkit-scrollbar-track{background-color:#fff!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb{background-color:#dddee0!important;border-radius:5px!important;border:1px solid #f1f1f1!important}.vxe-table--body-wrapper::-webkit-scrollbar-thumb:active,.vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover{background-color:#dddee0!important}.vxe-table--body-wrapper::-webkit-scrollbar-corner{background-color:#fff!important}.vxe-table .vxe-header--row{height:36px!important}.vxe-table .vxe-header--column{padding:0!important;color:#636364!important;font-weight:600!important;font-size:13px!important;background-color:#f5f7fa!important}.vxe-table .vxe-header--column,.vxe-table .vxe-header--column>.vxe-cell{height:36px!important;max-height:36px!important;line-height:36px!important}.vxe-table .vxe-header--column>.vxe-cell{display:flex;align-items:center;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-body--row{height:34px!important}.vxe-table .vxe-body--row td.vxe-body--column{font-size:12px!important}.vxe-table .vxe-body--column>.vxe-cell,.vxe-table .vxe-body--row td.vxe-body--column{height:34px!important;max-height:34px!important;line-height:34px!important;padding-top:0!important;padding-bottom:0!important}.vxe-table .vxe-tree-cell{display:flex;align-items:center;height:34px;line-height:34px;overflow:hidden}.vxe-table .vxe-body--column .el-tag--mini{height:26px;line-height:24px;padding:0 4px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column .el-button--mini{height:26px;line-height:24px;padding:0 2px;font-size:12px;vertical-align:middle}.vxe-table .vxe-body--column.col--active>.vxe-cell{overflow:visible!important;line-height:normal!important}.vxe-table .vxe-body--column.col--active .el-input,.vxe-table .vxe-body--column.col--active .el-input__inner,.vxe-table .vxe-body--column.col--active .vxe-default-input,.vxe-table .vxe-body--column.col--active .vxe-default-select,.vxe-table .vxe-body--column.col--active .vxe-default-textarea,.vxe-table .vxe-body--column.col--active .vxe-input{width:100%;height:34px!important;max-height:34px!important;line-height:32px!important;font-size:12px!important;box-sizing:border-box}.vxe-header--column.nr-header-drag-source{opacity:.45}.vxe-header--column.nr-header-drag-target{background-color:rgba(64,158,255,.08);box-shadow:inset 2px 0 0 #409eff}body.nr-header-dragging{-webkit-user-select:none;-moz-user-select:none;user-select:none}body.nr-header-dragging .vxe-header--column{cursor:grab}.nr-icon-filter{display:inline-block;width:14px;height:14px;background-color:currentColor;vertical-align:-2px;-webkit-mask:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) center/contain no-repeat;mask:url(${___CSS_LOADER_URL_REPLACEMENT_0___}) center/contain no-repeat}.normal-report-column-setting-item .nr-icon-filter{width:12px;height:12px;vertical-align:middle}.normal-report-main-table .vxe-cell--sort{display:none}.normal-report-main-table .vxe-cell--title:has(.nr-col-title){display:flex;flex:1;min-width:0}.normal-report-main-table .nr-col-title{display:flex;align-items:center;width:100%;min-width:0;height:100%;line-height:1}.normal-report-main-table .nr-col-title-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;line-height:36px}.normal-report-main-table .nr-col-tools{display:inline-flex;align-items:center;flex:none;gap:4px;margin-left:auto;padding-left:4px}.normal-report-main-table .nr-col-tool{flex-shrink:0;cursor:pointer;color:#909399;font-size:13px;line-height:1}.normal-report-main-table .nr-col-tool.is-active,.normal-report-main-table .nr-col-tool.is-active:hover{color:#409eff}.normal-report-main-table .nr-col-tool.nr-icon-filter{width:13px;height:13px}.nr-col-tool-popper{padding:10px 12px}.nr-col-filter-select{display:block;width:220px}.nr-col-search-input{width:200px}`, ""]);
|
|
3141
3146
|
// Exports
|
|
3142
3147
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
3143
3148
|
|
|
@@ -3265,6 +3270,39 @@ module.exports = function (cssWithMappingToString) {
|
|
|
3265
3270
|
|
|
3266
3271
|
/***/ },
|
|
3267
3272
|
|
|
3273
|
+
/***/ 4417
|
|
3274
|
+
(module) {
|
|
3275
|
+
|
|
3276
|
+
"use strict";
|
|
3277
|
+
|
|
3278
|
+
|
|
3279
|
+
module.exports = function (url, options) {
|
|
3280
|
+
if (!options) {
|
|
3281
|
+
options = {};
|
|
3282
|
+
}
|
|
3283
|
+
if (!url) {
|
|
3284
|
+
return url;
|
|
3285
|
+
}
|
|
3286
|
+
url = String(url.__esModule ? url.default : url);
|
|
3287
|
+
|
|
3288
|
+
// If url is already wrapped in quotes, remove them
|
|
3289
|
+
if (/^['"].*['"]$/.test(url)) {
|
|
3290
|
+
url = url.slice(1, -1);
|
|
3291
|
+
}
|
|
3292
|
+
if (options.hash) {
|
|
3293
|
+
url += options.hash;
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
// Should url be wrapped?
|
|
3297
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
|
3298
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
|
3299
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
3300
|
+
}
|
|
3301
|
+
return url;
|
|
3302
|
+
};
|
|
3303
|
+
|
|
3304
|
+
/***/ },
|
|
3305
|
+
|
|
3268
3306
|
/***/ 1601
|
|
3269
3307
|
(module) {
|
|
3270
3308
|
|
|
@@ -118141,6 +118179,14 @@ VxeUI.setTheme('light');
|
|
|
118141
118179
|
|
|
118142
118180
|
|
|
118143
118181
|
|
|
118182
|
+
/***/ },
|
|
118183
|
+
|
|
118184
|
+
/***/ 9793
|
|
118185
|
+
(module) {
|
|
118186
|
+
|
|
118187
|
+
"use strict";
|
|
118188
|
+
module.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M1 2h14L9.8 8.2V14l-3.6-1.4V8.2z%27/%3E%3C/svg%3E";
|
|
118189
|
+
|
|
118144
118190
|
/***/ },
|
|
118145
118191
|
|
|
118146
118192
|
/***/ 4100
|
|
@@ -118258,6 +118304,27 @@ module.exports = require("vue");
|
|
|
118258
118304
|
/******/ return module;
|
|
118259
118305
|
/******/ };
|
|
118260
118306
|
/******/
|
|
118307
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
118308
|
+
/******/ (() => {
|
|
118309
|
+
/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
|
|
118310
|
+
/******/
|
|
118311
|
+
/******/ // no installed chunks
|
|
118312
|
+
/******/
|
|
118313
|
+
/******/ // no chunk on demand loading
|
|
118314
|
+
/******/
|
|
118315
|
+
/******/ // no prefetching
|
|
118316
|
+
/******/
|
|
118317
|
+
/******/ // no preloaded
|
|
118318
|
+
/******/
|
|
118319
|
+
/******/ // no HMR
|
|
118320
|
+
/******/
|
|
118321
|
+
/******/ // no HMR manifest
|
|
118322
|
+
/******/
|
|
118323
|
+
/******/ // no on chunks loaded
|
|
118324
|
+
/******/
|
|
118325
|
+
/******/ // no jsonp function
|
|
118326
|
+
/******/ })();
|
|
118327
|
+
/******/
|
|
118261
118328
|
/************************************************************************/
|
|
118262
118329
|
let __webpack_exports__ = {};
|
|
118263
118330
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
@@ -121522,8 +121589,8 @@ var StandardTimePick_component = normalizeComponent(
|
|
|
121522
121589
|
)
|
|
121523
121590
|
|
|
121524
121591
|
/* harmony default export */ const StandardTimePick = (StandardTimePick_component.exports);
|
|
121525
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=template&id=
|
|
121526
|
-
var
|
|
121592
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/index.vue?vue&type=template&id=d9620728
|
|
121593
|
+
var StandardTablevue_type_template_id_d9620728_render = function render() {
|
|
121527
121594
|
var _vm = this,
|
|
121528
121595
|
_c = _vm._self._c;
|
|
121529
121596
|
return _c('section', {
|
|
@@ -121680,6 +121747,39 @@ var StandardTablevue_type_template_id_b1d59d54_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_b1d59d54_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_b1d59d54_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_b1d59d54_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_b1d59d54_render = function render() {
|
|
|
121858
122089
|
}
|
|
121859
122090
|
}) : _vm.getFooterEmptyVisible() ? _c('standard-footer-empty') : _vm._e()], 1);
|
|
121860
122091
|
};
|
|
121861
|
-
var
|
|
122092
|
+
var StandardTablevue_type_template_id_d9620728_staticRenderFns = [];
|
|
121862
122093
|
|
|
121863
122094
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardTable/ToolbarEmpty.vue?vue&type=script&lang=js
|
|
121864
122095
|
/**
|
|
@@ -121950,9 +122181,9 @@ var FooterEmpty_component = normalizeComponent(
|
|
|
121950
122181
|
* 表头配置接口。路径固定,请求方法由业务项目注入。
|
|
121951
122182
|
* IP 和端口来自该请求方法自己的 baseURL,组件库不保存主机地址。
|
|
121952
122183
|
*/
|
|
121953
|
-
var GET_CONFIG = '/api/
|
|
121954
|
-
var SAVE_CONFIG = '/api/
|
|
121955
|
-
var RESET_CONFIG = '/api/
|
|
122184
|
+
var GET_CONFIG = '/api/SYS/UserTableColumn/GetUserTableConfig';
|
|
122185
|
+
var SAVE_CONFIG = '/api/SYS/UserTableColumn/SaveUserTableConfig';
|
|
122186
|
+
var RESET_CONFIG = '/api/SYS/UserTableColumn/ResetUserTableConfig';
|
|
121956
122187
|
var columnConfigApi = null;
|
|
121957
122188
|
var columnModuleCode = '';
|
|
121958
122189
|
|
|
@@ -121964,15 +122195,11 @@ function setColumnConfigRequest(request) {
|
|
|
121964
122195
|
return;
|
|
121965
122196
|
}
|
|
121966
122197
|
columnConfigApi = {
|
|
121967
|
-
|
|
122198
|
+
// 一次取当前用户的全部表头。表格渲染不调用它,由业务程序写入本地 TableSetting
|
|
122199
|
+
get: function get() {
|
|
121968
122200
|
return request({
|
|
121969
122201
|
url: GET_CONFIG,
|
|
121970
|
-
method: 'get'
|
|
121971
|
-
params: {
|
|
121972
|
-
moduleCode: moduleCode,
|
|
121973
|
-
pageCode: pageCode,
|
|
121974
|
-
tableCode: tableCode
|
|
121975
|
-
}
|
|
122202
|
+
method: 'get'
|
|
121976
122203
|
});
|
|
121977
122204
|
},
|
|
121978
122205
|
save: function save(moduleCode, pageCode, tableCode, columns) {
|
|
@@ -122027,6 +122254,9 @@ function releaseTableCode(moduleCode, pageCode, tableCode, owner) {
|
|
|
122027
122254
|
if (tableCodeOwners[key] === owner) delete tableCodeOwners[key];
|
|
122028
122255
|
}
|
|
122029
122256
|
;// ./src/components/StandardTable/columnPersist.js
|
|
122257
|
+
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; }
|
|
122258
|
+
function columnPersist_toPropertyKey(t) { var i = columnPersist_toPrimitive(t, "string"); return "symbol" == columnPersist_typeof(i) ? i : i + ""; }
|
|
122259
|
+
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); }
|
|
122030
122260
|
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); }
|
|
122031
122261
|
/**
|
|
122032
122262
|
* 表头配置的列主键、合并和提交数据。
|
|
@@ -122068,7 +122298,9 @@ function readSavedColumn(item) {
|
|
|
122068
122298
|
fixed: item.Fixed != null ? item.Fixed : item.fixed,
|
|
122069
122299
|
minWidth: item.MinWidth !== undefined ? item.MinWidth : item.minWidth,
|
|
122070
122300
|
width: item.Width !== undefined ? item.Width : item.width,
|
|
122071
|
-
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
|
|
122072
122304
|
};
|
|
122073
122305
|
}
|
|
122074
122306
|
function savedFixed(value) {
|
|
@@ -122179,7 +122411,9 @@ function mergeColumnConfig(comps, savedColumns) {
|
|
|
122179
122411
|
fixed: savedFixed(row.saved.fixed),
|
|
122180
122412
|
minWidth: savedMinWidth(row.saved.minWidth),
|
|
122181
122413
|
width: savedWidth(row.saved.width),
|
|
122182
|
-
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
|
|
122183
122417
|
}
|
|
122184
122418
|
});
|
|
122185
122419
|
});
|
|
@@ -122209,7 +122443,9 @@ function buildColumnPayload(comps, order, states) {
|
|
|
122209
122443
|
Fixed: savedFixed(st.fixed),
|
|
122210
122444
|
MinWidth: savedMinWidth(st.minWidth),
|
|
122211
122445
|
Width: savedWidth(st.width),
|
|
122212
|
-
Sortable: !!st.sortable
|
|
122446
|
+
Sortable: !!st.sortable,
|
|
122447
|
+
Filterable: !!st.filterable,
|
|
122448
|
+
Searchable: !!st.searchable
|
|
122213
122449
|
});
|
|
122214
122450
|
});
|
|
122215
122451
|
return columns;
|
|
@@ -122228,6 +122464,8 @@ function isDefaultColumnPayload(comps, columns) {
|
|
|
122228
122464
|
if (col.Visible !== true) return false;
|
|
122229
122465
|
if ((col.Fixed || '') !== (comp.fixed || '')) return false;
|
|
122230
122466
|
if (!!col.Sortable !== !!comp.sortable) return false;
|
|
122467
|
+
if (!!col.Filterable) return false;
|
|
122468
|
+
if (!!col.Searchable) return false;
|
|
122231
122469
|
if (col.Width != null) return false;
|
|
122232
122470
|
if (col.MinWidth != null && Number(col.MinWidth) !== Number(comp.resolvedMinWidth)) return false;
|
|
122233
122471
|
}
|
|
@@ -122252,11 +122490,167 @@ function readColumnConfigDatas(res) {
|
|
|
122252
122490
|
var content = res && res.data && res.data.Content;
|
|
122253
122491
|
throw new Error(content || '表头配置请求失败');
|
|
122254
122492
|
}
|
|
122493
|
+
|
|
122494
|
+
// 其它程序把 GetConfig 的响应写入 localStorage.TableSetting。键为「模块/页面/表格」,值为 CLAYOUT 原文。
|
|
122495
|
+
var TABLE_SETTING_STORE = 'TableSetting';
|
|
122496
|
+
function buildColumnSettingKey(moduleCode, pageCode, tableCode) {
|
|
122497
|
+
return moduleCode + '/' + pageCode + '/' + tableCode;
|
|
122498
|
+
}
|
|
122499
|
+
function readTableSettingRoot() {
|
|
122500
|
+
if (typeof window === 'undefined' || !window.localStorage) return {
|
|
122501
|
+
missing: true
|
|
122502
|
+
};
|
|
122503
|
+
try {
|
|
122504
|
+
var raw = window.localStorage.getItem(TABLE_SETTING_STORE);
|
|
122505
|
+
if (raw == null || raw === '') return {
|
|
122506
|
+
missing: true
|
|
122507
|
+
};
|
|
122508
|
+
var root = JSON.parse(raw);
|
|
122509
|
+
// 个别调用方会把已经 stringify 过的响应再存一次
|
|
122510
|
+
if (typeof root === 'string') root = JSON.parse(root);
|
|
122511
|
+
return {
|
|
122512
|
+
missing: false,
|
|
122513
|
+
root: root
|
|
122514
|
+
};
|
|
122515
|
+
} catch (e) {
|
|
122516
|
+
console.warn('[StandardTable] TableSetting 解析失败');
|
|
122517
|
+
return {
|
|
122518
|
+
invalid: true
|
|
122519
|
+
};
|
|
122520
|
+
}
|
|
122521
|
+
}
|
|
122522
|
+
function writeTableSettingRoot(root) {
|
|
122523
|
+
window.localStorage.setItem(TABLE_SETTING_STORE, JSON.stringify(root));
|
|
122524
|
+
}
|
|
122525
|
+
|
|
122526
|
+
// 响应可能整包存入,也可能只存 Datas。沿 code/data/Datas 找到字典数组。
|
|
122527
|
+
function findLayoutArray(node, depth) {
|
|
122528
|
+
if (depth > 5 || node == null) return null;
|
|
122529
|
+
if (Array.isArray(node)) {
|
|
122530
|
+
if (!node.length || node.every(function (item) {
|
|
122531
|
+
return item && columnPersist_typeof(item) === 'object' && !Array.isArray(item);
|
|
122532
|
+
})) return node;
|
|
122533
|
+
return null;
|
|
122534
|
+
}
|
|
122535
|
+
if (columnPersist_typeof(node) !== 'object') return null;
|
|
122536
|
+
var fields = ['Datas', 'datas', 'data'];
|
|
122537
|
+
for (var i = 0; i < fields.length; i++) {
|
|
122538
|
+
if (!Object.prototype.hasOwnProperty.call(node, fields[i])) continue;
|
|
122539
|
+
var found = findLayoutArray(node[fields[i]], depth + 1);
|
|
122540
|
+
if (found) return found;
|
|
122541
|
+
}
|
|
122542
|
+
return null;
|
|
122543
|
+
}
|
|
122544
|
+
function isFlatLayoutMap(node) {
|
|
122545
|
+
if (!node || columnPersist_typeof(node) !== 'object' || Array.isArray(node)) return false;
|
|
122546
|
+
return Object.keys(node).some(function (key) {
|
|
122547
|
+
return key.indexOf('/') >= 0;
|
|
122548
|
+
});
|
|
122549
|
+
}
|
|
122550
|
+
|
|
122551
|
+
// Datas 为 null 的成功响应,补一个空数组后再写入,避免改掉外层结构
|
|
122552
|
+
function ensureLayoutArray(root) {
|
|
122553
|
+
var list = findLayoutArray(root, 0);
|
|
122554
|
+
if (list) return list;
|
|
122555
|
+
if (!root || columnPersist_typeof(root) !== 'object' || Array.isArray(root)) return null;
|
|
122556
|
+
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;
|
|
122557
|
+
if (!holder) return null;
|
|
122558
|
+
var field = 'datas' in holder && !('Datas' in holder) ? 'datas' : 'Datas';
|
|
122559
|
+
holder[field] = [];
|
|
122560
|
+
return holder[field];
|
|
122561
|
+
}
|
|
122562
|
+
|
|
122563
|
+
// CLAYOUT 是列数组的 JSON 字符串。兼容已解析的数组,以及旧的 { Columns } 结构。
|
|
122564
|
+
function parseLayoutColumns(value) {
|
|
122565
|
+
var data = value;
|
|
122566
|
+
for (var i = 0; i < 2 && typeof data === 'string'; i++) {
|
|
122567
|
+
var text = data.trim();
|
|
122568
|
+
if (!text) return null;
|
|
122569
|
+
try {
|
|
122570
|
+
data = JSON.parse(text);
|
|
122571
|
+
} catch (e) {
|
|
122572
|
+
return null;
|
|
122573
|
+
}
|
|
122574
|
+
}
|
|
122575
|
+
if (Array.isArray(data)) return data;
|
|
122576
|
+
if (data && columnPersist_typeof(data) === 'object') {
|
|
122577
|
+
var columns = data.Columns != null ? data.Columns : data.columns;
|
|
122578
|
+
if (Array.isArray(columns)) return columns;
|
|
122579
|
+
}
|
|
122580
|
+
return null;
|
|
122581
|
+
}
|
|
122582
|
+
function layoutJson(columns) {
|
|
122583
|
+
return JSON.stringify(Array.isArray(columns) ? columns : []);
|
|
122584
|
+
}
|
|
122585
|
+
function readCachedColumnLayout(moduleCode, pageCode, tableCode) {
|
|
122586
|
+
var stored = readTableSettingRoot();
|
|
122587
|
+
if (stored.missing || stored.invalid) return null;
|
|
122588
|
+
var key = buildColumnSettingKey(moduleCode, pageCode, tableCode);
|
|
122589
|
+
var list = findLayoutArray(stored.root, 0);
|
|
122590
|
+
if (list) {
|
|
122591
|
+
for (var i = list.length - 1; i >= 0; i--) {
|
|
122592
|
+
var item = list[i];
|
|
122593
|
+
if (item && Object.prototype.hasOwnProperty.call(item, key)) return parseLayoutColumns(item[key]);
|
|
122594
|
+
}
|
|
122595
|
+
return null;
|
|
122596
|
+
}
|
|
122597
|
+
if (isFlatLayoutMap(stored.root) && Object.prototype.hasOwnProperty.call(stored.root, key)) {
|
|
122598
|
+
return parseLayoutColumns(stored.root[key]);
|
|
122599
|
+
}
|
|
122600
|
+
return null;
|
|
122601
|
+
}
|
|
122602
|
+
function updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns) {
|
|
122603
|
+
var key = buildColumnSettingKey(moduleCode, pageCode, tableCode);
|
|
122604
|
+
var value = layoutJson(columns);
|
|
122605
|
+
var stored = readTableSettingRoot();
|
|
122606
|
+
if (stored.invalid) return;
|
|
122607
|
+
if (stored.missing) {
|
|
122608
|
+
writeTableSettingRoot([columnPersist_defineProperty({}, key, value)]);
|
|
122609
|
+
return;
|
|
122610
|
+
}
|
|
122611
|
+
var list = ensureLayoutArray(stored.root);
|
|
122612
|
+
if (list) {
|
|
122613
|
+
var hit = null;
|
|
122614
|
+
for (var i = 0; i < list.length; i++) {
|
|
122615
|
+
if (list[i] && Object.prototype.hasOwnProperty.call(list[i], key)) hit = list[i];
|
|
122616
|
+
}
|
|
122617
|
+
if (hit) hit[key] = value;else list.push(columnPersist_defineProperty({}, key, value));
|
|
122618
|
+
writeTableSettingRoot(stored.root);
|
|
122619
|
+
return;
|
|
122620
|
+
}
|
|
122621
|
+
if (isFlatLayoutMap(stored.root)) {
|
|
122622
|
+
stored.root[key] = value;
|
|
122623
|
+
writeTableSettingRoot(stored.root);
|
|
122624
|
+
return;
|
|
122625
|
+
}
|
|
122626
|
+
console.warn('[StandardTable] TableSetting 结构无法识别,未更新本地表头配置');
|
|
122627
|
+
}
|
|
122628
|
+
function removeCachedColumnLayout(moduleCode, pageCode, tableCode) {
|
|
122629
|
+
var key = buildColumnSettingKey(moduleCode, pageCode, tableCode);
|
|
122630
|
+
var stored = readTableSettingRoot();
|
|
122631
|
+
if (stored.missing || stored.invalid) return;
|
|
122632
|
+
var list = findLayoutArray(stored.root, 0);
|
|
122633
|
+
if (list) {
|
|
122634
|
+
for (var i = list.length - 1; i >= 0; i--) {
|
|
122635
|
+
var item = list[i];
|
|
122636
|
+
if (!item || !Object.prototype.hasOwnProperty.call(item, key)) continue;
|
|
122637
|
+
delete item[key];
|
|
122638
|
+
if (!Object.keys(item).length) list.splice(i, 1);
|
|
122639
|
+
}
|
|
122640
|
+
writeTableSettingRoot(stored.root);
|
|
122641
|
+
return;
|
|
122642
|
+
}
|
|
122643
|
+
if (isFlatLayoutMap(stored.root) && Object.prototype.hasOwnProperty.call(stored.root, key)) {
|
|
122644
|
+
delete stored.root[key];
|
|
122645
|
+
writeTableSettingRoot(stored.root);
|
|
122646
|
+
}
|
|
122647
|
+
}
|
|
122255
122648
|
;// ./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/index.vue?vue&type=script&lang=js
|
|
122256
122649
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
122257
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."); }
|
|
122258
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; } }
|
|
122259
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); }
|
|
122260
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(); }
|
|
122261
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."); }
|
|
122262
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; } }
|
|
@@ -122290,6 +122684,41 @@ function formatDateTime(date) {
|
|
|
122290
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()));
|
|
122291
122685
|
}
|
|
122292
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
|
+
|
|
122293
122722
|
/**
|
|
122294
122723
|
* 单元格渲染分发组件(组件内部使用,不对外暴露):
|
|
122295
122724
|
* vxe-table 3.x 的列只能通过 <vxe-column> 子组件 + 作用域插槽声明,
|
|
@@ -122573,7 +123002,20 @@ var NormalReportSlotView = {
|
|
|
122573
123002
|
columnConfigDirty: false,
|
|
122574
123003
|
columnConfigSettled: false,
|
|
122575
123004
|
columnConfigTimer: null,
|
|
122576
|
-
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: {}
|
|
122577
123019
|
};
|
|
122578
123020
|
},
|
|
122579
123021
|
computed: {
|
|
@@ -122650,7 +123092,7 @@ var NormalReportSlotView = {
|
|
|
122650
123092
|
// 实际生效的右键菜单配置:
|
|
122651
123093
|
// 优先取 menuConfig prop(自定义模式);
|
|
122652
123094
|
// 否则自动生成:body 第一栏“复制” + 第二栏操作列按钮菜单项(tableOperation 为空时仅“复制”一栏);
|
|
122653
|
-
// header
|
|
123095
|
+
// header 为表头右键菜单(排序 / 筛选 / 搜索 / 固定在左侧 / 固定在右侧);
|
|
122654
123096
|
// 单元格右键菜单默认关闭:showContextMenu=false 时 body 无菜单项,
|
|
122655
123097
|
// 且不阻止浏览器默认右键菜单(显示浏览器原生菜单),表头菜单不受影响
|
|
122656
123098
|
resolvedMenuConfig: function resolvedMenuConfig() {
|
|
@@ -122689,6 +123131,20 @@ var NormalReportSlotView = {
|
|
|
122689
123131
|
},
|
|
122690
123132
|
prefixIcon: 'el-icon-sort',
|
|
122691
123133
|
__isHeaderMenu: true
|
|
123134
|
+
}, {
|
|
123135
|
+
code: '__normal_report_header_filter',
|
|
123136
|
+
name: function name() {
|
|
123137
|
+
return _this.getHeaderFilterMenuName();
|
|
123138
|
+
},
|
|
123139
|
+
prefixIcon: 'nr-icon-filter',
|
|
123140
|
+
__isHeaderMenu: true
|
|
123141
|
+
}, {
|
|
123142
|
+
code: '__normal_report_header_search',
|
|
123143
|
+
name: function name() {
|
|
123144
|
+
return _this.getHeaderSearchMenuName();
|
|
123145
|
+
},
|
|
123146
|
+
prefixIcon: 'el-icon-search',
|
|
123147
|
+
__isHeaderMenu: true
|
|
122692
123148
|
}, {
|
|
122693
123149
|
code: '__normal_report_header_fix_left',
|
|
122694
123150
|
name: function name() {
|
|
@@ -122738,6 +123194,9 @@ var NormalReportSlotView = {
|
|
|
122738
123194
|
align: comp.align,
|
|
122739
123195
|
// 是否显示排序功能:优先取列设置弹层设置的值,未设置时取列组件声明
|
|
122740
123196
|
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
123197
|
+
// 筛选、搜索只来自用户配置,代码列默认不显示
|
|
123198
|
+
filterable: !!(st && st.filterable),
|
|
123199
|
+
searchable: !!(st && st.searchable),
|
|
122741
123200
|
showOverflow: comp.showOverflow,
|
|
122742
123201
|
resizable: comp.resizable,
|
|
122743
123202
|
// 编辑:edit-render 优先;editable 默认文本输入;仅有 #edit 插槽时用空配置打开编辑
|
|
@@ -122760,11 +123219,9 @@ var NormalReportSlotView = {
|
|
|
122760
123219
|
var baseKey = c.field || c.type || '__normal_report_uid_' + c.uid;
|
|
122761
123220
|
var isSeq = c.type === 'seq';
|
|
122762
123221
|
return {
|
|
122763
|
-
// key 中追加 sortable/fixed:vxe-table 3.x
|
|
122764
|
-
//
|
|
122765
|
-
|
|
122766
|
-
// <vxe-column>,使表头排序图标与固定列分组实时更新
|
|
122767
|
-
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || ''),
|
|
123222
|
+
// key 中追加 sortable/fixed/filter/search:vxe-table 3.x 在列创建时固化表头渲染,
|
|
123223
|
+
// 并把当时的插槽函数记在列上。仅改状态不会刷新表头按钮,纳入 key 后强制重建列
|
|
123224
|
+
key: baseKey + '|sort=' + (c.sortable ? 1 : 0) + '|fix=' + (c.fixed || '') + '|filter=' + (c.filterable ? 1 : 0) + '|search=' + (c.searchable ? 1 : 0),
|
|
122768
123225
|
// 列唯一主键(vxe-table col-id → ColumnInfo.id / 表头 th 的 colid 属性):
|
|
122769
123226
|
// 内嵌组件列 uid,用于表头右键菜单与拖拽换列时把 vxe 列映射回组件列;
|
|
122770
123227
|
// 内置列(多选框/操作列)不传 col-id,由 vxe 自动生成普通 id
|
|
@@ -122782,6 +123239,9 @@ var NormalReportSlotView = {
|
|
|
122782
123239
|
fixed: c.fixed || undefined,
|
|
122783
123240
|
align: c.align,
|
|
122784
123241
|
sortable: !!c.sortable,
|
|
123242
|
+
filterable: !!c.filterable,
|
|
123243
|
+
searchable: !!c.searchable,
|
|
123244
|
+
uid: c.uid,
|
|
122785
123245
|
// 序号列排序:按行在原始数据中的索引排序(升序恢复原始顺序,降序反向)
|
|
122786
123246
|
sortBy: isSeq ? function (_ref) {
|
|
122787
123247
|
var row = _ref.row;
|
|
@@ -122837,12 +123297,20 @@ var NormalReportSlotView = {
|
|
|
122837
123297
|
return col.editRender;
|
|
122838
123298
|
});
|
|
122839
123299
|
return editable ? this.defaultEditConfig : null;
|
|
123300
|
+
},
|
|
123301
|
+
// 按已启用列的筛选值和搜索关键字过滤。没有条件时返回原数组,避免表格无故重绘
|
|
123302
|
+
displayTableData: function displayTableData() {
|
|
123303
|
+
var rows = Array.isArray(this.tableData) ? this.tableData : [];
|
|
123304
|
+
var checks = this.buildColumnQueryChecks();
|
|
123305
|
+
if (!checks.length) return rows;
|
|
123306
|
+
return this.filterRowsByQuery(rows, checks);
|
|
122840
123307
|
}
|
|
122841
123308
|
},
|
|
122842
123309
|
watch: {
|
|
122843
123310
|
// 表格数据变化时自动刷新“数据更新时间”
|
|
122844
123311
|
tableData: function tableData() {
|
|
122845
123312
|
this.updateTime = formatDateTime(new Date());
|
|
123313
|
+
this.filterOptionCache = {};
|
|
122846
123314
|
}
|
|
122847
123315
|
},
|
|
122848
123316
|
created: function created() {
|
|
@@ -122863,9 +123331,11 @@ var NormalReportSlotView = {
|
|
|
122863
123331
|
clearTimeout(this.columnConfigTimer);
|
|
122864
123332
|
this.columnConfigTimer = null;
|
|
122865
123333
|
}
|
|
123334
|
+
// 直接改表头的保存还在 3 秒防抖里,离开页面时把最后一次调整写回去
|
|
122866
123335
|
if (this.columnConfigSaveTimer) {
|
|
122867
123336
|
clearTimeout(this.columnConfigSaveTimer);
|
|
122868
123337
|
this.columnConfigSaveTimer = null;
|
|
123338
|
+
this.persistColumnConfig();
|
|
122869
123339
|
}
|
|
122870
123340
|
this.releaseColumnConfigClaim();
|
|
122871
123341
|
this.destroyResizeObserver();
|
|
@@ -122989,7 +123459,9 @@ var NormalReportSlotView = {
|
|
|
122989
123459
|
fixed: comp.fixed || '',
|
|
122990
123460
|
minWidth: null,
|
|
122991
123461
|
width: null,
|
|
122992
|
-
sortable: !!comp.sortable
|
|
123462
|
+
sortable: !!comp.sortable,
|
|
123463
|
+
filterable: false,
|
|
123464
|
+
searchable: false
|
|
122993
123465
|
});
|
|
122994
123466
|
if (this.columnOrder.indexOf(comp._uid) === -1) {
|
|
122995
123467
|
this.columnOrder.push(comp._uid);
|
|
@@ -123005,6 +123477,10 @@ var NormalReportSlotView = {
|
|
|
123005
123477
|
if (this.columnStates[comp._uid]) {
|
|
123006
123478
|
this.$delete(this.columnStates, comp._uid);
|
|
123007
123479
|
}
|
|
123480
|
+
this.$delete(this.columnFilters, comp._uid);
|
|
123481
|
+
this.$delete(this.columnKeywords, comp._uid);
|
|
123482
|
+
this.$delete(this.columnSortOrders, comp._uid);
|
|
123483
|
+
this.$delete(this.filterOptionCache, comp._uid);
|
|
123008
123484
|
this.buildDefaultSnapshot();
|
|
123009
123485
|
},
|
|
123010
123486
|
// 重建默认列快照(注册顺序 + 列组件声明默认值)
|
|
@@ -123019,7 +123495,9 @@ var NormalReportSlotView = {
|
|
|
123019
123495
|
// 默认列最小宽度:resolvedMinWidth(显式 min-width > 显式 width > 按标题自动计算)
|
|
123020
123496
|
minWidth: comp.resolvedMinWidth,
|
|
123021
123497
|
// 默认是否显示排序功能
|
|
123022
|
-
sortable: !!comp.sortable
|
|
123498
|
+
sortable: !!comp.sortable,
|
|
123499
|
+
filterable: false,
|
|
123500
|
+
searchable: false
|
|
123023
123501
|
};
|
|
123024
123502
|
});
|
|
123025
123503
|
},
|
|
@@ -123295,6 +123773,14 @@ var NormalReportSlotView = {
|
|
|
123295
123773
|
var st = this.getHeaderMenuColumnState();
|
|
123296
123774
|
return st && st.sortable ? '取消显示排序按钮' : '显示排序按钮';
|
|
123297
123775
|
},
|
|
123776
|
+
getHeaderFilterMenuName: function getHeaderFilterMenuName() {
|
|
123777
|
+
var st = this.getHeaderMenuColumnState();
|
|
123778
|
+
return st && st.filterable ? '取消显示筛选功能' : '显示筛选功能';
|
|
123779
|
+
},
|
|
123780
|
+
getHeaderSearchMenuName: function getHeaderSearchMenuName() {
|
|
123781
|
+
var st = this.getHeaderMenuColumnState();
|
|
123782
|
+
return st && st.searchable ? '取消显示搜索功能' : '显示搜索功能';
|
|
123783
|
+
},
|
|
123298
123784
|
// 固定列菜单名称(固定在左侧/右侧,已固定时显示取消固定)
|
|
123299
123785
|
getHeaderFixMenuName: function getHeaderFixMenuName(side) {
|
|
123300
123786
|
var st = this.getHeaderMenuColumnState();
|
|
@@ -123309,6 +123795,10 @@ var NormalReportSlotView = {
|
|
|
123309
123795
|
if (uid == null) return;
|
|
123310
123796
|
if (menu.code === '__normal_report_header_sort') {
|
|
123311
123797
|
this.toggleHeaderColumnSort(uid);
|
|
123798
|
+
} else if (menu.code === '__normal_report_header_filter') {
|
|
123799
|
+
this.toggleHeaderColumnFlag(uid, 'filterable');
|
|
123800
|
+
} else if (menu.code === '__normal_report_header_search') {
|
|
123801
|
+
this.toggleHeaderColumnFlag(uid, 'searchable');
|
|
123312
123802
|
} else if (menu.code === '__normal_report_header_fix_left') {
|
|
123313
123803
|
this.toggleHeaderColumnFixed(uid, 'left');
|
|
123314
123804
|
} else if (menu.code === '__normal_report_header_fix_right') {
|
|
@@ -123322,6 +123812,7 @@ var NormalReportSlotView = {
|
|
|
123322
123812
|
var st = this.columnStates[uid];
|
|
123323
123813
|
if (!st) return;
|
|
123324
123814
|
this.$set(st, 'sortable', !st.sortable);
|
|
123815
|
+
if (!st.sortable) this.$delete(this.columnSortOrders, uid);
|
|
123325
123816
|
this.schedulePersistColumnConfig();
|
|
123326
123817
|
this.$nextTick(function () {
|
|
123327
123818
|
return _this13.applyColumnOrder();
|
|
@@ -123339,6 +123830,16 @@ var NormalReportSlotView = {
|
|
|
123339
123830
|
return _this14.applyColumnOrder();
|
|
123340
123831
|
});
|
|
123341
123832
|
},
|
|
123833
|
+
// 表头右键切换筛选或搜索。关掉时清掉该列当前条件,避免按钮消失后仍在过滤
|
|
123834
|
+
toggleHeaderColumnFlag: function toggleHeaderColumnFlag(uid, field) {
|
|
123835
|
+
var st = this.columnStates[uid];
|
|
123836
|
+
if (!st || field !== 'filterable' && field !== 'searchable') return;
|
|
123837
|
+
var next = !st[field];
|
|
123838
|
+
this.$set(st, field, next);
|
|
123839
|
+
if (!next && field === 'filterable') this.$delete(this.columnFilters, uid);
|
|
123840
|
+
if (!next && field === 'searchable') this.$delete(this.columnKeywords, uid);
|
|
123841
|
+
this.schedulePersistColumnConfig();
|
|
123842
|
+
},
|
|
123342
123843
|
// ===== 单元格编辑 =====
|
|
123343
123844
|
onEditActivated: function onEditActivated(params, evnt) {
|
|
123344
123845
|
this.$emit('edit-activated', params, evnt);
|
|
@@ -123360,7 +123861,7 @@ var NormalReportSlotView = {
|
|
|
123360
123861
|
if (!target || typeof target.closest !== 'function') return;
|
|
123361
123862
|
// 列宽拖拽手柄:vxe-table 3.24 起类名由 .vxe-resizable 更名为
|
|
123362
123863
|
// .vxe-table--resizable-col-bar(旧类名保留兼容,3.24 以下版本使用)
|
|
123363
|
-
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar')) return;
|
|
123864
|
+
if (target.closest('.vxe-resizable, .vxe-table--resizable-col-bar, .nr-col-tool')) return;
|
|
123364
123865
|
var th = target.closest('.vxe-header--column');
|
|
123365
123866
|
if (!th) return;
|
|
123366
123867
|
var uid = this.parseColIdUid(th.getAttribute('colid'));
|
|
@@ -123597,10 +124098,262 @@ var NormalReportSlotView = {
|
|
|
123597
124098
|
xTable.recalculate && xTable.recalculate(true);
|
|
123598
124099
|
});
|
|
123599
124100
|
},
|
|
124101
|
+
// ===== 表头筛选 / 搜索 =====
|
|
124102
|
+
// 当前列已选的筛选值。未选表示不筛选
|
|
124103
|
+
columnFilterValue: function columnFilterValue(col) {
|
|
124104
|
+
var list = col && this.columnFilters[col.uid];
|
|
124105
|
+
return Array.isArray(list) ? list : [];
|
|
124106
|
+
},
|
|
124107
|
+
columnKeyword: function columnKeyword(col) {
|
|
124108
|
+
var text = col && this.columnKeywords[col.uid];
|
|
124109
|
+
return text == null ? '' : String(text);
|
|
124110
|
+
},
|
|
124111
|
+
columnFilterActive: function columnFilterActive(col) {
|
|
124112
|
+
return this.columnFilterValue(col).length > 0;
|
|
124113
|
+
},
|
|
124114
|
+
columnSearchActive: function columnSearchActive(col) {
|
|
124115
|
+
return this.columnKeyword(col).trim() !== '';
|
|
124116
|
+
},
|
|
124117
|
+
columnSortOrder: function columnSortOrder(col) {
|
|
124118
|
+
if (!col) return '';
|
|
124119
|
+
return this.columnSortOrders[col.uid] || '';
|
|
124120
|
+
},
|
|
124121
|
+
columnSortTitle: function columnSortTitle(col) {
|
|
124122
|
+
var order = this.columnSortOrder(col);
|
|
124123
|
+
if (order === 'asc') return '升序,点击切换为降序';
|
|
124124
|
+
if (order === 'desc') return '降序,点击取消排序';
|
|
124125
|
+
return '排序';
|
|
124126
|
+
},
|
|
124127
|
+
// 点击表头排序图标:未排序 → 升序 → 降序 → 取消。走 vxe 的排序,远程排序和 sort-change 保持原样
|
|
124128
|
+
toggleColumnSort: function toggleColumnSort(col, evnt) {
|
|
124129
|
+
var table = this.$refs.xTable;
|
|
124130
|
+
if (!table || !col || typeof table.getColumnById !== 'function' || typeof table.triggerSortEvent !== 'function') return;
|
|
124131
|
+
var column = table.getColumnById(col.colId);
|
|
124132
|
+
if (!column) return;
|
|
124133
|
+
var order = column.order;
|
|
124134
|
+
var next = order === 'asc' ? 'desc' : order === 'desc' ? null : 'asc';
|
|
124135
|
+
table.triggerSortEvent(evnt, column, next);
|
|
124136
|
+
},
|
|
124137
|
+
onSortChange: function onSortChange(params) {
|
|
124138
|
+
var _this19 = this;
|
|
124139
|
+
var list = params && params.sortList || [];
|
|
124140
|
+
var next = {};
|
|
124141
|
+
list.forEach(function (item) {
|
|
124142
|
+
var column = item && item.column;
|
|
124143
|
+
var uid = column ? _this19.parseColIdUid(column.id) : null;
|
|
124144
|
+
if (uid != null && item.order) next[uid] = item.order;
|
|
124145
|
+
});
|
|
124146
|
+
this.columnSortOrders = next;
|
|
124147
|
+
},
|
|
124148
|
+
setColumnFilter: function setColumnFilter(col, values) {
|
|
124149
|
+
if (!col) return;
|
|
124150
|
+
this.$set(this.columnFilters, col.uid, Array.isArray(values) ? values : []);
|
|
124151
|
+
},
|
|
124152
|
+
setColumnKeyword: function setColumnKeyword(col, value) {
|
|
124153
|
+
if (!col) return;
|
|
124154
|
+
this.$set(this.columnKeywords, col.uid, value == null ? '' : String(value));
|
|
124155
|
+
},
|
|
124156
|
+
columnFilterOptions: function columnFilterOptions(col) {
|
|
124157
|
+
if (!col) return [];
|
|
124158
|
+
var cached = this.filterOptionCache[col.uid];
|
|
124159
|
+
return Array.isArray(cached) ? cached : [];
|
|
124160
|
+
},
|
|
124161
|
+
// 打开筛选时按当前表格数据生成可选项,避免每次渲染都扫全表
|
|
124162
|
+
// 固定列会把表头再画一份,同一列的筛选/搜索控件会有多份。只操作当前看得见的那一份。
|
|
124163
|
+
visibleColumnTool: function visibleColumnTool(ref) {
|
|
124164
|
+
var list = Array.isArray(ref) ? ref : ref ? [ref] : [];
|
|
124165
|
+
for (var i = 0; i < list.length; i++) {
|
|
124166
|
+
var el = list[i] && list[i].$el;
|
|
124167
|
+
if (el && el.offsetWidth > 0 && el.offsetHeight > 0) return list[i];
|
|
124168
|
+
}
|
|
124169
|
+
return list[0] || null;
|
|
124170
|
+
},
|
|
124171
|
+
openColumnFilter: function openColumnFilter(col) {
|
|
124172
|
+
var _this20 = this;
|
|
124173
|
+
if (!col || !col.comp) return;
|
|
124174
|
+
this.$set(this.filterOptionCache, col.uid, this.buildColumnFilterOptions(col.comp));
|
|
124175
|
+
this.$nextTick(function () {
|
|
124176
|
+
var select = _this20.visibleColumnTool(_this20.$refs['colFilter' + col.uid]);
|
|
124177
|
+
if (select && typeof select.toggleMenu === 'function' && !select.visible) select.toggleMenu();
|
|
124178
|
+
});
|
|
124179
|
+
},
|
|
124180
|
+
focusColumnSearch: function focusColumnSearch(col) {
|
|
124181
|
+
var _this21 = this;
|
|
124182
|
+
this.$nextTick(function () {
|
|
124183
|
+
var input = _this21.visibleColumnTool(_this21.$refs['colSearch' + (col && col.uid)]);
|
|
124184
|
+
if (input && typeof input.focus === 'function') input.focus();
|
|
124185
|
+
});
|
|
124186
|
+
},
|
|
124187
|
+
// 单元格参与筛选、搜索的文本:自定义插槽的可见文字优先,其次格式化结果,最后是字段值
|
|
124188
|
+
columnCellText: function columnCellText(comp, row, index) {
|
|
124189
|
+
if (!comp) return '';
|
|
124190
|
+
if (comp.type === 'seq') return String(index + 1);
|
|
124191
|
+
var scope = {
|
|
124192
|
+
row: row,
|
|
124193
|
+
column: comp,
|
|
124194
|
+
$index: index,
|
|
124195
|
+
seq: index + 1
|
|
124196
|
+
};
|
|
124197
|
+
if (comp.$scopedSlots && typeof comp.$scopedSlots["default"] === 'function') {
|
|
124198
|
+
try {
|
|
124199
|
+
var text = vnodeText(comp.$scopedSlots["default"](scope)).replace(/\s+/g, ' ').trim();
|
|
124200
|
+
if (text) return text;
|
|
124201
|
+
} catch (e) {
|
|
124202
|
+
// 插槽取值失败时退回字段值
|
|
124203
|
+
}
|
|
124204
|
+
}
|
|
124205
|
+
if (typeof comp.formatter === 'function') {
|
|
124206
|
+
try {
|
|
124207
|
+
var _value = comp.formatter(scope);
|
|
124208
|
+
if (_value != null && StandardTablevue_type_script_lang_js_typeof(_value) !== 'object') {
|
|
124209
|
+
var _text2 = String(_value).trim();
|
|
124210
|
+
if (_text2) return _text2;
|
|
124211
|
+
}
|
|
124212
|
+
} catch (e) {
|
|
124213
|
+
// 格式化失败时退回字段值
|
|
124214
|
+
}
|
|
124215
|
+
}
|
|
124216
|
+
if (!comp.field || !row) return '';
|
|
124217
|
+
var value = row[comp.field];
|
|
124218
|
+
if (value == null || value === '' || StandardTablevue_type_script_lang_js_typeof(value) === 'object') return '';
|
|
124219
|
+
return String(value);
|
|
124220
|
+
},
|
|
124221
|
+
buildColumnFilterOptions: function buildColumnFilterOptions(comp) {
|
|
124222
|
+
var _this22 = this;
|
|
124223
|
+
var seen = Object.create(null);
|
|
124224
|
+
var options = [];
|
|
124225
|
+
this.visitColumnRows(this.tableData, function (row, index) {
|
|
124226
|
+
var text = _this22.columnCellText(comp, row, index);
|
|
124227
|
+
if (seen[text]) return;
|
|
124228
|
+
seen[text] = true;
|
|
124229
|
+
options.push({
|
|
124230
|
+
key: text === '' ? '__empty' : text,
|
|
124231
|
+
value: text,
|
|
124232
|
+
label: text === '' ? '(空)' : text
|
|
124233
|
+
});
|
|
124234
|
+
});
|
|
124235
|
+
options.sort(function (a, b) {
|
|
124236
|
+
return a.label.localeCompare(b.label, 'zh');
|
|
124237
|
+
});
|
|
124238
|
+
return options;
|
|
124239
|
+
},
|
|
124240
|
+
visitColumnRows: function visitColumnRows(rows, visitor) {
|
|
124241
|
+
var list = Array.isArray(rows) ? rows : [];
|
|
124242
|
+
var childrenKey = this.treeConfig && this.treeConfig.children || 'children';
|
|
124243
|
+
var _walk = function walk(nodes) {
|
|
124244
|
+
nodes.forEach(function (row, index) {
|
|
124245
|
+
if (!row) return;
|
|
124246
|
+
visitor(row, index);
|
|
124247
|
+
var children = row[childrenKey];
|
|
124248
|
+
if (Array.isArray(children) && children.length) _walk(children);
|
|
124249
|
+
});
|
|
124250
|
+
};
|
|
124251
|
+
_walk(list);
|
|
124252
|
+
},
|
|
124253
|
+
// 只收集真正会缩小结果的条件。开关打开但还没选值、没输入时不过滤
|
|
124254
|
+
buildColumnQueryChecks: function buildColumnQueryChecks() {
|
|
124255
|
+
var _this23 = this;
|
|
124256
|
+
var checks = [];
|
|
124257
|
+
var compMap = Object.create(null);
|
|
124258
|
+
this.columnComps.forEach(function (comp) {
|
|
124259
|
+
if (comp) compMap[comp._uid] = comp;
|
|
124260
|
+
});
|
|
124261
|
+
this.columnOrder.forEach(function (uid) {
|
|
124262
|
+
var st = _this23.columnStates[uid];
|
|
124263
|
+
var comp = compMap[uid];
|
|
124264
|
+
if (!st || st.visible === false || !comp) return;
|
|
124265
|
+
var selected = _this23.columnFilters[uid];
|
|
124266
|
+
if (st.filterable && Array.isArray(selected) && selected.length) {
|
|
124267
|
+
var set = Object.create(null);
|
|
124268
|
+
selected.forEach(function (value) {
|
|
124269
|
+
set[value] = true;
|
|
124270
|
+
});
|
|
124271
|
+
checks.push(function (row, index) {
|
|
124272
|
+
return !!set[_this23.columnCellText(comp, row, index)];
|
|
124273
|
+
});
|
|
124274
|
+
}
|
|
124275
|
+
var keyword = st.searchable && _this23.columnKeywords[uid] != null ? String(_this23.columnKeywords[uid]).trim().toLowerCase() : '';
|
|
124276
|
+
if (keyword) {
|
|
124277
|
+
checks.push(function (row, index) {
|
|
124278
|
+
return _this23.columnCellText(comp, row, index).toLowerCase().indexOf(keyword) >= 0;
|
|
124279
|
+
});
|
|
124280
|
+
}
|
|
124281
|
+
});
|
|
124282
|
+
return checks;
|
|
124283
|
+
},
|
|
124284
|
+
filterRowsByQuery: function filterRowsByQuery(rows, checks) {
|
|
124285
|
+
var match = function match(row, index) {
|
|
124286
|
+
return checks.every(function (check) {
|
|
124287
|
+
return check(row, index);
|
|
124288
|
+
});
|
|
124289
|
+
};
|
|
124290
|
+
var tree = this.treeConfig;
|
|
124291
|
+
if (tree && tree.transform) return this.filterTransformTree(rows, match, tree);
|
|
124292
|
+
var childrenKey = tree && tree.children || 'children';
|
|
124293
|
+
if (rows.some(function (row) {
|
|
124294
|
+
return row && Array.isArray(row[childrenKey]);
|
|
124295
|
+
})) {
|
|
124296
|
+
return this.filterNestedTree(rows, match, childrenKey);
|
|
124297
|
+
}
|
|
124298
|
+
return rows.filter(function (row, index) {
|
|
124299
|
+
return match(row, index);
|
|
124300
|
+
});
|
|
124301
|
+
},
|
|
124302
|
+
// 扁平树:命中的行保留,同时保留它的上级,避免子节点失去父级后无法显示
|
|
124303
|
+
filterTransformTree: function filterTransformTree(list, match, tree) {
|
|
124304
|
+
var rowField = tree.rowField || 'id';
|
|
124305
|
+
var parentField = tree.parentField || 'parentId';
|
|
124306
|
+
var byId = Object.create(null);
|
|
124307
|
+
var matched = [];
|
|
124308
|
+
list.forEach(function (row, index) {
|
|
124309
|
+
if (!row) return;
|
|
124310
|
+
byId[row[rowField]] = row;
|
|
124311
|
+
if (match(row, index)) matched.push(row[rowField]);
|
|
124312
|
+
});
|
|
124313
|
+
var keep = Object.create(null);
|
|
124314
|
+
matched.forEach(function (id) {
|
|
124315
|
+
var current = id;
|
|
124316
|
+
var guard = Object.create(null);
|
|
124317
|
+
while (current != null && current !== '' && !guard[current]) {
|
|
124318
|
+
guard[current] = true;
|
|
124319
|
+
keep[current] = true;
|
|
124320
|
+
var row = byId[current];
|
|
124321
|
+
if (!row) break;
|
|
124322
|
+
current = row[parentField];
|
|
124323
|
+
}
|
|
124324
|
+
});
|
|
124325
|
+
return list.filter(function (row) {
|
|
124326
|
+
return row && keep[row[rowField]];
|
|
124327
|
+
});
|
|
124328
|
+
},
|
|
124329
|
+
filterNestedTree: function filterNestedTree(list, match, childrenKey) {
|
|
124330
|
+
var _walk2 = function walk(nodes) {
|
|
124331
|
+
var out = [];
|
|
124332
|
+
nodes.forEach(function (row, index) {
|
|
124333
|
+
if (!row) return;
|
|
124334
|
+
var source = Array.isArray(row[childrenKey]) ? row[childrenKey] : null;
|
|
124335
|
+
var children = source ? _walk2(source) : null;
|
|
124336
|
+
if (match(row, index) || children && children.length) {
|
|
124337
|
+
if (source && children !== source) {
|
|
124338
|
+
var copy = {};
|
|
124339
|
+
Object.keys(row).forEach(function (key) {
|
|
124340
|
+
copy[key] = row[key];
|
|
124341
|
+
});
|
|
124342
|
+
copy[childrenKey] = children;
|
|
124343
|
+
out.push(copy);
|
|
124344
|
+
} else {
|
|
124345
|
+
out.push(row);
|
|
124346
|
+
}
|
|
124347
|
+
}
|
|
124348
|
+
});
|
|
124349
|
+
return out;
|
|
124350
|
+
};
|
|
124351
|
+
return _walk2(list);
|
|
124352
|
+
},
|
|
123600
124353
|
// ===== 列设置弹层 =====
|
|
123601
124354
|
// 打开列设置:以当前注册列生成工作副本(每次打开都重新初始化)
|
|
123602
124355
|
openColumnSetting: function openColumnSetting() {
|
|
123603
|
-
var
|
|
124356
|
+
var _this24 = this;
|
|
123604
124357
|
var compMap = {};
|
|
123605
124358
|
this.columnComps.forEach(function (comp) {
|
|
123606
124359
|
compMap[comp._uid] = comp;
|
|
@@ -123620,7 +124373,9 @@ var NormalReportSlotView = {
|
|
|
123620
124373
|
// 用户已设置值 > 列组件 resolvedMinWidth(显式 min-width / width / 按标题自动计算)
|
|
123621
124374
|
minWidth: st && st.minWidth != null ? st.minWidth : comp.resolvedMinWidth,
|
|
123622
124375
|
// 是否显示排序功能:用户已设置值 > 列组件声明
|
|
123623
|
-
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable
|
|
124376
|
+
sortable: st && st.sortable != null ? st.sortable : !!comp.sortable,
|
|
124377
|
+
filterable: !!(st && st.filterable),
|
|
124378
|
+
searchable: !!(st && st.searchable)
|
|
123624
124379
|
};
|
|
123625
124380
|
}).filter(Boolean);
|
|
123626
124381
|
this.dragColField = '';
|
|
@@ -123628,7 +124383,7 @@ var NormalReportSlotView = {
|
|
|
123628
124383
|
// 列标题宽度:按最长列名称计算(中文 25px/字 + 英文 15px/字 + 30px 余量),
|
|
123629
124384
|
// 各列标题统一按该宽度显示,保证输入框与按钮对齐
|
|
123630
124385
|
this.columnTitleWidth = this.columnDraft.reduce(function (max, c) {
|
|
123631
|
-
return Math.max(max,
|
|
124386
|
+
return Math.max(max, _this24.calcColumnTitleWidth(c.title));
|
|
123632
124387
|
}, 0);
|
|
123633
124388
|
},
|
|
123634
124389
|
// 计算单个列标题的显示宽度(px):中文 25px/字 + 英文 15px/字 + 30px 余量
|
|
@@ -123667,6 +124422,12 @@ var NormalReportSlotView = {
|
|
|
123667
124422
|
toggleColumnSortable: function toggleColumnSortable(col) {
|
|
123668
124423
|
col.sortable = !col.sortable;
|
|
123669
124424
|
},
|
|
124425
|
+
toggleColumnFilterable: function toggleColumnFilterable(col) {
|
|
124426
|
+
col.filterable = !col.filterable;
|
|
124427
|
+
},
|
|
124428
|
+
toggleColumnSearchable: function toggleColumnSearchable(col) {
|
|
124429
|
+
col.searchable = !col.searchable;
|
|
124430
|
+
},
|
|
123670
124431
|
// 上下移一列
|
|
123671
124432
|
moveColumnDraft: function moveColumnDraft(index, direction) {
|
|
123672
124433
|
var target = index + direction;
|
|
@@ -123720,24 +124481,29 @@ var NormalReportSlotView = {
|
|
|
123720
124481
|
},
|
|
123721
124482
|
// 确认:将面板副本应用到列状态并刷新表格
|
|
123722
124483
|
confirmColumnSetting: function confirmColumnSetting() {
|
|
123723
|
-
var
|
|
124484
|
+
var _this25 = this;
|
|
123724
124485
|
var order = [];
|
|
123725
124486
|
this.columnDraft.forEach(function (d) {
|
|
123726
|
-
var prev =
|
|
123727
|
-
|
|
124487
|
+
var prev = _this25.columnStates[d.uid] || {};
|
|
124488
|
+
_this25.$set(_this25.columnStates, d.uid, {
|
|
123728
124489
|
visible: d.visible,
|
|
123729
124490
|
fixed: d.fixed || '',
|
|
123730
124491
|
minWidth: d.minWidth != null ? d.minWidth : null,
|
|
123731
124492
|
width: prev.width != null ? prev.width : null,
|
|
123732
|
-
sortable: !!d.sortable
|
|
124493
|
+
sortable: !!d.sortable,
|
|
124494
|
+
filterable: !!d.filterable,
|
|
124495
|
+
searchable: !!d.searchable
|
|
123733
124496
|
});
|
|
124497
|
+
if (!d.filterable) _this25.$delete(_this25.columnFilters, d.uid);
|
|
124498
|
+
if (!d.searchable) _this25.$delete(_this25.columnKeywords, d.uid);
|
|
124499
|
+
if (!d.sortable) _this25.$delete(_this25.columnSortOrders, d.uid);
|
|
123734
124500
|
order.push(d.uid);
|
|
123735
124501
|
});
|
|
123736
124502
|
this.columnOrder = order;
|
|
123737
124503
|
this.columnSettingVisible = false;
|
|
123738
124504
|
this.persistColumnConfigNow();
|
|
123739
124505
|
this.$nextTick(function () {
|
|
123740
|
-
|
|
124506
|
+
_this25.applyColumnOrder();
|
|
123741
124507
|
});
|
|
123742
124508
|
},
|
|
123743
124509
|
// ===== 表头配置持久化 =====
|
|
@@ -123767,12 +124533,12 @@ var NormalReportSlotView = {
|
|
|
123767
124533
|
},
|
|
123768
124534
|
// 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度
|
|
123769
124535
|
scheduleInitialLayout: function scheduleInitialLayout() {
|
|
123770
|
-
var
|
|
124536
|
+
var _this26 = this;
|
|
123771
124537
|
this.$nextTick(function () {
|
|
123772
|
-
|
|
124538
|
+
_this26.resizeRecalculate();
|
|
123773
124539
|
if (typeof requestAnimationFrame === 'function') {
|
|
123774
124540
|
requestAnimationFrame(function () {
|
|
123775
|
-
return
|
|
124541
|
+
return _this26.resizeRecalculate();
|
|
123776
124542
|
});
|
|
123777
124543
|
}
|
|
123778
124544
|
});
|
|
@@ -123790,10 +124556,11 @@ var NormalReportSlotView = {
|
|
|
123790
124556
|
this.columnConfigReady = !!getColumnModuleCode() && !!tableCode && !this.columnConfigDisabled;
|
|
123791
124557
|
this.columnsReady = true;
|
|
123792
124558
|
this.scheduleInitialLayout();
|
|
123793
|
-
|
|
124559
|
+
// 加载完成前已经直接改过表头时,同样等 3 秒再保存,避免和后续拖拽各打一次接口
|
|
124560
|
+
if (this.columnConfigDirty) this.schedulePersistColumnConfig();
|
|
123794
124561
|
},
|
|
123795
124562
|
bootstrapColumnConfig: function bootstrapColumnConfig() {
|
|
123796
|
-
var
|
|
124563
|
+
var _this27 = this;
|
|
123797
124564
|
var tableCode = this.resolveTableCode();
|
|
123798
124565
|
if (!tableCode) {
|
|
123799
124566
|
this.finishColumnConfigLoad();
|
|
@@ -123831,36 +124598,22 @@ var NormalReportSlotView = {
|
|
|
123831
124598
|
this.finishColumnConfigLoad();
|
|
123832
124599
|
return;
|
|
123833
124600
|
}
|
|
124601
|
+
var columns = readCachedColumnLayout(moduleCode, pageCode, tableCode);
|
|
123834
124602
|
var api = getColumnConfigApi();
|
|
123835
|
-
if (!api || typeof api.
|
|
123836
|
-
console.warn('[StandardTable] 未注入 request
|
|
124603
|
+
if (!api || typeof api.save !== 'function') {
|
|
124604
|
+
console.warn('[StandardTable] 未注入 request,表头配置不会保存');
|
|
123837
124605
|
this.columnConfigDisabled = true;
|
|
123838
|
-
this.finishColumnConfigLoad();
|
|
123839
|
-
return;
|
|
123840
124606
|
}
|
|
123841
|
-
this.
|
|
123842
|
-
if (
|
|
123843
|
-
if (_this22.$message) _this22.$message.warning('表头配置加载超时,已使用默认列');
|
|
123844
|
-
_this22.finishColumnConfigLoad();
|
|
123845
|
-
}, 3000);
|
|
123846
|
-
Promise.resolve(api.get(moduleCode, pageCode, tableCode)).then(function (res) {
|
|
123847
|
-
var datas = readColumnConfigDatas(res);
|
|
123848
|
-
var columns = readSavedColumns(datas);
|
|
123849
|
-
_this22.finishColumnConfigLoad(function () {
|
|
123850
|
-
if (columns && columns.length) _this22.applyMergedColumnConfig(columns);
|
|
123851
|
-
});
|
|
123852
|
-
})["catch"](function (err) {
|
|
123853
|
-
if (_this22.columnConfigSettled) return;
|
|
123854
|
-
if (_this22.$message) _this22.$message.warning(err && err.message || '表头配置加载失败,已使用默认列');
|
|
123855
|
-
_this22.finishColumnConfigLoad();
|
|
124607
|
+
this.finishColumnConfigLoad(function () {
|
|
124608
|
+
if (columns && columns.length) _this27.applyMergedColumnConfig(columns);
|
|
123856
124609
|
});
|
|
123857
124610
|
},
|
|
123858
124611
|
applyMergedColumnConfig: function applyMergedColumnConfig(savedColumns) {
|
|
123859
|
-
var
|
|
124612
|
+
var _this28 = this;
|
|
123860
124613
|
var merged = mergeColumnConfig(this.columnComps, savedColumns);
|
|
123861
124614
|
if (!merged) return;
|
|
123862
124615
|
merged.states.forEach(function (item) {
|
|
123863
|
-
|
|
124616
|
+
_this28.$set(_this28.columnStates, item.uid, item.state);
|
|
123864
124617
|
});
|
|
123865
124618
|
this.columnOrder = merged.order;
|
|
123866
124619
|
},
|
|
@@ -123876,15 +124629,17 @@ var NormalReportSlotView = {
|
|
|
123876
124629
|
this.$set(st, 'width', Math.min(width, 2000));
|
|
123877
124630
|
this.schedulePersistColumnConfig();
|
|
123878
124631
|
},
|
|
124632
|
+
// 直接改表头(拖列宽、拖换列、右键改排序或固定)时防抖:停手 3 秒后才保存。
|
|
124633
|
+
// 「调整」弹层点确认走 persistColumnConfigNow,不经过这里。
|
|
123879
124634
|
schedulePersistColumnConfig: function schedulePersistColumnConfig() {
|
|
123880
|
-
var
|
|
124635
|
+
var _this29 = this;
|
|
123881
124636
|
this.columnConfigDirty = true;
|
|
123882
124637
|
if (!this.columnConfigReady) return;
|
|
123883
124638
|
if (this.columnConfigSaveTimer) clearTimeout(this.columnConfigSaveTimer);
|
|
123884
124639
|
this.columnConfigSaveTimer = setTimeout(function () {
|
|
123885
|
-
|
|
123886
|
-
|
|
123887
|
-
},
|
|
124640
|
+
_this29.columnConfigSaveTimer = null;
|
|
124641
|
+
_this29.persistColumnConfig();
|
|
124642
|
+
}, 3000);
|
|
123888
124643
|
},
|
|
123889
124644
|
persistColumnConfigNow: function persistColumnConfigNow() {
|
|
123890
124645
|
this.columnConfigDirty = true;
|
|
@@ -123895,7 +124650,7 @@ var NormalReportSlotView = {
|
|
|
123895
124650
|
this.persistColumnConfig();
|
|
123896
124651
|
},
|
|
123897
124652
|
persistColumnConfig: function persistColumnConfig() {
|
|
123898
|
-
var
|
|
124653
|
+
var _this30 = this;
|
|
123899
124654
|
if (!this.columnConfigReady || this.columnConfigDisabled) return;
|
|
123900
124655
|
var api = getColumnConfigApi();
|
|
123901
124656
|
if (!api) return;
|
|
@@ -123909,10 +124664,11 @@ var NormalReportSlotView = {
|
|
|
123909
124664
|
if (!request) return;
|
|
123910
124665
|
Promise.resolve(request).then(function (res) {
|
|
123911
124666
|
readColumnConfigDatas(res);
|
|
124667
|
+
if (useReset) removeCachedColumnLayout(moduleCode, pageCode, tableCode);else updateCachedColumnLayout(moduleCode, pageCode, tableCode, columns);
|
|
123912
124668
|
var content = res && res.data && res.data.Content || res && res.Content || '表头配置保存成功';
|
|
123913
|
-
if (
|
|
124669
|
+
if (_this30.$message) _this30.$message.success(content);
|
|
123914
124670
|
})["catch"](function (err) {
|
|
123915
|
-
if (
|
|
124671
|
+
if (_this30.$message) _this30.$message.error(err && err.message || '表头配置保存失败');
|
|
123916
124672
|
});
|
|
123917
124673
|
}
|
|
123918
124674
|
}
|
|
@@ -123934,8 +124690,8 @@ var StandardTablevue_type_style_index_0_prod_lang_scss_external = __webpack_requ
|
|
|
123934
124690
|
|
|
123935
124691
|
var StandardTable_component = normalizeComponent(
|
|
123936
124692
|
components_StandardTablevue_type_script_lang_js,
|
|
123937
|
-
|
|
123938
|
-
|
|
124693
|
+
StandardTablevue_type_template_id_d9620728_render,
|
|
124694
|
+
StandardTablevue_type_template_id_d9620728_staticRenderFns,
|
|
123939
124695
|
false,
|
|
123940
124696
|
null,
|
|
123941
124697
|
null,
|