Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web
commit
7ed399ecac
|
@ -27,4 +27,12 @@ export function updateById(data){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
export function deleteByTaskId(id) {
|
||||||
|
return request({
|
||||||
|
url: "/task/task/deleteById/" + id,
|
||||||
|
method: "POST"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,6 @@
|
||||||
<span style="margin-left: 10px" v-if="scope.row.status ==0 ">待执行</span>
|
<span style="margin-left: 10px" v-if="scope.row.status ==0 ">待执行</span>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.status ==1 ">正在执行</span>
|
<span style="margin-left: 10px" v-if="scope.row.status ==1 ">正在执行</span>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.status ==2 ">执行完毕</span>
|
<span style="margin-left: 10px" v-if="scope.row.status ==2 ">执行完毕</span>
|
||||||
<span style="margin-left: 10px">{{ scope.row.status }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -127,7 +126,6 @@
|
||||||
<span style="margin-left: 10px" v-if="scope.row.status ==0 ">待执行</span>
|
<span style="margin-left: 10px" v-if="scope.row.status ==0 ">待执行</span>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.status ==1 ">正在执行</span>
|
<span style="margin-left: 10px" v-if="scope.row.status ==1 ">正在执行</span>
|
||||||
<span style="margin-left: 10px" v-if="scope.row.status ==2 ">执行完毕</span>
|
<span style="margin-left: 10px" v-if="scope.row.status ==2 ">执行完毕</span>
|
||||||
<span style="margin-left: 10px">{{ scope.row.status }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -139,7 +137,7 @@
|
||||||
icon="el-icon-pear"
|
icon="el-icon-pear"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="update(scope.row)">执行</el-button>
|
@click="executeTask(scope.row)">执行</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
@ -181,6 +179,124 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加任务详情设计-->
|
||||||
|
<el-dialog title="添加表" :visible.sync="taskInputAdd">
|
||||||
|
|
||||||
|
<el-form label-width="80px" :model="taskInputReq" ref="queryForm" :inline="true" class="demo-form-inline" size="small">
|
||||||
|
<el-form-item label="任务id">
|
||||||
|
<el-input v-model="taskInputReq.taskId"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="数据库id">
|
||||||
|
<el-input v-model="taskInputReq.databaseId"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表">
|
||||||
|
<el-select v-model="taskReq.tableName" placeholder="请选择等级">
|
||||||
|
<el-option label="请选择" value="0"></el-option>
|
||||||
|
<span v-for="table in tableList">
|
||||||
|
<el-option :label=table.tableName :value=table.id :key=table.id></el-option>
|
||||||
|
</span>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="表别名">
|
||||||
|
<el-input v-model="taskInputReq.tableAsName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="taskInputAdd = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addTaskInput()">下一步</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addTask()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 字段选择列表-->
|
||||||
|
<el-dialog title="添加表" :visible.sync="taskInputFieldAdd">
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="taskList"
|
||||||
|
style="width: 100%"
|
||||||
|
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="字段"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i class="el-icon-time"></i>
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="类型/长度"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i class="el-icon-time"></i>
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="非空"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i class="el-icon-time"></i>
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="注释"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<i class="el-icon-time"></i>
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="处理规则"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.weigh ==1 ">非空规则</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.weigh ==2 ">非空规则</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.weigh ==3 ">非空规则</span>
|
||||||
|
<span style="margin-left: 10px" v-if="scope.row.weigh ==4 ">非空规则</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="表别名"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<input type="text">
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addTask()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -194,7 +310,7 @@ import {selectSourceExport} from "@/api/etl/switch";
|
||||||
import {connectionTest} from "@/api/etl/switch";
|
import {connectionTest} from "@/api/etl/switch";
|
||||||
import {insertAdd} from "@/api/etl/switch";
|
import {insertAdd} from "@/api/etl/switch";
|
||||||
import {getInfo} from "@/api/etl/switch";
|
import {getInfo} from "@/api/etl/switch";
|
||||||
import { addTask, selectTaskList, updateById } from '@/api/task/task'
|
import { addTask, deleteById, deleteByTaskId, selectTaskList, updateById } from '@/api/task/task'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
|
@ -205,11 +321,17 @@ export default {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dialogFormVisible:false,
|
dialogFormVisible:false,
|
||||||
|
//任务设计添加表弹窗
|
||||||
|
taskInputAdd:false,
|
||||||
|
//选择字段弹窗
|
||||||
|
taskInputFieldAdd:false,
|
||||||
taskReq:{
|
taskReq:{
|
||||||
|
|
||||||
},
|
},
|
||||||
taskAddReq:{},
|
taskAddReq:{},
|
||||||
|
taskInputReq:{},
|
||||||
taskList:[],
|
taskList:[],
|
||||||
|
tableList:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//计算属性 类似于data概念",
|
//计算属性 类似于data概念",
|
||||||
|
@ -218,6 +340,15 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
|
executeTask(){
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
addTaskInput(){
|
||||||
|
this.taskInputAdd = false;
|
||||||
|
this.taskInputFieldAdd = true;
|
||||||
|
},
|
||||||
|
|
||||||
//添加页面展示
|
//添加页面展示
|
||||||
handleAdd(){
|
handleAdd(){
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
|
@ -246,6 +377,15 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleDelete(row){
|
||||||
|
deleteByTaskId(row.getId).then(res=>{
|
||||||
|
alert(res.msg);
|
||||||
|
if(res.code == 200){
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
handleSelectionChange(row){
|
handleSelectionChange(row){
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue