ecinc-cloud-yoabase 9.6.271 → 9.6.273
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/ecyoabase.common.js +107 -78
- package/lib/ecyoabase.umd.js +107 -78
- package/lib/ecyoabase.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecyoabase.common.js
CHANGED
|
@@ -239946,17 +239946,18 @@ var InlineTextEditor_component = normalizeComponent(
|
|
|
239946
239946
|
)
|
|
239947
239947
|
|
|
239948
239948
|
/* harmony default export */ var InlineTextEditor = (InlineTextEditor_component.exports);
|
|
239949
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/yoabase/src/workflow/wfInstance/mainform/components/PrintFile.vue?vue&type=template&id=
|
|
239950
|
-
var
|
|
239949
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/yoabase/src/workflow/wfInstance/mainform/components/PrintFile.vue?vue&type=template&id=ed390518&scoped=true
|
|
239950
|
+
var PrintFilevue_type_template_id_ed390518_scoped_true_render = function render() {
|
|
239951
239951
|
var _vm = this,
|
|
239952
239952
|
_c = _vm._self._c;
|
|
239953
|
-
return _c('div',
|
|
239953
|
+
return _c('div', {
|
|
239954
239954
|
directives: [{
|
|
239955
239955
|
name: "show",
|
|
239956
239956
|
rawName: "v-show",
|
|
239957
|
-
value:
|
|
239958
|
-
expression: "
|
|
239959
|
-
}]
|
|
239957
|
+
value: true,
|
|
239958
|
+
expression: "true"
|
|
239959
|
+
}]
|
|
239960
|
+
}, [_c('el-button', {
|
|
239960
239961
|
attrs: {
|
|
239961
239962
|
"id": "btnSaveSignedfile",
|
|
239962
239963
|
"type": "default"
|
|
@@ -239965,12 +239966,6 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_render = function render(
|
|
|
239965
239966
|
"click": _vm.btnSaveSignedfile
|
|
239966
239967
|
}
|
|
239967
239968
|
}), _c('el-button', {
|
|
239968
|
-
directives: [{
|
|
239969
|
-
name: "show",
|
|
239970
|
-
rawName: "v-show",
|
|
239971
|
-
value: false,
|
|
239972
|
-
expression: "false"
|
|
239973
|
-
}],
|
|
239974
239969
|
attrs: {
|
|
239975
239970
|
"id": "btnShowInstall",
|
|
239976
239971
|
"type": "default"
|
|
@@ -239978,17 +239973,24 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_render = function render(
|
|
|
239978
239973
|
on: {
|
|
239979
239974
|
"click": _vm.btnShowInstallClick
|
|
239980
239975
|
}
|
|
239981
|
-
}), _c('
|
|
239982
|
-
ref: "print",
|
|
239976
|
+
}), _c('iframe', {
|
|
239983
239977
|
attrs: {
|
|
239984
|
-
"
|
|
239985
|
-
|
|
239978
|
+
"id": "ifrmPrint"
|
|
239979
|
+
}
|
|
239980
|
+
}), _c('el-button', {
|
|
239981
|
+
attrs: {
|
|
239982
|
+
"id": "btnSaveAsDownloadClick",
|
|
239983
|
+
"type": "default"
|
|
239984
|
+
},
|
|
239985
|
+
on: {
|
|
239986
|
+
"click": _vm.btnSaveAsDownloadClick
|
|
239986
239987
|
}
|
|
239987
239988
|
})], 1);
|
|
239988
239989
|
};
|
|
239989
|
-
var
|
|
239990
|
+
var PrintFilevue_type_template_id_ed390518_scoped_true_staticRenderFns = [];
|
|
239990
239991
|
|
|
239991
239992
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/yoabase/src/workflow/wfInstance/mainform/components/PrintFile.vue?vue&type=script&lang=js
|
|
239993
|
+
|
|
239992
239994
|
/* harmony default export */ var PrintFilevue_type_script_lang_js = ({
|
|
239993
239995
|
props: {},
|
|
239994
239996
|
data: function data() {
|
|
@@ -240005,89 +240007,116 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_staticRenderFns = [];
|
|
|
240005
240007
|
computed: {},
|
|
240006
240008
|
watch: {},
|
|
240007
240009
|
created: function created() {
|
|
240008
|
-
|
|
240009
|
-
this.$options.components['print'] = this.$loadComponent('@/wapp/workflow/wfInstance/mainform/print');
|
|
240010
|
-
var $scope = this.$vnode.context;
|
|
240010
|
+
this.$bus.on('btnSaveAsClick', this.btnSaveAsClick);
|
|
240011
240011
|
this.$bus.on('btnPrintWebFormClick', this.btnPrintWebFormClick);
|
|
240012
240012
|
this.$bus.on('btnPrintFileClick', this.btnPrintFileClick);
|
|
240013
240013
|
this.$bus.on('btnPrintGzClick', this.btnPrintGzClick);
|
|
240014
|
-
this.$bus.on('btnSaveAsClick', this.btnSaveAsClick);
|
|
240015
240014
|
this.$bus.on('btnStampClick', this.btnStampClick);
|
|
240016
240015
|
this.$bus.on('btnToDuBan', this.btnToDuBan);
|
|
240017
|
-
this.$bus.on('dataurl', function (res) {
|
|
240018
|
-
if (res) {
|
|
240019
|
-
var _this = _this2;
|
|
240020
|
-
_this2.dataURL = res;
|
|
240021
|
-
_this2.$nextTick(function () {
|
|
240022
|
-
if (_this2.dataURL) {
|
|
240023
|
-
_this2.$bus.emit('showDoingDialog');
|
|
240024
|
-
|
|
240025
|
-
// this.dataURL = this.dataURL.split('data:image/png;base64,')[1]
|
|
240026
|
-
_this2.$http({
|
|
240027
|
-
method: 'POST',
|
|
240028
|
-
url: '/gwgl/webForm/saveWebformBase64data',
|
|
240029
|
-
params: {
|
|
240030
|
-
busiDataId: $scope.wfInstance.busiDataId
|
|
240031
|
-
},
|
|
240032
|
-
data: {
|
|
240033
|
-
formBase64data: _this2.dataURL
|
|
240034
|
-
}
|
|
240035
|
-
}).then(function (res) {
|
|
240036
|
-
_this2.$bus.emit('closeDoingDialog');
|
|
240037
|
-
if (res.code === 'success') {
|
|
240038
|
-
_this.$parent.isShow = false;
|
|
240039
|
-
var url = "/apigw" + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/download?module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId;
|
|
240040
|
-
if ($scope.wfInstance.module !== 'fawen') url += '&doc=true';
|
|
240041
|
-
url += '&httpPort=' + location.port;
|
|
240042
|
-
window.open(url);
|
|
240043
|
-
} else {
|
|
240044
|
-
_this2.$message({
|
|
240045
|
-
message: res.message,
|
|
240046
|
-
type: 'warning'
|
|
240047
|
-
});
|
|
240048
|
-
}
|
|
240049
|
-
}, function (err) {
|
|
240050
|
-
_this2.$message.error(err);
|
|
240051
|
-
});
|
|
240052
|
-
}
|
|
240053
|
-
});
|
|
240054
|
-
}
|
|
240055
|
-
});
|
|
240056
240016
|
},
|
|
240057
240017
|
beforeDestroy: function beforeDestroy() {
|
|
240018
|
+
this.$bus.off('btnSaveAsClick', this.btnSaveAsClick);
|
|
240058
240019
|
this.$bus.off('btnPrintWebFormClick', this.btnPrintWebFormClick);
|
|
240059
240020
|
this.$bus.off('btnPrintFileClick', this.btnPrintFileClick);
|
|
240060
240021
|
this.$bus.off('btnPrintGzClick', this.btnPrintGzClick);
|
|
240061
|
-
this.$bus.off('btnSaveAsClick', this.btnSaveAsClick);
|
|
240062
240022
|
this.$bus.off('btnStampClick', this.btnStampClick);
|
|
240063
240023
|
this.$bus.off('btnToDuBan', this.btnToDuBan);
|
|
240064
|
-
this.$bus.off('dataurl');
|
|
240065
240024
|
},
|
|
240066
240025
|
mounted: function mounted() {},
|
|
240067
240026
|
methods: {
|
|
240027
|
+
btnSaveAsClick: function btnSaveAsClick() {
|
|
240028
|
+
this.$bus.emit('showDoingDialog');
|
|
240029
|
+
ifrmPrint.src = location.href.replace('/wflow?', '/print?') + '&saveAs=true';
|
|
240030
|
+
},
|
|
240031
|
+
btnSaveAsDownloadClick: function btnSaveAsDownloadClick() {
|
|
240032
|
+
var _this = this;
|
|
240033
|
+
var $scope = this.$vnode.context;
|
|
240034
|
+
// 返回base64图片地址
|
|
240035
|
+
var printDiv = ifrmPrint.contentDocument.querySelector('#print');
|
|
240036
|
+
var formTables = printDiv.querySelectorAll('.print_formtb');
|
|
240037
|
+
new Promise(function (resolve) {
|
|
240038
|
+
if (formTables.length > 1) {
|
|
240039
|
+
printDiv.querySelectorAll('.print_formtb').forEach(function (printtb, i) {
|
|
240040
|
+
printtb.style.display = 'none';
|
|
240041
|
+
});
|
|
240042
|
+
printDiv.querySelectorAll('.print_formtb').forEach(function (printtb, j) {
|
|
240043
|
+
if (j !== 0) {
|
|
240044
|
+
printDiv.querySelector('.form-header').display = 'none';
|
|
240045
|
+
}
|
|
240046
|
+
printtb.style.display = '';
|
|
240047
|
+
_this.$nextTick(function () {
|
|
240048
|
+
_this.saveWebformBase64data($scope, printDiv, j + 1).then(function (rst) {
|
|
240049
|
+
printtb.parentElement.removeChild(printtb);
|
|
240050
|
+
});
|
|
240051
|
+
});
|
|
240052
|
+
});
|
|
240053
|
+
var timer = setInterval(function () {
|
|
240054
|
+
if (printDiv.querySelectorAll('.print_formtb').length === 0) {
|
|
240055
|
+
resolve(true);
|
|
240056
|
+
clearInterval(timer);
|
|
240057
|
+
}
|
|
240058
|
+
}, 1000);
|
|
240059
|
+
} else {
|
|
240060
|
+
_this.saveWebformBase64data($scope, printDiv, 1).then(function (rst) {
|
|
240061
|
+
resolve(true);
|
|
240062
|
+
});
|
|
240063
|
+
}
|
|
240064
|
+
}).then(function (rst) {
|
|
240065
|
+
_this.$bus.emit('closeDoingDialog');
|
|
240066
|
+
if (rst) {
|
|
240067
|
+
$scope.isShow = false;
|
|
240068
|
+
var url = "/apigw" + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/download?module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId;
|
|
240069
|
+
url += '&pageSize=' + formTables.length;
|
|
240070
|
+
if ($scope.wfInstance.module !== 'fawen') url += '&doc=true';
|
|
240071
|
+
url += '&httpPort=' + location.port;
|
|
240072
|
+
window.open(url);
|
|
240073
|
+
}
|
|
240074
|
+
});
|
|
240075
|
+
},
|
|
240076
|
+
saveWebformBase64data: function saveWebformBase64data($scope, printDiv, pageNum) {
|
|
240077
|
+
var _this2 = this;
|
|
240078
|
+
return new Promise(function (resolve) {
|
|
240079
|
+
html2canvas_default()(printDiv, {
|
|
240080
|
+
// async: true,
|
|
240081
|
+
// dpi: window.devicePixelRatio * scale,
|
|
240082
|
+
scale: 1 // 添加的scale 参数
|
|
240083
|
+
}).then(function (canvas) {
|
|
240084
|
+
var dataURL = canvas.toDataURL('image/png');
|
|
240085
|
+
_this2.$http({
|
|
240086
|
+
method: 'POST',
|
|
240087
|
+
url: '/gwgl/webForm/saveWebformBase64data',
|
|
240088
|
+
params: {
|
|
240089
|
+
busiDataId: $scope.wfInstance.busiDataId,
|
|
240090
|
+
pageNum: pageNum
|
|
240091
|
+
},
|
|
240092
|
+
data: {
|
|
240093
|
+
formBase64data: dataURL
|
|
240094
|
+
}
|
|
240095
|
+
}).then(function (res) {
|
|
240096
|
+
if (res.code === 'success') {
|
|
240097
|
+
resolve(res);
|
|
240098
|
+
} else {
|
|
240099
|
+
_this2.$message({
|
|
240100
|
+
message: res.message,
|
|
240101
|
+
type: 'warning'
|
|
240102
|
+
});
|
|
240103
|
+
}
|
|
240104
|
+
}, function (err) {
|
|
240105
|
+
_this2.$message.error(err);
|
|
240106
|
+
});
|
|
240107
|
+
});
|
|
240108
|
+
});
|
|
240109
|
+
},
|
|
240068
240110
|
btnToDuBan: function btnToDuBan($scope) {
|
|
240069
240111
|
console.log(11, $scope);
|
|
240070
240112
|
window.open('/#/wflow?wfEngineUrl=dbgl/itemApply&busiCode=itemApply&wfName=督办立项&startNodeName=&title=' + $scope.vo.flSubject);
|
|
240071
240113
|
},
|
|
240072
240114
|
btnPrintWebFormClick: function btnPrintWebFormClick($scope) {
|
|
240073
|
-
console.log(91, $scope);
|
|
240074
240115
|
// let url = process.env.VUE_APP_BASE_API + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/print?inline=true&module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId
|
|
240075
240116
|
// url += '&httpPort=' + location.port
|
|
240076
240117
|
var params = location.href.split('?')[1];
|
|
240077
240118
|
window.open('#/print?' + params);
|
|
240078
240119
|
},
|
|
240079
|
-
btnSaveAsClick: function btnSaveAsClick($scope) {
|
|
240080
|
-
if ($scope.attachments.length === 0) {
|
|
240081
|
-
this.$alert(this.$tx('yoabase.alerts.notAttach', '当前文件没有附件。'), this.$tx('common.operationTip', '操作提示'), {
|
|
240082
|
-
type: 'warning'
|
|
240083
|
-
});
|
|
240084
|
-
return;
|
|
240085
|
-
}
|
|
240086
|
-
this.$scope = $scope;
|
|
240087
|
-
// let url = process.env.VUE_APP_BASE_API + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/download?module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId
|
|
240088
|
-
// url += '&httpPort=' + location.port
|
|
240089
|
-
// window.open(url)
|
|
240090
|
-
},
|
|
240091
240120
|
btnPrintFileClick: function btnPrintFileClick($scope) {
|
|
240092
240121
|
if ($scope.bodyfile === null || $scope.bodyfile.id === undefined) {
|
|
240093
240122
|
this.$alert(this.$tx('yoabase.alerts.notPrBodyFile', '当前文件没有可打印正文文件。'), this.$tx('common.operationTip', '操作提示'), {
|
|
@@ -240207,11 +240236,11 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_staticRenderFns = [];
|
|
|
240207
240236
|
;
|
|
240208
240237
|
var PrintFile_component = normalizeComponent(
|
|
240209
240238
|
components_PrintFilevue_type_script_lang_js,
|
|
240210
|
-
|
|
240211
|
-
|
|
240239
|
+
PrintFilevue_type_template_id_ed390518_scoped_true_render,
|
|
240240
|
+
PrintFilevue_type_template_id_ed390518_scoped_true_staticRenderFns,
|
|
240212
240241
|
false,
|
|
240213
240242
|
null,
|
|
240214
|
-
"
|
|
240243
|
+
"ed390518",
|
|
240215
240244
|
null
|
|
240216
240245
|
|
|
240217
240246
|
)
|
package/lib/ecyoabase.umd.js
CHANGED
|
@@ -239956,17 +239956,18 @@ var InlineTextEditor_component = normalizeComponent(
|
|
|
239956
239956
|
)
|
|
239957
239957
|
|
|
239958
239958
|
/* harmony default export */ var InlineTextEditor = (InlineTextEditor_component.exports);
|
|
239959
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/yoabase/src/workflow/wfInstance/mainform/components/PrintFile.vue?vue&type=template&id=
|
|
239960
|
-
var
|
|
239959
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/yoabase/src/workflow/wfInstance/mainform/components/PrintFile.vue?vue&type=template&id=ed390518&scoped=true
|
|
239960
|
+
var PrintFilevue_type_template_id_ed390518_scoped_true_render = function render() {
|
|
239961
239961
|
var _vm = this,
|
|
239962
239962
|
_c = _vm._self._c;
|
|
239963
|
-
return _c('div',
|
|
239963
|
+
return _c('div', {
|
|
239964
239964
|
directives: [{
|
|
239965
239965
|
name: "show",
|
|
239966
239966
|
rawName: "v-show",
|
|
239967
|
-
value:
|
|
239968
|
-
expression: "
|
|
239969
|
-
}]
|
|
239967
|
+
value: true,
|
|
239968
|
+
expression: "true"
|
|
239969
|
+
}]
|
|
239970
|
+
}, [_c('el-button', {
|
|
239970
239971
|
attrs: {
|
|
239971
239972
|
"id": "btnSaveSignedfile",
|
|
239972
239973
|
"type": "default"
|
|
@@ -239975,12 +239976,6 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_render = function render(
|
|
|
239975
239976
|
"click": _vm.btnSaveSignedfile
|
|
239976
239977
|
}
|
|
239977
239978
|
}), _c('el-button', {
|
|
239978
|
-
directives: [{
|
|
239979
|
-
name: "show",
|
|
239980
|
-
rawName: "v-show",
|
|
239981
|
-
value: false,
|
|
239982
|
-
expression: "false"
|
|
239983
|
-
}],
|
|
239984
239979
|
attrs: {
|
|
239985
239980
|
"id": "btnShowInstall",
|
|
239986
239981
|
"type": "default"
|
|
@@ -239988,17 +239983,24 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_render = function render(
|
|
|
239988
239983
|
on: {
|
|
239989
239984
|
"click": _vm.btnShowInstallClick
|
|
239990
239985
|
}
|
|
239991
|
-
}), _c('
|
|
239992
|
-
ref: "print",
|
|
239986
|
+
}), _c('iframe', {
|
|
239993
239987
|
attrs: {
|
|
239994
|
-
"
|
|
239995
|
-
|
|
239988
|
+
"id": "ifrmPrint"
|
|
239989
|
+
}
|
|
239990
|
+
}), _c('el-button', {
|
|
239991
|
+
attrs: {
|
|
239992
|
+
"id": "btnSaveAsDownloadClick",
|
|
239993
|
+
"type": "default"
|
|
239994
|
+
},
|
|
239995
|
+
on: {
|
|
239996
|
+
"click": _vm.btnSaveAsDownloadClick
|
|
239996
239997
|
}
|
|
239997
239998
|
})], 1);
|
|
239998
239999
|
};
|
|
239999
|
-
var
|
|
240000
|
+
var PrintFilevue_type_template_id_ed390518_scoped_true_staticRenderFns = [];
|
|
240000
240001
|
|
|
240001
240002
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/yoabase/src/workflow/wfInstance/mainform/components/PrintFile.vue?vue&type=script&lang=js
|
|
240003
|
+
|
|
240002
240004
|
/* harmony default export */ var PrintFilevue_type_script_lang_js = ({
|
|
240003
240005
|
props: {},
|
|
240004
240006
|
data: function data() {
|
|
@@ -240015,89 +240017,116 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_staticRenderFns = [];
|
|
|
240015
240017
|
computed: {},
|
|
240016
240018
|
watch: {},
|
|
240017
240019
|
created: function created() {
|
|
240018
|
-
|
|
240019
|
-
this.$options.components['print'] = this.$loadComponent('@/wapp/workflow/wfInstance/mainform/print');
|
|
240020
|
-
var $scope = this.$vnode.context;
|
|
240020
|
+
this.$bus.on('btnSaveAsClick', this.btnSaveAsClick);
|
|
240021
240021
|
this.$bus.on('btnPrintWebFormClick', this.btnPrintWebFormClick);
|
|
240022
240022
|
this.$bus.on('btnPrintFileClick', this.btnPrintFileClick);
|
|
240023
240023
|
this.$bus.on('btnPrintGzClick', this.btnPrintGzClick);
|
|
240024
|
-
this.$bus.on('btnSaveAsClick', this.btnSaveAsClick);
|
|
240025
240024
|
this.$bus.on('btnStampClick', this.btnStampClick);
|
|
240026
240025
|
this.$bus.on('btnToDuBan', this.btnToDuBan);
|
|
240027
|
-
this.$bus.on('dataurl', function (res) {
|
|
240028
|
-
if (res) {
|
|
240029
|
-
var _this = _this2;
|
|
240030
|
-
_this2.dataURL = res;
|
|
240031
|
-
_this2.$nextTick(function () {
|
|
240032
|
-
if (_this2.dataURL) {
|
|
240033
|
-
_this2.$bus.emit('showDoingDialog');
|
|
240034
|
-
|
|
240035
|
-
// this.dataURL = this.dataURL.split('data:image/png;base64,')[1]
|
|
240036
|
-
_this2.$http({
|
|
240037
|
-
method: 'POST',
|
|
240038
|
-
url: '/gwgl/webForm/saveWebformBase64data',
|
|
240039
|
-
params: {
|
|
240040
|
-
busiDataId: $scope.wfInstance.busiDataId
|
|
240041
|
-
},
|
|
240042
|
-
data: {
|
|
240043
|
-
formBase64data: _this2.dataURL
|
|
240044
|
-
}
|
|
240045
|
-
}).then(function (res) {
|
|
240046
|
-
_this2.$bus.emit('closeDoingDialog');
|
|
240047
|
-
if (res.code === 'success') {
|
|
240048
|
-
_this.$parent.isShow = false;
|
|
240049
|
-
var url = "/apigw" + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/download?module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId;
|
|
240050
|
-
if ($scope.wfInstance.module !== 'fawen') url += '&doc=true';
|
|
240051
|
-
url += '&httpPort=' + location.port;
|
|
240052
|
-
window.open(url);
|
|
240053
|
-
} else {
|
|
240054
|
-
_this2.$message({
|
|
240055
|
-
message: res.message,
|
|
240056
|
-
type: 'warning'
|
|
240057
|
-
});
|
|
240058
|
-
}
|
|
240059
|
-
}, function (err) {
|
|
240060
|
-
_this2.$message.error(err);
|
|
240061
|
-
});
|
|
240062
|
-
}
|
|
240063
|
-
});
|
|
240064
|
-
}
|
|
240065
|
-
});
|
|
240066
240026
|
},
|
|
240067
240027
|
beforeDestroy: function beforeDestroy() {
|
|
240028
|
+
this.$bus.off('btnSaveAsClick', this.btnSaveAsClick);
|
|
240068
240029
|
this.$bus.off('btnPrintWebFormClick', this.btnPrintWebFormClick);
|
|
240069
240030
|
this.$bus.off('btnPrintFileClick', this.btnPrintFileClick);
|
|
240070
240031
|
this.$bus.off('btnPrintGzClick', this.btnPrintGzClick);
|
|
240071
|
-
this.$bus.off('btnSaveAsClick', this.btnSaveAsClick);
|
|
240072
240032
|
this.$bus.off('btnStampClick', this.btnStampClick);
|
|
240073
240033
|
this.$bus.off('btnToDuBan', this.btnToDuBan);
|
|
240074
|
-
this.$bus.off('dataurl');
|
|
240075
240034
|
},
|
|
240076
240035
|
mounted: function mounted() {},
|
|
240077
240036
|
methods: {
|
|
240037
|
+
btnSaveAsClick: function btnSaveAsClick() {
|
|
240038
|
+
this.$bus.emit('showDoingDialog');
|
|
240039
|
+
ifrmPrint.src = location.href.replace('/wflow?', '/print?') + '&saveAs=true';
|
|
240040
|
+
},
|
|
240041
|
+
btnSaveAsDownloadClick: function btnSaveAsDownloadClick() {
|
|
240042
|
+
var _this = this;
|
|
240043
|
+
var $scope = this.$vnode.context;
|
|
240044
|
+
// 返回base64图片地址
|
|
240045
|
+
var printDiv = ifrmPrint.contentDocument.querySelector('#print');
|
|
240046
|
+
var formTables = printDiv.querySelectorAll('.print_formtb');
|
|
240047
|
+
new Promise(function (resolve) {
|
|
240048
|
+
if (formTables.length > 1) {
|
|
240049
|
+
printDiv.querySelectorAll('.print_formtb').forEach(function (printtb, i) {
|
|
240050
|
+
printtb.style.display = 'none';
|
|
240051
|
+
});
|
|
240052
|
+
printDiv.querySelectorAll('.print_formtb').forEach(function (printtb, j) {
|
|
240053
|
+
if (j !== 0) {
|
|
240054
|
+
printDiv.querySelector('.form-header').display = 'none';
|
|
240055
|
+
}
|
|
240056
|
+
printtb.style.display = '';
|
|
240057
|
+
_this.$nextTick(function () {
|
|
240058
|
+
_this.saveWebformBase64data($scope, printDiv, j + 1).then(function (rst) {
|
|
240059
|
+
printtb.parentElement.removeChild(printtb);
|
|
240060
|
+
});
|
|
240061
|
+
});
|
|
240062
|
+
});
|
|
240063
|
+
var timer = setInterval(function () {
|
|
240064
|
+
if (printDiv.querySelectorAll('.print_formtb').length === 0) {
|
|
240065
|
+
resolve(true);
|
|
240066
|
+
clearInterval(timer);
|
|
240067
|
+
}
|
|
240068
|
+
}, 1000);
|
|
240069
|
+
} else {
|
|
240070
|
+
_this.saveWebformBase64data($scope, printDiv, 1).then(function (rst) {
|
|
240071
|
+
resolve(true);
|
|
240072
|
+
});
|
|
240073
|
+
}
|
|
240074
|
+
}).then(function (rst) {
|
|
240075
|
+
_this.$bus.emit('closeDoingDialog');
|
|
240076
|
+
if (rst) {
|
|
240077
|
+
$scope.isShow = false;
|
|
240078
|
+
var url = "/apigw" + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/download?module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId;
|
|
240079
|
+
url += '&pageSize=' + formTables.length;
|
|
240080
|
+
if ($scope.wfInstance.module !== 'fawen') url += '&doc=true';
|
|
240081
|
+
url += '&httpPort=' + location.port;
|
|
240082
|
+
window.open(url);
|
|
240083
|
+
}
|
|
240084
|
+
});
|
|
240085
|
+
},
|
|
240086
|
+
saveWebformBase64data: function saveWebformBase64data($scope, printDiv, pageNum) {
|
|
240087
|
+
var _this2 = this;
|
|
240088
|
+
return new Promise(function (resolve) {
|
|
240089
|
+
html2canvas_default()(printDiv, {
|
|
240090
|
+
// async: true,
|
|
240091
|
+
// dpi: window.devicePixelRatio * scale,
|
|
240092
|
+
scale: 1 // 添加的scale 参数
|
|
240093
|
+
}).then(function (canvas) {
|
|
240094
|
+
var dataURL = canvas.toDataURL('image/png');
|
|
240095
|
+
_this2.$http({
|
|
240096
|
+
method: 'POST',
|
|
240097
|
+
url: '/gwgl/webForm/saveWebformBase64data',
|
|
240098
|
+
params: {
|
|
240099
|
+
busiDataId: $scope.wfInstance.busiDataId,
|
|
240100
|
+
pageNum: pageNum
|
|
240101
|
+
},
|
|
240102
|
+
data: {
|
|
240103
|
+
formBase64data: dataURL
|
|
240104
|
+
}
|
|
240105
|
+
}).then(function (res) {
|
|
240106
|
+
if (res.code === 'success') {
|
|
240107
|
+
resolve(res);
|
|
240108
|
+
} else {
|
|
240109
|
+
_this2.$message({
|
|
240110
|
+
message: res.message,
|
|
240111
|
+
type: 'warning'
|
|
240112
|
+
});
|
|
240113
|
+
}
|
|
240114
|
+
}, function (err) {
|
|
240115
|
+
_this2.$message.error(err);
|
|
240116
|
+
});
|
|
240117
|
+
});
|
|
240118
|
+
});
|
|
240119
|
+
},
|
|
240078
240120
|
btnToDuBan: function btnToDuBan($scope) {
|
|
240079
240121
|
console.log(11, $scope);
|
|
240080
240122
|
window.open('/#/wflow?wfEngineUrl=dbgl/itemApply&busiCode=itemApply&wfName=督办立项&startNodeName=&title=' + $scope.vo.flSubject);
|
|
240081
240123
|
},
|
|
240082
240124
|
btnPrintWebFormClick: function btnPrintWebFormClick($scope) {
|
|
240083
|
-
console.log(91, $scope);
|
|
240084
240125
|
// let url = process.env.VUE_APP_BASE_API + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/print?inline=true&module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId
|
|
240085
240126
|
// url += '&httpPort=' + location.port
|
|
240086
240127
|
var params = location.href.split('?')[1];
|
|
240087
240128
|
window.open('#/print?' + params);
|
|
240088
240129
|
},
|
|
240089
|
-
btnSaveAsClick: function btnSaveAsClick($scope) {
|
|
240090
|
-
if ($scope.attachments.length === 0) {
|
|
240091
|
-
this.$alert(this.$tx('yoabase.alerts.notAttach', '当前文件没有附件。'), this.$tx('common.operationTip', '操作提示'), {
|
|
240092
|
-
type: 'warning'
|
|
240093
|
-
});
|
|
240094
|
-
return;
|
|
240095
|
-
}
|
|
240096
|
-
this.$scope = $scope;
|
|
240097
|
-
// let url = process.env.VUE_APP_BASE_API + '/' + $scope.wfEngineUrl.split('/')[0] + '/webForm/download?module=' + $scope.wfInstance.module + '&busiDataId=' + $scope.wfInstance.busiDataId
|
|
240098
|
-
// url += '&httpPort=' + location.port
|
|
240099
|
-
// window.open(url)
|
|
240100
|
-
},
|
|
240101
240130
|
btnPrintFileClick: function btnPrintFileClick($scope) {
|
|
240102
240131
|
if ($scope.bodyfile === null || $scope.bodyfile.id === undefined) {
|
|
240103
240132
|
this.$alert(this.$tx('yoabase.alerts.notPrBodyFile', '当前文件没有可打印正文文件。'), this.$tx('common.operationTip', '操作提示'), {
|
|
@@ -240217,11 +240246,11 @@ var PrintFilevue_type_template_id_db84b5ba_scoped_true_staticRenderFns = [];
|
|
|
240217
240246
|
;
|
|
240218
240247
|
var PrintFile_component = normalizeComponent(
|
|
240219
240248
|
components_PrintFilevue_type_script_lang_js,
|
|
240220
|
-
|
|
240221
|
-
|
|
240249
|
+
PrintFilevue_type_template_id_ed390518_scoped_true_render,
|
|
240250
|
+
PrintFilevue_type_template_id_ed390518_scoped_true_staticRenderFns,
|
|
240222
240251
|
false,
|
|
240223
240252
|
null,
|
|
240224
|
-
"
|
|
240253
|
+
"ed390518",
|
|
240225
240254
|
null
|
|
240226
240255
|
|
|
240227
240256
|
)
|