Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
d82ce0d8
Commit
d82ce0d8
authored
Jul 18, 2023
by
张耀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
优化逻辑和样式
parent
28134d58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
22 deletions
+59
-22
src/page/main/forewarning/indicator-config/modules/add-form.vue
...ge/main/forewarning/indicator-config/modules/add-form.vue
+59
-22
No files found.
src/page/main/forewarning/indicator-config/modules/add-form.vue
View file @
d82ce0d8
...
...
@@ -24,14 +24,32 @@
</el-form-item>
<div
class=
"duration"
>
<el-form-item
label=
"持续时间"
prop=
"time"
>
<span>
当预警持续
</span>
<el-input
v-model=
"state.form.time"
placeholder=
"请输入持续时间"
@
input=
"inputNum"
></el-input>
</el-form-item>
<el-form-item
label=
""
class=
"no-el-label"
>
<el-select
v-model=
"state.form.unit"
placeholder=
"请选择"
>
<el-option
v-for=
"(value, key) in unitOptions"
:key=
"key"
:label=
"value.label"
:value=
"key"
>
</el-option>
</el-select>
<span>
时产生报警
</span>
<el-input
v-model=
"state.form.time"
placeholder=
"请输入持续时间"
@
input=
"inputNum"
>
<template
#prepend
>
<span>
当预警持续
</span>
</
template
>
<
template
#append
>
<el-select
v-model=
"state.form.unit"
placeholder=
"请选择"
>
<el-option
v-for=
"(value, key) in unitOptions"
:key=
"key"
:label=
"value.label"
:value=
"key"
>
</el-option>
</el-select>
</
template
>
</el-input>
<span
class=
"duration-append"
>
<span>
时产生报警
</span>
<el-popover
:width=
"300"
title=
""
content=
"大于等于0的正整数,等于0时代表直接报警"
trigger=
"hover"
placement=
"top-start"
>
<
template
#reference
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-left: 8px; vertical-align: middle"
icon=
"#bg-ic-s-circle-tips"
></bg-icon>
</
template
>
</el-popover>
</span>
</el-form-item>
</div>
<el-form-item
label=
"检查周期"
prop=
"inspection_cycle"
>
...
...
@@ -108,6 +126,8 @@ const inputNum = () => {
let
{
max
}
=
unitOptions
[
state
.
form
.
unit
];
if
(
time
>
+
max
)
{
state
.
form
.
time
=
max
;
ElMessage
.
closeAll
();
ElMessage
.
error
(
`最大值:
${
max
}
`
);
}
};
// 检查周期下拉数据
...
...
@@ -169,27 +189,44 @@ defineExpose({
margin-top
:
0
;
}
}
.duration
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
:deep
(
.el-form-item__content
)
{
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
>
.el-input
{
:deep
(
.el-form-item
)
{
flex
:
1
;
.el-input
{
margin-right
:
8px
;
flex
:
1
;
width
:
80px
;
}
}
.no-el-label
{
:deep
(
.el-form-item__content
)
{
margin-left
:
0
!
important
;
.el-select
{
width
:
80px
;
}
.el-input-group__prepend
{
width
:
102px
;
border-radius
:
4px
;
border-top-right-radius
:
0
;
border-bottom-right-radius
:
0
;
}
.el-input-group__append
{
width
:
80px
;
border-radius
:
4px
;
border-top-left-radius
:
0
;
border-bottom-left-radius
:
0
;
}
}
// :deep(.el-form-item__content) {
// display: flex;
// align-items: center;
// gap: 8px;
// > .el-input {
// flex: 1;
// width: 80px;
// }
// }
}
.duration-append
{
display
:
flex
;
align-items
:
center
;
color
:
#404a62
;
}
:deep
(
.el-switch__inner
)
{
.is-hide
{
...
...
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