{"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\\applicationCenter\\SchedulerManager\\SchedulerManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\applicationCenter\\SchedulerManager\\SchedulerManager.vue","mtime":1675071992772},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 sys from '@/api/portal.js';\nexport default {\n  components: {},\n  data: function data() {\n    return {\n      schedulerDisabled: false,\n      schedulerTitle: '',\n      loadDataUrl: '',\n      dialogVisible: false,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      isSubmit: true,\n      scheduler: {},\n      ent: {},\n      isStandby: true,\n      isExistUrl: '',\n      isExistType: '',\n      validClassUrl: '',\n      parameterJson: [],\n      paraTypes: [{\n        key: 'int',\n        value: 'int'\n      }, {\n        key: 'long',\n        value: 'long'\n      }, {\n        key: 'float',\n        value: 'float'\n      }, {\n        key: 'string',\n        value: 'string'\n      }, {\n        key: 'boolean',\n        value: 'boolean'\n      }],\n      isEdit: false,\n      saveschedulerUrl: '',\n      executeJobUrl: ''\n    };\n  },\n  computed: {\n    requestMethod: function requestMethod() {\n      return this.scheduler.id ? 'GET' : 'POST';\n    }\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\n  },\n  updated: function updated() {\n    if (this.isEdit) {\n      this.saveschedulerUrl = window.context.portal + '/job/scheduler/v1/saveJob?jobName=' + encodeURI(this.scheduler.jobName);\n    } else {\n      this.saveschedulerUrl = window.context.portal + '/job/scheduler/v1/addJob';\n    }\n  },\n  methods: {\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.schedulerTable.$refs.htTable.toggleRowSelection(row);\n    },\n    //验证定时计划执行类是否存在\n    validClass: function validClass() {\n      if (this.scheduler && this.scheduler.className) {\n        this.validClassUrl = '/job/scheduler/v1/validClass?className=' + this.scheduler.className + '&radom=' + Math.random();\n      } else {\n        this.$message.warning('请先输入任务类再点击验证按钮');\n      }\n    },\n    //验证任务名和类名\n    isExist: function isExist(type) {\n      this.isExistType = type;\n      var name = this.scheduler.className;\n\n      if (type == 'jobName') {\n        name = this.scheduler.jobName;\n      }\n\n      this.isExistUrl = '/job/scheduler/v1/isExist?type=' + type + '&name=' + name;\n    },\n    //切换定时计划状态\n    changeStart: function changeStart() {\n      var _this = this;\n\n      sys.changeStart(this.isStandby).then(function (data) {\n        if (data.state) {\n          _this.$message.success(data.message);\n        } else {\n          _this.$message.error(data.message || '操作失败');\n        }\n      }, function (error) {\n        _this.$message.error(error || '操作失败');\n      });\n    },\n    deleteEntRows: function deleteEntRows(rows) {\n      this.parameterJson.remove(rows);\n    },\n    addEntRows: function addEntRows() {\n      var temp = {\n        name: '',\n        type: '',\n        value: '',\n        relation: ''\n      };\n      this.parameterJson.push(temp);\n    },\n    beforeSaveData: function beforeSaveData() {\n      if (!this.scheduler.className) {\n        this.$message.warning('任务类不能为空');\n        this.isSubmit = false;\n        return;\n      }\n\n      this.scheduler.parameterJson = JSON.stringify(this.parameterJson);\n      this.isSubmit = true;\n    },\n    afterSaveData: function afterSaveData() {\n      this.isEdit = false;\n      this.dialogVisible = false;\n      this.$refs.schedulerTable.load();\n    },\n    afterGetStand: function afterGetStand(data) {\n      this.isStandby = data;\n    },\n    afterValidClass: function afterValidClass(rep) {\n      if (rep && rep.state) {\n        this.$message.success(rep.message);\n      }\n    },\n    afterExecuteJob: function afterExecuteJob(rep) {\n      if (rep && rep.state) {\n        this.$message.success(rep.message);\n      } else {\n        this.$message.error(rep.message || '执行失败');\n      }\n\n      this.executeJobUrl = '';\n    },\n    afterIsExist: function afterIsExist(data) {\n      if (data) {\n        var msg = this.isExistType == 'jobName' ? '任务名称已经存在，请重新填写！' : '任务列表中已添加该任务类记录，不能多次添加同一任务类！';\n        this.$message.error(msg);\n\n        if (this.isExistType == 'jobName') {\n          this.scheduler.jobName = '';\n        } else {\n          this.scheduler.className = '';\n        }\n      }\n\n      this.isExistType = '';\n      this.isExistUrl = '';\n    },\n    afterLoadData: function afterLoadData(data) {\n      var _this2 = this;\n\n      // 编辑定时计划\n      if (this.dialogVisible) {\n        this.scheduler = data;\n\n        if (this.scheduler.parameterJson) {\n          this.parameterJson = JSON.parse(this.scheduler.parameterJson);\n        } else {\n          this.parameterJson = [];\n        }\n\n        setTimeout(function () {\n          return _this2.$validator.validateAll('editschedulerForm');\n        });\n      }\n    },\n    dialogCancle: function dialogCancle(dialogVisible) {\n      var _this3 = this;\n\n      this.loadDataUrl = '';\n      this[dialogVisible] = false;\n      this.isEdit = false;\n      setTimeout(function () {\n        return _this3.schedulerDisabled = false;\n      }, 500);\n    },\n    handleClose: function handleClose() {\n      var _this4 = this;\n\n      this.loadDataUrl = '';\n      this.dialogVisible = false;\n      this.isEdit = false;\n      setTimeout(function () {\n        return _this4.schedulerDisabled = false;\n      }, 500);\n    },\n    showDialog: function showDialog(row) {\n      this.dialogVisible = true;\n\n      if (row) {\n        this.isEdit = true;\n        this.loadDataUrl = \"/job/scheduler/v1/getJobDetail?name=\".concat(encodeURI(row.jobName));\n      } else {\n        this.parameterJson = [];\n      }\n    },\n    handleNodeClick: function handleNodeClick(node) {},\n    loadData: function loadData(param, cb) {\n      var _this5 = this;\n\n      sys.getschedulerPageJson(param).then(function (response) {\n        _this5.data = response.rows;\n        _this5.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    handleCommand: function handleCommand(params) {\n      var _this6 = this;\n\n      switch (params.command) {\n        case 'lookLog':\n          //this.$router.push(\"/executeJobList/\" + params.row.jobName);\n          this.$router.push({\n            name: 'executeJobList',\n            params: {\n              jobName: params.row.jobName,\n              tobName: params.row.jobName + '定时计划日志'\n            }\n          }); //this.$router.go({name: 'executeJobList', params: {jobName: 'com.hotent.job.job.FlowStartJob'}});\n\n          break;\n\n        case 'triggersJob':\n          this.$router.push({\n            name: 'schedulerTriggerList',\n            params: {\n              jobName: encodeURI(params.row.jobName),\n              tobName: '触发器列表'\n            }\n          });\n          break;\n\n        case 'edit':\n          this.parameterJson = [];\n          this.schedulerTitle = '编辑定时计划';\n          this.showDialog(params.row);\n          this.isEdit = true;\n          break;\n\n        case 'add':\n          this.scheduler = {};\n          this.parameterJson = [];\n          this.schedulerTitle = '添加定时计划';\n          this.showDialog();\n          break;\n\n        case 'get':\n          this.schedulerTitle = '查看定时计划';\n          this.isSubmit = false;\n          this.schedulerDisabled = true;\n          this.showDialog(params.row);\n          break;\n\n        case 'delete':\n          this.$confirm('是否确认删除？', '提示', {\n            confirmButtonText: '确定',\n            cancelButtonText: '取消',\n            type: 'warning'\n          }).then(function () {\n            sys.delJob(params.row.jobName).then(function (data) {\n              if (data.state) {\n                _this6.$message.success(data.message);\n\n                _this6.$refs.schedulerTable.load();\n              } else {\n                _this6.$message.error(data.message || '删除失败');\n              }\n            }, function (error) {\n              _this6.$message.error(error || '删除失败');\n            });\n          }).catch(function () {});\n          break;\n\n        case 'executeJob':\n          this.executeJobUrl = '/job/scheduler/v1/executeJob?jobName=' + params.row.jobName;\n          break;\n\n        default:\n          break;\n      }\n    }\n  }\n};",null]}