forked from zhurui/management
1 line
7.2 KiB
JSON
1 line
7.2 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\job\\schedule-add-or-update.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\job\\schedule-add-or-update.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\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\nimport debounce from 'lodash/debounce'\nimport { cron } from 'vue-cron'\nexport default {\n data () {\n return {\n visible: false,\n dataForm: {\n id: '',\n beanName: '',\n params: '',\n cronExpression: '',\n remark: '',\n status: 0\n },\n cronPopover: false\n }\n },\n components: {\n cron\n },\n computed: {\n dataRule () {\n return {\n beanName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n cronExpression: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ]\n }\n }\n },\n methods: {\n init () {\n this.visible = true\n this.$nextTick(() => {\n this.$refs['dataForm'].resetFields()\n if (this.dataForm.id) {\n this.getInfo()\n }\n })\n },\n changeCron (val) {\n this.dataForm.cronExpression = val\n },\n // 获取信息\n getInfo () {\n this.$http.get(`/job/schedule/${this.dataForm.id}`).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.dataForm = res.data\n }).catch(() => {})\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n this.$refs['dataForm'].validate((valid) => {\n if (!valid) {\n return false\n }\n this.$http[!this.dataForm.id ? 'post' : 'put']('/job/schedule', this.dataForm).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.$message({\n message: this.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: () => {\n this.visible = false\n this.$emit('refreshDataList')\n }\n })\n }).catch(() => {})\n })\n }, 1000, { 'leading': true, 'trailing': false })\n }\n}\n",{"version":3,"sources":["schedule-add-or-update.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"schedule-add-or-update.vue","sourceRoot":"src/views/modules/job","sourcesContent":["<template>\n <el-dialog :visible.sync=\"visible\" :title=\"!dataForm.id ? $t('add') : $t('update')\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\n <el-form :model=\"dataForm\" :rules=\"dataRule\" ref=\"dataForm\" @keyup.enter.native=\"dataFormSubmitHandle()\" label-width=\"120px\">\n <el-form-item prop=\"beanName\" :label=\"$t('schedule.beanName')\">\n <el-input v-model=\"dataForm.beanName\" :placeholder=\"$t('schedule.beanNameTips')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"params\" :label=\"$t('schedule.params')\">\n <el-input v-model=\"dataForm.params\" :placeholder=\"$t('schedule.params')\"></el-input>\n </el-form-item>\n <el-form-item prop=\"cronExpression\" :label=\"$t('schedule.cronExpression')\">\n <el-popover v-model=\"cronPopover\">\n <cron @change=\"changeCron\" @close=\"cronPopover=false\" i18n=\"cn\"></cron>\n <el-input slot=\"reference\" @click=\"cronPopover=true\" v-model=\"dataForm.cronExpression\" :placeholder=\"$t('schedule.cronExpressionTips')\"></el-input>\n </el-popover>\n </el-form-item>\n <el-form-item prop=\"remark\" :label=\"$t('schedule.remark')\">\n <el-input v-model=\"dataForm.remark\" :placeholder=\"$t('schedule.remark')\"></el-input>\n </el-form-item>\n </el-form>\n <template slot=\"footer\">\n <el-button @click=\"visible = false\">{{ $t('cancel') }}</el-button>\n <el-button type=\"primary\" @click=\"dataFormSubmitHandle()\">{{ $t('confirm') }}</el-button>\n </template>\n </el-dialog>\n</template>\n\n<script>\nimport debounce from 'lodash/debounce'\nimport { cron } from 'vue-cron'\nexport default {\n data () {\n return {\n visible: false,\n dataForm: {\n id: '',\n beanName: '',\n params: '',\n cronExpression: '',\n remark: '',\n status: 0\n },\n cronPopover: false\n }\n },\n components: {\n cron\n },\n computed: {\n dataRule () {\n return {\n beanName: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n cronExpression: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ]\n }\n }\n },\n methods: {\n init () {\n this.visible = true\n this.$nextTick(() => {\n this.$refs['dataForm'].resetFields()\n if (this.dataForm.id) {\n this.getInfo()\n }\n })\n },\n changeCron (val) {\n this.dataForm.cronExpression = val\n },\n // 获取信息\n getInfo () {\n this.$http.get(`/job/schedule/${this.dataForm.id}`).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.dataForm = res.data\n }).catch(() => {})\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n this.$refs['dataForm'].validate((valid) => {\n if (!valid) {\n return false\n }\n this.$http[!this.dataForm.id ? 'post' : 'put']('/job/schedule', this.dataForm).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.$message({\n message: this.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: () => {\n this.visible = false\n this.$emit('refreshDataList')\n }\n })\n }).catch(() => {})\n })\n }, 1000, { 'leading': true, 'trailing': false })\n }\n}\n</script>\n"]}]} |