{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/form_print.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/form_print.vue","mtime":1725957645722},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/babel.config.js","mtime":1725957645200},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport Watermark from '@/assets/js/watermark';\nimport form_signlist from \"@/expandedComponents/form_sign_list.vue\";\nexport default {\n props: [\"printParams\", \"printData\"],\n components: {\n form_signlist: form_signlist\n },\n data: function data() {\n return {\n formdata: '',\n formTemplateDocid: '',\n queryData: '',\n currentUrl: '',\n windowHeight: 0\n };\n },\n created: function created() {\n var _this = this;\n var queryData = this.$route.query;\n this.queryData = queryData;\n if (queryData.printType == 14) {\n this.initForm({\n appId: queryData.appId,\n formId: queryData.formId,\n docId: queryData.docId\n });\n } else if (queryData.printType == 30) {\n var id = queryData.onActionPrint;\n var docId = queryData.docId;\n this.$api.getPrintCustomreports(id, docId, {\n onSucess: function onSucess(response) {\n var url = response.data;\n _this.currentUrl = obpmConfig.obpmFilePath + url;\n }\n });\n }\n //打印页面给body增加高度自适应,方便打印分页\n var docbody = document.body || document.getElementsByTagName('body')[0];\n docbody.style.miHeight = \"100%\";\n this.windowHeight = document.documentElement.clientHeight - 26;\n // docbody.style.height = \"auto\";\n },\n mounted: function mounted() {},\n computed: {\n template: function template() {\n var data = this.formdata;\n if (data && data.formTemplate) {\n //打印添加样式库\n if (data && data.style && data.style.content) {\n var css = data.style.content;\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n head.appendChild(style);\n style.type = 'text/css';\n style.appendChild(document.createTextNode(css));\n }\n return {\n methods: {\n findField: this.findField\n },\n template: \"
\" + data.formTemplate.template + \"
\"\n };\n } else {\n return {\n template: \"
\" + data + \"
\"\n };\n }\n }\n },\n methods: {\n printView: function printView() {\n if (this.queryData.printType == 30) {\n this.$refs.mainFrame.contentWindow.print();\n } else {\n window.print();\n }\n },\n findField: function findField(id) {\n var data = this.formdata;\n for (var i = 0; i < data.fields.length; i++) {\n var fld = data.fields[i];\n fld.docId = this.$route.query.docId;\n if (id == fld.id) return fld;\n }\n //TODO:临时处理隐藏字段--Jarod\n return {\n id: id,\n displayType: Constant.PermissionType_HIDDEN,\n hiddenValue: \"\"\n };\n },\n initForm: function initForm(_ref) {\n var _this2 = this;\n var appId = _ref.appId,\n formId = _ref.formId,\n docId = _ref.docId;\n this.$api.getPrintForm(appId, formId, docId, {\n onSucess: function onSucess(res) {\n _this2.formTemplateDocid = docId.replace(/_/g, \"\");\n var formdata = res.data.data;\n _this2.formdata = formdata;\n formdata.fields.forEach(function (field) {\n if (field.displayType != 3) {\n field.displayType = 5;\n } else {\n field.isPrint = true; //当是隐藏并且有隐藏值时,但又有打印时显示隐藏值时,判断是打印页面\n }\n });\n if (res.data.data.waterMarkText) {\n _this2.$nextTick(function () {\n var str = docId.replace(/_/g, \"\");\n var id = 'formTemplate_' + str;\n Watermark.set(res.data.data.waterMarkText, 'form-print');\n });\n }\n }\n });\n }\n }\n};",null]}