{"remainingRequest":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/modulesDetail/FormFormat.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/modulesDetail/FormFormat.vue","mtime":1701674859502},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js","mtime":1701674874357},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js","mtime":1701674874903}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { getContextPath, getStaticPath } from '@/service/ModulesApi.js'\nimport ScriptEditor from '@/components/Common/scriptEditor'\nimport {delMsg} from '@/utils/elementui'\nexport default {\n name: 'FormFormat',\n components:{\n ScriptEditor\n },\n data() {\n return {\n appId: sessionStorage.getItem('appId'),\n iframeHeight: 400,\n iframeStyle: '', //iframe全屏样式\n iframeHeightBefore: 100,\n src: ``,\n contextPath: getContextPath(),\n staticPath: getStaticPath(),\n spanClick: 'handleSpanClick',\n\n scriptEditorVisible: false, // 脚本编辑器弹窗\n currentScriptEditor: '', // 当前点击的是哪一个脚本编辑器\n code: '', //新表单设计器打开脚本编辑器的值\n }\n },\n props: {\n showType: String,\n moduleId: String,\n formId: String,\n },\n mounted() {\n //操作脚本编辑器2021年5月8日14:00:56\n window['openIscript'] = (code, formIscriptName, scriptid) => {\n if (this.showType == 'new') {\n this.currentScriptEditor = 'newFormDesigner'\n } else {\n this.currentScriptEditor = 'oldFormDesigner'\n }\n this.code = code\n this.formIscriptName = formIscriptName\n this.scriptid = scriptid\n this.scriptEditorVisible = true\n }\n\n //操作iframe的全屏事件\n window[this.spanClick] = (isScresn) => {\n this.allScrean(isScresn)\n }\n\n this.getScollerHeight()\n\n if (this.showType == 'old') {\n this.src = `./formHtml/fcktest2.html?contextPath=${getContextPath()}`\n } else {\n this.src = `./formHtml/formbuilder/dist/index.html?contextPath=${getContextPath()}`\n }\n\n this.src += `&staticPath=${this.staticPath}&moduleId=${this.moduleId}&application=${this.appId}&formid=${this.formId}`\n },\n computed: {\n /**\n * 将 textarea 的值写入 脚本编辑器\n */\n showScritptEditorCode() {\n let code\n if (this.currentScriptEditor == 'newFormDesigner') {\n code = this.code\n } else if (this.currentScriptEditor == 'oldFormDesigner') {\n code = this.code\n }\n return code\n },\n },\n methods: {\n //全屏操作事件\n allScrean(isScresn) {\n if (isScresn) {\n this.iframeStyle =\n 'position:absolute;top:0;left:0;right:0;bottom:0;z-index:10'\n this.iframeHeight = '100%'\n } else {\n this.iframeStyle = ''\n console.log('brefore', this.iframeHeightBefore)\n this.iframeHeight = this.iframeHeightBefore\n }\n },\n\n //vue中的全屏按钮点击事件\n openAllScren() {\n this.$refs['formFormat'].contentWindow.document\n .getElementById('handleTest')\n .click()\n },\n\n // 重置字段id\n async resetId() {\n try{\n await delMsg(this.$t('msg.resetId'), this.$t('msg.tip'))\n this.$refs.formFormat.contentWindow.document.getElementById('resetid').click()\n this.$message.success(this.$t('msg.reset_ss'))\n }catch(e){\n console.log(e)\n }\n },\n\n /**\n * 动态计算页面table高度\n */\n getScollerHeight() {\n setTimeout(() => {\n let clientHeight =\n document.documentElement.clientHeight || document.body.clientHeight\n this.iframeHeight = clientHeight - 60 - 32 - 41 - 50 - 20 - 16\n this.iframeHeightBefore = clientHeight - 60 - 32 - 41 - 50 - 20 - 16\n }, 100)\n },\n\n save() {\n this.$refs.formFormat.contentWindow.document\n .getElementById('save_btn')\n .click()\n console.log(window.formFormat)\n return window.formFormat\n },\n\n /**\n * 将脚本编辑器的值写入到textarea中\n */\n handleScriptEditor(val) {\n if (this.currentScriptEditor == 'newFormDesigner') {\n this.$refs.formFormat.contentWindow.formApp.setScript(\n this.scriptid,\n this.formIscriptName,\n val\n )\n this.$refs.formFormat.contentWindow.document.getElementsByName(\n this.formIscriptName\n )[0].value = val\n } else if (this.currentScriptEditor == 'oldFormDesigner') {\n this.$refs.formFormat.contentWindow[\n this.$refs.formFormat.contentWindow.length - 1\n ][0].document.getElementById(this.formIscriptName).value = val\n }\n },\n },\n}\n",null]}