@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.common.js
CHANGED
|
@@ -133371,6 +133371,865 @@ src.install = function (Vue) {
|
|
|
133371
133371
|
|
|
133372
133372
|
/***/ }),
|
|
133373
133373
|
|
|
133374
|
+
/***/ 24495:
|
|
133375
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
133376
|
+
|
|
133377
|
+
"use strict";
|
|
133378
|
+
|
|
133379
|
+
// EXPORTS
|
|
133380
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
133381
|
+
"Z": function() { return /* binding */ tf_ag_grid; }
|
|
133382
|
+
});
|
|
133383
|
+
|
|
133384
|
+
;// 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&
|
|
133385
|
+
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)}
|
|
133386
|
+
var staticRenderFns = []
|
|
133387
|
+
|
|
133388
|
+
|
|
133389
|
+
// EXTERNAL MODULE: ./node_modules/decimal.js/decimal.mjs
|
|
133390
|
+
var decimal = __webpack_require__(90482);
|
|
133391
|
+
// EXTERNAL MODULE: ./node_modules/ag-grid-vue/main.js
|
|
133392
|
+
var main = __webpack_require__(61146);
|
|
133393
|
+
;// 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&
|
|
133394
|
+
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)])}
|
|
133395
|
+
var tf_filtervue_type_template_id_385b6903_scoped_true_staticRenderFns = []
|
|
133396
|
+
|
|
133397
|
+
|
|
133398
|
+
// EXTERNAL MODULE: ./package/tf-input/index.js + 94 modules
|
|
133399
|
+
var tf_input = __webpack_require__(42479);
|
|
133400
|
+
// EXTERNAL MODULE: ./node_modules/element-ui/src/utils/clickoutside.js + 1 modules
|
|
133401
|
+
var clickoutside = __webpack_require__(96410);
|
|
133402
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
133403
|
+
//
|
|
133404
|
+
//
|
|
133405
|
+
//
|
|
133406
|
+
//
|
|
133407
|
+
//
|
|
133408
|
+
//
|
|
133409
|
+
//
|
|
133410
|
+
//
|
|
133411
|
+
//
|
|
133412
|
+
//
|
|
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
|
+
/* harmony default export */ var tf_filtervue_type_script_lang_js_ = ({
|
|
133440
|
+
components: {
|
|
133441
|
+
TfInput: tf_input/* default */.Z
|
|
133442
|
+
},
|
|
133443
|
+
directives: {
|
|
133444
|
+
Clickoutside: clickoutside/* default */.Z
|
|
133445
|
+
},
|
|
133446
|
+
props: {
|
|
133447
|
+
configData: {
|
|
133448
|
+
type: Object,
|
|
133449
|
+
default: () => {}
|
|
133450
|
+
}
|
|
133451
|
+
},
|
|
133452
|
+
data() {
|
|
133453
|
+
return {
|
|
133454
|
+
text: '',
|
|
133455
|
+
order: '',
|
|
133456
|
+
isClick: false
|
|
133457
|
+
};
|
|
133458
|
+
},
|
|
133459
|
+
computed: {
|
|
133460
|
+
isFilter() {
|
|
133461
|
+
return this.text !== null && this.text !== undefined && this.text !== '';
|
|
133462
|
+
}
|
|
133463
|
+
},
|
|
133464
|
+
methods: {
|
|
133465
|
+
/** 排序 */
|
|
133466
|
+
onSortRequested(event) {
|
|
133467
|
+
switch (this.order) {
|
|
133468
|
+
case 'asc':
|
|
133469
|
+
this.order = 'desc';
|
|
133470
|
+
break;
|
|
133471
|
+
case 'desc':
|
|
133472
|
+
this.order = '';
|
|
133473
|
+
break;
|
|
133474
|
+
default:
|
|
133475
|
+
this.order = 'asc';
|
|
133476
|
+
break;
|
|
133477
|
+
}
|
|
133478
|
+
this.params.setSort(this.order, event.shiftKey);
|
|
133479
|
+
},
|
|
133480
|
+
/** 单击外侧事件 */
|
|
133481
|
+
handleClickOut(e) {
|
|
133482
|
+
this.isClick = false;
|
|
133483
|
+
},
|
|
133484
|
+
/** 图标点击事件 */
|
|
133485
|
+
handleFilterClick() {
|
|
133486
|
+
this.isClick = !this.isClick;
|
|
133487
|
+
},
|
|
133488
|
+
/** 重置 */
|
|
133489
|
+
handleCancel() {
|
|
133490
|
+
this.text = '';
|
|
133491
|
+
this.handleSubmit();
|
|
133492
|
+
},
|
|
133493
|
+
/** 确认 */
|
|
133494
|
+
handleSubmit() {
|
|
133495
|
+
this.isClick = false;
|
|
133496
|
+
this.params.context.componentParent.handleUpdateFilter({
|
|
133497
|
+
value: this.text,
|
|
133498
|
+
params: this.params
|
|
133499
|
+
});
|
|
133500
|
+
// 过滤后根据当前列的排序方式进行排序
|
|
133501
|
+
this.params.setSort(this.order, false);
|
|
133502
|
+
}
|
|
133503
|
+
}
|
|
133504
|
+
});
|
|
133505
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
133506
|
+
/* harmony default export */ var components_tf_filtervue_type_script_lang_js_ = (tf_filtervue_type_script_lang_js_);
|
|
133507
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.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&
|
|
133508
|
+
// extracted by mini-css-extract-plugin
|
|
133509
|
+
|
|
133510
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=style&index=0&id=385b6903&prod&lang=less&scoped=true&
|
|
133511
|
+
|
|
133512
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
133513
|
+
var componentNormalizer = __webpack_require__(1001);
|
|
133514
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue
|
|
133515
|
+
|
|
133516
|
+
|
|
133517
|
+
|
|
133518
|
+
;
|
|
133519
|
+
|
|
133520
|
+
|
|
133521
|
+
/* normalize component */
|
|
133522
|
+
|
|
133523
|
+
var component = (0,componentNormalizer/* default */.Z)(
|
|
133524
|
+
components_tf_filtervue_type_script_lang_js_,
|
|
133525
|
+
tf_filtervue_type_template_id_385b6903_scoped_true_render,
|
|
133526
|
+
tf_filtervue_type_template_id_385b6903_scoped_true_staticRenderFns,
|
|
133527
|
+
false,
|
|
133528
|
+
null,
|
|
133529
|
+
"385b6903",
|
|
133530
|
+
null
|
|
133531
|
+
|
|
133532
|
+
)
|
|
133533
|
+
|
|
133534
|
+
/* harmony default export */ var tf_filter = (component.exports);
|
|
133535
|
+
;// 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&
|
|
133536
|
+
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)}
|
|
133537
|
+
var tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns = []
|
|
133538
|
+
|
|
133539
|
+
|
|
133540
|
+
;// 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&
|
|
133541
|
+
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"})])])}
|
|
133542
|
+
var right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns = []
|
|
133543
|
+
|
|
133544
|
+
|
|
133545
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
133546
|
+
//
|
|
133547
|
+
//
|
|
133548
|
+
//
|
|
133549
|
+
//
|
|
133550
|
+
//
|
|
133551
|
+
//
|
|
133552
|
+
//
|
|
133553
|
+
//
|
|
133554
|
+
//
|
|
133555
|
+
//
|
|
133556
|
+
//
|
|
133557
|
+
//
|
|
133558
|
+
|
|
133559
|
+
/* harmony default export */ var right_menuvue_type_script_lang_js_ = ({
|
|
133560
|
+
props: {
|
|
133561
|
+
top: {
|
|
133562
|
+
type: Number,
|
|
133563
|
+
default: 0
|
|
133564
|
+
},
|
|
133565
|
+
left: {
|
|
133566
|
+
type: Number,
|
|
133567
|
+
default: 0
|
|
133568
|
+
},
|
|
133569
|
+
showMenu: {
|
|
133570
|
+
type: Boolean,
|
|
133571
|
+
default: false
|
|
133572
|
+
}
|
|
133573
|
+
},
|
|
133574
|
+
methods: {
|
|
133575
|
+
rightMenuClick(params) {
|
|
133576
|
+
this.$emit('rightMenuClick', params);
|
|
133577
|
+
this.closeRightMenu();
|
|
133578
|
+
},
|
|
133579
|
+
closeRightMenu() {
|
|
133580
|
+
this.$emit('update:showMenu', false);
|
|
133581
|
+
}
|
|
133582
|
+
}
|
|
133583
|
+
});
|
|
133584
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
133585
|
+
/* harmony default export */ var tf_cell_text_right_menuvue_type_script_lang_js_ = (right_menuvue_type_script_lang_js_);
|
|
133586
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.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&
|
|
133587
|
+
// extracted by mini-css-extract-plugin
|
|
133588
|
+
|
|
133589
|
+
;// 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&
|
|
133590
|
+
|
|
133591
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue
|
|
133592
|
+
|
|
133593
|
+
|
|
133594
|
+
|
|
133595
|
+
;
|
|
133596
|
+
|
|
133597
|
+
|
|
133598
|
+
/* normalize component */
|
|
133599
|
+
|
|
133600
|
+
var right_menu_component = (0,componentNormalizer/* default */.Z)(
|
|
133601
|
+
tf_cell_text_right_menuvue_type_script_lang_js_,
|
|
133602
|
+
right_menuvue_type_template_id_479f04e0_scoped_true_render,
|
|
133603
|
+
right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns,
|
|
133604
|
+
false,
|
|
133605
|
+
null,
|
|
133606
|
+
"479f04e0",
|
|
133607
|
+
null
|
|
133608
|
+
|
|
133609
|
+
)
|
|
133610
|
+
|
|
133611
|
+
/* harmony default export */ var right_menu = (right_menu_component.exports);
|
|
133612
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
133613
|
+
//
|
|
133614
|
+
//
|
|
133615
|
+
//
|
|
133616
|
+
//
|
|
133617
|
+
//
|
|
133618
|
+
//
|
|
133619
|
+
//
|
|
133620
|
+
//
|
|
133621
|
+
//
|
|
133622
|
+
//
|
|
133623
|
+
//
|
|
133624
|
+
//
|
|
133625
|
+
//
|
|
133626
|
+
|
|
133627
|
+
|
|
133628
|
+
|
|
133629
|
+
/* harmony default export */ var tf_cell_textvue_type_script_lang_js_ = ({
|
|
133630
|
+
components: {
|
|
133631
|
+
RightMenu: right_menu
|
|
133632
|
+
},
|
|
133633
|
+
directives: {
|
|
133634
|
+
Clickoutside: clickoutside/* default */.Z
|
|
133635
|
+
},
|
|
133636
|
+
data() {
|
|
133637
|
+
return {
|
|
133638
|
+
displayValue: '',
|
|
133639
|
+
rightMenuLeft: 0,
|
|
133640
|
+
rightMenuTop: 0,
|
|
133641
|
+
showRightMenu: false
|
|
133642
|
+
};
|
|
133643
|
+
},
|
|
133644
|
+
beforeMount() {
|
|
133645
|
+
// params: 当前操作单元格对象
|
|
133646
|
+
this.setInitialState(this.params);
|
|
133647
|
+
},
|
|
133648
|
+
methods: {
|
|
133649
|
+
setInitialState(params) {
|
|
133650
|
+
this.displayValue = params.value;
|
|
133651
|
+
},
|
|
133652
|
+
/** 右键点击 */
|
|
133653
|
+
rightClick($event) {
|
|
133654
|
+
this.rightMenuTop = $event.offsetY;
|
|
133655
|
+
// TODO: 这里的17是agcell的paddingLeft的值,若有样式调整,这里也要调整
|
|
133656
|
+
this.rightMenuLeft = $event.offsetX + 17;
|
|
133657
|
+
this.showRightMenu = true;
|
|
133658
|
+
},
|
|
133659
|
+
closeRightMenu() {
|
|
133660
|
+
this.showRightMenu = false;
|
|
133661
|
+
},
|
|
133662
|
+
dropdownCommand(command) {
|
|
133663
|
+
if (command === 'copy') {
|
|
133664
|
+
const input = document.createElement('input');
|
|
133665
|
+
input.value = this.displayValue;
|
|
133666
|
+
input.setAttribute('id', 'temp-input-id');
|
|
133667
|
+
document.body.appendChild(input);
|
|
133668
|
+
input.select();
|
|
133669
|
+
document.execCommand('copy');
|
|
133670
|
+
document.querySelector('#temp-input-id').remove();
|
|
133671
|
+
}
|
|
133672
|
+
}
|
|
133673
|
+
}
|
|
133674
|
+
});
|
|
133675
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
133676
|
+
/* harmony default export */ var components_tf_cell_textvue_type_script_lang_js_ = (tf_cell_textvue_type_script_lang_js_);
|
|
133677
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue
|
|
133678
|
+
|
|
133679
|
+
|
|
133680
|
+
|
|
133681
|
+
|
|
133682
|
+
|
|
133683
|
+
/* normalize component */
|
|
133684
|
+
;
|
|
133685
|
+
var tf_cell_text_component = (0,componentNormalizer/* default */.Z)(
|
|
133686
|
+
components_tf_cell_textvue_type_script_lang_js_,
|
|
133687
|
+
tf_cell_textvue_type_template_id_605b3b64_scoped_true_render,
|
|
133688
|
+
tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns,
|
|
133689
|
+
false,
|
|
133690
|
+
null,
|
|
133691
|
+
"605b3b64",
|
|
133692
|
+
null
|
|
133693
|
+
|
|
133694
|
+
)
|
|
133695
|
+
|
|
133696
|
+
/* harmony default export */ var tf_cell_text = (tf_cell_text_component.exports);
|
|
133697
|
+
;// 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&
|
|
133698
|
+
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"}})}
|
|
133699
|
+
var tf_input_cell_rendervue_type_template_id_3f0d8a7c_staticRenderFns = []
|
|
133700
|
+
|
|
133701
|
+
|
|
133702
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue?vue&type=script&lang=js&
|
|
133703
|
+
//
|
|
133704
|
+
//
|
|
133705
|
+
//
|
|
133706
|
+
//
|
|
133707
|
+
//
|
|
133708
|
+
//
|
|
133709
|
+
//
|
|
133710
|
+
//
|
|
133711
|
+
//
|
|
133712
|
+
|
|
133713
|
+
|
|
133714
|
+
/* harmony default export */ var tf_input_cell_rendervue_type_script_lang_js_ = ({
|
|
133715
|
+
name: 'TfInputCellRender',
|
|
133716
|
+
components: {
|
|
133717
|
+
TfInput: tf_input/* default */.Z
|
|
133718
|
+
},
|
|
133719
|
+
data() {
|
|
133720
|
+
return {
|
|
133721
|
+
type: '',
|
|
133722
|
+
value: '',
|
|
133723
|
+
disabled: false
|
|
133724
|
+
};
|
|
133725
|
+
},
|
|
133726
|
+
/** params:当前操作单元格对象 */
|
|
133727
|
+
beforeMount() {
|
|
133728
|
+
this.setInitialState();
|
|
133729
|
+
},
|
|
133730
|
+
methods: {
|
|
133731
|
+
setInitialState() {
|
|
133732
|
+
this.value = this.params.value;
|
|
133733
|
+
this.type = this.params.type || 'input';
|
|
133734
|
+
// 表格设置的特殊逻辑
|
|
133735
|
+
if (this.params.column.colId === 'isFreeze' && this.params.data.isChild) {
|
|
133736
|
+
this.disabled = true;
|
|
133737
|
+
}
|
|
133738
|
+
},
|
|
133739
|
+
handleChange(value) {
|
|
133740
|
+
this.params.context.componentParent.handleChangeValue({
|
|
133741
|
+
value: value,
|
|
133742
|
+
params: this.params
|
|
133743
|
+
});
|
|
133744
|
+
}
|
|
133745
|
+
}
|
|
133746
|
+
});
|
|
133747
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue?vue&type=script&lang=js&
|
|
133748
|
+
/* harmony default export */ var components_tf_input_cell_rendervue_type_script_lang_js_ = (tf_input_cell_rendervue_type_script_lang_js_);
|
|
133749
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-input-cell-render/index.vue
|
|
133750
|
+
|
|
133751
|
+
|
|
133752
|
+
|
|
133753
|
+
|
|
133754
|
+
|
|
133755
|
+
/* normalize component */
|
|
133756
|
+
;
|
|
133757
|
+
var tf_input_cell_render_component = (0,componentNormalizer/* default */.Z)(
|
|
133758
|
+
components_tf_input_cell_rendervue_type_script_lang_js_,
|
|
133759
|
+
tf_input_cell_rendervue_type_template_id_3f0d8a7c_render,
|
|
133760
|
+
tf_input_cell_rendervue_type_template_id_3f0d8a7c_staticRenderFns,
|
|
133761
|
+
false,
|
|
133762
|
+
null,
|
|
133763
|
+
null,
|
|
133764
|
+
null
|
|
133765
|
+
|
|
133766
|
+
)
|
|
133767
|
+
|
|
133768
|
+
/* harmony default export */ var tf_input_cell_render = (tf_input_cell_render_component.exports);
|
|
133769
|
+
// EXTERNAL MODULE: ./src/utils/index.js
|
|
133770
|
+
var utils = __webpack_require__(42325);
|
|
133771
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
133772
|
+
//
|
|
133773
|
+
//
|
|
133774
|
+
//
|
|
133775
|
+
//
|
|
133776
|
+
//
|
|
133777
|
+
//
|
|
133778
|
+
//
|
|
133779
|
+
//
|
|
133780
|
+
//
|
|
133781
|
+
//
|
|
133782
|
+
//
|
|
133783
|
+
//
|
|
133784
|
+
//
|
|
133785
|
+
//
|
|
133786
|
+
//
|
|
133787
|
+
//
|
|
133788
|
+
//
|
|
133789
|
+
//
|
|
133790
|
+
//
|
|
133791
|
+
//
|
|
133792
|
+
//
|
|
133793
|
+
//
|
|
133794
|
+
//
|
|
133795
|
+
//
|
|
133796
|
+
//
|
|
133797
|
+
|
|
133798
|
+
|
|
133799
|
+
|
|
133800
|
+
|
|
133801
|
+
|
|
133802
|
+
|
|
133803
|
+
|
|
133804
|
+
/* harmony default export */ var srcvue_type_script_lang_js_ = ({
|
|
133805
|
+
name: 'TfAgGrid',
|
|
133806
|
+
/* eslint-disable */
|
|
133807
|
+
components: {
|
|
133808
|
+
AgGridVue: main.AgGridVue,
|
|
133809
|
+
TfFilter: tf_filter,
|
|
133810
|
+
TfCellText: tf_cell_text,
|
|
133811
|
+
TfInputCellRender: tf_input_cell_render
|
|
133812
|
+
},
|
|
133813
|
+
/* eslint-enable */
|
|
133814
|
+
props: {
|
|
133815
|
+
data: {
|
|
133816
|
+
type: Array,
|
|
133817
|
+
default: () => []
|
|
133818
|
+
},
|
|
133819
|
+
columns: {
|
|
133820
|
+
type: Array,
|
|
133821
|
+
default: () => []
|
|
133822
|
+
},
|
|
133823
|
+
// 表头字段对应的数据集
|
|
133824
|
+
fieldValueSet: {
|
|
133825
|
+
type: Object,
|
|
133826
|
+
default: () => {}
|
|
133827
|
+
},
|
|
133828
|
+
loading: {
|
|
133829
|
+
type: Boolean,
|
|
133830
|
+
default: false
|
|
133831
|
+
},
|
|
133832
|
+
// 表格合计
|
|
133833
|
+
totalData: {
|
|
133834
|
+
type: Object,
|
|
133835
|
+
default: () => {}
|
|
133836
|
+
},
|
|
133837
|
+
// 字段表格合计
|
|
133838
|
+
totalField: {
|
|
133839
|
+
type: Array,
|
|
133840
|
+
default: () => []
|
|
133841
|
+
},
|
|
133842
|
+
// 是否开启行拖拽
|
|
133843
|
+
rowDragManaged: {
|
|
133844
|
+
type: Boolean,
|
|
133845
|
+
default: false
|
|
133846
|
+
},
|
|
133847
|
+
// 需配合rowDragManaged同时为true 行拖拽生效
|
|
133848
|
+
rowDragEntireRow: {
|
|
133849
|
+
type: Boolean,
|
|
133850
|
+
default: false
|
|
133851
|
+
},
|
|
133852
|
+
cellStyle: {
|
|
133853
|
+
type: Function,
|
|
133854
|
+
default: null
|
|
133855
|
+
},
|
|
133856
|
+
// 启用多行拖拽
|
|
133857
|
+
rowDragMultiRow: {
|
|
133858
|
+
type: Boolean,
|
|
133859
|
+
default: false
|
|
133860
|
+
},
|
|
133861
|
+
// 允许使用单击选择多行
|
|
133862
|
+
rowMultiSelectWithClick: {
|
|
133863
|
+
type: Boolean,
|
|
133864
|
+
default: false
|
|
133865
|
+
},
|
|
133866
|
+
// 用户自定义字段颜色方案列表
|
|
133867
|
+
personalFontColor: {
|
|
133868
|
+
type: Array,
|
|
133869
|
+
default: () => []
|
|
133870
|
+
},
|
|
133871
|
+
// 启用选中单元格文本
|
|
133872
|
+
enableCellTextSelection: {
|
|
133873
|
+
type: Boolean,
|
|
133874
|
+
default: true
|
|
133875
|
+
},
|
|
133876
|
+
suppressScrollOnNewData: {
|
|
133877
|
+
type: Boolean,
|
|
133878
|
+
default: true
|
|
133879
|
+
},
|
|
133880
|
+
enableBrowserTooltips: {
|
|
133881
|
+
type: Boolean,
|
|
133882
|
+
default: false
|
|
133883
|
+
},
|
|
133884
|
+
tooltipShowDelay: {
|
|
133885
|
+
type: Number,
|
|
133886
|
+
default: 100
|
|
133887
|
+
},
|
|
133888
|
+
tooltipHideDelay: {
|
|
133889
|
+
type: Number,
|
|
133890
|
+
default: 2000
|
|
133891
|
+
},
|
|
133892
|
+
entityTableName: {
|
|
133893
|
+
type: String,
|
|
133894
|
+
default: ''
|
|
133895
|
+
}
|
|
133896
|
+
},
|
|
133897
|
+
data() {
|
|
133898
|
+
return {
|
|
133899
|
+
context: {},
|
|
133900
|
+
gridApi: null,
|
|
133901
|
+
columnApi: null,
|
|
133902
|
+
selectedRows: [],
|
|
133903
|
+
tableRef: (0,utils/* randomRefName */.zs)(15),
|
|
133904
|
+
// 绑定默认列属性
|
|
133905
|
+
defaultColDef: {
|
|
133906
|
+
sortable: true,
|
|
133907
|
+
resizable: true,
|
|
133908
|
+
// 禁止通过拖动列来固定列
|
|
133909
|
+
lockPinned: true,
|
|
133910
|
+
cellRenderer: 'TfCellText',
|
|
133911
|
+
cellStyle: this.cellStyle || this.setCellStyle,
|
|
133912
|
+
headerComponent: 'TfFilter'
|
|
133913
|
+
},
|
|
133914
|
+
// 过滤条件
|
|
133915
|
+
filterOption: {},
|
|
133916
|
+
// 过滤后的数据
|
|
133917
|
+
filteredData: [],
|
|
133918
|
+
// 没有数据的提示
|
|
133919
|
+
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>',
|
|
133920
|
+
rowHeight: 35,
|
|
133921
|
+
headerHeight: 35,
|
|
133922
|
+
scrollTop: 0,
|
|
133923
|
+
scrollLeft: 0
|
|
133924
|
+
};
|
|
133925
|
+
},
|
|
133926
|
+
computed: {
|
|
133927
|
+
customAttrs: function () {
|
|
133928
|
+
return {
|
|
133929
|
+
// 选中模式:多选|单选
|
|
133930
|
+
'row-selection': 'multiple',
|
|
133931
|
+
// 内容行高
|
|
133932
|
+
'row-height': this.rowHeight,
|
|
133933
|
+
// 表头行高
|
|
133934
|
+
'header-height': this.headerHeight,
|
|
133935
|
+
// 允许单击选择多行
|
|
133936
|
+
'row-multi-select-with-click': this.rowMultiSelectWithClick,
|
|
133937
|
+
// 默认列定义
|
|
133938
|
+
'default-col-def': this.defaultColDef,
|
|
133939
|
+
// 启用行拖拽
|
|
133940
|
+
'row-drag-managed': this.rowDragManaged,
|
|
133941
|
+
// 允许在行上的任意位置单击拖动
|
|
133942
|
+
'row-drag-entire-row': this.rowDragEntireRow,
|
|
133943
|
+
// 允许同时拖动多行
|
|
133944
|
+
'row-drag-multi-row': this.rowDragMultiRow,
|
|
133945
|
+
// 空数据提示
|
|
133946
|
+
'overlay-no-rows-template': this.overlayNoRowsTemplate,
|
|
133947
|
+
// 启用选中单元格文本
|
|
133948
|
+
'enable-cell-text-selection': this.enableCellTextSelection,
|
|
133949
|
+
// 悬浮文本显示需要的延迟
|
|
133950
|
+
'tooltip-show-delay': this.tooltipShowDelay,
|
|
133951
|
+
// 悬浮文本隐藏需要的延迟
|
|
133952
|
+
'tooltip-hide-delay': this.tooltipHideDelay,
|
|
133953
|
+
// 启用行动画
|
|
133954
|
+
'animate-rows': true,
|
|
133955
|
+
// 允许跨行(表格启用rowSpan时需要开启此属性)
|
|
133956
|
+
'suppress-row-transform': true,
|
|
133957
|
+
// 禁用colDef属性检查引起的控制台警告信息
|
|
133958
|
+
'suppress-property-names-check': true,
|
|
133959
|
+
// 关闭列移动动画(适配低性能)
|
|
133960
|
+
'suppress-column-move-animation': true,
|
|
133961
|
+
// 当提供新数据是否要滚动至顶部
|
|
133962
|
+
'suppress-scroll-on-new-data': this.suppressScrollOnNewData,
|
|
133963
|
+
// 启用浏览器的默认工具提示,而不是网格的工具提示组件
|
|
133964
|
+
'enable-browser-tooltips': this.enableBrowserTooltips,
|
|
133965
|
+
...this.$attrs
|
|
133966
|
+
};
|
|
133967
|
+
}
|
|
133968
|
+
},
|
|
133969
|
+
watch: {
|
|
133970
|
+
data() {
|
|
133971
|
+
this.filterMethod();
|
|
133972
|
+
this.initBodyScroll();
|
|
133973
|
+
},
|
|
133974
|
+
totalData() {
|
|
133975
|
+
this.getSummaries();
|
|
133976
|
+
},
|
|
133977
|
+
filteredData() {
|
|
133978
|
+
this.loadRowData(this.filteredData || []);
|
|
133979
|
+
},
|
|
133980
|
+
gridApi() {
|
|
133981
|
+
this.getSummaries();
|
|
133982
|
+
this.loadRowData(this.filteredData || []);
|
|
133983
|
+
}
|
|
133984
|
+
},
|
|
133985
|
+
/** 表格绑定上下文 */
|
|
133986
|
+
beforeMount() {
|
|
133987
|
+
this.context = {
|
|
133988
|
+
componentParent: this
|
|
133989
|
+
};
|
|
133990
|
+
},
|
|
133991
|
+
activated() {
|
|
133992
|
+
this.initBodyScroll();
|
|
133993
|
+
},
|
|
133994
|
+
methods: {
|
|
133995
|
+
/** 初始化滚动条 */
|
|
133996
|
+
initBodyScroll() {
|
|
133997
|
+
this.$nextTick(() => {
|
|
133998
|
+
const viewport = this.$refs[this.tableRef].$el.querySelector('.ag-body-viewport');
|
|
133999
|
+
viewport.scrollTop = this.scrollTop;
|
|
134000
|
+
viewport.scrollLeft = this.scrollLeft;
|
|
134001
|
+
});
|
|
134002
|
+
},
|
|
134003
|
+
/** 表格滚动事件 */
|
|
134004
|
+
bodyScroll(params) {
|
|
134005
|
+
const {
|
|
134006
|
+
top,
|
|
134007
|
+
left
|
|
134008
|
+
} = params;
|
|
134009
|
+
this.scrollTop = top;
|
|
134010
|
+
this.scrollLeft = left;
|
|
134011
|
+
},
|
|
134012
|
+
/** 加载表格数据 */
|
|
134013
|
+
loadRowData(data) {
|
|
134014
|
+
this.gridApi?.setRowData(data || []);
|
|
134015
|
+
},
|
|
134016
|
+
/** 表格合计 */
|
|
134017
|
+
getSummaries() {
|
|
134018
|
+
if (!this.totalData || !this.totalField || !this.totalField.length) {
|
|
134019
|
+
return;
|
|
134020
|
+
}
|
|
134021
|
+
let summaryRowData = this.getTotalData();
|
|
134022
|
+
this.gridApi?.setPinnedBottomRowData([summaryRowData]);
|
|
134023
|
+
},
|
|
134024
|
+
/** 获取合计数据 */
|
|
134025
|
+
getTotalData() {
|
|
134026
|
+
let totalData = {};
|
|
134027
|
+
if (this.totalField && this.totalField.length) {
|
|
134028
|
+
// 计算需要合计字段的值
|
|
134029
|
+
this.totalField.forEach(field => {
|
|
134030
|
+
totalData[field] = this.filteredData.reduce((prev, curr) => {
|
|
134031
|
+
const value = isNaN(+curr[field]) ? 0 : +curr[field];
|
|
134032
|
+
return +decimal/* default.add */.Z.add(+prev, +value);
|
|
134033
|
+
}, 0);
|
|
134034
|
+
});
|
|
134035
|
+
// 将其余字段合计值设置为空
|
|
134036
|
+
const otherFields = this.columns.filter(item => this.totalField.indexOf(item.field) === -1);
|
|
134037
|
+
otherFields.forEach(item => {
|
|
134038
|
+
totalData[item.field] = '';
|
|
134039
|
+
});
|
|
134040
|
+
if (this.entityTableName) {
|
|
134041
|
+
totalData[this.gridApi.getColumnDefs()[1].colId] = '合计';
|
|
134042
|
+
}
|
|
134043
|
+
} else {
|
|
134044
|
+
totalData = this.totalData;
|
|
134045
|
+
}
|
|
134046
|
+
return totalData;
|
|
134047
|
+
},
|
|
134048
|
+
/** 快捷过滤确认 */
|
|
134049
|
+
handleUpdateFilter({
|
|
134050
|
+
value,
|
|
134051
|
+
params
|
|
134052
|
+
}) {
|
|
134053
|
+
this.filterOption[params.column.colId] = {
|
|
134054
|
+
...params,
|
|
134055
|
+
value
|
|
134056
|
+
};
|
|
134057
|
+
this.filterMethod();
|
|
134058
|
+
},
|
|
134059
|
+
/** 过滤条件方法 */
|
|
134060
|
+
filterMethod() {
|
|
134061
|
+
const filteredData = this.data.filter(current => {
|
|
134062
|
+
let isFilter = true;
|
|
134063
|
+
const keyArr = Object.keys(current);
|
|
134064
|
+
keyArr.some(key => {
|
|
134065
|
+
// 存在过滤条件时执行
|
|
134066
|
+
if (this.filterOption[key]?.value) {
|
|
134067
|
+
// 基础资料和枚举要特殊处理
|
|
134068
|
+
const currentName = this.isBasicData(current[key]) ? current[key].name : current[key];
|
|
134069
|
+
if (currentName === null || currentName === undefined || !`${currentName}`.includes(`${this.filterOption[key].value}`)) {
|
|
134070
|
+
isFilter = false;
|
|
134071
|
+
return true;
|
|
134072
|
+
}
|
|
134073
|
+
}
|
|
134074
|
+
});
|
|
134075
|
+
return isFilter;
|
|
134076
|
+
});
|
|
134077
|
+
this.filteredData = filteredData;
|
|
134078
|
+
// 更新表尾合计
|
|
134079
|
+
this.getSummaries();
|
|
134080
|
+
},
|
|
134081
|
+
isBasicData(data) {
|
|
134082
|
+
return typeof data === 'object' && data !== null && data !== undefined;
|
|
134083
|
+
},
|
|
134084
|
+
/** 表格选择项change事件 */
|
|
134085
|
+
selectionChange() {
|
|
134086
|
+
this.selectedRows = this.gridApi.getSelectedRows();
|
|
134087
|
+
this.$emit('selection-changed', this.selectedRows);
|
|
134088
|
+
},
|
|
134089
|
+
/** 列的宽度调整的事件的回调 */
|
|
134090
|
+
columnResized(params) {
|
|
134091
|
+
this.$emit('column-resized', params);
|
|
134092
|
+
},
|
|
134093
|
+
/** 拖动停止,此事件包含列移动,列调整大小等 */
|
|
134094
|
+
dragStopped(params) {
|
|
134095
|
+
this.$emit('drag-stopped', params);
|
|
134096
|
+
},
|
|
134097
|
+
/** 列移动排序 */
|
|
134098
|
+
columnMoved(params) {
|
|
134099
|
+
this.$emit('column-moved', params);
|
|
134100
|
+
},
|
|
134101
|
+
/** 行拖拽结束后 */
|
|
134102
|
+
rowDragEnd(params) {
|
|
134103
|
+
this.$emit('row-drag-end', params);
|
|
134104
|
+
},
|
|
134105
|
+
/** 单元格单击事件 */
|
|
134106
|
+
cellClick(params) {
|
|
134107
|
+
this.$emit('cell-clicked', params);
|
|
134108
|
+
},
|
|
134109
|
+
/** 行点击事件 */
|
|
134110
|
+
rowClicked(params) {
|
|
134111
|
+
this.$emit('row-clicked', params);
|
|
134112
|
+
},
|
|
134113
|
+
/** 行选中事件 */
|
|
134114
|
+
rowSelected(params) {
|
|
134115
|
+
// 这里的判断是防止点击一次 触发两次行点击事件
|
|
134116
|
+
if (params.event) {
|
|
134117
|
+
// 这里的事件名称不要再修改
|
|
134118
|
+
this.$emit('current-change', params);
|
|
134119
|
+
}
|
|
134120
|
+
},
|
|
134121
|
+
/** 单元格双击事件 */
|
|
134122
|
+
cellDBLClick(params) {
|
|
134123
|
+
this.$emit('cell-double-clicked', params);
|
|
134124
|
+
},
|
|
134125
|
+
/** 单元格样式 */
|
|
134126
|
+
setCellStyle(params) {
|
|
134127
|
+
if (params.data?.color) {
|
|
134128
|
+
return {
|
|
134129
|
+
color: params.data.color
|
|
134130
|
+
};
|
|
134131
|
+
}
|
|
134132
|
+
},
|
|
134133
|
+
/** 表格初始化 */
|
|
134134
|
+
onGridReady(params) {
|
|
134135
|
+
this.gridApi = params.api;
|
|
134136
|
+
},
|
|
134137
|
+
/** 编辑表格单元格值 */
|
|
134138
|
+
handleChangeValue(datas) {
|
|
134139
|
+
this.$emit('handleChangeCellValue', datas);
|
|
134140
|
+
},
|
|
134141
|
+
/**
|
|
134142
|
+
* 手动选中行
|
|
134143
|
+
* @params rows: 需要选中的行
|
|
134144
|
+
* @params field: 判断行中的字段
|
|
134145
|
+
* @params deselectAll: 是否先清空所有选中行
|
|
134146
|
+
* @params ensureIndexVisible: 选中行后是否需要滚动
|
|
134147
|
+
*/
|
|
134148
|
+
handleSelectRows(rows = [], field = 'id', deselectAll = false, ensureIndexVisible = false) {
|
|
134149
|
+
if (!this.gridApi) {
|
|
134150
|
+
return;
|
|
134151
|
+
}
|
|
134152
|
+
deselectAll && this.gridApi.deselectAll();
|
|
134153
|
+
const ids = rows.map(item => item[field]);
|
|
134154
|
+
this.gridApi.forEachNodeAfterFilter(node => {
|
|
134155
|
+
if (ids.indexOf(node.data[field]) !== -1) {
|
|
134156
|
+
node.setSelected(true);
|
|
134157
|
+
ensureIndexVisible && this.gridApi.ensureIndexVisible(node.rowIndex, 'middle');
|
|
134158
|
+
}
|
|
134159
|
+
});
|
|
134160
|
+
},
|
|
134161
|
+
/**
|
|
134162
|
+
* 滚动到指定行
|
|
134163
|
+
* @params row: 需要滚动到的行
|
|
134164
|
+
* @params field: 判断行中的字段
|
|
134165
|
+
* @params position: 滚动停靠的位置
|
|
134166
|
+
*/
|
|
134167
|
+
scrollToRow(row, field = 'id', position = 'middle') {
|
|
134168
|
+
if (!this.gridApi) {
|
|
134169
|
+
return;
|
|
134170
|
+
}
|
|
134171
|
+
const findData = (this.gridApi.getSelectedNodes() || []).find(d => d.data[field] === row[field]);
|
|
134172
|
+
if (findData) {
|
|
134173
|
+
this.gridApi.ensureIndexVisible(findData.rowIndex, position);
|
|
134174
|
+
}
|
|
134175
|
+
},
|
|
134176
|
+
/**
|
|
134177
|
+
* 滚动到选中行的第x行
|
|
134178
|
+
* @params index: 需要滚动到的行数
|
|
134179
|
+
* @params position: 滚动停靠的位置
|
|
134180
|
+
*/
|
|
134181
|
+
scrollToIndex(index = 1, position = 'middle') {
|
|
134182
|
+
if (!this.gridApi) {
|
|
134183
|
+
return;
|
|
134184
|
+
}
|
|
134185
|
+
this.gridApi.ensureIndexVisible(this.gridApi.getSelectedNodes()[index - 1].rowIndex, position);
|
|
134186
|
+
},
|
|
134187
|
+
/** 刷新 */
|
|
134188
|
+
refreshCells() {
|
|
134189
|
+
if (!this.gridApi) {
|
|
134190
|
+
return;
|
|
134191
|
+
}
|
|
134192
|
+
this.gridApi.refreshCells();
|
|
134193
|
+
}
|
|
134194
|
+
}
|
|
134195
|
+
});
|
|
134196
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
134197
|
+
/* harmony default export */ var tf_ag_grid_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
|
|
134198
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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&
|
|
134199
|
+
// extracted by mini-css-extract-plugin
|
|
134200
|
+
|
|
134201
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=style&index=0&id=a38dbbb8&prod&lang=scss&scoped=true&
|
|
134202
|
+
|
|
134203
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue
|
|
134204
|
+
|
|
134205
|
+
|
|
134206
|
+
|
|
134207
|
+
;
|
|
134208
|
+
|
|
134209
|
+
|
|
134210
|
+
/* normalize component */
|
|
134211
|
+
|
|
134212
|
+
var src_component = (0,componentNormalizer/* default */.Z)(
|
|
134213
|
+
tf_ag_grid_srcvue_type_script_lang_js_,
|
|
134214
|
+
render,
|
|
134215
|
+
staticRenderFns,
|
|
134216
|
+
false,
|
|
134217
|
+
null,
|
|
134218
|
+
"a38dbbb8",
|
|
134219
|
+
null
|
|
134220
|
+
|
|
134221
|
+
)
|
|
134222
|
+
|
|
134223
|
+
/* harmony default export */ var src = (src_component.exports);
|
|
134224
|
+
;// CONCATENATED MODULE: ./package/tf-ag-grid/index.js
|
|
134225
|
+
|
|
134226
|
+
src.install = function (Vue) {
|
|
134227
|
+
Vue.component(src.name, src);
|
|
134228
|
+
};
|
|
134229
|
+
/* harmony default export */ var tf_ag_grid = (src);
|
|
134230
|
+
|
|
134231
|
+
/***/ }),
|
|
134232
|
+
|
|
133374
134233
|
/***/ 75520:
|
|
133375
134234
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
133376
134235
|
|
|
@@ -136584,7 +137443,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
136584
137443
|
// EXTERNAL MODULE: ./src/utils/index.js
|
|
136585
137444
|
var utils = __webpack_require__(42325);
|
|
136586
137445
|
// EXTERNAL MODULE: ./src/directives/index.js + 69 modules
|
|
136587
|
-
var directives = __webpack_require__(
|
|
137446
|
+
var directives = __webpack_require__(90406);
|
|
136588
137447
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table/src/index.vue?vue&type=script&lang=js&
|
|
136589
137448
|
//
|
|
136590
137449
|
//
|
|
@@ -137319,7 +138178,7 @@ function getVoucherIds(data) {
|
|
|
137319
138178
|
|
|
137320
138179
|
/***/ }),
|
|
137321
138180
|
|
|
137322
|
-
/***/
|
|
138181
|
+
/***/ 90406:
|
|
137323
138182
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
137324
138183
|
|
|
137325
138184
|
"use strict";
|
|
@@ -139658,16 +140517,18 @@ const ElDialogDrag = {
|
|
|
139658
140517
|
fullScreen(el, binding, vNode);
|
|
139659
140518
|
}
|
|
139660
140519
|
};
|
|
139661
|
-
;// 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=
|
|
139662
|
-
var
|
|
139663
|
-
var
|
|
140520
|
+
;// 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&
|
|
140521
|
+
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)])}
|
|
140522
|
+
var settingvue_type_template_id_e45c9f3e_scoped_true_staticRenderFns = []
|
|
139664
140523
|
|
|
139665
140524
|
|
|
139666
|
-
;// 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=
|
|
139667
|
-
var
|
|
139668
|
-
var
|
|
140525
|
+
;// 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&
|
|
140526
|
+
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)])}
|
|
140527
|
+
var tf_setting_formvue_type_template_id_01be3b48_scoped_true_staticRenderFns = []
|
|
139669
140528
|
|
|
139670
140529
|
|
|
140530
|
+
// EXTERNAL MODULE: ./package/tf-ag-grid/index.js + 26 modules
|
|
140531
|
+
var tf_ag_grid = __webpack_require__(24495);
|
|
139671
140532
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=script&lang=js&
|
|
139672
140533
|
//
|
|
139673
140534
|
//
|
|
@@ -139701,10 +140562,6 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139701
140562
|
//
|
|
139702
140563
|
//
|
|
139703
140564
|
//
|
|
139704
|
-
//
|
|
139705
|
-
//
|
|
139706
|
-
//
|
|
139707
|
-
//
|
|
139708
140565
|
|
|
139709
140566
|
|
|
139710
140567
|
|
|
@@ -139712,7 +140569,7 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139712
140569
|
name: 'TFSettingForm',
|
|
139713
140570
|
components: {
|
|
139714
140571
|
TfButtonGroup: tf_button_group/* default */.Z,
|
|
139715
|
-
|
|
140572
|
+
TfAgGrid: tf_ag_grid/* default */.Z
|
|
139716
140573
|
},
|
|
139717
140574
|
props: {
|
|
139718
140575
|
configList: {
|
|
@@ -139744,18 +140601,18 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139744
140601
|
field: 'isShow',
|
|
139745
140602
|
headerName: '显隐切换',
|
|
139746
140603
|
suppressMovable: true,
|
|
139747
|
-
cellRenderer: '
|
|
140604
|
+
cellRenderer: 'TfInputCellRender',
|
|
139748
140605
|
cellRendererParams: {
|
|
139749
|
-
|
|
140606
|
+
type: 'switch'
|
|
139750
140607
|
},
|
|
139751
140608
|
width: 145
|
|
139752
140609
|
}, {
|
|
139753
140610
|
field: 'isFreeze',
|
|
139754
140611
|
headerName: '冻结',
|
|
139755
140612
|
suppressMovable: true,
|
|
139756
|
-
cellRenderer: '
|
|
140613
|
+
cellRenderer: 'TfInputCellRender',
|
|
139757
140614
|
cellRendererParams: {
|
|
139758
|
-
|
|
140615
|
+
type: 'switch'
|
|
139759
140616
|
},
|
|
139760
140617
|
width: 145
|
|
139761
140618
|
}],
|
|
@@ -139763,7 +140620,8 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139763
140620
|
selectRows: [],
|
|
139764
140621
|
searchContent: '',
|
|
139765
140622
|
saveLoading: false,
|
|
139766
|
-
|
|
140623
|
+
isShow: true,
|
|
140624
|
+
isFreeze: true
|
|
139767
140625
|
};
|
|
139768
140626
|
},
|
|
139769
140627
|
computed: {
|
|
@@ -139779,31 +140637,6 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139779
140637
|
initTableData() {
|
|
139780
140638
|
this.tableData = this.configList;
|
|
139781
140639
|
},
|
|
139782
|
-
/** 行拖拽排序, 支持同时选中多行拖拽 */
|
|
139783
|
-
rowDragEnd(params) {
|
|
139784
|
-
let tableData = JSON.parse(JSON.stringify(this.tableData));
|
|
139785
|
-
let moveType = 'moveUp';
|
|
139786
|
-
const defaultIndex = tableData.findIndex(item => item.field === params.nodes[0].data.field);
|
|
139787
|
-
if (params.overIndex < defaultIndex) {
|
|
139788
|
-
moveType = 'moveUp';
|
|
139789
|
-
} else if (params.overIndex > defaultIndex && params.nodes.length > 1) {
|
|
139790
|
-
moveType = 'moveDown';
|
|
139791
|
-
}
|
|
139792
|
-
params.nodes.forEach((node, nodeIndex) => {
|
|
139793
|
-
const index = tableData.findIndex(item => item.field === node.data.field);
|
|
139794
|
-
tableData.splice(index, 1);
|
|
139795
|
-
moveType === 'moveUp' ? tableData.splice(params.overIndex + nodeIndex, 0, node.data) : tableData.splice(params.overIndex + params.nodes.length - 1, 0, node.data);
|
|
139796
|
-
});
|
|
139797
|
-
this.tableData.splice(0, this.tableData.length, ...tableData);
|
|
139798
|
-
// 恢复选中
|
|
139799
|
-
setTimeout(() => {
|
|
139800
|
-
this.$refs.settingTable.gridApi.forEachNodeAfterFilter(node => {
|
|
139801
|
-
if (this.selectRows.find(row => row.field === node.data.field)) {
|
|
139802
|
-
node.setSelected(true);
|
|
139803
|
-
}
|
|
139804
|
-
});
|
|
139805
|
-
}, 500);
|
|
139806
|
-
},
|
|
139807
140640
|
/** 修改对应的值 */
|
|
139808
140641
|
handleChangeCellValue({
|
|
139809
140642
|
value,
|
|
@@ -139813,7 +140646,12 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139813
140646
|
if (item.field === params.data.field) {
|
|
139814
140647
|
item[params.column.colId] = value;
|
|
139815
140648
|
}
|
|
140649
|
+
// 这里是一段特殊逻辑:在冻结有子列的列时,将子列的属性也同步更新,否则冻结不生效
|
|
140650
|
+
if (params.column.colId === 'isFreeze' && item.originField === params.data.field) {
|
|
140651
|
+
item[params.column.colId] = value;
|
|
140652
|
+
}
|
|
139816
140653
|
});
|
|
140654
|
+
this.$refs.settingTable.gridApi.refreshCells();
|
|
139817
140655
|
},
|
|
139818
140656
|
handleSearchField() {
|
|
139819
140657
|
// 清空选中行
|
|
@@ -139830,15 +140668,16 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139830
140668
|
this.$refs.settingTable.selectedRows = [];
|
|
139831
140669
|
},
|
|
139832
140670
|
/** 操作 */
|
|
139833
|
-
|
|
140671
|
+
handlerButtons(option) {
|
|
139834
140672
|
switch (option) {
|
|
139835
140673
|
// 显隐切换
|
|
139836
140674
|
case 'showChange':
|
|
139837
140675
|
{
|
|
139838
140676
|
this.selectRows.forEach(item => {
|
|
139839
140677
|
const findIndex = this.tableData.findIndex(d => d.field === item.field);
|
|
139840
|
-
this.tableData[findIndex].isShow =
|
|
140678
|
+
this.tableData[findIndex].isShow = this.isShow;
|
|
139841
140679
|
});
|
|
140680
|
+
this.isShow = !this.isShow;
|
|
139842
140681
|
this.$refs.settingTable.gridApi.refreshCells();
|
|
139843
140682
|
break;
|
|
139844
140683
|
}
|
|
@@ -139846,13 +140685,17 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139846
140685
|
case 'freeze':
|
|
139847
140686
|
{
|
|
139848
140687
|
this.selectRows.forEach(item => {
|
|
139849
|
-
// 多表头下的列不允许固定列
|
|
139850
140688
|
if (item.isChild) {
|
|
139851
140689
|
return;
|
|
139852
140690
|
}
|
|
139853
|
-
const
|
|
139854
|
-
this.tableData
|
|
140691
|
+
const originField = item.field;
|
|
140692
|
+
const arr = this.tableData.filter(item => item.originField === originField);
|
|
140693
|
+
arr.map(item => {
|
|
140694
|
+
const findIndex = this.tableData.findIndex(d => d.field === item.field);
|
|
140695
|
+
this.tableData[findIndex].isFreeze = this.isFreeze;
|
|
140696
|
+
});
|
|
139855
140697
|
});
|
|
140698
|
+
this.isFreeze = !this.isFreeze;
|
|
139856
140699
|
this.$refs.settingTable.gridApi.refreshCells();
|
|
139857
140700
|
break;
|
|
139858
140701
|
}
|
|
@@ -139880,10 +140723,10 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139880
140723
|
});
|
|
139881
140724
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=script&lang=js&
|
|
139882
140725
|
/* harmony default export */ var components_setting_components_tf_setting_formvue_type_script_lang_js_ = (setting_components_tf_setting_formvue_type_script_lang_js_);
|
|
139883
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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=
|
|
140726
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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&
|
|
139884
140727
|
// extracted by mini-css-extract-plugin
|
|
139885
140728
|
|
|
139886
|
-
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=
|
|
140729
|
+
;// 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&
|
|
139887
140730
|
|
|
139888
140731
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/components/tf-setting-form/index.vue
|
|
139889
140732
|
|
|
@@ -139896,11 +140739,11 @@ var tf_setting_formvue_type_template_id_2f22581e_scoped_true_staticRenderFns = [
|
|
|
139896
140739
|
|
|
139897
140740
|
var components_tf_setting_form_component = (0,componentNormalizer/* default */.Z)(
|
|
139898
140741
|
components_setting_components_tf_setting_formvue_type_script_lang_js_,
|
|
139899
|
-
|
|
139900
|
-
|
|
140742
|
+
tf_setting_formvue_type_template_id_01be3b48_scoped_true_render,
|
|
140743
|
+
tf_setting_formvue_type_template_id_01be3b48_scoped_true_staticRenderFns,
|
|
139901
140744
|
false,
|
|
139902
140745
|
null,
|
|
139903
|
-
"
|
|
140746
|
+
"01be3b48",
|
|
139904
140747
|
null
|
|
139905
140748
|
|
|
139906
140749
|
)
|
|
@@ -139958,16 +140801,16 @@ var components_tf_setting_form_component = (0,componentNormalizer/* default */.Z
|
|
|
139958
140801
|
/** 关闭弹框前 */
|
|
139959
140802
|
close() {
|
|
139960
140803
|
this.dialogVisible = false;
|
|
139961
|
-
this.$refs.formSetting
|
|
140804
|
+
this.$refs.formSetting?.close();
|
|
139962
140805
|
}
|
|
139963
140806
|
}
|
|
139964
140807
|
});
|
|
139965
140808
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=script&lang=js&
|
|
139966
140809
|
/* harmony default export */ var components_settingvue_type_script_lang_js_ = (settingvue_type_script_lang_js_);
|
|
139967
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.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=
|
|
140810
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.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&
|
|
139968
140811
|
// extracted by mini-css-extract-plugin
|
|
139969
140812
|
|
|
139970
|
-
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=style&index=0&id=
|
|
140813
|
+
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue?vue&type=style&index=0&id=e45c9f3e&prod&lang=less&scoped=true&
|
|
139971
140814
|
|
|
139972
140815
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/components/setting/index.vue
|
|
139973
140816
|
|
|
@@ -139980,11 +140823,11 @@ var components_tf_setting_form_component = (0,componentNormalizer/* default */.Z
|
|
|
139980
140823
|
|
|
139981
140824
|
var setting_component = (0,componentNormalizer/* default */.Z)(
|
|
139982
140825
|
components_settingvue_type_script_lang_js_,
|
|
139983
|
-
|
|
139984
|
-
|
|
140826
|
+
settingvue_type_template_id_e45c9f3e_scoped_true_render,
|
|
140827
|
+
settingvue_type_template_id_e45c9f3e_scoped_true_staticRenderFns,
|
|
139985
140828
|
false,
|
|
139986
140829
|
null,
|
|
139987
|
-
"
|
|
140830
|
+
"e45c9f3e",
|
|
139988
140831
|
null
|
|
139989
140832
|
|
|
139990
140833
|
)
|
|
@@ -140068,7 +140911,7 @@ const agDefaultColumn = [{
|
|
|
140068
140911
|
suppressMovable: true,
|
|
140069
140912
|
headerName: '#',
|
|
140070
140913
|
headerComponent: 'TfAgGridSettingHeader',
|
|
140071
|
-
valueGetter: params => params.node ? params.node.rowIndex + 1 : null
|
|
140914
|
+
valueGetter: params => params.node ? !params.node.rowPinned ? params.node.rowIndex + 1 : params.data[params.column.colId] : null
|
|
140072
140915
|
}];
|
|
140073
140916
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/js/util.js
|
|
140074
140917
|
|
|
@@ -140105,6 +140948,19 @@ function saveTableConfig(el, binding, vNode) {
|
|
|
140105
140948
|
vm.tfAgGridSettingIntance.close();
|
|
140106
140949
|
});
|
|
140107
140950
|
}
|
|
140951
|
+
|
|
140952
|
+
/** 列排序方法 */
|
|
140953
|
+
function util_customSort(valueA, valueB, nodeA, nodeB, isDescending) {
|
|
140954
|
+
// 数字排序
|
|
140955
|
+
if (!isNaN(+valueA) && !isNaN(+valueB)) {
|
|
140956
|
+
const prev = !isNaN(+valueA) ? +valueA : 0;
|
|
140957
|
+
const next = !isNaN(+valueB) ? +valueB : 0;
|
|
140958
|
+
return Number(prev - next).toFixed(2);
|
|
140959
|
+
} else {
|
|
140960
|
+
// 非数字排序
|
|
140961
|
+
return (valueA || '').localeCompare(valueB || '');
|
|
140962
|
+
}
|
|
140963
|
+
}
|
|
140108
140964
|
;// CONCATENATED MODULE: ./src/directives/modules/ag-grid-setting/js/init.js
|
|
140109
140965
|
|
|
140110
140966
|
|
|
@@ -140188,12 +141044,14 @@ async function js_init_initTableConfigList(el, binding, vNode) {
|
|
|
140188
141044
|
const testField = (obj, field) => {
|
|
140189
141045
|
return obj && obj[field] !== undefined && obj[field] !== null;
|
|
140190
141046
|
};
|
|
140191
|
-
const deepConfigList = (arr, parentHeaderName = '', isChild) => {
|
|
141047
|
+
const deepConfigList = (arr, parentHeaderName = '', isChild, originField) => {
|
|
140192
141048
|
arr.forEach(item => {
|
|
140193
141049
|
const current = el.umyTableSetting.userConfigList.find(d => item.field && d.field === item.field) || {};
|
|
140194
141050
|
const currentName = parentHeaderName ? parentHeaderName + '-' + item.headerName : item.headerName;
|
|
140195
141051
|
configList.push({
|
|
140196
141052
|
field: item.field,
|
|
141053
|
+
// 该字段用来记录最外层列的字段
|
|
141054
|
+
originField: originField || item.field,
|
|
140197
141055
|
label: currentName,
|
|
140198
141056
|
isChild: isChild,
|
|
140199
141057
|
isShow: testField(current, 'isShow') ? current.isShow : true,
|
|
@@ -140201,10 +141059,10 @@ async function js_init_initTableConfigList(el, binding, vNode) {
|
|
|
140201
141059
|
fieldWidth: testField(current, 'fieldWidth') ? current.fieldWidth : item.width || 150,
|
|
140202
141060
|
fieldIndex: current.fieldIndex
|
|
140203
141061
|
});
|
|
140204
|
-
item.children && deepConfigList(item.children, currentName, true);
|
|
141062
|
+
item.children && deepConfigList(item.children, currentName, true, item.field);
|
|
140205
141063
|
});
|
|
140206
141064
|
};
|
|
140207
|
-
deepConfigList(tableInstance.columnDefs, '', false);
|
|
141065
|
+
deepConfigList(tableInstance.columnDefs, '', false, '');
|
|
140208
141066
|
// 先排序
|
|
140209
141067
|
configList.sort((a, b) => a.fieldIndex - b.fieldIndex);
|
|
140210
141068
|
// 重新生成序号
|
|
@@ -140225,14 +141083,19 @@ const js_init_reloadColumns = (el, binding, vNode) => {
|
|
|
140225
141083
|
arr[index].hide = !current.isShow;
|
|
140226
141084
|
arr[index].fieldIndex = current.fieldIndex;
|
|
140227
141085
|
arr[index].width = current.fieldWidth || 150;
|
|
141086
|
+
arr[index].comparator = arr[index].comparator || util_customSort;
|
|
140228
141087
|
arr[index].pinned = current.isFreeze ? 'left' : item.pinned === 'right' ? 'right' : null;
|
|
140229
|
-
arr[index].children
|
|
141088
|
+
if (arr[index].children) {
|
|
141089
|
+
// 此属性将子列捆绑,不允许单独拖拽
|
|
141090
|
+
arr[index].marryChildren = true;
|
|
141091
|
+
deepReloadColumn(item.children);
|
|
141092
|
+
}
|
|
140230
141093
|
});
|
|
141094
|
+
// 排序
|
|
141095
|
+
arr.sort((a, b) => a.fieldIndex - b.fieldIndex);
|
|
140231
141096
|
};
|
|
140232
141097
|
// 修改列配置
|
|
140233
141098
|
deepReloadColumn(newColumns);
|
|
140234
|
-
// 排序
|
|
140235
|
-
newColumns.sort((a, b) => a.fieldIndex - b.fieldIndex);
|
|
140236
141099
|
// 重新加载列配置
|
|
140237
141100
|
setNewColumns(el, newColumns);
|
|
140238
141101
|
};
|
|
@@ -140299,7 +141162,7 @@ const columnMoved = (el, binding, vNode) => {
|
|
|
140299
141162
|
});
|
|
140300
141163
|
};
|
|
140301
141164
|
|
|
140302
|
-
/**
|
|
141165
|
+
/** 根据当前表格列的排序, 重新生成配置信息 */
|
|
140303
141166
|
function generateTableConfigList(el, binding, vNode) {
|
|
140304
141167
|
const configList = [];
|
|
140305
141168
|
const deepConfigList = arr => {
|
|
@@ -259487,7 +260350,7 @@ var push_down_component = (0,componentNormalizer/* default */.Z)(
|
|
|
259487
260350
|
}
|
|
259488
260351
|
});
|
|
259489
260352
|
// EXTERNAL MODULE: ./src/directives/index.js + 69 modules
|
|
259490
|
-
var directives = __webpack_require__(
|
|
260353
|
+
var directives = __webpack_require__(90406);
|
|
259491
260354
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/t-data-list/main.vue?vue&type=script&lang=js&
|
|
259492
260355
|
//
|
|
259493
260356
|
//
|
|
@@ -261449,880 +262312,8 @@ tf_print_render_src.install = function (Vue) {
|
|
|
261449
262312
|
var tf_input = __webpack_require__(42479);
|
|
261450
262313
|
// EXTERNAL MODULE: ./package/tf-table/index.js + 12 modules
|
|
261451
262314
|
var tf_table = __webpack_require__(20335);
|
|
261452
|
-
|
|
261453
|
-
var
|
|
261454
|
-
var srcvue_type_template_id_3436a30c_scoped_true_staticRenderFns = []
|
|
261455
|
-
|
|
261456
|
-
|
|
261457
|
-
// EXTERNAL MODULE: ./node_modules/ag-grid-vue/main.js
|
|
261458
|
-
var ag_grid_vue_main = __webpack_require__(61146);
|
|
261459
|
-
;// 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&
|
|
261460
|
-
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)}
|
|
261461
|
-
var tf_filtervue_type_template_id_cfe194f2_scoped_true_staticRenderFns = []
|
|
261462
|
-
|
|
261463
|
-
|
|
261464
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
261465
|
-
|
|
261466
|
-
//
|
|
261467
|
-
//
|
|
261468
|
-
//
|
|
261469
|
-
//
|
|
261470
|
-
//
|
|
261471
|
-
//
|
|
261472
|
-
//
|
|
261473
|
-
//
|
|
261474
|
-
//
|
|
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
|
-
/* harmony default export */ var tf_filtervue_type_script_lang_js_ = ({
|
|
261563
|
-
components: {
|
|
261564
|
-
TfInput: tf_input/* default */.Z
|
|
261565
|
-
},
|
|
261566
|
-
directives: {
|
|
261567
|
-
Clickoutside: clickoutside/* default */.Z
|
|
261568
|
-
},
|
|
261569
|
-
props: {
|
|
261570
|
-
configData: {
|
|
261571
|
-
type: Object,
|
|
261572
|
-
default: () => {
|
|
261573
|
-
return {};
|
|
261574
|
-
}
|
|
261575
|
-
}
|
|
261576
|
-
},
|
|
261577
|
-
data() {
|
|
261578
|
-
return {
|
|
261579
|
-
searchData: {
|
|
261580
|
-
// 过滤时间
|
|
261581
|
-
time: {
|
|
261582
|
-
startTime: null,
|
|
261583
|
-
endTime: null
|
|
261584
|
-
},
|
|
261585
|
-
// 枚举类型
|
|
261586
|
-
selectList: [],
|
|
261587
|
-
// 选择输入框
|
|
261588
|
-
inputSelect: []
|
|
261589
|
-
},
|
|
261590
|
-
optionsList: [],
|
|
261591
|
-
inputSelectOptions: [],
|
|
261592
|
-
isClick: false,
|
|
261593
|
-
inputType: '',
|
|
261594
|
-
unClickOutside: false,
|
|
261595
|
-
text: '',
|
|
261596
|
-
order: '' // 排序规则
|
|
261597
|
-
};
|
|
261598
|
-
},
|
|
261599
|
-
|
|
261600
|
-
computed: {
|
|
261601
|
-
isFilter() {
|
|
261602
|
-
return JSON.stringify(this.searchData) !== JSON.stringify({
|
|
261603
|
-
time: {
|
|
261604
|
-
startTime: null,
|
|
261605
|
-
endTime: null
|
|
261606
|
-
},
|
|
261607
|
-
selectList: [],
|
|
261608
|
-
inputSelect: []
|
|
261609
|
-
});
|
|
261610
|
-
}
|
|
261611
|
-
},
|
|
261612
|
-
watch: {
|
|
261613
|
-
'searchData.time': {
|
|
261614
|
-
handler(newVal) {
|
|
261615
|
-
this.handleDateChange(newVal);
|
|
261616
|
-
},
|
|
261617
|
-
deep: true
|
|
261618
|
-
}
|
|
261619
|
-
},
|
|
261620
|
-
methods: {
|
|
261621
|
-
/**
|
|
261622
|
-
* params: 当前列对象
|
|
261623
|
-
* 排序
|
|
261624
|
-
*/
|
|
261625
|
-
onSortRequested(event) {
|
|
261626
|
-
if (this.order === '') {
|
|
261627
|
-
this.order = 'asc';
|
|
261628
|
-
} else if (this.order === 'asc') {
|
|
261629
|
-
this.order = 'desc';
|
|
261630
|
-
} else if (this.order === 'desc') {
|
|
261631
|
-
this.order = '';
|
|
261632
|
-
}
|
|
261633
|
-
this.params.setSort(this.order, event.shiftKey);
|
|
261634
|
-
},
|
|
261635
|
-
handleCancel() {
|
|
261636
|
-
if (this.inputType === 'inputSelect') {
|
|
261637
|
-
this.searchData[this.inputType] = [];
|
|
261638
|
-
this.text = '';
|
|
261639
|
-
}
|
|
261640
|
-
if (this.inputType === 'selectList') {
|
|
261641
|
-
this.searchData[this.inputType] = [];
|
|
261642
|
-
}
|
|
261643
|
-
if (this.inputType === 'time') {
|
|
261644
|
-
this.searchData[this.inputType] = {
|
|
261645
|
-
startTime: null,
|
|
261646
|
-
endTime: null
|
|
261647
|
-
};
|
|
261648
|
-
}
|
|
261649
|
-
this.handleSubmit();
|
|
261650
|
-
},
|
|
261651
|
-
/** 提交筛选 */
|
|
261652
|
-
handleSubmit() {
|
|
261653
|
-
this.isClick = false;
|
|
261654
|
-
this.params.context.componentParent.handleUpdateFilter({
|
|
261655
|
-
value: this.searchData[this.inputType],
|
|
261656
|
-
params: this.params
|
|
261657
|
-
});
|
|
261658
|
-
},
|
|
261659
|
-
handleClickOut(e) {
|
|
261660
|
-
this.isClick = false;
|
|
261661
|
-
},
|
|
261662
|
-
handleFilterClick() {
|
|
261663
|
-
this.isClick = !this.isClick;
|
|
261664
|
-
const fieldValueSet = this.params.context.componentParent.field2values();
|
|
261665
|
-
this.getSelectOption(fieldValueSet);
|
|
261666
|
-
},
|
|
261667
|
-
/** 处理日期的改变 */
|
|
261668
|
-
handleDateChange(value) {
|
|
261669
|
-
this.inputType = 'time';
|
|
261670
|
-
},
|
|
261671
|
-
/** 处理选中后的值发生变化 */
|
|
261672
|
-
handleSelect(item) {
|
|
261673
|
-
this.inputType = 'inputSelect';
|
|
261674
|
-
if (this.searchData.inputSelect.find(value => value.name === item.name)) {
|
|
261675
|
-
this.searchData.inputSelect = this.searchData.inputSelect.filter(value => value.name !== item.name);
|
|
261676
|
-
if (item.name.includes(this.text)) {
|
|
261677
|
-
this.inputSelectOptions.splice(item.index, 0, item);
|
|
261678
|
-
}
|
|
261679
|
-
return;
|
|
261680
|
-
}
|
|
261681
|
-
this.searchData.inputSelect.push(item);
|
|
261682
|
-
this.inputSelectOptions = this.inputSelectOptions.filter(value => value.name !== item.name);
|
|
261683
|
-
},
|
|
261684
|
-
/** 处理输入框值的变化 */
|
|
261685
|
-
handleInput(query) {
|
|
261686
|
-
this.text = query;
|
|
261687
|
-
if (query !== '') {
|
|
261688
|
-
this.inputSelectOptions = this.optionsList.filter(item => item.name.toLowerCase().includes(query.toLowerCase())).splice(0, 50);
|
|
261689
|
-
} else {
|
|
261690
|
-
const options = Array.from(this.optionsList);
|
|
261691
|
-
this.inputSelectOptions = options.filter(item => !this.searchData.inputSelect.find(value => value.name === item.name)).splice(0, 50);
|
|
261692
|
-
}
|
|
261693
|
-
},
|
|
261694
|
-
/** 处理枚举选中后的逻辑 */
|
|
261695
|
-
handleSelectClick(item) {
|
|
261696
|
-
this.inputType = 'selectList';
|
|
261697
|
-
const index = this.searchData.selectList.indexOf(item.name);
|
|
261698
|
-
if (index >= 0) {
|
|
261699
|
-
this.searchData.selectList.splice(index, 1);
|
|
261700
|
-
return;
|
|
261701
|
-
}
|
|
261702
|
-
this.searchData.selectList.push(item.name);
|
|
261703
|
-
},
|
|
261704
|
-
/** 获取枚举列表 */
|
|
261705
|
-
getSelectOption(fieldValueSet) {
|
|
261706
|
-
const optionsList = [];
|
|
261707
|
-
fieldValueSet[this.params.column.colId].forEach((item, index) => {
|
|
261708
|
-
if (item) {
|
|
261709
|
-
optionsList.push({
|
|
261710
|
-
index: index,
|
|
261711
|
-
name: item
|
|
261712
|
-
});
|
|
261713
|
-
}
|
|
261714
|
-
});
|
|
261715
|
-
this.optionsList = optionsList;
|
|
261716
|
-
// 默认展示前50条数据
|
|
261717
|
-
const options = Array.from(this.optionsList);
|
|
261718
|
-
this.inputSelectOptions = options.splice(0, 50);
|
|
261719
|
-
}
|
|
261720
|
-
}
|
|
261721
|
-
});
|
|
261722
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=script&lang=js&
|
|
261723
|
-
/* harmony default export */ var components_tf_filtervue_type_script_lang_js_ = (tf_filtervue_type_script_lang_js_);
|
|
261724
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.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&
|
|
261725
|
-
// extracted by mini-css-extract-plugin
|
|
261726
|
-
|
|
261727
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue?vue&type=style&index=0&id=cfe194f2&prod&lang=less&scoped=true&
|
|
261728
|
-
|
|
261729
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-filter/index.vue
|
|
261730
|
-
|
|
261731
|
-
|
|
261732
|
-
|
|
261733
|
-
;
|
|
261734
|
-
|
|
261735
|
-
|
|
261736
|
-
/* normalize component */
|
|
261737
|
-
|
|
261738
|
-
var tf_filter_component = (0,componentNormalizer/* default */.Z)(
|
|
261739
|
-
components_tf_filtervue_type_script_lang_js_,
|
|
261740
|
-
tf_filtervue_type_template_id_cfe194f2_scoped_true_render,
|
|
261741
|
-
tf_filtervue_type_template_id_cfe194f2_scoped_true_staticRenderFns,
|
|
261742
|
-
false,
|
|
261743
|
-
null,
|
|
261744
|
-
"cfe194f2",
|
|
261745
|
-
null
|
|
261746
|
-
|
|
261747
|
-
)
|
|
261748
|
-
|
|
261749
|
-
/* harmony default export */ var tf_filter = (tf_filter_component.exports);
|
|
261750
|
-
;// 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&
|
|
261751
|
-
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)}
|
|
261752
|
-
var tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns = []
|
|
261753
|
-
|
|
261754
|
-
|
|
261755
|
-
;// 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&
|
|
261756
|
-
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"})])])}
|
|
261757
|
-
var right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns = []
|
|
261758
|
-
|
|
261759
|
-
|
|
261760
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
261761
|
-
//
|
|
261762
|
-
//
|
|
261763
|
-
//
|
|
261764
|
-
//
|
|
261765
|
-
//
|
|
261766
|
-
//
|
|
261767
|
-
//
|
|
261768
|
-
//
|
|
261769
|
-
//
|
|
261770
|
-
//
|
|
261771
|
-
//
|
|
261772
|
-
//
|
|
261773
|
-
|
|
261774
|
-
/* harmony default export */ var right_menuvue_type_script_lang_js_ = ({
|
|
261775
|
-
props: {
|
|
261776
|
-
top: {
|
|
261777
|
-
type: Number,
|
|
261778
|
-
default: 0
|
|
261779
|
-
},
|
|
261780
|
-
left: {
|
|
261781
|
-
type: Number,
|
|
261782
|
-
default: 0
|
|
261783
|
-
},
|
|
261784
|
-
showMenu: {
|
|
261785
|
-
type: Boolean,
|
|
261786
|
-
default: false
|
|
261787
|
-
}
|
|
261788
|
-
},
|
|
261789
|
-
methods: {
|
|
261790
|
-
rightMenuClick(params) {
|
|
261791
|
-
this.$emit('rightMenuClick', params);
|
|
261792
|
-
this.closeRightMenu();
|
|
261793
|
-
},
|
|
261794
|
-
closeRightMenu() {
|
|
261795
|
-
this.$emit('update:showMenu', false);
|
|
261796
|
-
}
|
|
261797
|
-
}
|
|
261798
|
-
});
|
|
261799
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue?vue&type=script&lang=js&
|
|
261800
|
-
/* harmony default export */ var tf_cell_text_right_menuvue_type_script_lang_js_ = (right_menuvue_type_script_lang_js_);
|
|
261801
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.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&
|
|
261802
|
-
// extracted by mini-css-extract-plugin
|
|
261803
|
-
|
|
261804
|
-
;// 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&
|
|
261805
|
-
|
|
261806
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/right-menu.vue
|
|
261807
|
-
|
|
261808
|
-
|
|
261809
|
-
|
|
261810
|
-
;
|
|
261811
|
-
|
|
261812
|
-
|
|
261813
|
-
/* normalize component */
|
|
261814
|
-
|
|
261815
|
-
var right_menu_component = (0,componentNormalizer/* default */.Z)(
|
|
261816
|
-
tf_cell_text_right_menuvue_type_script_lang_js_,
|
|
261817
|
-
right_menuvue_type_template_id_479f04e0_scoped_true_render,
|
|
261818
|
-
right_menuvue_type_template_id_479f04e0_scoped_true_staticRenderFns,
|
|
261819
|
-
false,
|
|
261820
|
-
null,
|
|
261821
|
-
"479f04e0",
|
|
261822
|
-
null
|
|
261823
|
-
|
|
261824
|
-
)
|
|
261825
|
-
|
|
261826
|
-
/* harmony default export */ var right_menu = (right_menu_component.exports);
|
|
261827
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
261828
|
-
//
|
|
261829
|
-
//
|
|
261830
|
-
//
|
|
261831
|
-
//
|
|
261832
|
-
//
|
|
261833
|
-
//
|
|
261834
|
-
//
|
|
261835
|
-
//
|
|
261836
|
-
//
|
|
261837
|
-
//
|
|
261838
|
-
//
|
|
261839
|
-
//
|
|
261840
|
-
//
|
|
261841
|
-
|
|
261842
|
-
|
|
261843
|
-
|
|
261844
|
-
/* harmony default export */ var tf_cell_textvue_type_script_lang_js_ = ({
|
|
261845
|
-
components: {
|
|
261846
|
-
RightMenu: right_menu
|
|
261847
|
-
},
|
|
261848
|
-
directives: {
|
|
261849
|
-
Clickoutside: clickoutside/* default */.Z
|
|
261850
|
-
},
|
|
261851
|
-
data() {
|
|
261852
|
-
return {
|
|
261853
|
-
displayValue: '',
|
|
261854
|
-
rightMenuLeft: 0,
|
|
261855
|
-
rightMenuTop: 0,
|
|
261856
|
-
showRightMenu: false
|
|
261857
|
-
};
|
|
261858
|
-
},
|
|
261859
|
-
beforeMount() {
|
|
261860
|
-
// params: 当前操作单元格对象
|
|
261861
|
-
this.setInitialState(this.params);
|
|
261862
|
-
},
|
|
261863
|
-
methods: {
|
|
261864
|
-
setInitialState(params) {
|
|
261865
|
-
this.displayValue = params.value;
|
|
261866
|
-
},
|
|
261867
|
-
/** 右键点击 */
|
|
261868
|
-
rightClick($event) {
|
|
261869
|
-
this.rightMenuTop = $event.offsetY;
|
|
261870
|
-
// TODO: 这里的17是agcell的paddingLeft的值,若有样式调整,这里也要调整
|
|
261871
|
-
this.rightMenuLeft = $event.offsetX + 17;
|
|
261872
|
-
this.showRightMenu = true;
|
|
261873
|
-
},
|
|
261874
|
-
closeRightMenu() {
|
|
261875
|
-
this.showRightMenu = false;
|
|
261876
|
-
},
|
|
261877
|
-
dropdownCommand(command) {
|
|
261878
|
-
if (command === 'copy') {
|
|
261879
|
-
const input = document.createElement('input');
|
|
261880
|
-
input.value = this.displayValue;
|
|
261881
|
-
input.setAttribute('id', 'temp-input-id');
|
|
261882
|
-
document.body.appendChild(input);
|
|
261883
|
-
input.select();
|
|
261884
|
-
document.execCommand('copy');
|
|
261885
|
-
document.querySelector('#temp-input-id').remove();
|
|
261886
|
-
}
|
|
261887
|
-
}
|
|
261888
|
-
}
|
|
261889
|
-
});
|
|
261890
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue?vue&type=script&lang=js&
|
|
261891
|
-
/* harmony default export */ var components_tf_cell_textvue_type_script_lang_js_ = (tf_cell_textvue_type_script_lang_js_);
|
|
261892
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/components/tf-cell-text/index.vue
|
|
261893
|
-
|
|
261894
|
-
|
|
261895
|
-
|
|
261896
|
-
|
|
261897
|
-
|
|
261898
|
-
/* normalize component */
|
|
261899
|
-
;
|
|
261900
|
-
var tf_cell_text_component = (0,componentNormalizer/* default */.Z)(
|
|
261901
|
-
components_tf_cell_textvue_type_script_lang_js_,
|
|
261902
|
-
tf_cell_textvue_type_template_id_605b3b64_scoped_true_render,
|
|
261903
|
-
tf_cell_textvue_type_template_id_605b3b64_scoped_true_staticRenderFns,
|
|
261904
|
-
false,
|
|
261905
|
-
null,
|
|
261906
|
-
"605b3b64",
|
|
261907
|
-
null
|
|
261908
|
-
|
|
261909
|
-
)
|
|
261910
|
-
|
|
261911
|
-
/* harmony default export */ var tf_cell_text = (tf_cell_text_component.exports);
|
|
261912
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
261913
|
-
//
|
|
261914
|
-
//
|
|
261915
|
-
//
|
|
261916
|
-
//
|
|
261917
|
-
//
|
|
261918
|
-
//
|
|
261919
|
-
//
|
|
261920
|
-
//
|
|
261921
|
-
//
|
|
261922
|
-
//
|
|
261923
|
-
//
|
|
261924
|
-
//
|
|
261925
|
-
//
|
|
261926
|
-
//
|
|
261927
|
-
//
|
|
261928
|
-
//
|
|
261929
|
-
//
|
|
261930
|
-
//
|
|
261931
|
-
//
|
|
261932
|
-
//
|
|
261933
|
-
//
|
|
261934
|
-
//
|
|
261935
|
-
//
|
|
261936
|
-
//
|
|
261937
|
-
|
|
261938
|
-
|
|
261939
|
-
|
|
261940
|
-
|
|
261941
|
-
|
|
261942
|
-
|
|
261943
|
-
/* harmony default export */ var tf_ag_grid_srcvue_type_script_lang_js_ = ({
|
|
261944
|
-
name: 'TfAgGrid',
|
|
261945
|
-
/* eslint-disable */
|
|
261946
|
-
components: {
|
|
261947
|
-
AgGridVue: ag_grid_vue_main.AgGridVue,
|
|
261948
|
-
TfFilter: tf_filter,
|
|
261949
|
-
TfCellText: tf_cell_text
|
|
261950
|
-
},
|
|
261951
|
-
/* eslint-enable */
|
|
261952
|
-
directives: {
|
|
261953
|
-
agGridSetting: directives/* agGridSetting */.rn
|
|
261954
|
-
},
|
|
261955
|
-
props: {
|
|
261956
|
-
data: {
|
|
261957
|
-
type: Array,
|
|
261958
|
-
default: () => []
|
|
261959
|
-
},
|
|
261960
|
-
columns: {
|
|
261961
|
-
type: Array,
|
|
261962
|
-
default: () => []
|
|
261963
|
-
},
|
|
261964
|
-
// 表头字段对应的数据集
|
|
261965
|
-
fieldValueSet: {
|
|
261966
|
-
type: Object,
|
|
261967
|
-
default: () => {}
|
|
261968
|
-
},
|
|
261969
|
-
loading: {
|
|
261970
|
-
type: Boolean,
|
|
261971
|
-
default: false
|
|
261972
|
-
},
|
|
261973
|
-
// 表格合计
|
|
261974
|
-
totalData: {
|
|
261975
|
-
type: Array,
|
|
261976
|
-
default: () => ['合计']
|
|
261977
|
-
},
|
|
261978
|
-
// 是否开启行拖拽
|
|
261979
|
-
rowDragManaged: {
|
|
261980
|
-
type: Boolean,
|
|
261981
|
-
default: false
|
|
261982
|
-
},
|
|
261983
|
-
// 需配合rowDragManaged同时为true 行拖拽生效
|
|
261984
|
-
rowDragEntireRow: {
|
|
261985
|
-
type: Boolean,
|
|
261986
|
-
default: false
|
|
261987
|
-
},
|
|
261988
|
-
// 启用多行拖拽
|
|
261989
|
-
rowDragMultiRow: {
|
|
261990
|
-
type: Boolean,
|
|
261991
|
-
default: false
|
|
261992
|
-
},
|
|
261993
|
-
// 允许使用单击选择多行
|
|
261994
|
-
rowMultiSelectWithClick: {
|
|
261995
|
-
type: Boolean,
|
|
261996
|
-
default: false
|
|
261997
|
-
},
|
|
261998
|
-
// 用户自定义字段颜色方案列表
|
|
261999
|
-
personalFontColor: {
|
|
262000
|
-
type: Array,
|
|
262001
|
-
default: () => []
|
|
262002
|
-
},
|
|
262003
|
-
// 启用选中单元格文本
|
|
262004
|
-
enableCellTextSelection: {
|
|
262005
|
-
type: Boolean,
|
|
262006
|
-
default: true
|
|
262007
|
-
},
|
|
262008
|
-
enableBrowserTooltips: {
|
|
262009
|
-
type: Boolean,
|
|
262010
|
-
default: false
|
|
262011
|
-
},
|
|
262012
|
-
tooltipShowDelay: {
|
|
262013
|
-
type: Number,
|
|
262014
|
-
default: 100
|
|
262015
|
-
},
|
|
262016
|
-
tooltipHideDelay: {
|
|
262017
|
-
type: Number,
|
|
262018
|
-
default: 2000
|
|
262019
|
-
},
|
|
262020
|
-
entityTableName: {
|
|
262021
|
-
type: String,
|
|
262022
|
-
default: ''
|
|
262023
|
-
}
|
|
262024
|
-
},
|
|
262025
|
-
data() {
|
|
262026
|
-
return {
|
|
262027
|
-
tableRef: (0,utils/* randomRefName */.zs)(15),
|
|
262028
|
-
currentRow: null,
|
|
262029
|
-
// 当前选中的行
|
|
262030
|
-
selectedRows: [],
|
|
262031
|
-
// 选中的列
|
|
262032
|
-
context: {},
|
|
262033
|
-
gridApi: null,
|
|
262034
|
-
columnApi: null,
|
|
262035
|
-
// 绑定默认列属性
|
|
262036
|
-
defaultColDef: {
|
|
262037
|
-
sortable: true,
|
|
262038
|
-
resizable: true,
|
|
262039
|
-
// 禁止通过拖动列来固定列
|
|
262040
|
-
lockPinned: true,
|
|
262041
|
-
cellRenderer: 'TfCellText',
|
|
262042
|
-
cellStyle: this.setCellStyle,
|
|
262043
|
-
headerComponent: 'TfFilter'
|
|
262044
|
-
},
|
|
262045
|
-
// 过滤条件
|
|
262046
|
-
filterOption: {},
|
|
262047
|
-
// 过滤后的数据
|
|
262048
|
-
filteredData: [],
|
|
262049
|
-
// 没有数据的提示
|
|
262050
|
-
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>',
|
|
262051
|
-
rowHeight: 35,
|
|
262052
|
-
headerHeight: 35
|
|
262053
|
-
};
|
|
262054
|
-
},
|
|
262055
|
-
computed: {
|
|
262056
|
-
customAttrs: function () {
|
|
262057
|
-
return {
|
|
262058
|
-
// 选中模式:多选|单选
|
|
262059
|
-
'row-selection': 'multiple',
|
|
262060
|
-
// 内容行高
|
|
262061
|
-
'row-height': this.rowHeight,
|
|
262062
|
-
// 表头行高
|
|
262063
|
-
'header-height': this.headerHeight,
|
|
262064
|
-
// 允许单击选择多行
|
|
262065
|
-
'row-multi-select-with-click': this.rowMultiSelectWithClick,
|
|
262066
|
-
// 默认列定义
|
|
262067
|
-
'default-col-def': this.defaultColDef,
|
|
262068
|
-
// 启用行拖拽
|
|
262069
|
-
'row-drag-managed': this.rowDragManaged,
|
|
262070
|
-
// 允许在行上的任意位置单击拖动
|
|
262071
|
-
'row-drag-entire-row': this.rowDragEntireRow,
|
|
262072
|
-
// 允许同时拖动多行
|
|
262073
|
-
'row-drag-multi-row': this.rowDragMultiRow,
|
|
262074
|
-
// 空数据提示
|
|
262075
|
-
'overlay-no-rows-template': this.overlayNoRowsTemplate,
|
|
262076
|
-
// 启用选中单元格文本
|
|
262077
|
-
'enable-cell-text-selection': this.enableCellTextSelection,
|
|
262078
|
-
// 悬浮文本显示需要的延迟
|
|
262079
|
-
'tooltip-show-delay': this.tooltipShowDelay,
|
|
262080
|
-
// 悬浮文本隐藏需要的延迟
|
|
262081
|
-
'tooltip-hide-delay': this.tooltipHideDelay,
|
|
262082
|
-
// 启用行动画
|
|
262083
|
-
'animate-rows': true,
|
|
262084
|
-
// 允许跨行(表格启用rowSpan时需要开启此属性)
|
|
262085
|
-
'suppress-row-transform': true,
|
|
262086
|
-
// 禁用colDef属性检查引起的控制台警告信息
|
|
262087
|
-
'suppress-property-names-check': true,
|
|
262088
|
-
// 关闭列移动动画(适配低性能)
|
|
262089
|
-
'suppress-column-move-animation': true,
|
|
262090
|
-
// 启用浏览器的默认工具提示,而不是网格的工具提示组件
|
|
262091
|
-
'enable-browser-tooltips': this.enableBrowserTooltips,
|
|
262092
|
-
...this.$attrs
|
|
262093
|
-
};
|
|
262094
|
-
}
|
|
262095
|
-
},
|
|
262096
|
-
watch: {
|
|
262097
|
-
data(newVal) {
|
|
262098
|
-
this.filterMethod();
|
|
262099
|
-
},
|
|
262100
|
-
totalData: {
|
|
262101
|
-
handler(newVal) {
|
|
262102
|
-
this.getSummaries();
|
|
262103
|
-
}
|
|
262104
|
-
}
|
|
262105
|
-
},
|
|
262106
|
-
/** 给表格绑定上下文, 绑定父组件的 this */
|
|
262107
|
-
beforeMount() {
|
|
262108
|
-
this.context = {
|
|
262109
|
-
componentParent: this
|
|
262110
|
-
};
|
|
262111
|
-
const height = window.screen.height;
|
|
262112
|
-
if (height !== 1080) {
|
|
262113
|
-
this.rowHeight = (height / 1080 * 35).toFixed(0);
|
|
262114
|
-
this.headerHeight = this.rowHeight;
|
|
262115
|
-
}
|
|
262116
|
-
},
|
|
262117
|
-
methods: {
|
|
262118
|
-
/** 获取行号 */
|
|
262119
|
-
hashValueGetter(params) {
|
|
262120
|
-
return params.node ? params.node.rowIndex + 1 : null;
|
|
262121
|
-
},
|
|
262122
|
-
/** 表格合计 */
|
|
262123
|
-
getSummaries() {
|
|
262124
|
-
const summaryRowData = {};
|
|
262125
|
-
this.columns.forEach((item, index) => {
|
|
262126
|
-
if (index === 0) {
|
|
262127
|
-
summaryRowData[item.field] = '合计';
|
|
262128
|
-
} else if (this.totalData[index + 1]) {
|
|
262129
|
-
summaryRowData[item.field] = this.totalData[index + 1];
|
|
262130
|
-
} else {
|
|
262131
|
-
summaryRowData[item.field] = '';
|
|
262132
|
-
}
|
|
262133
|
-
});
|
|
262134
|
-
this.gridApi.setPinnedBottomRowData([summaryRowData]);
|
|
262135
|
-
},
|
|
262136
|
-
/**
|
|
262137
|
-
* @param{
|
|
262138
|
-
* value: "输入的值",
|
|
262139
|
-
* configData:"在哪一列"
|
|
262140
|
-
* }
|
|
262141
|
-
*/
|
|
262142
|
-
handleUpdateFilter({
|
|
262143
|
-
value,
|
|
262144
|
-
params
|
|
262145
|
-
}) {
|
|
262146
|
-
this.filterOption[params.column.colId] = {
|
|
262147
|
-
...params,
|
|
262148
|
-
value
|
|
262149
|
-
};
|
|
262150
|
-
this.filterMethod();
|
|
262151
|
-
},
|
|
262152
|
-
/** 过滤条件方法 */
|
|
262153
|
-
filterMethod() {
|
|
262154
|
-
const result = this.data.filter(e => {
|
|
262155
|
-
const keyArr = Object.keys(e);
|
|
262156
|
-
let isFilter = true;
|
|
262157
|
-
keyArr.some(key => {
|
|
262158
|
-
// 数据存在时执行
|
|
262159
|
-
if (!!key && e[key] && this.filterOption[key]?.value) {
|
|
262160
|
-
// 时间类型的筛选
|
|
262161
|
-
if (['date', 'dateTime'].includes(this.filterOption[key].fieldType)) {
|
|
262162
|
-
if (e[key] < this.filterOption[key].value.startTime || e[key] > this.filterOption[key].value.endTime) {
|
|
262163
|
-
isFilter = false;
|
|
262164
|
-
}
|
|
262165
|
-
return !isFilter;
|
|
262166
|
-
}
|
|
262167
|
-
//枚举数据过滤
|
|
262168
|
-
if (this.filterOption[key].fieldType === 'select') {
|
|
262169
|
-
if (this.filterOption[key].value.length > 0 && !this.filterOption[key].value.includes(e[key])) {
|
|
262170
|
-
isFilter = false;
|
|
262171
|
-
}
|
|
262172
|
-
return !isFilter;
|
|
262173
|
-
}
|
|
262174
|
-
// 文本数据过滤
|
|
262175
|
-
if (this.filterOption[key].value.length > 0) {
|
|
262176
|
-
const values = this.filterOption[key].value.filter(item => e[key].includes(item.name));
|
|
262177
|
-
if (!values.length) {
|
|
262178
|
-
isFilter = false;
|
|
262179
|
-
}
|
|
262180
|
-
}
|
|
262181
|
-
return !isFilter;
|
|
262182
|
-
}
|
|
262183
|
-
});
|
|
262184
|
-
return isFilter;
|
|
262185
|
-
});
|
|
262186
|
-
// this.filteredData.splice(0)
|
|
262187
|
-
// this.filteredData = [...result]
|
|
262188
|
-
this.filteredData = result;
|
|
262189
|
-
},
|
|
262190
|
-
/** 表格选择项change事件 */
|
|
262191
|
-
selectionChange() {
|
|
262192
|
-
this.selectedRows = this.gridApi.getSelectedRows();
|
|
262193
|
-
this.$emit('selection-changed', this.selectedRows);
|
|
262194
|
-
},
|
|
262195
|
-
/** 列的宽度调整的事件的回调 */
|
|
262196
|
-
columnResized(params) {
|
|
262197
|
-
const {
|
|
262198
|
-
column
|
|
262199
|
-
} = params;
|
|
262200
|
-
this.$emit('column-resized', column);
|
|
262201
|
-
},
|
|
262202
|
-
/** 拖动停止,此事件包含列移动,列调整大小等 */
|
|
262203
|
-
dragStopped(params) {
|
|
262204
|
-
this.$emit('drag-stopped', params);
|
|
262205
|
-
},
|
|
262206
|
-
/** 列移动排序 */
|
|
262207
|
-
columnMoved(params) {
|
|
262208
|
-
this.$emit('column-moved', params);
|
|
262209
|
-
},
|
|
262210
|
-
/** 行拖拽结束后 */
|
|
262211
|
-
rowDragEnd(params) {
|
|
262212
|
-
this.$emit('row-drag-end', params);
|
|
262213
|
-
},
|
|
262214
|
-
/** 单元格单击事件 */
|
|
262215
|
-
cellClick(params) {
|
|
262216
|
-
const data = params;
|
|
262217
|
-
this.$emit('cell-clicked', data);
|
|
262218
|
-
},
|
|
262219
|
-
/** 行选中事件 */
|
|
262220
|
-
rowSelected({
|
|
262221
|
-
node,
|
|
262222
|
-
data
|
|
262223
|
-
}) {
|
|
262224
|
-
const currentNode = node;
|
|
262225
|
-
// 合并表格的时候处理选中 合并行 高亮
|
|
262226
|
-
if (this.columns.find(item => item.field.startsWith('entity__'))) {
|
|
262227
|
-
this.gridApi.forEachNodeAfterFilter(node => {
|
|
262228
|
-
// node节点对应的数据id 与当前点击 行data.id相同,设置合并行(主表一行数据对应多行子表数据)选中||取消
|
|
262229
|
-
if (node.data.id === data.id) {
|
|
262230
|
-
node.setSelected(currentNode.isSelected());
|
|
262231
|
-
}
|
|
262232
|
-
});
|
|
262233
|
-
}
|
|
262234
|
-
if (this.lastCurrentRow && this.lastCurrentRow.id === data.id || !currentNode.isSelected()) {
|
|
262235
|
-
return;
|
|
262236
|
-
}
|
|
262237
|
-
this.lastCurrentRow = data;
|
|
262238
|
-
this.currentRow = data;
|
|
262239
|
-
this.$emit('row-selected', data);
|
|
262240
|
-
},
|
|
262241
|
-
/** 单元格双击事件 */
|
|
262242
|
-
cellDBLClick({
|
|
262243
|
-
data
|
|
262244
|
-
}) {
|
|
262245
|
-
if (data.checkout === '合计') {
|
|
262246
|
-
return;
|
|
262247
|
-
}
|
|
262248
|
-
this.$emit('cell-double-clicked', data);
|
|
262249
|
-
},
|
|
262250
|
-
/** 单元格样式 */
|
|
262251
|
-
setCellStyle(params) {
|
|
262252
|
-
if (params.data.color) {
|
|
262253
|
-
return {
|
|
262254
|
-
color: params.data.color
|
|
262255
|
-
};
|
|
262256
|
-
}
|
|
262257
|
-
},
|
|
262258
|
-
/** 表格初始化 */
|
|
262259
|
-
onGridReady(params) {
|
|
262260
|
-
this.gridApi = params.api;
|
|
262261
|
-
},
|
|
262262
|
-
/** 编辑表格单元格值 */
|
|
262263
|
-
handleChangeValue(datas) {
|
|
262264
|
-
this.$emit('handleChangeCellValue', datas);
|
|
262265
|
-
},
|
|
262266
|
-
/** 行移动排序: 置顶; 恢复默认值 */
|
|
262267
|
-
sortRow(datas) {
|
|
262268
|
-
if (!datas.overIndex) {
|
|
262269
|
-
if (datas.type && datas.type === 'top') {
|
|
262270
|
-
datas.overIndex = 1;
|
|
262271
|
-
} else {
|
|
262272
|
-
datas.overIndex = datas.params.data.fieldIndex;
|
|
262273
|
-
}
|
|
262274
|
-
}
|
|
262275
|
-
this.$emit('sortRow', datas);
|
|
262276
|
-
},
|
|
262277
|
-
/** 手动选中行 */
|
|
262278
|
-
handleSelectRows(ids) {
|
|
262279
|
-
this.gridApi.forEachNodeAfterFilter(node => {
|
|
262280
|
-
if (ids.indexOf(node.data.id) !== -1) {
|
|
262281
|
-
node.setSelected(true);
|
|
262282
|
-
this.gridApi.ensureIndexVisible(node.rowIndex, 'middle');
|
|
262283
|
-
}
|
|
262284
|
-
});
|
|
262285
|
-
},
|
|
262286
|
-
/** 滚动到选中的第一行 */
|
|
262287
|
-
scrollToSelect() {
|
|
262288
|
-
this.gridApi.ensureIndexVisible(this.gridApi.getSelectedNodes()[0].rowIndex, 'middle');
|
|
262289
|
-
}
|
|
262290
|
-
}
|
|
262291
|
-
});
|
|
262292
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=script&lang=js&
|
|
262293
|
-
/* harmony default export */ var package_tf_ag_grid_srcvue_type_script_lang_js_ = (tf_ag_grid_srcvue_type_script_lang_js_);
|
|
262294
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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&
|
|
262295
|
-
// extracted by mini-css-extract-plugin
|
|
262296
|
-
|
|
262297
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue?vue&type=style&index=0&id=3436a30c&prod&lang=scss&scoped=true&
|
|
262298
|
-
|
|
262299
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/src/index.vue
|
|
262300
|
-
|
|
262301
|
-
|
|
262302
|
-
|
|
262303
|
-
;
|
|
262304
|
-
|
|
262305
|
-
|
|
262306
|
-
/* normalize component */
|
|
262307
|
-
|
|
262308
|
-
var tf_ag_grid_src_component = (0,componentNormalizer/* default */.Z)(
|
|
262309
|
-
package_tf_ag_grid_srcvue_type_script_lang_js_,
|
|
262310
|
-
srcvue_type_template_id_3436a30c_scoped_true_render,
|
|
262311
|
-
srcvue_type_template_id_3436a30c_scoped_true_staticRenderFns,
|
|
262312
|
-
false,
|
|
262313
|
-
null,
|
|
262314
|
-
"3436a30c",
|
|
262315
|
-
null
|
|
262316
|
-
|
|
262317
|
-
)
|
|
262318
|
-
|
|
262319
|
-
/* harmony default export */ var tf_ag_grid_src = (tf_ag_grid_src_component.exports);
|
|
262320
|
-
;// CONCATENATED MODULE: ./package/tf-ag-grid/index.js
|
|
262321
|
-
|
|
262322
|
-
tf_ag_grid_src.install = function (Vue) {
|
|
262323
|
-
Vue.component(tf_ag_grid_src.name, tf_ag_grid_src);
|
|
262324
|
-
};
|
|
262325
|
-
/* harmony default export */ var tf_ag_grid = (tf_ag_grid_src);
|
|
262315
|
+
// EXTERNAL MODULE: ./package/tf-ag-grid/index.js + 26 modules
|
|
262316
|
+
var tf_ag_grid = __webpack_require__(24495);
|
|
262326
262317
|
;// 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&
|
|
262327
262318
|
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)}
|
|
262328
262319
|
var srcvue_type_template_id_38f78afd_scoped_true_staticRenderFns = []
|
|
@@ -265393,7 +265384,7 @@ var tf_basic_table_list = __webpack_require__(75520);
|
|
|
265393
265384
|
|
|
265394
265385
|
|
|
265395
265386
|
|
|
265396
|
-
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];
|
|
265387
|
+
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];
|
|
265397
265388
|
const install = function (Vue) {
|
|
265398
265389
|
components.forEach(component => {
|
|
265399
265390
|
Vue.component(component.name, component);
|