@cimom-ui/standard-ui 1.1.12 → 1.1.14

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.
@@ -2848,7 +2848,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.standard-container[data-v-b0b5121a]{d
2848
2848
 
2849
2849
  /***/ },
2850
2850
 
2851
- /***/ 4049
2851
+ /***/ 4175
2852
2852
  (module, __webpack_exports__, __webpack_require__) {
2853
2853
 
2854
2854
  "use strict";
@@ -2862,7 +2862,7 @@ __webpack_require__.r(__webpack_exports__);
2862
2862
 
2863
2863
  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()));
2864
2864
  // Module
2865
- ___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-toolbar-panel{padding:10px 12px;margin-bottom:8px;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);flex-shrink:0}.normal-report-filter-row{display:flex;align-items:flex-end;-moz-column-gap:6px;column-gap:6px;row-gap:10px;flex-wrap:wrap}.normal-report-filter-row-secondary{margin-top:10px;padding-top:10px;border-top:1px solid #edf1f6}.normal-report-filter-item{display:flex;flex-direction:column;gap:4px;width:175px;flex:0 0 175px;font-size:10px;color:#5a657a}.normal-report-filter-item>span{margin-left:2px}.normal-report-filter-item-date,.normal-report-filter-item-device{width:175px!important}.normal-report-filter-item .normal-report-filter-control{width:100%!important}.normal-report-filter-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.normal-report-filter-actions .el-button+.el-button{margin-left:0}.normal-report-filter-expand-enter-active,.normal-report-filter-expand-leave-active{transition:opacity .18s ease}.normal-report-filter-expand-enter,.normal-report-filter-expand-leave-to{opacity:0}@media(max-width:768px){.normal-report-filter-item{width:100%;flex-basis:100%}.normal-report-filter-actions{width:100%;margin-left:0;justify-content:flex-end}}`, ""]);
2865
+ ___CSS_LOADER_EXPORT___.push([module.id, `.normal-report-toolbar-panel{padding:10px 12px;margin-bottom:8px;background:#fff;border:1px solid #e8edf4;border-radius:10px;box-shadow:0 6px 18px rgba(31,73,125,.06);flex-shrink:0}.normal-report-filter-row{display:flex;align-items:flex-end;-moz-column-gap:6px;column-gap:6px;row-gap:10px;flex-wrap:wrap}.standard-filterbar{min-width:0;max-width:100%}.standard-filterbar .normal-report-filter-row-primary{flex-wrap:nowrap;min-width:0;max-width:100%}.standard-filterbar .normal-report-filter-actions{width:auto;flex:0 0 auto;margin-left:auto}.standard-filterbar .normal-report-filter-item{width:var(--filter-item-width,175px);flex:0 0 var(--filter-item-width,175px);min-width:175px;max-width:300px}.standard-filterbar .normal-report-filter-item.normal-report-filter-item-date,.standard-filterbar .normal-report-filter-item.normal-report-filter-item-device{width:var(--filter-item-width,175px)!important;flex:0 0 var(--filter-item-width,175px);min-width:175px;max-width:300px}.normal-report-filter-row-secondary{margin-top:10px;padding-top:10px;border-top:1px solid #edf1f6}.standard-filterbar.standard-filterbar--expand-up{display:flex;flex-direction:column}.standard-filterbar.standard-filterbar--expand-up .normal-report-filter-row-secondary{order:-1;margin-top:0;margin-bottom:10px;padding-top:0;padding-bottom:10px;border-top:none;border-bottom:1px solid #edf1f6}.normal-report-filter-item{display:flex;flex-direction:column;gap:4px;width:175px;flex:0 0 175px;font-size:10px;color:#5a657a}.normal-report-filter-item>span{margin-left:2px}.normal-report-filter-item-date,.normal-report-filter-item-device{width:175px!important}.normal-report-filter-item .normal-report-filter-control{width:100%!important}.standard-filterbar-slot-control>.el-autocomplete,.standard-filterbar-slot-control>.el-cascader,.standard-filterbar-slot-control>.el-date-editor,.standard-filterbar-slot-control>.el-input,.standard-filterbar-slot-control>.el-select{width:100%}.normal-report-filter-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.normal-report-filter-actions .el-button+.el-button{margin-left:0}.normal-report-filter-expand-enter-active,.normal-report-filter-expand-leave-active{transition:opacity .18s ease}.normal-report-filter-expand-enter,.normal-report-filter-expand-leave-to{opacity:0}@media(max-width:768px){.normal-report-filter-item{width:100%;flex-basis:100%}.normal-report-filter-actions{width:100%;margin-left:0;justify-content:flex-end}}`, ""]);
2866
2866
  // Exports
2867
2867
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
2868
2868
 
@@ -3062,7 +3062,7 @@ __webpack_require__.r(__webpack_exports__);
3062
3062
 
3063
3063
  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()));
3064
3064
  // Module
3065
- ___CSS_LOADER_EXPORT___.push([module.id, `.standard-advanced-query-entry,.standard-advanced-query-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.standard-advanced-query-panel{min-width:360px}.standard-advanced-query-list{max-height:300px;overflow-y:auto;padding:4px 0}.standard-advanced-query-empty{padding:12px 0}.standard-advanced-query-empty .el-empty__description p{font-size:12px;color:#909399;margin:0}.standard-advanced-query-item{display:flex;align-items:center;gap:6px;padding:5px 4px}.standard-advanced-query-item .el-button+.el-button{margin-left:0}.standard-advanced-query-item-field{flex:0 0 130px;width:130px}.standard-advanced-query-item-value{flex:1;min-width:0}.standard-advanced-query-item-remove{flex-shrink:0;padding:5px;color:#f56c6c}.standard-advanced-query-add{display:flex;justify-content:center;padding:2px 0}.standard-advanced-query-add .el-button{padding:5px}.standard-advanced-query-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}`, ""]);
3065
+ ___CSS_LOADER_EXPORT___.push([module.id, `.standard-advanced-query-entry,.standard-advanced-query-entry .el-popover__reference-wrapper{display:inline-flex;align-items:center}.standard-advanced-query-panel{min-width:360px}.standard-advanced-query-custom{display:flex;flex-wrap:wrap;align-items:flex-end;-moz-column-gap:6px;column-gap:6px;row-gap:10px;padding:4px 0 8px}.standard-advanced-query-list{max-height:300px;overflow-y:auto;padding:4px 0}.standard-advanced-query-empty{padding:12px 0}.standard-advanced-query-empty .el-empty__description p{font-size:12px;color:#909399;margin:0}.standard-advanced-query-item{display:flex;align-items:center;gap:6px;padding:5px 4px}.standard-advanced-query-item .el-button+.el-button{margin-left:0}.standard-advanced-query-item-field{flex:0 0 130px;width:130px}.standard-advanced-query-item-value{flex:1;min-width:0}.standard-advanced-query-item-remove{flex-shrink:0;padding:5px;color:#f56c6c}.standard-advanced-query-add{display:flex;justify-content:center;padding:2px 0}.standard-advanced-query-add .el-button{padding:5px}.standard-advanced-query-footer{margin-top:8px;padding-top:8px;border-top:1px solid #ebeef5;text-align:right}`, ""]);
3066
3066
  // Exports
3067
3067
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
3068
3068
 
