@tongfun/tf-widget 0.1.126 → 0.1.128
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 +70 -50
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +70 -50
- package/lib/tf-widget.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/tf-widget.common.js
CHANGED
|
@@ -239395,9 +239395,9 @@ form_body_item_custom.install = function (vue) {
|
|
|
239395
239395
|
};
|
|
239396
239396
|
|
|
239397
239397
|
/* harmony default export */ var package_form_body_item_custom = (form_body_item_custom);
|
|
239398
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-print-render/src/index.vue?vue&type=template&id=
|
|
239399
|
-
var
|
|
239400
|
-
var
|
|
239398
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-print-render/src/index.vue?vue&type=template&id=a4b2330c&scoped=true&
|
|
239399
|
+
var srcvue_type_template_id_a4b2330c_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"print-trigger"},[_vm._t("default",function(){return [_c('el-button',{class:[_vm.inCommonTable ? 'in-common-table': ''],attrs:{"type":"primary","size":"mini"},on:{"click":_vm.handleTrigger}},[_vm._v(" "+_vm._s(_vm.buttonText)+" ")])]}),_c('el-dialog',{ref:"previewDialog",attrs:{"append-to-body":"","visible":_vm.previewDialogVisible,"width":"50%"},on:{"update:visible":function($event){_vm.previewDialogVisible=$event}}},[_c('PrintRender',{ref:"previewPrintRender",attrs:{"config":_vm.printConfig,"data":_vm.printData}}),_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{staticClass:"theme-button",attrs:{"size":"mini","type":"primary"},on:{"click":function($event){_vm.previewDialogVisible = false}}},[_vm._v("关闭")]),_c('el-button',{staticClass:"theme-button",attrs:{"size":"mini","type":"primary"},on:{"click":_vm.excutePrint}},[_vm._v("打印")])],1)],1),(_vm.silencePrintRenderDispaly)?_c('div',{staticClass:"hidden-dom"},[_c('PrintRender',{ref:"silentPrintRender",attrs:{"silent-mode":"","config":_vm.printConfig,"data":_vm.printData},on:{"printTriggered":function($event){_vm.silentPrintRenderDispaly = false}}})],1):_vm._e()],2)}
|
|
239400
|
+
var srcvue_type_template_id_a4b2330c_scoped_true_staticRenderFns = []
|
|
239401
239401
|
|
|
239402
239402
|
|
|
239403
239403
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-print-render/src/print-render.vue?vue&type=template&id=0efaa025&scoped=true&
|
|
@@ -240239,6 +240239,8 @@ function getInitConfig() {
|
|
|
240239
240239
|
//
|
|
240240
240240
|
//
|
|
240241
240241
|
//
|
|
240242
|
+
//
|
|
240243
|
+
//
|
|
240242
240244
|
|
|
240243
240245
|
|
|
240244
240246
|
|
|
@@ -240254,12 +240256,7 @@ function getInitConfig() {
|
|
|
240254
240256
|
},
|
|
240255
240257
|
buttonText: {
|
|
240256
240258
|
type: String,
|
|
240257
|
-
default: '打印
|
|
240258
|
-
},
|
|
240259
|
-
// 是否显示预览弹窗
|
|
240260
|
-
preview: {
|
|
240261
|
-
type: Boolean,
|
|
240262
|
-
default: true
|
|
240259
|
+
default: '打印'
|
|
240263
240260
|
},
|
|
240264
240261
|
configId: {
|
|
240265
240262
|
type: String,
|
|
@@ -240274,18 +240271,16 @@ function getInitConfig() {
|
|
|
240274
240271
|
},
|
|
240275
240272
|
data: function data() {
|
|
240276
240273
|
return {
|
|
240277
|
-
|
|
240274
|
+
//静默打印相关
|
|
240275
|
+
silencePrint: false,
|
|
240276
|
+
silencePrintRenderDispaly: false,
|
|
240278
240277
|
previewDialogVisible: false,
|
|
240278
|
+
// todo:数据源改成非独立的配置
|
|
240279
240279
|
dataSource: null,
|
|
240280
|
-
// 数据源
|
|
240281
240280
|
printConfig: null,
|
|
240282
240281
|
printData: []
|
|
240283
240282
|
};
|
|
240284
240283
|
},
|
|
240285
|
-
created: function created() {
|
|
240286
|
-
// 加载默认的配置
|
|
240287
|
-
this.printConfig = getInitConfig();
|
|
240288
|
-
},
|
|
240289
240284
|
methods: {
|
|
240290
240285
|
handleTrigger: function handleTrigger() {
|
|
240291
240286
|
this.trigger(this.dataIds, this.configId);
|
|
@@ -240294,7 +240289,7 @@ function getInitConfig() {
|
|
|
240294
240289
|
var _this = this;
|
|
240295
240290
|
|
|
240296
240291
|
return (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee() {
|
|
240297
|
-
var loading, configRes, printDataRes;
|
|
240292
|
+
var loading, configRes, config, printDataRes;
|
|
240298
240293
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
|
|
240299
240294
|
while (1) {
|
|
240300
240295
|
switch (_context.prev = _context.next) {
|
|
@@ -240338,62 +240333,75 @@ function getInitConfig() {
|
|
|
240338
240333
|
return _context.abrupt("return", _this.$message.error(configRes.msg));
|
|
240339
240334
|
|
|
240340
240335
|
case 11:
|
|
240341
|
-
|
|
240342
|
-
|
|
240343
|
-
|
|
240336
|
+
// todo:将这个配置集成到大的配置对象里面去,没必要独立出来
|
|
240337
|
+
_this.dataSource = configRes.data.dataSource; // 与默认配置合并
|
|
240338
|
+
|
|
240339
|
+
config = {};
|
|
240340
|
+
config.layout = configRes.data.config.layout;
|
|
240341
|
+
config.paperConfig = Object.assign(getInitConfig(), configRes.data.config.paperConfig);
|
|
240342
|
+
_this.printConfig = config; // 特殊配置提取
|
|
240344
240343
|
|
|
240345
|
-
|
|
240344
|
+
_this.silencePrint = _this.printConfig.paperConfig.silencePrint;
|
|
240345
|
+
/**
|
|
240346
|
+
* 获取打印数据
|
|
240347
|
+
*/
|
|
240348
|
+
|
|
240349
|
+
_context.next = 19;
|
|
240346
240350
|
return getPrintData({
|
|
240347
240351
|
rowIds: dataIds,
|
|
240348
240352
|
viewName: _this.dataSource
|
|
240349
240353
|
});
|
|
240350
240354
|
|
|
240351
|
-
case
|
|
240355
|
+
case 19:
|
|
240352
240356
|
printDataRes = _context.sent;
|
|
240353
240357
|
|
|
240354
240358
|
if (!(printDataRes.code !== 0)) {
|
|
240355
|
-
_context.next =
|
|
240359
|
+
_context.next = 22;
|
|
240356
240360
|
break;
|
|
240357
240361
|
}
|
|
240358
240362
|
|
|
240359
240363
|
return _context.abrupt("return", _this.$message.error(printDataRes.msg));
|
|
240360
240364
|
|
|
240361
|
-
case
|
|
240362
|
-
_this.printData = printDataRes.data;
|
|
240365
|
+
case 22:
|
|
240366
|
+
_this.printData = printDataRes.data;
|
|
240367
|
+
/**
|
|
240368
|
+
* 触发打印,分静默打印和预览打印两个分支
|
|
240369
|
+
*/
|
|
240370
|
+
|
|
240371
|
+
if (_this.silencePrint) {
|
|
240372
|
+
_this.silencePrintRenderDispaly = true; // todo: will nextTick api can not work here ??
|
|
240363
240373
|
|
|
240364
|
-
if (!_this.preview) {
|
|
240365
|
-
_this.silentPrintRenderDispaly = true;
|
|
240366
240374
|
setTimeout(function () {
|
|
240367
240375
|
_this.excutePrint();
|
|
240368
|
-
}
|
|
240376
|
+
});
|
|
240369
240377
|
} else {
|
|
240370
240378
|
_this.previewDialogVisible = true;
|
|
240371
240379
|
}
|
|
240372
240380
|
|
|
240373
|
-
case
|
|
240374
|
-
_context.prev =
|
|
240381
|
+
case 24:
|
|
240382
|
+
_context.prev = 24;
|
|
240375
240383
|
loading.close();
|
|
240376
|
-
return _context.finish(
|
|
240384
|
+
return _context.finish(24);
|
|
240377
240385
|
|
|
240378
|
-
case
|
|
240386
|
+
case 27:
|
|
240379
240387
|
case "end":
|
|
240380
240388
|
return _context.stop();
|
|
240381
240389
|
}
|
|
240382
240390
|
}
|
|
240383
|
-
}, _callee, null, [[5,,
|
|
240391
|
+
}, _callee, null, [[5,, 24, 27]]);
|
|
240384
240392
|
}))();
|
|
240385
240393
|
},
|
|
240386
240394
|
excutePrint: function excutePrint() {
|
|
240387
|
-
this.
|
|
240395
|
+
this.silencePrint ? this.$refs.silentPrintRender.printTargetDom() : this.$refs.previewPrintRender.printTargetDom();
|
|
240388
240396
|
}
|
|
240389
240397
|
}
|
|
240390
240398
|
});
|
|
240391
240399
|
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue?vue&type=script&lang=js&
|
|
240392
240400
|
/* harmony default export */ var tf_print_render_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
|
|
240393
|
-
;// 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/cli-service/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/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-print-render/src/index.vue?vue&type=style&index=0&id=
|
|
240401
|
+
;// 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/cli-service/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/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-print-render/src/index.vue?vue&type=style&index=0&id=a4b2330c&prod&scoped=true&lang=less&
|
|
240394
240402
|
// extracted by mini-css-extract-plugin
|
|
240395
240403
|
|
|
240396
|
-
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue?vue&type=style&index=0&id=
|
|
240404
|
+
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue?vue&type=style&index=0&id=a4b2330c&prod&scoped=true&lang=less&
|
|
240397
240405
|
|
|
240398
240406
|
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue
|
|
240399
240407
|
|
|
@@ -240406,11 +240414,11 @@ function getInitConfig() {
|
|
|
240406
240414
|
|
|
240407
240415
|
var src_component = (0,componentNormalizer/* default */.Z)(
|
|
240408
240416
|
tf_print_render_srcvue_type_script_lang_js_,
|
|
240409
|
-
|
|
240410
|
-
|
|
240417
|
+
srcvue_type_template_id_a4b2330c_scoped_true_render,
|
|
240418
|
+
srcvue_type_template_id_a4b2330c_scoped_true_staticRenderFns,
|
|
240411
240419
|
false,
|
|
240412
240420
|
null,
|
|
240413
|
-
"
|
|
240421
|
+
"a4b2330c",
|
|
240414
240422
|
null
|
|
240415
240423
|
|
|
240416
240424
|
)
|
|
@@ -241116,9 +241124,9 @@ var tf_header_buttonvue_type_template_id_417839bc_scoped_true_staticRenderFns =
|
|
|
241116
241124
|
|
|
241117
241125
|
// EXTERNAL MODULE: ./src/mixins/init-button.js
|
|
241118
241126
|
var init_button = __webpack_require__(5643);
|
|
241119
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=template&id=
|
|
241120
|
-
var
|
|
241121
|
-
var
|
|
241127
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=template&id=209a9aee&
|
|
241128
|
+
var tf_credential_recordvue_type_template_id_209a9aee_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.handleShow}},[_vm._v("凭证记录")]),_c('el-dialog',{attrs:{"title":"凭证记录","visible":_vm.dialogVisible,"append-to-body":"","modal-append-to-body":false,"width":"80%"},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('TfButtonGroup',[_c('el-button',{attrs:{"type":"primary","size":"mini","loading":_vm.loadingObj.delete},on:{"click":_vm.handleDelete}},[_vm._v("删除")]),_c('el-dropdown',{attrs:{"split-button":"","type":"primary","size":"mini"},on:{"command":_vm.synchronize}},[_vm._v(" 同步 "),_c('el-dropdown-menu',{attrs:{"slot":"dropdown"},slot:"dropdown"},_vm._l((_vm.accountBookList),function(accountBook,index){return _c('el-dropdown-item',{key:index,attrs:{"command":accountBook.id}},[_vm._v(_vm._s(accountBook.name))])}),1)],1),_c('el-button',{attrs:{"type":"primary","size":"mini","loading":_vm.loadingObj.revoke},on:{"click":_vm.revoke}},[_vm._v("撤销同步")]),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.getTableData}},[_vm._v("刷新")])],1),_c('div',{staticClass:"tf-common-table"},[_c('TfAgGridTable',{ref:"recordList",attrs:{"loading":_vm.loading,"columns":_vm.mainColumns,"table-data":_vm.tableData,"enable-cell-text-selection":false},on:{"selectChange":_vm.selectChange}})],1),_c('div',{staticClass:"container-top-pagination"},[_c('TfPagination',{ref:"mainTablePagination",attrs:{"total":_vm.mainTotal,"select-row-num":_vm.currentSelectRows.length},on:{"pageChange":function($event){return _vm.$emit('pageChange')}}})],1)],1)],1)}
|
|
241129
|
+
var tf_credential_recordvue_type_template_id_209a9aee_staticRenderFns = []
|
|
241122
241130
|
|
|
241123
241131
|
|
|
241124
241132
|
// EXTERNAL MODULE: ./package/tf-button-group/index.js + 6 modules
|
|
@@ -241348,15 +241356,27 @@ var api_tf_table = __webpack_require__(7836);
|
|
|
241348
241356
|
resp = _context3.sent;
|
|
241349
241357
|
|
|
241350
241358
|
if (!(resp.code !== 0)) {
|
|
241351
|
-
_context3.next =
|
|
241359
|
+
_context3.next = 11;
|
|
241352
241360
|
break;
|
|
241353
241361
|
}
|
|
241354
241362
|
|
|
241355
241363
|
_this3.$message.error('获取凭证记录失败!');
|
|
241356
241364
|
|
|
241365
|
+
_this3.loading = false;
|
|
241357
241366
|
return _context3.abrupt("return");
|
|
241358
241367
|
|
|
241359
|
-
case
|
|
241368
|
+
case 11:
|
|
241369
|
+
if (resp.data) {
|
|
241370
|
+
_context3.next = 16;
|
|
241371
|
+
break;
|
|
241372
|
+
}
|
|
241373
|
+
|
|
241374
|
+
_this3.loading = false;
|
|
241375
|
+
_this3.tableData = [];
|
|
241376
|
+
_this3.mainTotal = 0;
|
|
241377
|
+
return _context3.abrupt("return");
|
|
241378
|
+
|
|
241379
|
+
case 16:
|
|
241360
241380
|
_this3.limitation = [];
|
|
241361
241381
|
|
|
241362
241382
|
_this3.limitation.push({
|
|
@@ -241377,16 +241397,16 @@ var api_tf_table = __webpack_require__(7836);
|
|
|
241377
241397
|
limitParams: _this3.limitation,
|
|
241378
241398
|
size: _this3.size
|
|
241379
241399
|
};
|
|
241380
|
-
_context3.next =
|
|
241400
|
+
_context3.next = 21;
|
|
241381
241401
|
return (0,api_tf_table/* getHeaderTableInfo */.u1)(data);
|
|
241382
241402
|
|
|
241383
|
-
case
|
|
241403
|
+
case 21:
|
|
241384
241404
|
res = _context3.sent;
|
|
241385
241405
|
_this3.tableData = res.data.datas;
|
|
241386
241406
|
_this3.mainTotal = +res.data.total;
|
|
241387
241407
|
_this3.loading = false;
|
|
241388
241408
|
|
|
241389
|
-
case
|
|
241409
|
+
case 25:
|
|
241390
241410
|
case "end":
|
|
241391
241411
|
return _context3.stop();
|
|
241392
241412
|
}
|
|
@@ -241564,10 +241584,10 @@ var api_tf_table = __webpack_require__(7836);
|
|
|
241564
241584
|
});
|
|
241565
241585
|
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=script&lang=js&
|
|
241566
241586
|
/* harmony default export */ var components_tf_credential_recordvue_type_script_lang_js_ = (tf_credential_recordvue_type_script_lang_js_);
|
|
241567
|
-
;// 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/cli-service/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/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=style&index=0&id=
|
|
241587
|
+
;// 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/cli-service/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/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=style&index=0&id=209a9aee&prod&lang=less&
|
|
241568
241588
|
// extracted by mini-css-extract-plugin
|
|
241569
241589
|
|
|
241570
|
-
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=style&index=0&id=
|
|
241590
|
+
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue?vue&type=style&index=0&id=209a9aee&prod&lang=less&
|
|
241571
241591
|
|
|
241572
241592
|
;// CONCATENATED MODULE: ./package/tf-table-list/src/components/tf-header-button/components/tf-credential-record/index.vue
|
|
241573
241593
|
|
|
@@ -241580,8 +241600,8 @@ var api_tf_table = __webpack_require__(7836);
|
|
|
241580
241600
|
|
|
241581
241601
|
var tf_credential_record_component = (0,componentNormalizer/* default */.Z)(
|
|
241582
241602
|
components_tf_credential_recordvue_type_script_lang_js_,
|
|
241583
|
-
|
|
241584
|
-
|
|
241603
|
+
tf_credential_recordvue_type_template_id_209a9aee_render,
|
|
241604
|
+
tf_credential_recordvue_type_template_id_209a9aee_staticRenderFns,
|
|
241585
241605
|
false,
|
|
241586
241606
|
null,
|
|
241587
241607
|
null,
|