Commit 4c061ac4 by ningjihai

脱敏-详情

parent e757300b
......@@ -7,7 +7,7 @@
class="strategy-add-dialog"
>
<!-- 步骤指示器 -->
<div class="steps-container">
<div class="steps-container" v-if="dialogType !== 'detail'">
<el-steps :active="activeStep" align-center>
<el-step title="基本信息" />
<el-step title="规则配置" />
......@@ -49,7 +49,7 @@
<!-- 第二步:规则配置 -->
<div v-if="activeStep === 2" class="step-content">
<div class="version-select">
<div class="version-select" v-if="dialogType !== 'detail'">
<span class="label">根据发现版本设置脱敏:</span>
<span class="label" style="margin-left: 60px;">选择发现版本:</span>
<el-tree-select
......@@ -65,7 +65,48 @@
</div>
<el-row v-if="dialogType === 'detail'">
<el-col :span="8" class="flex-container detail-info">
<div class="label">
策略名称:
</div>
<div class="value">
{{ detailData.strategyName }}
</div>
</el-col>
<el-col :span="8" class="flex-container detail-info">
<div class="label">
备注:
</div>
<div class="value">
{{ detailData.remarks || '—' }}
</div>
</el-col>
<el-col :span="8" class="flex-container detail-info">
<div class="label">
创建人:
</div>
<div class="value">
{{ detailData.createuser }}
</div>
</el-col>
<el-col :span="8" class="flex-container detail-info">
<div class="label">
创建时间:
</div>
<div class="value">
{{ detailData.createtime }}
</div>
</el-col>
<el-col :span="8" class="flex-container detail-info">
<div class="label">
状态:
</div>
<div class="value">
{{ detailData.state === '1' ? '已启用' : '未启用' }}
</div>
</el-col>
</el-row>
<div class="config-container">
<!-- 左侧树形结构 -->
<div class="tree-panel">
......@@ -103,7 +144,7 @@
</div>
<template #footer>
<span class="dialog-footer">
<span class="dialog-footer" v-if="dialogType !== 'detail'">
<el-button @click="handleCancel">取消</el-button>
<el-button v-if="activeStep === 2" @click="activeStep = 1">上一步</el-button>
<el-button
......@@ -356,7 +397,8 @@ watch([currentNodeLevel, currentNodeData], async ([level, node]) => {
if (level === 4 && node ) {
console.log('level4',node)
dataTableLabel.value = node.label
schema.value = node.parent.parent.value
schema.value = node.parent.parent.schema
console.log('步骤4 schema.value',schema.value)
datasystem_id.value = node.parent.parent.parent.tid
dataSystemid.value = node.parent.parent.parent.tid
tableLoading.value = true
......@@ -409,9 +451,9 @@ watch([currentNodeLevel, currentNodeData], async ([level, node]) => {
}
}
console.log(123123)
// console.log(123123)
if(dialogType.value === 'edit' || dialogType.value === 'detail'){
console.log('infoTable.value',infoTable.value)
// console.log('infoTable.value',infoTable.value)
infoTable.value.forEach(item => {
let str = `${item.tschemas}.${item.names}.${item.table_field_id}`
......@@ -447,6 +489,15 @@ watch([currentNodeLevel, currentNodeData], async ([level, node]) => {
let index = tableData.value.findIndex(x =>x.fieldName === item.table_field_id)
console.log(index)
console.log('datasystem_id',datasystem_id.value)
console.log('item.dataSystemid',item.dataSystemid)
console.log('===============================')
console.log('schema.value',schema.value)
console.log('item.value',item.value)
console.log('===============================')
console.log('dataTableLabel.value',dataTableLabel.value)
console.log('item.names',item.names)
if(index !== -1 && datasystem_id.value === item.dataSystemid && schema.value === item.tschemas && dataTableLabel.value === item.names){
tableData.value[index].dataareaname = item.dataareaname
console.log('tableData.value',tableData.value)
......@@ -646,13 +697,17 @@ const tableData = ref([])
const infoTable = ref([])
const dialogType = ref('')
const detailData = ref({})
// 打开对话框
const openDialog = async (mode, strategyData = null) => {
dialogType.value = mode
dialogVisible.value = true
activeStep.value = 1
selectedVersion.value = ''
if(dialogType.value === 'detail' || mode === 'detail'){
activeStep.value = 2
detailData.value = strategyData
}
desensitizationStrategyDetails({
strategyId: strategyData ? strategyData.strategyId : '',
......@@ -754,6 +809,8 @@ const resetForm = () => {
activeStep.value = 1
selectedVersion.value = ''
tableData.value = []
detailData.value = {}
dialogType.value = ''
}
// 下一步操作
......@@ -922,4 +979,36 @@ defineExpose({
:deep(.el-form-item__label) {
font-weight: bold;
}
.flex-container {
display: flex;
}
.align-center {
align-items: center;
}
.justify-between {
justify-content: space-between;
}
.flex1 {
flex: 1;
}
.flex-wrap {
flex-direction: wrap;
}
.detail-info {
margin: 10px 0;
.label {
width: 80px;
font-size: 14px;
color: #7a8495;
font-weight: bold;
}
.value {
font-size: 14px;
color: #7a8495;
font-weight: bold;
}
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论