Commit 94812605 by 莫晓莉

策略增删改查

parent 1eb11b8b
import request from '@/utils/request'
// 分页获取策略配置列表
export function getKettleRepositoryList(data) {
return request({
url: 'kettle/quartz/getKettleQuartzPageList',
data,
method: 'post'
})
}
// 新增策略配置
export function insert(data) {
return request({
url: 'kettle/quartz/insert',
data,
method: 'post'
})
}
//更新策略配置
export function update(data) {
return request({
url: 'kettle/quartz/update',
data,
method: 'post'
})
}
//删除策略配置
export function deleteStrategy(data) {
return request({
url: 'kettle/quartz/delete?id='+data,
method: 'post'
})
}
import request from '@/utils/request'
// 分页获取作业列表
export function getKettleJobList(data) {
return request({
url: 'kettle/job/getKettleJobList',
data,
method: 'post'
})
}
//添加作业
export function insert(data) {
return request({
url: 'kettle/job/insert',
data,
method: 'post'
})
}
//更新数据库资源库
export function update(data) {
return request({
url: 'kettle/repository/update',
data,
method: 'post'
})
}
//删除数据库资源库
export function deleteList(data) {
return request({
url: 'kettle/repository/delete?id='+data,
method: 'post'
})
}
...@@ -10,60 +10,61 @@ ...@@ -10,60 +10,61 @@
@click="showAll()" @click="showAll()"
></i> ></i>
</div> </div>
<el-button class="btn-brush" icon="el-icon-plus"  @click="closeModal" >新增数据库资源库</el-button> <div v-show="jobShow" class="card-body">
<div> <el-button class="btn-brush" icon="el-icon-plus"  @click="closeModal" >新增数据库资源库</el-button>
<el-table <div>
v-loading="loading" <el-table
:data="tableData" v-loading="loading"
border :data="tableData"
style="width: 100%" border
:header-cell-style="{ color: '#606266' }" style="width: 100%"
> :header-cell-style="{ color: '#606266' }"
<el-table-column prop="id" label="资源库编号" align="center" /> >
<el-table-column prop="name" label="资源库名称" align="center"> <el-table-column prop="id" label="资源库编号" align="center" />
</el-table-column> <el-table-column prop="name" label="资源库名称" align="center">
</el-table-column>
<el-table-column prop="databaseHost" label="资源库主机名或IP地址" align="center" /> <el-table-column prop="databaseHost" label="资源库主机名或IP地址" align="center" />
<el-table-column prop="databaseName" label="资源库数据库名称" align="center" /> <el-table-column prop="databaseName" label="资源库数据库名称" align="center" />
<el-table-column label="资源库更新时间" align="center"> <el-table-column label="资源库更新时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.updateTime | dateFormat }} {{ scope.row.updateTime | dateFormat }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop label="操作" width="200" align="center"> <el-table-column prop label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
@click="editModal(scope.row)" @click="editModal(scope.row)"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
@click="deleteList(scope.row)" @click="deleteList(scope.row)"
>删除</el-button >删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
layout="total ,prev, pager, next" layout="total ,prev, pager, next"
:total="pageInfo.total" :total="pageInfo.total"
:page-size="pageInfo.size" :page-size="pageInfo.size"
:current-page="pageInfo.page" :current-page="pageInfo.page"
@size-change="sizeChange" @size-change="sizeChange"
@current-change="pageChange" @current-change="pageChange"
/> />
</div>
</div>
</div> </div>
</div>
</el-card> </el-card>
<!-- 新增和编辑弹窗start --> <!-- 新增和编辑弹窗start -->
...@@ -184,7 +185,7 @@ export default { ...@@ -184,7 +185,7 @@ export default {
page: 1, page: 1,
size: 10, size: 10,
}, },
loading: false, loading: true,
headers: {}, // 头部信息 headers: {}, // 头部信息
centerDialogVisible: false, centerDialogVisible: false,
form: { form: {
...@@ -231,17 +232,17 @@ export default { ...@@ -231,17 +232,17 @@ export default {
{required:true,message:'请输入资源库数据库登录密码',trigger:'blur'} {required:true,message:'请输入资源库数据库登录密码',trigger:'blur'}
], ],
}, },
options: [{ // options: [{
code: '选项1', // code: '选项1',
}, { // }, {
code: '选项2', // code: '选项2',
}, { // }, {
code: '选项3', // code: '选项3',
}, { // }, {
code: '选项4', // code: '选项4',
}, { // }, {
code: '选项5', // code: '选项5',
}], // }],
// value: '', // value: '',
dialogMsgAdd:'添加数据库资源库', dialogMsgAdd:'添加数据库资源库',
dialogMsgEdit:'编辑数据库资源库', dialogMsgEdit:'编辑数据库资源库',
...@@ -264,6 +265,10 @@ export default { ...@@ -264,6 +265,10 @@ export default {
console.log('分页获取数据库资源库列表',res); console.log('分页获取数据库资源库列表',res);
this.tableData = res.data.rows; this.tableData = res.data.rows;
this.pageInfo.total = res.data.total; this.pageInfo.total = res.data.total;
//关闭加载样式
setTimeout(() => {
this.loading = false;
}, 500);
}); });
}, },
showAll(){ showAll(){
...@@ -346,7 +351,7 @@ export default { ...@@ -346,7 +351,7 @@ export default {
// 删除 // 删除
deleteList(row) { deleteList(row) {
var params={id:row.id}; var params={id:row.id};
this.$confirm('确认删除商品, 是否继续?', '提示', { this.$confirm('确认删除该条数据, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -445,4 +450,11 @@ export default { ...@@ -445,4 +450,11 @@ export default {
color: #c4c4c4; color: #c4c4c4;
margin-right: 5px; margin-right: 5px;
} }
.el-card__body{
padding:0 !important;
/* padding: 15px 20px 20px 20px; */
}
.card-body{
padding: 15px 20px 20px 20px;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment