@tongfun/tf-widget 0.1.164 → 0.1.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tf-widget.common.js +934 -943
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +934 -943
- package/lib/tf-widget.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/tf-widget.umd.js
CHANGED
|
@@ -133381,6 +133381,865 @@ src.install = function (Vue) {
|
|
|
133381
133381
|
|
|
133382
133382
|
/***/ }),
|
|
133383
133383
|
|
|
133384
|
+
/***/ 3189:
|
|
133385
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
133386
|
+
|
|
133387
|
+
"use strict";
|
|
133388
|
+
|
|
133389
|
+
// EXPORTS
|
|
133390
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
133391
|
+
"Z": function() { return /* binding */ tf_ag_grid; }
|
|
133392
|
+
});
|
|
133393
|
+
|
|
133394
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=template&id=a38dbbb8&scoped=true&
|
|
133395
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"tf-common-table-container"},[_c('ag-grid-vue',_vm._b({directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"},{name:"agGridSetting",rawName:"v-agGridSetting",value:(_vm.entityTableName),expression:"entityTableName"}],ref:_vm.tableRef,staticClass:"ag-theme-alpine",staticStyle:{"width":"100%","height":"100%"},attrs:{"context":_vm.context,"column-defs":_vm.columns},on:{"grid-ready":_vm.onGridReady,"cell-clicked":_vm.cellClick,"body-scroll":_vm.bodyScroll,"row-drag-end":_vm.rowDragEnd,"row-clicked":_vm.rowClicked,"row-selected":_vm.rowSelected,"drag-stopped":_vm.dragStopped,"column-moved":_vm.columnMoved,"column-resized":_vm.columnResized,"cell-double-clicked":_vm.cellDBLClick,"selection-changed":_vm.selectionChange}},'ag-grid-vue',_vm.customAttrs,false))],1)}
|
|
133396
|
+
var staticRenderFns = []
|
|
133397
|
+
|
|
133398
|
+
|
|
133399
|
+
// EXTERNAL MODULE: ./node_modules/decimal.js/decimal.mjs
|
|
133400
|
+
var decimal = __webpack_require__(90482);
|
|
133401
|
+
// EXTERNAL MODULE: ./node_modules/ag-grid-vue/main.js
|
|
133402
|
+
var main = __webpack_require__(61146);
|
|
133403
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=template&id=385b6903&scoped=true&
|
|
133404
|
+
var tf_filtervue_type_template_id_385b6903_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"column-header-directive",on:{"click":function($event){return _vm.onSortRequested($event)}}},[_c('span',[_vm._v(_vm._s(_vm.params.displayName))]),(_vm.order)?_c('span',[_c('i',{class:[_vm.order === 'asc' ? 'el-icon-top' : 'el-icon-bottom']})]):_vm._e(),_c('div',{class:{'filter-main': _vm.isClick || _vm.isFilter }},[_c('el-popover',{attrs:{"width":"200","trigger":"manual","placement":"bottom"},model:{value:(_vm.isClick),callback:function ($$v) {_vm.isClick=$$v},expression:"isClick"}},[(_vm.isClick)?_c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.handleClickOut),expression:"handleClickOut"}],staticClass:"filter-main-context"},[_c('TfInput',{attrs:{"full-border":"","not-form":"","placeholder":"输入需要过滤的值"},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.handleSubmit.apply(null, arguments)}},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v},expression:"text"}}),_c('div',{staticClass:"option-buttons"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.handleCancel}},[_vm._v("重置")]),_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.handleSubmit}},[_vm._v("确定")])],1)],1):_vm._e(),_c('SvgIcon',{staticClass:"filter-icon",attrs:{"slot":"reference","icon-class":"filter"},on:{"click":function($event){$event.stopPropagation();return _vm.handleFilterClick.apply(null, arguments)}},slot:"reference"})],1)],1)])}
|
|
133405
|
+
var tf_filtervue_type_template_id_385b6903_scoped_true_staticRenderFns = []
|
|
133406
|
+
|
|
133407
|
+
|
|
133408
|
+
// EXTERNAL MODULE: ./package/tf-input/index.js + 94 modules
|
|
133409
|
+
var tf_input = __webpack_require__(37827);
|
|
133410
|
+
// EXTERNAL MODULE: ./node_modules/element-ui/src/utils/clickoutside.js + 1 modules
|
|
133411
|
+
var clickoutside = __webpack_require__(96410);
|
|
133412
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
133413
|
+
//
|
|
133414
|
+
//
|
|
133415
|
+
//
|
|
133416
|
+
//
|
|
133417
|
+
//
|
|
133418
|
+
//
|
|
133419
|
+
//
|
|
133420
|
+
//
|
|
133421
|
+
//
|
|
133422
|
+
//
|
|
133423
|
+
//
|
|
133424
|
+
//
|
|
133425
|
+
//
|
|
133426
|
+
//
|
|
133427
|
+
//
|
|
133428
|
+
//
|
|
133429
|
+
//
|
|
133430
|
+
//
|
|
133431
|
+
//
|
|
133432
|
+
//
|
|
133433
|
+
//
|
|
133434
|
+
//
|
|
133435
|
+
//
|
|
133436
|
+
//
|
|
133437
|
+
//
|
|
133438
|
+
//
|
|
133439
|
+
//
|
|
133440
|
+
//
|
|
133441
|
+
//
|
|
133442
|
+
//
|
|
133443
|
+
//
|
|
133444
|
+
//
|
|
133445
|
+
//
|
|
133446
|
+
|
|
133447
|
+
|
|
133448
|
+
|
|
133449
|
+
/* harmony default export */ var tf_filtervue_type_script_lang_js_ = ({
|
|
133450
|
+
components: {
|
|
133451
|
+
TfInput: tf_input/* default */.Z
|
|
133452
|
+
},
|
|
133453
|
+
directives: {
|
|
133454
|
+
Clickoutside: clickoutside/* default */.Z
|
|
133455
|
+
},
|
|
133456
|
+
props: {
|
|
133457
|
+
configData: {
|
|
133458
|
+
type: Object,
|
|
133459
|
+
default: () => {}
|
|
133460
|
+
}
|
|
133461
|
+
},
|
|
133462
|
+
data() {
|
|
133463
|
+
return {
|
|
133464
|
+
text: '',
|
|
133465
|
+
order: '',
|
|
133466
|
+
isClick: false
|
|
133467
|
+
};
|
|
133468
|
+
},
|
|
133469
|
+
computed: {
|
|
133470
|
+
isFilter() {
|
|
133471
|
+
return this.text !== null && this.text !== undefined && this.text !== '';
|
|
133472
|
+
}
|
|
133473
|
+
},
|
|
133474
|
+
methods: {
|
|
133475
|
+
/** 排序 */
|
|
133476
|
+
onSortRequested(event) {
|
|
133477
|
+
switch (this.order) {
|
|
133478
|
+
case 'asc':
|
|
133479
|
+
this.order = 'desc';
|
|
133480
|
+
break;
|
|
133481
|
+
case 'desc':
|
|
133482
|
+
this.order = '';
|
|
133483
|
+
break;
|
|
133484
|
+
default:
|
|
133485
|
+
this.order = 'asc';
|
|
133486
|
+
break;
|
|
133487
|
+
}
|
|
133488
|
+
this.params.setSort(this.order, event.shiftKey);
|
|
133489
|
+
},
|
|
133490
|
+
/** 单击外侧事件 */
|
|
133491
|
+
handleClickOut(e) {
|
|
133492
|
+
this.isClick = false;
|
|
133493
|
+
},
|
|
133494
|
+
/** 图标点击事件 */
|
|
133495
|
+
handleFilterClick() {
|
|
133496
|
+
this.isClick = !this.isClick;
|
|
133497
|
+
},
|
|
133498
|
+
/** 重置 */
|
|
133499
|
+
handleCancel() {
|
|
133500
|
+
this.text = '';
|
|
133501
|
+
this.handleSubmit();
|
|
133502
|
+
},
|
|
133503
|
+
/** 确认 */
|
|
133504
|
+
handleSubmit() {
|
|
133505
|
+
this.isClick = false;
|
|
133506
|
+
this.params.context.componentParent.handleUpdateFilter({
|
|
133507
|
+
value: this.text,
|
|
133508
|
+
params: this.params
|
|
133509
|
+
});
|
|
133510
|
+
// 过滤后根据当前列的排序方式进行排序
|
|
133511
|
+
this.params.setSort(this.order, false);
|
|
133512
|
+
}
|
|
133513
|
+
}
|
|
133514
|
+
});
|
|
133515
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
133516
|
+
/* harmony default export */ var components_tf_filtervue_type_script_lang_js_ = (tf_filtervue_type_script_lang_js_);
|
|
133517
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-73.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-73.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-73.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-73.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=style&index=0&id=385b6903&prod&lang=less&scoped=true&
|
|
133518
|
+
// extracted by mini-css-extract-plugin
|
|
133519
|
+
|
|
133520
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=style&index=0&id=385b6903&prod&lang=less&scoped=true&
|
|
133521
|
+
|
|
133522
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
133523
|
+
var componentNormalizer = __webpack_require__(1001);
|
|
133524
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue
|
|
133525
|
+
|
|
133526
|
+
|
|
133527
|
+
|
|
133528
|
+
;
|
|
133529
|
+
|
|
133530
|
+
|
|
133531
|
+
/* normalize component */
|
|
133532
|
+
|
|
133533
|
+
var component = (0,componentNormalizer/* default */.Z)(
|
|
133534
|
+
components_tf_filtervue_type_script_lang_js_,
|
|
133535
|
+
tf_filtervue_type_template_id_385b6903_scoped_true_render,
|
|
133536
|
+
tf_filtervue_type_template_id_385b6903_scoped_true_staticRenderFns,
|
|
133537
|
+
false,
|
|
133538
|
+
null,
|
|
133539
|
+
"385b6903",
|
|
133540
|
+
null
|
|
133541
|
+
|
|
133542
|
+
)
|
|
133543
|
+
|
|
133544
|
+
/* harmony default export */ var tf_filter = (component.exports);
|
|
133545
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=template&id=605b3b64&scoped=true&
|
|
133546
|
+
var tf_cell_textvue_type_template_id_605b3b64_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.closeRightMenu),expression:"closeRightMenu"}],staticClass:"tf-cell-text",on:{"contextmenu":function($event){$event.preventDefault();if($event.target !== $event.currentTarget){ return null; }$event.stopPropagation();return _vm.rightClick($event)}}},[_c('span',{on:{"contextmenu":function($event){$event.preventDefault();if($event.target !== $event.currentTarget){ return null; }$event.stopPropagation();return _vm.rightClick($event)}}},[_vm._v(_vm._s(_vm.displayValue))]),_c('RightMenu',{attrs:{"top":_vm.rightMenuTop,"left":_vm.rightMenuLeft,"show-menu":_vm.showRightMenu},on:{"update:showMenu":function($event){_vm.showRightMenu=$event},"update:show-menu":function($event){_vm.showRightMenu=$event},"rightMenuClick":_vm.dropdownCommand}})],1)}
|
|
133547
|
+
var tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns = []
|
|
133548
|
+
|
|
133549
|
+
|
|
133550
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=template&id=479f04e0&scoped=true&
|
|
133551
|
+
var right_menuvue_type_template_id_479f04e0_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showMenu),expression:"showMenu"}],staticClass:"right-menu",style:({ top: _vm.top + 'px', left: _vm.left + 'px' })},[_c('p',{on:{"click":function($event){$event.preventDefault();$event.stopPropagation();return _vm.rightMenuClick('copy')}}},[_vm._v(" 复制 "),_c('i',{staticClass:"el-icon-document-copy"})])])}
|
|
133552
|
+
var right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns = []
|
|
133553
|
+
|
|
133554
|
+
|
|
133555
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
133556
|
+
//
|
|
133557
|
+
//
|
|
133558
|
+
//
|
|
133559
|
+
//
|
|
133560
|
+
//
|
|
133561
|
+
//
|
|
133562
|
+
//
|
|
133563
|
+
//
|
|
133564
|
+
//
|
|
133565
|
+
//
|
|
133566
|
+
//
|
|
133567
|
+
//
|
|
133568
|
+
|
|
133569
|
+
/* harmony default export */ var right_menuvue_type_script_lang_js_ = ({
|
|
133570
|
+
props: {
|
|
133571
|
+
top: {
|
|
133572
|
+
type: Number,
|
|
133573
|
+
default: 0
|
|
133574
|
+
},
|
|
133575
|
+
left: {
|
|
133576
|
+
type: Number,
|
|
133577
|
+
default: 0
|
|
133578
|
+
},
|
|
133579
|
+
showMenu: {
|
|
133580
|
+
type: Boolean,
|
|
133581
|
+
default: false
|
|
133582
|
+
}
|
|
133583
|
+
},
|
|
133584
|
+
methods: {
|
|
133585
|
+
rightMenuClick(params) {
|
|
133586
|
+
this.$emit('rightMenuClick', params);
|
|
133587
|
+
this.closeRightMenu();
|
|
133588
|
+
},
|
|
133589
|
+
closeRightMenu() {
|
|
133590
|
+
this.$emit('update:showMenu', false);
|
|
133591
|
+
}
|
|
133592
|
+
}
|
|
133593
|
+
});
|
|
133594
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
133595
|
+
/* harmony default export */ var tf_cell_text_right_menuvue_type_script_lang_js_ = (right_menuvue_type_script_lang_js_);
|
|
133596
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-73.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-73.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-73.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-73.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=style&index=0&id=479f04e0&prod&lang=less&scoped=true&
|
|
133597
|
+
// extracted by mini-css-extract-plugin
|
|
133598
|
+
|
|
133599
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=style&index=0&id=479f04e0&prod&lang=less&scoped=true&
|
|
133600
|
+
|
|
133601
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue
|
|
133602
|
+
|
|
133603
|
+
|
|
133604
|
+
|
|
133605
|
+
;
|
|
133606
|
+
|
|
133607
|
+
|
|
133608
|
+
/* normalize component */
|
|
133609
|
+
|
|
133610
|
+
var right_menu_component = (0,componentNormalizer/* default */.Z)(
|
|
133611
|
+
tf_cell_text_right_menuvue_type_script_lang_js_,
|
|
133612
|
+
right_menuvue_type_template_id_479f04e0_scoped_true_render,
|
|
133613
|
+
right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns,
|
|
133614
|
+
false,
|
|
133615
|
+
null,
|
|
133616
|
+
"479f04e0",
|
|
133617
|
+
null
|
|
133618
|
+
|
|
133619
|
+
)
|
|
133620
|
+
|
|
133621
|
+
/* harmony default export */ var right_menu = (right_menu_component.exports);
|
|
133622
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
133623
|
+
//
|
|
133624
|
+
//
|
|
133625
|
+
//
|
|
133626
|
+
//
|
|
133627
|
+
//
|
|
133628
|
+
//
|
|
133629
|
+
//
|
|
133630
|
+
//
|
|
133631
|
+
//
|
|
133632
|
+
//
|
|
133633
|
+
//
|
|
133634
|
+
//
|
|
133635
|
+
//
|
|
133636
|
+
|
|
133637
|
+
|
|
133638
|
+
|
|
133639
|
+
/* harmony default export */ var tf_cell_textvue_type_script_lang_js_ = ({
|
|
133640
|
+
components: {
|
|
133641
|
+
RightMenu: right_menu
|
|
133642
|
+
},
|
|
133643
|
+
directives: {
|
|
133644
|
+
Clickoutside: clickoutside/* default */.Z
|
|
133645
|
+
},
|
|
133646
|
+
data() {
|
|
133647
|
+
return {
|
|
133648
|
+
displayValue: '',
|
|
133649
|
+
rightMenuLeft: 0,
|
|
133650
|
+
rightMenuTop: 0,
|
|
133651
|
+
showRightMenu: false
|
|
133652
|
+
};
|
|
133653
|
+
},
|
|
133654
|
+
beforeMount() {
|
|
133655
|
+
// params: 当前操作单元格对象
|
|
133656
|
+
this.setInitialState(this.params);
|
|
133657
|
+
},
|
|
133658
|
+
methods: {
|
|
133659
|
+
setInitialState(params) {
|
|
133660
|
+
this.displayValue = params.value;
|
|
133661
|
+
},
|
|
133662
|
+
/** 右键点击 */
|
|
133663
|
+
rightClick($event) {
|
|
133664
|
+
this.rightMenuTop = $event.offsetY;
|
|
133665
|
+
// TODO: 这里的17是agcell的paddingLeft的值,若有样式调整,这里也要调整
|
|
133666
|
+
this.rightMenuLeft = $event.offsetX + 17;
|
|
133667
|
+
this.showRightMenu = true;
|
|
133668
|
+
},
|
|
133669
|
+
closeRightMenu() {
|
|
133670
|
+
this.showRightMenu = false;
|
|
133671
|
+
},
|
|
133672
|
+
dropdownCommand(command) {
|
|
133673
|
+
if (command === 'copy') {
|
|
133674
|
+
const input = document.createElement('input');
|
|
133675
|
+
input.value = this.displayValue;
|
|
133676
|
+
input.setAttribute('id', 'temp-input-id');
|
|
133677
|
+
document.body.appendChild(input);
|
|
133678
|
+
input.select();
|
|
133679
|
+
document.execCommand('copy');
|
|
133680
|
+
document.querySelector('#temp-input-id').remove();
|
|
133681
|
+
}
|
|
133682
|
+
}
|
|
133683
|
+
}
|
|
133684
|
+
});
|
|
133685
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
133686
|
+
/* harmony default export */ var components_tf_cell_textvue_type_script_lang_js_ = (tf_cell_textvue_type_script_lang_js_);
|
|
133687
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue
|
|
133688
|
+
|
|
133689
|
+
|
|
133690
|
+
|
|
133691
|
+
|
|
133692
|
+
|
|
133693
|
+
/* normalize component */
|
|
133694
|
+
;
|
|
133695
|
+
var tf_cell_text_component = (0,componentNormalizer/* default */.Z)(
|
|
133696
|
+
components_tf_cell_textvue_type_script_lang_js_,
|
|
133697
|
+
tf_cell_textvue_type_template_id_605b3b64_scoped_true_render,
|
|
133698
|
+
tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns,
|
|
133699
|
+
false,
|
|
133700
|
+
null,
|
|
133701
|
+
"605b3b64",
|
|
133702
|
+
null
|
|
133703
|
+
|
|
133704
|
+
)
|
|
133705
|
+
|
|
133706
|
+
/* harmony default export */ var tf_cell_text = (tf_cell_text_component.exports);
|
|
133707
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue?vue&type=template&id=3f0d8a7c&
|
|
133708
|
+
var tf_input_cell_rendervue_type_template_id_3f0d8a7c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('TfInput',{attrs:{"not-form":"","type":_vm.type,"disabled":_vm.disabled},on:{"change":_vm.handleChange},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}})}
|
|
133709
|
+
var tf_input_cell_rendervue_type_template_id_3f0d8a7c_staticRenderFns = []
|
|
133710
|
+
|
|
133711
|
+
|
|
133712
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue?vue&type=script&lang=js&
|
|
133713
|
+
//
|
|
133714
|
+
//
|
|
133715
|
+
//
|
|
133716
|
+
//
|
|
133717
|
+
//
|
|
133718
|
+
//
|
|
133719
|
+
//
|
|
133720
|
+
//
|
|
133721
|
+
//
|
|
133722
|
+
|
|
133723
|
+
|
|
133724
|
+
/* harmony default export */ var tf_input_cell_rendervue_type_script_lang_js_ = ({
|
|
133725
|
+
name: 'TfInputCellRender',
|
|
133726
|
+
components: {
|
|
133727
|
+
TfInput: tf_input/* default */.Z
|
|
133728
|
+
},
|
|
133729
|
+
data() {
|
|
133730
|
+
return {
|
|
133731
|
+
type: '',
|
|
133732
|
+
value: '',
|
|
133733
|
+
disabled: false
|
|
133734
|
+
};
|
|
133735
|
+
},
|
|
133736
|
+
/** params:当前操作单元格对象 */
|
|
133737
|
+
beforeMount() {
|
|
133738
|
+
this.setInitialState();
|
|
133739
|
+
},
|
|
133740
|
+
methods: {
|
|
133741
|
+
setInitialState() {
|
|
133742
|
+
this.value = this.params.value;
|
|
133743
|
+
this.type = this.params.type || 'input';
|
|
133744
|
+
// 表格设置的特殊逻辑
|
|
133745
|
+
if (this.params.column.colId === 'isFreeze' && this.params.data.isChild) {
|
|
133746
|
+
this.disabled = true;
|
|
133747
|
+
}
|
|
133748
|
+
},
|
|
133749
|
+
handleChange(value) {
|
|
133750
|
+
this.params.context.componentParent.handleChangeValue({
|
|
133751
|
+
value: value,
|
|
133752
|
+
params: this.params
|
|
133753
|
+
});
|
|
133754
|
+
}
|
|
133755
|
+
}
|
|
133756
|
+
});
|
|
133757
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue?vue&type=script&lang=js&
|
|
133758
|
+
/* harmony default export */ var components_tf_input_cell_rendervue_type_script_lang_js_ = (tf_input_cell_rendervue_type_script_lang_js_);
|
|
133759
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue
|
|
133760
|
+
|
|
133761
|
+
|
|
133762
|
+
|
|
133763
|
+
|
|
133764
|
+
|
|
133765
|
+
/* normalize component */
|
|
133766
|
+
;
|
|
133767
|
+
var tf_input_cell_render_component = (0,componentNormalizer/* default */.Z)(
|
|
133768
|
+
components_tf_input_cell_rendervue_type_script_lang_js_,
|
|
133769
|
+
tf_input_cell_rendervue_type_template_id_3f0d8a7c_render,
|
|
133770
|
+
tf_input_cell_rendervue_type_template_id_3f0d8a7c_staticRenderFns,
|
|
133771
|
+
false,
|
|
133772
|
+
null,
|
|
133773
|
+
null,
|
|
133774
|
+
null
|
|
133775
|
+
|
|
133776
|
+
)
|
|
133777
|
+
|
|
133778
|
+
/* harmony default export */ var tf_input_cell_render = (tf_input_cell_render_component.exports);
|
|
133779
|
+
// EXTERNAL MODULE: ./src/utils/index.js
|
|
133780
|
+
var utils = __webpack_require__(68023);
|
|
133781
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
133782
|
+
//
|
|
133783
|
+
//
|
|
133784
|
+
//
|
|
133785
|
+
//
|
|
133786
|
+
//
|
|
133787
|
+
//
|
|
133788
|
+
//
|
|
133789
|
+
//
|
|
133790
|
+
//
|
|
133791
|
+
//
|
|
133792
|
+
//
|
|
133793
|
+
//
|
|
133794
|
+
//
|
|
133795
|
+
//
|
|
133796
|
+
//
|
|
133797
|
+
//
|
|
133798
|
+
//
|
|
133799
|
+
//
|
|
133800
|
+
//
|
|
133801
|
+
//
|
|
133802
|
+
//
|
|
133803
|
+
//
|
|
133804
|
+
//
|
|
133805
|
+
//
|
|
133806
|
+
//
|
|
133807
|
+
|
|
133808
|
+
|
|
133809
|
+
|
|
133810
|
+
|
|
133811
|
+
|
|
133812
|
+
|
|
133813
|
+
|
|
133814
|
+
/* harmony default export */ var srcvue_type_script_lang_js_ = ({
|
|
133815
|
+
name: 'TfAgGrid',
|
|
133816
|
+
/* eslint-disable */
|
|
133817
|
+
components: {
|
|
133818
|
+
AgGridVue: main.AgGridVue,
|
|
133819
|
+
TfFilter: tf_filter,
|
|
133820
|
+
TfCellText: tf_cell_text,
|
|
133821
|
+
TfInputCellRender: tf_input_cell_render
|
|
133822
|
+
},
|
|
133823
|
+
/* eslint-enable */
|
|
133824
|
+
props: {
|
|
133825
|
+
data: {
|
|
133826
|
+
type: Array,
|
|
133827
|
+
default: () => []
|
|
133828
|
+
},
|
|
133829
|
+
columns: {
|
|
133830
|
+
type: Array,
|
|
133831
|
+
default: () => []
|
|
133832
|
+
},
|
|
133833
|
+
// 表头字段对应的数据集
|
|
133834
|
+
fieldValueSet: {
|
|
133835
|
+
type: Object,
|
|
133836
|
+
default: () => {}
|
|
133837
|
+
},
|
|
133838
|
+
loading: {
|
|
133839
|
+
type: Boolean,
|
|
133840
|
+
default: false
|
|
133841
|
+
},
|
|
133842
|
+
// 表格合计
|
|
133843
|
+
totalData: {
|
|
133844
|
+
type: Object,
|
|
133845
|
+
default: () => {}
|
|
133846
|
+
},
|
|
133847
|
+
// 字段表格合计
|
|
133848
|
+
totalField: {
|
|
133849
|
+
type: Array,
|
|
133850
|
+
default: () => []
|
|
133851
|
+
},
|
|
133852
|
+
// 是否开启行拖拽
|
|
133853
|
+
rowDragManaged: {
|
|
133854
|
+
type: Boolean,
|
|
133855
|
+
default: false
|
|
133856
|
+
},
|
|
133857
|
+
// 需配合rowDragManaged同时为true 行拖拽生效
|
|
133858
|
+
rowDragEntireRow: {
|
|
133859
|
+
type: Boolean,
|
|
133860
|
+
default: false
|
|
133861
|
+
},
|
|
133862
|
+
cellStyle: {
|
|
133863
|
+
type: Function,
|
|
133864
|
+
default: null
|
|
133865
|
+
},
|
|
133866
|
+
// 启用多行拖拽
|
|
133867
|
+
rowDragMultiRow: {
|
|
133868
|
+
type: Boolean,
|
|
133869
|
+
default: false
|
|
133870
|
+
},
|
|
133871
|
+
// 允许使用单击选择多行
|
|
133872
|
+
rowMultiSelectWithClick: {
|
|
133873
|
+
type: Boolean,
|
|
133874
|
+
default: false
|
|
133875
|
+
},
|
|
133876
|
+
// 用户自定义字段颜色方案列表
|
|
133877
|
+
personalFontColor: {
|
|
133878
|
+
type: Array,
|
|
133879
|
+
default: () => []
|
|
133880
|
+
},
|
|
133881
|
+
// 启用选中单元格文本
|
|
133882
|
+
enableCellTextSelection: {
|
|
133883
|
+
type: Boolean,
|
|
133884
|
+
default: true
|
|
133885
|
+
},
|
|
133886
|
+
suppressScrollOnNewData: {
|
|
133887
|
+
type: Boolean,
|
|
133888
|
+
default: true
|
|
133889
|
+
},
|
|
133890
|
+
enableBrowserTooltips: {
|
|
133891
|
+
type: Boolean,
|
|
133892
|
+
default: false
|
|
133893
|
+
},
|
|
133894
|
+
tooltipShowDelay: {
|
|
133895
|
+
type: Number,
|
|
133896
|
+
default: 100
|
|
133897
|
+
},
|
|
133898
|
+
tooltipHideDelay: {
|
|
133899
|
+
type: Number,
|
|
133900
|
+
default: 2000
|
|
133901
|
+
},
|
|
133902
|
+
entityTableName: {
|
|
133903
|
+
type: String,
|
|
133904
|
+
default: ''
|
|
133905
|
+
}
|
|
133906
|
+
},
|
|
133907
|
+
data() {
|
|
133908
|
+
return {
|
|
133909
|
+
context: {},
|
|
133910
|
+
gridApi: null,
|
|
133911
|
+
columnApi: null,
|
|
133912
|
+
selectedRows: [],
|
|
133913
|
+
tableRef: (0,utils/* randomRefName */.zs)(15),
|
|
133914
|
+
// 绑定默认列属性
|
|
133915
|
+
defaultColDef: {
|
|
133916
|
+
sortable: true,
|
|
133917
|
+
resizable: true,
|
|
133918
|
+
// 禁止通过拖动列来固定列
|
|
133919
|
+
lockPinned: true,
|
|
133920
|
+
cellRenderer: 'TfCellText',
|
|
133921
|
+
cellStyle: this.cellStyle || this.setCellStyle,
|
|
133922
|
+
headerComponent: 'TfFilter'
|
|
133923
|
+
},
|
|
133924
|
+
// 过滤条件
|
|
133925
|
+
filterOption: {},
|
|
133926
|
+
// 过滤后的数据
|
|
133927
|
+
filteredData: [],
|
|
133928
|
+
// 没有数据的提示
|
|
133929
|
+
overlayNoRowsTemplate: '<span><svg v-else class="svg-icon-table-empty" aria-hidden="true" style="width: 6vw; height: 6vh;">\n' + '<use xlink:href="#icon-table-empty" /></svg><div style="font-size: 1.4vh;">暂无数据</div></span>',
|
|
133930
|
+
rowHeight: 35,
|
|
133931
|
+
headerHeight: 35,
|
|
133932
|
+
scrollTop: 0,
|
|
133933
|
+
scrollLeft: 0
|
|
133934
|
+
};
|
|
133935
|
+
},
|
|
133936
|
+
computed: {
|
|
133937
|
+
customAttrs: function () {
|
|
133938
|
+
return {
|
|
133939
|
+
// 选中模式:多选|单选
|
|
133940
|
+
'row-selection': 'multiple',
|
|
133941
|
+
// 内容行高
|
|
133942
|
+
'row-height': this.rowHeight,
|
|
133943
|
+
// 表头行高
|
|
133944
|
+
'header-height': this.headerHeight,
|
|
133945
|
+
// 允许单击选择多行
|
|
133946
|
+
'row-multi-select-with-click': this.rowMultiSelectWithClick,
|
|
133947
|
+
// 默认列定义
|
|
133948
|
+
'default-col-def': this.defaultColDef,
|
|
133949
|
+
// 启用行拖拽
|
|
133950
|
+
'row-drag-managed': this.rowDragManaged,
|
|
133951
|
+
// 允许在行上的任意位置单击拖动
|
|
133952
|
+
'row-drag-entire-row': this.rowDragEntireRow,
|
|
133953
|
+
// 允许同时拖动多行
|
|
133954
|
+
'row-drag-multi-row': this.rowDragMultiRow,
|
|
133955
|
+
// 空数据提示
|
|
133956
|
+
'overlay-no-rows-template': this.overlayNoRowsTemplate,
|
|
133957
|
+
// 启用选中单元格文本
|
|
133958
|
+
'enable-cell-text-selection': this.enableCellTextSelection,
|
|
133959
|
+
// 悬浮文本显示需要的延迟
|
|
133960
|
+
'tooltip-show-delay': this.tooltipShowDelay,
|
|
133961
|
+
// 悬浮文本隐藏需要的延迟
|
|
133962
|
+
'tooltip-hide-delay': this.tooltipHideDelay,
|
|
133963
|
+
// 启用行动画
|
|
133964
|
+
'animate-rows': true,
|
|
133965
|
+
// 允许跨行(表格启用rowSpan时需要开启此属性)
|
|
133966
|
+
'suppress-row-transform': true,
|
|
133967
|
+
// 禁用colDef属性检查引起的控制台警告信息
|
|
133968
|
+
'suppress-property-names-check': true,
|
|
133969
|
+
// 关闭列移动动画(适配低性能)
|
|
133970
|
+
'suppress-column-move-animation': true,
|
|
133971
|
+
// 当提供新数据是否要滚动至顶部
|
|
133972
|
+
'suppress-scroll-on-new-data': this.suppressScrollOnNewData,
|
|
133973
|
+
// 启用浏览器的默认工具提示,而不是网格的工具提示组件
|
|
133974
|
+
'enable-browser-tooltips': this.enableBrowserTooltips,
|
|
133975
|
+
...this.$attrs
|
|
133976
|
+
};
|
|
133977
|
+
}
|
|
133978
|
+
},
|
|
133979
|
+
watch: {
|
|
133980
|
+
data() {
|
|
133981
|
+
this.filterMethod();
|
|
133982
|
+
this.initBodyScroll();
|
|
133983
|
+
},
|
|
133984
|
+
totalData() {
|
|
133985
|
+
this.getSummaries();
|
|
133986
|
+
},
|
|
133987
|
+
filteredData() {
|
|
133988
|
+
this.loadRowData(this.filteredData || []);
|
|
133989
|
+
},
|
|
133990
|
+
gridApi() {
|
|
133991
|
+
this.getSummaries();
|
|
133992
|
+
this.loadRowData(this.filteredData || []);
|
|
133993
|
+
}
|
|
133994
|
+
},
|
|
133995
|
+
/** 表格绑定上下文 */
|
|
133996
|
+
beforeMount() {
|
|
133997
|
+
this.context = {
|
|
133998
|
+
componentParent: this
|
|
133999
|
+
};
|
|
134000
|
+
},
|
|
134001
|
+
activated() {
|
|
134002
|
+
this.initBodyScroll();
|
|
134003
|
+
},
|
|
134004
|
+
methods: {
|
|
134005
|
+
/** 初始化滚动条 */
|
|
134006
|
+
initBodyScroll() {
|
|
134007
|
+
this.$nextTick(() => {
|
|
134008
|
+
const viewport = this.$refs[this.tableRef].$el.querySelector('.ag-body-viewport');
|
|
134009
|
+
viewport.scrollTop = this.scrollTop;
|
|
134010
|
+
viewport.scrollLeft = this.scrollLeft;
|
|
134011
|
+
});
|
|
134012
|
+
},
|
|
134013
|
+
/** 表格滚动事件 */
|
|
134014
|
+
bodyScroll(params) {
|
|
134015
|
+
const {
|
|
134016
|
+
top,
|
|
134017
|
+
left
|
|
134018
|
+
} = params;
|
|
134019
|
+
this.scrollTop = top;
|
|
134020
|
+
this.scrollLeft = left;
|
|
134021
|
+
},
|
|
134022
|
+
/** 加载表格数据 */
|
|
134023
|
+
loadRowData(data) {
|
|
134024
|
+
this.gridApi?.setRowData(data || []);
|
|
134025
|
+
},
|
|
134026
|
+
/** 表格合计 */
|
|
134027
|
+
getSummaries() {
|
|
134028
|
+
if (!this.totalData || !this.totalField || !this.totalField.length) {
|
|
134029
|
+
return;
|
|
134030
|
+
}
|
|
134031
|
+
let summaryRowData = this.getTotalData();
|
|
134032
|
+
this.gridApi?.setPinnedBottomRowData([summaryRowData]);
|
|
134033
|
+
},
|
|
134034
|
+
/** 获取合计数据 */
|
|
134035
|
+
getTotalData() {
|
|
134036
|
+
let totalData = {};
|
|
134037
|
+
if (this.totalField && this.totalField.length) {
|
|
134038
|
+
// 计算需要合计字段的值
|
|
134039
|
+
this.totalField.forEach(field => {
|
|
134040
|
+
totalData[field] = this.filteredData.reduce((prev, curr) => {
|
|
134041
|
+
const value = isNaN(+curr[field]) ? 0 : +curr[field];
|
|
134042
|
+
return +decimal/* default.add */.Z.add(+prev, +value);
|
|
134043
|
+
}, 0);
|
|
134044
|
+
});
|
|
134045
|
+
// 将其余字段合计值设置为空
|
|
134046
|
+
const otherFields = this.columns.filter(item => this.totalField.indexOf(item.field) === -1);
|
|
134047
|
+
otherFields.forEach(item => {
|
|
134048
|
+
totalData[item.field] = '';
|
|
134049
|
+
});
|
|
134050
|
+
if (this.entityTableName) {
|
|
134051
|
+
totalData[this.gridApi.getColumnDefs()[1].colId] = '合计';
|
|
134052
|
+
}
|
|
134053
|
+
} else {
|
|
134054
|
+
totalData = this.totalData;
|
|
134055
|
+
}
|
|
134056
|
+
return totalData;
|
|
134057
|
+
},
|
|
134058
|
+
/** 快捷过滤确认 */
|
|
134059
|
+
handleUpdateFilter({
|
|
134060
|
+
value,
|
|
134061
|
+
params
|
|
134062
|
+
}) {
|
|
134063
|
+
this.filterOption[params.column.colId] = {
|
|
134064
|
+
...params,
|
|
134065
|
+
value
|
|
134066
|
+
};
|
|
134067
|
+
this.filterMethod();
|
|
134068
|
+
},
|
|
134069
|
+
/** 过滤条件方法 */
|
|
134070
|
+
filterMethod() {
|
|
134071
|
+
const filteredData = this.data.filter(current => {
|
|
134072
|
+
let isFilter = true;
|
|
134073
|
+
const keyArr = Object.keys(current);
|
|
134074
|
+
keyArr.some(key => {
|
|
134075
|
+
// 存在过滤条件时执行
|
|
134076
|
+
if (this.filterOption[key]?.value) {
|
|
134077
|
+
// 基础资料和枚举要特殊处理
|
|
134078
|
+
const currentName = this.isBasicData(current[key]) ? current[key].name : current[key];
|
|
134079
|
+
if (currentName === null || currentName === undefined || !`${currentName}`.includes(`${this.filterOption[key].value}`)) {
|
|
134080
|
+
isFilter = false;
|
|
134081
|
+
return true;
|
|
134082
|
+
}
|
|
134083
|
+
}
|
|
134084
|
+
});
|
|
134085
|
+
return isFilter;
|
|
134086
|
+
});
|
|
134087
|
+
this.filteredData = filteredData;
|
|
134088
|
+
// 更新表尾合计
|
|
134089
|
+
this.getSummaries();
|
|
134090
|
+
},
|
|
134091
|
+
isBasicData(data) {
|
|
134092
|
+
return typeof data === 'object' && data !== null && data !== undefined;
|
|
134093
|
+
},
|
|
134094
|
+
/** 表格选择项change事件 */
|
|
134095
|
+
selectionChange() {
|
|
134096
|
+
this.selectedRows = this.gridApi.getSelectedRows();
|
|
134097
|
+
this.$emit('selection-changed', this.selectedRows);
|
|
134098
|
+
},
|
|
134099
|
+
/** 列的宽度调整的事件的回调 */
|
|
134100
|
+
columnResized(params) {
|
|
134101
|
+
this.$emit('column-resized', params);
|
|
134102
|
+
},
|
|
134103
|
+
/** 拖动停止,此事件包含列移动,列调整大小等 */
|
|
134104
|
+
dragStopped(params) {
|
|
134105
|
+
this.$emit('drag-stopped', params);
|
|
134106
|
+
},
|
|
134107
|
+
/** 列移动排序 */
|
|
134108
|
+
columnMoved(params) {
|
|
134109
|
+
this.$emit('column-moved', params);
|
|
134110
|
+
},
|
|
134111
|
+
/** 行拖拽结束后 */
|
|
134112
|
+
rowDragEnd(params) {
|
|
134113
|
+
this.$emit('row-drag-end', params);
|
|
134114
|
+
},
|
|
134115
|
+
/** 单元格单击事件 */
|
|
134116
|
+
cellClick(params) {
|
|
134117
|
+
this.$emit('cell-clicked', params);
|
|
134118
|
+
},
|
|
134119
|
+
/** 行点击事件 */
|
|
134120
|
+
rowClicked(params) {
|
|
134121
|
+
this.$emit('row-clicked', params);
|
|
134122
|
+
},
|
|
134123
|
+
/** 行选中事件 */
|
|
134124
|
+
rowSelected(params) {
|
|
134125
|
+
// 这里的判断是防止点击一次 触发两次行点击事件
|
|
134126
|
+
if (params.event) {
|
|
134127
|
+
// 这里的事件名称不要再修改
|
|
134128
|
+
this.$emit('current-change', params);
|
|
134129
|
+
}
|
|
134130
|
+
},
|
|
134131
|
+
/** 单元格双击事件 */
|
|
134132
|
+
cellDBLClick(params) {
|
|
134133
|
+
this.$emit('cell-double-clicked', params);
|
|
134134
|
+
},
|
|
134135
|
+
/** 单元格样式 */
|
|
134136
|
+
setCellStyle(params) {
|
|
134137
|
+
if (params.data?.color) {
|
|
134138
|
+
return {
|
|
134139
|
+
color: params.data.color
|
|
134140
|
+
};
|
|
134141
|
+
}
|
|
134142
|
+
},
|
|
134143
|
+
/** 表格初始化 */
|
|
134144
|
+
onGridReady(params) {
|
|
134145
|
+
this.gridApi = params.api;
|
|
134146
|
+
},
|
|
134147
|
+
/** 编辑表格单元格值 */
|
|
134148
|
+
handleChangeValue(datas) {
|
|
134149
|
+
this.$emit('handleChangeCellValue', datas);
|
|
134150
|
+
},
|
|
134151
|
+
/**
|
|
134152
|
+
* 手动选中行
|
|
134153
|
+
* @params rows: 需要选中的行
|
|
134154
|
+
* @params field: 判断行中的字段
|
|
134155
|
+
* @params deselectAll: 是否先清空所有选中行
|
|
134156
|
+
* @params ensureIndexVisible: 选中行后是否需要滚动
|
|
134157
|
+
*/
|
|
134158
|
+
handleSelectRows(rows = [], field = 'id', deselectAll = false, ensureIndexVisible = false) {
|
|
134159
|
+
if (!this.gridApi) {
|
|
134160
|
+
return;
|
|
134161
|
+
}
|
|
134162
|
+
deselectAll && this.gridApi.deselectAll();
|
|
134163
|
+
const ids = rows.map(item => item[field]);
|
|
134164
|
+
this.gridApi.forEachNodeAfterFilter(node => {
|
|
134165
|
+
if (ids.indexOf(node.data[field]) !== -1) {
|
|
134166
|
+
node.setSelected(true);
|
|
134167
|
+
ensureIndexVisible && this.gridApi.ensureIndexVisible(node.rowIndex, 'middle');
|
|
134168
|
+
}
|
|
134169
|
+
});
|
|
134170
|
+
},
|
|
134171
|
+
/**
|
|
134172
|
+
* 滚动到指定行
|
|
134173
|
+
* @params row: 需要滚动到的行
|
|
134174
|
+
* @params field: 判断行中的字段
|
|
134175
|
+
* @params position: 滚动停靠的位置
|
|
134176
|
+
*/
|
|
134177
|
+
scrollToRow(row, field = 'id', position = 'middle') {
|
|
134178
|
+
if (!this.gridApi) {
|
|
134179
|
+
return;
|
|
134180
|
+
}
|
|
134181
|
+
const findData = (this.gridApi.getSelectedNodes() || []).find(d => d.data[field] === row[field]);
|
|
134182
|
+
if (findData) {
|
|
134183
|
+
this.gridApi.ensureIndexVisible(findData.rowIndex, position);
|
|
134184
|
+
}
|
|
134185
|
+
},
|
|
134186
|
+
/**
|
|
134187
|
+
* 滚动到选中行的第x行
|
|
134188
|
+
* @params index: 需要滚动到的行数
|
|
134189
|
+
* @params position: 滚动停靠的位置
|
|
134190
|
+
*/
|
|
134191
|
+
scrollToIndex(index = 1, position = 'middle') {
|
|
134192
|
+
if (!this.gridApi) {
|
|
134193
|
+
return;
|
|
134194
|
+
}
|
|
134195
|
+
this.gridApi.ensureIndexVisible(this.gridApi.getSelectedNodes()[index - 1].rowIndex, position);
|
|
134196
|
+
},
|
|
134197
|
+
/** 刷新 */
|
|
134198
|
+
refreshCells() {
|
|
134199
|
+
if (!this.gridApi) {
|
|
134200
|
+
return;
|
|
134201
|
+
}
|
|
134202
|
+
this.gridApi.refreshCells();
|
|
134203
|
+
}
|
|
134204
|
+
}
|
|
134205
|
+
});
|
|
134206
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
134207
|
+
/* harmony default export */ var tf_ag_grid_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
|
|
134208
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-63.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-63.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-63.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-63.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=style&index=0&id=a38dbbb8&prod&lang=scss&scoped=true&
|
|
134209
|
+
// extracted by mini-css-extract-plugin
|
|
134210
|
+
|
|
134211
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=style&index=0&id=a38dbbb8&prod&lang=scss&scoped=true&
|
|
134212
|
+
|
|
134213
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue
|
|
134214
|
+
|
|
134215
|
+
|
|
134216
|
+
|
|
134217
|
+
;
|
|
134218
|
+
|
|
134219
|
+
|
|
134220
|
+
/* normalize component */
|
|
134221
|
+
|
|
134222
|
+
var src_component = (0,componentNormalizer/* default */.Z)(
|
|
134223
|
+
tf_ag_grid_srcvue_type_script_lang_js_,
|
|
134224
|
+
render,
|
|
134225
|
+
staticRenderFns,
|
|
134226
|
+
false,
|
|
134227
|
+
null,
|
|
134228
|
+
"a38dbbb8",
|
|
134229
|
+
null
|
|
134230
|
+
|
|
134231
|
+
)
|
|
134232
|
+
|
|
134233
|
+
/* harmony default export */ var src = (src_component.exports);
|
|
134234
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/index.js
|
|
134235
|
+
|
|
134236
|
+
src.install = function (Vue) {
|
|
134237
|
+
Vue.component(src.name, src);
|
|
134238
|
+
};
|
|
134239
|
+
/* harmony default export */ var tf_ag_grid = (src);
|
|
134240
|
+
|
|
134241
|
+
/***/ }),
|
|
134242
|
+
|
|
133384
134243
|
/***/ 41663:
|
|
133385
134244
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
133386
134245
|
|
|
@@ -136594,7 +137453,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
136594
137453
|
// EXTERNAL MODULE: ./src/utils/index.js
|
|
136595
137454
|
var utils = __webpack_require__(68023);
|
|
136596
137455
|
// EXTERNAL MODULE: ./src/directives/index.js + 69 modules
|
|
136597
|
-
var directives = __webpack_require__(
|
|
137456
|
+
var directives = __webpack_require__(67867);
|
|
136598
137457
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table/src/index.vue?vue&type=script&lang=js&
|
|
136599
137458
|
//
|
|
136600
137459
|
//
|
|
@@ -137329,7 +138188,7 @@ function getVoucherIds(data) {
|
|
|
137329
138188
|
|
|
137330
138189
|
/***/ }),
|
|
137331
138190
|
|
|
137332
|
-
/***/
|
|
138191
|
+
/***/ 67867:
|
|
137333
138192
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
137334
138193
|
|
|
137335
138194
|
"use strict";
|
|
@@ -139668,16 +140527,18 @@ const ElDialogDrag = {
|
|
|
139668
140527
|
fullScreen(el, binding, vNode);
|
|
139669
140528
|
}
|
|
139670
140529
|
};
|
|
139671
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=template&id=
|
|
139672
|
-
var
|
|
139673
|
-
var
|
|
140530
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=template&id=e45c9f3e&scoped=true&
|
|
140531
|
+
var settingvue_type_template_id_e45c9f3e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{staticClass:"tf-ag-grid-setting-dialog",attrs:{"title":"列配置","visible":_vm.dialogVisible,"append-to-body":"","before-close":_vm.close,"close-on-click-modal":false,"close-on-press-escape":false},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('div',{staticClass:"setting-container"},[_c('el-tabs',{model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v},expression:"activeTab"}},[_c('el-tab-pane',{attrs:{"label":"表头设置","name":"form"}},[_c('TfSettingForm',{ref:"formSetting",attrs:{"config-list":_vm.configList},on:{"close":_vm.close,"save":function($event){return _vm.$emit('save')}}})],1)],1)],1)])}
|
|
140532
|
+
var settingvue_type_template_id_e45c9f3e_scoped_true_staticRenderFns = []
|
|
139674
140533
|
|
|
139675
140534
|
|
|
139676
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=template&id=
|
|
139677
|
-
var
|
|
139678
|
-
var
|
|
140535
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=template&id=01be3b48&scoped=true&
|
|
140536
|
+
var tf_setting_formvue_type_template_id_01be3b48_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"tf-setting-form-content"},[_c('div',{staticClass:"tf-header-group"},[_c('div',{staticClass:"tf-search-text"},[_c('el-input',{attrs:{"clearable":"","placeholder":"搜索字段名称"},on:{"input":_vm.handleSearchField},model:{value:(_vm.searchContent),callback:function ($$v) {_vm.searchContent=$$v},expression:"searchContent"}},[_c('i',{staticClass:"el-input__icon el-icon-search",attrs:{"slot":"prefix"},slot:"prefix"})])],1),_c('TfButtonGroup',[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('showChange')}}},[_vm._v("显/隐切换")]),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('freeze')}}},[_vm._v("冻结/固定")]),_c('el-button',{attrs:{"type":"primary","size":"mini","loading":_vm.saveLoading},on:{"click":function($event){return _vm.handlerButtons('save')}}},[_vm._v("保存")]),_c('el-button',{attrs:{"type":"danger","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('close')}}},[_vm._v("关闭")])],1)],1),_c('div',{staticClass:"tf-ag-grid-setting-table"},[_c('TfAgGrid',{ref:"settingTable",attrs:{"data":_vm.showTableData,"columns":_vm.mainColumns,"enable-cell-text-selection":false},on:{"selection-changed":_vm.selectChange,"handleChangeCellValue":_vm.handleChangeCellValue}})],1)])}
|
|
140537
|
+
var tf_setting_formvue_type_template_id_01be3b48_scoped_true_staticRenderFns = []
|
|
139679
140538
|
|
|
139680
140539
|
|
|
140540
|
+
// EXTERNAL MODULE: ./package/tf-ag-grid/index.js + 26 modules
|
|
140541
|
+
var tf_ag_grid = __webpack_require__(3189);
|
|
139681
140542
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=script&lang=js&
|
|
139682
140543
|
//
|
|
139683
140544
|
//
|
|
@@ -139711,10 +140572,6 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139711
140572
|
//
|
|
139712
140573
|
//
|
|
139713
140574
|
//
|
|
139714
|
-
//
|
|
139715
|
-
//
|
|
139716
|
-
//
|
|
139717
|
-
//
|
|
139718
140575
|
|
|
139719
140576
|
|
|
139720
140577
|
|
|
@@ -139722,7 +140579,7 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139722
140579
|
name: 'TFSettingForm',
|
|
139723
140580
|
components: {
|
|
139724
140581
|
TfButtonGroup: tf_button_group/* default */.Z,
|
|
139725
|
-
|
|
140582
|
+
TfAgGrid: tf_ag_grid/* default */.Z
|
|
139726
140583
|
},
|
|
139727
140584
|
props: {
|
|
139728
140585
|
configList: {
|
|
@@ -139754,18 +140611,18 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139754
140611
|
field: 'isShow',
|
|
139755
140612
|
headerName: '显隐切换',
|
|
139756
140613
|
suppressMovable: true,
|
|
139757
|
-
cellRenderer: '
|
|
140614
|
+
cellRenderer: 'TfInputCellRender',
|
|
139758
140615
|
cellRendererParams: {
|
|
139759
|
-
|
|
140616
|
+
type: 'switch'
|
|
139760
140617
|
},
|
|
139761
140618
|
width: 145
|
|
139762
140619
|
}, {
|
|
139763
140620
|
field: 'isFreeze',
|
|
139764
140621
|
headerName: '冻结',
|
|
139765
140622
|
suppressMovable: true,
|
|
139766
|
-
cellRenderer: '
|
|
140623
|
+
cellRenderer: 'TfInputCellRender',
|
|
139767
140624
|
cellRendererParams: {
|
|
139768
|
-
|
|
140625
|
+
type: 'switch'
|
|
139769
140626
|
},
|
|
139770
140627
|
width: 145
|
|
139771
140628
|
}],
|
|
@@ -139773,7 +140630,8 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139773
140630
|
selectRows: [],
|
|
139774
140631
|
searchContent: '',
|
|
139775
140632
|
saveLoading: false,
|
|
139776
|
-
|
|
140633
|
+
isShow: true,
|
|
140634
|
+
isFreeze: true
|
|
139777
140635
|
};
|
|
139778
140636
|
},
|
|
139779
140637
|
computed: {
|
|
@@ -139789,31 +140647,6 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139789
140647
|
initTableData() {
|
|
139790
140648
|
this.tableData = this.configList;
|
|
139791
140649
|
},
|
|
139792
|
-
/** 行拖拽排序, 支持同时选中多行拖拽 */
|
|
139793
|
-
rowDragEnd(params) {
|
|
139794
|
-
let tableData = JSON.parse(JSON.stringify(this.tableData));
|
|
139795
|
-
let moveType = 'moveUp';
|
|
139796
|
-
const defaultIndex = tableData.findIndex(item => item.field === params.nodes[0].data.field);
|
|
139797
|
-
if (params.overIndex < defaultIndex) {
|
|
139798
|
-
moveType = 'moveUp';
|
|
139799
|
-
} else if (params.overIndex > defaultIndex && params.nodes.length > 1) {
|
|
139800
|
-
moveType = 'moveDown';
|
|
139801
|
-
}
|
|
139802
|
-
params.nodes.forEach((node, nodeIndex) => {
|
|
139803
|
-
const index = tableData.findIndex(item => item.field === node.data.field);
|
|
139804
|
-
tableData.splice(index, 1);
|
|
139805
|
-
moveType === 'moveUp' ? tableData.splice(params.overIndex + nodeIndex, 0, node.data) : tableData.splice(params.overIndex + params.nodes.length - 1, 0, node.data);
|
|
139806
|
-
});
|
|
139807
|
-
this.tableData.splice(0, this.tableData.length, ...tableData);
|
|
139808
|
-
// 恢复选中
|
|
139809
|
-
setTimeout(() => {
|
|
139810
|
-
this.$refs.settingTable.gridApi.forEachNodeAfterFilter(node => {
|
|
139811
|
-
if (this.selectRows.find(row => row.field === node.data.field)) {
|
|
139812
|
-
node.setSelected(true);
|
|
139813
|
-
}
|
|
139814
|
-
});
|
|
139815
|
-
}, 500);
|
|
139816
|
-
},
|
|
139817
140650
|
/** 修改对应的值 */
|
|
139818
140651
|
handleChangeCellValue({
|
|
139819
140652
|
value,
|
|
@@ -139823,7 +140656,12 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139823
140656
|
if (item.field === params.data.field) {
|
|
139824
140657
|
item[params.column.colId] = value;
|
|
139825
140658
|
}
|
|
140659
|
+
// 这里是一段特殊逻辑:在冻结有子列的列时,将子列的属性也同步更新,否则冻结不生效
|
|
140660
|
+
if (params.column.colId === 'isFreeze' && item.originField === params.data.field) {
|
|
140661
|
+
item[params.column.colId] = value;
|
|
140662
|
+
}
|
|
139826
140663
|
});
|
|
140664
|
+
this.$refs.settingTable.gridApi.refreshCells();
|
|
139827
140665
|
},
|
|
139828
140666
|
handleSearchField() {
|
|
139829
140667
|
// 清空选中行
|
|
@@ -139840,15 +140678,16 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139840
140678
|
this.$refs.settingTable.selectedRows = [];
|
|
139841
140679
|
},
|
|
139842
140680
|
/** 操作 */
|
|
139843
|
-
|
|
140681
|
+
handlerButtons(option) {
|
|
139844
140682
|
switch (option) {
|
|
139845
140683
|
// 显隐切换
|
|
139846
140684
|
case 'showChange':
|
|
139847
140685
|
{
|
|
139848
140686
|
this.selectRows.forEach(item => {
|
|
139849
140687
|
const findIndex = this.tableData.findIndex(d => d.field === item.field);
|
|
139850
|
-
this.tableData[findIndex].isShow =
|
|
140688
|
+
this.tableData[findIndex].isShow = this.isShow;
|
|
139851
140689
|
});
|
|
140690
|
+
this.isShow = !this.isShow;
|
|
139852
140691
|
this.$refs.settingTable.gridApi.refreshCells();
|
|
139853
140692
|
break;
|
|
139854
140693
|
}
|
|
@@ -139856,13 +140695,17 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139856
140695
|
case 'freeze':
|
|
139857
140696
|
{
|
|
139858
140697
|
this.selectRows.forEach(item => {
|
|
139859
|
-
// 多表头下的列不允许固定列
|
|
139860
140698
|
if (item.isChild) {
|
|
139861
140699
|
return;
|
|
139862
140700
|
}
|
|
139863
|
-
const
|
|
139864
|
-
this.tableData
|
|
140701
|
+
const originField = item.field;
|
|
140702
|
+
const arr = this.tableData.filter(item => item.originField === originField);
|
|
140703
|
+
arr.map(item => {
|
|
140704
|
+
const findIndex = this.tableData.findIndex(d => d.field === item.field);
|
|
140705
|
+
this.tableData[findIndex].isFreeze = this.isFreeze;
|
|
140706
|
+
});
|
|
139865
140707
|
});
|
|
140708
|
+
this.isFreeze = !this.isFreeze;
|
|
139866
140709
|
this.$refs.settingTable.gridApi.refreshCells();
|
|
139867
140710
|
break;
|
|
139868
140711
|
}
|
|
@@ -139890,10 +140733,10 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139890
140733
|
});
|
|
139891
140734
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=script&lang=js&
|
|
139892
140735
|
/* harmony default export */ var components_setting_components_tf_setting_formvue_type_script_lang_js_ = (setting_components_tf_setting_formvue_type_script_lang_js_);
|
|
139893
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-63.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-63.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-63.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-63.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=
|
|
140736
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-63.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-63.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-63.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-63.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=01be3b48&prod&lang=scss&scoped=true&
|
|
139894
140737
|
// extracted by mini-css-extract-plugin
|
|
139895
140738
|
|
|
139896
|
-
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=
|
|
140739
|
+
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=01be3b48&prod&lang=scss&scoped=true&
|
|
139897
140740
|
|
|
139898
140741
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue
|
|
139899
140742
|
|
|
@@ -139906,11 +140749,11 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139906
140749
|
|
|
139907
140750
|
var components_tf_setting_form_component = (0,componentNormalizer/* default */.Z)(
|
|
139908
140751
|
components_setting_components_tf_setting_formvue_type_script_lang_js_,
|
|
139909
|
-
|
|
139910
|
-
|
|
140752
|
+
tf_setting_formvue_type_template_id_01be3b48_scoped_true_render,
|
|
140753
|
+
tf_setting_formvue_type_template_id_01be3b48_scoped_true_staticRenderFns,
|
|
139911
140754
|
false,
|
|
139912
140755
|
null,
|
|
139913
|
-
"
|
|
140756
|
+
"01be3b48",
|
|
139914
140757
|
null
|
|
139915
140758
|
|
|
139916
140759
|
)
|
|
@@ -139968,16 +140811,16 @@ var components_tf_setting_form_component = (0,componentNormalizer/* default */.Z
|
|
|
139968
140811
|
/** 关闭弹框前 */
|
|
139969
140812
|
close() {
|
|
139970
140813
|
this.dialogVisible = false;
|
|
139971
|
-
this.$refs.formSetting
|
|
140814
|
+
this.$refs.formSetting?.close();
|
|
139972
140815
|
}
|
|
139973
140816
|
}
|
|
139974
140817
|
});
|
|
139975
140818
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=script&lang=js&
|
|
139976
140819
|
/* harmony default export */ var components_settingvue_type_script_lang_js_ = (settingvue_type_script_lang_js_);
|
|
139977
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-73.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-73.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-73.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-73.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=style&index=0&id=
|
|
140820
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-73.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-73.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-73.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-73.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=style&index=0&id=e45c9f3e&prod&lang=less&scoped=true&
|
|
139978
140821
|
// extracted by mini-css-extract-plugin
|
|
139979
140822
|
|
|
139980
|
-
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=style&index=0&id=
|
|
140823
|
+
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=style&index=0&id=e45c9f3e&prod&lang=less&scoped=true&
|
|
139981
140824
|
|
|
139982
140825
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue
|
|
139983
140826
|
|
|
@@ -139990,11 +140833,11 @@ var components_tf_setting_form_component = (0,componentNormalizer/* default */.Z
|
|
|
139990
140833
|
|
|
139991
140834
|
var setting_component = (0,componentNormalizer/* default */.Z)(
|
|
139992
140835
|
components_settingvue_type_script_lang_js_,
|
|
139993
|
-
|
|
139994
|
-
|
|
140836
|
+
settingvue_type_template_id_e45c9f3e_scoped_true_render,
|
|
140837
|
+
settingvue_type_template_id_e45c9f3e_scoped_true_staticRenderFns,
|
|
139995
140838
|
false,
|
|
139996
140839
|
null,
|
|
139997
|
-
"
|
|
140840
|
+
"e45c9f3e",
|
|
139998
140841
|
null
|
|
139999
140842
|
|
|
140000
140843
|
)
|
|
@@ -140078,7 +140921,7 @@ const agDefaultColumn = [{
|
|
|
140078
140921
|
suppressMovable: true,
|
|
140079
140922
|
headerName: '#',
|
|
140080
140923
|
headerComponent: 'TfAgGridSettingHeader',
|
|
140081
|
-
valueGetter: params => params.node ? params.node.rowIndex + 1 : null
|
|
140924
|
+
valueGetter: params => params.node ? !params.node.rowPinned ? params.node.rowIndex + 1 : params.data[params.column.colId] : null
|
|
140082
140925
|
}];
|
|
140083
140926
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/js/util.js
|
|
140084
140927
|
|
|
@@ -140115,6 +140958,19 @@ function saveTableConfig(el, binding, vNode) {
|
|
|
140115
140958
|
vm.tfAgGridSettingIntance.close();
|
|
140116
140959
|
});
|
|
140117
140960
|
}
|
|
140961
|
+
|
|
140962
|
+
/** 列排序方法 */
|
|
140963
|
+
function util_customSort(valueA, valueB, nodeA, nodeB, isDescending) {
|
|
140964
|
+
// 数字排序
|
|
140965
|
+
if (!isNaN(+valueA) && !isNaN(+valueB)) {
|
|
140966
|
+
const prev = !isNaN(+valueA) ? +valueA : 0;
|
|
140967
|
+
const next = !isNaN(+valueB) ? +valueB : 0;
|
|
140968
|
+
return Number(prev - next).toFixed(2);
|
|
140969
|
+
} else {
|
|
140970
|
+
// 非数字排序
|
|
140971
|
+
return (valueA || '').localeCompare(valueB || '');
|
|
140972
|
+
}
|
|
140973
|
+
}
|
|
140118
140974
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/js/init.js
|
|
140119
140975
|
|
|
140120
140976
|
|
|
@@ -140198,12 +141054,14 @@ async function js_init_initTableConfigList(el, binding, vNode) {
|
|
|
140198
141054
|
const testField = (obj, field) => {
|
|
140199
141055
|
return obj && obj[field] !== undefined && obj[field] !== null;
|
|
140200
141056
|
};
|
|
140201
|
-
const deepConfigList = (arr, parentHeaderName = '', isChild) => {
|
|
141057
|
+
const deepConfigList = (arr, parentHeaderName = '', isChild, originField) => {
|
|
140202
141058
|
arr.forEach(item => {
|
|
140203
141059
|
const current = el.umyTableSetting.userConfigList.find(d => item.field && d.field === item.field) || {};
|
|
140204
141060
|
const currentName = parentHeaderName ? parentHeaderName + '-' + item.headerName : item.headerName;
|
|
140205
141061
|
configList.push({
|
|
140206
141062
|
field: item.field,
|
|
141063
|
+
// 该字段用来记录最外层列的字段
|
|
141064
|
+
originField: originField || item.field,
|
|
140207
141065
|
label: currentName,
|
|
140208
141066
|
isChild: isChild,
|
|
140209
141067
|
isShow: testField(current, 'isShow') ? current.isShow : true,
|
|
@@ -140211,10 +141069,10 @@ async function js_init_initTableConfigList(el, binding, vNode) {
|
|
|
140211
141069
|
fieldWidth: testField(current, 'fieldWidth') ? current.fieldWidth : item.width || 150,
|
|
140212
141070
|
fieldIndex: current.fieldIndex
|
|
140213
141071
|
});
|
|
140214
|
-
item.children && deepConfigList(item.children, currentName, true);
|
|
141072
|
+
item.children && deepConfigList(item.children, currentName, true, item.field);
|
|
140215
141073
|
});
|
|
140216
141074
|
};
|
|
140217
|
-
deepConfigList(tableInstance.columnDefs, '', false);
|
|
141075
|
+
deepConfigList(tableInstance.columnDefs, '', false, '');
|
|
140218
141076
|
// 先排序
|
|
140219
141077
|
configList.sort((a, b) => a.fieldIndex - b.fieldIndex);
|
|
140220
141078
|
// 重新生成序号
|
|
@@ -140235,14 +141093,19 @@ const js_init_reloadColumns = (el, binding, vNode) => {
|
|
|
140235
141093
|
arr[index].hide = !current.isShow;
|
|
140236
141094
|
arr[index].fieldIndex = current.fieldIndex;
|
|
140237
141095
|
arr[index].width = current.fieldWidth || 150;
|
|
141096
|
+
arr[index].comparator = arr[index].comparator || util_customSort;
|
|
140238
141097
|
arr[index].pinned = current.isFreeze ? 'left' : item.pinned === 'right' ? 'right' : null;
|
|
140239
|
-
arr[index].children
|
|
141098
|
+
if (arr[index].children) {
|
|
141099
|
+
// 此属性将子列捆绑,不允许单独拖拽
|
|
141100
|
+
arr[index].marryChildren = true;
|
|
141101
|
+
deepReloadColumn(item.children);
|
|
141102
|
+
}
|
|
140240
141103
|
});
|
|
141104
|
+
// 排序
|
|
141105
|
+
arr.sort((a, b) => a.fieldIndex - b.fieldIndex);
|
|
140241
141106
|
};
|
|
140242
141107
|
// 修改列配置
|
|
140243
141108
|
deepReloadColumn(newColumns);
|
|
140244
|
-
// 排序
|
|
140245
|
-
newColumns.sort((a, b) => a.fieldIndex - b.fieldIndex);
|
|
140246
141109
|
// 重新加载列配置
|
|
140247
141110
|
setNewColumns(el, newColumns);
|
|
140248
141111
|
};
|
|
@@ -140309,7 +141172,7 @@ const columnMoved = (el, binding, vNode) => {
|
|
|
140309
141172
|
});
|
|
140310
141173
|
};
|
|
140311
141174
|
|
|
140312
|
-
/**
|
|
141175
|
+
/** 根据当前表格列的排序, 重新生成配置信息 */
|
|
140313
141176
|
function generateTableConfigList(el, binding, vNode) {
|
|
140314
141177
|
const configList = [];
|
|
140315
141178
|
const deepConfigList = arr => {
|
|
@@ -259497,7 +260360,7 @@ var push_down_component = (0,componentNormalizer/* default */.Z)(
|
|
|
259497
260360
|
}
|
|
259498
260361
|
});
|
|
259499
260362
|
// EXTERNAL MODULE: ./src/directives/index.js + 69 modules
|
|
259500
|
-
var directives = __webpack_require__(
|
|
260363
|
+
var directives = __webpack_require__(67867);
|
|
259501
260364
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/t-data-list/main.vue?vue&type=script&lang=js&
|
|
259502
260365
|
//
|
|
259503
260366
|
//
|
|
@@ -261459,880 +262322,8 @@ tf_print_render_src.install = function (Vue) {
|
|
|
261459
262322
|
var tf_input = __webpack_require__(37827);
|
|
261460
262323
|
// EXTERNAL MODULE: ./package/tf-table/index.js + 12 modules
|
|
261461
262324
|
var tf_table = __webpack_require__(78277);
|
|
261462
|
-
|
|
261463
|
-
var
|
|
261464
|
-
var srcvue_type_template_id_3436a30c_scoped_true_staticRenderFns = []
|
|
261465
|
-
|
|
261466
|
-
|
|
261467
|
-
// EXTERNAL MODULE: ./node_modules/ag-grid-vue/main.js
|
|
261468
|
-
var ag_grid_vue_main = __webpack_require__(61146);
|
|
261469
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=template&id=cfe194f2&scoped=true&
|
|
261470
|
-
var tf_filtervue_type_template_id_cfe194f2_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:{'filter-main':_vm.isClick || _vm.isFilter, 'filter-content': true},on:{"click":function($event){return _vm.onSortRequested($event)}}},[(_vm.params.column.colId !== 'checkout')?_c('span',[_vm._v(_vm._s(_vm.params.displayName))]):_vm._e(),(_vm.order)?_c('span',[_c('i',{class:[_vm.order === 'asc' ? 'el-icon-top' : 'el-icon-bottom']})]):_vm._e(),_c('el-popover',{attrs:{"width":"200","trigger":"manual","placement":"bottom"},model:{value:(_vm.isClick),callback:function ($$v) {_vm.isClick=$$v},expression:"isClick"}},[_c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.handleClickOut),expression:"handleClickOut"}],staticClass:"filter-main-context"},[(_vm.params.fieldType === 'select')?_c('div',{staticClass:"filter-list"},_vm._l((_vm.optionsList),function(item,index){return _c('div',{key:index,staticClass:"filter-list-item",class:{select:_vm.searchData.selectList.includes(item.name)},on:{"click":function($event){return _vm.handleSelectClick(item)}}},[_vm._v(" "+_vm._s(item.name)+" ")])}),0):(_vm.params.fieldType === 'date' || _vm.params.fieldType === 'dateTime')?_c('div',{staticClass:"time-select"},[_c('TfInput',{attrs:{"un-body":"","not-form":"","full-border":"","append-to-body":"","placeholder":"起始时间","type":_vm.params.fieldType || 'input'},model:{value:(_vm.searchData.time.startTime),callback:function ($$v) {_vm.$set(_vm.searchData.time, "startTime", $$v)},expression:"searchData.time.startTime"}}),_c('TfInput',{attrs:{"un-body":"","not-form":"","full-border":"","append-to-body":"","placeholder":"结束时间","type":_vm.params.fieldType || 'input'},model:{value:(_vm.searchData.time.endTime),callback:function ($$v) {_vm.$set(_vm.searchData.time, "endTime", $$v)},expression:"searchData.time.endTime"}})],1):_c('div',{staticClass:"filter-text-content"},[_c('TfInput',{attrs:{"full-border":"","value":_vm.text,"not-form":"","placeholder":"输入需要过滤的值"},on:{"input":function($event){return _vm.handleInput($event)}}}),_c('div',{staticClass:"filter-list filter-select-list"},_vm._l((_vm.searchData.inputSelect),function(item,index){return _c('div',{key:index,staticClass:"filter-list-item",class:{select:_vm.searchData.inputSelect.find(function (value) { return value.name === item.name; })},on:{"click":function($event){return _vm.handleSelect(item)}}},[_vm._v(" "+_vm._s(item.name)+" ")])}),0),_c('div',{staticClass:"filter-list"},_vm._l((_vm.inputSelectOptions),function(item,index){return _c('div',{key:index,staticClass:"filter-list-item",on:{"click":function($event){return _vm.handleSelect(item)}}},[_c('div',{staticClass:"text"},[_vm._v(_vm._s(item.name))])])}),0)],1),_c('div',{staticClass:"option-buttons"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.handleCancel}},[_vm._v("重置")]),_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.handleSubmit}},[_vm._v("确定")])],1)]),_c('SvgIcon',{staticClass:"filter-icon",attrs:{"slot":"reference","icon-class":"filter"},on:{"click":function($event){$event.stopPropagation();return _vm.handleFilterClick.apply(null, arguments)}},slot:"reference"})],1)],1)}
|
|
261471
|
-
var tf_filtervue_type_template_id_cfe194f2_scoped_true_staticRenderFns = []
|
|
261472
|
-
|
|
261473
|
-
|
|
261474
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
261475
|
-
|
|
261476
|
-
//
|
|
261477
|
-
//
|
|
261478
|
-
//
|
|
261479
|
-
//
|
|
261480
|
-
//
|
|
261481
|
-
//
|
|
261482
|
-
//
|
|
261483
|
-
//
|
|
261484
|
-
//
|
|
261485
|
-
//
|
|
261486
|
-
//
|
|
261487
|
-
//
|
|
261488
|
-
//
|
|
261489
|
-
//
|
|
261490
|
-
//
|
|
261491
|
-
//
|
|
261492
|
-
//
|
|
261493
|
-
//
|
|
261494
|
-
//
|
|
261495
|
-
//
|
|
261496
|
-
//
|
|
261497
|
-
//
|
|
261498
|
-
//
|
|
261499
|
-
//
|
|
261500
|
-
//
|
|
261501
|
-
//
|
|
261502
|
-
//
|
|
261503
|
-
//
|
|
261504
|
-
//
|
|
261505
|
-
//
|
|
261506
|
-
//
|
|
261507
|
-
//
|
|
261508
|
-
//
|
|
261509
|
-
//
|
|
261510
|
-
//
|
|
261511
|
-
//
|
|
261512
|
-
//
|
|
261513
|
-
//
|
|
261514
|
-
//
|
|
261515
|
-
//
|
|
261516
|
-
//
|
|
261517
|
-
//
|
|
261518
|
-
//
|
|
261519
|
-
//
|
|
261520
|
-
//
|
|
261521
|
-
//
|
|
261522
|
-
//
|
|
261523
|
-
//
|
|
261524
|
-
//
|
|
261525
|
-
//
|
|
261526
|
-
//
|
|
261527
|
-
//
|
|
261528
|
-
//
|
|
261529
|
-
//
|
|
261530
|
-
//
|
|
261531
|
-
//
|
|
261532
|
-
//
|
|
261533
|
-
//
|
|
261534
|
-
//
|
|
261535
|
-
//
|
|
261536
|
-
//
|
|
261537
|
-
//
|
|
261538
|
-
//
|
|
261539
|
-
//
|
|
261540
|
-
//
|
|
261541
|
-
//
|
|
261542
|
-
//
|
|
261543
|
-
//
|
|
261544
|
-
//
|
|
261545
|
-
//
|
|
261546
|
-
//
|
|
261547
|
-
//
|
|
261548
|
-
//
|
|
261549
|
-
//
|
|
261550
|
-
//
|
|
261551
|
-
//
|
|
261552
|
-
//
|
|
261553
|
-
//
|
|
261554
|
-
//
|
|
261555
|
-
//
|
|
261556
|
-
//
|
|
261557
|
-
//
|
|
261558
|
-
//
|
|
261559
|
-
//
|
|
261560
|
-
//
|
|
261561
|
-
//
|
|
261562
|
-
//
|
|
261563
|
-
//
|
|
261564
|
-
//
|
|
261565
|
-
//
|
|
261566
|
-
//
|
|
261567
|
-
//
|
|
261568
|
-
//
|
|
261569
|
-
|
|
261570
|
-
|
|
261571
|
-
|
|
261572
|
-
/* harmony default export */ var tf_filtervue_type_script_lang_js_ = ({
|
|
261573
|
-
components: {
|
|
261574
|
-
TfInput: tf_input/* default */.Z
|
|
261575
|
-
},
|
|
261576
|
-
directives: {
|
|
261577
|
-
Clickoutside: clickoutside/* default */.Z
|
|
261578
|
-
},
|
|
261579
|
-
props: {
|
|
261580
|
-
configData: {
|
|
261581
|
-
type: Object,
|
|
261582
|
-
default: () => {
|
|
261583
|
-
return {};
|
|
261584
|
-
}
|
|
261585
|
-
}
|
|
261586
|
-
},
|
|
261587
|
-
data() {
|
|
261588
|
-
return {
|
|
261589
|
-
searchData: {
|
|
261590
|
-
// 过滤时间
|
|
261591
|
-
time: {
|
|
261592
|
-
startTime: null,
|
|
261593
|
-
endTime: null
|
|
261594
|
-
},
|
|
261595
|
-
// 枚举类型
|
|
261596
|
-
selectList: [],
|
|
261597
|
-
// 选择输入框
|
|
261598
|
-
inputSelect: []
|
|
261599
|
-
},
|
|
261600
|
-
optionsList: [],
|
|
261601
|
-
inputSelectOptions: [],
|
|
261602
|
-
isClick: false,
|
|
261603
|
-
inputType: '',
|
|
261604
|
-
unClickOutside: false,
|
|
261605
|
-
text: '',
|
|
261606
|
-
order: '' // 排序规则
|
|
261607
|
-
};
|
|
261608
|
-
},
|
|
261609
|
-
|
|
261610
|
-
computed: {
|
|
261611
|
-
isFilter() {
|
|
261612
|
-
return JSON.stringify(this.searchData) !== JSON.stringify({
|
|
261613
|
-
time: {
|
|
261614
|
-
startTime: null,
|
|
261615
|
-
endTime: null
|
|
261616
|
-
},
|
|
261617
|
-
selectList: [],
|
|
261618
|
-
inputSelect: []
|
|
261619
|
-
});
|
|
261620
|
-
}
|
|
261621
|
-
},
|
|
261622
|
-
watch: {
|
|
261623
|
-
'searchData.time': {
|
|
261624
|
-
handler(newVal) {
|
|
261625
|
-
this.handleDateChange(newVal);
|
|
261626
|
-
},
|
|
261627
|
-
deep: true
|
|
261628
|
-
}
|
|
261629
|
-
},
|
|
261630
|
-
methods: {
|
|
261631
|
-
/**
|
|
261632
|
-
* params: 当前列对象
|
|
261633
|
-
* 排序
|
|
261634
|
-
*/
|
|
261635
|
-
onSortRequested(event) {
|
|
261636
|
-
if (this.order === '') {
|
|
261637
|
-
this.order = 'asc';
|
|
261638
|
-
} else if (this.order === 'asc') {
|
|
261639
|
-
this.order = 'desc';
|
|
261640
|
-
} else if (this.order === 'desc') {
|
|
261641
|
-
this.order = '';
|
|
261642
|
-
}
|
|
261643
|
-
this.params.setSort(this.order, event.shiftKey);
|
|
261644
|
-
},
|
|
261645
|
-
handleCancel() {
|
|
261646
|
-
if (this.inputType === 'inputSelect') {
|
|
261647
|
-
this.searchData[this.inputType] = [];
|
|
261648
|
-
this.text = '';
|
|
261649
|
-
}
|
|
261650
|
-
if (this.inputType === 'selectList') {
|
|
261651
|
-
this.searchData[this.inputType] = [];
|
|
261652
|
-
}
|
|
261653
|
-
if (this.inputType === 'time') {
|
|
261654
|
-
this.searchData[this.inputType] = {
|
|
261655
|
-
startTime: null,
|
|
261656
|
-
endTime: null
|
|
261657
|
-
};
|
|
261658
|
-
}
|
|
261659
|
-
this.handleSubmit();
|
|
261660
|
-
},
|
|
261661
|
-
/** 提交筛选 */
|
|
261662
|
-
handleSubmit() {
|
|
261663
|
-
this.isClick = false;
|
|
261664
|
-
this.params.context.componentParent.handleUpdateFilter({
|
|
261665
|
-
value: this.searchData[this.inputType],
|
|
261666
|
-
params: this.params
|
|
261667
|
-
});
|
|
261668
|
-
},
|
|
261669
|
-
handleClickOut(e) {
|
|
261670
|
-
this.isClick = false;
|
|
261671
|
-
},
|
|
261672
|
-
handleFilterClick() {
|
|
261673
|
-
this.isClick = !this.isClick;
|
|
261674
|
-
const fieldValueSet = this.params.context.componentParent.field2values();
|
|
261675
|
-
this.getSelectOption(fieldValueSet);
|
|
261676
|
-
},
|
|
261677
|
-
/** 处理日期的改变 */
|
|
261678
|
-
handleDateChange(value) {
|
|
261679
|
-
this.inputType = 'time';
|
|
261680
|
-
},
|
|
261681
|
-
/** 处理选中后的值发生变化 */
|
|
261682
|
-
handleSelect(item) {
|
|
261683
|
-
this.inputType = 'inputSelect';
|
|
261684
|
-
if (this.searchData.inputSelect.find(value => value.name === item.name)) {
|
|
261685
|
-
this.searchData.inputSelect = this.searchData.inputSelect.filter(value => value.name !== item.name);
|
|
261686
|
-
if (item.name.includes(this.text)) {
|
|
261687
|
-
this.inputSelectOptions.splice(item.index, 0, item);
|
|
261688
|
-
}
|
|
261689
|
-
return;
|
|
261690
|
-
}
|
|
261691
|
-
this.searchData.inputSelect.push(item);
|
|
261692
|
-
this.inputSelectOptions = this.inputSelectOptions.filter(value => value.name !== item.name);
|
|
261693
|
-
},
|
|
261694
|
-
/** 处理输入框值的变化 */
|
|
261695
|
-
handleInput(query) {
|
|
261696
|
-
this.text = query;
|
|
261697
|
-
if (query !== '') {
|
|
261698
|
-
this.inputSelectOptions = this.optionsList.filter(item => item.name.toLowerCase().includes(query.toLowerCase())).splice(0, 50);
|
|
261699
|
-
} else {
|
|
261700
|
-
const options = Array.from(this.optionsList);
|
|
261701
|
-
this.inputSelectOptions = options.filter(item => !this.searchData.inputSelect.find(value => value.name === item.name)).splice(0, 50);
|
|
261702
|
-
}
|
|
261703
|
-
},
|
|
261704
|
-
/** 处理枚举选中后的逻辑 */
|
|
261705
|
-
handleSelectClick(item) {
|
|
261706
|
-
this.inputType = 'selectList';
|
|
261707
|
-
const index = this.searchData.selectList.indexOf(item.name);
|
|
261708
|
-
if (index >= 0) {
|
|
261709
|
-
this.searchData.selectList.splice(index, 1);
|
|
261710
|
-
return;
|
|
261711
|
-
}
|
|
261712
|
-
this.searchData.selectList.push(item.name);
|
|
261713
|
-
},
|
|
261714
|
-
/** 获取枚举列表 */
|
|
261715
|
-
getSelectOption(fieldValueSet) {
|
|
261716
|
-
const optionsList = [];
|
|
261717
|
-
fieldValueSet[this.params.column.colId].forEach((item, index) => {
|
|
261718
|
-
if (item) {
|
|
261719
|
-
optionsList.push({
|
|
261720
|
-
index: index,
|
|
261721
|
-
name: item
|
|
261722
|
-
});
|
|
261723
|
-
}
|
|
261724
|
-
});
|
|
261725
|
-
this.optionsList = optionsList;
|
|
261726
|
-
// 默认展示前50条数据
|
|
261727
|
-
const options = Array.from(this.optionsList);
|
|
261728
|
-
this.inputSelectOptions = options.splice(0, 50);
|
|
261729
|
-
}
|
|
261730
|
-
}
|
|
261731
|
-
});
|
|
261732
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
261733
|
-
/* harmony default export */ var components_tf_filtervue_type_script_lang_js_ = (tf_filtervue_type_script_lang_js_);
|
|
261734
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-73.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-73.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-73.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-73.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=style&index=0&id=cfe194f2&prod&lang=less&scoped=true&
|
|
261735
|
-
// extracted by mini-css-extract-plugin
|
|
261736
|
-
|
|
261737
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=style&index=0&id=cfe194f2&prod&lang=less&scoped=true&
|
|
261738
|
-
|
|
261739
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue
|
|
261740
|
-
|
|
261741
|
-
|
|
261742
|
-
|
|
261743
|
-
;
|
|
261744
|
-
|
|
261745
|
-
|
|
261746
|
-
/* normalize component */
|
|
261747
|
-
|
|
261748
|
-
var tf_filter_component = (0,componentNormalizer/* default */.Z)(
|
|
261749
|
-
components_tf_filtervue_type_script_lang_js_,
|
|
261750
|
-
tf_filtervue_type_template_id_cfe194f2_scoped_true_render,
|
|
261751
|
-
tf_filtervue_type_template_id_cfe194f2_scoped_true_staticRenderFns,
|
|
261752
|
-
false,
|
|
261753
|
-
null,
|
|
261754
|
-
"cfe194f2",
|
|
261755
|
-
null
|
|
261756
|
-
|
|
261757
|
-
)
|
|
261758
|
-
|
|
261759
|
-
/* harmony default export */ var tf_filter = (tf_filter_component.exports);
|
|
261760
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=template&id=605b3b64&scoped=true&
|
|
261761
|
-
var tf_cell_textvue_type_template_id_605b3b64_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.closeRightMenu),expression:"closeRightMenu"}],staticClass:"tf-cell-text",on:{"contextmenu":function($event){$event.preventDefault();if($event.target !== $event.currentTarget){ return null; }$event.stopPropagation();return _vm.rightClick($event)}}},[_c('span',{on:{"contextmenu":function($event){$event.preventDefault();if($event.target !== $event.currentTarget){ return null; }$event.stopPropagation();return _vm.rightClick($event)}}},[_vm._v(_vm._s(_vm.displayValue))]),_c('RightMenu',{attrs:{"top":_vm.rightMenuTop,"left":_vm.rightMenuLeft,"show-menu":_vm.showRightMenu},on:{"update:showMenu":function($event){_vm.showRightMenu=$event},"update:show-menu":function($event){_vm.showRightMenu=$event},"rightMenuClick":_vm.dropdownCommand}})],1)}
|
|
261762
|
-
var tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns = []
|
|
261763
|
-
|
|
261764
|
-
|
|
261765
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=template&id=479f04e0&scoped=true&
|
|
261766
|
-
var right_menuvue_type_template_id_479f04e0_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showMenu),expression:"showMenu"}],staticClass:"right-menu",style:({ top: _vm.top + 'px', left: _vm.left + 'px' })},[_c('p',{on:{"click":function($event){$event.preventDefault();$event.stopPropagation();return _vm.rightMenuClick('copy')}}},[_vm._v(" 复制 "),_c('i',{staticClass:"el-icon-document-copy"})])])}
|
|
261767
|
-
var right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns = []
|
|
261768
|
-
|
|
261769
|
-
|
|
261770
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
261771
|
-
//
|
|
261772
|
-
//
|
|
261773
|
-
//
|
|
261774
|
-
//
|
|
261775
|
-
//
|
|
261776
|
-
//
|
|
261777
|
-
//
|
|
261778
|
-
//
|
|
261779
|
-
//
|
|
261780
|
-
//
|
|
261781
|
-
//
|
|
261782
|
-
//
|
|
261783
|
-
|
|
261784
|
-
/* harmony default export */ var right_menuvue_type_script_lang_js_ = ({
|
|
261785
|
-
props: {
|
|
261786
|
-
top: {
|
|
261787
|
-
type: Number,
|
|
261788
|
-
default: 0
|
|
261789
|
-
},
|
|
261790
|
-
left: {
|
|
261791
|
-
type: Number,
|
|
261792
|
-
default: 0
|
|
261793
|
-
},
|
|
261794
|
-
showMenu: {
|
|
261795
|
-
type: Boolean,
|
|
261796
|
-
default: false
|
|
261797
|
-
}
|
|
261798
|
-
},
|
|
261799
|
-
methods: {
|
|
261800
|
-
rightMenuClick(params) {
|
|
261801
|
-
this.$emit('rightMenuClick', params);
|
|
261802
|
-
this.closeRightMenu();
|
|
261803
|
-
},
|
|
261804
|
-
closeRightMenu() {
|
|
261805
|
-
this.$emit('update:showMenu', false);
|
|
261806
|
-
}
|
|
261807
|
-
}
|
|
261808
|
-
});
|
|
261809
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
261810
|
-
/* harmony default export */ var tf_cell_text_right_menuvue_type_script_lang_js_ = (right_menuvue_type_script_lang_js_);
|
|
261811
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-73.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-73.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-73.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-73.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=style&index=0&id=479f04e0&prod&lang=less&scoped=true&
|
|
261812
|
-
// extracted by mini-css-extract-plugin
|
|
261813
|
-
|
|
261814
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=style&index=0&id=479f04e0&prod&lang=less&scoped=true&
|
|
261815
|
-
|
|
261816
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue
|
|
261817
|
-
|
|
261818
|
-
|
|
261819
|
-
|
|
261820
|
-
;
|
|
261821
|
-
|
|
261822
|
-
|
|
261823
|
-
/* normalize component */
|
|
261824
|
-
|
|
261825
|
-
var right_menu_component = (0,componentNormalizer/* default */.Z)(
|
|
261826
|
-
tf_cell_text_right_menuvue_type_script_lang_js_,
|
|
261827
|
-
right_menuvue_type_template_id_479f04e0_scoped_true_render,
|
|
261828
|
-
right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns,
|
|
261829
|
-
false,
|
|
261830
|
-
null,
|
|
261831
|
-
"479f04e0",
|
|
261832
|
-
null
|
|
261833
|
-
|
|
261834
|
-
)
|
|
261835
|
-
|
|
261836
|
-
/* harmony default export */ var right_menu = (right_menu_component.exports);
|
|
261837
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
261838
|
-
//
|
|
261839
|
-
//
|
|
261840
|
-
//
|
|
261841
|
-
//
|
|
261842
|
-
//
|
|
261843
|
-
//
|
|
261844
|
-
//
|
|
261845
|
-
//
|
|
261846
|
-
//
|
|
261847
|
-
//
|
|
261848
|
-
//
|
|
261849
|
-
//
|
|
261850
|
-
//
|
|
261851
|
-
|
|
261852
|
-
|
|
261853
|
-
|
|
261854
|
-
/* harmony default export */ var tf_cell_textvue_type_script_lang_js_ = ({
|
|
261855
|
-
components: {
|
|
261856
|
-
RightMenu: right_menu
|
|
261857
|
-
},
|
|
261858
|
-
directives: {
|
|
261859
|
-
Clickoutside: clickoutside/* default */.Z
|
|
261860
|
-
},
|
|
261861
|
-
data() {
|
|
261862
|
-
return {
|
|
261863
|
-
displayValue: '',
|
|
261864
|
-
rightMenuLeft: 0,
|
|
261865
|
-
rightMenuTop: 0,
|
|
261866
|
-
showRightMenu: false
|
|
261867
|
-
};
|
|
261868
|
-
},
|
|
261869
|
-
beforeMount() {
|
|
261870
|
-
// params: 当前操作单元格对象
|
|
261871
|
-
this.setInitialState(this.params);
|
|
261872
|
-
},
|
|
261873
|
-
methods: {
|
|
261874
|
-
setInitialState(params) {
|
|
261875
|
-
this.displayValue = params.value;
|
|
261876
|
-
},
|
|
261877
|
-
/** 右键点击 */
|
|
261878
|
-
rightClick($event) {
|
|
261879
|
-
this.rightMenuTop = $event.offsetY;
|
|
261880
|
-
// TODO: 这里的17是agcell的paddingLeft的值,若有样式调整,这里也要调整
|
|
261881
|
-
this.rightMenuLeft = $event.offsetX + 17;
|
|
261882
|
-
this.showRightMenu = true;
|
|
261883
|
-
},
|
|
261884
|
-
closeRightMenu() {
|
|
261885
|
-
this.showRightMenu = false;
|
|
261886
|
-
},
|
|
261887
|
-
dropdownCommand(command) {
|
|
261888
|
-
if (command === 'copy') {
|
|
261889
|
-
const input = document.createElement('input');
|
|
261890
|
-
input.value = this.displayValue;
|
|
261891
|
-
input.setAttribute('id', 'temp-input-id');
|
|
261892
|
-
document.body.appendChild(input);
|
|
261893
|
-
input.select();
|
|
261894
|
-
document.execCommand('copy');
|
|
261895
|
-
document.querySelector('#temp-input-id').remove();
|
|
261896
|
-
}
|
|
261897
|
-
}
|
|
261898
|
-
}
|
|
261899
|
-
});
|
|
261900
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
261901
|
-
/* harmony default export */ var components_tf_cell_textvue_type_script_lang_js_ = (tf_cell_textvue_type_script_lang_js_);
|
|
261902
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue
|
|
261903
|
-
|
|
261904
|
-
|
|
261905
|
-
|
|
261906
|
-
|
|
261907
|
-
|
|
261908
|
-
/* normalize component */
|
|
261909
|
-
;
|
|
261910
|
-
var tf_cell_text_component = (0,componentNormalizer/* default */.Z)(
|
|
261911
|
-
components_tf_cell_textvue_type_script_lang_js_,
|
|
261912
|
-
tf_cell_textvue_type_template_id_605b3b64_scoped_true_render,
|
|
261913
|
-
tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns,
|
|
261914
|
-
false,
|
|
261915
|
-
null,
|
|
261916
|
-
"605b3b64",
|
|
261917
|
-
null
|
|
261918
|
-
|
|
261919
|
-
)
|
|
261920
|
-
|
|
261921
|
-
/* harmony default export */ var tf_cell_text = (tf_cell_text_component.exports);
|
|
261922
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-81.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
261923
|
-
//
|
|
261924
|
-
//
|
|
261925
|
-
//
|
|
261926
|
-
//
|
|
261927
|
-
//
|
|
261928
|
-
//
|
|
261929
|
-
//
|
|
261930
|
-
//
|
|
261931
|
-
//
|
|
261932
|
-
//
|
|
261933
|
-
//
|
|
261934
|
-
//
|
|
261935
|
-
//
|
|
261936
|
-
//
|
|
261937
|
-
//
|
|
261938
|
-
//
|
|
261939
|
-
//
|
|
261940
|
-
//
|
|
261941
|
-
//
|
|
261942
|
-
//
|
|
261943
|
-
//
|
|
261944
|
-
//
|
|
261945
|
-
//
|
|
261946
|
-
//
|
|
261947
|
-
|
|
261948
|
-
|
|
261949
|
-
|
|
261950
|
-
|
|
261951
|
-
|
|
261952
|
-
|
|
261953
|
-
/* harmony default export */ var tf_ag_grid_srcvue_type_script_lang_js_ = ({
|
|
261954
|
-
name: 'TfAgGrid',
|
|
261955
|
-
/* eslint-disable */
|
|
261956
|
-
components: {
|
|
261957
|
-
AgGridVue: ag_grid_vue_main.AgGridVue,
|
|
261958
|
-
TfFilter: tf_filter,
|
|
261959
|
-
TfCellText: tf_cell_text
|
|
261960
|
-
},
|
|
261961
|
-
/* eslint-enable */
|
|
261962
|
-
directives: {
|
|
261963
|
-
agGridSetting: directives/* agGridSetting */.rn
|
|
261964
|
-
},
|
|
261965
|
-
props: {
|
|
261966
|
-
data: {
|
|
261967
|
-
type: Array,
|
|
261968
|
-
default: () => []
|
|
261969
|
-
},
|
|
261970
|
-
columns: {
|
|
261971
|
-
type: Array,
|
|
261972
|
-
default: () => []
|
|
261973
|
-
},
|
|
261974
|
-
// 表头字段对应的数据集
|
|
261975
|
-
fieldValueSet: {
|
|
261976
|
-
type: Object,
|
|
261977
|
-
default: () => {}
|
|
261978
|
-
},
|
|
261979
|
-
loading: {
|
|
261980
|
-
type: Boolean,
|
|
261981
|
-
default: false
|
|
261982
|
-
},
|
|
261983
|
-
// 表格合计
|
|
261984
|
-
totalData: {
|
|
261985
|
-
type: Array,
|
|
261986
|
-
default: () => ['合计']
|
|
261987
|
-
},
|
|
261988
|
-
// 是否开启行拖拽
|
|
261989
|
-
rowDragManaged: {
|
|
261990
|
-
type: Boolean,
|
|
261991
|
-
default: false
|
|
261992
|
-
},
|
|
261993
|
-
// 需配合rowDragManaged同时为true 行拖拽生效
|
|
261994
|
-
rowDragEntireRow: {
|
|
261995
|
-
type: Boolean,
|
|
261996
|
-
default: false
|
|
261997
|
-
},
|
|
261998
|
-
// 启用多行拖拽
|
|
261999
|
-
rowDragMultiRow: {
|
|
262000
|
-
type: Boolean,
|
|
262001
|
-
default: false
|
|
262002
|
-
},
|
|
262003
|
-
// 允许使用单击选择多行
|
|
262004
|
-
rowMultiSelectWithClick: {
|
|
262005
|
-
type: Boolean,
|
|
262006
|
-
default: false
|
|
262007
|
-
},
|
|
262008
|
-
// 用户自定义字段颜色方案列表
|
|
262009
|
-
personalFontColor: {
|
|
262010
|
-
type: Array,
|
|
262011
|
-
default: () => []
|
|
262012
|
-
},
|
|
262013
|
-
// 启用选中单元格文本
|
|
262014
|
-
enableCellTextSelection: {
|
|
262015
|
-
type: Boolean,
|
|
262016
|
-
default: true
|
|
262017
|
-
},
|
|
262018
|
-
enableBrowserTooltips: {
|
|
262019
|
-
type: Boolean,
|
|
262020
|
-
default: false
|
|
262021
|
-
},
|
|
262022
|
-
tooltipShowDelay: {
|
|
262023
|
-
type: Number,
|
|
262024
|
-
default: 100
|
|
262025
|
-
},
|
|
262026
|
-
tooltipHideDelay: {
|
|
262027
|
-
type: Number,
|
|
262028
|
-
default: 2000
|
|
262029
|
-
},
|
|
262030
|
-
entityTableName: {
|
|
262031
|
-
type: String,
|
|
262032
|
-
default: ''
|
|
262033
|
-
}
|
|
262034
|
-
},
|
|
262035
|
-
data() {
|
|
262036
|
-
return {
|
|
262037
|
-
tableRef: (0,utils/* randomRefName */.zs)(15),
|
|
262038
|
-
currentRow: null,
|
|
262039
|
-
// 当前选中的行
|
|
262040
|
-
selectedRows: [],
|
|
262041
|
-
// 选中的列
|
|
262042
|
-
context: {},
|
|
262043
|
-
gridApi: null,
|
|
262044
|
-
columnApi: null,
|
|
262045
|
-
// 绑定默认列属性
|
|
262046
|
-
defaultColDef: {
|
|
262047
|
-
sortable: true,
|
|
262048
|
-
resizable: true,
|
|
262049
|
-
// 禁止通过拖动列来固定列
|
|
262050
|
-
lockPinned: true,
|
|
262051
|
-
cellRenderer: 'TfCellText',
|
|
262052
|
-
cellStyle: this.setCellStyle,
|
|
262053
|
-
headerComponent: 'TfFilter'
|
|
262054
|
-
},
|
|
262055
|
-
// 过滤条件
|
|
262056
|
-
filterOption: {},
|
|
262057
|
-
// 过滤后的数据
|
|
262058
|
-
filteredData: [],
|
|
262059
|
-
// 没有数据的提示
|
|
262060
|
-
overlayNoRowsTemplate: '<span><svg v-else class="svg-icon-table-empty" aria-hidden="true" style="width: 6vw; height: 6vh;">\n' + '<use xlink:href="#icon-table-empty" /></svg><div style="font-size: 1.4vh;">暂无数据</div></span>',
|
|
262061
|
-
rowHeight: 35,
|
|
262062
|
-
headerHeight: 35
|
|
262063
|
-
};
|
|
262064
|
-
},
|
|
262065
|
-
computed: {
|
|
262066
|
-
customAttrs: function () {
|
|
262067
|
-
return {
|
|
262068
|
-
// 选中模式:多选|单选
|
|
262069
|
-
'row-selection': 'multiple',
|
|
262070
|
-
// 内容行高
|
|
262071
|
-
'row-height': this.rowHeight,
|
|
262072
|
-
// 表头行高
|
|
262073
|
-
'header-height': this.headerHeight,
|
|
262074
|
-
// 允许单击选择多行
|
|
262075
|
-
'row-multi-select-with-click': this.rowMultiSelectWithClick,
|
|
262076
|
-
// 默认列定义
|
|
262077
|
-
'default-col-def': this.defaultColDef,
|
|
262078
|
-
// 启用行拖拽
|
|
262079
|
-
'row-drag-managed': this.rowDragManaged,
|
|
262080
|
-
// 允许在行上的任意位置单击拖动
|
|
262081
|
-
'row-drag-entire-row': this.rowDragEntireRow,
|
|
262082
|
-
// 允许同时拖动多行
|
|
262083
|
-
'row-drag-multi-row': this.rowDragMultiRow,
|
|
262084
|
-
// 空数据提示
|
|
262085
|
-
'overlay-no-rows-template': this.overlayNoRowsTemplate,
|
|
262086
|
-
// 启用选中单元格文本
|
|
262087
|
-
'enable-cell-text-selection': this.enableCellTextSelection,
|
|
262088
|
-
// 悬浮文本显示需要的延迟
|
|
262089
|
-
'tooltip-show-delay': this.tooltipShowDelay,
|
|
262090
|
-
// 悬浮文本隐藏需要的延迟
|
|
262091
|
-
'tooltip-hide-delay': this.tooltipHideDelay,
|
|
262092
|
-
// 启用行动画
|
|
262093
|
-
'animate-rows': true,
|
|
262094
|
-
// 允许跨行(表格启用rowSpan时需要开启此属性)
|
|
262095
|
-
'suppress-row-transform': true,
|
|
262096
|
-
// 禁用colDef属性检查引起的控制台警告信息
|
|
262097
|
-
'suppress-property-names-check': true,
|
|
262098
|
-
// 关闭列移动动画(适配低性能)
|
|
262099
|
-
'suppress-column-move-animation': true,
|
|
262100
|
-
// 启用浏览器的默认工具提示,而不是网格的工具提示组件
|
|
262101
|
-
'enable-browser-tooltips': this.enableBrowserTooltips,
|
|
262102
|
-
...this.$attrs
|
|
262103
|
-
};
|
|
262104
|
-
}
|
|
262105
|
-
},
|
|
262106
|
-
watch: {
|
|
262107
|
-
data(newVal) {
|
|
262108
|
-
this.filterMethod();
|
|
262109
|
-
},
|
|
262110
|
-
totalData: {
|
|
262111
|
-
handler(newVal) {
|
|
262112
|
-
this.getSummaries();
|
|
262113
|
-
}
|
|
262114
|
-
}
|
|
262115
|
-
},
|
|
262116
|
-
/** 给表格绑定上下文, 绑定父组件的 this */
|
|
262117
|
-
beforeMount() {
|
|
262118
|
-
this.context = {
|
|
262119
|
-
componentParent: this
|
|
262120
|
-
};
|
|
262121
|
-
const height = window.screen.height;
|
|
262122
|
-
if (height !== 1080) {
|
|
262123
|
-
this.rowHeight = (height / 1080 * 35).toFixed(0);
|
|
262124
|
-
this.headerHeight = this.rowHeight;
|
|
262125
|
-
}
|
|
262126
|
-
},
|
|
262127
|
-
methods: {
|
|
262128
|
-
/** 获取行号 */
|
|
262129
|
-
hashValueGetter(params) {
|
|
262130
|
-
return params.node ? params.node.rowIndex + 1 : null;
|
|
262131
|
-
},
|
|
262132
|
-
/** 表格合计 */
|
|
262133
|
-
getSummaries() {
|
|
262134
|
-
const summaryRowData = {};
|
|
262135
|
-
this.columns.forEach((item, index) => {
|
|
262136
|
-
if (index === 0) {
|
|
262137
|
-
summaryRowData[item.field] = '合计';
|
|
262138
|
-
} else if (this.totalData[index + 1]) {
|
|
262139
|
-
summaryRowData[item.field] = this.totalData[index + 1];
|
|
262140
|
-
} else {
|
|
262141
|
-
summaryRowData[item.field] = '';
|
|
262142
|
-
}
|
|
262143
|
-
});
|
|
262144
|
-
this.gridApi.setPinnedBottomRowData([summaryRowData]);
|
|
262145
|
-
},
|
|
262146
|
-
/**
|
|
262147
|
-
* @param{
|
|
262148
|
-
* value: "输入的值",
|
|
262149
|
-
* configData:"在哪一列"
|
|
262150
|
-
* }
|
|
262151
|
-
*/
|
|
262152
|
-
handleUpdateFilter({
|
|
262153
|
-
value,
|
|
262154
|
-
params
|
|
262155
|
-
}) {
|
|
262156
|
-
this.filterOption[params.column.colId] = {
|
|
262157
|
-
...params,
|
|
262158
|
-
value
|
|
262159
|
-
};
|
|
262160
|
-
this.filterMethod();
|
|
262161
|
-
},
|
|
262162
|
-
/** 过滤条件方法 */
|
|
262163
|
-
filterMethod() {
|
|
262164
|
-
const result = this.data.filter(e => {
|
|
262165
|
-
const keyArr = Object.keys(e);
|
|
262166
|
-
let isFilter = true;
|
|
262167
|
-
keyArr.some(key => {
|
|
262168
|
-
// 数据存在时执行
|
|
262169
|
-
if (!!key && e[key] && this.filterOption[key]?.value) {
|
|
262170
|
-
// 时间类型的筛选
|
|
262171
|
-
if (['date', 'dateTime'].includes(this.filterOption[key].fieldType)) {
|
|
262172
|
-
if (e[key] < this.filterOption[key].value.startTime || e[key] > this.filterOption[key].value.endTime) {
|
|
262173
|
-
isFilter = false;
|
|
262174
|
-
}
|
|
262175
|
-
return !isFilter;
|
|
262176
|
-
}
|
|
262177
|
-
//枚举数据过滤
|
|
262178
|
-
if (this.filterOption[key].fieldType === 'select') {
|
|
262179
|
-
if (this.filterOption[key].value.length > 0 && !this.filterOption[key].value.includes(e[key])) {
|
|
262180
|
-
isFilter = false;
|
|
262181
|
-
}
|
|
262182
|
-
return !isFilter;
|
|
262183
|
-
}
|
|
262184
|
-
// 文本数据过滤
|
|
262185
|
-
if (this.filterOption[key].value.length > 0) {
|
|
262186
|
-
const values = this.filterOption[key].value.filter(item => e[key].includes(item.name));
|
|
262187
|
-
if (!values.length) {
|
|
262188
|
-
isFilter = false;
|
|
262189
|
-
}
|
|
262190
|
-
}
|
|
262191
|
-
return !isFilter;
|
|
262192
|
-
}
|
|
262193
|
-
});
|
|
262194
|
-
return isFilter;
|
|
262195
|
-
});
|
|
262196
|
-
// this.filteredData.splice(0)
|
|
262197
|
-
// this.filteredData = [...result]
|
|
262198
|
-
this.filteredData = result;
|
|
262199
|
-
},
|
|
262200
|
-
/** 表格选择项change事件 */
|
|
262201
|
-
selectionChange() {
|
|
262202
|
-
this.selectedRows = this.gridApi.getSelectedRows();
|
|
262203
|
-
this.$emit('selection-changed', this.selectedRows);
|
|
262204
|
-
},
|
|
262205
|
-
/** 列的宽度调整的事件的回调 */
|
|
262206
|
-
columnResized(params) {
|
|
262207
|
-
const {
|
|
262208
|
-
column
|
|
262209
|
-
} = params;
|
|
262210
|
-
this.$emit('column-resized', column);
|
|
262211
|
-
},
|
|
262212
|
-
/** 拖动停止,此事件包含列移动,列调整大小等 */
|
|
262213
|
-
dragStopped(params) {
|
|
262214
|
-
this.$emit('drag-stopped', params);
|
|
262215
|
-
},
|
|
262216
|
-
/** 列移动排序 */
|
|
262217
|
-
columnMoved(params) {
|
|
262218
|
-
this.$emit('column-moved', params);
|
|
262219
|
-
},
|
|
262220
|
-
/** 行拖拽结束后 */
|
|
262221
|
-
rowDragEnd(params) {
|
|
262222
|
-
this.$emit('row-drag-end', params);
|
|
262223
|
-
},
|
|
262224
|
-
/** 单元格单击事件 */
|
|
262225
|
-
cellClick(params) {
|
|
262226
|
-
const data = params;
|
|
262227
|
-
this.$emit('cell-clicked', data);
|
|
262228
|
-
},
|
|
262229
|
-
/** 行选中事件 */
|
|
262230
|
-
rowSelected({
|
|
262231
|
-
node,
|
|
262232
|
-
data
|
|
262233
|
-
}) {
|
|
262234
|
-
const currentNode = node;
|
|
262235
|
-
// 合并表格的时候处理选中 合并行 高亮
|
|
262236
|
-
if (this.columns.find(item => item.field.startsWith('entity__'))) {
|
|
262237
|
-
this.gridApi.forEachNodeAfterFilter(node => {
|
|
262238
|
-
// node节点对应的数据id 与当前点击 行data.id相同,设置合并行(主表一行数据对应多行子表数据)选中||取消
|
|
262239
|
-
if (node.data.id === data.id) {
|
|
262240
|
-
node.setSelected(currentNode.isSelected());
|
|
262241
|
-
}
|
|
262242
|
-
});
|
|
262243
|
-
}
|
|
262244
|
-
if (this.lastCurrentRow && this.lastCurrentRow.id === data.id || !currentNode.isSelected()) {
|
|
262245
|
-
return;
|
|
262246
|
-
}
|
|
262247
|
-
this.lastCurrentRow = data;
|
|
262248
|
-
this.currentRow = data;
|
|
262249
|
-
this.$emit('row-selected', data);
|
|
262250
|
-
},
|
|
262251
|
-
/** 单元格双击事件 */
|
|
262252
|
-
cellDBLClick({
|
|
262253
|
-
data
|
|
262254
|
-
}) {
|
|
262255
|
-
if (data.checkout === '合计') {
|
|
262256
|
-
return;
|
|
262257
|
-
}
|
|
262258
|
-
this.$emit('cell-double-clicked', data);
|
|
262259
|
-
},
|
|
262260
|
-
/** 单元格样式 */
|
|
262261
|
-
setCellStyle(params) {
|
|
262262
|
-
if (params.data.color) {
|
|
262263
|
-
return {
|
|
262264
|
-
color: params.data.color
|
|
262265
|
-
};
|
|
262266
|
-
}
|
|
262267
|
-
},
|
|
262268
|
-
/** 表格初始化 */
|
|
262269
|
-
onGridReady(params) {
|
|
262270
|
-
this.gridApi = params.api;
|
|
262271
|
-
},
|
|
262272
|
-
/** 编辑表格单元格值 */
|
|
262273
|
-
handleChangeValue(datas) {
|
|
262274
|
-
this.$emit('handleChangeCellValue', datas);
|
|
262275
|
-
},
|
|
262276
|
-
/** 行移动排序: 置顶; 恢复默认值 */
|
|
262277
|
-
sortRow(datas) {
|
|
262278
|
-
if (!datas.overIndex) {
|
|
262279
|
-
if (datas.type && datas.type === 'top') {
|
|
262280
|
-
datas.overIndex = 1;
|
|
262281
|
-
} else {
|
|
262282
|
-
datas.overIndex = datas.params.data.fieldIndex;
|
|
262283
|
-
}
|
|
262284
|
-
}
|
|
262285
|
-
this.$emit('sortRow', datas);
|
|
262286
|
-
},
|
|
262287
|
-
/** 手动选中行 */
|
|
262288
|
-
handleSelectRows(ids) {
|
|
262289
|
-
this.gridApi.forEachNodeAfterFilter(node => {
|
|
262290
|
-
if (ids.indexOf(node.data.id) !== -1) {
|
|
262291
|
-
node.setSelected(true);
|
|
262292
|
-
this.gridApi.ensureIndexVisible(node.rowIndex, 'middle');
|
|
262293
|
-
}
|
|
262294
|
-
});
|
|
262295
|
-
},
|
|
262296
|
-
/** 滚动到选中的第一行 */
|
|
262297
|
-
scrollToSelect() {
|
|
262298
|
-
this.gridApi.ensureIndexVisible(this.gridApi.getSelectedNodes()[0].rowIndex, 'middle');
|
|
262299
|
-
}
|
|
262300
|
-
}
|
|
262301
|
-
});
|
|
262302
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
262303
|
-
/* harmony default export */ var package_tf_ag_grid_srcvue_type_script_lang_js_ = (tf_ag_grid_srcvue_type_script_lang_js_);
|
|
262304
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-63.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-63.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-63.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-63.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=style&index=0&id=3436a30c&prod&lang=scss&scoped=true&
|
|
262305
|
-
// extracted by mini-css-extract-plugin
|
|
262306
|
-
|
|
262307
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=style&index=0&id=3436a30c&prod&lang=scss&scoped=true&
|
|
262308
|
-
|
|
262309
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue
|
|
262310
|
-
|
|
262311
|
-
|
|
262312
|
-
|
|
262313
|
-
;
|
|
262314
|
-
|
|
262315
|
-
|
|
262316
|
-
/* normalize component */
|
|
262317
|
-
|
|
262318
|
-
var tf_ag_grid_src_component = (0,componentNormalizer/* default */.Z)(
|
|
262319
|
-
package_tf_ag_grid_srcvue_type_script_lang_js_,
|
|
262320
|
-
srcvue_type_template_id_3436a30c_scoped_true_render,
|
|
262321
|
-
srcvue_type_template_id_3436a30c_scoped_true_staticRenderFns,
|
|
262322
|
-
false,
|
|
262323
|
-
null,
|
|
262324
|
-
"3436a30c",
|
|
262325
|
-
null
|
|
262326
|
-
|
|
262327
|
-
)
|
|
262328
|
-
|
|
262329
|
-
/* harmony default export */ var tf_ag_grid_src = (tf_ag_grid_src_component.exports);
|
|
262330
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/index.js
|
|
262331
|
-
|
|
262332
|
-
tf_ag_grid_src.install = function (Vue) {
|
|
262333
|
-
Vue.component(tf_ag_grid_src.name, tf_ag_grid_src);
|
|
262334
|
-
};
|
|
262335
|
-
/* harmony default export */ var tf_ag_grid = (tf_ag_grid_src);
|
|
262325
|
+
// EXTERNAL MODULE: ./package/tf-ag-grid/index.js + 26 modules
|
|
262326
|
+
var tf_ag_grid = __webpack_require__(3189);
|
|
262336
262327
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-vxe-table/src/index.vue?vue&type=template&id=38f78afd&scoped=true&
|
|
262337
262328
|
var srcvue_type_template_id_38f78afd_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"tf-common-table-container"},[_c('vxe-table',_vm._b({directives:[{name:"vxeTableSetting",rawName:"v-vxeTableSetting",value:(_vm.entityTableName),expression:"entityTableName"}],ref:_vm.tableRef,staticClass:"tf-common-table-scrollbar",attrs:{"data":_vm.data},on:{"cell-click":_vm.cellClick,"cell-dblclick":_vm.cellDBLClick,"current-change":_vm.currentChange,"checkbox-change":_vm.checkboxChange,"checkbox-all":_vm.checkboxAll}},'vxe-table',_vm.customAttrs,false),[_c('vxe-column',{attrs:{"type":"checkbox","width":"40","fixed":"left"}}),_c('vxe-column',{attrs:{"type":"seq","width":"60","fixed":"left","title":"#"}}),_vm._l((_vm.columns),function(item){return _c('vxe-column',_vm._b({key:item.field},'vxe-column',item,false))}),(_vm.customColumns)?_vm._t("default"):_vm._e(),_c('template',{slot:"empty"},[_c('SvgIcon',{staticStyle:{"width":"6vw","height":"6vh"},attrs:{"icon-class":"table-empty"}}),_c('div',{staticStyle:{"font-size":"1.4vh"}},[_vm._v("暂无数据")])],1)],2)],1)}
|
|
262338
262329
|
var srcvue_type_template_id_38f78afd_scoped_true_staticRenderFns = []
|
|
@@ -265403,7 +265394,7 @@ var tf_basic_table_list = __webpack_require__(41663);
|
|
|
265403
265394
|
|
|
265404
265395
|
|
|
265405
265396
|
|
|
265406
|
-
const components = [package_t_input, svg_icon, package_tf_widget, package_tf_layout, package_form_body, t_data_list, package_tf_icon_picker, package_form_body_item, package_form_body_item_custom, tf_input/* default */.Z, tf_table/* default */.Z, tf_ag_grid, tf_vxe_table, tf_splitter/* default */.Z, tf_tab_table/* default */.Z, tf_form_body, tf_table_list, tf_pagination/* default */.Z, tf_plan_filter/* default */.Z, tf_button_group/* default */.Z, tf_fuzzy_search/* default */.Z, tf_ag_grid_table/* default */.Z, tf_form_body_item, tf_condition_input/* default */.Z, tf_basic_table_list/* default */.Z, tf_print_render];
|
|
265397
|
+
const components = [package_t_input, svg_icon, package_tf_widget, package_tf_layout, package_form_body, t_data_list, package_tf_icon_picker, package_form_body_item, package_form_body_item_custom, tf_input/* default */.Z, tf_table/* default */.Z, tf_ag_grid/* default */.Z, tf_vxe_table, tf_splitter/* default */.Z, tf_tab_table/* default */.Z, tf_form_body, tf_table_list, tf_pagination/* default */.Z, tf_plan_filter/* default */.Z, tf_button_group/* default */.Z, tf_fuzzy_search/* default */.Z, tf_ag_grid_table/* default */.Z, tf_form_body_item, tf_condition_input/* default */.Z, tf_basic_table_list/* default */.Z, tf_print_render];
|
|
265407
265398
|
const install = function (Vue) {
|
|
265408
265399
|
components.forEach(component => {
|
|
265409
265400
|
Vue.component(component.name, component);
|