Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
bdd3bed1
Commit
bdd3bed1
authored
Aug 25, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
9e370fdb
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
19 行删除
+24
-19
src/utils/request.js
+1
-1
src/views/classification/Classification/modules/EncryptionRuleDialog.vue
+9
-9
src/views/classification/Classification/modules/EncryptionTab.vue
+14
-9
没有找到文件。
src/utils/request.js
View file @
bdd3bed1
...
@@ -17,7 +17,7 @@ const service = axios.create({
...
@@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL
:
import
.
meta
.
env
.
VITE_APP_BASE_API
,
baseURL
:
import
.
meta
.
env
.
VITE_APP_BASE_API
,
// 超时
// 超时
timeout
:
1
0000
timeout
:
2
0000
})
})
// request拦截器
// request拦截器
...
...
src/views/classification/Classification/modules/EncryptionRuleDialog.vue
View file @
bdd3bed1
...
@@ -54,9 +54,9 @@
...
@@ -54,9 +54,9 @@
<div
class=
"config-item"
>
<div
class=
"config-item"
>
<span
class=
"required-label"
>
*加密位置:
</span>
<span
class=
"required-label"
>
*加密位置:
</span>
<el-select
v-model=
"fieldData.keepfirst"
style=
"width: 120px"
>
<el-select
v-model=
"fieldData.keepfirst"
style=
"width: 120px"
>
<el-option
label=
"保留前"
value=
"0"
/>
<el-option
label=
"保留前"
:
value=
"0"
/>
<el-option
label=
"保留后"
value=
"1"
/>
<el-option
label=
"保留后"
:
value=
"1"
/>
<el-option
label=
"既保留前"
value=
"2"
/>
<el-option
label=
"既保留前"
:
value=
"2"
/>
</el-select>
</el-select>
<el-input-number
<el-input-number
v-model=
"fieldData.encdigit"
v-model=
"fieldData.encdigit"
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
style=
"width: 100px; margin-left: 10px;"
style=
"width: 100px; margin-left: 10px;"
/>
/>
<span
class=
"unit"
>
位
</span>
<span
class=
"unit"
>
位
</span>
<span
v-if=
"fieldData.keepfirst ===
'2'
"
>
<span
v-if=
"fieldData.keepfirst ===
2
"
>
<span
class=
"unit"
>
又保留后
</span>
<span
class=
"unit"
>
又保留后
</span>
<el-input-number
<el-input-number
v-model=
"fieldData.twoindex"
v-model=
"fieldData.twoindex"
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
</div>
</div>
</div>
</div>
<div
class=
"action-row"
>
<div
class=
"action-row"
>
<el-checkbox
v-model=
"fieldData.isLike"
true-value=
"1"
false-value=
"0"
>
支持模糊
</el-checkbox>
<el-checkbox
v-model=
"fieldData.isLike"
:true-value=
"1"
:
false-value=
"0"
>
支持模糊
</el-checkbox>
<div
class=
"action-buttons"
>
<div
class=
"action-buttons"
>
<el-button
@
click=
"resetRules"
>
重置规则
</el-button>
<el-button
@
click=
"resetRules"
>
重置规则
</el-button>
<el-button
type=
"primary"
@
click=
"confirmRules"
>
确定规则
</el-button>
<el-button
type=
"primary"
@
click=
"confirmRules"
>
确定规则
</el-button>
...
@@ -138,10 +138,10 @@ const props = defineProps({
...
@@ -138,10 +138,10 @@ const props = defineProps({
maskingrulename
:
''
,
maskingrulename
:
''
,
encryptionSecretKeyId
:
''
,
// 密钥ID
encryptionSecretKeyId
:
''
,
// 密钥ID
secretkeyName
:
''
,
// 密钥名称
secretkeyName
:
''
,
// 密钥名称
isLike
:
''
,
isLike
:
0
,
encdigit
:
''
,
encdigit
:
0
,
keepfirst
:
''
,
keepfirst
:
0
,
twoindex
:
''
,
twoindex
:
0
,
flag
:
"0"
flag
:
"0"
})
})
}
}
...
...
src/views/classification/Classification/modules/EncryptionTab.vue
View file @
bdd3bed1
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<el-table-column
label=
"操作"
width=
"100"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"100"
align=
"center"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<el-button
v-if=
"row.secretkeyName && ['1', '5', '44', '10', '11'].includes(row.flag)"
type=
"primary"
size=
"small"
@
click=
"handleUnEncryptField(row)"
>
解密
</el-button>
<el-button
v-if=
"row.secretkeyName && ['1', '5', '44', '10', '11'].includes(row.flag)"
type=
"primary"
size=
"small"
@
click=
"handleUnEncryptField(row)"
>
解密
</el-button>
<el-button
v-if=
"row.secretkeyName && ['4', '6', '7', '9', '12'].includes(row.flag)"
type=
"primary"
size=
"small"
@
click=
"handleEncryptField(row)"
>
加密
</el-button>
<el-button
v-if=
"row.secretkeyName && ['
0','
4', '6', '7', '9', '12'].includes(row.flag)"
type=
"primary"
size=
"small"
@
click=
"handleEncryptField(row)"
>
加密
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- 源长度 -->
<!-- 源长度 -->
...
@@ -161,7 +161,7 @@ const getTableData = async () => {
...
@@ -161,7 +161,7 @@ const getTableData = async () => {
if
(
encryptionItem
)
{
if
(
encryptionItem
)
{
item
.
maskingruleid
=
encryptionItem
.
encryptionIdTrue
item
.
maskingruleid
=
encryptionItem
.
encryptionIdTrue
item
.
maskingrulename
=
encryptionItem
.
encryptionTypeName
item
.
maskingrulename
=
encryptionItem
.
encryptionTypeName
item
.
secretkeyId
=
encryptionItem
.
secretKey
.
id
// 编辑保存时,需要判断是否改变
item
.
secretkeyId
=
encryptionItem
.
secretKey
// 编辑保存时,需要判断是否改变
item
.
secretkeyName
=
encryptionItem
.
encryptionTypeValue
item
.
secretkeyName
=
encryptionItem
.
encryptionTypeValue
item
.
flag
=
encryptionItem
.
flag
item
.
flag
=
encryptionItem
.
flag
item
.
description
=
encryptionItem
.
describe_info
||
''
,
// 编辑保存时,需要判断是否改变
item
.
description
=
encryptionItem
.
describe_info
||
''
,
// 编辑保存时,需要判断是否改变
...
@@ -180,6 +180,7 @@ const getTableData = async () => {
...
@@ -180,6 +180,7 @@ const getTableData = async () => {
// 状态标识对象数组
// 状态标识对象数组
const
encryptFlag
=
[
const
encryptFlag
=
[
{
value
:
'0'
,
label
:
'无'
},
{
value
:
'-2'
,
label
:
'解密中'
},
{
value
:
'-2'
,
label
:
'解密中'
},
{
value
:
'-1'
,
label
:
'加密中'
},
{
value
:
'-1'
,
label
:
'加密中'
},
{
value
:
'1'
,
label
:
'加密完成'
},
{
value
:
'1'
,
label
:
'加密完成'
},
...
@@ -342,12 +343,14 @@ const handleSave = async () => {
...
@@ -342,12 +343,14 @@ const handleSave = async () => {
changedData[key] = {
changedData[key] = {
columnType: current.typename,
columnType: current.typename,
describe_info: current.description || '',
describe_info: current.description || '',
encdigit: current.encdigit || '0',
keepfirst: String(current.keepfirst || '0'),
encdigit: String(current.encdigit || '0'),
encryptionSecretKeyId: current.secretkeyId || '',
encryptionSecretKeyId: current.secretkeyId || '',
flag: current.flag || '0',
flag: current.flag || '0',
note: current.remarks || '',
note: current.remarks || '',
realitycolumnsize: String(current.columnsize || ''),
realitycolumnsize: String(current.columnsize || ''),
twoindex: current.twoindex || '0'
twoindex: String(current.twoindex || '0'),
isLike: String(current.isLike || '0')
}
}
hasChanges = true
hasChanges = true
}
}
...
@@ -415,13 +418,14 @@ const currentField = ref({})
...
@@ -415,13 +418,14 @@ const currentField = ref({})
const openEncryptionDialog = async (row) => {
const openEncryptionDialog = async (row) => {
if(!isEditing.value) return
if(!isEditing.value) return
//验证table是否有重复的字段,如果重复提示
//验证table是否有重复的字段,如果重复提示
const hasRedundance = hasRedundanceColumns({
if(row.secretkeyId){
const hasRedundance = await hasRedundanceColumns({
table: currentNodeData.value.label,
table: currentNodeData.value.label,
datasystemid: currentNodeData.value.parent?.parent?.tid,
datasystemid: currentNodeData.value.parent?.parent?.tid,
schema: currentNodeData.value.parent?.parent?.label,
schema: currentNodeData.value.parent?.parent?.label,
projectid: currentNodeData.value.parent?.parent?.parent?.project_id
projectid: currentNodeData.value.parent?.parent?.parent?.project_id
})
})
if (hasRedundance && hasRedundance.code === 'POP_00014' && !hasRedundance.cod
e.flag) {
if (hasRedundance && !hasRedundanc
e.flag) {
ElMessageBox.alert('当前表存在重复字段,请先处理重复字段', '提示', {
ElMessageBox.alert('当前表存在重复字段,请先处理重复字段', '提示', {
confirmButtonText: '确定',
confirmButtonText: '确定',
type: 'warning'
type: 'warning'
...
@@ -429,6 +433,7 @@ const openEncryptionDialog = async (row) => {
...
@@ -429,6 +433,7 @@ const openEncryptionDialog = async (row) => {
isEditing.value = false
isEditing.value = false
return
return
}
}
}
// console.log('设置密钥openEncryptionDialog', row)
// console.log('设置密钥openEncryptionDialog', row)
// console.log('当前字段:', row.columnname)
// console.log('当前字段:', row.columnname)
const [isLikeRes, encDigitRes] = await Promise.all([
const [isLikeRes, encDigitRes] = await Promise.all([
...
@@ -460,10 +465,10 @@ const openEncryptionDialog = async (row) => {
...
@@ -460,10 +465,10 @@ const openEncryptionDialog = async (row) => {
maskingrulename: row.maskingrulename,//加密规则名称
maskingrulename: row.maskingrulename,//加密规则名称
encryptionSecretKeyId: row.secretkeyId, // 密钥ID
encryptionSecretKeyId: row.secretkeyId, // 密钥ID
secretkeyName: row.secretkeyName, // 密钥名称
secretkeyName: row.secretkeyName, // 密钥名称
isLike:
isLikeRes.data
,
isLike:
Number(isLikeRes.data)
,
encdigit: Number(encDigitRes.data.encdigit),
encdigit: Number(encDigitRes.data.encdigit),
keepfirst:
encDigitRes.data.keepfirst
,
keepfirst:
Number(encDigitRes.data.keepfirst)
,
twoindex:
encDigitRes.data.twoindex
,
twoindex:
Number(encDigitRes.data.twoindex)
,
flag: "0"
flag: "0"
}
}
showEncryptionDialog.value = true
showEncryptionDialog.value = true
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论