Merge branch 'master' of https://gitea.qinmian.online/2112A-ONE/cloud-ui
commit
d9e2a43e44
|
@ -0,0 +1,11 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 根据数据库结构ID查询数据源列表
|
||||||
|
export function listChildren(query) {
|
||||||
|
return request({
|
||||||
|
url: '/source/children/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 根据数据源id查询字典类型数据
|
||||||
|
export function getDictDataList(id) {
|
||||||
|
return request({
|
||||||
|
url: '/source/dictType/getDictDataList/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询数据字典类型对象
|
||||||
|
export function getDictData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/source/dictType/getDictData',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询数据库类型
|
||||||
|
export function getTypeList() {
|
||||||
|
return request({
|
||||||
|
url: '/source/dataType/getTypeList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
|
@ -37,17 +37,25 @@ export function updateNode(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除节点管理
|
// 删除节点管理
|
||||||
export function delNode(id, taskCode) {
|
export function delNodeByIds(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: '/quest/node/' + id + '/' + taskCode,
|
url: '/quest/node/' + ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除节点管理
|
||||||
|
export function delNodeByTaskCodeAndNodeCodes(taskCode,nodeCodes) {
|
||||||
|
return request({
|
||||||
|
url: '/quest/node/' + taskCode + '/' + nodeCodes,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量删除新增节点管理
|
// 批量删除新增节点管理
|
||||||
export function batch(data) {
|
export function batch(data,taskCode) {
|
||||||
return request({
|
return request({
|
||||||
url: '/quest/node/batch',
|
url: '/quest/node/batch/'+taskCode,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|
|
@ -53,7 +53,7 @@ export function delSource(id) {
|
||||||
//同步资产结构
|
//同步资产结构
|
||||||
export function synchronous(data) {
|
export function synchronous(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/source/source/synchronous',
|
url: '/source/source/syncAssetStructure',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,45 +1,72 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询结构列表
|
// // 查询结构列表
|
||||||
export function listData(query) {
|
// export function listData(query) {
|
||||||
return request({
|
// return request({
|
||||||
url: '/source/data/list',
|
// url: '/source/data/list',
|
||||||
method: 'get',
|
// method: 'get',
|
||||||
params: query
|
// params: query
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 查询结构详细
|
// // 查询结构详细
|
||||||
export function getData(id) {
|
// export function getData(id) {
|
||||||
|
// return request({
|
||||||
|
// url: '/source/data/' + id,
|
||||||
|
// method: 'get'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 新增结构
|
||||||
|
// export function addData(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/source/data',
|
||||||
|
// method: 'post',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 修改结构
|
||||||
|
// export function updateData(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/source/data',
|
||||||
|
// method: 'put',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 删除结构
|
||||||
|
// export function delData(id) {
|
||||||
|
// return request({
|
||||||
|
// url: '/source/data/' + id,
|
||||||
|
// method: 'delete'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// //修改字段是否为字典值
|
||||||
|
// export function updIsDict(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/source/data/updIsDict',
|
||||||
|
// method: 'put',
|
||||||
|
// data: data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
//根据表ID查询表结构
|
||||||
|
export function selectTableData(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/source/data/' + id,
|
url: '/source/data/selectStructureById/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function findTableInfo() {
|
||||||
// 新增结构
|
|
||||||
export function addData(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/source/data',
|
url: '/source/tableInfo/findTableInfo',
|
||||||
method: 'post',
|
method: 'get'
|
||||||
data: data
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function findTableInfoList() {
|
||||||
// 修改结构
|
|
||||||
export function updateData(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/source/data',
|
url: '/source/tableInfo/findTableInfoList',
|
||||||
method: 'put',
|
method: 'get',
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除结构
|
|
||||||
export function delData(id) {
|
|
||||||
return request({
|
|
||||||
url: '/source/data/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-aside width="30%">
|
||||||
|
<el-tree :data="dataList" :props="defaultProps" @node-click="handleNodeClick">
|
||||||
|
</el-tree>
|
||||||
|
</el-aside>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import {findTableInfoList} from "@/api/tableData/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name:'Accredit',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataList:[
|
||||||
|
{
|
||||||
|
children:[],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'tableName'
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findTableInfoList();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
findTableInfoList(){
|
||||||
|
findTableInfoList().then(res=>{
|
||||||
|
this.dataList=res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,336 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="字段名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入字段名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['data:data:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['data:data:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['data:data:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['data:data:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="字段名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="字段注释" align="center" prop="comment" />
|
|
||||||
<el-table-column label="是否主键" align="center" prop="isPrimaryKey">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isPrimaryKey"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="字段类型" align="center" prop="type" />
|
|
||||||
<el-table-column label="映射类型" align="center" prop="mappingType" />
|
|
||||||
<el-table-column label="长度" align="center" prop="length" />
|
|
||||||
<el-table-column label="小数位" align="center" prop="decimalPlaces" />
|
|
||||||
<el-table-column label="是否为空" align="center" prop="isNull">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isNull"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="默认值" align="center" prop="defaultValue" />
|
|
||||||
<el-table-column label="是否字典" align="center" prop="isDict">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isDict"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="映射字典" align="center" prop="dictKey">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.dictKey"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['data:data:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['data:data:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改结构对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="字段名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入字段名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="字段注释" prop="comment">
|
|
||||||
<el-input v-model="form.comment" type="textarea" placeholder="请输入字段注释" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否主键" prop="isPrimaryKey">
|
|
||||||
<el-input v-model="form.isPrimaryKey" placeholder="请输入是否主键 Y:是 N:否" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="字段类型" prop="type">
|
|
||||||
<el-input v-model="form.type" placeholder="请输入字段类型" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="长度" prop="length">
|
|
||||||
<el-input v-model="form.length" placeholder="请输入长度" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="小数位" prop="decimalPlaces">
|
|
||||||
<el-input v-model="form.decimalPlaces" placeholder="请输入小数位" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否为空" prop="isNull">
|
|
||||||
<el-input v-model="form.isNull" placeholder="请输入是否为空;Y:是 N:否" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="默认值" prop="defaultValue">
|
|
||||||
<el-input v-model="form.defaultValue" placeholder="请输入默认值" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否字典" prop="isDict">
|
|
||||||
<el-input v-model="form.isDict" placeholder="请输入是否字典;Y:是 N:否" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="映射字典" prop="dictKey">
|
|
||||||
<el-input v-model="form.dictKey" placeholder="请输入映射字典" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="数据库结构ID" prop="childrenId">
|
|
||||||
<el-input v-model="form.childrenId" placeholder="请输入数据库结构ID" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listData, getData, delData, addData, updateData } from "/src/api/tableData/data";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Data",
|
|
||||||
dicts: ['sys_yes_no'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 结构表格数据
|
|
||||||
dataList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
name: null,
|
|
||||||
type: null,
|
|
||||||
childrenId: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
isPrimaryKey: [
|
|
||||||
{ required: true, message: "是否主键;Y:是 N:否不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isNull: [
|
|
||||||
{ required: true, message: "是否为空;Y:是 N:否不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
defaultValue: [
|
|
||||||
{ required: true, message: "默认值;默认值不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
isDict: [
|
|
||||||
{ required: true, message: "是否字典;Y:是 N:否不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询结构列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listData(this.queryParams).then(response => {
|
|
||||||
console.log(response);
|
|
||||||
this.dataList = response.data.rows;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
name: null,
|
|
||||||
comment: null,
|
|
||||||
isPrimaryKey: null,
|
|
||||||
type: null,
|
|
||||||
mappingType: null,
|
|
||||||
length: null,
|
|
||||||
decimalPlaces: null,
|
|
||||||
isNull: null,
|
|
||||||
defaultValue: null,
|
|
||||||
isDict: null,
|
|
||||||
dictKey: null,
|
|
||||||
childrenId: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
remark: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加结构";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getData(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改结构";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateData(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addData(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除结构编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delData(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('tableData/data/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `data_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
|
@ -6,7 +6,7 @@
|
||||||
type="primary" @click="save">保存修改</el-button>
|
type="primary" @click="save">保存修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
style="width: 75%;margin-left: 0;margin-bottom: 5px;"
|
style="width: 75%;margin-left: 0;margin-bottom: 5px;"
|
||||||
@click="$router.push({path: '/quest/task'})">返回</el-button>
|
@click="returnBack">返回</el-button>
|
||||||
<hr>
|
<hr>
|
||||||
<div v-for="item in nodeTypeList" :key="item.type" class="node" draggable="true" @dragstart="drag($event, item)">
|
<div v-for="item in nodeTypeList" :key="item.type" class="node" draggable="true" @dragstart="drag($event, item)">
|
||||||
<div class="log">
|
<div class="log">
|
||||||
|
@ -53,6 +53,10 @@ export default {
|
||||||
nodeList:[],
|
nodeList:[],
|
||||||
lineList:[]
|
lineList:[]
|
||||||
},
|
},
|
||||||
|
checkData: {
|
||||||
|
nodeList:[],
|
||||||
|
lineList:[]
|
||||||
|
},
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
jsplumbSetting: jsplumbSetting,
|
jsplumbSetting: jsplumbSetting,
|
||||||
jsplumbConnectOptions: jsplumbConnectOptions,
|
jsplumbConnectOptions: jsplumbConnectOptions,
|
||||||
|
@ -70,7 +74,8 @@ export default {
|
||||||
height: 0,
|
height: 0,
|
||||||
width: 0
|
width: 0
|
||||||
},
|
},
|
||||||
taskCode: this.$route.query.taskCode
|
taskCode: this.$route.query.taskCode,
|
||||||
|
flag: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -120,9 +125,8 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// console.log(data)
|
|
||||||
console.log(this.data)
|
|
||||||
})
|
})
|
||||||
|
this.flag = true
|
||||||
},
|
},
|
||||||
// 保存修改按钮
|
// 保存修改按钮
|
||||||
save() {
|
save() {
|
||||||
|
@ -147,16 +151,42 @@ export default {
|
||||||
preLine = line.from
|
preLine = line.from
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let newNode = flowNode.methods.toMysqlNode(node,preLine,nextLine)
|
nodeData.push(flowNode.methods.toMysqlNode(node,preLine,nextLine,this.taskCode))
|
||||||
newNode.taskCode = this.$route.query.taskCode
|
})
|
||||||
nodeData.push(newNode)
|
// 3. 激活接口将参数传递到后端
|
||||||
|
batch(nodeData,this.$route.query.taskCode).then(res => {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.flag = true
|
||||||
})
|
})
|
||||||
console.log(nodeData)
|
console.log(nodeData)
|
||||||
// 3. 激活接口将参数传递到后端
|
|
||||||
batch(nodeData).then(res => {
|
|
||||||
alert(res.msg)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
returnBack() {
|
||||||
|
if (this.flag){
|
||||||
|
this.$router.push({path: '/quest/task'})
|
||||||
|
}else{
|
||||||
|
this.checkReturn()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
checkReturn() {
|
||||||
|
this.$confirm('更改未保存,是否保存?', '未保存提示', {
|
||||||
|
confirmButtonText: '保存',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.save()
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '返回成功'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$router.push({path: '/quest/task'})
|
||||||
|
},
|
||||||
|
// 修改状态更新
|
||||||
|
checkFlag(){
|
||||||
|
this.flag = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -209,12 +239,12 @@ export default {
|
||||||
.auxiliary-line-x {
|
.auxiliary-line-x {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: .5px dashed #2ab1e8;
|
border: .5px dashed #2ab1e8;
|
||||||
z-index: 1008;
|
z-index: 998;
|
||||||
}
|
}
|
||||||
.auxiliary-line-y {
|
.auxiliary-line-y {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: .5px dashed #2ab1e8;
|
border: .5px dashed #2ab1e8;
|
||||||
z-index: 1008;
|
z-index: 998;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +253,7 @@ export default {
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.jtk-connector.active{
|
.jtk-connector.active{
|
||||||
z-index: 1008;
|
z-index: 998;
|
||||||
path {
|
path {
|
||||||
stroke: #150042;
|
stroke: #150042;
|
||||||
stroke-width: 1.5;
|
stroke-width: 1.5;
|
||||||
|
|
|
@ -19,61 +19,75 @@
|
||||||
<div class="node-anchor anchor-left" v-show="mouseEnter"></div>
|
<div class="node-anchor anchor-left" v-show="mouseEnter"></div>
|
||||||
<!-- 节点配置-->
|
<!-- 节点配置-->
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<el-dialog :modal="false" title="配置" :visible.sync="disposition.findFlag" width="50%" >
|
<el-drawer
|
||||||
<span>数据库: {{ disposition.formData.dbName }}</span>
|
:visible.sync="disposition.findFlag"
|
||||||
<span>数据表: {{ disposition.formData.table }}</span>
|
direction="rtl"
|
||||||
<span>
|
title="配置信息"
|
||||||
|
append-to-body
|
||||||
|
size="60%">
|
||||||
|
<div style="padding-left: 10px;padding-right: 10px;">
|
||||||
|
<h5>数据库: {{ disposition.formData.dbName }}</h5>
|
||||||
|
<br>
|
||||||
|
<h5>数据表: {{ disposition.formData.table }}</h5>
|
||||||
|
<span>
|
||||||
<el-table ref="table" :data="disposition.formData.fields" height="300px">
|
<el-table ref="table" :data="disposition.formData.fields" height="300px">
|
||||||
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="columnName" />
|
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="columnName" />
|
||||||
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="columnComment" />
|
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="columnComment" />
|
||||||
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="columnType" />
|
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="columnType" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</span>
|
</span>
|
||||||
<el-button @click="disposition.findFlag = false">确认</el-button>
|
<br><br>
|
||||||
<el-button type="primary" @click="editDisposition">修改配置</el-button>
|
<div align="center">
|
||||||
</el-dialog>
|
<el-button @click="disposition.findFlag = false">确认</el-button>
|
||||||
|
<el-button type="primary" @click="editDisposition">修改配置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
<!-- 自定义表单对话框 -->
|
<!-- 自定义表单对话框 -->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
style="padding-left: 20px; padding-right: 20px;"
|
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:visible.sync="disposition.updFlag"
|
:visible.sync="disposition.updFlag"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
title="节点配置"
|
title="节点配置"
|
||||||
append-to-body
|
append-to-body
|
||||||
size="60%">
|
size="60%">
|
||||||
<el-form ref="queryForm" :inline="true" :model="queryParams" size="small">
|
<div style="padding-left: 10px;padding-right: 10px;">
|
||||||
<el-form-item label="数据库名称" prop="dbName">
|
<el-form ref="queryForm" :inline="true" :model="queryParams" size="small">
|
||||||
<el-select v-model="queryParams.dbName" placeholder="请选择数据库" clearable>
|
<el-form-item label="数据库名称" prop="dbName">
|
||||||
<el-option v-for="item in dbNameOptions" :key="item" :label="item" :value="item"/>
|
<el-select v-model="queryParams.dbName" placeholder="请选择数据库" clearable @change="handleQuery">
|
||||||
</el-select>
|
<el-option v-for="item in dbNameOptions" :key="item" :label="item" :value="item"/>
|
||||||
</el-form-item>
|
</el-select>
|
||||||
<el-form-item label="表名称" prop="tableName">
|
</el-form-item>
|
||||||
<el-input
|
<el-form-item label="表名称" prop="tableName">
|
||||||
v-model="queryParams.tableName"
|
<el-input
|
||||||
clearable
|
v-model="queryParams.tableName"
|
||||||
placeholder="请输入表名称" />
|
clearable
|
||||||
</el-form-item>
|
@change="handleQuery"
|
||||||
<el-form-item label="表描述" prop="tableComment">
|
placeholder="请输入表名称" />
|
||||||
<el-input
|
</el-form-item>
|
||||||
v-model="queryParams.tableComment"
|
<el-form-item label="表描述" prop="tableComment">
|
||||||
clearable
|
<el-input
|
||||||
placeholder="请输入表描述" />
|
v-model="queryParams.tableComment"
|
||||||
</el-form-item>
|
clearable
|
||||||
<el-form-item>
|
@change="handleQuery"
|
||||||
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">查找</el-button>
|
placeholder="请输入表描述" />
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item>
|
||||||
</el-form>
|
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">查找</el-button>
|
||||||
<el-table ref="table" :data="tableOptions" height="300px">
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
<el-table-column :show-overflow-tooltip="true" label="表名称" prop="tableName" />
|
</el-form-item>
|
||||||
<el-table-column :show-overflow-tooltip="true" label="表描述" prop="tableComment" />
|
</el-form>
|
||||||
<el-table-column label="操作">
|
<el-table ref="table" :data="tableOptions" height="300px">
|
||||||
<template slot-scope="scope">
|
<el-table-column :show-overflow-tooltip="true" label="表名称" prop="tableName" />
|
||||||
<el-button type="text" @click="selectTable(scope.row)">选择</el-button>
|
<el-table-column :show-overflow-tooltip="true" label="表描述" prop="tableComment" />
|
||||||
</template>
|
<el-table-column label="操作" width="50px">
|
||||||
</el-table-column>
|
<template slot-scope="scope">
|
||||||
</el-table>
|
<el-button type="text" @click="selectTable(scope.row)">选择</el-button>
|
||||||
<el-divider />
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-divider content-position="left">选择字段 v</el-divider>
|
||||||
<el-table ref="table" v-show="fieldsOptions" :data="fieldsOptions" height="300px"
|
<el-table ref="table" v-show="fieldsOptions" :data="fieldsOptions" height="300px"
|
||||||
@row-click="clickRow" @selection-change="handleSelectionChange">
|
@row-click="clickRow" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
|
@ -93,6 +107,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ClickOutside from 'vue-click-outside'
|
import ClickOutside from 'vue-click-outside'
|
||||||
|
import Home from '../Home.vue'
|
||||||
import {listDbTableAll, selDbNameAll, selectDbTableColumnsByName} from "../../../../api/tool/gen";
|
import {listDbTableAll, selDbNameAll, selectDbTableColumnsByName} from "../../../../api/tool/gen";
|
||||||
export default {
|
export default {
|
||||||
name: "nodeItem",
|
name: "nodeItem",
|
||||||
|
@ -164,7 +179,7 @@ export default {
|
||||||
this.toUpdName();
|
this.toUpdName();
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
label: '修改配置',
|
label: '设置配置',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
icon: "",
|
icon: "",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
|
@ -217,6 +232,7 @@ export default {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: '修改成功'
|
message: '修改成功'
|
||||||
});
|
});
|
||||||
|
this.$emit("checkFlag")
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
|
@ -244,8 +260,10 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** jsPlumb节点类型 --> 数据库节点类型 */
|
/** jsPlumb节点类型 --> 数据库节点类型 */
|
||||||
toMysqlNode(node,preLine,nextLine){
|
toMysqlNode(node,preLine,nextLine,taskCode){
|
||||||
return {
|
return {
|
||||||
|
nodeType: node.type,
|
||||||
|
taskCode: taskCode,
|
||||||
nodeCode: node.id,
|
nodeCode: node.id,
|
||||||
nodeName: node.nodeName,
|
nodeName: node.nodeName,
|
||||||
nodePositionTop: node.top,
|
nodePositionTop: node.top,
|
||||||
|
@ -312,45 +330,52 @@ export default {
|
||||||
},
|
},
|
||||||
// 保存配置按钮
|
// 保存配置按钮
|
||||||
saveDisposition() {
|
saveDisposition() {
|
||||||
console.log(this.disposition.formData)
|
|
||||||
const dispositionData = this.disposition.formData
|
const dispositionData = this.disposition.formData
|
||||||
const addData = []
|
const addData = []
|
||||||
/**
|
/**
|
||||||
* {
|
* {
|
||||||
* node_info_code: '',
|
* key: '',
|
||||||
* node_type: '',
|
* name: '',
|
||||||
* node_value: ''
|
* type: ''
|
||||||
|
* value: ''
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
// 处理数据库信息
|
// // 处理数据库信息
|
||||||
addData.push({
|
// addData.push({
|
||||||
nodeInfoCode: dispositionData.nodeId,
|
// nodeCode: dispositionData.nodeId,
|
||||||
nodeType: 'dbName',
|
// atom: {
|
||||||
nodeValue: dispositionData.dbName
|
// key: 'dbName',
|
||||||
})
|
// name: '数据库名称',
|
||||||
// 处理数据表信息
|
// type: 'String',
|
||||||
addData.push({
|
// value: dispositionData.dbName
|
||||||
nodeInfoCode: dispositionData.nodeId,
|
// }
|
||||||
nodeType: 'table',
|
// })
|
||||||
nodeValue: dispositionData.table
|
// // 处理数据表信息
|
||||||
})
|
// addData.push({
|
||||||
// 处理数据字段信息
|
// nodeCode: dispositionData.nodeId,
|
||||||
addData.push({
|
// atom: {
|
||||||
nodeInfoCode: dispositionData.nodeId,
|
// key: 'typeName',
|
||||||
nodeType: 'fields',
|
// name: '数据表名称',
|
||||||
nodeValue: dispositionData.fields.toString()
|
// type: 'String',
|
||||||
})
|
// value: dispositionData.dbName
|
||||||
console.log(addData)
|
// }
|
||||||
|
// })
|
||||||
|
// addData.push({
|
||||||
|
// key: dispositionData.nodeId,
|
||||||
|
// name: '数据表名称',
|
||||||
|
// type: 'String',
|
||||||
|
// value: dispositionData.table
|
||||||
|
// })
|
||||||
|
// // 处理数据字段信息
|
||||||
|
// addData.push({
|
||||||
|
// nodeInfoCode: dispositionData.nodeId,
|
||||||
|
// nodeType: 'fields',
|
||||||
|
// nodeValue: dispositionData.fields
|
||||||
|
// })
|
||||||
|
// console.log(addData)
|
||||||
this.disposition.updFlag = false
|
this.disposition.updFlag = false
|
||||||
this.disposition.findFlag = false
|
this.disposition.findFlag = false
|
||||||
},
|
|
||||||
// 重置配置信息
|
|
||||||
resetDisposition() {
|
|
||||||
this.disposition.formData = {
|
|
||||||
dbName: undefined,
|
|
||||||
table: {},
|
|
||||||
fields: []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getListAll() {
|
getListAll() {
|
||||||
listDbTableAll().then(res => {
|
listDbTableAll().then(res => {
|
||||||
|
@ -373,7 +398,6 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.resetDisposition()
|
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 选择表信息*/
|
/** 选择表信息*/
|
||||||
|
@ -418,9 +442,9 @@ export default {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
z-index: 1006;
|
z-index: 996;
|
||||||
&:hover {
|
&:hover {
|
||||||
z-index: 1007;
|
z-index: 997;
|
||||||
.delete-btn{
|
.delete-btn{
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -446,7 +470,7 @@ export default {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
z-index: 1008;
|
z-index: 998;
|
||||||
background: -webkit-radial-gradient(sandybrown 10%, white 30%, #9a54ff 60%);
|
background: -webkit-radial-gradient(sandybrown 10%, white 30%, #9a54ff 60%);
|
||||||
}
|
}
|
||||||
.anchor-top{
|
.anchor-top{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import panzoom from "panzoom";
|
import panzoom from "panzoom";
|
||||||
import { GenNonDuplicateID } from "@/common/until";
|
import { GenNonDuplicateID } from "@/common/until";
|
||||||
import item from "../components/node-item"
|
import item from "../components/node-item"
|
||||||
|
import Home from "../Home.vue"
|
||||||
|
|
||||||
const methods = {
|
const methods = {
|
||||||
init() {
|
init() {
|
||||||
|
@ -106,8 +107,8 @@ const methods = {
|
||||||
if(nodeId == v.id) {
|
if(nodeId == v.id) {
|
||||||
v.left = pos[0] +'px'
|
v.left = pos[0] +'px'
|
||||||
v.top = pos[1] + 'px'
|
v.top = pos[1] + 'px'
|
||||||
console.log('位置变更: top->['+v.top+'],left->['+v.left+']')
|
console.log('节点 '+nodeId+' 位置变更: top->['+v.top+'],left->['+v.left+']')
|
||||||
console.log(this.data.nodeList)
|
|
||||||
return true
|
return true
|
||||||
}else {
|
}else {
|
||||||
return false
|
return false
|
||||||
|
@ -143,6 +144,7 @@ const methods = {
|
||||||
id: GenNonDuplicateID(8),
|
id: GenNonDuplicateID(8),
|
||||||
Remark: ""
|
Remark: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
// 确认删除连线
|
// 确认删除连线
|
||||||
confirmDelLine(line) {
|
confirmDelLine(line) {
|
||||||
|
@ -169,6 +171,7 @@ const methods = {
|
||||||
if(item.from === line.sourceId && item.to === line.targetId) {
|
if(item.from === line.sourceId && item.to === line.targetId) {
|
||||||
console.log('删线: ' + item.from + ' -/- ' + item.to)
|
console.log('删线: ' + item.from + ' -/- ' + item.to)
|
||||||
this.data.lineList.splice(index, 1)
|
this.data.lineList.splice(index, 1)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -190,8 +193,6 @@ const methods = {
|
||||||
},
|
},
|
||||||
// 添加新的节点
|
// 添加新的节点
|
||||||
addNode(temp) {
|
addNode(temp) {
|
||||||
console.log('新增节点: ')
|
|
||||||
console.log(temp)
|
|
||||||
this.data.nodeList.push(temp);
|
this.data.nodeList.push(temp);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.jsPlumb.makeSource(temp.id, this.jsplumbSourceOptions);
|
this.jsPlumb.makeSource(temp.id, this.jsplumbSourceOptions);
|
||||||
|
@ -199,7 +200,9 @@ const methods = {
|
||||||
this.draggableNode(temp.id)
|
this.draggableNode(temp.id)
|
||||||
});
|
});
|
||||||
var node = item.methods.toMysqlNode(temp,null,null)
|
var node = item.methods.toMysqlNode(temp,null,null)
|
||||||
|
console.log('新增节点: ')
|
||||||
console.log(node)
|
console.log(node)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initPanZoom() {
|
initPanZoom() {
|
||||||
|
@ -262,6 +265,7 @@ const methods = {
|
||||||
this.data.nodeList.some((v) => {
|
this.data.nodeList.some((v) => {
|
||||||
if(v.id === nodeId) {
|
if(v.id === nodeId) {
|
||||||
v.nodeName = name
|
v.nodeName = name
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}else {
|
}else {
|
||||||
return false
|
return false
|
||||||
|
@ -276,6 +280,7 @@ const methods = {
|
||||||
if(v.id === node.id) {
|
if(v.id === node.id) {
|
||||||
this.data.nodeList.splice(index, 1)
|
this.data.nodeList.splice(index, 1)
|
||||||
this.jsPlumb.remove(v.id)
|
this.jsPlumb.remove(v.id)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}else {
|
}else {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<el-table-column label="任务内容" align="center" prop="taskData" />
|
<el-table-column label="任务内容" align="center" prop="taskData" />
|
||||||
<el-table-column label="启用状态" align="center" prop="state">
|
<el-table-column label="启用状态" align="center" prop="state">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.sys_enable_status" :value="scope.row.state"/>
|
<el-tag :type="scope.row.state == '启用' ? 'success' : 'info'">{{ scope.row.state }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-aside width="30%">
|
||||||
|
<el-tree :data="dataList" :props="defaultProps" @node-click="handleNodeClick">
|
||||||
|
</el-tree>
|
||||||
|
</el-aside>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import {findTableInfoList} from "@/api/tableData/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Show',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataList:[
|
||||||
|
{
|
||||||
|
children:[],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'tableName'
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findTableInfoList();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
findTableInfoList(){
|
||||||
|
findTableInfoList().then(res=>{
|
||||||
|
this.dataList=res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -179,7 +179,13 @@
|
||||||
<el-input v-model="form.maxWaitSize" placeholder="请输入最大等待次数" />
|
<el-input v-model="form.maxWaitSize" placeholder="请输入最大等待次数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否初始化" prop="isInit">
|
<el-form-item label="是否初始化" prop="isInit">
|
||||||
<el-input v-model="form.isInit" placeholder="请输入是否初始化" />
|
<!-- <el-input v-model="form.isInit" placeholder="请输入是否初始化" />-->
|
||||||
|
<el-radio v-model="form.isInit" label="Y">是</el-radio>
|
||||||
|
<el-radio v-model="form.isInit" label="N">否</el-radio>
|
||||||
|
<!-- <el-radio-group v-model="form.isInit">-->
|
||||||
|
<!-- <el-radio label="Y"></el-radio>-->
|
||||||
|
<!-- <el-radio label="N"></el-radio>-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入是否初始化" />
|
<el-input v-model="form.remark" placeholder="请输入是否初始化" />
|
||||||
|
|
|
@ -0,0 +1,120 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-container>
|
||||||
|
<el-aside width="30%">
|
||||||
|
<el-tree :data="dataList" :props="defaultProps" @node-click="handleNodeClick">
|
||||||
|
<div v-if="tableList.type === 'dataSource'">{{
|
||||||
|
tableList.name + '(' + tableList.databaseName + '-' + tableList.systemName + ')'
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div v-if="tableList.type === 'dataTable'">{{
|
||||||
|
tableList.tableName + '-' + tableList.tableRemark + '(' + tableList.dataNum + '条)'
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-tree>
|
||||||
|
</el-aside>
|
||||||
|
|
||||||
|
<el-main>
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>资产模型基本信息</span>
|
||||||
|
</div>
|
||||||
|
<el-descriptions class="margin-top" title="带边框列表" :column="2" border>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">表名称</template>
|
||||||
|
{{ tableList.tableName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">表备注</template>
|
||||||
|
{{ tableList.tableRemark }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">数据量</template>
|
||||||
|
{{ tableList.dataNum }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">是否核心</template>
|
||||||
|
<dict-tag :options="dict.type.sys_yes_no" :value="tableList.isCenter"/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>资产模型详细信息</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="tableData" style="width: 100%">
|
||||||
|
<el-table-column label="名称" prop="columnName"></el-table-column>
|
||||||
|
<el-table-column label="注释" prop="columnRemark"></el-table-column>
|
||||||
|
<el-table-column label="是否主键" prop="isPrimary">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isPrimary"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="类型" prop="columnType"></el-table-column>
|
||||||
|
<el-table-column label="映射类型" prop="javaType"></el-table-column>
|
||||||
|
<el-table-column label="长度" prop="columnLength"></el-table-column>
|
||||||
|
<el-table-column label="小数位" prop="columnDecimals"></el-table-column>
|
||||||
|
<el-table-column label="是否为空" prop="isNull">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isNull"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import {findTableInfoList, selectTableData} from "@/api/tableData/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Type',
|
||||||
|
dicts: ['sys_yes_no'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData:[],
|
||||||
|
tableList:{},
|
||||||
|
form:{},
|
||||||
|
dataList:[
|
||||||
|
{
|
||||||
|
children:[],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'tableName'
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findTableInfoList();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
findTableInfoList(){
|
||||||
|
findTableInfoList().then(res=>{
|
||||||
|
this.dataList=res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.tableList=data
|
||||||
|
selectTableData(data.id).then(res=>{
|
||||||
|
this.tableData=res.data;
|
||||||
|
})
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue