{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\flow\\help\\ScriptEdit.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\flow\\help\\ScriptEdit.vue","mtime":1675071992881},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n import flow from \"@/api/flow.js\";\n\n export default {\n props: [\"editData\"],\n data() {\n return {\n categoryList: [{ key: \"系统脚本\", value: \"系统脚本\" }],\n dialogVisible: false,\n title: \"\",\n isSubmit: false,\n formData: {\n category: \"\",\n memo: \"\",\n name: \"\",\n script: \"\"\n },\n text:\"请根据方法所需类型参数进行传参,避免执行失败\",\n typeDesc:\"可在下拉框输入新分类,保存后可自动新增分类选项\",\n options: [],\n cmOptions: {\n value: \"\",\n mode: \"groovy\",\n readOnly: false,\n smartIndent: true,\n tabSize: 2,\n theme: \"base16-light\",\n lineNumbers: true,\n line: true\n },\n };\n },\n methods: {\n handleClose() {\n this.dialogVisible = false;\n this.formData = {\n category: \"\",\n memo: \"\",\n name: \"\",\n script: \"\"\n };\n },\n saveUrl() {\n return window.context.bpmRunTime + \"/runtime/script/v1/save\";\n },\n beforeSaveData() {\n if(!this.formData.script || this.formData.script == \"\"){\n this.$message({message:\"脚本未填写\",type:\"warning\"});\n return false;\n }\n if(!this.formData.category || this.formData.category == \"\"){\n this.$message({message:\"脚本分类不能为空\",type:\"warning\"});\n return false;\n }\n this.isSubmit = true;\n },\n afterSaveData() {\n this.handleClose();\n this.$emit(\"loadList\");\n },\n handleOpen() {\n this.dialogVisible = true;\n this.title = this.editData.title;\n if (this.editData.data) {\n this.formData = this.editData.data;\n };\n this.getScriptType();\n },\n //执行脚本\n executeScript() {\n flow.executeScript(this.formData.script).then(resp => {\n if (resp.data.state) {\n this.$message({ message: resp.data.message, type: \"success\" });\n }\n });\n },\n //获取常用脚本分类\n getScriptType(){\n flow.getScriptType().then(resp=>{\n this.options=resp.data\n })\n }\n }\n};\n",null]}