{"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\\ConditionScriptEdit.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\flow\\help\\ConditionScriptEdit.vue","mtime":1675071992835},{"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":["import \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\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//\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//\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      isEnable: [{\n        key: 0,\n        value: \"无效\"\n      }, {\n        key: 1,\n        value: \"有效\"\n      }],\n      className: [],\n      title: \"\",\n      dialogVisible: false,\n      formData: {\n        type: 2,\n        className: \"\",\n        classInsName: \"\",\n        createOrgId: \"\",\n        enable: 1,\n        methodDesc: \"\",\n        methodName: \"\",\n        returnType: \"\",\n        argument: [{\n          paraName: \"\",\n          paraType: \"\",\n          paraDesc: \"\"\n        }]\n      },\n      isSubmit: false,\n      status: \"\",\n      argument: [],\n      options: [{\n        label: \"基本选择器\",\n        options: [{\n          value: \"base:user-selector\",\n          label: \"用户选择器\"\n        }, {\n          value: \"base:org-selector\",\n          label: \"组织选择器\"\n        }, {\n          value: \"base:role-selector\",\n          label: \"角色选择器\"\n        }, {\n          value: \"base:pos-selector\",\n          label: \"岗位选择器\"\n        }, {\n          value: \"base:job-selector\",\n          label: \"职务选择器\"\n        }, {\n          value: \"base:dem-selector\",\n          label: \"维度选择器\"\n        }]\n      }, {\n        label: \"\",\n        options: [{\n          value: \"\",\n          label: \"\"\n        }]\n      }],\n      field: [],\n      linkageData: [],\n      methodName: [],\n      methodChangeData: []\n    };\n  },\n  methods: {\n    //打开侧边栏\n    handleOpen: function handleOpen() {\n      this.dialogVisible = true;\n\n      if (this.editData.data) {\n        this.formData = this.editData.data;\n        this.argument = JSON.parse(this.editData.data.argument);\n      }\n\n      if (this.editData.status) {\n        this.status = this.editData.status;\n      }\n\n      if (!this.editData.id) {\n        this.getConditionScriptEditData('');\n      }\n\n      this.title = this.editData.title;\n      this.getClassName();\n    },\n    //获取选择器\n    getConditionScriptEditData: function getConditionScriptEditData(id) {\n      var _this = this;\n\n      flow.getConditionScriptEditData(id).then(function (resp) {\n        _this.linkageData = resp.data;\n        var optionsLabel = resp.data.optionJson[0].lable;\n        var options = [];\n\n        for (var i = 0; i < resp.data.optionJson[0].option.length; i++) {\n          var value = resp.data.optionJson[0].option[i].value;\n          var label = resp.data.optionJson[0].option[i].name;\n          options.push({\n            value: value,\n            label: label\n          });\n        }\n\n        _this.options[1].label = optionsLabel;\n        _this.options[1].options = options;\n      });\n    },\n    //获取选定选择器的字段\n    selectorChange: function selectorChange(row) {\n      switch (row) {\n        case \"base:user-selector\":\n          this.field = [{\n            comment: \"id\",\n            field: \"id\"\n          }, {\n            comment: \"fullname\",\n            field: \"fullname\"\n          }, {\n            comment: \"account\",\n            field: \"account\"\n          }];\n          break;\n\n        case \"base:org-selector\":\n          this.field = [{\n            comment: \"id\",\n            field: \"id\"\n          }, {\n            comment: \"name\",\n            field: \"name\"\n          }, {\n            comment: \"code\",\n            field: \"code\"\n          }];\n          break;\n\n        case \"base:role-selector\":\n          this.field = [{\n            comment: \"id\",\n            field: \"id\"\n          }, {\n            comment: \"name\",\n            field: \"name\"\n          }, {\n            comment: \"code\",\n            field: \"code\"\n          }];\n          break;\n\n        case \"base:pos-selector\":\n          this.field = [{\n            comment: \"id\",\n            field: \"id\"\n          }, {\n            comment: \"name\",\n            field: \"name\"\n          }, {\n            comment: \"code\",\n            field: \"code\"\n          }];\n          break;\n\n        case \"base:job-selector\":\n          this.field = [{\n            comment: \"id\",\n            field: \"id\"\n          }, {\n            comment: \"name\",\n            field: \"name\"\n          }, {\n            comment: \"code\",\n            field: \"code\"\n          }];\n          break;\n\n        case \"base:dem-selector\":\n          this.field = [{\n            comment: \"id\",\n            field: \"id\"\n          }, {\n            comment: \"name\",\n            field: \"name\"\n          }, {\n            comment: \"code\",\n            field: \"code\"\n          }];\n          break;\n      }\n\n      for (var i = 0; i < this.linkageData.optionJson[0].option.length; i++) {\n        if (row == this.linkageData.optionJson[0].option[i].value) {\n          this.field = JSON.parse(this.linkageData.optionJson[0].option[i].resultfield);\n          return;\n        }\n      }\n    },\n    //关闭侧边栏\n    handleClose: function handleClose() {\n      this.dialogVisible = false;\n      this.field = [];\n      this.status = \"\";\n      this.argument = [];\n      this.formData = {\n        type: 2,\n        className: \"\",\n        classInsName: \"\",\n        createOrgId: \"\",\n        enable: 1,\n        methodDesc: \"\",\n        methodName: \"\",\n        returnType: \"\",\n        argument: [{\n          paraName: \"\",\n          paraType: \"\",\n          paraDesc: \"\"\n        }]\n      };\n      this.$emit(\"loadData\");\n    },\n    saveUrl: function saveUrl() {\n      return window.context.bpmRunTime + \"/runtime/conditionScript/v1/save\";\n    },\n    beforeSaveData: function beforeSaveData() {\n      this.formData.argument = JSON.stringify(this.argument);\n      this.isSubmit = true;\n    },\n    afterSaveData: function afterSaveData() {\n      this.handleClose();\n    },\n    //方法切换\n    methodNameChange: function methodNameChange(row) {\n      for (var i = 0; i < this.methodChangeData.length; i++) {\n        if (row == this.methodChangeData[i].methodName) {\n          this.formData.returnType = this.methodChangeData[i].returnType;\n          this.argument = this.methodChangeData[i].para;\n          return;\n        }\n      }\n    },\n    //切换脚本所在类\n    classNameChange: function classNameChange() {\n      var _this2 = this;\n\n      this.methodName = [];\n\n      if (!this.formData.id) {\n        this.formData.id = '';\n      }\n\n      var classInName = this.formData.className.substr(this.formData.className.lastIndexOf(\".\") + 1, this.formData.className.length);\n      this.formData.classInsName = classInName.replace(classInName[0], classInName[0].toLowerCase());\n      flow.getClassMethod(this.formData.className, this.formData.id, this.formData.type).then(function (resp) {\n        if (resp.data.state) {\n          var result = JSON.parse(resp.data.value);\n          _this2.methodChangeData = result;\n\n          for (var i = 0; i < result.length; i++) {\n            _this2.methodName.push({\n              value: result[i].methodName\n            });\n          }\n        }\n      });\n    },\n    //获取脚本所在类\n    getClassName: function getClassName() {\n      var _this3 = this;\n\n      this.className = [];\n      flow.getConditionScriptClassName(this.formData.type).then(function (resp) {\n        for (var i = 0; i < resp.data.length; i++) {\n          _this3.className.push({\n            value: resp.data[i]\n          });\n        }\n      });\n    }\n  }\n};",null]}