Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
emport-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘泽志
emport-web
Commits
b43f36bc
Commit
b43f36bc
authored
Nov 20, 2023
by
liuzz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加规则转换功能
parent
d8e389cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
index.vue
src/views/emport/rule/index.vue
+13
-3
No files found.
src/views/emport/rule/index.vue
View file @
b43f36bc
...
...
@@ -92,6 +92,14 @@
v-if=
"['逻辑与', '逻辑或'].includes(dialogData.data.mode)"
:config=
"{ value: 'value', label: 'label' }"
/>
<!--值域转换-->
<ArrayInput
v-model=
"dialogData.data.content"
placeholder=
"请输入值域"
v-if=
"dialogData.data.mode === '值域转换'"
/>
<!--正则分割-->
<el-input
v-model=
"dialogData.data.content"
type=
"textarea"
placeholder=
"请输入需要进行数量合并的正则表达式"
v-if=
"dialogData.data.mode === '正则分割'"
/>
</el-form-item>
<el-form-item
prop=
"remarks"
label=
"备注"
>
<el-input
v-model=
"dialogData.data.remarks"
placeholder=
"备注"
type=
"textarea"
/>
...
...
@@ -122,7 +130,7 @@ export default {
components
:
{
ArrayInput
,
SectionInput
,
SectionSelect
},
data
()
{
return
{
typeDict
:
[
'基础规则'
,
'组合规则'
],
typeDict
:
[
'基础规则'
,
'组合规则'
,
"转换规则"
],
modeDict
:
[],
queryParam
:
{
pageNum
:
1
,
...
...
@@ -192,6 +200,8 @@ export default {
this
.
modeDict
=
[
'正则'
,
'非空'
,
'区间'
,
'比较'
,
'值域'
]
}
else
if
(
value
===
'组合规则'
)
{
this
.
modeDict
=
[
'逻辑与'
,
'逻辑或'
]
}
else
if
(
value
===
'转换规则'
){
this
.
modeDict
=
[
'值域转换'
,
'正则分割'
]
}
},
// 验证模式修改触发事件
...
...
@@ -251,7 +261,7 @@ export default {
value
:
instance
.
inputValue
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'校验通过'
)
this
.
$message
.
success
(
res
.
msg
)
}
}).
finally
(
_
=>
instance
.
confirmButtonLoading
=
false
)
}
else
{
...
...
@@ -264,7 +274,7 @@ export default {
},
// 验证内容合并
contentFormat
(
row
){
if
(
row
.
type
===
'基础规则'
){
if
(
row
.
type
===
'基础规则'
||
row
.
type
===
'转换规则'
){
return
row
.
content
}
else
{
let
idArr
=
row
.
content
.
split
(
','
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment