feat: 规则引擎版本
parent
a9047594a4
commit
02409c18b3
|
@ -233,3 +233,12 @@ export function selectTableName(tableName) {
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//添加部门以及部门下的子类部门以及用户
|
||||||
|
export function addDepartment(data) {
|
||||||
|
return request({
|
||||||
|
url: '/kvt/kvt/addDepartment',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<el-row :gutter="40" class="panel-group">
|
<el-row :gutter="40" class="panel-group">
|
||||||
<div class="title-header">
|
<div class="title-header">
|
||||||
整体数据资产结构概述
|
整体数据资产结构概述
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-col :lg="8" :sm="12" :xs="12" class="card-panel-col">
|
<el-col :lg="8" :sm="12" :xs="12" class="card-panel-col">
|
||||||
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
|
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
inactive-text="未授权"
|
inactive-text="未授权"
|
||||||
:active-value="1"
|
:active-value="1"
|
||||||
:inactive-value="0"
|
:inactive-value="0"
|
||||||
|
@change="addDepartment(scope.row)"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
|
@ -94,7 +95,7 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { parseTime } from '@/utils/muyu'
|
import { parseTime } from '@/utils/muyu'
|
||||||
import { permissionsUserAdd } from '@/api/kvt/kvt'
|
import { addDepartment, permissionsUserAdd } from '@/api/kvt/kvt'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AuthDataSource",
|
name: "AuthDataSource",
|
||||||
|
@ -148,6 +149,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//添加部门中以及部门下的子类及用户
|
||||||
|
addDepartment(row){
|
||||||
|
console.log("rrrow",row)
|
||||||
|
const deptId =row.deptId
|
||||||
|
console.log("Tht",this.DataSource)
|
||||||
|
let data = {
|
||||||
|
tbaleName:this.DataSource.databaseName,
|
||||||
|
kvtId:this.DataSource.id,
|
||||||
|
deptId :deptId
|
||||||
|
}
|
||||||
|
addDepartment(data).then(res => {
|
||||||
|
this.$message.success(res.data)
|
||||||
|
})
|
||||||
|
},
|
||||||
permissionsAdd(row) {
|
permissionsAdd(row) {
|
||||||
console.log("rrrow", row)
|
console.log("rrrow", row)
|
||||||
const userId =row.userId
|
const userId =row.userId
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<h4 class="form-header h4">基本信息</h4>
|
<h4 class="form-header h4">基本信息</h4>
|
||||||
2222
|
2222
|
||||||
{{DataSource}}
|
{{ DataSource }}
|
||||||
<el-form ref="form" :model="DataSource" label-width="120px">
|
<el-form ref="form" :model="DataSource" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="2" :span="8">
|
<el-col :offset="2" :span="8">
|
||||||
|
@ -49,15 +49,15 @@
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
row-key="deptId"
|
row-key="deptId"
|
||||||
>
|
>
|
||||||
<el-table-column label="部门名称" prop="deptName" ></el-table-column>
|
<el-table-column label="部门名称" prop="deptName"></el-table-column>
|
||||||
<el-table-column label="部门负责人" prop="leader" ></el-table-column>
|
<el-table-column label="部门负责人" prop="leader"></el-table-column>
|
||||||
<el-table-column label="邮箱" prop="email" ></el-table-column>
|
<el-table-column label="邮箱" prop="email"></el-table-column>
|
||||||
<el-table-column align="center" label="创建时间" prop="createTime" >
|
<el-table-column align="center" label="创建时间" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" prop="createTime" >
|
<el-table-column align="center" label="操作" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
style="display: block"
|
style="display: block"
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
inactive-text="未授权"
|
inactive-text="未授权"
|
||||||
:active-value="1"
|
:active-value="1"
|
||||||
:inactive-value="0"
|
:inactive-value="0"
|
||||||
|
@change="addDepartment(scope.row)"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
|
@ -82,8 +83,8 @@
|
||||||
<el-table-column align="center" label="用户部门" prop="dept.deptName"/>
|
<el-table-column align="center" label="用户部门" prop="dept.deptName"/>
|
||||||
<el-table-column align="center" label="用户邮箱" prop="email"/>
|
<el-table-column align="center" label="用户邮箱" prop="email"/>
|
||||||
<el-table-column align="center" label="用户手机号" prop="phonenumber"/>
|
<el-table-column align="center" label="用户手机号" prop="phonenumber"/>
|
||||||
<el-table-column align="center" label="创建时间" prop="createTime" />
|
<el-table-column align="center" label="创建时间" prop="createTime"/>
|
||||||
<el-table-column align="center" label="操作" prop="createTime" >
|
<el-table-column align="center" label="操作" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
style="display: block"
|
style="display: block"
|
||||||
|
@ -95,7 +96,7 @@
|
||||||
:active-value="1"
|
:active-value="1"
|
||||||
:inactive-value="0"
|
:inactive-value="0"
|
||||||
@change="updateUserPermissions(scope.row)"
|
@change="updateUserPermissions(scope.row)"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -110,20 +111,20 @@
|
||||||
|
|
||||||
import { parseTime } from '@/utils/muyu'
|
import { parseTime } from '@/utils/muyu'
|
||||||
import { listDept } from '@/api/system/dept'
|
import { listDept } from '@/api/system/dept'
|
||||||
import { permissionsUserAdd, permissionsUserDel } from '@/api/kvt/kvt'
|
import { addDepartment, permissionsUserAdd, permissionsUserDel } from '@/api/kvt/kvt'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AuthTable",
|
name: 'AuthTable',
|
||||||
props: [
|
props: [
|
||||||
"DataSource",
|
'DataSource',
|
||||||
"deptlists",
|
'deptlists',
|
||||||
"userList",
|
'userList'
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
activeName: "dept",
|
activeName: 'dept',
|
||||||
// 分页信息
|
// 分页信息
|
||||||
total: 0,
|
total: 0,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
@ -131,73 +132,83 @@ export default {
|
||||||
// 基本信息
|
// 基本信息
|
||||||
baseInfo: {},
|
baseInfo: {},
|
||||||
// 部门列表
|
// 部门列表
|
||||||
deptList: [],
|
deptList: []
|
||||||
// // 用户列表
|
// // 用户列表
|
||||||
// userList: []
|
// userList: []
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
//监听部门
|
//监听部门
|
||||||
'deptlists.status'(newVal) {
|
'deptlists.status'(newVal) {
|
||||||
if (newVal === 0) {
|
if (newVal === 0) {
|
||||||
console.log("ree",newVal)
|
console.log('ree', newVal)
|
||||||
// 开关为激活状态,执行相关逻辑
|
// 开关为激活状态,执行相关逻辑
|
||||||
} else if (newVal === 1) {
|
} else if (newVal === 1) {
|
||||||
alert("打开")
|
alert('打开')
|
||||||
// 开关为未激活状态,执行相关逻辑
|
// 开关为未激活状态,执行相关逻辑
|
||||||
}
|
}
|
||||||
deep:true
|
deep:true
|
||||||
},
|
},
|
||||||
//监听用户
|
//监听用户
|
||||||
'userList.status'(row,newVal) {
|
'userList.status'(row, newVal) {
|
||||||
if (newVal === 0) {
|
if (newVal === 0) {
|
||||||
console.log("reeeee",newVal)
|
console.log('reeeee', newVal)
|
||||||
console.log("rowwwwwww",row)
|
console.log('rowwwwwww', row)
|
||||||
// 开关为激活状态,执行相关逻辑
|
// 开关为激活状态,执行相关逻辑
|
||||||
} else if (newVal === 1) {
|
} else if (newVal === 1) {
|
||||||
alert("打开")
|
alert('打开')
|
||||||
// 开关为未激活状态,执行相关逻辑
|
// 开关为未激活状态,执行相关逻辑
|
||||||
}
|
}
|
||||||
deep:true
|
deep:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
setTimeout(() => this.loading = false, 200)
|
setTimeout(() => this.loading = false, 200)
|
||||||
// this.init()
|
|
||||||
},
|
},
|
||||||
// mounted() {
|
|
||||||
// this.selectDept()
|
|
||||||
// },
|
|
||||||
methods: {
|
methods: {
|
||||||
updateUserPermissions(row){
|
addDepartment(row) {
|
||||||
console.log("rrrow", row)
|
console.log("rrrow",row)
|
||||||
const userId =row.userId
|
const deptId =row.deptId
|
||||||
const deptId =row.dept.deptId
|
|
||||||
console.log("Tht",this.DataSource)
|
console.log("Tht",this.DataSource)
|
||||||
let data = {
|
let data = {
|
||||||
tbaleName:this.DataSource.tableName,
|
deptId :deptId,
|
||||||
|
tbaleName:this.DataSource.databaseName,
|
||||||
kvtId:this.DataSource.id,
|
kvtId:this.DataSource.id,
|
||||||
|
|
||||||
|
}
|
||||||
|
addDepartment(data).then(res => {
|
||||||
|
this.$message.success(res.data)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
updateUserPermissions(row) {
|
||||||
|
console.log('rrrow', row)
|
||||||
|
const userId = row.userId
|
||||||
|
const deptId = row.dept.deptId
|
||||||
|
console.log('Tht', this.DataSource)
|
||||||
|
let data = {
|
||||||
|
tbaleName: this.DataSource.tableName,
|
||||||
|
kvtId: this.DataSource.id,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
deptId :deptId
|
deptId: deptId
|
||||||
}
|
}
|
||||||
|
|
||||||
permissionsUserAdd(data).then(res => {
|
permissionsUserAdd(data).then(res => {
|
||||||
this.$message.success(res.data)
|
this.$message.success(res.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
parseTime,
|
parseTime,
|
||||||
/** 转换部门数据结构 */
|
/** 转换部门数据结构 */
|
||||||
normalizer(node) {
|
normalizer(node) {
|
||||||
if (node.children && !node.children.length) {
|
if (node.children && !node.children.length) {
|
||||||
delete node.children;
|
delete node.children
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
id: node.deptId,
|
id: node.deptId,
|
||||||
label: node.deptName,
|
label: node.deptName,
|
||||||
children: node.children
|
children: node.children
|
||||||
};
|
}
|
||||||
},
|
}
|
||||||
// init(){
|
// init(){
|
||||||
// let response = {
|
// let response = {
|
||||||
// "code": 200,
|
// "code": 200,
|
||||||
|
@ -267,7 +278,6 @@ export default {
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
}
|
||||||
},
|
}
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">数据接入监控</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'DataAccessMonitor',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods:{}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container"> 规则引擎监控</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'RuleEngineMonitor',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 表单参数
|
||||||
|
form: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
Loading…
Reference in New Issue