{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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//\nimport flow from \"@/api/flow.js\";\nexport default {\n  props: [\"editData\"],\n  data: function data() {\n    return {\n      categoryList: [{\n        key: \"系统脚本\",\n        value: \"系统脚本\"\n      }],\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: function handleClose() {\n      this.dialogVisible = false;\n      this.formData = {\n        category: \"\",\n        memo: \"\",\n        name: \"\",\n        script: \"\"\n      };\n    },\n    saveUrl: function saveUrl() {\n      return window.context.bpmRunTime + \"/runtime/script/v1/save\";\n    },\n    beforeSaveData: function beforeSaveData() {\n      if (!this.formData.script || this.formData.script == \"\") {\n        this.$message({\n          message: \"脚本未填写\",\n          type: \"warning\"\n        });\n        return false;\n      }\n\n      if (!this.formData.category || this.formData.category == \"\") {\n        this.$message({\n          message: \"脚本分类不能为空\",\n          type: \"warning\"\n        });\n        return false;\n      }\n\n      this.isSubmit = true;\n    },\n    afterSaveData: function afterSaveData() {\n      this.handleClose();\n      this.$emit(\"loadList\");\n    },\n    handleOpen: function handleOpen() {\n      this.dialogVisible = true;\n      this.title = this.editData.title;\n\n      if (this.editData.data) {\n        this.formData = this.editData.data;\n      }\n\n      ;\n      this.getScriptType();\n    },\n    //执行脚本\n    executeScript: function executeScript() {\n      var _this = this;\n\n      flow.executeScript(this.formData.script).then(function (resp) {\n        if (resp.data.state) {\n          _this.$message({\n            message: resp.data.message,\n            type: \"success\"\n          });\n        }\n      });\n    },\n    //获取常用脚本分类\n    getScriptType: function getScriptType() {\n      var _this2 = this;\n\n      flow.getScriptType().then(function (resp) {\n        _this2.options = resp.data;\n      });\n    }\n  }\n};",null]}