|
@@ -2,6 +2,7 @@
|
|
|
<div class="container-fluid">
|
|
<div class="container-fluid">
|
|
|
<Navbar title="任务管理" :is-go-back="false" />
|
|
<Navbar title="任务管理" :is-go-back="false" />
|
|
|
<a-button type="primary" @click="showDrawer"> 创建任务 </a-button>
|
|
<a-button type="primary" @click="showDrawer"> 创建任务 </a-button>
|
|
|
|
|
+ <a-button type="dashed" style="margin-left: 8px;" @click="loadTaskTemplate"> 加载任务模板 </a-button>
|
|
|
<a-drawer
|
|
<a-drawer
|
|
|
v-model:visible="visible"
|
|
v-model:visible="visible"
|
|
|
class="custom-class"
|
|
class="custom-class"
|
|
@@ -466,6 +467,7 @@ import GroupResource from '../api/base/GroupResource.js';
|
|
|
import 'vue-select/dist/vue-select.css';
|
|
import 'vue-select/dist/vue-select.css';
|
|
|
import { Notify, Uuid } from 'pc-component-v3';
|
|
import { Notify, Uuid } from 'pc-component-v3';
|
|
|
import CommonTable from './CommonTable.vue';
|
|
import CommonTable from './CommonTable.vue';
|
|
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
vSelect,
|
|
vSelect,
|
|
@@ -628,6 +630,26 @@ export default {
|
|
|
_self.visible = true;
|
|
_self.visible = true;
|
|
|
_self.restore();
|
|
_self.restore();
|
|
|
},
|
|
},
|
|
|
|
|
+ loadTaskTemplate: function(){
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: Common.getApiURL('TaskDefineResource/generateTask'),
|
|
|
|
|
+ type: 'get',
|
|
|
|
|
+ contentType: 'application/json',
|
|
|
|
|
+ beforeSend: function(request) {
|
|
|
|
|
+ Common.addTokenToRequest(request);
|
|
|
|
|
+ },
|
|
|
|
|
+ success: function(data) {
|
|
|
|
|
+ if(data.errorCode == 0){
|
|
|
|
|
+ message.success(data.errorMessage);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ message.warning(data.errorMessage);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
+ Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
// changeCron: function (value) {
|
|
// changeCron: function (value) {
|
|
|
// var _self = this;
|
|
// var _self = this;
|
|
|
// _self.taskDefineDto.cronExpression = value;
|
|
// _self.taskDefineDto.cronExpression = value;
|