Merge remote-tracking branch 'origin/master'

master
chaiyapeng 2024-08-23 20:01:47 +08:00
commit 621ee3387d
4 changed files with 155 additions and 6 deletions

View File

@ -19,11 +19,19 @@ export function addTask(data){
}
//修改
export function updateById(data){
export function updateById(data) {
return request({
url: "/task/task/updateById",
method: "POST",
data:data
data: data
})
}
//删除
export function deleteByTaskId(id) {
return request({
url: "/task/task/deleteById/" + id,
method: "POST"
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

View File

@ -77,6 +77,7 @@
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>

View File

@ -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 ==1 "></span>
<span style="margin-left: 10px" v-if="scope.row.status ==2 "></span>
<span style="margin-left: 10px">{{ scope.row.status }}</span>
</template>
</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 ==1 "></span>
<span style="margin-left: 10px" v-if="scope.row.status ==2 "></span>
<span style="margin-left: 10px">{{ scope.row.status }}</span>
</template>
</el-table-column>
@ -139,7 +137,7 @@
icon="el-icon-pear"
size="mini"
type="text"
@click="update(scope.row)">执行</el-button>
@click="executeTask(scope.row)">执行</el-button>
<el-button
icon="el-icon-delete"
@ -181,6 +179,124 @@
</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>
@ -194,7 +310,7 @@ import {selectSourceExport} from "@/api/etl/switch";
import {connectionTest} from "@/api/etl/switch";
import {insertAdd} 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 {
//import使"
@ -205,11 +321,17 @@ export default {
return {
dialogFormVisible:false,
//
taskInputAdd:false,
//
taskInputFieldAdd:false,
taskReq:{
},
taskAddReq:{},
taskInputReq:{},
taskList:[],
tableList:[],
};
},
// data",
@ -218,6 +340,15 @@ export default {
watch: {},
//",
methods: {
executeTask(){
},
addTaskInput(){
this.taskInputAdd = false;
this.taskInputFieldAdd = true;
},
//
handleAdd(){
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){
},