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
168eb505
Commit
168eb505
authored
Aug 21, 2025
by
wanglizhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发现规则模块
parent
677214c7
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
480 行增加
和
5 行删除
+480
-5
src/components/EditPop/ModalPop.vue
+6
-3
src/views/ruleConfig/Algorithm/modules/formModule.vue
+1
-1
src/views/ruleConfig/discoveryRule/index.vue
+241
-1
src/views/ruleConfig/discoveryRule/modules/AddDomain.vue
+71
-0
src/views/ruleConfig/discoveryRule/modules/AddRules.vue
+161
-0
没有找到文件。
src/components/EditPop/ModalPop.vue
View file @
168eb505
<
script
setup
lang=
"ts"
name=
"ModalPop"
>
<
script
setup
lang=
"ts"
name=
"ModalPop"
>
import
{
ref
,
toRefs
}
from
"vue"
;
import
{
ref
,
toRefs
}
from
"vue"
;
import
{
Modal
}
from
"view-ui-plus"
;
import
{
Modal
}
from
"view-ui-plus"
;
const
props
=
defineProps
<
{
const
props
=
withDefaults
(
defineProps
<
{
modelValue
:
boolean
;
modelValue
:
boolean
;
title
:
string
;
title
:
string
;
}
>
();
width
?:
string
;
}
>
(),
{
width
:
'1000'
})
const
emit
=
defineEmits
([
"update:modelValue"
,
"cancel"
,
"change"
]);
const
emit
=
defineEmits
([
"update:modelValue"
,
"cancel"
,
"change"
]);
...
@@ -19,7 +22,7 @@ const change = (visible: boolean) => {
...
@@ -19,7 +22,7 @@ const change = (visible: boolean) => {
</
script
>
</
script
>
<
template
>
<
template
>
<Modal
class=
"ModalPop"
v-model=
"props.modelValue"
width=
"1000
"
draggable
scrollable
sticky
@
on-cancel=
"cancel"
@
on-visible-change=
"change"
>
<Modal
class=
"ModalPop"
v-model=
"props.modelValue"
:width=
"width
"
draggable
scrollable
sticky
@
on-cancel=
"cancel"
@
on-visible-change=
"change"
>
<template
#
header
>
<template
#
header
>
<span
style=
"font-size: 16px; font-weight: bold;color: #7A8495;"
>
{{
props
.
title
}}
</span>
<span
style=
"font-size: 16px; font-weight: bold;color: #7A8495;"
>
{{
props
.
title
}}
</span>
</
template
>
</
template
>
...
...
src/views/ruleConfig/Algorithm/modules/formModule.vue
View file @
168eb505
...
@@ -97,7 +97,7 @@ const formConfirm = (val) => {
...
@@ -97,7 +97,7 @@ const formConfirm = (val) => {
right
:
0
;
right
:
0
;
}
}
.btn
{
.btn
{
padding
:
20px
20px
20px
100px
;
padding
:
20px
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
}
}
...
...
src/views/ruleConfig/discoveryRule/index.vue
View file @
168eb505
<
script
setup
name=
"DiscoveryRule"
>
<
script
setup
name=
"DiscoveryRule"
>
import
{
onMounted
,
ref
,
toRefs
}
from
'vue'
import
{
onMounted
,
ref
,
toRefs
}
from
'vue'
import
{
Split
}
from
'view-ui-plus'
;
import
CollapseView
from
'@/components/CollapseView/index.vue'
import
AddDomain
from
'./modules/AddDomain.vue'
// 数据域表单
import
AddRules
from
'./modules/AddRules.vue'
// 发现规则表单
import
ModalPop
from
"@/components/EditPop/ModalPop.vue"
const
splitNum
=
ref
(
0.31
)
// 左右分割比例
const
collapseList
=
ref
([])
const
data
=
reactive
({
editDomainForm
:
{
name
:
""
,
},
addDomainForm
:
{
name
:
""
,
},
editRulesForm
:
{
name
:
""
,
},
addRulesForm
:
{
name
:
""
,
}
});
const
{
editDomainForm
,
addDomainForm
,
editRulesForm
,
addRulesForm
}
=
toRefs
(
data
);
const
rightType
=
ref
(
'domain'
)
// 右侧展示类型
const
modalData
=
reactive
({
show
:
false
,
text
:
''
,
icon
:
'error'
,
cancel
:
true
,
type
:
''
})
const
modalPopData
=
reactive
({
show
:
false
,
title
:
''
,
type
:
'domain'
})
// 获取数据
const
getCollapse
=
()
=>
{
const
data
=
[
{
name
:
'测试数据域'
,
list
:
[
{
name
:
'按混合证件号字段查询'
}
]
},
{
name
:
'通用规则'
,
list
:
[
{
name
:
'aaaaa'
},
{
name
:
'bbbbb'
}
]
},
{
name
:
'解密数据'
,
list
:
[]
}
]
collapseList
.
value
=
data
.
map
(
item
=>
{
const
list
=
item
.
list
.
map
(
itemTwo
=>
{
return
{
...
itemTwo
,
isCheck
:
true
,
isDelete
:
true
,
}
})
return
{
...
item
,
list
:
list
,
isAdd
:
true
,
isView
:
true
,
isDelete
:
true
,
}
})
}
// 新增关闭
const
modalPopCancel
=
()
=>
{
modalPopData
.
show
=
false
}
// 新增数据域
const
addDomainClick
=
(
item
)
=>
{
console
.
log
(
'新增数据域'
)
modalPopData
.
title
=
'新增数据域'
modalPopData
.
type
=
'domain'
addDomainForm
.
value
=
{}
modalPopData
.
show
=
true
}
// 新增发现规则
const
collapseAdd
=
(
item
)
=>
{
console
.
log
(
'新增发现规则'
,
item
)
modalPopData
.
title
=
'新增发现规则'
modalPopData
.
type
=
'rules'
addRulesForm
.
value
=
{}
modalPopData
.
show
=
true
}
// 删除发现规则
const
collapseDelete
=
(
item
)
=>
{
console
.
log
(
'删除发现规则'
,
item
)
modalData
.
type
=
'rules'
modalData
.
cancel
=
true
modalData
.
icon
=
'error'
modalData
.
text
=
'删除后无法恢复,是否确认删除['
+
item
.
name
+
']?'
modalData
.
show
=
true
}
// 删除数据域
const
collapseMainDeletion
=
(
item
)
=>
{
console
.
log
(
'删除数据域事件'
,
item
)
modalData
.
type
=
'domain'
modalData
.
cancel
=
false
modalData
.
icon
=
'error'
modalData
.
text
=
'删除后无法恢复,是否确认删除['
+
item
.
name
+
']?'
modalData
.
show
=
true
}
// 提示回调
const
modalConfirm
=
()
=>
{
if
(
modalData
.
type
===
'domain'
)
{
console
.
log
(
'删除数据域确认'
)
}
else
if
(
modalData
.
type
===
'rules'
)
{
console
.
log
(
'删除发现规则确认'
)
}
else
if
(
modalData
.
type
===
'default'
)
{
console
.
log
(
'设置默认项'
)
}
modalData
.
show
=
false
}
// 数据域查看
const
collapseView
=
(
item
)
=>
{
editDomainForm
.
value
=
item
rightType
.
value
=
'domain'
}
// 规则点击监听
const
collapseChange
=
(
item
)
=>
{
editRulesForm
.
value
=
item
rightType
.
value
=
'rules'
}
// 发现规则设置默认项
const
collapseDefault
=
(
item
)
=>
{
modalData
.
type
=
'default'
modalData
.
cancel
=
false
modalData
.
icon
=
'error'
modalData
.
text
=
'确定设置['
+
item
.
name
+
']为默认规则?'
modalData
.
show
=
true
}
// 新增确认
const
AddDomainConfirm
=
(
item
)
=>
{
if
(
modalPopData
.
type
===
'domain'
)
{
console
.
log
(
'新增数据域确认'
,
item
)
}
else
if
(
modalPopData
.
type
===
'rules'
)
{
console
.
log
(
'新增发现规则确认'
,
item
)
}
modalPopData
.
show
=
false
}
onMounted
(()
=>
{
getCollapse
()
})
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -9,7 +184,55 @@ import { onMounted, ref, toRefs } from 'vue'
...
@@ -9,7 +184,55 @@ import { onMounted, ref, toRefs } from 'vue'
发现规则
发现规则
</
template
>
</
template
>
</PageTitle>
</PageTitle>
<div
class=
"app-container__body"
></div>
<div
class=
"app-container__body"
>
<Split
v-model=
"splitNum"
>
<
template
#
left
>
<div
class=
"demo-split-pane"
style=
"padding: 0 38px 10px 0;width: 100%;overflow: auto;height: 100%;"
>
<div
class=
"mb20"
style=
"display: flex;align-items: center;justify-content: space-between;"
>
<el-input
class=
"mr20"
placeholder=
"数据域名称搜索"
>
<template
#
suffix
>
<el-icon
style=
"vertical-align: middle;"
>
<search
/>
</el-icon>
</
template
>
</el-input>
<el-button
type=
"primary"
icon=
"Plus"
@
click=
"addDomainClick"
>
新增数据域
</el-button>
</div>
<CollapseView
:list=
"collapseList"
@
add=
"collapseAdd"
@
mainDeletion=
"collapseMainDeletion"
@
childDelete=
"collapseDelete"
@
change=
"collapseChange"
@
view=
"collapseView"
@
default=
"collapseDefault"
/>
</div>
</template>
<
template
#
right
>
<div
class=
"demo-split-pane"
>
<div
class=
"right"
>
<div
class=
"right-title"
>
<el-icon>
<info-filled
/>
</el-icon>
<span
style=
"margin-left: 5px;"
>
发现规则
</span>
</div>
<div
class=
"right-content"
>
<AddDomain
v-model=
"editDomainForm"
type=
"edit"
v-if=
"rightType === 'domain'"
/>
<AddRules
v-model=
"editRulesForm"
type=
"edit"
v-if=
"rightType === 'rules'"
/>
</div>
</div>
</div>
</
template
>
</Split>
</div>
<!-- 提示框 -->
<Modal
v-model=
"modalData.show"
:icon=
"modalData.icon"
:cancel=
"modalData.cancel"
:text=
"modalData.text"
@
confirm=
"modalConfirm"
></Modal>
<!-- 新增数据域 / 发现规则 -->
<ModalPop
:width=
"'740'"
v-model=
"modalPopData.show"
:title=
"modalPopData.title"
@
cancel=
"modalPopCancel"
>
<
template
#
content
>
<AddDomain
v-model=
"addDomainForm"
type=
"add"
@
cancel=
"modalPopCancel"
@
confirm=
"AddDomainConfirm"
v-if=
"modalPopData.type === 'domain'"
/>
<AddRules
v-model=
"addRulesForm"
type=
"add"
@
cancel=
"modalPopCancel"
@
confirm=
"AddDomainConfirm"
v-if=
"modalPopData.type === 'rules'"
/>
</
template
>
</ModalPop>
</div>
</div>
</template>
</template>
...
@@ -18,5 +241,21 @@ import { onMounted, ref, toRefs } from 'vue'
...
@@ -18,5 +241,21 @@ import { onMounted, ref, toRefs } from 'vue'
height
:
calc
(
height
:
calc
(
100vh
-
var
(
--navbar-height
)
-
var
(
--container-pd
)
-
var
(
--container-pd
)
100vh
-
var
(
--navbar-height
)
-
var
(
--container-pd
)
-
var
(
--container-pd
)
)
!important
;
)
!important
;
.right
{
padding
:
6px
10px
10px
;
height
:
100%
;
&-title
{
padding
:
0px
0px
10px
10px
;
display
:
flex
;
align-items
:
center
;
font-weight
:
700
;
color
:
#515a6e
;
}
&
-content
{
padding
:
10px
0px
;
width
:
80%
;
margin
:
20px
auto
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/ruleConfig/discoveryRule/modules/AddDomain.vue
0 → 100644
View file @
168eb505
<
script
setup
lang=
"ts"
name=
"AddDomain"
>
import
{
onMounted
,
reactive
,
ref
,
toRefs
,
watch
}
from
"vue"
;
const
props
=
defineProps
<
{
modelValue
:
boolean
;
type
:
string
;
}
>
();
const
emit
=
defineEmits
([
"update:modelValue"
,
'cancel'
,
'confirm'
]);
const
data
=
reactive
({
rules
:
{},
});
const
{
rules
}
=
toRefs
(
data
);
const
readOnly
=
ref
(
true
);
watch
(
()
=>
props
.
type
,
(
newVal
)
=>
{
readOnly
.
value
=
props
.
type
===
'edit'
?
true
:
false
;
},
{
deep
:
true
,
immediate
:
true
}
);
// 取消
const
cancel
=
()
=>
{
if
(
props
.
type
===
'edit'
)
{
readOnly
.
value
=
true
}
else
if
(
props
.
type
===
'add'
)
{
emit
(
'cancel'
)
}
}
const
confirm
=
()
=>
{
if
(
props
.
type
===
'edit'
)
{
readOnly
.
value
=
true
}
emit
(
'confirm'
)
}
</
script
>
<
template
>
<div>
<el-form
ref=
"formRef"
:model=
"modelValue"
label-width=
"100px"
:disabled=
"readOnly"
>
<el-form-item
label=
"数据域名称"
required
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
type=
"textarea"
rows=
"4"
v-model=
"modelValue.name"
></el-input>
</el-form-item>
</el-form>
<div
class=
"btn"
>
<el-button
type=
"primary"
style=
"width: 150px;"
@
click=
"readOnly = false"
v-if=
"readOnly"
>
编辑
</el-button>
<el-button
type=
"info"
style=
"width: 150px;"
@
click=
"cancel"
v-if=
"!readOnly"
>
取消
</el-button>
<el-button
type=
"primary"
style=
"width: 150px;"
@
click=
"confirm"
v-if=
"!readOnly"
>
确认
</el-button>
</div>
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
.btn
{
padding
:
20px
;
display
:
flex
;
justify-content
:
center
;
}
</
style
>
\ No newline at end of file
src/views/ruleConfig/discoveryRule/modules/AddRules.vue
0 → 100644
View file @
168eb505
<
script
setup
lang=
"ts"
name=
"AddRules"
>
import
{
onMounted
,
reactive
,
ref
,
toRefs
,
watch
}
from
"vue"
;
import
{
Switch
}
from
"view-ui-plus"
;
const
props
=
defineProps
<
{
modelValue
:
boolean
;
type
:
string
;
}
>
();
const
emit
=
defineEmits
([
"update:modelValue"
,
'cancel'
,
'confirm'
]);
const
data
=
reactive
({
rules
:
{},
});
const
{
rules
}
=
toRefs
(
data
);
const
readOnly
=
ref
(
true
);
const
radio
=
ref
(
1
);
const
radioOptions
=
ref
([
{
label
:
'正则表达式'
,
value
:
1
,
},
{
label
:
'自定义方法'
,
value
:
2
,
},
{
label
:
'字典发现'
,
value
:
3
,
}
]);
watch
(
()
=>
props
.
type
,
(
newVal
)
=>
{
readOnly
.
value
=
props
.
type
===
'edit'
?
true
:
false
;
},
{
deep
:
true
,
immediate
:
true
}
);
// 取消
const
cancel
=
()
=>
{
if
(
props
.
type
===
'edit'
)
{
readOnly
.
value
=
true
}
else
if
(
props
.
type
===
'add'
)
{
emit
(
'cancel'
)
}
}
const
confirm
=
()
=>
{
if
(
props
.
type
===
'edit'
)
{
readOnly
.
value
=
true
}
emit
(
'confirm'
)
}
</
script
>
<
template
>
<div>
<el-form
ref=
"formRef"
:model=
"modelValue"
label-width=
"110px"
:disabled=
"readOnly"
>
<el-form-item
label=
"发现规则名"
required
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"数据域"
>
<div>
{{
modelValue
.
name
}}
</div>
</el-form-item>
<el-form-item
label=
"发现方式"
required
>
<div
style=
"width: 100%;background: #F3F5FA;"
>
<el-input
v-model=
"modelValue.name"
v-if=
"readOnly"
></el-input>
<el-select
v-model=
"modelValue.name"
v-if=
"!readOnly"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item
label=
"发现规则类型"
>
<el-radio-group
v-model=
"radio"
>
<el-radio
:label=
"item.value"
v-for=
"(item,index) in radioOptions"
:key=
"index"
>
{{
item
.
label
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"正则表达式"
required
v-if=
"radio === 1"
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"JAVA方法"
required
v-if=
"radio === 2"
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"字典分类"
required
v-if=
"radio === 3"
>
<div
style=
"width: 100%;background: #F3F5FA;"
>
<el-input
v-model=
"modelValue.name"
v-if=
"readOnly"
></el-input>
<el-select
v-model=
"modelValue.name"
v-if=
"!readOnly"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item
label=
"匹配方式"
required
v-if=
"radio === 3"
>
<div
style=
"width: 100%;background: #F3F5FA;"
>
<el-input
v-model=
"modelValue.name"
v-if=
"readOnly"
></el-input>
<el-select
v-model=
"modelValue.name"
v-if=
"!readOnly"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item
label=
"样例"
required
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"测试"
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"modelValue.name"
></el-input>
</el-form-item>
<el-form-item
label=
"默认规则"
>
<Switch
:disabled=
"readOnly"
>
<template
#
open
>
<span>
是
</span>
</
template
>
<
template
#
close
>
<span>
否
</span>
</
template
>
</Switch>
</el-form-item>
</el-form>
<div
class=
"btn"
>
<el-button
type=
"primary"
style=
"width: 150px;"
@
click=
"readOnly = false"
v-if=
"readOnly"
>
编辑
</el-button>
<el-button
type=
"info"
style=
"width: 150px;"
@
click=
"cancel"
v-if=
"!readOnly"
>
取消
</el-button>
<el-button
type=
"primary"
style=
"width: 150px;"
@
click=
"confirm"
v-if=
"!readOnly"
>
确认
</el-button>
</div>
</div>
</template>
<
style
lang=
"scss"
scoped
>
.el-form-item
{
margin-bottom
:
8px
;
}
.btn
{
padding
:
20px
;
display
:
flex
;
justify-content
:
center
;
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论