Merge remote-tracking branch 'origin/master'
# Conflicts: # src/api/rule/ruleEdition.js # src/views/quest/node/components/node/type/exporFind.vue # src/views/rule/rule/version.vuemaster^2^2
commit
4bad952be3
|
@ -0,0 +1,45 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询规则维护列表
|
||||
export function listRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/list',
|
||||
method: 'post',
|
||||
params: {pageNum:data.pageNum,pageSize:data.pageSize},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询规则维护详细
|
||||
export function getRuleInfo(id) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增规则维护
|
||||
export function addRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改规则维护
|
||||
export function updateRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除规则维护
|
||||
export function delRuleInfo(id) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询规则版本列表
|
||||
export function listRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/list',
|
||||
method: 'post',
|
||||
params: {pageNum: data.pageNum, pageSize: data.pageSize},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询规则版本详细
|
||||
export function getRuleVersion(id) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增规则版本
|
||||
export function addRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改规则版本
|
||||
export function updateRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除规则版本
|
||||
export function delRuleVersion(id) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//存储代码
|
||||
export function writeFile(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/writeFile',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//查询代码
|
||||
export function readFile(fileName) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/readFile/${fileName}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
//库表二级联动
|
||||
export function getTableInfoList() {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/dataSource/tableInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//库表二级联动
|
||||
export function getDataAnalysis(id) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/dataSource/table/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//获取KTLV数据
|
||||
export function getEtlTableData(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/getEtlTableData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//测试值
|
||||
export function execution(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/execution/${data.engineKey}`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//测试行
|
||||
export function lineFile(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/lineFile/${data.ruleVersionClass}`,
|
||||
method: 'post',
|
||||
data: data.data
|
||||
})
|
||||
}
|
||||
|
||||
//测试组
|
||||
export function groupFile(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/groupFile/${data.ruleVersionClass}`,
|
||||
method: 'post',
|
||||
data: data.data
|
||||
})
|
||||
}
|
||||
//判断类是否已存在
|
||||
export function isClassExist(val) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/isClassExist/${val}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询规则维护列表
|
||||
export function listRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/list',
|
||||
method: 'post',
|
||||
params: {pageNum:data.pageNum,pageSize:data.pageSize},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询规则维护详细
|
||||
export function getRuleInfo(id) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增规则维护
|
||||
export function addRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改规则维护
|
||||
export function updateRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除规则维护
|
||||
export function delRuleInfo(id) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询规则版本列表
|
||||
export function listRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/list',
|
||||
method: 'post',
|
||||
params: {pageNum: data.pageNum, pageSize: data.pageSize},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询规则版本详细
|
||||
export function getRuleVersion(id) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增规则版本
|
||||
export function addRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改规则版本
|
||||
export function updateRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除规则版本
|
||||
export function delRuleVersion(id) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//存储代码
|
||||
export function writeFile(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/writeFile',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//查询代码
|
||||
export function readFile(fileName) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/readFile/${fileName}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
//库表二级联动
|
||||
export function getTableInfoList() {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/dataSource/tableInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//库表二级联动
|
||||
export function getDataAnalysis(id) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/dataSource/table/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//获取KTLV数据
|
||||
export function getEtlTableData(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/getEtlTableData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//测试值
|
||||
export function execution(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/execution/${data.engineKey}`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//测试行
|
||||
export function lineFile(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/lineFile/${data.ruleVersionClass}`,
|
||||
method: 'post',
|
||||
data: data.data
|
||||
})
|
||||
}
|
||||
|
||||
//测试组
|
||||
export function groupFile(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/groupFile/${data.ruleVersionClass}`,
|
||||
method: 'post',
|
||||
data: data.data
|
||||
})
|
||||
}
|
||||
//判断类是否已存在
|
||||
export function isClassExist(val) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/isClassExist/${val}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ export function findTableIdByParentId(id) {
|
|||
//表
|
||||
export function findTableValueByTableName(basicId,tableName) {
|
||||
return request({
|
||||
url: "/source/value/findTableValueByTableName?basicId="+basicId+"&tableName="+tableName,
|
||||
url: `/source/value/findTableValueByTableName?basicId=`+basicId+'&&tableName='+tableName,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询规则维护列表
|
||||
export function listRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/list',
|
||||
method: 'post',
|
||||
params: {pageNum:data.pageNum,pageSize:data.pageSize},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询规则维护详细
|
||||
export function getRuleInfo(id) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增规则维护
|
||||
export function addRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改规则维护
|
||||
export function updateRuleInfo(data) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除规则维护
|
||||
export function delRuleInfo(id) {
|
||||
return request({
|
||||
url: '/engine/ruleInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,460 @@
|
|||
<!--<template>-->
|
||||
<!-- <div id="mountNode"></div>-->
|
||||
<!--</template>-->
|
||||
|
||||
<!--<script>-->
|
||||
<!--import G6 from '@antv/g6'-->
|
||||
<!--export default {-->
|
||||
<!-- data() {-->
|
||||
<!-- return {-->
|
||||
<!-- data: {-->
|
||||
<!-- // 点集-->
|
||||
<!-- nodes: [-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node1', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 100, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 200, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect', // 矩形节点-->
|
||||
<!-- label: '省生态环境厅', // 矩形节点框内的文字-->
|
||||
<!-- // 矩形节点框样式-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- // 节点下的文字-->
|
||||
<!-- extraText: '[派发]'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node2', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 300, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 200, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '市生态环境局',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- extraText: '[派发]'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node3', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 500, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 200, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '核查员',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#ffc107',-->
|
||||
<!-- stroke: '#ff9800',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- extraText: '[派发]',-->
|
||||
<!-- text1: '催办'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node4', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 700, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 200, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '市生态环境局',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- extraText: '[派发]'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node5', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 900, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 200, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '省生态环境厅',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ff',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- extraText: '[派发]'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node6', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 1200, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 200, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '完成',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ff',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- // 设置箭头位置 https://antv-g6.gitee.io/zh/docs/manual/middle/elements/nodes/anchorpoint-->
|
||||
<!-- anchorPoints: [-->
|
||||
<!-- [0, 0.5],-->
|
||||
<!-- [0.5, 0.5]-->
|
||||
<!-- ]-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node7', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 1200, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 300, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '已完成',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- anchorPoints: [-->
|
||||
<!-- [0, 0.5],-->
|
||||
<!-- [0.5, 0.5]-->
|
||||
<!-- ]-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node8', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 1200, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 400, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '进行中',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#ffc107',-->
|
||||
<!-- stroke: '#ff9800',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- anchorPoints: [-->
|
||||
<!-- [0, 0.5],-->
|
||||
<!-- [0.5, 0.5]-->
|
||||
<!-- ]-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- id: 'node9', // String,该节点存在则必须,节点的唯一标识-->
|
||||
<!-- x: 1200, // Number,可选,节点位置的 x 值-->
|
||||
<!-- y: 500, // Number,可选,节点位置的 y 值-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- label: '未开始',-->
|
||||
<!-- style: {-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ff',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- radius: 7-->
|
||||
<!-- },-->
|
||||
<!-- anchorPoints: [-->
|
||||
<!-- [0.5, 0.5],-->
|
||||
<!-- [1, 0.5]-->
|
||||
<!-- ]-->
|
||||
<!-- }-->
|
||||
|
||||
<!-- ],-->
|
||||
<!-- // 边集-->
|
||||
<!-- edges: [-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node1', // String,必须,起始点 id-->
|
||||
<!-- target: 'node2', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- // endArrow: true,-->
|
||||
<!-- // startArrow: false,-->
|
||||
<!-- // 箭头样式-->
|
||||
<!-- endArrow: {-->
|
||||
<!-- lineDash: false,-->
|
||||
<!-- path: G6.Arrow.triangle(10, 10, 2), // 使用内置箭头路径函数,参数为箭头的 宽度、长度、偏移量(默认为 0,与 d 对应)-->
|
||||
<!-- d: 2,-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- // ...-->
|
||||
<!-- },-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node2', // String,必须,起始点 id-->
|
||||
<!-- target: 'node3', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- // endArrow: true,-->
|
||||
<!-- // startArrow: false,-->
|
||||
<!-- endArrow: {-->
|
||||
<!-- lineDash: false,-->
|
||||
<!-- path: G6.Arrow.triangle(10, 10, 2),-->
|
||||
<!-- d: 2,-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- // ...-->
|
||||
<!-- },-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node3', // String,必须,起始点 id-->
|
||||
<!-- target: 'node4', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- // endArrow: true,-->
|
||||
<!-- // startArrow: false,-->
|
||||
<!-- endArrow: {-->
|
||||
<!-- lineDash: false,-->
|
||||
<!-- path: G6.Arrow.triangle(10, 10, 2),-->
|
||||
<!-- d: 2,-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- // ...-->
|
||||
<!-- },-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node4', // String,必须,起始点 id-->
|
||||
<!-- target: 'node3', // String,必须,目标点 id-->
|
||||
<!-- label: '不合格', // 边的文本-->
|
||||
<!-- type: 'polyline',-->
|
||||
<!-- controlPoints: [{ x: 750, y: 250 }, { x: 550, y: 250 }],-->
|
||||
<!-- style: {-->
|
||||
<!-- endArrow: {-->
|
||||
<!-- path: G6.Arrow.triangle(10, 10, 2),-->
|
||||
<!-- d: 2,-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- fill: '#18c298ad',-->
|
||||
<!-- stroke: '#18c298'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node4', // String,必须,起始点 id-->
|
||||
<!-- target: 'node5', // String,必须,目标点 id-->
|
||||
<!-- label: '合格', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- // endArrow: true,-->
|
||||
<!-- // startArrow: false,-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ff',-->
|
||||
<!-- endArrow: {-->
|
||||
<!-- lineDash: false,-->
|
||||
<!-- path: G6.Arrow.triangle(10, 10, 2),-->
|
||||
<!-- d: 2,-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ff'-->
|
||||
<!-- // ...-->
|
||||
<!-- }-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node5', // String,必须,起始点 id-->
|
||||
<!-- target: 'node6', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- lineDash: [5, 5, 5],-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ff',-->
|
||||
<!-- endArrow: {-->
|
||||
<!-- lineDash: false,-->
|
||||
<!-- path: G6.Arrow.triangle(10, 10, 2),-->
|
||||
<!-- d: 2,-->
|
||||
<!-- fill: '#0063ffb5',-->
|
||||
<!-- stroke: '#0063ffb5'-->
|
||||
<!-- }-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node6', // String,必须,起始点 id-->
|
||||
<!-- target: 'node7', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- lineDash: [5, 5, 5],-->
|
||||
<!-- fill: '#ddd',-->
|
||||
<!-- stroke: '#ddd'-->
|
||||
<!-- },-->
|
||||
<!-- type: 'hvh'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node7', // String,必须,起始点 id-->
|
||||
<!-- target: 'node8', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- lineDash: [5, 5, 5],-->
|
||||
<!-- fill: '#ddd',-->
|
||||
<!-- stroke: '#ddd'-->
|
||||
<!-- },-->
|
||||
<!-- type: 'hvh'-->
|
||||
<!-- },-->
|
||||
<!-- {-->
|
||||
<!-- source: 'node8', // String,必须,起始点 id-->
|
||||
<!-- target: 'node9', // String,必须,目标点 id-->
|
||||
<!-- label: '', // 边的文本-->
|
||||
<!-- style: {-->
|
||||
<!-- lineDash: [5, 5, 5],-->
|
||||
<!-- fill: '#ddd',-->
|
||||
<!-- stroke: '#ddd'-->
|
||||
<!-- },-->
|
||||
<!-- type: 'hvh'-->
|
||||
<!-- }-->
|
||||
<!-- ]-->
|
||||
<!-- }-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- mounted() {-->
|
||||
<!-- this.getView()-->
|
||||
<!-- },-->
|
||||
<!-- methods: {-->
|
||||
<!-- getView() {-->
|
||||
<!-- const container = document.getElementById('mountNode')-->
|
||||
|
||||
<!-- const width = container.scrollWidth-->
|
||||
<!-- const height = container.scrollHeight-->
|
||||
<!-- // const width = window.-->
|
||||
<!-- const graph = new G6.Graph({-->
|
||||
<!-- modes: {-->
|
||||
<!-- default: ['drag-canvas', 'zoom-canvas'] // 允许拖拽画布、放缩画布、拖拽节点-->
|
||||
<!-- },-->
|
||||
<!-- container: 'mountNode', // String | HTMLElement,必须,在 Step 1 中创建的容器 id 或容器本身-->
|
||||
<!-- fitView: true, // 是否将图适配到画布大小,可以防止超出画布或留白太多。-->
|
||||
<!-- width: width, // Number,必须,图的宽度-->
|
||||
<!-- height: height, // Number,必须,图的高度-->
|
||||
<!-- size: [100, 500]-->
|
||||
<!-- })-->
|
||||
<!-- G6.registerNode('diamond', {-->
|
||||
<!-- options: {-->
|
||||
<!-- style: {},-->
|
||||
<!-- stateStyles: {-->
|
||||
<!-- hover: {},-->
|
||||
<!-- selected: {}-->
|
||||
<!-- }-->
|
||||
<!-- },-->
|
||||
<!-- /**-->
|
||||
<!-- * 绘制节点,包含文本-->
|
||||
<!-- * @param {Object} cfg 节点的配置项-->
|
||||
<!-- * @param {G.Group} group 图形分组,节点中图形对象的容器-->
|
||||
<!-- * @return {G.Shape} 返回一个绘制的图形作为 keyShape,通过 node.get('keyShape') 可以获取。-->
|
||||
<!-- * 关于 keyShape 可参考文档 核心概念-节点/边/Combo-图形 Shape 与 keyShape-->
|
||||
<!-- */-->
|
||||
<!-- draw(cfg, group) {},-->
|
||||
<!-- /**-->
|
||||
<!-- * 绘制后的附加操作,默认没有任何操作-->
|
||||
<!-- * @param {Object} cfg 节点的配置项-->
|
||||
<!-- * @param {G.Group} group 图形分组,节点中图形对象的容器-->
|
||||
<!-- */-->
|
||||
<!-- afterDraw(cfg, group) {},-->
|
||||
<!-- /**-->
|
||||
<!-- * 更新节点,包含文本-->
|
||||
<!-- * @override-->
|
||||
<!-- * @param {Object} cfg 节点的配置项-->
|
||||
<!-- * @param {Node} node 节点-->
|
||||
<!-- */-->
|
||||
<!-- update(cfg, node) {},-->
|
||||
<!-- /**-->
|
||||
<!-- * 更新节点后的操作,一般同 afterDraw 配合使用-->
|
||||
<!-- * @override-->
|
||||
<!-- * @param {Object} cfg 节点的配置项-->
|
||||
<!-- * @param {Node} node 节点-->
|
||||
<!-- */-->
|
||||
<!-- afterUpdate(cfg, node) {},-->
|
||||
<!-- /**-->
|
||||
<!-- * 响应节点的状态变化。-->
|
||||
<!-- * 在需要使用动画来响应状态变化时需要被复写,其他样式的响应参见下文提及的 [配置状态样式] 文档-->
|
||||
<!-- * @param {String} name 状态名称-->
|
||||
<!-- * @param {Object} value 状态值-->
|
||||
<!-- * @param {Node} node 节点-->
|
||||
<!-- */-->
|
||||
<!-- setState(name, value, node) {},-->
|
||||
<!-- /**-->
|
||||
<!-- * 获取锚点(相关边的连入点)-->
|
||||
<!-- * @param {Object} cfg 节点的配置项-->
|
||||
<!-- * @return {Array|null} 锚点(相关边的连入点)的数组,如果为 null,则没有控制点-->
|
||||
<!-- */-->
|
||||
<!-- getAnchorPoints(cfg) {}-->
|
||||
<!-- },-->
|
||||
<!-- // 继承内置节点类型的名字,例如基类 'single-node',或 'circle', 'rect' 等-->
|
||||
<!-- // 当不指定该参数则代表不继承任何内置节点类型-->
|
||||
<!-- 'single-node', // 基于 single-node 为例进行扩展-->
|
||||
<!-- )-->
|
||||
<!-- // 动态设置节点样式-->
|
||||
<!-- // graph.node((node) => {-->
|
||||
<!-- // console.log(node)-->
|
||||
<!-- // return {-->
|
||||
<!-- // id: node.id,-->
|
||||
<!-- // type: 'rect',-->
|
||||
<!-- // style: {-->
|
||||
<!-- // fill: 'blue'-->
|
||||
<!-- // }-->
|
||||
<!-- // }-->
|
||||
<!-- // })-->
|
||||
<!-- graph.data(this.data) // 读取 Step 2 中的数据源到图上-->
|
||||
<!-- // 给节点下方展示额外的文字-->
|
||||
<!-- graph.on('afterrender', () => {-->
|
||||
<!-- graph.getNodes().forEach(node => {-->
|
||||
<!-- const { extraText, text1 } = node.getModel()-->
|
||||
<!-- const bbox = node.getBBox()-->
|
||||
<!-- const centerX = bbox.minX + bbox.width / 2-->
|
||||
<!-- const centerY = bbox.minY + bbox.height / 2-->
|
||||
<!-- const textGroup = graph.get('group').addGroup()-->
|
||||
<!-- const texta = textGroup.addShape('text', {-->
|
||||
<!-- attrs: {-->
|
||||
<!-- text: text1,-->
|
||||
<!-- x: centerX,-->
|
||||
<!-- y: centerY + 45,-->
|
||||
<!-- textAlign: 'center',-->
|
||||
<!-- textBaseline: 'middle',-->
|
||||
<!-- type: 'rect',-->
|
||||
<!-- fill: '#000',-->
|
||||
<!-- cursor: 'pointer',-->
|
||||
<!-- fontSize: 12-->
|
||||
<!-- }-->
|
||||
<!-- })-->
|
||||
<!-- textGroup.addShape('text', {-->
|
||||
<!-- attrs: {-->
|
||||
<!-- text: extraText,-->
|
||||
<!-- x: centerX,-->
|
||||
<!-- y: centerY + 25,-->
|
||||
<!-- textAlign: 'center',-->
|
||||
<!-- textBaseline: 'middle',-->
|
||||
<!-- fill: '#000',-->
|
||||
<!-- fontSize: 12-->
|
||||
<!-- }-->
|
||||
<!-- })-->
|
||||
<!-- // 添加边框-->
|
||||
<!-- const bbox1 = texta.getBBox()-->
|
||||
<!-- if (bbox1.height !== 0) {-->
|
||||
<!-- textGroup.addShape('rect', {-->
|
||||
<!-- attrs: {-->
|
||||
<!-- x: bbox1.x - 4,-->
|
||||
<!-- y: bbox1.y - 4,-->
|
||||
<!-- width: bbox1.width + 10,-->
|
||||
<!-- height: bbox1.height + 8,-->
|
||||
<!-- stroke: '#000',-->
|
||||
<!-- lineWidth: 2,-->
|
||||
<!-- cursor: 'pointer',-->
|
||||
<!-- radius: 7-->
|
||||
<!-- }-->
|
||||
<!-- })-->
|
||||
<!-- }-->
|
||||
<!-- // 指定文字的点击事件-->
|
||||
<!-- texta.on('click', () => {-->
|
||||
<!-- // 处理点击事件的逻辑-->
|
||||
<!-- console.log('Label clicked!')-->
|
||||
<!-- })-->
|
||||
<!-- })-->
|
||||
<!-- })-->
|
||||
<!-- graph.render() // 渲染图-->
|
||||
<!-- }-->
|
||||
<!-- }-->
|
||||
<!--}-->
|
||||
<!--</script>-->
|
||||
|
||||
<!--<style>-->
|
||||
<!--#mountNode{-->
|
||||
<!-- width: 100%;-->
|
||||
<!-- height: 500px;-->
|
||||
<!--}-->
|
||||
<!--</style>-->
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,346 @@
|
|||
<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="ruleName">
|
||||
<el-input
|
||||
v-model="queryParams.ruleName"
|
||||
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="['engine:ruleInfo:add']"
|
||||
>新增</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="['engine:ruleInfo:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="handleTest"
|
||||
>测试拓扑</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['engine:ruleInfo:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="ruleInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="规则名称" align="center" prop="ruleName" />
|
||||
<el-table-column label="规则编码" align="center" prop="ruleCode" />
|
||||
<el-table-column label="规则分类" align="center" prop="ruleTypeValue">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.ruleTypeValue"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规则级别" align="center" prop="ruleLevelId" />
|
||||
<el-table-column label="是否激活" align="center" prop="isActivation">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.isActivation"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规则状态" align="center" prop="status" />
|
||||
<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-s-tools"
|
||||
@click="openRuleTools(scope.row)"
|
||||
v-hasPermi="['engine:ruleTools:edit']"
|
||||
>规则维护</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['engine:ruleInfo:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['engine:ruleInfo: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="900px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form-item label="规则名称" prop="ruleName">
|
||||
<el-input v-model="form.ruleName" placeholder="请输入规则名称" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form-item label="规则编码" prop="ruleCode">
|
||||
<el-input v-model="form.ruleCode" placeholder="请输入规则编码" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form-item label="规则分类" prop="ruleTypeValue">
|
||||
<el-select v-model="form.ruleTypeValue" placeholder="请选择规则分类">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form-item label="是否激活" prop="isActivation">
|
||||
<el-radio-group v-model="form.isActivation">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_common_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规则状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-form-item label="规则说明">
|
||||
<editor v-model="form.ruleExplain" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input type="textarea" 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 { listRuleInfo, getRuleInfo, delRuleInfo, addRuleInfo, updateRuleInfo } from "/src/api/engine/ruleInfo";
|
||||
|
||||
export default {
|
||||
name: "RuleInfo",
|
||||
dicts: ['etl_rule_type', 'etl_rule_status','sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 规则维护表格数据
|
||||
ruleInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
ruleName: null,
|
||||
ruleTypeValue: null,
|
||||
isActivation: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleTest(){
|
||||
this.$tab.openPage('测试拓扑图', '/engine/rule-test/index/')
|
||||
},
|
||||
openRuleTools(row){
|
||||
this.$tab.openPage('[' + row.ruleName + ']规则版本', '/engine/rule-version/index/' + row.id, row.ruleId)
|
||||
},
|
||||
/** 查询规则维护列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRuleInfo(this.queryParams).then(response => {
|
||||
this.ruleInfoList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
ruleName: null,
|
||||
ruleCode: null,
|
||||
ruleTypeValue: null,
|
||||
ruleLevelId: null,
|
||||
isActivation: 'N',
|
||||
status: '1',
|
||||
ruleExplain: 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
|
||||
getRuleInfo(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) {
|
||||
updateRuleInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRuleInfo(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 delRuleInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('engine/ruleInfo/export', {
|
||||
...this.queryParams
|
||||
}, `ruleInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,123 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询规则版本列表
|
||||
export function listRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/list',
|
||||
method: 'post',
|
||||
params: {pageNum: data.pageNum, pageSize: data.pageSize},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询规则版本详细
|
||||
export function getRuleVersion(id) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增规则版本
|
||||
export function addRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改规则版本
|
||||
export function updateRuleVersion(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除规则版本
|
||||
export function delRuleVersion(id) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//存储代码
|
||||
export function writeFile(data) {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/writeFile',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//查询代码
|
||||
export function readFile(fileName) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/readFile/${fileName}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
//库表二级联动
|
||||
export function getTableInfoList() {
|
||||
return request({
|
||||
url: '/engine/ruleVersion/dataSource/tableInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//库表二级联动
|
||||
export function getDataAnalysis(id) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/dataSource/table/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//获取KTLV数据
|
||||
export function getEtlTableData(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/getEtlTableData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//测试值
|
||||
export function execution(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/execution/${data.engineKey}`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//测试行
|
||||
export function lineFile(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/lineFile/${data.ruleVersionClass}`,
|
||||
method: 'post',
|
||||
data: data.data
|
||||
})
|
||||
}
|
||||
|
||||
//测试组
|
||||
export function groupFile(data) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/groupFile/${data.ruleVersionClass}`,
|
||||
method: 'post',
|
||||
data: data.data
|
||||
})
|
||||
}
|
||||
//判断类是否已存在
|
||||
export function isClassExist(val) {
|
||||
return request({
|
||||
url: `/engine/ruleVersion/isClassExist/${val}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
<el-form label-position="right" label-width="60px">
|
||||
<el-form-item label="输入表">
|
||||
<span v-for="db in formDb">
|
||||
<el-input v-model="db.dbTable" placeholder="无输入表" style="width: 60%;" disabled/>
|
||||
<el-input v-model="db.dbTable" placeholder="无输入表" style="width: 60%;" disabled />
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="输出表">
|
||||
<el-input v-model="toDb.dbTable" placeholder="无输出表" style="width: 60%;" disabled/>
|
||||
<el-input v-model="toDb.dbTable" placeholder="无输出表" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
|
@ -16,15 +16,13 @@
|
|||
</div>
|
||||
<div align="center">
|
||||
<el-table ref="table" :data="formFields" height="450px">
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="fieldName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="fieldComment"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="fieldType"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段所属表" prop="tableName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="fieldName" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="fieldComment" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="fieldType" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段所属表" prop="tableName" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="输出字段">
|
||||
<span slot-scope="scope" v-if="fieldsList && fieldsList.get(scope.row.fieldName)">
|
||||
{{
|
||||
fieldsList.get(scope.row.fieldName).fieldName + '(' + fieldsList.get(scope.row.fieldName).fieldComment + ')'
|
||||
}}
|
||||
{{ fieldsList.get(scope.row.fieldName).fieldName+ '(' + fieldsList.get(scope.row.fieldName).fieldComment + ')' }}
|
||||
</span>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -47,22 +45,22 @@
|
|||
v-model="queryParams.tableName"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
placeholder="请输入表名称"/>
|
||||
placeholder="请输入表名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="表描述" prop="tableComment">
|
||||
<el-input
|
||||
v-model="queryParams.tableComment"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
placeholder="请输入表描述"/>
|
||||
placeholder="请输入表描述" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">查找</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table ref="table" :data="tableOptions" height="300px">
|
||||
<el-table-column :show-overflow-tooltip="true" label="表名称" prop="tableName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="表描述" prop="tableComment"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="表名称" prop="tableName" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="表描述" prop="tableComment" />
|
||||
<el-table-column label="操作" width="50px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="selectTable(scope.row)">选择</el-button>
|
||||
|
@ -72,10 +70,10 @@
|
|||
<el-divider content-position="left">选择字段 v</el-divider>
|
||||
<el-table ref="table" :data="fieldsOptions" height="280px"
|
||||
@row-click="clickRow" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<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="columnType"/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<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="columnType" />
|
||||
</el-table>
|
||||
<br><br>
|
||||
<div align="center">
|
||||
|
@ -87,15 +85,24 @@
|
|||
<el-dialog title="选择字段" :visible.sync="checkFieldsMapFlag" width="60%" :modal="false">
|
||||
<div style="padding-left: 10px;padding-right: 10px;">
|
||||
<el-table ref="table" :data="formFields" height="500px">
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="fieldName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="fieldComment"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="fieldType"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段所属表" prop="tableName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="fieldName" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="fieldComment" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="fieldType" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段所属表" prop="tableName" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="清洗规则" prop="ruleId">
|
||||
<template slot-scope="scope">
|
||||
<el-cascader :options="ruleOptions.filter(item => item.ruleVersionType === 'field')" :props="props" @change="checkRules" style="width: 60%;">
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.ruleVersionName }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" label="目标字段">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.toFidlesName" placeholder="请选择字段">
|
||||
<el-option v-for="field in toFields" :label="field.fieldName+'('+field.fieldComment+')'"
|
||||
:value="field.fieldName"/>
|
||||
<el-option v-for="field in toFields" :label="field.fieldName+'('+field.fieldComment+')'" :value="field.fieldName"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -109,12 +116,12 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
// 例如:import 《组件名称》 from '《组件路径》,
|
||||
import {batchAddUpd, listDisposition} from "../../../../../../api/quest/disposition";
|
||||
import {listDbTableAll, selDbNameAll, selectDbTableColumnsByName} from "../../../../../../api/tool/gen";
|
||||
import {listRuleInfo} from "../../../../../../api/engine/ruleInfo";
|
||||
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -143,6 +150,8 @@ export default {
|
|||
fieldsList: new Map(),
|
||||
checkFieldsFlag: false,
|
||||
checkFieldsMapFlag: false,
|
||||
// 规则列表
|
||||
ruleOptions: [],
|
||||
// 数据库列表
|
||||
dbNameOptions: [],
|
||||
// 展示数据表列表
|
||||
|
@ -151,7 +160,13 @@ export default {
|
|||
fieldsOptions: [],
|
||||
// 所有数据库列表
|
||||
tableList: [],
|
||||
queryParams: {}
|
||||
queryParams: {},
|
||||
// 级联选择器配置
|
||||
props: {
|
||||
label: 'ruleVersionName',
|
||||
value: 'ruleVersionCode',
|
||||
children: 'ruleVersionList'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念",
|
||||
|
@ -170,7 +185,7 @@ export default {
|
|||
// 查询上级的所有节点
|
||||
/** 1.查询该节点的上一级节点*/
|
||||
this.data.lineList.forEach(line => {
|
||||
if (line.to === this.node.id) {
|
||||
if (line.to === this.node.id){
|
||||
listDisposition({nodeCode: line.from}).then(res => {
|
||||
const data = this.getVueDisp(res.data.rows)
|
||||
this.formDb = data.db
|
||||
|
@ -190,28 +205,75 @@ export default {
|
|||
checkFields() {
|
||||
this.selDbNameList()
|
||||
this.getListAll()
|
||||
this.selRules()
|
||||
this.checkFieldsFlag = true
|
||||
},
|
||||
// 查询规则列表
|
||||
selRules() {
|
||||
// 查询所有规则
|
||||
// listRuleInfo({pageNum: 1, pageSize: 100}).then(response => {
|
||||
// response.data.rows.forEach(item => {
|
||||
// if(item.ruleVersionList){
|
||||
// item.ruleVersionList.forEach(rule => this.ruleOptions.push(rule))
|
||||
// }
|
||||
// });
|
||||
// console.log(this.ruleOptions)
|
||||
// });
|
||||
this.ruleOptions = [{
|
||||
ruleVersionName: "非法字符管理",
|
||||
ruleVersionClass: "CHAR_MANAGE",
|
||||
ruleVersionCode: "对非法字符进行过滤和筛选",
|
||||
ruleVersionType: "row",
|
||||
ruleVersionList: [
|
||||
{
|
||||
ruleVersionClass: "BLANK_SPACE_REMOVE",
|
||||
ruleVersionName: "空格清除",
|
||||
ruleVersionDescribed: "将空格清除",
|
||||
ruleVersionType: "row"
|
||||
},{
|
||||
ruleVersionClass: "SINGLE_QUOTATION_MARKS_REMOVE",
|
||||
ruleVersionName: "单引号清除",
|
||||
ruleVersionDescribed: "将单引号清除",
|
||||
ruleVersionType: "row"
|
||||
},{
|
||||
ruleVersionClass: "ANTIRADICAL_REMOVE",
|
||||
ruleVersionName: "反根号清除",
|
||||
ruleVersionDescribed: "将反根号清除",
|
||||
ruleVersionType: "row"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
ruleVersionName: "唯一规则",
|
||||
ruleVersionClass: "UNIQUE_RULE",
|
||||
ruleVersionCode: "字段唯一性过滤",
|
||||
ruleVersionType: "fidle",
|
||||
ruleVersionList: []
|
||||
}]
|
||||
},
|
||||
checkRules() {
|
||||
|
||||
},
|
||||
// 保存目标数据库
|
||||
save() {
|
||||
console.log('formDb', this.formDb)
|
||||
console.log('toDb', this.toDb)
|
||||
console.log('formFields', this.formFields)
|
||||
console.log('toFields', this.toFields)
|
||||
console.log('fieldsList', this.fieldsList)
|
||||
console.log('formDb',this.formDb)
|
||||
console.log('toDb',this.toDb)
|
||||
console.log('formFields',this.formFields)
|
||||
console.log('toFields',this.toFields)
|
||||
console.log('fieldsList',this.fieldsList)
|
||||
// 处理输入字段与输出字段
|
||||
const field = this.formFields
|
||||
let map = field.map(item => [item.fieldName, item.toFidlesName]);
|
||||
this.fieldsList = new Map()
|
||||
map.forEach(item => {
|
||||
this.toFields.forEach(toField => {
|
||||
if (toField.fieldName === item[1]) {
|
||||
if (toField.fieldName === item[1]){
|
||||
this.fieldsList.set(item[0], toField)
|
||||
}
|
||||
})
|
||||
})
|
||||
// 格式转换
|
||||
let mysqlDisp = this.getMysqlDisp(this.toDb, this.fieldsList);
|
||||
let mysqlDisp = this.getMysqlDisp(this.toDb,this.fieldsList);
|
||||
// 保存数据库
|
||||
batchAddUpd(mysqlDisp, this.disp.nodeCode).then(res => {
|
||||
this.$message.success(res.msg)
|
||||
|
@ -227,7 +289,7 @@ export default {
|
|||
const params = this.queryParams
|
||||
if ((table.dbName === params.dbName || !params.dbName) &&
|
||||
(table.tableName.includes(params.tableName) || !params.tableName) &&
|
||||
(table.tableComment.includes(params.tableComment) || !params.tableComment)) {
|
||||
(table.tableComment.includes(params.tableComment) || !params.tableComment)){
|
||||
this.tableOptions.push(table)
|
||||
}
|
||||
})
|
||||
|
@ -239,7 +301,7 @@ export default {
|
|||
dbName: row.dbName,
|
||||
tableName: row.tableName,
|
||||
tableComment: row.tableComment,
|
||||
dbTable: row.dbName + '.' + row.tableName + '(' + row.tableComment + ')'
|
||||
dbTable: row.dbName+'.'+row.tableName+'('+ row.tableComment +')'
|
||||
}
|
||||
selectDbTableColumnsByName(row.dbName, row.tableName).then(res => {
|
||||
this.fieldsOptions = res.data
|
||||
|
@ -252,7 +314,7 @@ export default {
|
|||
handleSelectionChange(selection) {
|
||||
this.toFields = selection.map(item => {
|
||||
return {
|
||||
dbTable: this.toDb.dbName + '.' + this.toDb.tableName,
|
||||
dbTable: this.toDb.dbName+'.'+this.toDb.tableName,
|
||||
fieldName: item.columnName,
|
||||
fieldType: item.columnType,
|
||||
fieldComment: item.columnComment
|
||||
|
@ -284,7 +346,7 @@ export default {
|
|||
dbName: disp.dispDesc,
|
||||
tableName: disp.dispValue,
|
||||
tableComment: disp.dispLabel,
|
||||
dbTable: disp.dispDesc + '.' + disp.dispValue + '(' + disp.dispLabel + ')'
|
||||
dbTable: disp.dispDesc+'.'+disp.dispValue+'('+disp.dispLabel+')'
|
||||
})
|
||||
}
|
||||
if (disp.dispKey === 'fields') {
|
||||
|
@ -296,15 +358,15 @@ export default {
|
|||
})
|
||||
}
|
||||
// 输出调整
|
||||
if (disp.dispKey === 'toDb') {
|
||||
if (disp.dispKey === 'toDb'){
|
||||
toDb = {
|
||||
dbName: disp.dispDesc,
|
||||
tableName: disp.dispValue,
|
||||
tableComment: disp.dispLabel,
|
||||
dbTable: disp.dispDesc + '.' + disp.dispValue + '(' + disp.dispLabel + ')'
|
||||
dbTable: disp.dispDesc+'.'+disp.dispValue+'('+disp.dispLabel+')'
|
||||
}
|
||||
}
|
||||
if (disp.dispKey === 'toFields') {
|
||||
if (disp.dispKey === 'toFields'){
|
||||
fieldsMap.set(disp.dispDesc, {
|
||||
fieldName: disp.dispValue,
|
||||
fieldType: disp.dispType,
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
<span>选择资产结构</span>
|
||||
</div>
|
||||
<span>
|
||||
<el-select v-model="dataOrigin.tableId" placeholder="请选择数据结构" @blur="ch()">
|
||||
<el-select v-model="dataOrigin.tableId" placeholder="请选择数据结构" @change="ch()">
|
||||
<el-option v-for="i in tableOrigin" :label="i.tableName" :value="i.id" :key="i.id"></el-option>
|
||||
</el-select>
|
||||
</span>
|
||||
|
@ -356,152 +356,101 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>选择资产集</span>
|
||||
<template>
|
||||
<el-table
|
||||
:data="tableOrigin"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="主键"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数据源ID"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.basicId }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="表名称"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.tableName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="表备注"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.tableRemark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="类型"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数据量"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.dataNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否核心"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.center }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEditSelect(scope.row)">选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</div>
|
||||
<span>
|
||||
<!--tableDa-->
|
||||
<el-button type="primary" @click="measurements()">测 试</el-button>
|
||||
</span>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<span>
|
||||
<el-col v-show="selectss">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>选择资产集</span>
|
||||
<template>
|
||||
<el-table
|
||||
:data="tableDa"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="主键"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数据源ID"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.basicId }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="表名称"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.tableName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="表备注"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.tableRemark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="类型"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数据量"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.dataNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否核心"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.center }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEditSelect(scope.row)">选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</div>
|
||||
<span>
|
||||
<!-- <el-table-->
|
||||
<!-- :data="tableOrigin"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="主键"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.id }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="数据源ID"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.basicId }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="表名称"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.tableName }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="表备注"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.tableRemark }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="类型"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.type }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="数据量"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.dataNum }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="是否核心"-->
|
||||
<!-- width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span style="margin-left: 10px">{{ scope.row.center }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-button type="primary" @click="measurements()">测 试</el-button>
|
||||
<!-- <el-table-column label="操作">-->
|
||||
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleEditSelect(scope.row)">选择-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
{{tableDatas}}
|
||||
<el-table>
|
||||
<el-table-column
|
||||
v-for="tableData in tableDatas"
|
||||
:key="key"
|
||||
:label="tableData.label"
|
||||
:prop="tableData.value"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEditSelect(scope.row)">选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</div>
|
||||
<span>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="measurements(scope.row)">测试
|
||||
</el-button>
|
||||
</template>
|
||||
</span>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</el-drawer>
|
||||
|
||||
|
@ -604,7 +553,7 @@ export default {
|
|||
//数据源
|
||||
dataOrigin: {},
|
||||
origins: [],
|
||||
tableDa: [],
|
||||
|
||||
tableOrigin: [],
|
||||
showCode: false,
|
||||
// 表单校验
|
||||
|
@ -620,31 +569,25 @@ export default {
|
|||
this.findById();
|
||||
this.findList()
|
||||
this.getDataOrigin()
|
||||
this.findTableValueByTableName();
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
this.findById();
|
||||
},
|
||||
methods: {
|
||||
//数据
|
||||
getDataTable(data) {
|
||||
getDataTables(data.id).then(res => {
|
||||
this.tableDa = res.data
|
||||
})
|
||||
},
|
||||
//表数据
|
||||
handleEditSelect(data) {
|
||||
alert(data.id)
|
||||
findTableValueByTableName(data.basicId, data.tableName).then(res => {
|
||||
console.log(res.data)
|
||||
this.tableDatas = res.data
|
||||
console.log(this.tableDatas)
|
||||
this.getDataTable(data);
|
||||
alert(res.data)
|
||||
})
|
||||
},
|
||||
//规则测试
|
||||
measurements() {
|
||||
measurement(this.form).then(res => {
|
||||
measurements(data) {
|
||||
this.tableDatas=data
|
||||
measurement(data).then(res => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
},
|
||||
|
@ -671,7 +614,6 @@ export default {
|
|||
chanChild() {
|
||||
findTableIdByParentId(this.dataOrigin.sourceId).then(res => {
|
||||
this.tableOrigin = res.data
|
||||
console.log(this.tableOrigin)
|
||||
// console.log(this.tableOrigin)
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue