@tongfun/tf-widget 0.1.98 → 0.1.99
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 +159 -66
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +159 -66
- package/lib/tf-widget.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/tf-widget.common.js
CHANGED
|
@@ -144215,8 +144215,10 @@ function download(fileName, data) {
|
|
|
144215
144215
|
this.initTable();
|
|
144216
144216
|
},
|
|
144217
144217
|
activated: function activated() {
|
|
144218
|
-
|
|
144219
|
-
|
|
144218
|
+
try {
|
|
144219
|
+
document.querySelector('.ag-body-viewport').addEventListener('scroll', (0,utils/* debounceFun */.u1)(this.scrollFn));
|
|
144220
|
+
document.querySelector('.ag-body-viewport').scrollTop = this.scrollTop; // eslint-disable-next-line no-empty
|
|
144221
|
+
} catch (e) {}
|
|
144220
144222
|
},
|
|
144221
144223
|
deactivated: function deactivated() {
|
|
144222
144224
|
window.removeEventListener('scroll', this.scrollFn);
|
|
@@ -144730,7 +144732,7 @@ function download(fileName, data) {
|
|
|
144730
144732
|
return _this10.operationCommand(tf_table/* commit */.th, '提交', ids);
|
|
144731
144733
|
|
|
144732
144734
|
case 6:
|
|
144733
|
-
_context8.next =
|
|
144735
|
+
_context8.next = 19;
|
|
144734
144736
|
break;
|
|
144735
144737
|
|
|
144736
144738
|
case 8:
|
|
@@ -144743,7 +144745,7 @@ function download(fileName, data) {
|
|
|
144743
144745
|
return _this10.operationCommand(tf_table/* check */.BF, '审核', ids);
|
|
144744
144746
|
|
|
144745
144747
|
case 11:
|
|
144746
|
-
_context8.next =
|
|
144748
|
+
_context8.next = 19;
|
|
144747
144749
|
break;
|
|
144748
144750
|
|
|
144749
144751
|
case 13:
|
|
@@ -144756,22 +144758,51 @@ function download(fileName, data) {
|
|
|
144756
144758
|
return _this10.operationCommand(tf_table/* checkReverse */.P9, '反审核', ids);
|
|
144757
144759
|
|
|
144758
144760
|
case 16:
|
|
144759
|
-
_context8.next =
|
|
144761
|
+
_context8.next = 19;
|
|
144760
144762
|
break;
|
|
144761
144763
|
|
|
144762
144764
|
case 18:
|
|
144763
|
-
if (
|
|
144764
|
-
|
|
144765
|
-
|
|
144766
|
-
|
|
144765
|
+
if (command === 'delete') {
|
|
144766
|
+
_this10.$confirm('确认审核吗?', '提示', {
|
|
144767
|
+
confirmButtonText: '确定',
|
|
144768
|
+
cancelButtonText: '取消',
|
|
144769
|
+
type: 'warning'
|
|
144770
|
+
}).then(function () {
|
|
144771
|
+
var loading = _this10.$loading({
|
|
144772
|
+
lock: true,
|
|
144773
|
+
text: 'Loading',
|
|
144774
|
+
spinner: 'el-icon-loading',
|
|
144775
|
+
background: 'rgba(0, 0, 0, 0.7)'
|
|
144776
|
+
});
|
|
144767
144777
|
|
|
144768
|
-
|
|
144769
|
-
|
|
144778
|
+
var data = {
|
|
144779
|
+
deleteIds: ids,
|
|
144780
|
+
code: _this10.code
|
|
144781
|
+
};
|
|
144782
|
+
(0,tf_table/* deleted */.z2)(data).then(function (res) {
|
|
144783
|
+
if (res.code === 0) {
|
|
144784
|
+
_this10.$message.success('删除成功!'); // 刷新表格数据
|
|
144770
144785
|
|
|
144771
|
-
|
|
144786
|
+
|
|
144787
|
+
_this10.refreshData();
|
|
144788
|
+
} else {
|
|
144789
|
+
_this10.$message.warning(res.errorMsg || '删除失败,请稍后重试!');
|
|
144790
|
+
}
|
|
144791
|
+
|
|
144792
|
+
loading.close();
|
|
144793
|
+
}).catch(function () {
|
|
144794
|
+
_this10.$message.warning('删除失败,请稍后重试!');
|
|
144795
|
+
|
|
144796
|
+
loading.close();
|
|
144797
|
+
});
|
|
144798
|
+
}); // await this.operationCommand(deleted, '删除', ids)
|
|
144799
|
+
|
|
144800
|
+
}
|
|
144801
|
+
|
|
144802
|
+
case 19:
|
|
144772
144803
|
_this10.loadingObj[command + 'Loading'] = false;
|
|
144773
144804
|
|
|
144774
|
-
case
|
|
144805
|
+
case 20:
|
|
144775
144806
|
case "end":
|
|
144776
144807
|
return _context8.stop();
|
|
144777
144808
|
}
|
|
@@ -238140,9 +238171,9 @@ var tf_settingvue_type_template_id_2b5c0bbe_scoped_true_render = function () {va
|
|
|
238140
238171
|
var tf_settingvue_type_template_id_2b5c0bbe_scoped_true_staticRenderFns = []
|
|
238141
238172
|
|
|
238142
238173
|
|
|
238143
|
-
;// 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-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=template&id=
|
|
238144
|
-
var
|
|
238145
|
-
var
|
|
238174
|
+
;// 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-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=template&id=3c8f0d24&scoped=true&
|
|
238175
|
+
var tf_setting_formvue_type_template_id_3c8f0d24_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:{"placeholder":"搜索字段名称"},on:{"change":_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',[_vm._t("showChange",function(){return [_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('showChange')}}},[_vm._v("显示切换")])]}),_vm._t("fixedChange",function(){return [_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('freeze')}}},[_vm._v("冻结固定")])]}),_vm._t("recover",function(){return [_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('recover')}}},[_vm._v("恢复默认")])]}),_vm._t("save",function(){return [_c('el-button',{attrs:{"type":"primary","size":"mini","loading":_vm.saveLoading},on:{"click":function($event){return _vm.handlerButtons('save')}}},[_vm._v("保存")])]}),_vm._t("close",function(){return [_c('el-button',{attrs:{"type":"danger","size":"mini"},on:{"click":function($event){return _vm.handlerButtons('close')}}},[_vm._v("关闭")])]})],2)],1),_c('div',{staticClass:"tf-common-table"},[_c('TfAgGridTable',{ref:"settingTable",attrs:{"columns":_vm.mainColumns,"table-data":_vm.tableData,"row-drag-managed":true,"row-drag-entire-row":true,"row-drag-multi-row":true},on:{"rowDragEnd":_vm.rowDragEnd,"handleChangeCellValue":_vm.handleChangeCellValue,"sortRow":_vm.sortRow,"selectChange":_vm.selectChange}})],1)])}
|
|
238176
|
+
var tf_setting_formvue_type_template_id_3c8f0d24_scoped_true_staticRenderFns = []
|
|
238146
238177
|
|
|
238147
238178
|
|
|
238148
238179
|
// EXTERNAL MODULE: ./package/tf-ag-grid-table/index.js + 22 modules
|
|
@@ -238158,6 +238189,8 @@ var tf_ag_grid_table = __webpack_require__(5738);
|
|
|
238158
238189
|
|
|
238159
238190
|
|
|
238160
238191
|
|
|
238192
|
+
|
|
238193
|
+
|
|
238161
238194
|
//
|
|
238162
238195
|
//
|
|
238163
238196
|
//
|
|
@@ -238439,76 +238472,136 @@ var tf_ag_grid_table = __webpack_require__(5738);
|
|
|
238439
238472
|
handlerButtons: function handlerButtons(option) {
|
|
238440
238473
|
var _this3 = this;
|
|
238441
238474
|
|
|
238442
|
-
|
|
238443
|
-
|
|
238444
|
-
{
|
|
238445
|
-
|
|
238446
|
-
|
|
238447
|
-
|
|
238475
|
+
return (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee() {
|
|
238476
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
|
|
238477
|
+
while (1) {
|
|
238478
|
+
switch (_context.prev = _context.next) {
|
|
238479
|
+
case 0:
|
|
238480
|
+
_context.t0 = option;
|
|
238481
|
+
_context.next = _context.t0 === 'close' ? 3 : _context.t0 === 'showChange' ? 5 : _context.t0 === 'freeze' ? 8 : _context.t0 === 'recover' ? 11 : _context.t0 === 'save' ? 13 : 20;
|
|
238482
|
+
break;
|
|
238448
238483
|
|
|
238449
|
-
|
|
238450
|
-
|
|
238451
|
-
this.tableData.map(function (item) {
|
|
238452
|
-
if (_this3.selectRows.find(function (row) {
|
|
238453
|
-
return row.field === item.field;
|
|
238454
|
-
})) {
|
|
238455
|
-
item.isShow = !item.isShow;
|
|
238456
|
-
}
|
|
238457
|
-
});
|
|
238458
|
-
this.$refs.settingTable.gridApi.refreshCells();
|
|
238459
|
-
break;
|
|
238460
|
-
}
|
|
238484
|
+
case 3:
|
|
238485
|
+
_this3.$emit('close');
|
|
238461
238486
|
|
|
238462
|
-
|
|
238463
|
-
{
|
|
238464
|
-
this.tableData.map(function (item) {
|
|
238465
|
-
if (_this3.selectRows.find(function (row) {
|
|
238466
|
-
return row.field === item.field;
|
|
238467
|
-
})) {
|
|
238468
|
-
item.isFreeze = !item.isFreeze;
|
|
238469
|
-
}
|
|
238470
|
-
});
|
|
238471
|
-
this.$refs.settingTable.gridApi.refreshCells();
|
|
238472
|
-
break;
|
|
238473
|
-
}
|
|
238487
|
+
return _context.abrupt("break", 20);
|
|
238474
238488
|
|
|
238475
|
-
|
|
238476
|
-
|
|
238477
|
-
|
|
238478
|
-
|
|
238479
|
-
|
|
238489
|
+
case 5:
|
|
238490
|
+
_this3.tableData.map(function (item) {
|
|
238491
|
+
if (_this3.selectRows.find(function (row) {
|
|
238492
|
+
return row.field === item.field;
|
|
238493
|
+
})) {
|
|
238494
|
+
item.isShow = !item.isShow;
|
|
238495
|
+
}
|
|
238496
|
+
});
|
|
238480
238497
|
|
|
238481
|
-
|
|
238482
|
-
|
|
238483
|
-
|
|
238484
|
-
|
|
238485
|
-
|
|
238486
|
-
|
|
238487
|
-
|
|
238488
|
-
|
|
238498
|
+
_this3.$refs.settingTable.gridApi.refreshCells();
|
|
238499
|
+
|
|
238500
|
+
return _context.abrupt("break", 20);
|
|
238501
|
+
|
|
238502
|
+
case 8:
|
|
238503
|
+
_this3.tableData.map(function (item) {
|
|
238504
|
+
if (_this3.selectRows.find(function (row) {
|
|
238505
|
+
return row.field === item.field;
|
|
238506
|
+
})) {
|
|
238507
|
+
item.isFreeze = !item.isFreeze;
|
|
238508
|
+
}
|
|
238509
|
+
});
|
|
238510
|
+
|
|
238511
|
+
_this3.$refs.settingTable.gridApi.refreshCells();
|
|
238512
|
+
|
|
238513
|
+
return _context.abrupt("break", 20);
|
|
238514
|
+
|
|
238515
|
+
case 11:
|
|
238516
|
+
_this3.tableData = JSON.parse(JSON.stringify(_this3.defaultCongfigList));
|
|
238517
|
+
return _context.abrupt("break", 20);
|
|
238518
|
+
|
|
238519
|
+
case 13:
|
|
238520
|
+
_this3.saveLoading = true;
|
|
238521
|
+
_context.next = 16;
|
|
238522
|
+
return _this3.handleTableData();
|
|
238523
|
+
|
|
238524
|
+
case 16:
|
|
238525
|
+
_this3.searchContent = '';
|
|
238526
|
+
|
|
238527
|
+
_this3.tableData.map(function (item, index) {
|
|
238528
|
+
item.fieldIndex = index + 1;
|
|
238529
|
+
});
|
|
238530
|
+
|
|
238531
|
+
_this3.$emit('save', _this3.tableData);
|
|
238532
|
+
|
|
238533
|
+
return _context.abrupt("break", 20);
|
|
238534
|
+
|
|
238535
|
+
case 20:
|
|
238536
|
+
case "end":
|
|
238537
|
+
return _context.stop();
|
|
238538
|
+
}
|
|
238489
238539
|
}
|
|
238490
|
-
|
|
238540
|
+
}, _callee);
|
|
238541
|
+
}))();
|
|
238491
238542
|
},
|
|
238492
238543
|
|
|
238493
238544
|
/** 搜索字段 */
|
|
238494
238545
|
handleSearchField: function handleSearchField(value) {
|
|
238495
238546
|
if (!value) {
|
|
238496
|
-
this.
|
|
238547
|
+
this.handleTableData();
|
|
238497
238548
|
} else {
|
|
238498
238549
|
this.originalTableData = JSON.parse(JSON.stringify(this.tableData));
|
|
238499
238550
|
this.tableData = this.tableData.filter(function (item) {
|
|
238500
238551
|
return item.label.includes(value);
|
|
238501
238552
|
});
|
|
238502
238553
|
}
|
|
238554
|
+
},
|
|
238555
|
+
|
|
238556
|
+
/** 搜索字段并更改保存 */
|
|
238557
|
+
handleTableData: function handleTableData() {
|
|
238558
|
+
var _this4 = this;
|
|
238559
|
+
|
|
238560
|
+
return (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee2() {
|
|
238561
|
+
var originalTableData;
|
|
238562
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee2$(_context2) {
|
|
238563
|
+
while (1) {
|
|
238564
|
+
switch (_context2.prev = _context2.next) {
|
|
238565
|
+
case 0:
|
|
238566
|
+
if (!(_this4.originalTableData.length === _this4.tableData.length)) {
|
|
238567
|
+
_context2.next = 2;
|
|
238568
|
+
break;
|
|
238569
|
+
}
|
|
238570
|
+
|
|
238571
|
+
return _context2.abrupt("return");
|
|
238572
|
+
|
|
238573
|
+
case 2:
|
|
238574
|
+
// 处理用户搜索字段后,修改table值
|
|
238575
|
+
originalTableData = JSON.parse(JSON.stringify(_this4.originalTableData));
|
|
238576
|
+
|
|
238577
|
+
_this4.tableData.map(function (item) {
|
|
238578
|
+
originalTableData = originalTableData.map(function (data) {
|
|
238579
|
+
if (item.field === data.field) {
|
|
238580
|
+
return item;
|
|
238581
|
+
} else {
|
|
238582
|
+
return data;
|
|
238583
|
+
}
|
|
238584
|
+
});
|
|
238585
|
+
});
|
|
238586
|
+
|
|
238587
|
+
_this4.tableData = originalTableData;
|
|
238588
|
+
|
|
238589
|
+
case 5:
|
|
238590
|
+
case "end":
|
|
238591
|
+
return _context2.stop();
|
|
238592
|
+
}
|
|
238593
|
+
}
|
|
238594
|
+
}, _callee2);
|
|
238595
|
+
}))();
|
|
238503
238596
|
}
|
|
238504
238597
|
}
|
|
238505
238598
|
});
|
|
238506
238599
|
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=script&lang=js&
|
|
238507
238600
|
/* harmony default export */ var components_tf_setting_formvue_type_script_lang_js_ = (tf_setting_formvue_type_script_lang_js_);
|
|
238508
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=
|
|
238601
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=3c8f0d24&lang=scss&scoped=true&
|
|
238509
238602
|
// extracted by mini-css-extract-plugin
|
|
238510
238603
|
|
|
238511
|
-
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=
|
|
238604
|
+
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue?vue&type=style&index=0&id=3c8f0d24&lang=scss&scoped=true&
|
|
238512
238605
|
|
|
238513
238606
|
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-setting/components/tf-setting-form/index.vue
|
|
238514
238607
|
|
|
@@ -238521,11 +238614,11 @@ var tf_ag_grid_table = __webpack_require__(5738);
|
|
|
238521
238614
|
|
|
238522
238615
|
var tf_setting_form_component = (0,componentNormalizer/* default */.Z)(
|
|
238523
238616
|
components_tf_setting_formvue_type_script_lang_js_,
|
|
238524
|
-
|
|
238525
|
-
|
|
238617
|
+
tf_setting_formvue_type_template_id_3c8f0d24_scoped_true_render,
|
|
238618
|
+
tf_setting_formvue_type_template_id_3c8f0d24_scoped_true_staticRenderFns,
|
|
238526
238619
|
false,
|
|
238527
238620
|
null,
|
|
238528
|
-
"
|
|
238621
|
+
"3c8f0d24",
|
|
238529
238622
|
null
|
|
238530
238623
|
|
|
238531
238624
|
)
|