{"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/Common/scriptEditor.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/Common/scriptEditor.vue","mtime":1701674859499},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport CodeMirror from \"@/components/Common/CodeMirror\";\nimport { scriptPrecompilation } from \"@/service/AdvancedToolAPI.js\";\nimport { getContextPath, getStaticPath} from \"@/service/ModulesApi.js\";\nexport default {\n data() {\n return {\n fontSize: \"12\",\n url: `./scriptHelpHtml/index.html?contextPath=${getContextPath()}&staticPath=${getStaticPath()}`,\n editor:'',//脚本编辑器的初始化内容\n btnLoading: false, // 按钮的加载图标\n isfullscreen: false,// 全屏\n editorHeight:'320px',\n iframeStyle:{\n height: \"320px\",\n width: \"100%\",\n overflow: \"auto\",\n }\n };\n },\n created(){\n this.editor=this.editorCode;\n },\n methods: {\n // 弹框关闭回调\n handleClose() {\n this.$emit(\"closeScriptEditorDialog\");\n },\n // 回退上一步\n preStep() {\n this.$refs.codemirror.undo();\n },\n // 下一步\n nextStep() {\n this.$refs.codemirror.redo();\n },\n // 预编译\n async precompiled() {\n let iscriptString = this.$refs.codemirror.getEditor().trim();\n if (!iscriptString) {\n return this.$message.error(this.$t('placeholder.content'));\n }\n this.btnLoading = true;\n const response = await scriptPrecompilation({ iscriptString: iscriptString });\n this.btnLoading = false;\n if (response.data.errcode == 0) {\n if(response.data.data !== 'SUCCESS!'){\n this.$message.error(response.data.data)\n }else{\n this.$message.success(response.data.data);\n }\n }\n },\n // 脚本编辑器确认\n scriptEditorConfirm() {\n // 写入文本框中\n this.$emit(\"saveScriptEditor\", this.$refs.codemirror.getEditor());\n // this.code = this.$refs.codemirror.getEditor();\n this.$emit(\"closeScriptEditorDialog\");\n },\n // 脚本编辑器取消\n scriptEditorCancel() {\n // this.$refs.codemirror.setCodeEditor(this.editorCode);\n this.$refs.codemirror.refresh();\n this.$emit(\"closeScriptEditorDialog\");\n },\n // 全屏\n IsFullscreen() {\n let windowHeight=document.documentElement.clientHeight\n this.isfullscreen=!this.isfullscreen\n this.$refs[\"scriptEditorMainHeight\"].style.height=this.isfullscreen?windowHeight*0.65+'px':windowHeight*0.5+'px'\n this.editorHeight=this.isfullscreen?windowHeight*0.65+'px':windowHeight*0.5+'px'\n this.iframeStyle[\"height\"]=this.isfullscreen?windowHeight*0.65+'px':windowHeight*0.5+'px'\n } \n },\n components: {\n CodeMirror,\n },\n props: {\n scriptEditorVisible: Boolean,\n editorCode: String,\n isNested: {\n type: Boolean,\n default: true,\n },\n },\n watch: {},\n};\n",null]}