Commit 632ed21d by ningjihai

加密设置

parent 8a089a91
...@@ -74,6 +74,7 @@ export default defineComponent({ ...@@ -74,6 +74,7 @@ export default defineComponent({
type: Array as PropType<Array<{ type: Array as PropType<Array<{
text: string text: string
color?: string color?: string
class?: string
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'
plain?: boolean plain?: boolean
round?: boolean round?: boolean
...@@ -194,6 +195,7 @@ export default defineComponent({ ...@@ -194,6 +195,7 @@ export default defineComponent({
type: btn.type, type: btn.type,
plain: btn.plain, plain: btn.plain,
round: btn.round, round: btn.round,
class: btn.class,
color: btn.color, color: btn.color,
onClick: btn.onClick onClick: btn.onClick
}, },
......
<template> <template>
<div class="basic-info-tab"> <div class="basic-info-tab">
<el-descriptions <!-- <el-descriptions
title="" title=""
border border
:column="1" :column="1"
...@@ -15,7 +15,43 @@ ...@@ -15,7 +15,43 @@
<el-descriptions-item label="加密字段数量">{{ nodeInfo.encryptFiledCount || ''}}</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.unencryptTableCount || ''}}</el-descriptions-item>
<el-descriptions-item label="未加密字段数量">{{ nodeInfo.unencryptFiledCount || ''}}</el-descriptions-item> <el-descriptions-item label="未加密字段数量">{{ nodeInfo.unencryptFiledCount || ''}}</el-descriptions-item>
</el-descriptions> </el-descriptions> -->
<el-form ref="formRef" :model="nodeInfo" label-width="138px" >
<div class="formBox">
<el-form-item label="项目" >
<el-input v-model="nodeInfo.projectName" disabled></el-input>
</el-form-item>
<el-form-item label="数据源" >
<el-input v-model="nodeInfo.datasystemName" disabled></el-input>
</el-form-item>
<el-form-item label="数据源类型" >
<el-input v-model="nodeInfo.dbType" disabled></el-input>
</el-form-item>
<el-form-item label="IP" >
<el-input v-model="nodeInfo.ip" disabled></el-input>
</el-form-item>
<el-form-item label="管理的schema">
<el-input v-model="nodeInfo.schema" disabled></el-input>
</el-form-item>
<el-form-item label="字段数" >
<el-input v-model="nodeInfo.totalFiledNum" disabled></el-input>
</el-form-item>
<el-form-item label="加密表数量" >
<el-input v-model="nodeInfo.encryptTableCount" disabled></el-input>
</el-form-item>
<el-form-item label="加密字段数量" >
<el-input v-model="nodeInfo.encryptFiledCount" disabled></el-input>
</el-form-item>
<el-form-item label="未加密表数量" >
<el-input v-model="nodeInfo.unencryptTableCount" disabled></el-input>
</el-form-item>
<el-form-item label="未加密字段数量" >
<el-input v-model="nodeInfo.unencryptFiledCount" disabled></el-input>
</el-form-item>
</div>
</el-form>
</div> </div>
</template> </template>
...@@ -70,4 +106,44 @@ const nodeInfo = computed(() => props.nodeData || {}) ...@@ -70,4 +106,44 @@ const nodeInfo = computed(() => props.nodeData || {})
font-size: 12px; font-size: 12px;
color: rgba(148, 148, 148, 1); color: rgba(148, 148, 148, 1);
} }
:deep(.formBox) {
border-radius: 5px;
background: #ebebeb;
border: 1px solid rgba(29, 178, 245, 1);
overflow: hidden;
.el-form-item__content {
margin-left: 1px;
background: #f5fcff;
}
.el-form-item__label {
height: 40px;
line-height: 40px;
background: #f5fcff;
color: rgba(148, 148, 148, 1);
}
.el-form-item {
margin-bottom: 1px;
}
.el-input {
height: 40px;
line-height: 40px;
}
.is-disabled {
background: #f5fcff;
.el-input__wrapper {
background: #f5fcff;
box-shadow: none;
border-radius: 0;
}
.el-input__inner {
-webkit-text-fill-color: rgba(53, 64, 79, 1);
}
}
.el-form-item__error {
top: 30% !important;
left: auto !important;
right: 89px !important;
}
}
</style> </style>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<span> <span>
<el-button type="primary" :icon="Refresh" @click="getTableData">刷新</el-button> <el-button type="success" plain :icon="Refresh" @click="getTableData">刷新</el-button>
</span> </span>
</el-form> </el-form>
</div> </div>
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
<div class="table-wrapper" style="position:relative;"> <div class="table-wrapper" style="position:relative;">
<el-table <el-table
:data="filteredTableData" :data="filteredTableData"
border stripe
style="width: 100%; margin-top: 15px;" style="width: 100%; margin-top: 15px;"
max-height="500px" height="280px"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@cell-click="handleCellClick" @cell-click="handleCellClick"
:class="{ 'non-editing': !isEditing }" :class="{ 'non-editing': !isEditing }"
...@@ -88,10 +89,10 @@ ...@@ -88,10 +89,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="action-buttons"> <div class="action-buttons">
<el-button v-if="!isEditing" type="primary" :loading="isBatchEncrypting" @click="handleBatchEncrypt">批量加密</el-button> <el-button v-if="!isEditing" type="warning" icon="Lock" :loading="isBatchEncrypting" @click="handleBatchEncrypt">批量加密</el-button>
<el-button v-if="!isEditing" type="primary" :loading="isBatchDecrypting" @click="handleBatchDecrypt">批量解密</el-button> <el-button v-if="!isEditing" type="success" icon="Unlock" :loading="isBatchDecrypting" @click="handleBatchDecrypt">批量解密</el-button>
<el-button v-if="!isEditing" type="primary" @click="handleDeleteColumns">删除多余列</el-button> <el-button v-if="!isEditing" type="danger" icon="Delete" @click="handleDeleteColumns">删除多余列</el-button>
<el-button v-if="!isEditing" type="primary" @click="toggleEditMode">编辑</el-button> <el-button v-if="!isEditing" type="primary" icon="Edit" @click="toggleEditMode">编辑</el-button>
<el-button v-if="isEditing" type="info" @click="toggleEditMode">取消</el-button> <el-button v-if="isEditing" type="info" @click="toggleEditMode">取消</el-button>
<el-button v-if="isEditing" type="primary" @click="handleSave">保存</el-button> <el-button v-if="isEditing" type="primary" @click="handleSave">保存</el-button>
</div> </div>
...@@ -108,7 +109,11 @@ ...@@ -108,7 +109,11 @@
</template> </template>
<script setup> <script setup>
import { Refresh } from '@element-plus/icons-vue' import { Refresh,
Lock,
Unlock,
Delete } from '@element-plus/icons-vue'
import { ref, computed, reactive, inject, nextTick} from 'vue' import { ref, computed, reactive, inject, nextTick} from 'vue'
import EncryptionRuleDialog from './EncryptionRuleDialog.vue' import EncryptionRuleDialog from './EncryptionRuleDialog.vue'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
<div class="structure-tab"> <div class="structure-tab">
<el-table <el-table
:data="tableData" :data="tableData"
max-height="500px" height="280px"
border stripe
style="width: 100%" style="width: 100%"
:header-cell-style="{ background: '#f5f7fa', color: '#333' }"
:row-style="{ height: '40px' }"
:cell-style="{ padding: '8px 0', textAlign: 'center' }"
> >
<el-table-column label="主键" width="80" fixed> <el-table-column label="主键" width="80" fixed>
<template #default="scope"> <template #default="scope">
......
<template> <template>
<div class="table-info-tab"> <div class="table-info-tab">
<!-- 表基本信息 --> <!-- 表基本信息 -->
<el-descriptions <!-- <el-descriptions
title="" title=""
border border
:column="1" :column="1"
...@@ -11,7 +11,29 @@ ...@@ -11,7 +11,29 @@
<el-descriptions-item label="加密字段数量">{{ nodeData.encryptColumnCount }}</el-descriptions-item> <el-descriptions-item label="加密字段数量">{{ nodeData.encryptColumnCount }}</el-descriptions-item>
<el-descriptions-item label="操作人">{{ nodeData.operator }}</el-descriptions-item> <el-descriptions-item label="操作人">{{ nodeData.operator }}</el-descriptions-item>
<el-descriptions-item label="操作时间">{{ nodeData.operationTime }}</el-descriptions-item> <el-descriptions-item label="操作时间">{{ nodeData.operationTime }}</el-descriptions-item>
</el-descriptions> </el-descriptions> -->
<el-form ref="formRef" :model="nodeData" label-width="138px" >
<div class="formBox">
<el-form-item label="字段数" >
<el-input v-model="nodeData.totalColumnCount" disabled></el-input>
</el-form-item>
<el-form-item label="未加密字段数量" >
<el-input v-model="nodeData.unencryptColumnCount" disabled></el-input>
</el-form-item>
<el-form-item label="加密字段数量" >
<el-input v-model="nodeData.encryptColumnCount" disabled></el-input>
</el-form-item>
<el-form-item label="操作人" >
<el-input v-model="nodeData.operator" disabled></el-input>
</el-form-item>
<el-form-item label="操作时间">
<el-input v-model="nodeData.operationTime" disabled></el-input>
</el-form-item>
</div>
</el-form>
</div> </div>
</template> </template>
...@@ -66,5 +88,43 @@ const props = defineProps({ ...@@ -66,5 +88,43 @@ const props = defineProps({
font-size: 12px; font-size: 12px;
color: rgba(148, 148, 148, 1); color: rgba(148, 148, 148, 1);
} }
:deep(.formBox) {
border-radius: 5px;
background: #ebebeb;
border: 1px solid rgba(29, 178, 245, 1);
overflow: hidden;
.el-form-item__content {
margin-left: 1px;
background: #f5fcff;
}
.el-form-item__label {
height: 40px;
line-height: 40px;
background: #f5fcff;
color: rgba(148, 148, 148, 1);
}
.el-form-item {
margin-bottom: 1px;
}
.el-input {
height: 40px;
line-height: 40px;
}
.is-disabled {
background: #f5fcff;
.el-input__wrapper {
background: #f5fcff;
box-shadow: none;
border-radius: 0;
}
.el-input__inner {
-webkit-text-fill-color: rgba(53, 64, 79, 1);
}
}
.el-form-item__error {
top: 30% !important;
left: auto !important;
right: 89px !important;
}
}
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,25 @@ ...@@ -2,7 +2,25 @@
import { computed, ref, watch } from 'vue'; import { computed, ref, watch } from 'vue';
import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue'; import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue';
import encryptFlag from '@/constants/encryptFlag.js'; import encryptFlag from '@/constants/encryptFlag.js';
const emit = defineEmits(['update:modelValue', 'query', 'reset']); import {
Lock,
Unlock,
Delete
} from '@element-plus/icons-vue'
const emit = defineEmits(['update:modelValue', 'query', 'reset', 'deleteUnnecessaryColumns', 'bulkEncryption', 'batchDecryption']);
function deleteUnnecessaryColumns() {
emit('deleteUnnecessaryColumns')
}
function bulkEncryption() {
emit('bulkEncryption')
}
function batchDecryption() {
emit('batchDecryption')
}
const props = defineProps({ const props = defineProps({
modelValue: Object modelValue: Object
}); });
...@@ -31,15 +49,67 @@ function onReset(formRef) { ...@@ -31,15 +49,67 @@ function onReset(formRef) {
queryForm.value.status = []; queryForm.value.status = [];
emit('reset', formRef); emit('reset', formRef);
} }
</script> </script>
<template> <template>
<!-- <el-button
type="primary"
@click="deleteUnnecessaryColumns"
>
删除多余列
</el-button>
<el-button
type="primary"
@click="bulkEncryption"
>
批量加密
</el-button>
<el-button
type="primary"
@click="batchDecryption"
>
批量解密
</el-button> -->
<!-- el-form --> <!-- el-form -->
<page-wrapper-search <page-wrapper-search
:model="queryForm" :model="queryForm"
:extraButtons="[
{
text: '删除多余列',
icon: Delete,
plain: true,
color: 'rgba(255, 141, 26, 1)',
type: 'success',
onClick: deleteUnnecessaryColumns
},
{
text: '批量加密',
icon: Lock,
plain: true,
color: 'rgba(11, 136, 251, 1)',
type: 'success',
onClick: bulkEncryption
},
{
text: '批量解密',
icon: Unlock,
plain: true,
color: 'rgba(0, 186, 173, 1)',
type: 'success',
onClick: batchDecryption
}
]"
@search="onSearch" @search="onSearch"
@reset="onReset"> @reset="onReset">
<el-form-item label="数据源名称" prop="datasource"> <!-- <el-form-item label="数据源名称" prop="datasource">
<el-input <el-input
v-model="queryForm.datasource" v-model="queryForm.datasource"
placeholder="请输入数据源名称" placeholder="请输入数据源名称"
...@@ -53,7 +123,7 @@ function onReset(formRef) { ...@@ -53,7 +123,7 @@ function onReset(formRef) {
placeholder="请输入SCHEMA" placeholder="请输入SCHEMA"
clearable clearable
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="表名称" prop="tableName"> <el-form-item label="表名称" prop="tableName">
<el-input <el-input
...@@ -62,7 +132,7 @@ function onReset(formRef) { ...@@ -62,7 +132,7 @@ function onReset(formRef) {
clearable clearable
/> />
</el-form-item> </el-form-item>
<!--
<el-form-item label="字段名称" prop="fieldName"> <el-form-item label="字段名称" prop="fieldName">
<el-input <el-input
v-model="queryForm.fieldName" v-model="queryForm.fieldName"
...@@ -80,7 +150,7 @@ function onReset(formRef) { ...@@ -80,7 +150,7 @@ function onReset(formRef) {
> >
<el-option v-for="value in encryptFlag" :label="value.label" :value="value.value" /> <el-option v-for="value in encryptFlag" :label="value.label" :value="value.value" />
</el-select> </el-select>
</el-form-item> </el-form-item> -->
</page-wrapper-search> </page-wrapper-search>
</template> </template>
......
...@@ -269,7 +269,7 @@ watch(dialogVisible, (newVal) => { ...@@ -269,7 +269,7 @@ watch(dialogVisible, (newVal) => {
返回项目管理 返回项目管理
</template> </template>
<template #buttons> <template #buttons>
<el-button <!-- <el-button
type="primary" type="primary"
@click="deleteUnnecessaryColumns" @click="deleteUnnecessaryColumns"
> >
...@@ -286,7 +286,7 @@ watch(dialogVisible, (newVal) => { ...@@ -286,7 +286,7 @@ watch(dialogVisible, (newVal) => {
@click="batchDecryption" @click="batchDecryption"
> >
批量解密 批量解密
</el-button> </el-button> -->
</template> </template>
</PageTitle> </PageTitle>
...@@ -295,20 +295,22 @@ watch(dialogVisible, (newVal) => { ...@@ -295,20 +295,22 @@ watch(dialogVisible, (newVal) => {
<QueryForm <QueryForm
ref="QueryFormRef" ref="QueryFormRef"
v-model="queryParams" v-model="queryParams"
@deleteUnnecessaryColumns="deleteUnnecessaryColumns"
@batchDecryption="batchDecryption"
@bulkEncryption="bulkEncryption"
@query="onQuery" @query="onQuery"
@reset="onReset"/> @reset="onReset"/>
<div class="warning-alert"> <!-- <div class="warning-alert">
<div class="warning-content flex-container align-center"> <div class="warning-content flex-container align-center">
<el-icon color="#f33"><WarnTriangleFilled /></el-icon> <el-icon color="#f33"><WarnTriangleFilled /></el-icon>
<span class="warning-text">警告:存在未加密字段,请完成历史数据加密操作,否则无法正常使用插件!</span> <span class="warning-text">警告:存在未加密字段,请完成历史数据加密操作,否则无法正常使用插件!</span>
</div> </div>
</div> </div> -->
<el-table <el-table
:data="tableData" :data="tableData"
border stripe
style="width: 100%" style="width: 100%"
:header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
> >
<el-table-column type="index" label="序号" width="60" align="center" /> <el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="datasystemname" label="数据源名" width="120" show-overflow-tooltip /> <el-table-column prop="datasystemname" label="数据源名" width="120" show-overflow-tooltip />
......
...@@ -372,7 +372,7 @@ onUnmounted(() => { ...@@ -372,7 +372,7 @@ onUnmounted(() => {
<span></span> <span></span>
<span>客户端列表区域:</span> <span>客户端列表区域:</span>
</div> </div>
<el-table :data="dataList" border style="width: 100%"> <el-table :data="dataList" stripe style="width: 100%">
<el-table-column label="序号" align="center" width="60" type="index"> <el-table-column label="序号" align="center" width="60" type="index">
<template #default="scope"> <template #default="scope">
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
import { computed,ref,watch } from 'vue' import { computed,ref,watch } from 'vue'
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue' import PageWrapperSearch from '@/components/search/PageWrapperSearch.vue'
// import { useDict } from '@/utils/dict' import {
// import { listDept } from '@/api/system/dept'// 部门 Plus
} from '@element-plus/icons-vue'
// const { approve_status, invoice_status} = useDict('approve_status', 'invoice_status') // const { approve_status, invoice_status} = useDict('approve_status', 'invoice_status')
const emit = defineEmits(['update:modelValue', 'query', 'reset']) const emit = defineEmits(['update:modelValue', 'query', 'reset','add'])
const invoice_status_filter = ref([]) const invoice_status_filter = ref([])
const employeesList = ref([]) const employeesList = ref([])
const props = defineProps<{ const props = defineProps<{
...@@ -39,6 +40,9 @@ function onReset(formRef: FormInstance) { ...@@ -39,6 +40,9 @@ function onReset(formRef: FormInstance) {
emit('reset', formRef) emit('reset', formRef)
} }
function handleAdd (){
emit('add')
}
</script> </script>
...@@ -46,6 +50,16 @@ function onReset(formRef: FormInstance) { ...@@ -46,6 +50,16 @@ function onReset(formRef: FormInstance) {
<!-- el-form --> <!-- el-form -->
<page-wrapper-search <page-wrapper-search
:model="queryForm" :model="queryForm"
:extraButtons="[
{
text: '新增',
icon: Plus,
color: 'rgba(0, 189, 207, 1)',
type: 'success',
class: 'btn-fff',
onClick: handleAdd
}
]"
@search="onSearch" @search="onSearch"
@reset="onReset"> @reset="onReset">
<el-form-item label="发现任务名称" prop="taskname"> <el-form-item label="发现任务名称" prop="taskname">
...@@ -63,6 +77,10 @@ function onReset(formRef: FormInstance) { ...@@ -63,6 +77,10 @@ function onReset(formRef: FormInstance) {
</page-wrapper-search> </page-wrapper-search>
</template> </template>
<style scoped> <style scoped lang="scss">
:deep(.btn-fff){
span{
color: #fff;
}
}
</style> </style>
...@@ -398,13 +398,13 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{ ...@@ -398,13 +398,13 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{
返回项目管理 返回项目管理
</template> </template>
<template #buttons> <template #buttons>
<el-button <!-- <el-button
type="primary" type="primary"
icon="Plus" icon="Plus"
@click="handleAdd" @click="handleAdd"
> >
新增发现任务 新增发现任务
</el-button> </el-button> -->
</template> </template>
</PageTitle> </PageTitle>
...@@ -414,7 +414,8 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{ ...@@ -414,7 +414,8 @@ const handleAddEditConfirm = (submitData, isEditMode) =>{
ref="QueryFormRef" ref="QueryFormRef"
v-model="queryParams" v-model="queryParams"
@query="onQuery" @query="onQuery"
@reset="onReset"/> @reset="onReset"
@add="handleAdd"/>
<el-table <el-table
:data="tableData" :data="tableData"
......
...@@ -60,7 +60,7 @@ function showAddDialog() { ...@@ -60,7 +60,7 @@ function showAddDialog() {
icon: Plus, icon: Plus,
color: 'rgba(0, 189, 207, 1)', color: 'rgba(0, 189, 207, 1)',
type: 'success', type: 'success',
textClass: 'btn-fff', class: 'btn-fff',
onClick: showAddDialog onClick: showAddDialog
} }
]" ]"
...@@ -119,5 +119,9 @@ function showAddDialog() { ...@@ -119,5 +119,9 @@ function showAddDialog() {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.btn-fff){
span{
color: #fff;
}
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论