Merge remote-tracking branch 'origin/master'

master
chaiyapeng 2024-08-27 14:28:01 +08:00
commit 1d5e6f8fd8
8 changed files with 366 additions and 165 deletions

View File

@ -39,6 +39,25 @@ export function del(id){
}
//开启
export function onEngine(id){
return request({
url: "/engine/engine/onEngine/" + id,
method: "post",
data:id
})
}
//禁用
export function forbiddenEngine(id){
return request({
url: "/engine/engine/forbiddenEngine/" + id,
method: "post",
data:id
})
}
export function selectLevel(){
return request({
url: "/engine/level/selectLevelList",
@ -55,3 +74,12 @@ export function getRuleEngineInfo(id) {
}
// 通过id查询
export function findById(id) {
return request({
url: '/engine/engine/findById/' + id,
method: 'get'
})
}

View File

@ -75,3 +75,27 @@ export function update(data){
}
//查询数据库名称 表名称 字段名称 类型等
export function findTableInfo(){
return request({
url: "/source/tableInfo/findTableInfo",
method: "get",
})
}
export function findTableInfoList(){
return request({
url: "/source/tableInfo/findTableInfoList",
method: "get",
})
}
export function findStructureByTableId(id){
return request({
url: "/source/tableInfo/findStruceure/"+id,
method: "get",
})
}

View File

@ -27,7 +27,7 @@
>导出
</el-button>
<!-- 添加按钮 /-->
<!-- 添加按钮 /-->
<el-button
type="primary"
plain
@ -182,7 +182,7 @@
</template>
</el-table-column>
</el-table>
<!-- 分页-->
<!-- 分页-->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"

View File

@ -1,117 +1,72 @@
<template>
<div>
<el-table :data="scopeList" style="width: 100%">
<div>
<el-row :gutter="10">
<el-col :span="8" v-for="customer in scopeList" v-if="scopeList.length !== 0">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-size: 18px;font-weight: 900">{{ customer.name }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.versionCode }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.isActivate }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.status }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.testStatus }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.ruleContent }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.engineMaintenanceId }}</span>
<span style="font-size: 18px;font-weight: 900">{{ customer.description }}</span>
</div>
<div>
<el-descriptions class="margin-top" :column="1" :size="size" border>
<el-table-column label="日期" width="180">
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>版本名称</template>
{{ customer.name }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>版本编码</template>
{{ customer.versionClass }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>是否激活</template>
{{ customer.versionCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>版本状态</template>
{{ customer.isActivate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>版本测试状态</template>
{{ customer.status }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>规则内容</template>
{{ customer.testStatus }}
</el-descriptions-item><el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>引擎维护编号</template>
{{ customer.ruleContent }}
</el-descriptions-item>
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
<el-descriptions-item>
<template slot="label"><i class="el-icon-user"></i>描述</template>
{{ customer.engineMaintenanceId }}
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">规则引擎版本</el-divider>
</div>
</el-card>
</el-col>
</el-row>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- @click="handleEdit(scope.$index, scope.row)">编辑</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="danger"-->
<!-- @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- -->
</el-table>
</div>
</div>
</template>
<script>
import {getRuleEngineInfo} from "@/api/engine/engine";
import {findById, forbiddenEngine, onEngine} from "@/api/engine/engine";
export default {
//import使"
@ -126,14 +81,28 @@ export default {
},
methods: {
List(){
getRuleEngineInfo().then(res =>{
findById(this.maintenance.id).then(res =>{
this.scopeList = res.data;
console.log(this.scopeList)
})
},
handleStatusChange(row){
if (row.status === "Y"){
onEngine(row.id).then((res)=>{
this.$modal.msgSuccess("启用成功")
this.getList()
})
}else {
forbiddenEngine(row.id).then((res)=>{
this.$modal.msgSuccess("禁用成功")
this.getList()
})
}
},
},
// - 访this",
created() {
this.scopeList.id = this.$route.query.id
this.maintenance.id = this.$route.query.id
this.List();
}
}

View File

@ -0,0 +1,151 @@
<template>
<div>
<el-container>
<el-aside width="30%">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></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>
{{ tableBasic.tableName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">表备注</template>
{{ tableBasic.tableRemark }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">数据量</template>
{{ tableBasic.dataNum }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">是否核心</template>
<dict-tag :options="dict.type.yes_no" :value="tableBasic.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.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.yes_no" :value="scope.row.isNull"/>
</template>
</el-table-column>
</el-table>
</el-card>
</el-main>
</el-container>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {findTableInfoList} from "@/api/etl/switch";
import {findStructureByTableId} from "@/api/etl/switch";
export default {
dicts: ['yes_no'],
//import使"
components: {},
props: {},
data() {
//"
return {
tableData:[],
tableBasic:{
},
form:{
},
data:[],
defaultProps:{
children:"children",
label:'tableName'
},
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
findTAbleInfoList(){
findTableInfoList().then(res=>{
this.data=res.data;
})
},
handleNodeClick(data) {
this.tableBasic=data
findStructureByTableId(data.id).then((res)=>{
this.tableData=res.data;
})
console.log(data);
},
},
// - 访this",
created() {
this.findTAbleInfoList();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -48,7 +48,7 @@
<el-dialog title="title" :visible.sync="dialogFormVisible" append-to-body width="60%">
<el-form ref="form" :model="sourceAddReq" :rules="rules" label-width="140px" :inline="true" class="demo-form-inline">
<el-form ref="sourceAddReq" :model="sourceAddReq" :rules="rules" label-width="140px" :inline="true" class="demo-form-inline">
<el-form-item label="接入源名称">
<el-input v-model="sourceAddReq.dataResourceName"></el-input>
</el-form-item>
@ -83,9 +83,9 @@
<div slot="header" class="clearfix">
<span>连接池配置</span>
</div>
<el-form ref="form" :model="sourceAddReq" label-width="120px" :inline="true" class="demo-form-inline">
<el-form :model="sourceAddReq" label-width="120px" :inline="true" class="demo-form-inline">
<el-form-item label="初始连接数量:" prop="initCount">
<el-input v-model="sourceAddReq.initCount" placeholder="初始连接数量"/>
<el-input v-model="sourceAddReq.initLinkNum" placeholder="初始连接数量"/>
</el-form-item>
<el-form-item label="最大连接数量:" prop="maxCount">
<el-input v-model="sourceAddReq.maxLinkNum" placeholder="最大连接数量"/>
@ -94,7 +94,7 @@
<el-input v-model="sourceAddReq.maxWaitTime" placeholder="最大等待时间"/>
</el-form-item>
<el-form-item label="最大等待次数:" prop="maxFrequency">
<el-input v-model="sourceAddReq.remark" placeholder="最大等待次数"/>
<el-input v-model="sourceAddReq.maxWaitTimes" placeholder="最大等待次数"/>
</el-form-item>
@ -106,11 +106,11 @@
<div slot="header" class="clearfix">
<span>其他信息</span>
</div>
<el-form ref="form" :model="sourceAddReq" label-width="140px" :inline="true" class="demo-form-inline">
<el-form :model="sourceAddReq" label-width="140px" :inline="true" class="demo-form-inline">
<el-form-item label="是否初始化:" prop="status">
<el-radio-group v-model="sourceAddReq.status">
<el-radio
v-for="dict in dict.type.ys_yes_no"
v-for="dict in dict.type.yes_no"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
@ -125,11 +125,13 @@
</el-card>
<div slot="footer" class="dialog-footer">
<el-button @click="textP()"></el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="addSource()"> </el-button>
</div>
</el-dialog>
@ -179,14 +181,20 @@
prop="databaseName">
</el-table-column>
<el-table-column
label="是否初始化"
prop="status">
<el-table-column align="status" label="是否初始化" prop="status">
<template slot-scope="scope">
<dict-tag :options="dicts.type.ys_yes_no" :value="scope.row.status"/>
<dict-tag :options="dict.type.yes_no" :value="scope.row.status"/>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="是否初始化"-->
<!-- prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.yes_no" :value="scope.row.status"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
label="备注"
prop="remark">
@ -237,43 +245,43 @@
//jsjsjson,
//import from ',
import {selectSourceList, update} from "@/api/etl/switch";
import {selectSourceExport} from "@/api/etl/switch";
import {connectionTest} from "@/api/etl/switch";
import {insertAdd} from "@/api/etl/switch";
import {deleteSource} from "@/api/etl/switch";
import {getInfo} from "@/api/etl/switch";
import {structure} from "@/api/etl/switch";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
dicts: ['sys_normal_disable','ys_yes_no'],
dicts: ['yes_no', 'sys_normal_disable'],
//import使"
components: {},
components: {
},
props: {},
data() {
//"
return {
dicts: ['sys_normal_disable','ys_yes_no'],
sourceAddReq:{
},
rules: {
dataResourceName: [
{required: true, message: "接入源名称不能为空", trigger: "blur"}
],
dataSourcesSystemName: [
{required: true, message: "数据来源系统名称不能为空", trigger: "blur"}
],
host: [
{required: true, message: "主机地址不能为空", trigger: "blur"}
]
dataResourceName: [{required: true, message: "接入源名称不能为空", trigger: "blur"}],
dataSourcesSystemName: [{required: true, message: "数据来源系统名称不能为空", trigger: "blur"}],
host: [{required: true, message: "主机地址不能为空", trigger: "blur"}]
},
ids:[],
dialogFormVisible:false,
SourceReq:{
},
sourceAddReq:{
},
source:[],
};
},
@ -299,8 +307,8 @@ export default {
},
struceure(row){
structure(row).then(res=>{
if (res ===200){
alert("同步资产成功")
if (res.code ===200){
alert("同步资产成功,请查询数据库")
}
})
},
@ -311,6 +319,7 @@ export default {
}
})
},
handleDelete(row){
deleteSource(row.id).then(res=>{
if (res.code===200){
@ -327,7 +336,9 @@ export default {
}
})
},
addSource(){
addSource: function (){
this.$refs["sourceAddReq"].validate(valid=> {
if (valid){
if (this.sourceAddReq.id!=undefined){
update(this.sourceAddReq).then(res=>{
if (res.code===200){
@ -343,6 +354,9 @@ export default {
}
})
}
}
});
},
//
textConnect(row){

View File

@ -0,0 +1,13 @@
<script>
export default {
name: "index"
}
</script>
<template>
</template>
<style scoped lang="scss">
</style>

View File

@ -429,6 +429,7 @@ export default {
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.menuId != undefined) {
updateMenu(this.form).then(response => {
@ -444,6 +445,7 @@ export default {
});
}
}
});
},
/** 删除按钮操作 */