@@ -73332,19 +73332,19 @@ var update = add("5ae09596", content, true, {"sourceMap":false,"shadowMode":fals
73332
73332
 
73333
73333
  /***/ },
73334
73334
 
73335
- /***/ 5571
73335
+ /***/ 8365
73336
73336
  (module, __unused_webpack_exports, __webpack_require__) {
73337
73337
 
73338
73338
  // style-loader: Adds some css to the DOM by adding a <style> tag
73339
73339
 
73340
73340
  // load the styles
73341
- var content = __webpack_require__(4049);
73341
+ var content = __webpack_require__(4175);
73342
73342
  if(content.__esModule) content = content.default;
73343
73343
  if(typeof content === 'string') content = [[module.id, content, '']];
73344
73344
  if(content.locals) module.exports = content.locals;
73345
73345
  // add the styles to the DOM
73346
73346
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
73347
- var update = add("0355e478", content, true, {"sourceMap":false,"shadowMode":false});
73347
+ var update = add("54270400", content, true, {"sourceMap":false,"shadowMode":false});
73348
73348
 
73349
73349
  /***/ },
73350
73350
 
@@ -118973,15 +118973,24 @@ var StandardContainer_component = normalizeComponent(
118973
118973
  )
118974
118974
 
118975
118975
  /* harmony default export */ const StandardContainer = (StandardContainer_component.exports);
118976
- ;// ./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/StandardFilterbar/index.vue?vue&type=template&id=a1e74ef8
118977
- var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
118976
+ ;// ./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/StandardFilterbar/index.vue?vue&type=template&id=042f1c58
118977
+ var StandardFilterbarvue_type_template_id_042f1c58_render = function render() {
118978
118978
  var _vm = this,
118979
- _c = _vm._self._c;
118979
+ _c = _vm._self._c,
118980
+ _setup = _vm._self._setupProxy;
118980
118981
  return _vm.renderValid ? _c('section', {
118981
- staticClass: "normal-report-toolbar-panel standard-filterbar"
118982
+ staticClass: "normal-report-toolbar-panel standard-filterbar",
118983
+ "class": {
118984
+ 'standard-filterbar--expand-up': _vm.expandAbove
118985
+ }
118982
118986
  }, [_c('div', {
118987
+ ref: "filterRow",
118983
118988
  staticClass: "normal-report-filter-row normal-report-filter-row-primary"
118984
- }, [_vm._l(_vm.mainConditions, function (cond) {
118989
+ }, [_c('filter-slot-group', {
118990
+ attrs: {
118991
+ "nodes": _vm.primarySlotNodes()
118992
+ }
118993
+ }), _vm._l(_vm.primaryConditionList(), function (cond) {
118985
118994
  return _c('filter-search-item', {
118986
118995
  key: cond.value,
118987
118996
  staticClass: "standard-filterbar-item",
@@ -118989,6 +118998,7 @@ var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
118989
118998
  attrs: {
118990
118999
  "cond": cond,
118991
119000
  "search-bar": _vm.searchBar,
119001
+ "layout-width": _vm.sharedItemWidth,
118992
119002
  "options": _vm.getOptions(cond),
118993
119003
  "is-remote": _vm.isRemoteCond(cond),
118994
119004
  "remote-method": _vm.remoteMethods[cond.value] || null,
@@ -119000,6 +119010,7 @@ var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
119000
119010
  }
119001
119011
  });
119002
119012
  }), _c('div', {
119013
+ ref: "filterActions",
119003
119014
  staticClass: "normal-report-filter-actions"
119004
119015
  }, [_c('standard-button', {
119005
119016
  attrs: {
@@ -119029,20 +119040,26 @@ var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
119029
119040
  return _vm.$emit('export');
119030
119041
  }
119031
119042
  }
119032
- }) : _vm._e(), _vm.showAdvancedQuery && _vm.secondaryConditions.length ? _c('standard-advanced-query', {
119043
+ }) : _vm._e(), _vm.showAdvancedQuery && _vm.hasOverflow() ? _c('standard-advanced-query', {
119033
119044
  ref: "advancedQuery",
119034
119045
  attrs: {
119035
- "conditions": _vm.secondaryConditions,
119046
+ "conditions": _vm.overflowConditionList(),
119047
+ "custom-count": _vm.overflowSlotNodes().length,
119036
119048
  "search-bar": _vm.searchBar
119037
119049
  },
119038
119050
  on: {
119039
119051
  "search": _vm.onSearch
119040
119052
  }
119041
- }) : _vm.showExpand && _vm.secondaryConditions.length ? _c('standard-button', {
119053
+ }, [_c('filter-slot-group', {
119054
+ attrs: {
119055
+ "nodes": _vm.overflowSlotNodes()
119056
+ }
119057
+ })], 1) : _vm.showExpand && _vm.hasOverflow() ? _c('standard-button', {
119058
+ ref: "moreButton",
119042
119059
  staticClass: "normal-report-expand-button",
119043
119060
  attrs: {
119044
- "icon": _vm.expanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down',
119045
- "label": "\u66F4\u591A".concat(_vm.secondaryActiveCount ? " (".concat(_vm.secondaryActiveCount, ")") : '')
119061
+ "icon": _vm.expandIcon,
119062
+ "label": "\u66F4\u591A".concat(_vm.overflowActiveCount() ? " (".concat(_vm.overflowActiveCount(), ")") : '')
119046
119063
  },
119047
119064
  on: {
119048
119065
  "click": function click($event) {
@@ -119053,15 +119070,19 @@ var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
119053
119070
  attrs: {
119054
119071
  "name": "normal-report-filter-expand"
119055
119072
  }
119056
- }, [_vm.secondaryConditions.length ? _c('div', {
119073
+ }, [!_vm.showAdvancedQuery && _vm.hasOverflow() ? _c('div', {
119057
119074
  directives: [{
119058
119075
  name: "show",
119059
119076
  rawName: "v-show",
119060
- value: _vm.secondaryVisible,
119061
- expression: "secondaryVisible"
119077
+ value: _vm.secondaryOpen(),
119078
+ expression: "secondaryOpen()"
119062
119079
  }],
119063
119080
  staticClass: "normal-report-filter-row normal-report-filter-row-secondary"
119064
- }, _vm._l(_vm.secondaryConditions, function (cond) {
119081
+ }, [_c('filter-slot-group', {
119082
+ attrs: {
119083
+ "nodes": _vm.overflowSlotNodes()
119084
+ }
119085
+ }), _vm._l(_vm.overflowConditionList(), function (cond) {
119065
119086
  return _c('filter-search-item', {
119066
119087
  key: cond.value,
119067
119088
  staticClass: "standard-filterbar-item",
@@ -119069,6 +119090,7 @@ var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
119069
119090
  attrs: {
119070
119091
  "cond": cond,
119071
119092
  "search-bar": _vm.searchBar,
119093
+ "layout-width": _vm.sharedItemWidth,
119072
119094
  "options": _vm.getOptions(cond),
119073
119095
  "is-remote": _vm.isRemoteCond(cond),
119074
119096
  "remote-method": _vm.remoteMethods[cond.value] || null,
@@ -119079,12 +119101,12 @@ var StandardFilterbarvue_type_template_id_a1e74ef8_render = function render() {
119079
119101
  }
119080
119102
  }
119081
119103
  });
119082
- }), 1) : _vm._e()])], 1) : _vm._e();
119104
+ })], 2) : _vm._e()])], 1) : _vm._e();
119083
119105
  };
119084
- var StandardFilterbarvue_type_template_id_a1e74ef8_staticRenderFns = [];
119106
+ var StandardFilterbarvue_type_template_id_042f1c58_staticRenderFns = [];
119085
119107
 
119086
- ;// ./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/StandardAdvancedQuery/index.vue?vue&type=template&id=231a2683
119087
- var StandardAdvancedQueryvue_type_template_id_231a2683_render = function render() {
119108
+ ;// ./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/StandardAdvancedQuery/index.vue?vue&type=template&id=07a0d3fc
119109
+ var StandardAdvancedQueryvue_type_template_id_07a0d3fc_render = function render() {
119088
119110
  var _vm = this,
119089
119111
  _c = _vm._self._c;
119090
119112
  return _c('el-popover', {
@@ -119102,7 +119124,9 @@ var StandardAdvancedQueryvue_type_template_id_231a2683_render = function render(
119102
119124
  }
119103
119125
  }, [_c('div', {
119104
119126
  staticClass: "standard-advanced-query-panel"
119105
- }, [_c('div', {
119127
+ }, [_vm.customCount ? _c('div', {
119128
+ staticClass: "standard-advanced-query-custom"
119129
+ }, [_vm._t("default")], 2) : _vm._e(), _c('div', {
119106
119130
  staticClass: "standard-advanced-query-list"
119107
119131
  }, [_vm.rows.length ? _vm._l(_vm.rows, function (row, index) {
119108
119132
  return _c('div', {
@@ -119155,13 +119179,13 @@ var StandardAdvancedQueryvue_type_template_id_231a2683_render = function render(
119155
119179
  }
119156
119180
  }
119157
119181
  })], 1);
119158
- }) : _c('el-empty', {
119182
+ }) : !_vm.customCount ? _c('el-empty', {
119159
119183
  staticClass: "standard-advanced-query-empty",
119160
119184
  attrs: {
119161
119185
  "image-size": 60,
119162
119186
  "description": "点击下方新增按钮添加查询条件"
119163
119187
  }
119164
- })], 2), _c('div', {
119188
+ }) : _vm._e()], 2), _c('div', {
119165
119189
  staticClass: "standard-advanced-query-footer"
119166
119190
  }, [_c('el-button', {
119167
119191
  attrs: {
@@ -119199,7 +119223,7 @@ var StandardAdvancedQueryvue_type_template_id_231a2683_render = function render(
119199
119223
  slot: "reference"
119200
119224
  }, [_vm._v(" 高级查询" + _vm._s(_vm.rows.length ? " (".concat(_vm.rows.length, ")") : '') + " ")])], 1);
119201
119225
  };
119202
- var StandardAdvancedQueryvue_type_template_id_231a2683_staticRenderFns = [];
119226
+ var StandardAdvancedQueryvue_type_template_id_07a0d3fc_staticRenderFns = [];
119203
119227
 
119204
119228
  ;// ./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/StandardAdvancedQuery/index.vue?vue&type=script&lang=js
119205
119229
  /**
@@ -119225,6 +119249,11 @@ var StandardAdvancedQueryvue_type_template_id_231a2683_staticRenderFns = [];
119225
119249
  return [];
119226
119250
  }
119227
119251
  },
119252
+ // 未进首行的自定义筛选项数量(默认插槽中的原始控件,不参与文本条件行)
119253
+ customCount: {
119254
+ type: Number,
119255
+ "default": 0
119256
+ },
119228
119257
  // v-model 绑定的筛选配置对象(读写 searchVariable 完成值双向绑定)
119229
119258
  searchBar: {
119230
119259
  type: Object,
@@ -119249,7 +119278,8 @@ var StandardAdvancedQueryvue_type_template_id_231a2683_staticRenderFns = [];
119249
119278
  }
119250
119279
  },
119251
119280
  watch: {
119252
- // 条件配置变化时清理失效行(field 已不在 conditions 中的行自动移除并恢复值)
119281
+ // 可用条件变化时:移出已不在列表中的行(保留字段值,避免首行容量变化时把已填内容清掉);
119282
+ // 新进入列表且已有值的字段补一行,角标与弹窗能看到该条件
119253
119283
  conditions: function conditions() {
119254
119284
  var _this = this;
119255
119285
  var fields = (this.conditions || []).map(function (c) {
@@ -119258,8 +119288,19 @@ var StandardAdvancedQueryvue_type_template_id_231a2683_staticRenderFns = [];
119258
119288
  var valid = this.rows.filter(function (row) {
119259
119289
  return fields.indexOf(row.field) > -1;
119260
119290
  });
119261
- this.rows.forEach(function (row) {
119262
- if (fields.indexOf(row.field) === -1) _this.restoreFieldValue(row.field);
119291
+ var existing = {};
119292
+ valid.forEach(function (row) {
119293
+ existing[row.field] = true;
119294
+ });
119295
+ (this.conditions || []).forEach(function (cond) {
119296
+ if (!cond || existing[cond.value]) return;
119297
+ if (_this.hasValue(cond)) {
119298
+ valid.push({
119299
+ uid: ++_this.uidSeq,
119300
+ field: cond.value
119301
+ });
119302
+ existing[cond.value] = true;
119303
+ }
119263
119304
  });
119264
119305
  this.rows = valid;
119265
119306
  }
@@ -119413,8 +119454,8 @@ var StandardAdvancedQueryvue_type_style_index_0_prod_lang_scss_external = __webp
119413
119454
 
119414
119455
  var StandardAdvancedQuery_component = normalizeComponent(
119415
119456
  components_StandardAdvancedQueryvue_type_script_lang_js,
119416
- StandardAdvancedQueryvue_type_template_id_231a2683_render,
119417
- StandardAdvancedQueryvue_type_template_id_231a2683_staticRenderFns,
119457
+ StandardAdvancedQueryvue_type_template_id_07a0d3fc_render,
119458
+ StandardAdvancedQueryvue_type_template_id_07a0d3fc_staticRenderFns,
119418
119459
  false,
119419
119460
  null,
119420
119461
  null,
@@ -119423,11 +119464,125 @@ var StandardAdvancedQuery_component = normalizeComponent(
119423
119464
  )
119424
119465
 
119425
119466
  /* harmony default export */ const StandardAdvancedQuery = (StandardAdvancedQuery_component.exports);
119467
+ ;// ./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/StandardFilterbar/Item.vue?vue&type=template&id=0001f453
119468
+ var Itemvue_type_template_id_0001f453_render = function render() {
119469
+ var _vm = this,
119470
+ _c = _vm._self._c;
119471
+ return _c('label', {
119472
+ staticClass: "normal-report-filter-item",
119473
+ style: _vm.itemStyle
119474
+ }, [_vm.label ? _c('span', [_vm._v(_vm._s(_vm.label))]) : _vm._e(), _c('div', {
119475
+ staticClass: "normal-report-filter-control standard-filterbar-slot-control"
119476
+ }, [_vm._t("default")], 2)]);
119477
+ };
119478
+ var Itemvue_type_template_id_0001f453_staticRenderFns = [];
119479
+
119480
+ ;// ./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/StandardFilterbar/Item.vue?vue&type=script&lang=js
119481
+ /**
119482
+ * StandardFilterbarItem
119483
+ * 用法(作为 standard-filterbar 的默认插槽子节点,顺序优先于 v-model 中的条件):
119484
+ * <standard-filterbar-item label="车间">
119485
+ * <el-select v-model="extra.workshop" size="mini" clearable />
119486
+ * </standard-filterbar-item>
119487
+ */
119488
+ /* harmony default export */ const Itemvue_type_script_lang_js = ({
119489
+ name: 'StandardFilterbarItem',
119490
+ props: {
119491
+ // 条件标题,显示在控件上方
119492
+ label: {
119493
+ type: String,
119494
+ "default": ''
119495
+ },
119496
+ // 自定义宽度:数字按 px,或任意 CSS 宽度字符串。未传时跟随首行统一宽度
119497
+ width: {
119498
+ type: [Number, String],
119499
+ "default": null
119500
+ },
119501
+ // 由筛选栏在渲染时写入的统一项宽,使用方无需传递
119502
+ layoutWidth: {
119503
+ type: Number,
119504
+ "default": 0
119505
+ }
119506
+ },
119507
+ computed: {
119508
+ itemStyle: function itemStyle() {
119509
+ var custom = this.width;
119510
+ var hasCustom = custom !== undefined && custom !== null && custom !== '';
119511
+ var toCss = function toCss(value) {
119512
+ return typeof value === 'number' ? "".concat(value, "px") : value;
119513
+ };
119514
+ if (hasCustom) {
119515
+ var css = toCss(custom);
119516
+ return {
119517
+ '--filter-item-width': css,
119518
+ width: css,
119519
+ flexBasis: css,
119520
+ flexGrow: 0,
119521
+ flexShrink: 0,
119522
+ minWidth: css,
119523
+ maxWidth: css
119524
+ };
119525
+ }
119526
+ if (this.layoutWidth > 0) {
119527
+ var _css = "".concat(this.layoutWidth, "px");
119528
+ return {
119529
+ '--filter-item-width': _css,
119530
+ width: _css,
119531
+ flexBasis: _css,
119532
+ flexGrow: 0,
119533
+ flexShrink: 0
119534
+ };
119535
+ }
119536
+ return null;
119537
+ }
119538
+ }
119539
+ });
119540
+ ;// ./src/components/StandardFilterbar/Item.vue?vue&type=script&lang=js
119541
+ /* harmony default export */ const StandardFilterbar_Itemvue_type_script_lang_js = (Itemvue_type_script_lang_js);
119542
+ ;// ./src/components/StandardFilterbar/Item.vue
119543
+
119544
+
119545
+
119546
+
119547
+
119548
+ /* normalize component */
119549
+ ;
119550
+ var Item_component = normalizeComponent(
119551
+ StandardFilterbar_Itemvue_type_script_lang_js,
119552
+ Itemvue_type_template_id_0001f453_render,
119553
+ Itemvue_type_template_id_0001f453_staticRenderFns,
119554
+ false,
119555
+ null,
119556
+ null,
119557
+ null
119558
+
119559
+ )
119560
+
119561
+ /* harmony default export */ const Item = (Item_component.exports);
119426
119562
  ;// ./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/StandardFilterbar/index.vue?vue&type=script&lang=js
119427
119563
  function _typeof(o) { "@babel/helpers - typeof"; return _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; }, _typeof(o); }
119428
119564
  ;
119429
119565
 
119430
119566
 
119567
+
119568
+ /**
119569
+ * 把插槽项 vnode 铺进父级 flex 行,不额外包一层,保证每个 item 单独占一格。
119570
+ */
119571
+ var FilterSlotGroup = {
119572
+ functional: true,
119573
+ props: {
119574
+ nodes: {
119575
+ type: Array,
119576
+ "default": function _default() {
119577
+ return [];
119578
+ }
119579
+ }
119580
+ },
119581
+ render: function render(h, ctx) {
119582
+ return ctx.props.nodes || [];
119583
+ }
119584
+ };
119585
+
119431
119586
  /**
119432
119587
  * 单个筛选条件渲染组件(组件内部使用,不对外暴露)
119433
119588
  * 使用 render 函数实现,避免主区/次区重复书写同一套控件模板
@@ -119475,7 +119630,12 @@ var FilterSearchItem = {
119475
119630
  onFocus: {
119476
119631
  type: Function,
119477
119632
  "default": null
119478
- } // 下拉聚焦/展开时的回调
119633
+ },
119634
+ // 下拉聚焦/展开时的回调
119635
+ layoutWidth: {
119636
+ type: Number,
119637
+ "default": 0
119638
+ } // 首行测得的统一项宽(px);0 表示尚未测得,沿用样式默认值
119479
119639
  },
119480
119640
  render: function render(h) {
119481
119641
  var _this = this;
@@ -119490,12 +119650,34 @@ var FilterSearchItem = {
119490
119650
  };
119491
119651
  var clearable = cond.clearable !== false;
119492
119652
  var placeholder = cond.placeholder || (cond.type === 'text' ? "\u8BF7\u8F93\u5165".concat(cond.label) : "\u8BF7\u9009\u62E9".concat(cond.label));
119493
- // 自定义宽度(可选扩展字段):支持数字(px)或任意 CSS 宽度字符串
119494
- var width = cond.width;
119495
- var style = width ? {
119496
- width: typeof width === 'number' ? "".concat(width, "px") : width,
119497
- flexBasis: typeof width === 'number' ? "".concat(width, "px") : width
119498
- } : null;
119653
+ // 宽度:单条 cond.width 优先(数字按 px);否则使用父组件按行宽算出的统一宽度
119654
+ var custom = cond.width;
119655
+ var hasCustom = custom !== undefined && custom !== null && custom !== '';
119656
+ var toCss = function toCss(value) {
119657
+ return typeof value === 'number' ? "".concat(value, "px") : value;
119658
+ };
119659
+ var style = null;
119660
+ if (hasCustom) {
119661
+ var css = toCss(custom);
119662
+ style = {
119663
+ '--filter-item-width': css,
119664
+ width: css,
119665
+ flexBasis: css,
119666
+ flexGrow: 0,
119667
+ flexShrink: 0,
119668
+ minWidth: css,
119669
+ maxWidth: css
119670
+ };
119671
+ } else if (this.layoutWidth > 0) {
119672
+ var _css = "".concat(this.layoutWidth, "px");
119673
+ style = {
119674
+ '--filter-item-width': _css,
119675
+ width: _css,
119676
+ flexBasis: _css,
119677
+ flexGrow: 0,
119678
+ flexShrink: 0
119679
+ };
119680
+ }
119499
119681
  var controlEl = null;
119500
119682
  switch (cond.type) {
119501
119683
  // 文本输入框
@@ -119614,14 +119796,17 @@ var FilterSearchItem = {
119614
119796
  * 用法:
119615
119797
  * <standard-filterbar v-model="searchBar" show-export @search="..." @export="..." />
119616
119798
  * 说明:
119617
- * v-model 绑定的 searchBar 对象包含 searchCondition(条件配置列表)、searchVariable(绑定值对象)
119618
- * 与 mainConditionCount(主区条件个数上限,未传入时默认 4),
119619
- * 组件依据 searchCondition 渲染控件,值通过 searchVariable 双向绑定回父组件。
119799
+ * v-model 绑定的 searchBar 对象包含 searchCondition(条件配置列表)、searchVariable(绑定值对象)。
119800
+ * 默认插槽中的 standard-filterbar-item 排在 searchCondition 之前;首行放不下的进入“更多”或“高级查询”。
119801
+ * 不传插槽时仍按单标签使用。单项宽 175–300px。
119802
+ * 未显式传入 mainConditionCount 时不设个数上限,传入时作为首行个数上限。
119803
+ * isMain 仍可写在配置中,不再参与首行/其余的划分。
119620
119804
  */
119621
- /* harmony default export */ const StandardFilterbarvue_type_script_lang_js = ({
119805
+ var StandardFilterbar = {
119622
119806
  name: 'StandardFilterbar',
119623
119807
  components: {
119624
119808
  FilterSearchItem: FilterSearchItem,
119809
+ FilterSlotGroup: FilterSlotGroup,
119625
119810
  StandardButton: StandardButton,
119626
119811
  StandardAdvancedQuery: StandardAdvancedQuery
119627
119812
  },
@@ -119631,7 +119816,7 @@ var FilterSearchItem = {
119631
119816
  event: 'input'
119632
119817
  },
119633
119818
  props: {
119634
- // v-model 绑定的筛选配置对象:{ searchCondition: [], searchVariable: {}, mainConditionCount: 4 }
119819
+ // v-model 绑定的筛选配置对象:{ searchCondition: [], searchVariable: {}, mainConditionCount }
119635
119820
  searchBar: {
119636
119821
  type: Object,
119637
119822
  required: true
@@ -119652,6 +119837,11 @@ var FilterSearchItem = {
119652
119837
  type: Boolean,
119653
119838
  "default": false
119654
119839
  },
119840
+ // 更多条件是否向筛选栏上方展开。仅在为 true 且未使用高级查询时生效;否则在下方展开
119841
+ expandUpwards: {
119842
+ type: Boolean,
119843
+ "default": true
119844
+ },
119655
119845
  // 查询按钮 loading 状态(可选,由父组件控制)
119656
119846
  loading: {
119657
119847
  type: Boolean,
@@ -119675,7 +119865,11 @@ var FilterSearchItem = {
119675
119865
  // 远程下拉加载状态:{ 条件value: Boolean }
119676
119866
  remoteMethods: {},
119677
119867
  // 远程下拉防抖方法缓存:{ 条件value: Function }
119678
- initValues: {} // searchVariable 初始值快照(组件创建时刻),用于“重置”
119868
+ initValues: {},
119869
+ // searchVariable 初始值快照(组件创建时刻),用于“重置”
119870
+ visibleCount: 99,
119871
+ // 首行可展示的条件个数,挂载后按容器宽度重算
119872
+ sharedItemWidth: 0 // 首行弹性项的统一宽度(px),0 表示沿用样式默认 175
119679
119873
  };
119680
119874
  },
119681
119875
  computed: {
@@ -119684,95 +119878,329 @@ var FilterSearchItem = {
119684
119878
  var list = this.searchBar && this.searchBar.searchCondition || [];
119685
119879
  return Array.isArray(list) ? list : [];
119686
119880
  },
119687
- // 主区条件个数上限:由父组件通过 searchBar.mainConditionCount 传入,
119688
- // 未传入、为空或非法时默认 4
119689
- mainConditionCount: function mainConditionCount() {
119881
+ // 首行个数上限:仅当 searchBar.mainConditionCount 显式传入且为非负数字时生效;
119882
+ // 未传则只受容器宽度限制
119883
+ firstRowLimit: function firstRowLimit() {
119690
119884
  var count = this.searchBar && this.searchBar.mainConditionCount;
119885
+ if (count === undefined || count === null || count === '') return null;
119691
119886
  var num = Number(count);
119692
- return count === undefined || count === null || count === '' || isNaN(num) || num < 0 ? 4 : num;
119887
+ if (isNaN(num) || num < 0) return null;
119888
+ return Math.floor(num);
119693
119889
  },
119694
- // 主区条件(isMain 为 'Y' 或 true)
119695
- mainConditions: function mainConditions() {
119890
+ // 参与排布的条件:保持 searchCondition 数组顺序,空项不渲染
119891
+ orderedConditions: function orderedConditions() {
119696
119892
  return this.conditions.filter(function (cond) {
119697
- return cond && (cond.isMain === 'Y' || cond.isMain === true);
119893
+ return cond && _typeof(cond) === 'object';
119698
119894
  });
119699
119895
  },
119700
- // 次区条件
119701
- secondaryConditions: function secondaryConditions() {
119702
- return this.conditions.filter(function (cond) {
119703
- return !cond || cond.isMain !== 'Y' && cond.isMain !== true;
119704
- });
119896
+ // 向上展开:属性为 true,且当前不是高级查询
119897
+ expandAbove: function expandAbove() {
119898
+ return this.expandUpwards && !this.showAdvancedQuery;
119705
119899
  },
119706
- // 次区是否可见:高级查询模式下次区条件收进弹窗(不展开显示);
119707
- // 未开启“更多”功能时次区常显
119708
- secondaryVisible: function secondaryVisible() {
119709
- if (!this.secondaryConditions.length) return false;
119710
- if (this.showAdvancedQuery) return false;
119711
- return this.showExpand ? this.expanded : true;
119712
- },
119713
- // 次区已填写条件的数量(用于“更多 (n)”角标)
119714
- secondaryActiveCount: function secondaryActiveCount() {
119715
- var _this2 = this;
119716
- return this.secondaryConditions.filter(function (cond) {
119717
- return _this2.hasValue(cond);
119718
- }).length;
119900
+ // 更多按钮箭头:向上展开时,收起箭头朝上、展开后箭头朝下
119901
+ expandIcon: function expandIcon() {
119902
+ if (this.expandAbove) return this.expanded ? 'el-icon-arrow-down' : 'el-icon-arrow-up';
119903
+ return this.expanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down';
119719
119904
  }
119720
119905
  },
119721
119906
  watch: {
119722
119907
  // 条件配置动态变化时重新校验,并为新增的远程下拉补充初始化
119723
119908
  'searchBar.searchCondition': function searchBarSearchCondition(val) {
119724
- var _this3 = this;
119909
+ var _this2 = this;
119725
119910
  this.validate();
119911
+ this.scheduleMeasure();
119726
119912
  if (!this.renderValid) return;
119727
119913
  var list = Array.isArray(val) ? val : [];
119728
119914
  list.forEach(function (cond) {
119729
- if (_this3.isRemoteCond(cond)) {
119730
- if (!_this3.remoteMethods[cond.value]) {
119731
- _this3.remoteMethods[cond.value] = _this3.debounce(function (keyword) {
119732
- return _this3.loadRemoteOptions(cond, keyword);
119915
+ if (_this2.isRemoteCond(cond)) {
119916
+ if (!_this2.remoteMethods[cond.value]) {
119917
+ _this2.remoteMethods[cond.value] = _this2.debounce(function (keyword) {
119918
+ return _this2.loadRemoteOptions(cond, keyword);
119733
119919
  }, 300);
119734
119920
  }
119735
- if (!Object.prototype.hasOwnProperty.call(_this3.remoteOptions, cond.value)) {
119736
- _this3.loadRemoteOptions(cond, '');
119921
+ if (!Object.prototype.hasOwnProperty.call(_this2.remoteOptions, cond.value)) {
119922
+ _this2.loadRemoteOptions(cond, '');
119737
119923
  }
119738
119924
  }
119739
119925
  });
119926
+ },
119927
+ showExport: function showExport() {
119928
+ this.scheduleMeasure();
119929
+ },
119930
+ showExpand: function showExpand() {
119931
+ this.scheduleMeasure();
119932
+ },
119933
+ showAdvancedQuery: function showAdvancedQuery() {
119934
+ this.scheduleMeasure();
119740
119935
  }
119741
119936
  },
119742
119937
  created: function created() {
119743
- var _this4 = this;
119938
+ var _this3 = this;
119744
119939
  // 深拷贝初始值快照:作为“重置”按钮的恢复目标
119745
119940
  this.initValues = this.deepCopy(this.searchBar && this.searchBar.searchVariable || {});
119746
119941
  // 渲染前校验:失败则 renderValid=false,组件不渲染
119747
119942
  this.validate();
119748
119943
  if (!this.renderValid) return;
119749
- // 无主要条件时默认展开次区;关闭“更多”功能时次区常显
119750
- if (!this.showExpand || this.mainConditions.length === 0) {
119944
+ // 关闭“更多”时,未进首行的条件换行常显
119945
+ if (!this.showExpand) {
119751
119946
  this.expanded = true;
119752
119947
  }
119948
+ this._slotStamp = 0;
119949
+ this._slotBucket = null;
119950
+ this._measuredSlotCount = 0;
119753
119951
  // 为远程下拉预先创建防抖方法,并做首次数据加载
119754
- this.mainConditions.concat(this.secondaryConditions).forEach(function (cond) {
119755
- if (_this4.isRemoteCond(cond)) {
119756
- if (!_this4.remoteMethods[cond.value]) {
119757
- _this4.remoteMethods[cond.value] = _this4.debounce(function (keyword) {
119758
- return _this4.loadRemoteOptions(cond, keyword);
119952
+ this.conditions.forEach(function (cond) {
119953
+ if (_this3.isRemoteCond(cond)) {
119954
+ if (!_this3.remoteMethods[cond.value]) {
119955
+ _this3.remoteMethods[cond.value] = _this3.debounce(function (keyword) {
119956
+ return _this3.loadRemoteOptions(cond, keyword);
119759
119957
  }, 300);
119760
119958
  }
119761
- _this4.loadRemoteOptions(cond, '');
119959
+ _this3.loadRemoteOptions(cond, '');
119762
119960
  }
119763
119961
  });
119764
119962
  },
119963
+ beforeUpdate: function beforeUpdate() {
119964
+ // 同一次渲染里多次读取插槽时复用同一批 vnode,避免自定义控件被创建两份
119965
+ this._slotStamp = (this._slotStamp || 0) + 1;
119966
+ this._slotBucket = null;
119967
+ },
119968
+ mounted: function mounted() {
119969
+ var _this4 = this;
119970
+ this.$nextTick(function () {
119971
+ _this4.bindResize();
119972
+ _this4.measureVisibleCount();
119973
+ });
119974
+ },
119975
+ updated: function updated() {
119976
+ var count = this.readSlotNodes().length;
119977
+ if (count !== this._measuredSlotCount) {
119978
+ this._measuredSlotCount = count;
119979
+ this.scheduleMeasure();
119980
+ }
119981
+ },
119982
+ beforeDestroy: function beforeDestroy() {
119983
+ if (this._resizeObserver) {
119984
+ this._resizeObserver.disconnect();
119985
+ this._resizeObserver = null;
119986
+ }
119987
+ if (this._measureRaf) {
119988
+ cancelAnimationFrame(this._measureRaf);
119989
+ this._measureRaf = 0;
119990
+ }
119991
+ if (this._onWindowResize) {
119992
+ window.removeEventListener('resize', this._onWindowResize);
119993
+ this._onWindowResize = null;
119994
+ }
119995
+ },
119765
119996
  methods: {
119997
+ /** 下一帧重算首行容量,合并同一帧内的连续触发 */scheduleMeasure: function scheduleMeasure() {
119998
+ var _this5 = this;
119999
+ if (this._measureRaf) return;
120000
+ this._measureRaf = requestAnimationFrame(function () {
120001
+ _this5._measureRaf = 0;
120002
+ _this5.measureVisibleCount();
120003
+ });
120004
+ },
120005
+ /** 监听筛选行与按钮区尺寸:窗口缩放、分割条拖动都会改变可用宽度 */bindResize: function bindResize() {
120006
+ var _this6 = this;
120007
+ var row = this.$refs.filterRow;
120008
+ if (!row || typeof ResizeObserver === 'undefined') {
120009
+ this._onWindowResize = function () {
120010
+ return _this6.scheduleMeasure();
120011
+ };
120012
+ window.addEventListener('resize', this._onWindowResize);
120013
+ return;
120014
+ }
120015
+ this._resizeObserver = new ResizeObserver(function () {
120016
+ return _this6.scheduleMeasure();
120017
+ });
120018
+ this._resizeObserver.observe(row);
120019
+ if (this.$refs.filterActions) this._resizeObserver.observe(this.$refs.filterActions);
120020
+ },
120021
+ /** 将条件宽度解析为 px;百分比等非 px 写法返回 null */parseItemPx: function parseItemPx(width) {
120022
+ if (width == null || width === '') return null;
120023
+ if (typeof width === 'number' && !isNaN(width)) return width;
120024
+ if (typeof width === 'string') {
120025
+ var matched = /^(\d+(?:\.\d+)?)px$/.exec(width.trim());
120026
+ if (matched) return Number(matched[1]);
120027
+ }
120028
+ return null;
120029
+ },
120030
+ /** 读取默认插槽中的 standard-filterbar-item,每个节点计为一条筛选条件 */readSlotNodes: function readSlotNodes() {
120031
+ var _this7 = this;
120032
+ var scoped = this.$scopedSlots && this.$scopedSlots["default"];
120033
+ var raw = typeof scoped === 'function' ? scoped({}) : this.$slots && this.$slots["default"] || [];
120034
+ return raw.filter(function (node) {
120035
+ return _this7.isFilterbarItemNode(node);
120036
+ });
120037
+ },
120038
+ /** 是否为筛选栏插槽项(忽略插槽里的空白文本节点) */isFilterbarItemNode: function isFilterbarItemNode(vnode) {
120039
+ if (!vnode || !vnode.tag || !vnode.componentOptions) return false;
120040
+ var Ctor = vnode.componentOptions.Ctor;
120041
+ var name = Ctor && Ctor.options && Ctor.options.name || Ctor && Ctor.extendOptions && Ctor.extendOptions.name || '';
120042
+ if (name === 'StandardFilterbarItem') return true;
120043
+ return String(vnode.componentOptions.tag || '') === 'standard-filterbar-item';
120044
+ },
120045
+ /**
120046
+ * 同一次渲染只收集一次插槽节点。
120047
+ * 插槽项整体排在 searchCondition 之前,再按 visibleCount 切到首行或其余区域。
120048
+ */
120049
+ ensureSlotBucket: function ensureSlotBucket() {
120050
+ if (this._slotBucket && this._slotBucket.stamp === this._slotStamp) return this._slotBucket;
120051
+ var nodes = this.readSlotNodes();
120052
+ var layoutWidth = this.sharedItemWidth;
120053
+ nodes.forEach(function (node, index) {
120054
+ var props = node.componentOptions && node.componentOptions.propsData || {};
120055
+ node.componentOptions.propsData = Object.assign({}, props, {
120056
+ layoutWidth: layoutWidth
120057
+ });
120058
+ if (!node.key) node.key = "standard-filterbar-item-".concat(index);
120059
+ });
120060
+ var primaryCount = Math.min(this.visibleCount, nodes.length);
120061
+ this._slotBucket = {
120062
+ stamp: this._slotStamp,
120063
+ nodes: nodes,
120064
+ primary: nodes.slice(0, primaryCount),
120065
+ overflow: nodes.slice(primaryCount)
120066
+ };
120067
+ return this._slotBucket;
120068
+ },
120069
+ primarySlotNodes: function primarySlotNodes() {
120070
+ return this.ensureSlotBucket().primary;
120071
+ },
120072
+ overflowSlotNodes: function overflowSlotNodes() {
120073
+ return this.ensureSlotBucket().overflow;
120074
+ },
120075
+ /** searchCondition 进入首行的起点:插槽项先占用 visibleCount */conditionSplitIndex: function conditionSplitIndex() {
120076
+ return Math.max(0, this.visibleCount - this.ensureSlotBucket().nodes.length);
120077
+ },
120078
+ primaryConditionList: function primaryConditionList() {
120079
+ return this.orderedConditions.slice(0, this.conditionSplitIndex());
120080
+ },
120081
+ overflowConditionList: function overflowConditionList() {
120082
+ return this.orderedConditions.slice(this.conditionSplitIndex());
120083
+ },
120084
+ hasOverflow: function hasOverflow() {
120085
+ return this.overflowSlotNodes().length > 0 || this.overflowConditionList().length > 0;
120086
+ },
120087
+ /** 未进首行的区域是否展开。高级查询时自定义项改放到弹窗,这里不展开 */secondaryOpen: function secondaryOpen() {
120088
+ if (!this.hasOverflow()) return false;
120089
+ if (this.showAdvancedQuery) return false;
120090
+ return this.showExpand ? this.expanded : true;
120091
+ },
120092
+ /** 未进首行且已填写的配置项数量(用于“更多 (n)”角标) */overflowActiveCount: function overflowActiveCount() {
120093
+ var _this8 = this;
120094
+ return this.overflowConditionList().filter(function (cond) {
120095
+ return _this8.hasValue(cond);
120096
+ }).length;
120097
+ },
120098
+ /**
120099
+ * 按当前行宽计算首行条数和弹性项宽度。
120100
+ * 先按“不显示更多/高级查询按钮”试装,装得下则全部留在首行;
120101
+ * 装不下再扣掉该按钮宽度重算,避免按钮显隐来回跳动。
120102
+ */
120103
+ measureVisibleCount: function measureVisibleCount() {
120104
+ var _this9 = this;
120105
+ var row = this.$refs.filterRow;
120106
+ var actions = this.$refs.filterActions;
120107
+ if (!row || !actions) return;
120108
+ var rowWidth = row.clientWidth;
120109
+ if (rowWidth < 50) return;
120110
+ var ordered = this.orderedConditions;
120111
+ var slotNodes = this.readSlotNodes();
120112
+ var total = slotNodes.length + ordered.length;
120113
+ this._measuredSlotCount = slotNodes.length;
120114
+ if (!total) {
120115
+ if (this.visibleCount !== 0) this.visibleCount = 0;
120116
+ return;
120117
+ }
120118
+ var rowGap = this.readFlexGap(row);
120119
+ var actionsGap = this.readFlexGap(actions);
120120
+ var minItem = 175;
120121
+ var maxItem = 300;
120122
+ var moreEl = this.getOverflowButtonEl();
120123
+ var moreWidth = this._moreButtonWidth || (this.showAdvancedQuery ? 108 : 80);
120124
+ if (moreEl && moreEl.offsetWidth) {
120125
+ moreWidth = moreEl.offsetWidth;
120126
+ this._moreButtonWidth = moreWidth;
120127
+ }
120128
+ var moreVisible = !!(moreEl && moreEl.offsetWidth);
120129
+ var baseActions = actions.offsetWidth;
120130
+ if (moreVisible) baseActions -= moreWidth + actionsGap;
120131
+ if (baseActions < 0) baseActions = 0;
120132
+ var widthOf = function widthOf(item) {
120133
+ var parsed = _this9.parseItemPx(item && item.width);
120134
+ return parsed == null ? minItem : parsed;
120135
+ };
120136
+ var descriptors = slotNodes.map(function (node) {
120137
+ return node.componentOptions && node.componentOptions.propsData || {};
120138
+ }).concat(ordered);
120139
+ var minWidths = descriptors.map(widthOf);
120140
+ var fit = function fit(actionsW) {
120141
+ var used = 0;
120142
+ var count = 0;
120143
+ for (var i = 0; i < minWidths.length; i++) {
120144
+ var itemsWidth = used + minWidths[i];
120145
+ var _gaps = (i + 1) * rowGap;
120146
+ if (itemsWidth + _gaps + actionsW <= rowWidth - 1) {
120147
+ used = itemsWidth;
120148
+ count = i + 1;
120149
+ } else {
120150
+ break;
120151
+ }
120152
+ }
120153
+ if (!count) count = 1;
120154
+ return count;
120155
+ };
120156
+ var hideOverflow = this.showAdvancedQuery || this.showExpand;
120157
+ var count = fit(baseActions);
120158
+ if (hideOverflow && count < total) {
120159
+ count = fit(baseActions + moreWidth + actionsGap);
120160
+ }
120161
+ var limit = this.firstRowLimit;
120162
+ if (limit != null) count = Math.min(count, limit);
120163
+ count = Math.max(0, Math.min(count, total));
120164
+ var fixed = 0;
120165
+ var flexCount = 0;
120166
+ for (var i = 0; i < count; i++) {
120167
+ var parsed = this.parseItemPx(descriptors[i].width);
120168
+ var hasCustom = descriptors[i].width !== undefined && descriptors[i].width !== null && descriptors[i].width !== '';
120169
+ if (hasCustom && parsed != null) fixed += parsed;else if (hasCustom) fixed += minItem;else flexCount += 1;
120170
+ }
120171
+ var actionsUsed = baseActions + (hideOverflow && count < total ? moreWidth + actionsGap : 0);
120172
+ var gaps = count > 0 ? count * rowGap : 0;
120173
+ var shared = this.sharedItemWidth;
120174
+ if (flexCount > 0) {
120175
+ shared = Math.floor((rowWidth - actionsUsed - gaps - fixed) / flexCount);
120176
+ if (shared < minItem) shared = minItem;
120177
+ if (shared > maxItem) shared = maxItem;
120178
+ }
120179
+ if (this.visibleCount !== count) this.visibleCount = count;
120180
+ if (Math.abs((this.sharedItemWidth || 0) - shared) > 1) this.sharedItemWidth = shared;
120181
+ },
120182
+ /** 读取 flex 间距(column-gap / gap) */readFlexGap: function readFlexGap(el) {
120183
+ var style = window.getComputedStyle(el);
120184
+ var raw = style.columnGap && style.columnGap !== 'normal' ? style.columnGap : style.gap;
120185
+ var value = parseFloat(raw);
120186
+ return isNaN(value) ? 6 : value;
120187
+ },
120188
+ /** “更多”或“高级查询”按钮的根节点,用于扣减其占位宽度 */getOverflowButtonEl: function getOverflowButtonEl() {
120189
+ var more = this.$refs.moreButton;
120190
+ if (more && more.$el) return more.$el;
120191
+ var advanced = this.$refs.advancedQuery;
120192
+ if (advanced && advanced.$el) return advanced.$el;
120193
+ return null;
120194
+ },
119766
120195
  /**
119767
120196
  * 渲染前整体校验。
119768
120197
  * 以下情况组件渲染失败,并在控制台输出详细错误:
119769
- * 1. 主要的筛选条件超过 searchBar.mainConditionCount 配置的个数(默认 4)
119770
- * 2. 未传入查询事件对应的方法(@search)
119771
- * 3. searchCondition 中的 value 在 searchVariable 中不存在
119772
- * 4. searchCondition 中的必填项(label/value/type)未填
120198
+ * 1. 未传入查询事件对应的方法(@search)
120199
+ * 2. searchCondition 中的 value 在 searchVariable 中不存在
120200
+ * 3. searchCondition 中的必填项(label/value/type)未填
119773
120201
  */
119774
120202
  validate: function validate() {
119775
- var _this5 = this;
120203
+ var _this0 = this;
119776
120204
  var errors = [];
119777
120205
  var searchBar = this.searchBar;
119778
120206
  if (!searchBar || _typeof(searchBar) !== 'object') {
@@ -119785,15 +120213,6 @@ var FilterSearchItem = {
119785
120213
  } else if (!searchVariable || _typeof(searchVariable) !== 'object' || Array.isArray(searchVariable)) {
119786
120214
  errors.push('searchVariable 必须为非空对象');
119787
120215
  } else {
119788
- // 规则 1:主要条件数量校验(上限取 searchBar.mainConditionCount,默认 4)
119789
- var mainList = searchCondition.filter(function (c) {
119790
- return c && (c.isMain === 'Y' || c.isMain === true);
119791
- });
119792
- if (mainList.length > this.mainConditionCount) {
119793
- errors.push("\u4E3B\u8981\u7684\u7B5B\u9009\u6761\u4EF6\u4E0D\u80FD\u8D85\u8FC7 ".concat(this.mainConditionCount, " \u4E2A\uFF08\u5F53\u524D ").concat(mainList.length, " \u4E2A\uFF1A").concat(mainList.map(function (c) {
119794
- return c.label;
119795
- }).join('、'), "\uFF09"));
119796
- }
119797
120216
  var validTypes = ['text', 'date', 'datetime', 'select', 'select-multi'];
119798
120217
  var seenValues = {};
119799
120218
  // 规则 3/4:逐条校验条件配置
@@ -119824,7 +120243,7 @@ var FilterSearchItem = {
119824
120243
  console.warn("[StandardFilterbar] \u7B2C ".concat(index + 1, " \u6761\u7B5B\u9009\u6761\u4EF6\u201C").concat(cond.label, "\u201D\u4E3A\u4E0B\u62C9\u7C7B\u578B\uFF0C\u4F46\u672A\u914D\u7F6E selectSource \u6216 remote\uFF0C\u4E0B\u62C9\u6570\u636E\u4E3A\u7A7A"));
119825
120244
  }
119826
120245
  // 非致命提醒 2:remote 传字符串但未在父组件中找到对应方法(仅警告)
119827
- if (typeof cond.remote === 'string' && !_this5.resolveRemoteFn(cond.remote)) {
120246
+ if (typeof cond.remote === 'string' && !_this0.resolveRemoteFn(cond.remote)) {
119828
120247
  console.warn("[StandardFilterbar] \u7B2C ".concat(index + 1, " \u6761\u7B5B\u9009\u6761\u4EF6\u201C").concat(cond.label, "\u201D\u7684 remote=\"").concat(cond.remote, "\" \u672A\u5728\u7236\u7EC4\u4EF6\u4E2D\u627E\u5230\u5BF9\u5E94\u65B9\u6CD5"));
119829
120248
  }
119830
120249
  // 非致命提醒 3:value 重复定义(仅警告)
@@ -119835,7 +120254,7 @@ var FilterSearchItem = {
119835
120254
  });
119836
120255
  }
119837
120256
  }
119838
- // 规则 2:查询事件校验
120257
+ // 查询事件校验
119839
120258
  if (typeof this.$listeners.search !== 'function') {
119840
120259
  errors.push('未传入查询事件对应的方法,请通过 @search 绑定查询方法');
119841
120260
  }
@@ -119854,17 +120273,17 @@ var FilterSearchItem = {
119854
120273
  this.$emit('search');
119855
120274
  },
119856
120275
  /** 重置:将所有筛选条件恢复为组件创建时刻的初始值 */onReset: function onReset() {
119857
- var _this6 = this;
120276
+ var _this1 = this;
119858
120277
  var variable = this.searchBar && this.searchBar.searchVariable;
119859
120278
  if (variable && this.initValues) {
119860
120279
  Object.keys(this.initValues).forEach(function (key) {
119861
120280
  // 使用 $set 保证新值具备响应式
119862
- _this6.$set(variable, key, _this6.deepCopy(_this6.initValues[key]));
120281
+ _this1.$set(variable, key, _this1.deepCopy(_this1.initValues[key]));
119863
120282
  });
119864
120283
  // 多选下拉的值规范为数组,避免 Element UI 类型告警
119865
120284
  this.conditions.forEach(function (cond) {
119866
120285
  if (cond.type === 'select-multi' && !Array.isArray(variable[cond.value])) {
119867
- _this6.$set(variable, cond.value, []);
120286
+ _this1.$set(variable, cond.value, []);
119868
120287
  }
119869
120288
  });
119870
120289
  }
@@ -119904,19 +120323,19 @@ var FilterSearchItem = {
119904
120323
  * 统一归一化为 [{ label, value }] 后缓存。
119905
120324
  */
119906
120325
  loadRemoteOptions: function loadRemoteOptions(cond, keyword) {
119907
- var _this7 = this;
120326
+ var _this10 = this;
119908
120327
  var fn = this.resolveRemoteFn(cond.remote);
119909
120328
  if (!fn) return Promise.resolve([]);
119910
120329
  this.$set(this.remoteLoading, cond.value, true);
119911
120330
  return Promise.resolve(fn(keyword == null ? '' : keyword)).then(function (res) {
119912
- var options = _this7.normalizeOptions(_this7.extractOptions(res), cond);
119913
- _this7.$set(_this7.remoteOptions, cond.value, options);
120331
+ var options = _this10.normalizeOptions(_this10.extractOptions(res), cond);
120332
+ _this10.$set(_this10.remoteOptions, cond.value, options);
119914
120333
  return options;
119915
120334
  })["catch"](function (err) {
119916
120335
  console.error("[StandardFilterbar] \u7B5B\u9009\u6761\u4EF6\u201C".concat(cond.label, "\u201D\u8FDC\u7A0B\u6570\u636E\u52A0\u8F7D\u5931\u8D25"), err);
119917
120336
  return [];
119918
120337
  })["finally"](function () {
119919
- _this7.$set(_this7.remoteLoading, cond.value, false);
120338
+ _this10.$set(_this10.remoteLoading, cond.value, false);
119920
120339
  });
119921
120340
  },
119922
120341
  /** 从远程方法返回值中提取选项数组(兼容多种返回结构) */extractOptions: function extractOptions(res) {
@@ -119972,9 +120391,7 @@ var FilterSearchItem = {
119972
120391
  return val !== undefined && val !== null && String(val) !== '';
119973
120392
  },
119974
120393
  /**
119975
- * 不同控件类型的宽度修饰类:
119976
- * 日期/时间选择框统一复用全局 normal-report.scss 中的 normal-report-filter-item-date 公共类,
119977
- * 与项目内其它页面(如 inspectQuery)保持一致的 170px 宽度,组件内不再自定义宽度样式
120394
+ * 日期/时间条件附加公共类。宽度与其它条件相同,由首行测量结果在 175–300px 之间写入。
119978
120395
  */
119979
120396
  itemClass: function itemClass(cond) {
119980
120397
  if (cond.type === 'date' || cond.type === 'datetime') return 'normal-report-filter-item-date';
@@ -119987,24 +120404,30 @@ var FilterSearchItem = {
119987
120404
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
119988
120405
  var timer = null;
119989
120406
  return function () {
119990
- var _this8 = this;
120407
+ var _this11 = this;
119991
120408
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
119992
120409
  args[_key] = arguments[_key];
119993
120410
  }
119994
120411
  if (timer) clearTimeout(timer);
119995
120412
  timer = setTimeout(function () {
119996
120413
  timer = null;
119997
- fn.apply(_this8, args);
120414
+ fn.apply(_this11, args);
119998
120415
  }, delay);
119999
120416
  };
120000
120417
  }
120001
120418
  }
120002
- });
120419
+ };
120420
+ StandardFilterbar.Item = Item;
120421
+ StandardFilterbar.install = function (Vue) {
120422
+ Vue.component(StandardFilterbar.name, StandardFilterbar);
120423
+ Vue.component(Item.name, Item);
120424
+ };
120425
+ /* harmony default export */ const StandardFilterbarvue_type_script_lang_js = (StandardFilterbar);
120003
120426
  ;// ./src/components/StandardFilterbar/index.vue?vue&type=script&lang=js
120004
120427
  /* harmony default export */ const components_StandardFilterbarvue_type_script_lang_js = (StandardFilterbarvue_type_script_lang_js);
120005
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardFilterbar/index.vue?vue&type=style&index=0&id=a1e74ef8&prod&lang=scss
120006
- var StandardFilterbarvue_type_style_index_0_id_a1e74ef8_prod_lang_scss = __webpack_require__(5571);
120007
- ;// ./src/components/StandardFilterbar/index.vue?vue&type=style&index=0&id=a1e74ef8&prod&lang=scss
120428
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/StandardFilterbar/index.vue?vue&type=style&index=0&id=042f1c58&prod&lang=scss
120429
+ var StandardFilterbarvue_type_style_index_0_id_042f1c58_prod_lang_scss = __webpack_require__(8365);
120430
+ ;// ./src/components/StandardFilterbar/index.vue?vue&type=style&index=0&id=042f1c58&prod&lang=scss
120008
120431
 
120009
120432
  ;// ./src/components/StandardFilterbar/index.vue
120010
120433
 
@@ -120017,8 +120440,8 @@ var StandardFilterbarvue_type_style_index_0_id_a1e74ef8_prod_lang_scss = __webpa
120017
120440
 
120018
120441
  var StandardFilterbar_component = normalizeComponent(
120019
120442
  components_StandardFilterbarvue_type_script_lang_js,
120020
- StandardFilterbarvue_type_template_id_a1e74ef8_render,
120021
- StandardFilterbarvue_type_template_id_a1e74ef8_staticRenderFns,
120443
+ StandardFilterbarvue_type_template_id_042f1c58_render,
120444
+ StandardFilterbarvue_type_template_id_042f1c58_staticRenderFns,
120022
120445
  false,
120023
120446
  null,
120024
120447
  null,
@@ -120026,7 +120449,7 @@ var StandardFilterbar_component = normalizeComponent(
120026
120449
 
120027
120450
  )
120028
120451
 
120029
- /* harmony default export */ const StandardFilterbar = (StandardFilterbar_component.exports);
120452
+ /* harmony default export */ const components_StandardFilterbar = (StandardFilterbar_component.exports);
120030
120453
  ;// ./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/StandardForm/index.vue?vue&type=template&id=16c030ac
120031
120454
  var StandardFormvue_type_template_id_16c030ac_render = function render() {
120032
120455
  var _vm = this,
@@ -120192,7 +120615,7 @@ var Itemvue_type_template_id_ccd7639c_staticRenderFns = [];
120192
120615
  ;// ./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/StandardForm/Item.vue?vue&type=script&lang=js
120193
120616
  // 注意:standard-form-item 的全部样式已统一在 ./StandardForm.scss 中
120194
120617
  // (与父组件 StandardForm 共用同一份样式文件,避免重复注入)
120195
- /* harmony default export */ const Itemvue_type_script_lang_js = ({
120618
+ /* harmony default export */ const StandardForm_Itemvue_type_script_lang_js = ({
120196
120619
  name: "StandardFormItem",
120197
120620
  props: {
120198
120621
  // 标签文案(参与 label-width 自动计算)
@@ -120250,7 +120673,7 @@ var Itemvue_type_template_id_ccd7639c_staticRenderFns = [];
120250
120673
  }
120251
120674
  });
120252
120675
  ;// ./src/components/StandardForm/Item.vue?vue&type=script&lang=js
120253
- /* harmony default export */ const StandardForm_Itemvue_type_script_lang_js = (Itemvue_type_script_lang_js);
120676
+ /* harmony default export */ const components_StandardForm_Itemvue_type_script_lang_js = (StandardForm_Itemvue_type_script_lang_js);
120254
120677
  ;// ./src/components/StandardForm/Item.vue
120255
120678
 
120256
120679
 
@@ -120259,8 +120682,8 @@ var Itemvue_type_template_id_ccd7639c_staticRenderFns = [];
120259
120682
 
120260
120683
  /* normalize component */
120261
120684
  ;
120262
- var Item_component = normalizeComponent(
120263
- StandardForm_Itemvue_type_script_lang_js,
120685
+ var StandardForm_Item_component = normalizeComponent(
120686
+ components_StandardForm_Itemvue_type_script_lang_js,
120264
120687
  Itemvue_type_template_id_ccd7639c_render,
120265
120688
  Itemvue_type_template_id_ccd7639c_staticRenderFns,
120266
120689
  false,
@@ -120270,7 +120693,7 @@ var Item_component = normalizeComponent(
120270
120693
 
120271
120694
  )
120272
120695
 
120273
- /* harmony default export */ const Item = (Item_component.exports);
120696
+ /* harmony default export */ const StandardForm_Item = (StandardForm_Item_component.exports);
120274
120697
  ;// ./src/components/StandardForm/index.js
120275
120698
  /**
120276
120699
  * StandardForm 通用表单组件入口
@@ -120293,12 +120716,12 @@ var Item_component = normalizeComponent(
120293
120716
 
120294
120717
 
120295
120718
  // 将子组件挂载为静态属性,方便引用方统一引入注册
120296
- StandardForm.Item = Item;
120719
+ StandardForm.Item = StandardForm_Item;
120297
120720
 
120298
120721
  // 支持 Vue.use 全局注册
120299
120722
  StandardForm.install = function (Vue) {
120300
120723
  Vue.component(StandardForm.name, StandardForm);
120301
- Vue.component(Item.name, Item);
120724
+ Vue.component(StandardForm_Item.name, StandardForm_Item);
120302
120725
  };
120303
120726
  /* harmony default export */ const components_StandardForm = (StandardForm);
120304
120727
  ;// ./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/StandardHalfArea/index.vue?vue&type=template&id=7888c782&scoped=true
@@ -121099,8 +121522,8 @@ var StandardTimePick_component = normalizeComponent(
121099
121522
  )
121100
121523
 
121101
121524
  /* harmony default export */ const StandardTimePick = (StandardTimePick_component.exports);
121102
- ;// ./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=a9e9136a
121103
- var StandardTablevue_type_template_id_a9e9136a_render = function render() {
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=b1d59d54
121526
+ var StandardTablevue_type_template_id_b1d59d54_render = function render() {
121104
121527
  var _vm = this,
121105
121528
  _c = _vm._self._c;
121106
121529
  return _c('section', {
@@ -121350,6 +121773,7 @@ var StandardTablevue_type_template_id_a9e9136a_render = function render() {
121350
121773
  },
121351
121774
  on: {
121352
121775
  "menu-click": _vm.onMenuClick,
121776
+ "resizable-change": _vm.onColumnResizableChange,
121353
121777
  "checkbox-change": _vm.handleCheckboxChange,
121354
121778
  "checkbox-all": _vm.handleCheckboxChange,
121355
121779
  "current-change": _vm.handleCurrentRowChange,
@@ -121379,7 +121803,7 @@ var StandardTablevue_type_template_id_a9e9136a_render = function render() {
121379
121803
  "type": col.type,
121380
121804
  "field": col.field,
121381
121805
  "title": col.title,
121382
- "width": col.isOp ? col.width : undefined,
121806
+ "width": col.isOp ? col.width : col.userWidth || undefined,
121383
121807
  "min-width": col.minWidth,
121384
121808
  "fixed": col.fixed,
121385
121809
  "align": col.align,
@@ -121434,7 +121858,7 @@ var StandardTablevue_type_template_id_a9e9136a_render = function render() {
121434
121858
  }
121435
121859
  }) : _vm.getFooterEmptyVisible() ? _c('standard-footer-empty') : _vm._e()], 1);
121436
121860
  };
121437
- var StandardTablevue_type_template_id_a9e9136a_staticRenderFns = [];
121861
+ var StandardTablevue_type_template_id_b1d59d54_staticRenderFns = [];
121438
121862
 
121439
121863
  ;// ./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
121440
121864
  /**
@@ -121521,6 +121945,313 @@ var FooterEmpty_component = normalizeComponent(
121521
121945
  )
121522
121946
 
121523
121947
  /* harmony default export */ const FooterEmpty = (FooterEmpty_component.exports);
121948
+ ;// ./src/components/StandardTable/columnConfigApi.js
121949
+ /**
121950
+ * 表头配置接口。路径固定,请求方法由业务项目注入。
121951
+ * IP 和端口来自该请求方法自己的 baseURL,组件库不保存主机地址。
121952
+ */
121953
+ var GET_CONFIG = '/api/Migration/UserTableColumn/GetConfig';
121954
+ var SAVE_CONFIG = '/api/Migration/UserTableColumn/SaveConfig';
121955
+ var RESET_CONFIG = '/api/Migration/UserTableColumn/ResetConfig';
121956
+ var columnConfigApi = null;
121957
+ var columnModuleCode = '';
121958
+
121959
+ // 同一模块、同一页面内 table-code 的占用者,用于发现重复编码
121960
+ var tableCodeOwners = Object.create(null);
121961
+ function setColumnConfigRequest(request) {
121962
+ if (typeof request !== 'function') {
121963
+ columnConfigApi = null;
121964
+ return;
121965
+ }
121966
+ columnConfigApi = {
121967
+ get: function get(moduleCode, pageCode, tableCode) {
121968
+ return request({
121969
+ url: GET_CONFIG,
121970
+ method: 'get',
121971
+ params: {
121972
+ moduleCode: moduleCode,
121973
+ pageCode: pageCode,
121974
+ tableCode: tableCode
121975
+ }
121976
+ });
121977
+ },
121978
+ save: function save(moduleCode, pageCode, tableCode, columns) {
121979
+ return request({
121980
+ url: SAVE_CONFIG,
121981
+ method: 'post',
121982
+ data: {
121983
+ ModuleCode: moduleCode,
121984
+ PageCode: pageCode,
121985
+ TableCode: tableCode,
121986
+ SchemaVersion: 1,
121987
+ Columns: columns
121988
+ }
121989
+ });
121990
+ },
121991
+ reset: function reset(moduleCode, pageCode, tableCode) {
121992
+ return request({
121993
+ url: RESET_CONFIG,
121994
+ method: 'post',
121995
+ data: {
121996
+ ModuleCode: moduleCode,
121997
+ PageCode: pageCode,
121998
+ TableCode: tableCode
121999
+ }
122000
+ });
122001
+ }
122002
+ };
122003
+ }
122004
+ function getColumnConfigApi() {
122005
+ return columnConfigApi;
122006
+ }
122007
+ function setColumnModuleCode(code) {
122008
+ columnModuleCode = code != null ? String(code).trim() : '';
122009
+ }
122010
+ function getColumnModuleCode() {
122011
+ return columnModuleCode;
122012
+ }
122013
+ function tableCodeKey(moduleCode, pageCode, tableCode) {
122014
+ return moduleCode + '\n' + pageCode + '\n' + tableCode;
122015
+ }
122016
+
122017
+ // 登记表格编码。同一模块的同一页面已被其它表格占用时返回 false
122018
+ function claimTableCode(moduleCode, pageCode, tableCode, owner) {
122019
+ var key = tableCodeKey(moduleCode, pageCode, tableCode);
122020
+ var current = tableCodeOwners[key];
122021
+ if (current && current !== owner) return false;
122022
+ tableCodeOwners[key] = owner;
122023
+ return true;
122024
+ }
122025
+ function releaseTableCode(moduleCode, pageCode, tableCode, owner) {
122026
+ var key = tableCodeKey(moduleCode, pageCode, tableCode);
122027
+ if (tableCodeOwners[key] === owner) delete tableCodeOwners[key];
122028
+ }
122029
+ ;// ./src/components/StandardTable/columnPersist.js
122030
+ 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
+ /**
122032
+ * 表头配置的列主键、合并和提交数据。
122033
+ * 持久化主键不能使用 Vue 的 _uid,每次进入页面都会变化。
122034
+ */
122035
+
122036
+ // 列稳定主键:显式 column-key > field:字段名 > type:类型
122037
+ function resolveColumnKey(comp) {
122038
+ if (!comp) return '';
122039
+ var custom = comp.columnKey != null ? String(comp.columnKey).trim() : '';
122040
+ if (custom) return custom;
122041
+ if (comp.field) return 'field:' + comp.field;
122042
+ if (comp.type) return 'type:' + comp.type;
122043
+ return '';
122044
+ }
122045
+
122046
+ // 同一张表里主键重复时返回该主键,否则返回空串
122047
+ function findDuplicateColumnKey(comps) {
122048
+ var seen = Object.create(null);
122049
+ var list = Array.isArray(comps) ? comps : [];
122050
+ for (var i = 0; i < list.length; i++) {
122051
+ var key = resolveColumnKey(list[i]);
122052
+ if (!key) continue;
122053
+ if (seen[key]) return key;
122054
+ seen[key] = true;
122055
+ }
122056
+ return '';
122057
+ }
122058
+
122059
+ // 接口字段与 C# 属性名一致。已保存的小写字段仍可读。
122060
+ function readSavedColumn(item) {
122061
+ if (!item || columnPersist_typeof(item) !== 'object') return null;
122062
+ var columnKey = item.ColumnKey != null ? item.ColumnKey : item.columnKey;
122063
+ if (columnKey == null || String(columnKey).trim() === '') return null;
122064
+ return {
122065
+ columnKey: String(columnKey).trim(),
122066
+ sortNo: item.SortNo != null ? item.SortNo : item.sortNo,
122067
+ visible: item.Visible != null ? item.Visible : item.visible,
122068
+ fixed: item.Fixed != null ? item.Fixed : item.fixed,
122069
+ minWidth: item.MinWidth !== undefined ? item.MinWidth : item.minWidth,
122070
+ width: item.Width !== undefined ? item.Width : item.width,
122071
+ sortable: item.Sortable !== undefined ? item.Sortable : item.sortable
122072
+ };
122073
+ }
122074
+ function savedFixed(value) {
122075
+ return value === 'left' || value === 'right' ? value : '';
122076
+ }
122077
+ function savedMinWidth(value) {
122078
+ var width = Number(value);
122079
+ if (value == null || value === '' || !(width >= 1) || width > 500) return null;
122080
+ return Math.round(width);
122081
+ }
122082
+ function savedWidth(value) {
122083
+ var width = Number(value);
122084
+ if (value == null || value === '' || !(width >= 60) || width > 2000) return null;
122085
+ return Math.round(width);
122086
+ }
122087
+
122088
+ /**
122089
+ * 用当前代码列做主数据,把已保存列覆盖上去。
122090
+ * 新增列贴在代码声明顺序里、它前面最近一个仍存在的已保存列之后。
122091
+ * 返回 { order, states }。states 只包含命中的已保存列,新增列沿用注册时的默认状态。
122092
+ */
122093
+ function mergeColumnConfig(comps, savedColumns) {
122094
+ var list = Array.isArray(comps) ? comps.filter(Boolean) : [];
122095
+ var keyed = [];
122096
+ var unkeyed = [];
122097
+ list.forEach(function (comp) {
122098
+ var key = resolveColumnKey(comp);
122099
+ if (!key) unkeyed.push(comp);else keyed.push({
122100
+ comp: comp,
122101
+ key: key,
122102
+ uid: comp._uid
122103
+ });
122104
+ });
122105
+ var saved = (Array.isArray(savedColumns) ? savedColumns : []).map(readSavedColumn).filter(Boolean);
122106
+ if (!saved.length) return null;
122107
+ var codeMap = Object.create(null);
122108
+ keyed.forEach(function (item) {
122109
+ codeMap[item.key] = item;
122110
+ });
122111
+ var baseline = saved.filter(function (item) {
122112
+ return codeMap[item.columnKey];
122113
+ }).slice().sort(function (a, b) {
122114
+ return (Number(a.sortNo) || 0) - (Number(b.sortNo) || 0);
122115
+ }).map(function (item) {
122116
+ return {
122117
+ entry: codeMap[item.columnKey],
122118
+ saved: item
122119
+ };
122120
+ });
122121
+ var seen = Object.create(null);
122122
+ var rows = [];
122123
+ baseline.forEach(function (row) {
122124
+ if (seen[row.entry.key]) return;
122125
+ seen[row.entry.key] = true;
122126
+ rows.push(row);
122127
+ });
122128
+ keyed.forEach(function (codeCol, codeIndex) {
122129
+ if (seen[codeCol.key]) return;
122130
+ var insertAt = rows.length;
122131
+ var found = false;
122132
+ var _loop = function _loop(i) {
122133
+ var pos = rows.findIndex(function (row) {
122134
+ return row.entry.key === keyed[i].key;
122135
+ });
122136
+ if (pos >= 0) {
122137
+ insertAt = pos + 1;
122138
+ found = true;
122139
+ return 1; // break
122140
+ }
122141
+ };
122142
+ for (var i = codeIndex - 1; i >= 0; i--) {
122143
+ if (_loop(i)) break;
122144
+ }
122145
+ if (!found) {
122146
+ var _loop2 = function _loop2(_i) {
122147
+ var pos = rows.findIndex(function (row) {
122148
+ return row.entry.key === keyed[_i].key;
122149
+ });
122150
+ if (pos >= 0) {
122151
+ insertAt = pos;
122152
+ return 1; // break
122153
+ }
122154
+ };
122155
+ for (var _i = codeIndex + 1; _i < keyed.length; _i++) {
122156
+ if (_loop2(_i)) break;
122157
+ }
122158
+ }
122159
+ rows.splice(insertAt, 0, {
122160
+ entry: codeCol,
122161
+ saved: null
122162
+ });
122163
+ seen[codeCol.key] = true;
122164
+ });
122165
+ var order = rows.map(function (row) {
122166
+ return row.entry.uid;
122167
+ });
122168
+ unkeyed.forEach(function (comp) {
122169
+ return order.push(comp._uid);
122170
+ });
122171
+ var states = [];
122172
+ rows.forEach(function (row) {
122173
+ if (!row.saved) return;
122174
+ var comp = row.entry.comp;
122175
+ states.push({
122176
+ uid: row.entry.uid,
122177
+ state: {
122178
+ visible: row.saved.visible !== false,
122179
+ fixed: savedFixed(row.saved.fixed),
122180
+ minWidth: savedMinWidth(row.saved.minWidth),
122181
+ width: savedWidth(row.saved.width),
122182
+ sortable: row.saved.sortable != null ? !!row.saved.sortable : !!comp.sortable
122183
+ }
122184
+ });
122185
+ });
122186
+ return {
122187
+ order: order,
122188
+ states: states
122189
+ };
122190
+ }
122191
+
122192
+ // 提交给保存接口的列数组。顺序按当前 columnOrder,sortNo 从 0 连续编号
122193
+ function buildColumnPayload(comps, order, states) {
122194
+ var map = Object.create(null);
122195
+ (Array.isArray(comps) ? comps : []).forEach(function (comp) {
122196
+ if (comp) map[comp._uid] = comp;
122197
+ });
122198
+ var columns = [];
122199
+ (Array.isArray(order) ? order : []).forEach(function (uid) {
122200
+ var comp = map[uid];
122201
+ if (!comp) return;
122202
+ var key = resolveColumnKey(comp);
122203
+ if (!key) return;
122204
+ var st = states && states[uid] ? states[uid] : {};
122205
+ columns.push({
122206
+ ColumnKey: key,
122207
+ SortNo: columns.length,
122208
+ Visible: st.visible !== false,
122209
+ Fixed: savedFixed(st.fixed),
122210
+ MinWidth: savedMinWidth(st.minWidth),
122211
+ Width: savedWidth(st.width),
122212
+ Sortable: !!st.sortable
122213
+ });
122214
+ });
122215
+ return columns;
122216
+ }
122217
+
122218
+ // 与代码声明完全一致时走删除接口,避免把当时的默认值冻住
122219
+ function isDefaultColumnPayload(comps, columns) {
122220
+ var keyed = (Array.isArray(comps) ? comps : []).filter(function (comp) {
122221
+ return resolveColumnKey(comp);
122222
+ });
122223
+ if (!Array.isArray(columns) || keyed.length !== columns.length) return false;
122224
+ for (var i = 0; i < keyed.length; i++) {
122225
+ var comp = keyed[i];
122226
+ var col = columns[i];
122227
+ if (!col || col.ColumnKey !== resolveColumnKey(comp)) return false;
122228
+ if (col.Visible !== true) return false;
122229
+ if ((col.Fixed || '') !== (comp.fixed || '')) return false;
122230
+ if (!!col.Sortable !== !!comp.sortable) return false;
122231
+ if (col.Width != null) return false;
122232
+ if (col.MinWidth != null && Number(col.MinWidth) !== Number(comp.resolvedMinWidth)) return false;
122233
+ }
122234
+ return true;
122235
+ }
122236
+
122237
+ // 从 Datas 取出列数组。字段名优先用属性名 Columns,兼容 columns。
122238
+ function readSavedColumns(datas) {
122239
+ if (!datas || columnPersist_typeof(datas) !== 'object') return null;
122240
+ var columns = datas.Columns != null ? datas.Columns : datas.columns;
122241
+ if (!Array.isArray(columns)) return null;
122242
+ return columns.map(readSavedColumn).filter(Boolean);
122243
+ }
122244
+
122245
+ // 业务项目 axios 拦截器返回 { code, data: { Success, Content, Datas } }
122246
+ function readColumnConfigDatas(res) {
122247
+ if (res && res.code == 200 && res.data) {
122248
+ if (!res.data.Success) throw new Error(res.data.Content || '表头配置请求失败');
122249
+ return res.data.Datas == null ? null : res.data.Datas;
122250
+ }
122251
+ if (res && res.Success) return res.Datas == null ? null : res.Datas;
122252
+ var content = res && res.data && res.data.Content;
122253
+ throw new Error(content || '表头配置请求失败');
122254
+ }
121524
122255
  ;// ./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
121525
122256
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || StandardTablevue_type_script_lang_js_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
121526
122257
  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."); }
@@ -121535,6 +122266,8 @@ function StandardTablevue_type_script_lang_js_arrayLikeToArray(r, a) { (null ==
121535
122266
  ;
121536
122267
 
121537
122268
 
122269
+
122270
+
121538
122271
  // 将单元格渲染结果归一化为 VNode:
121539
122272
  // Vue 2 函数式组件只接受 VNode / VNode 数组作为渲染结果,
121540
122273
  // 纯字符串、数字等原始值会被直接丢弃(表现为空白单元格),
@@ -121711,10 +122444,10 @@ var NormalReportSlotView = {
121711
122444
  type: Boolean,
121712
122445
  "default": false
121713
122446
  },
121714
- // 是否显示表格右上角“调整”按钮(列设置弹层)
122447
+ // 是否显示表格右上角“调整”按钮(列设置弹层),默认显示;传 false 隐藏
121715
122448
  showAdjustment: {
121716
122449
  type: Boolean,
121717
- "default": false
122450
+ "default": true
121718
122451
  },
121719
122452
  // 是否显示表格左下方“数据更新时间”
121720
122453
  showUpdateTime: {
@@ -121751,6 +122484,17 @@ var NormalReportSlotView = {
121751
122484
  showFooter: {
121752
122485
  type: Boolean,
121753
122486
  "default": false
122487
+ },
122488
+ // 表格编码。按「当前登录用户 + 模块 + 页面 + 表格」读写表头配置,同一页面内必须唯一。
122489
+ // 未传时使用组件 ref;ref 也没有时不访问服务端
122490
+ tableCode: {
122491
+ type: String,
122492
+ "default": ''
122493
+ },
122494
+ // 页面编码。不传时使用当前路由 name;没有 name 时使用不含查询参数的 path
122495
+ pageCode: {
122496
+ type: String,
122497
+ "default": ''
121754
122498
  }
121755
122499
  },
121756
122500
  data: function data() {
@@ -121822,7 +122566,14 @@ var NormalReportSlotView = {
121822
122566
  // 尺寸变化防抖定时器
121823
122567
  // 首屏先让 standard-column 在 created 中注册完,再渲染 vxe-column。
121824
122568
  // 否则第一次往往只有操作列,vxe-table 会固化它的插槽,随后数据列插入后操作列变空白
121825
- columnsReady: false
122569
+ columnsReady: false,
122570
+ // 表头配置已完成首次加载后才允许写回,避免加载过程中的默认状态覆盖服务端
122571
+ columnConfigReady: false,
122572
+ columnConfigDisabled: false,
122573
+ columnConfigDirty: false,
122574
+ columnConfigSettled: false,
122575
+ columnConfigTimer: null,
122576
+ columnConfigSaveTimer: null
121826
122577
  };
121827
122578
  },
121828
122579
  computed: {
@@ -121830,13 +122581,9 @@ var NormalReportSlotView = {
121830
122581
  hasFooterLeftSlot: function hasFooterLeftSlot() {
121831
122582
  return !!(this.$slots['footer-left'] || this.$scopedSlots['footer-left']);
121832
122583
  },
121833
- // 是否显示“调整”列设置按钮:主组件 showAdjustment 属性
121834
- // 或 toolbar-right 子组件 show-adjustment 属性(任一为 true 即显示)
122584
+ // 是否显示“调整”列设置按钮,由主组件 show-adjustment 决定;false 时隐藏
121835
122585
  resolvedShowAdjustment: function resolvedShowAdjustment() {
121836
- if (this.showAdjustment) return true;
121837
- return this.toolbarRightInstances.some(function (inst) {
121838
- return !!inst.showAdjustment;
121839
- });
122586
+ return this.showAdjustment;
121840
122587
  },
121841
122588
  // 操作列按钮列表(tableOperation 属性)
121842
122589
  opButtons: function opButtons() {
@@ -121980,6 +122727,8 @@ var NormalReportSlotView = {
121980
122727
  title: comp.title,
121981
122728
  // 列宽:仅取列组件声明宽度(列设置弹层调整的是列最小宽度)
121982
122729
  width: comp.width,
122730
+ // 用户拖拽表头得到的实际列宽。未拖过时不传给 vxe,仍由 min-width 分配
122731
+ userWidth: st && st.width != null ? st.width : null,
121983
122732
  // 列最小宽度(对应 vxe-table min-width):优先取列设置弹层设置的值(px),
121984
122733
  // 未设置时取列组件 resolvedMinWidth(显式传入值或按标题自动计算)
121985
122734
  minWidth: st && st.minWidth != null ? st.minWidth : comp.resolvedMinWidth,
@@ -122027,6 +122776,7 @@ var NormalReportSlotView = {
122027
122776
  field: c.field || undefined,
122028
122777
  title: c.title,
122029
122778
  width: c.width || undefined,
122779
+ userWidth: c.userWidth || undefined,
122030
122780
  minWidth: c.minWidth,
122031
122781
  treeNode: !!c.treeNode,
122032
122782
  fixed: c.fixed || undefined,
@@ -122101,24 +122851,23 @@ var NormalReportSlotView = {
122101
122851
  }
122102
122852
  },
122103
122853
  mounted: function mounted() {
122104
- var _this4 = this;
122105
122854
  this.initResizeObserver();
122106
122855
  // 表头拖拽排序结束后抑制一次 click(document 捕获阶段拦截,防止拖拽结束触发排序切换)
122107
122856
  document.addEventListener('click', this.onDocumentClickCapture, true);
122108
- // 本次 patch 中 standard-column 的 created 已经完成注册,此刻再放行列
122109
- this.columnsReady = true;
122110
- // 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度,
122111
- // 只在 nextTick 里算会把表体高度当成内容高度,滚动条不再出现
122112
- this.$nextTick(function () {
122113
- _this4.resizeRecalculate();
122114
- if (typeof requestAnimationFrame === 'function') {
122115
- requestAnimationFrame(function () {
122116
- return _this4.resizeRecalculate();
122117
- });
122118
- }
122119
- });
122857
+ // 列已在子组件 created 中注册完成。能确定表格编码时先合并历史配置,再放行表头
122858
+ this.bootstrapColumnConfig();
122120
122859
  },
122121
122860
  beforeDestroy: function beforeDestroy() {
122861
+ this.columnConfigSettled = true;
122862
+ if (this.columnConfigTimer) {
122863
+ clearTimeout(this.columnConfigTimer);
122864
+ this.columnConfigTimer = null;
122865
+ }
122866
+ if (this.columnConfigSaveTimer) {
122867
+ clearTimeout(this.columnConfigSaveTimer);
122868
+ this.columnConfigSaveTimer = null;
122869
+ }
122870
+ this.releaseColumnConfigClaim();
122122
122871
  this.destroyResizeObserver();
122123
122872
  document.removeEventListener('click', this.onDocumentClickCapture, true);
122124
122873
  this.clearHeaderDragBindings();
@@ -122141,51 +122890,51 @@ var NormalReportSlotView = {
122141
122890
  },
122142
122891
  // 工具栏左侧子组件 vnode(渲染到操作区左侧)
122143
122892
  getToolbarLeftVNodes: function getToolbarLeftVNodes() {
122144
- var _this5 = this;
122893
+ var _this4 = this;
122145
122894
  return this.getDefaultSlotVNodes().filter(function (v) {
122146
- return _this5.isVNodeOfType(v, TOOLBAR_LEFT_TYPES);
122895
+ return _this4.isVNodeOfType(v, TOOLBAR_LEFT_TYPES);
122147
122896
  });
122148
122897
  },
122149
122898
  // 工具栏右侧子组件 vnode(渲染到操作区右侧)
122150
122899
  getToolbarRightVNodes: function getToolbarRightVNodes() {
122151
- var _this6 = this;
122900
+ var _this5 = this;
122152
122901
  return this.getDefaultSlotVNodes().filter(function (v) {
122153
- return _this6.isVNodeOfType(v, TOOLBAR_RIGHT_TYPES);
122902
+ return _this5.isVNodeOfType(v, TOOLBAR_RIGHT_TYPES);
122154
122903
  });
122155
122904
  },
122156
122905
  // 底部栏左侧子组件 vnode(渲染到底部栏左侧)
122157
122906
  getFooterLeftVNodes: function getFooterLeftVNodes() {
122158
- var _this7 = this;
122907
+ var _this6 = this;
122159
122908
  return this.getDefaultSlotVNodes().filter(function (v) {
122160
- return _this7.isVNodeOfType(v, FOOTER_LEFT_TYPES);
122909
+ return _this6.isVNodeOfType(v, FOOTER_LEFT_TYPES);
122161
122910
  });
122162
122911
  },
122163
122912
  // 底部栏右侧分页子组件 vnode(渲染到底部栏右侧)
122164
122913
  getFooterRightVNodes: function getFooterRightVNodes() {
122165
- var _this8 = this;
122914
+ var _this7 = this;
122166
122915
  return this.getDefaultSlotVNodes().filter(function (v) {
122167
- return _this8.isVNodeOfType(v, FOOTER_RIGHT_TYPES);
122916
+ return _this7.isVNodeOfType(v, FOOTER_RIGHT_TYPES);
122168
122917
  });
122169
122918
  },
122170
122919
  // 底部空占位子组件 vnode(页面声明时渲染,未声明时使用内置默认占位)
122171
122920
  getFooterEmptyVNodes: function getFooterEmptyVNodes() {
122172
- var _this9 = this;
122921
+ var _this8 = this;
122173
122922
  return this.getDefaultSlotVNodes().filter(function (v) {
122174
- return _this9.isVNodeOfType(v, FOOTER_EMPTY_TYPES);
122923
+ return _this8.isVNodeOfType(v, FOOTER_EMPTY_TYPES);
122175
122924
  });
122176
122925
  },
122177
122926
  // 工具栏空占位子组件 vnode(页面声明时渲染,未声明时使用内置默认占位)
122178
122927
  getToolbarEmptyVNodes: function getToolbarEmptyVNodes() {
122179
- var _this0 = this;
122928
+ var _this9 = this;
122180
122929
  return this.getDefaultSlotVNodes().filter(function (v) {
122181
- return _this0.isVNodeOfType(v, TOOLBAR_EMPTY_TYPES);
122930
+ return _this9.isVNodeOfType(v, TOOLBAR_EMPTY_TYPES);
122182
122931
  });
122183
122932
  },
122184
122933
  // 隐藏注册区 vnode:默认插槽中除区域子组件(工具栏/底部栏功能区 + 空占位)之外的内容
122185
122934
  getHiddenSlotVNodes: function getHiddenSlotVNodes() {
122186
- var _this1 = this;
122935
+ var _this0 = this;
122187
122936
  return this.getDefaultSlotVNodes().filter(function (v) {
122188
- return !_this1.isVNodeOfType(v, TOOLBAR_LEFT_TYPES) && !_this1.isVNodeOfType(v, TOOLBAR_RIGHT_TYPES) && !_this1.isVNodeOfType(v, FOOTER_LEFT_TYPES) && !_this1.isVNodeOfType(v, FOOTER_RIGHT_TYPES) && !_this1.isVNodeOfType(v, FOOTER_EMPTY_TYPES) && !_this1.isVNodeOfType(v, TOOLBAR_EMPTY_TYPES);
122937
+ return !_this0.isVNodeOfType(v, TOOLBAR_LEFT_TYPES) && !_this0.isVNodeOfType(v, TOOLBAR_RIGHT_TYPES) && !_this0.isVNodeOfType(v, FOOTER_LEFT_TYPES) && !_this0.isVNodeOfType(v, FOOTER_RIGHT_TYPES) && !_this0.isVNodeOfType(v, FOOTER_EMPTY_TYPES) && !_this0.isVNodeOfType(v, TOOLBAR_EMPTY_TYPES);
122189
122938
  });
122190
122939
  },
122191
122940
  // 操作区是否显示
@@ -122239,6 +122988,7 @@ var NormalReportSlotView = {
122239
122988
  visible: true,
122240
122989
  fixed: comp.fixed || '',
122241
122990
  minWidth: null,
122991
+ width: null,
122242
122992
  sortable: !!comp.sortable
122243
122993
  });
122244
122994
  if (this.columnOrder.indexOf(comp._uid) === -1) {
@@ -122307,7 +123057,7 @@ var NormalReportSlotView = {
122307
123057
  // 渲染单个操作按钮:active 为 false 时不再隐藏(原按 v-if 消失),
122308
123058
  // 改为渲染 disabled 按钮(变灰不可操作)
122309
123059
  renderOpButton: function renderOpButton(h, row, btn, idx) {
122310
- var _this10 = this;
123060
+ var _this1 = this;
122311
123061
  var active = this.isOpActive(btn, row);
122312
123062
  var data = {
122313
123063
  key: idx,
@@ -122318,7 +123068,7 @@ var NormalReportSlotView = {
122318
123068
  },
122319
123069
  on: {
122320
123070
  click: function click() {
122321
- return _this10.handleOpClick(row, btn);
123071
+ return _this1.handleOpClick(row, btn);
122322
123072
  }
122323
123073
  },
122324
123074
  // 阻止点击事件冒泡到表格单元格:
@@ -122340,7 +123090,7 @@ var NormalReportSlotView = {
122340
123090
  // 超出按钮渲染为 el-dropdown-item,点击后走与直接按钮一致的 handleOpClick;
122341
123091
  // active 为 false 的按钮以 disabled 形式变灰展示
122342
123092
  renderOpMore: function renderOpMore(h, row, restButtons) {
122343
- var _this11 = this;
123093
+ var _this10 = this;
122344
123094
  return h('el-dropdown', {
122345
123095
  key: '__normal_report_op_more__',
122346
123096
  "class": 'normal-report-op-more',
@@ -122350,7 +123100,7 @@ var NormalReportSlotView = {
122350
123100
  },
122351
123101
  on: {
122352
123102
  command: function command(btn) {
122353
- return _this11.handleOpClick(row, btn);
123103
+ return _this10.handleOpClick(row, btn);
122354
123104
  }
122355
123105
  },
122356
123106
  nativeOn: {
@@ -122368,7 +123118,7 @@ var NormalReportSlotView = {
122368
123118
  })]), h('el-dropdown-menu', {
122369
123119
  slot: 'dropdown'
122370
123120
  }, restButtons.map(function (btn, idx) {
122371
- var active = _this11.isOpActive(btn, row);
123121
+ var active = _this10.isOpActive(btn, row);
122372
123122
  return h('el-dropdown-item', {
122373
123123
  key: idx,
122374
123124
  props: {
@@ -122384,17 +123134,17 @@ var NormalReportSlotView = {
122384
123134
  // 渲染操作列:按钮 ≤ 3 个时全部直接渲染;超过 3 个时前 3 个直接渲染,
122385
123135
  // 其余统一收纳进“更多”下拉菜单;active 为 false 的按钮渲染为 disabled(变灰)
122386
123136
  renderOpCell: function renderOpCell(row, h) {
122387
- var _this12 = this;
123137
+ var _this11 = this;
122388
123138
  var createElement = h || this.$createElement;
122389
123139
  var btns = this.opButtons;
122390
123140
  if (!btns.length) return null;
122391
123141
  if (btns.length <= OP_MAX_DIRECT_COUNT) {
122392
123142
  return btns.map(function (btn, idx) {
122393
- return _this12.renderOpButton(createElement, row, btn, idx);
123143
+ return _this11.renderOpButton(createElement, row, btn, idx);
122394
123144
  });
122395
123145
  }
122396
123146
  var nodes = btns.slice(0, OP_MAX_DIRECT_COUNT).map(function (btn, idx) {
122397
- return _this12.renderOpButton(createElement, row, btn, idx);
123147
+ return _this11.renderOpButton(createElement, row, btn, idx);
122398
123148
  });
122399
123149
  nodes.push(this.renderOpMore(createElement, row, btns.slice(OP_MAX_DIRECT_COUNT)));
122400
123150
  return nodes;
@@ -122477,12 +123227,12 @@ var NormalReportSlotView = {
122477
123227
  },
122478
123228
  // 复制文本到剪贴板:优先使用现代 API,失败时降级 execCommand
122479
123229
  copyTextToClipboard: function copyTextToClipboard(text) {
122480
- var _this13 = this;
123230
+ var _this12 = this;
122481
123231
  if (navigator.clipboard && window.isSecureContext) {
122482
123232
  navigator.clipboard.writeText(text).then(function () {
122483
- _this13.$message && _this13.$message.success('复制成功:' + text);
123233
+ _this12.$message && _this12.$message.success('复制成功:' + text);
122484
123234
  })["catch"](function () {
122485
- _this13.fallbackCopyText(text);
123235
+ _this12.fallbackCopyText(text);
122486
123236
  });
122487
123237
  } else {
122488
123238
  this.fallbackCopyText(text);
@@ -122568,23 +123318,25 @@ var NormalReportSlotView = {
122568
123318
  // 切换列的排序开关:sortable 已纳入列 key,修改后强制重建列,
122569
123319
  // 再由 applyColumnOrder 恢复列顺序(重建会打乱 staticColumns 顺序)
122570
123320
  toggleHeaderColumnSort: function toggleHeaderColumnSort(uid) {
122571
- var _this14 = this;
123321
+ var _this13 = this;
122572
123322
  var st = this.columnStates[uid];
122573
123323
  if (!st) return;
122574
123324
  this.$set(st, 'sortable', !st.sortable);
123325
+ this.schedulePersistColumnConfig();
122575
123326
  this.$nextTick(function () {
122576
- return _this14.applyColumnOrder();
123327
+ return _this13.applyColumnOrder();
122577
123328
  });
122578
123329
  },
122579
123330
  // 切换列的固定状态(左/右固定互斥,再次点击同侧即取消):
122580
123331
  // fixed 同样纳入列 key,重建后 vxe-table 重新解析固定列分组
122581
123332
  toggleHeaderColumnFixed: function toggleHeaderColumnFixed(uid, side) {
122582
- var _this15 = this;
123333
+ var _this14 = this;
122583
123334
  var st = this.columnStates[uid];
122584
123335
  if (!st) return;
122585
123336
  this.$set(st, 'fixed', st.fixed === side ? '' : side);
123337
+ this.schedulePersistColumnConfig();
122586
123338
  this.$nextTick(function () {
122587
- return _this15.applyColumnOrder();
123339
+ return _this14.applyColumnOrder();
122588
123340
  });
122589
123341
  },
122590
123342
  // ===== 单元格编辑 =====
@@ -122700,7 +123452,7 @@ var NormalReportSlotView = {
122700
123452
  },
122701
123453
  // 交换列顺序(columnOrder 重排后强制同步 vxe-table 内部列配置)
122702
123454
  moveColumnOrder: function moveColumnOrder(fromUid, toUid) {
122703
- var _this16 = this;
123455
+ var _this15 = this;
122704
123456
  var from = this.columnOrder.indexOf(fromUid);
122705
123457
  var to = this.columnOrder.indexOf(toUid);
122706
123458
  if (from < 0 || to < 0 || from === to) return;
@@ -122708,8 +123460,9 @@ var NormalReportSlotView = {
122708
123460
  var moved = order.splice(from, 1)[0];
122709
123461
  order.splice(to, 0, moved);
122710
123462
  this.columnOrder = order;
123463
+ this.schedulePersistColumnConfig();
122711
123464
  this.$nextTick(function () {
122712
- return _this16.applyColumnOrder();
123465
+ return _this15.applyColumnOrder();
122713
123466
  });
122714
123467
  },
122715
123468
  // ===== 对外方法(父组件通过 ref 调用) =====
@@ -122747,14 +123500,14 @@ var NormalReportSlotView = {
122747
123500
  // 表现为固定列行与数据行错位。此处监听表格容器尺寸变化,防抖后
122748
123501
  // 重新计算布局并调用 refreshScroll() 强制同步各滚动层位置。
122749
123502
  initResizeObserver: function initResizeObserver() {
122750
- var _this17 = this;
123503
+ var _this16 = this;
122751
123504
  var wrapEl = this.$refs.tableWrap;
122752
123505
  if (!wrapEl) return;
122753
123506
  if (typeof ResizeObserver !== 'undefined') {
122754
123507
  // 首次通知也要重算。挂载时容器往往已有高度,但还不是 flex 约束后的高度,
122755
123508
  // 跳过这次就会把“内容撑开的高度”当成可视高度,滚动条不再出现
122756
123509
  this.resizeObserver = new ResizeObserver(function () {
122757
- _this17.scheduleTableRecalculate();
123510
+ _this16.scheduleTableRecalculate();
122758
123511
  });
122759
123512
  this.resizeObserver.observe(wrapEl);
122760
123513
  } else {
@@ -122764,23 +123517,23 @@ var NormalReportSlotView = {
122764
123517
  },
122765
123518
  // 防抖:连续尺寸变化(如拖拽分割线)停稳后再重算,读到的是最终宽高
122766
123519
  scheduleTableRecalculate: function scheduleTableRecalculate() {
122767
- var _this18 = this;
123520
+ var _this17 = this;
122768
123521
  if (this.resizeTimer) clearTimeout(this.resizeTimer);
122769
123522
  this.resizeTimer = setTimeout(function () {
122770
- _this18.resizeTimer = null;
122771
- _this18.resizeRecalculate();
123523
+ _this17.resizeTimer = null;
123524
+ _this17.resizeRecalculate();
122772
123525
  }, 50);
122773
123526
  },
122774
123527
  // 重新计算布局,并在重算完成后强制同步固定列与主表体的滚动位置。
122775
123528
  // 容器还没有宽度时 vxe 会直接跳过滚动计算,等下一次尺寸通知再算
122776
123529
  resizeRecalculate: function resizeRecalculate() {
122777
- var _this19 = this;
123530
+ var _this18 = this;
122778
123531
  var xTable = this.$refs.xTable;
122779
123532
  var wrapEl = this.$refs.tableWrap;
122780
123533
  if (!xTable) return;
122781
123534
  if (wrapEl && wrapEl.clientWidth === 0) return;
122782
123535
  var restore = function restore() {
122783
- _this19.$nextTick(function () {
123536
+ _this18.$nextTick(function () {
122784
123537
  if (xTable.refreshScroll) xTable.refreshScroll();
122785
123538
  });
122786
123539
  };
@@ -122847,7 +123600,7 @@ var NormalReportSlotView = {
122847
123600
  // ===== 列设置弹层 =====
122848
123601
  // 打开列设置:以当前注册列生成工作副本(每次打开都重新初始化)
122849
123602
  openColumnSetting: function openColumnSetting() {
122850
- var _this20 = this;
123603
+ var _this19 = this;
122851
123604
  var compMap = {};
122852
123605
  this.columnComps.forEach(function (comp) {
122853
123606
  compMap[comp._uid] = comp;
@@ -122875,7 +123628,7 @@ var NormalReportSlotView = {
122875
123628
  // 列标题宽度:按最长列名称计算(中文 25px/字 + 英文 15px/字 + 30px 余量),
122876
123629
  // 各列标题统一按该宽度显示,保证输入框与按钮对齐
122877
123630
  this.columnTitleWidth = this.columnDraft.reduce(function (max, c) {
122878
- return Math.max(max, _this20.calcColumnTitleWidth(c.title));
123631
+ return Math.max(max, _this19.calcColumnTitleWidth(c.title));
122879
123632
  }, 0);
122880
123633
  },
122881
123634
  // 计算单个列标题的显示宽度(px):中文 25px/字 + 英文 15px/字 + 30px 余量
@@ -122967,21 +123720,199 @@ var NormalReportSlotView = {
122967
123720
  },
122968
123721
  // 确认:将面板副本应用到列状态并刷新表格
122969
123722
  confirmColumnSetting: function confirmColumnSetting() {
122970
- var _this21 = this;
123723
+ var _this20 = this;
122971
123724
  var order = [];
122972
123725
  this.columnDraft.forEach(function (d) {
122973
- _this21.$set(_this21.columnStates, d.uid, {
123726
+ var prev = _this20.columnStates[d.uid] || {};
123727
+ _this20.$set(_this20.columnStates, d.uid, {
122974
123728
  visible: d.visible,
122975
123729
  fixed: d.fixed || '',
122976
123730
  minWidth: d.minWidth != null ? d.minWidth : null,
123731
+ width: prev.width != null ? prev.width : null,
122977
123732
  sortable: !!d.sortable
122978
123733
  });
122979
123734
  order.push(d.uid);
122980
123735
  });
122981
123736
  this.columnOrder = order;
122982
123737
  this.columnSettingVisible = false;
123738
+ this.persistColumnConfigNow();
123739
+ this.$nextTick(function () {
123740
+ _this20.applyColumnOrder();
123741
+ });
123742
+ },
123743
+ // ===== 表头配置持久化 =====
123744
+ // 表格编码:显式 table-code 优先,否则取组件 ref。两者都没有时不读写表头配置
123745
+ resolveTableCode: function resolveTableCode() {
123746
+ var explicit = this.tableCode != null ? String(this.tableCode).trim() : '';
123747
+ if (explicit) return explicit;
123748
+ var data = this.$vnode && this.$vnode.data;
123749
+ var ref = data && data.ref;
123750
+ if (typeof ref !== 'string') return '';
123751
+ return ref.trim();
123752
+ },
123753
+ // 页面编码:显式 page-code 优先,否则取路由 name,再退回不含查询参数的 path
123754
+ resolvePageCode: function resolvePageCode() {
123755
+ var explicit = this.pageCode != null ? String(this.pageCode).trim() : '';
123756
+ if (explicit) return explicit;
123757
+ var route = this.$route;
123758
+ if (route && route.name) return String(route.name);
123759
+ if (route && route.path) return String(route.path).split('?')[0];
123760
+ return '';
123761
+ },
123762
+ releaseColumnConfigClaim: function releaseColumnConfigClaim() {
123763
+ var claim = this._columnConfigClaim;
123764
+ if (!claim) return;
123765
+ releaseTableCode(claim.moduleCode, claim.pageCode, claim.tableCode, this);
123766
+ this._columnConfigClaim = null;
123767
+ },
123768
+ // 列挂载后再重算。height="100%" 要等浏览器完成 flex 布局才有父容器高度
123769
+ scheduleInitialLayout: function scheduleInitialLayout() {
123770
+ var _this21 = this;
122983
123771
  this.$nextTick(function () {
122984
- _this21.applyColumnOrder();
123772
+ _this21.resizeRecalculate();
123773
+ if (typeof requestAnimationFrame === 'function') {
123774
+ requestAnimationFrame(function () {
123775
+ return _this21.resizeRecalculate();
123776
+ });
123777
+ }
123778
+ });
123779
+ },
123780
+ // 首次加载只结算一次。用户在返回前已调整时,保留本地结果并在允许写入后保存
123781
+ finishColumnConfigLoad: function finishColumnConfigLoad(apply) {
123782
+ if (this.columnConfigSettled) return;
123783
+ this.columnConfigSettled = true;
123784
+ if (this.columnConfigTimer) {
123785
+ clearTimeout(this.columnConfigTimer);
123786
+ this.columnConfigTimer = null;
123787
+ }
123788
+ if (!this.columnConfigDirty && typeof apply === 'function') apply();
123789
+ var tableCode = this.resolveTableCode();
123790
+ this.columnConfigReady = !!getColumnModuleCode() && !!tableCode && !this.columnConfigDisabled;
123791
+ this.columnsReady = true;
123792
+ this.scheduleInitialLayout();
123793
+ if (this.columnConfigDirty) this.persistColumnConfig();
123794
+ },
123795
+ bootstrapColumnConfig: function bootstrapColumnConfig() {
123796
+ var _this22 = this;
123797
+ var tableCode = this.resolveTableCode();
123798
+ if (!tableCode) {
123799
+ this.finishColumnConfigLoad();
123800
+ return;
123801
+ }
123802
+ var pageCode = this.resolvePageCode();
123803
+ if (!pageCode) {
123804
+ console.warn('[StandardTable] 无法确定 page-code,表头配置不会加载');
123805
+ this.columnConfigDisabled = true;
123806
+ this.finishColumnConfigLoad();
123807
+ return;
123808
+ }
123809
+ var moduleCode = getColumnModuleCode();
123810
+ if (!moduleCode) {
123811
+ console.warn('[StandardTable] 未注册 moduleCode,表头配置不会加载');
123812
+ this.columnConfigDisabled = true;
123813
+ this.finishColumnConfigLoad();
123814
+ return;
123815
+ }
123816
+ if (!claimTableCode(moduleCode, pageCode, tableCode, this)) {
123817
+ console.warn('[StandardTable] 同一页面存在重复的 table-code:' + tableCode);
123818
+ this.columnConfigDisabled = true;
123819
+ this.finishColumnConfigLoad();
123820
+ return;
123821
+ }
123822
+ this._columnConfigClaim = {
123823
+ moduleCode: moduleCode,
123824
+ pageCode: pageCode,
123825
+ tableCode: tableCode
123826
+ };
123827
+ var duplicated = findDuplicateColumnKey(this.columnComps);
123828
+ if (duplicated) {
123829
+ console.warn('[StandardTable] 列标识重复,已跳过表头配置:' + duplicated);
123830
+ this.columnConfigDisabled = true;
123831
+ this.finishColumnConfigLoad();
123832
+ return;
123833
+ }
123834
+ var api = getColumnConfigApi();
123835
+ if (!api || typeof api.get !== 'function') {
123836
+ console.warn('[StandardTable] 未注入 request,表头配置不会加载');
123837
+ this.columnConfigDisabled = true;
123838
+ this.finishColumnConfigLoad();
123839
+ return;
123840
+ }
123841
+ this.columnConfigTimer = setTimeout(function () {
123842
+ if (_this22.columnConfigSettled) return;
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();
123856
+ });
123857
+ },
123858
+ applyMergedColumnConfig: function applyMergedColumnConfig(savedColumns) {
123859
+ var _this23 = this;
123860
+ var merged = mergeColumnConfig(this.columnComps, savedColumns);
123861
+ if (!merged) return;
123862
+ merged.states.forEach(function (item) {
123863
+ _this23.$set(_this23.columnStates, item.uid, item.state);
123864
+ });
123865
+ this.columnOrder = merged.order;
123866
+ },
123867
+ // 拖拽表头列宽:写入实际宽度,最小宽度仍由列设置弹层维护
123868
+ onColumnResizableChange: function onColumnResizableChange(params) {
123869
+ if (!params) return;
123870
+ var uid = this.resolveColumnUid(params.column);
123871
+ if (uid == null) return;
123872
+ var st = this.columnStates[uid];
123873
+ if (!st) return;
123874
+ var width = Math.round(Number(params.resizeWidth));
123875
+ if (!(width >= 60)) return;
123876
+ this.$set(st, 'width', Math.min(width, 2000));
123877
+ this.schedulePersistColumnConfig();
123878
+ },
123879
+ schedulePersistColumnConfig: function schedulePersistColumnConfig() {
123880
+ var _this24 = this;
123881
+ this.columnConfigDirty = true;
123882
+ if (!this.columnConfigReady) return;
123883
+ if (this.columnConfigSaveTimer) clearTimeout(this.columnConfigSaveTimer);
123884
+ this.columnConfigSaveTimer = setTimeout(function () {
123885
+ _this24.columnConfigSaveTimer = null;
123886
+ _this24.persistColumnConfig();
123887
+ }, 500);
123888
+ },
123889
+ persistColumnConfigNow: function persistColumnConfigNow() {
123890
+ this.columnConfigDirty = true;
123891
+ if (this.columnConfigSaveTimer) {
123892
+ clearTimeout(this.columnConfigSaveTimer);
123893
+ this.columnConfigSaveTimer = null;
123894
+ }
123895
+ this.persistColumnConfig();
123896
+ },
123897
+ persistColumnConfig: function persistColumnConfig() {
123898
+ var _this25 = this;
123899
+ if (!this.columnConfigReady || this.columnConfigDisabled) return;
123900
+ var api = getColumnConfigApi();
123901
+ if (!api) return;
123902
+ var moduleCode = getColumnModuleCode();
123903
+ var pageCode = this.resolvePageCode();
123904
+ var tableCode = this.resolveTableCode();
123905
+ if (!moduleCode || !pageCode || !tableCode) return;
123906
+ var columns = buildColumnPayload(this.columnComps, this.columnOrder, this.columnStates);
123907
+ var useReset = isDefaultColumnPayload(this.columnComps, columns);
123908
+ var request = useReset ? typeof api.reset === 'function' ? api.reset(moduleCode, pageCode, tableCode) : null : typeof api.save === 'function' ? api.save(moduleCode, pageCode, tableCode, columns) : null;
123909
+ if (!request) return;
123910
+ Promise.resolve(request).then(function (res) {
123911
+ readColumnConfigDatas(res);
123912
+ var content = res && res.data && res.data.Content || res && res.Content || '表头配置保存成功';
123913
+ if (_this25.$message) _this25.$message.success(content);
123914
+ })["catch"](function (err) {
123915
+ if (_this25.$message) _this25.$message.error(err && err.message || '表头配置保存失败');
122985
123916
  });
122986
123917
  }
122987
123918
  }
@@ -123003,8 +123934,8 @@ var StandardTablevue_type_style_index_0_prod_lang_scss_external = __webpack_requ
123003
123934
 
123004
123935
  var StandardTable_component = normalizeComponent(
123005
123936
  components_StandardTablevue_type_script_lang_js,
123006
- StandardTablevue_type_template_id_a9e9136a_render,
123007
- StandardTablevue_type_template_id_a9e9136a_staticRenderFns,
123937
+ StandardTablevue_type_template_id_b1d59d54_render,
123938
+ StandardTablevue_type_template_id_b1d59d54_staticRenderFns,
123008
123939
  false,
123009
123940
  null,
123010
123941
  null,
@@ -123045,6 +123976,12 @@ var StandardTable_component = normalizeComponent(
123045
123976
  type: String,
123046
123977
  "default": ''
123047
123978
  },
123979
+ // 表头配置使用的稳定主键。不传时按 field:字段名 或 type:类型 生成。
123980
+ // 字段以后可能改名、或同一字段出现两列时必须显式指定,且一经使用不再修改
123981
+ columnKey: {
123982
+ type: String,
123983
+ "default": ''
123984
+ },
123048
123985
  // vxe-table 内置列类型(如 seq 序号列),普通数据列不传
123049
123986
  type: {
123050
123987
  type: String,
@@ -123300,16 +124237,15 @@ var ToolbarLeft_component = normalizeComponent(
123300
124237
  * 工具栏右侧子组件(双标签组件):
123301
124238
  *
123302
124239
  * <standard-toolbar-right show-adjustment>
123303
- * <standard-toolbar-query query-method="onQuery" export-method="onExport" />
124240
+ * <standard-toolbar-query query-method="onQuery" show-export export-method="onExport" />
123304
124241
  * </standard-toolbar-right>
123305
124242
  *
123306
124243
  * 说明:
123307
124244
  * 1. 必须放在 <standard-table> 默认插槽内,标签内部内容(按钮、standard-toolbar-query 等)
123308
124245
  * 由主组件就地渲染到表格操作区右侧(“调整”列设置按钮之前);
123309
124246
  * standard-toolbar-query 只能放在本组件内部;
123310
- * 2. showAdjustment(模板写法 show-adjustment):是否显示“调整”列设置按钮。
123311
- * 列设置弹层仍由主组件 StandardTable 渲染,本组件仅声明开关;
123312
- * 主组件自身的 showAdjustment 属性继续有效(任一为 true 即显示“调整”按钮);
124247
+ * 2. “调整”列设置按钮由主组件 standard-table 的 show-adjustment 控制,默认显示,
124248
+ * 传 false 时隐藏。列设置弹层仍由主组件渲染;
123313
124249
  * 3. 按钮点击事件等逻辑完全由使用方在插槽内容中自行绑定(页面作用域)。
123314
124250
  */
123315
124251
  /* harmony default export */ const ToolbarRightvue_type_script_lang_js = ({
@@ -123377,8 +124313,8 @@ var ToolbarRight_component = normalizeComponent(
123377
124313
  )
123378
124314
 
123379
124315
  /* harmony default export */ const ToolbarRight = (ToolbarRight_component.exports);
123380
- ;// ./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/ToolbarQuery.vue?vue&type=template&id=d3cc2f7c
123381
- var ToolbarQueryvue_type_template_id_d3cc2f7c_render = function render() {
124316
+ ;// ./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/ToolbarQuery.vue?vue&type=template&id=2b616fae
124317
+ var ToolbarQueryvue_type_template_id_2b616fae_render = function render() {
123382
124318
  var _vm = this,
123383
124319
  _c = _vm._self._c;
123384
124320
  return _vm.placedCorrectly ? _c('div', {
@@ -123402,7 +124338,7 @@ var ToolbarQueryvue_type_template_id_d3cc2f7c_render = function render() {
123402
124338
  on: {
123403
124339
  "click": _vm.onQuery
123404
124340
  }
123405
- }), _c('standard-button', {
124341
+ }), _vm.showExport ? _c('standard-button', {
123406
124342
  attrs: {
123407
124343
  "icon": "el-icon-upload2",
123408
124344
  "label": "导出"
@@ -123410,9 +124346,9 @@ var ToolbarQueryvue_type_template_id_d3cc2f7c_render = function render() {
123410
124346
  on: {
123411
124347
  "click": _vm.onExport
123412
124348
  }
123413
- })], 1) : _vm._e();
124349
+ }) : _vm._e()], 1) : _vm._e();
123414
124350
  };
123415
- var ToolbarQueryvue_type_template_id_d3cc2f7c_staticRenderFns = [];
124351
+ var ToolbarQueryvue_type_template_id_2b616fae_staticRenderFns = [];
123416
124352
 
123417
124353
  ;// ./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/ToolbarQuery.vue?vue&type=script&lang=js
123418
124354
 
@@ -123426,16 +124362,18 @@ var ToolbarQueryvue_type_template_id_d3cc2f7c_staticRenderFns = [];
123426
124362
  * v-model="keyword"
123427
124363
  * placeholder="请输入关键字"
123428
124364
  * query-method="onQuery"
124365
+ * show-export
123429
124366
  * export-method="onExport"
123430
124367
  * />
123431
124368
  * </standard-toolbar-right>
123432
124369
  *
123433
124370
  * 说明:
123434
124371
  * 1. 只能作为 standard-toolbar-right 的子组件使用,放在其它位置时不渲染并给出警告;
123435
- * 2. 默认包含输入框、查询按钮、导出按钮(从左到右);输入框回车与点击查询等效;
124372
+ * 2. 默认包含输入框、查询按钮;showExport(模板写法 show-export)为 true 时再显示导出按钮。
124373
+ * 输入框回车与点击查询等效;
123436
124374
  * 3. queryMethod / exportMethod(模板写法 query-method / export-method)
123437
124375
  * 支持函数(直接调用)与字符串(沿父组件链查找页面方法),入参为当前关键字;
123438
- * 4. 同时派发 query / export 事件,参数同样为当前关键字。
124376
+ * 4. 同时派发 query / export 事件,参数同样为当前关键字。export 仅在导出按钮显示时由点击触发。
123439
124377
  */
123440
124378
  /* harmony default export */ const ToolbarQueryvue_type_script_lang_js = ({
123441
124379
  name: 'StandardToolbarQuery',
@@ -123468,6 +124406,11 @@ var ToolbarQueryvue_type_template_id_d3cc2f7c_staticRenderFns = [];
123468
124406
  type: [Function, String],
123469
124407
  "default": ''
123470
124408
  },
124409
+ // 是否显示导出按钮,默认不显示
124410
+ showExport: {
124411
+ type: Boolean,
124412
+ "default": false
124413
+ },
123471
124414
  // 查询按钮加载态
123472
124415
  loading: {
123473
124416
  type: Boolean,
@@ -123553,8 +124496,8 @@ var ToolbarQueryvue_type_template_id_d3cc2f7c_staticRenderFns = [];
123553
124496
  ;
123554
124497
  var ToolbarQuery_component = normalizeComponent(
123555
124498
  StandardTable_ToolbarQueryvue_type_script_lang_js,
123556
- ToolbarQueryvue_type_template_id_d3cc2f7c_render,
123557
- ToolbarQueryvue_type_template_id_d3cc2f7c_staticRenderFns,
124499
+ ToolbarQueryvue_type_template_id_2b616fae_render,
124500
+ ToolbarQueryvue_type_template_id_2b616fae_staticRenderFns,
123558
124501
  false,
123559
124502
  null,
123560
124503
  null,
@@ -124254,7 +125197,10 @@ function index_esm_default() { return index_esm_default.c || (index_esm_default.
124254
125197
  *
124255
125198
  * 用法一(全局注册,推荐):
124256
125199
  * import StandardComponents from '@cimom-ui/standard-ui'
124257
- * Vue.use(StandardComponents)
125200
+ * Vue.use(StandardComponents, {
125201
+ * moduleCode: process.env.VUE_APP_MODULE_CODE, // 模块编码,与页面、表格一起确定表头配置
125202
+ * request: (config) => axios.request(config) // 业务项目的请求方法,baseURL 决定 IP 和端口
125203
+ * })
124258
125204
  * // 之后所有页面模板可直接使用 <standard-button> / <standard-table> 等标签
124259
125205
  *
124260
125206
  * 用法二(局部注册):
@@ -124288,13 +125234,17 @@ function index_esm_default() { return index_esm_default.c || (index_esm_default.
124288
125234
 
124289
125235
 
124290
125236
 
125237
+
124291
125238
  // 全部 14 个顶层组件(StandardForm / StandardTable / StandardTabs 注册时会连带其子组件)
124292
125239
  // 说明:StandardAdvancedQuery 为 StandardFilterbar 的内部依赖,不单独暴露
124293
- var src_components = [StandardButton, StandardDialog, StandardContainer, StandardFilterbar, components_StandardForm, StandardHalfArea, StandardInput, StandardPage, StandardSplitter, StandardSelect, StandardTimePick, components_StandardTable, components_StandardTabs, StandardTree];
125240
+ var src_components = [StandardButton, StandardDialog, StandardContainer, components_StandardFilterbar, components_StandardForm, StandardHalfArea, StandardInput, StandardPage, StandardSplitter, StandardSelect, StandardTimePick, components_StandardTable, components_StandardTabs, StandardTree];
124294
125241
 
124295
125242
  // 全局 vxe-table 弹层层级是否已提升(install 重复调用时只设置一次)
124296
125243
  var zIndexConfigured = false;
124297
- var install = function install(Vue) {
125244
+ var install = function install(Vue, options) {
125245
+ // 模块编码和请求方法由业务项目注入。接口路径固定,IP 和端口来自请求方法的 baseURL
125246
+ if (options && options.moduleCode != null) setColumnModuleCode(options.moduleCode);
125247
+ if (options && typeof options.request === 'function') setColumnConfigRequest(options.request);
124298
125248
  // 提升 vxe-table 弹层层级(右键菜单/tooltip 等):vxe-table 默认 zIndex 起始值
124299
125249
  // 999,低于 Element UI 弹窗(el-dialog 等默认 2000 起),会导致弹窗内表格的
124300
125250
  // 右键菜单面板被弹窗遮挡而“失效”;统一提升到 5000,确保位于所有常规弹窗之上
@@ -124322,7 +125272,7 @@ var StandardComponents = {
124322
125272
  StandardButton: StandardButton,
124323
125273
  StandardDialog: StandardDialog,
124324
125274
  StandardContainer: StandardContainer,
124325
- StandardFilterbar: StandardFilterbar,
125275
+ StandardFilterbar: components_StandardFilterbar,
124326
125276
  StandardForm: components_StandardForm,
124327
125277
  StandardHalfArea: StandardHalfArea,
124328
125278
  StandardInput: StandardInput,