Commit 2b60e6ce by 周海峰

项目加密设置页面

parent 755912ad
...@@ -889,6 +889,93 @@ export function queryExtendColumnSize(data) { ...@@ -889,6 +889,93 @@ export function queryExtendColumnSize(data) {
}) })
} }
/**
* 查询加密类型
* @param {*} data
* @returns {"code":"200","msg":"","totalCount":0,"flag":true,"data":["jdbc","webhdfs"]}
*/
export function enctypes(data) {
return request({
url: '/core/tablerule/enctypes',
method: 'post',
data: data
})
}
/**
* 查询后缀
* @param {*} data
* @returns
* {
* "code": "POP_00014",
* "msg": "成功。",
* "totalCount": 0,
* "flag": true,
* "data": {
* "cipherSuffix": "_cipher",
* "initialSuffix": "_initial",
* "copySuffix": "_copy"
* }
* }
*/
export function queryPostfix(data) {
return request({
url: '/core/encryption/queryPostfix',
method: 'post',
data: data
})
}
/**
* 查询版本
* @param {*} data id
* @returns
* {
* "code": "POP_00014",
* "msg": "成功。",
* "totalCount": 0,
* "flag": true,
* "data": [
* {
* "value": "TaskVersion",
* "text": "任务版本",
* "flag": null,
* "filePath": null,
* "id": null,
* "dbType": null,
* "schmeid": null,
* "dataSystemId": null,
* "tid": null
* },
* {
* "value": "null",
* "text": "无版本",
* "flag": null,
* "filePath": null,
* "id": null,
* "dbType": null,
* "schmeid": null,
* "dataSystemId": null,
* "tid": null
* }
* ]
* }
*/
export function queryversion(data) {
return request({
url: '/core/fieldscopedata/queryversion',
method: 'post',
data: data
})
}
//=========== 点击字段的设置===========开始 //=========== 点击字段的设置===========开始
/** /**
...@@ -1037,9 +1124,51 @@ export function encryptionQuery(data) { ...@@ -1037,9 +1124,51 @@ export function encryptionQuery(data) {
return request({ return request({
url: '/core/encryption/query', url: '/core/encryption/query',
method: 'get', method: 'get',
data: data query: data
}) })
} }
//=========== 点击字段的设置===========结束 //=========== 点击字段的设置===========结束
/**
* 删除多余列(表字段)
* @param {*} data
* @returns
*/
export function delTableColumn(data) {
return request({
url: '/switchfield/delTableColumn',
method: 'POST',
data: data
})
}
/**
* 保存加密配置
* @param {*} data
* {
* datasystemid: '',
* projectId: '',
* map: {
* ry#|#sys_user#|#dept_id: {
* columnType: "BIGINT",
* describe_info: "11",
* encdigit: "0",
* encryptionSecretKeyId: "",
* flag: "0",
* note: "部门ID",
* realitycolumnsize: "19",
* twoindex: "0"
* }
* }
* @returns
*/
export function save(data) {
return request({
url: '/core/encryptionconfig/save',
method: 'POST',
data: data
})
}
<template> <template>
<div class="basic-info-tab"> <div class="basic-info-tab">
<el-descriptions <el-descriptions
title="系统基本信息" title=""
border border
:column="1" :column="1"
size="medium"
> >
<el-descriptions-item label="项目">若依配测系统</el-descriptions-item> <el-descriptions-item label="项目">{{ nodeInfo.projectName || ''}}</el-descriptions-item>
<el-descriptions-item label="数据源">若依配测系统</el-descriptions-item> <el-descriptions-item label="数据源">{{ nodeInfo.datasystemName || ''}}</el-descriptions-item>
<el-descriptions-item label="数据源类型">MYSQL</el-descriptions-item> <el-descriptions-item label="数据源类型">{{ nodeInfo.dbType || ''}}</el-descriptions-item>
<el-descriptions-item label="IP">172.19.1.166</el-descriptions-item> <el-descriptions-item label="IP">{{ nodeInfo.ip || ''}}</el-descriptions-item>
<el-descriptions-item label="管理的SCHEMA">ry</el-descriptions-item> <el-descriptions-item label="管理的SCHEMA">{{ nodeInfo.schema || ''}}</el-descriptions-item>
<el-descriptions-item label="字段数">{{ nodeInfo.totalFiledNum || ''}}</el-descriptions-item>
<el-descriptions-item label="加密表数量">{{ nodeInfo.encryptTableCount || ''}}</el-descriptions-item>
<el-descriptions-item label="加密字段数量">{{ nodeInfo.encryptFiledCount || ''}}</el-descriptions-item>
<el-descriptions-item label="未加密字段数量">{{ nodeInfo.unencryptTableCount || ''}}</el-descriptions-item>
<el-descriptions-item label="未加密字段数量">{{ nodeInfo.unencryptFiledCount || ''}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
<script setup> <script setup>
// 可以留空,因为数据是静态的 import { computed } from 'vue'
const props = defineProps({
nodeData: {
type: Object,
default: () => ({})
}
})
// 可根据不同级别节点展示不同内容
const nodeType = computed(() => props.nodeData?.type)
const nodeInfo = computed(() => props.nodeData || {})
</script> </script>
<style scoped> <style scoped>
......
...@@ -2,18 +2,23 @@ ...@@ -2,18 +2,23 @@
<div class="structure-tab"> <div class="structure-tab">
<el-table <el-table
:data="tableData" :data="tableData"
max-height="500px"
border border
style="width: 100%" style="width: 100%"
:header-cell-style="{ background: '#f5f7fa', color: '#333' }" :header-cell-style="{ background: '#f5f7fa', color: '#333' }"
:row-style="{ height: '40px' }" :row-style="{ height: '40px' }"
:cell-style="{ padding: '8px 0', textAlign: 'center' }" :cell-style="{ padding: '8px 0', textAlign: 'center' }"
> >
<el-table-column prop="pk" label="主键" width="120" fixed/> <el-table-column label="主键" width="80" fixed>
<el-table-column prop="fieldName" label="字段名" width="180" /> <template #default="scope">
<el-table-column prop="comment" label="注释" min-width="200" /> <el-tag v-if="scope.row.primarykey === '1'" type="success"></el-tag>
<el-table-column prop="fieldType" label="类型" width="120" /> </template>
<el-table-column prop="length" label="长度" width="120" /> </el-table-column>
<el-table-column prop="precision" label="精度" width="120" /> <el-table-column prop="columnname" label="字段名" width="180" />
<el-table-column prop="remarks" label="注释" min-width="200" />
<el-table-column prop="typename" label="类型" width="120" />
<el-table-column prop="columnsize" label="长度" width="120" />
<el-table-column prop="decimaldigits" label="精度" width="120" />
</el-table> </el-table>
</div> </div>
</template> </template>
...@@ -23,18 +28,7 @@ const props = defineProps({ ...@@ -23,18 +28,7 @@ const props = defineProps({
tableData: { tableData: {
type: Array, type: Array,
required: true, required: true,
default: () => [ default: () => []
{ pk: '', fieldName: 'business_name', comment: '生成业务名', fieldType: 'VARCHAR', length: '30', precision: '' },
{ pk: '', fieldName: 'business_name_...', comment: '', fieldType: 'TEXT', length: '65535', precision: '' },
{ pk: '', fieldName: 'class_name', comment: '实体类名称', fieldType: 'VARCHAR', length: '100', precision: '' },
{ pk: '', fieldName: 'create_by', comment: '创建者', fieldType: 'VARCHAR', length: '64', precision: '' },
{ pk: '', fieldName: 'create_time', comment: '创建时间', fieldType: 'DATETIME', length: '19', precision: '' },
{ pk: '', fieldName: 'function_author', comment: '生成功能作者', fieldType: 'VARCHAR', length: '50', precision: '' },
{ pk: '', fieldName: 'function_name', comment: '生成功能名', fieldType: 'VARCHAR', length: '50', precision: '' },
{ pk: '', fieldName: 'gen_path', comment: '生成路径(不填...', fieldType: 'VARCHAR', length: '200', precision: '' },
{ pk: '', fieldName: 'gen_type', comment: '生成代码方式(0...', fieldType: 'CHAR', length: '1', precision: '' },
{ pk: '', fieldName: 'module_name', comment: '生成模块名', fieldType: 'VARCHAR', length: '30', precision: '' }
]
} }
}) })
</script> </script>
......
<template> <template>
<div class="table-info-tab"> <div class="table-info-tab">
<!-- 表基本信息 -->
<el-descriptions <el-descriptions
title="表基本信息" title=""
border border
:column="1" :column="1"
size="medium"
> >
<el-descriptions-item label="字段数">224</el-descriptions-item> <el-descriptions-item label="字段数">{{ nodeData.totalColumnCount }}</el-descriptions-item>
<el-descriptions-item label="加密表数量">0</el-descriptions-item> <el-descriptions-item label="未加密字段数量">{{ nodeData.unencryptColumnCount }}</el-descriptions-item>
<el-descriptions-item label="加密字段数量">0</el-descriptions-item> <el-descriptions-item label="加密字段数量">{{ nodeData.encryptColumnCount }}</el-descriptions-item>
<el-descriptions-item label="未加密表数量">20</el-descriptions-item> <el-descriptions-item label="操作人">{{ nodeData.operator }}</el-descriptions-item>
<el-descriptions-item label="未加密字段数量">224</el-descriptions-item> <el-descriptions-item label="操作时间">{{ nodeData.operationTime }}</el-descriptions-item>
<el-descriptions-item label="操作人">admin</el-descriptions-item>
<el-descriptions-item label="操作时间">2023-05-15 14:30:22</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
<script setup> <script setup>
// 可以留空,因为数据是静态的 // 可以留空,因为数据是静态的
const props = defineProps({
nodeData: {
type: Object,
default: () => ({})
}
})
</script> </script>
<style scoped> <style scoped>
......
...@@ -27,6 +27,18 @@ ...@@ -27,6 +27,18 @@
<span class="custom-tree-node"> <span class="custom-tree-node">
<i :class="getNodeIcon(data.type)" class="node-icon"></i> <i :class="getNodeIcon(data.type)" class="node-icon"></i>
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<template v-if="data.type === 'category'">
<i class="el-icon-collection icon-category" style="margin-left:6px;color:#F7BA2A;font-size:16px;"></i>
</template>
<template v-if="data.type === 'system'">
<i class="el-icon-s-platform icon-system" style="margin-left:6px;color:#409EFF;font-size:16px;"></i>
</template>
<template v-if="data.type === 'database'">
<i class="el-icon-s-data icon-database" style="margin-left:6px;color:#67C23A;font-size:16px;"></i>
</template>
<template v-if="data.type === 'table'">
<i class="el-icon-s-grid icon-table" style="margin-left:6px;color:#E6A23C;font-size:16px;"></i>
</template>
</span> </span>
</template> </template>
</el-tree> </el-tree>
...@@ -125,9 +137,11 @@ const handleNodeClick = (data) => { ...@@ -125,9 +137,11 @@ const handleNodeClick = (data) => {
<style scoped> <style scoped>
.tree-filter-container { .tree-filter-container {
max-height: 700px;
overflow-y: auto;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #f5f5f5; /* background-color: #f5f5f5; */
padding: 10px; padding: 10px;
border-right: 1px solid #e6e6e6; border-right: 1px solid #e6e6e6;
} }
...@@ -152,6 +166,19 @@ const handleNodeClick = (data) => { ...@@ -152,6 +166,19 @@ const handleNodeClick = (data) => {
color: #606266; color: #606266;
} }
.icon-category {
vertical-align: middle;
}
.icon-system {
vertical-align: middle;
}
.icon-database {
vertical-align: middle;
}
.icon-table {
vertical-align: middle;
}
:deep(.el-tree-node__content) { :deep(.el-tree-node__content) {
height: 36px; height: 36px;
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2018-2025 All Rights Reserved.</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -86,8 +86,8 @@ const appStore = useAppStore() ...@@ -86,8 +86,8 @@ const appStore = useAppStore()
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const loginForm = ref({ const loginForm = ref({
username: "admin", username: "",
password: "admin123", password: "",
rememberMe: false, rememberMe: false,
code: "", code: "",
uuid: "" uuid: ""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论