forked from zhurui/management
1 line
14 KiB
JSON
1 line
14 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.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\job\\schedule.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 mixinViewModule from '@/mixins/view-module'\nimport AddOrUpdate from './schedule-add-or-update'\nimport Log from './schedule-log'\nexport default {\n mixins: [mixinViewModule],\n data () {\n return {\n mixinViewModuleOptions: {\n getDataListURL: '/job/schedule/page',\n getDataListIsPage: true,\n deleteURL: '/job/schedule',\n deleteIsBatch: true\n },\n dataForm: {\n beanName: ''\n },\n logVisible: false\n }\n },\n components: {\n AddOrUpdate,\n Log\n },\n methods: {\n // 暂停\n pauseHandle (id) {\n if (!id && this.dataListSelections.length <= 0) {\n return this.$message({\n message: this.$t('prompt.deleteBatch'),\n type: 'warning',\n duration: 500\n })\n }\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.put('/job/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).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.getDataList()\n }\n })\n }).catch(() => {})\n }).catch(() => {})\n },\n // 恢复\n resumeHandle (id) {\n if (!id && this.dataListSelections.length <= 0) {\n return this.$message({\n message: this.$t('prompt.deleteBatch'),\n type: 'warning',\n duration: 500\n })\n }\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.put('/job/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).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.getDataList()\n }\n })\n }).catch(() => {})\n }).catch(() => {})\n },\n // 执行\n runHandle (id) {\n if (!id && this.dataListSelections.length <= 0) {\n return this.$message({\n message: this.$t('prompt.deleteBatch'),\n type: 'warning',\n duration: 500\n })\n }\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.put('/job/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).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.getDataList()\n }\n })\n }).catch(() => {})\n }).catch(() => {})\n },\n // 日志列表\n logHandle () {\n this.logVisible = true\n this.$nextTick(() => {\n this.$refs.log.init()\n })\n }\n }\n}\n",{"version":3,"sources":["schedule.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA;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;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.vue","sourceRoot":"src/views/modules/job","sourcesContent":["<template>\n <el-card shadow=\"never\" class=\"aui-card--fill\">\n <div class=\"mod-job__schedule\">\n <el-form :inline=\"true\" :model=\"dataForm\" @keyup.enter.native=\"getDataList()\">\n <el-form-item>\n <el-input v-model=\"dataForm.beanName\" :placeholder=\"$t('schedule.beanName')\" clearable></el-input>\n </el-form-item>\n <el-form-item>\n <el-button @click=\"getDataList()\">{{ $t('query') }}</el-button>\n </el-form-item>\n <el-form-item>\n <el-button v-if=\"$hasPermission('sys:schedule:save')\" type=\"primary\" @click=\"addOrUpdateHandle()\">{{ $t('add') }}</el-button>\n </el-form-item>\n <el-form-item>\n <el-button v-if=\"$hasPermission('sys:schedule:delete')\" type=\"danger\" @click=\"deleteHandle()\">{{ $t('deleteBatch') }}</el-button>\n </el-form-item>\n <el-form-item>\n <el-button v-if=\"$hasPermission('sys:schedule:pause')\" type=\"danger\" @click=\"pauseHandle()\">{{ $t('schedule.pauseBatch') }}</el-button>\n </el-form-item>\n <el-form-item>\n <el-button v-if=\"$hasPermission('sys:schedule:resume')\" type=\"danger\" @click=\"resumeHandle()\">{{ $t('schedule.resumeBatch') }}</el-button>\n </el-form-item>\n <el-form-item>\n <el-button v-if=\"$hasPermission('sys:schedule:run')\" type=\"danger\" @click=\"runHandle()\">{{ $t('schedule.runBatch') }}</el-button>\n </el-form-item>\n <el-form-item>\n <el-button v-if=\"$hasPermission('sys:schedule:log')\" type=\"success\" @click=\"logHandle()\">{{ $t('schedule.log') }}</el-button>\n </el-form-item>\n </el-form>\n <el-table\n v-loading=\"dataListLoading\"\n :data=\"dataList\"\n border\n @selection-change=\"dataListSelectionChangeHandle\"\n @sort-change=\"dataListSortChangeHandle\"\n style=\"width: 100%;\">\n <el-table-column type=\"selection\" header-align=\"center\" align=\"center\" width=\"50\"></el-table-column>\n <el-table-column prop=\"beanName\" :label=\"$t('schedule.beanName')\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"params\" :label=\"$t('schedule.params')\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"cronExpression\" :label=\"$t('schedule.cronExpression')\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"remark\" :label=\"$t('schedule.remark')\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"status\" :label=\"$t('schedule.status')\" sortable=\"custom\" header-align=\"center\" align=\"center\">\n <template slot-scope=\"scope\">\n <el-tag v-if=\"scope.row.status === 1\" size=\"small\">{{ $t('schedule.status1') }}</el-tag>\n <el-tag v-else size=\"small\" type=\"danger\">{{ $t('schedule.status0') }}</el-tag>\n </template>\n </el-table-column>\n <el-table-column :label=\"$t('handle')\" fixed=\"right\" header-align=\"center\" align=\"center\" width=\"150\">\n <template slot-scope=\"scope\">\n <el-button v-if=\"$hasPermission('sys:schedule:update')\" type=\"text\" size=\"small\" @click=\"addOrUpdateHandle(scope.row.id)\">{{ $t('update') }}</el-button>\n <el-button v-if=\"$hasPermission('sys:schedule:pause')\" type=\"text\" size=\"small\" @click=\"pauseHandle(scope.row.id)\">{{ $t('schedule.pause') }}</el-button>\n <el-button v-if=\"$hasPermission('sys:schedule:resume')\" type=\"text\" size=\"small\" @click=\"resumeHandle(scope.row.id)\">{{ $t('schedule.resume') }}</el-button>\n <el-button v-if=\"$hasPermission('sys:schedule:run')\" type=\"text\" size=\"small\" @click=\"runHandle(scope.row.id)\">{{ $t('schedule.run') }}</el-button>\n <el-button v-if=\"$hasPermission('sys:schedule:delete')\" type=\"text\" size=\"small\" @click=\"deleteHandle(scope.row.id)\">{{ $t('delete') }}</el-button>\n </template>\n </el-table-column>\n </el-table>\n <el-pagination\n :current-page=\"page\"\n :page-sizes=\"[10, 20, 50, 100]\"\n :page-size=\"limit\"\n :total=\"total\"\n layout=\"total, sizes, prev, pager, next, jumper\"\n @size-change=\"pageSizeChangeHandle\"\n @current-change=\"pageCurrentChangeHandle\">\n </el-pagination>\n <!-- 弹窗, 新增 / 修改 -->\n <add-or-update v-if=\"addOrUpdateVisible\" ref=\"addOrUpdate\" @refreshDataList=\"getDataList\"></add-or-update>\n <!-- 弹窗, 日志列表 -->\n <log v-if=\"logVisible\" ref=\"log\"></log>\n </div>\n </el-card>\n</template>\n\n<script>\nimport mixinViewModule from '@/mixins/view-module'\nimport AddOrUpdate from './schedule-add-or-update'\nimport Log from './schedule-log'\nexport default {\n mixins: [mixinViewModule],\n data () {\n return {\n mixinViewModuleOptions: {\n getDataListURL: '/job/schedule/page',\n getDataListIsPage: true,\n deleteURL: '/job/schedule',\n deleteIsBatch: true\n },\n dataForm: {\n beanName: ''\n },\n logVisible: false\n }\n },\n components: {\n AddOrUpdate,\n Log\n },\n methods: {\n // 暂停\n pauseHandle (id) {\n if (!id && this.dataListSelections.length <= 0) {\n return this.$message({\n message: this.$t('prompt.deleteBatch'),\n type: 'warning',\n duration: 500\n })\n }\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.put('/job/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).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.getDataList()\n }\n })\n }).catch(() => {})\n }).catch(() => {})\n },\n // 恢复\n resumeHandle (id) {\n if (!id && this.dataListSelections.length <= 0) {\n return this.$message({\n message: this.$t('prompt.deleteBatch'),\n type: 'warning',\n duration: 500\n })\n }\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.put('/job/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).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.getDataList()\n }\n })\n }).catch(() => {})\n }).catch(() => {})\n },\n // 执行\n runHandle (id) {\n if (!id && this.dataListSelections.length <= 0) {\n return this.$message({\n message: this.$t('prompt.deleteBatch'),\n type: 'warning',\n duration: 500\n })\n }\n this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {\n confirmButtonText: this.$t('confirm'),\n cancelButtonText: this.$t('cancel'),\n type: 'warning'\n }).then(() => {\n this.$http.put('/job/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).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.getDataList()\n }\n })\n }).catch(() => {})\n }).catch(() => {})\n },\n // 日志列表\n logHandle () {\n this.logVisible = true\n this.$nextTick(() => {\n this.$refs.log.init()\n })\n }\n }\n}\n</script>\n"]}]} |