@tongfun/tf-widget 0.1.182 → 0.1.183
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 +32 -13
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +32 -13
- package/lib/tf-widget.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/tf-widget.common.js
CHANGED
|
@@ -261278,9 +261278,9 @@ form_body_item_custom.install = function (vue) {
|
|
|
261278
261278
|
vue.component(form_body_item_custom.name, form_body_item_custom);
|
|
261279
261279
|
};
|
|
261280
261280
|
/* harmony default export */ var package_form_body_item_custom = (form_body_item_custom);
|
|
261281
|
-
;// 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-print-render/src/index.vue?vue&type=template&id=
|
|
261282
|
-
var
|
|
261283
|
-
var
|
|
261281
|
+
;// 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-print-render/src/index.vue?vue&type=template&id=22197126&scoped=true&
|
|
261282
|
+
var srcvue_type_template_id_22197126_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,"destroy-on-close":"","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)}
|
|
261283
|
+
var srcvue_type_template_id_22197126_scoped_true_staticRenderFns = []
|
|
261284
261284
|
|
|
261285
261285
|
|
|
261286
261286
|
;// 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-print-render/src/print-render.vue?vue&type=template&id=49bb1493&scoped=true&
|
|
@@ -262695,9 +262695,12 @@ function queryDetail(data) {
|
|
|
262695
262695
|
data
|
|
262696
262696
|
});
|
|
262697
262697
|
}
|
|
262698
|
-
async function queryDetailIgnoreToken(data) {
|
|
262698
|
+
async function queryDetailIgnoreToken(data, option = {}) {
|
|
262699
|
+
const setting = Object.assign({
|
|
262700
|
+
baseUrl: null
|
|
262701
|
+
}, option);
|
|
262699
262702
|
const response = await axios_default()({
|
|
262700
|
-
url: '/api/erp/print/anno/queryDetail',
|
|
262703
|
+
url: setting.baseUrl ? `${setting.baseUrl}/api/erp/print/anno/queryDetail` : '/api/erp/print/anno/queryDetail',
|
|
262701
262704
|
method: 'POST',
|
|
262702
262705
|
data
|
|
262703
262706
|
});
|
|
@@ -262713,9 +262716,12 @@ function getPrintData(data) {
|
|
|
262713
262716
|
timeout: 1000 * 60
|
|
262714
262717
|
});
|
|
262715
262718
|
}
|
|
262716
|
-
async function getPrintDataIgnoreToken(data) {
|
|
262719
|
+
async function getPrintDataIgnoreToken(data, option = {}) {
|
|
262720
|
+
const setting = Object.assign({
|
|
262721
|
+
baseUrl: null
|
|
262722
|
+
}, option);
|
|
262717
262723
|
const response = await axios_default()({
|
|
262718
|
-
url: '/api/erp/print/anno/getPrintData',
|
|
262724
|
+
url: setting.baseUrl ? `${setting.baseUrl}/api/erp/print/anno/getPrintData` : '/api/erp/print/anno/getPrintData',
|
|
262719
262725
|
method: 'post',
|
|
262720
262726
|
data,
|
|
262721
262727
|
timeout: 1000 * 60
|
|
@@ -262835,6 +262841,8 @@ function getInitConfig() {
|
|
|
262835
262841
|
*/
|
|
262836
262842
|
const configRes = ignoreToken ? await queryDetailIgnoreToken({
|
|
262837
262843
|
id: configId
|
|
262844
|
+
}, {
|
|
262845
|
+
baseUrl: this.baseUrl
|
|
262838
262846
|
}) : await queryDetail({
|
|
262839
262847
|
id: configId
|
|
262840
262848
|
});
|
|
@@ -262844,7 +262852,6 @@ function getInitConfig() {
|
|
|
262844
262852
|
|
|
262845
262853
|
// 配置接受
|
|
262846
262854
|
const config = {};
|
|
262847
|
-
console.log(configRes, 'wodaoyaokankan');
|
|
262848
262855
|
config.layout = configRes.data.config.layout;
|
|
262849
262856
|
config.paperConfig = Object.assign(getInitConfig(), configRes.data.config.paperConfig); // 与默认配置合并
|
|
262850
262857
|
this.printConfig = config;
|
|
@@ -262859,6 +262866,8 @@ function getInitConfig() {
|
|
|
262859
262866
|
const printDataRes = ignoreToken ? await getPrintDataIgnoreToken({
|
|
262860
262867
|
rowIds: dataIds,
|
|
262861
262868
|
viewName: this.dataSource
|
|
262869
|
+
}, {
|
|
262870
|
+
baseUrl: this.baseUrl
|
|
262862
262871
|
}) : await getPrintData({
|
|
262863
262872
|
rowIds: dataIds,
|
|
262864
262873
|
viewName: this.dataSource
|
|
@@ -263002,6 +263011,16 @@ function getInitConfig() {
|
|
|
263002
263011
|
type: Boolean,
|
|
263003
263012
|
default: false
|
|
263004
263013
|
},
|
|
263014
|
+
/**
|
|
263015
|
+
* 当套打渲染端被用于浏览器之外的场景时,比如小票柜的electron客户端程序
|
|
263016
|
+
* 没有浏览器环境去获取域名相关信息,不能调用正确的接口地址
|
|
263017
|
+
*
|
|
263018
|
+
* 注:当前字段若要生效,调用trigger时,一定要设置ignoreToken参数为true
|
|
263019
|
+
*/
|
|
263020
|
+
baseUrl: {
|
|
263021
|
+
type: String,
|
|
263022
|
+
default: null
|
|
263023
|
+
},
|
|
263005
263024
|
buttonText: {
|
|
263006
263025
|
type: String,
|
|
263007
263026
|
default: '打印'
|
|
@@ -263034,10 +263053,10 @@ function getInitConfig() {
|
|
|
263034
263053
|
});
|
|
263035
263054
|
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue?vue&type=script&lang=js&
|
|
263036
263055
|
/* harmony default export */ var tf_print_render_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
|
|
263037
|
-
;// 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-print-render/src/index.vue?vue&type=style&index=0&id=
|
|
263056
|
+
;// 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-print-render/src/index.vue?vue&type=style&index=0&id=22197126&prod&scoped=true&lang=less&
|
|
263038
263057
|
// extracted by mini-css-extract-plugin
|
|
263039
263058
|
|
|
263040
|
-
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue?vue&type=style&index=0&id=
|
|
263059
|
+
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue?vue&type=style&index=0&id=22197126&prod&scoped=true&lang=less&
|
|
263041
263060
|
|
|
263042
263061
|
;// CONCATENATED MODULE: ./package/tf-print-render/src/index.vue
|
|
263043
263062
|
|
|
@@ -263050,11 +263069,11 @@ function getInitConfig() {
|
|
|
263050
263069
|
|
|
263051
263070
|
var src_component = (0,componentNormalizer/* default */.Z)(
|
|
263052
263071
|
tf_print_render_srcvue_type_script_lang_js_,
|
|
263053
|
-
|
|
263054
|
-
|
|
263072
|
+
srcvue_type_template_id_22197126_scoped_true_render,
|
|
263073
|
+
srcvue_type_template_id_22197126_scoped_true_staticRenderFns,
|
|
263055
263074
|
false,
|
|
263056
263075
|
null,
|
|
263057
|
-
"
|
|
263076
|
+
"22197126",
|
|
263058
263077
|
null
|
|
263059
263078
|
|
|
263060
263079
|
)
|