Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-quality
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 21b6ac66
authored
Mar 29, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 异常占比放开限制
1 parent
19e2aecd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
30 deletions
src/views/qualityManage/el-input-range/index.vue
src/views/qualityManage/index.vue
src/views/qualityManage/el-input-range/index.vue
View file @
21b6ac6
...
...
@@ -14,23 +14,39 @@
@
mousemove=
"handleMove"
ref=
"reference"
>
<el-input
v-model=
"userInput[0]"
:placeholder=
"startPlaceholder"
@
blur=
"handleBlur(0)"
@
input=
"handleStartInput"
class=
"el-range-input"
></el-input>
<span
class=
"el-range-separator"
>
至
</span>
<el-input
v-model=
"userInput[1]"
:placeholder=
"endPlaceholder"
@
input=
"handleEndInput"
@
focus=
"handleFocus"
@
blur=
"handleBlur(1)"
class=
"el-range-input"
></el-input>
<template
v-if=
"infinity"
>
<el-input-number
class=
"el-range-input hide-btn"
:placeholder=
"startPlaceholder"
v-model=
"userInput[0]"
@
blur=
"handleBlur(0)"
></el-input-number>
<span
class=
"el-range-separator"
>
至
</span>
<el-input-number
class=
"el-range-input hide-btn"
:placeholder=
"endPlaceholder"
v-model=
"userInput[1]"
@
blur=
"handleBlur(1)"
></el-input-number>
</
template
>
<
template
v-else
>
<el-input
v-model=
"userInput[0]"
:placeholder=
"startPlaceholder"
@
blur=
"handleBlur(0)"
@
input=
"handleStartInput"
class=
"el-range-input"
></el-input>
<span
class=
"el-range-separator"
>
至
</span>
<el-input
v-model=
"userInput[1]"
:placeholder=
"endPlaceholder"
@
input=
"handleEndInput"
@
focus=
"handleFocus"
@
blur=
"handleBlur(1)"
class=
"el-range-input"
></el-input>
</
template
>
<i
v-show=
"showClose"
@
click=
"handleClickIcon"
...
...
@@ -42,7 +58,7 @@
</template>
<
script
>
export
default
{
data
()
{
data
()
{
return
{
pickerVisible
:
false
,
showClose
:
false
,
...
...
@@ -54,17 +70,18 @@ export default {
displayValue
:
Array
,
placeholder
:
String
,
startPlaceholder
:
String
,
endPlaceholder
:
String
endPlaceholder
:
String
,
infinity
:
Boolean
},
watch
:
{
displayValue
(
val
)
{
displayValue
(
val
)
{
if
(
val
)
{
this
.
userInput
=
val
}
}
},
methods
:
{
handleStartInput
(
event
)
{
handleStartInput
(
event
)
{
let
isNumber
=
/^
\d
+$/
.
test
(
event
)
if
(
!
isNumber
)
{
event
=
null
...
...
@@ -73,7 +90,7 @@ export default {
this
.
userInput
[
0
]
=
event
},
handleEndInput
(
event
)
{
handleEndInput
(
event
)
{
let
isNumber
=
/^
\d
+$/
.
test
(
event
)
if
(
!
isNumber
)
{
event
=
null
...
...
@@ -81,11 +98,11 @@ export default {
if
(
event
>
100
)
event
=
100
this
.
userInput
[
1
]
=
event
},
handleClickIcon
(
event
)
{
handleClickIcon
(
event
)
{
this
.
userInput
[
0
]
=
null
this
.
userInput
[
1
]
=
null
},
valueIsEmpty
()
{
valueIsEmpty
()
{
const
val
=
this
.
userInput
if
(
Array
.
isArray
(
val
))
{
for
(
let
i
=
0
,
len
=
val
.
length
;
i
<
len
;
i
++
)
{
...
...
@@ -96,28 +113,28 @@ export default {
}
return
true
},
handleRangeClick
()
{
handleRangeClick
()
{
this
.
pickerVisible
=
true
},
handleMove
()
{
handleMove
()
{
if
(
this
.
valueIsEmpty
())
{
this
.
showClose
=
false
}
else
{
this
.
showClose
=
true
}
},
handleFocus
()
{
handleFocus
()
{
if
(
!
this
.
pickerVisible
)
{
this
.
pickerVisible
=
true
this
.
$emit
(
"focus"
,
this
)
}
},
handleBlur
(
index
)
{
handleBlur
(
index
)
{
this
.
pickerVisible
=
false
this
.
contrastValue
()
},
contrastValue
()
{
contrastValue
()
{
let
val
=
this
.
userInput
if
(
Array
.
isArray
(
val
))
{
if
(
val
[
0
]
>
val
[
1
])
{
...
...
@@ -143,5 +160,15 @@ export default {
color
:
#dcdfe6
;
margin-left
:
10px
;
}
.hide-btn
{
::v-deep{
span{
display
:
none
;
}
input
{
padding
:
0
;
}
}
}
}
</
style
>
\ No newline at end of file
src/views/qualityManage/index.vue
View file @
21b6ac6
...
...
@@ -30,7 +30,7 @@
<el-input-range
start-placeholder=
"请输入"
end-placeholder=
"请输入"
:displayValue=
"searchForm.toStoreCount"
></el-input-range>
</div>
-->
<div
slot=
"AbnormalProportion"
>
<el-input-range
start-placeholder=
"请输入"
end-placeholder=
"请输入"
:displayValue=
"searchForm.AbnormalProportion"
></el-input-range>
<el-input-range
start-placeholder=
"请输入"
end-placeholder=
"请输入"
:displayValue=
"searchForm.AbnormalProportion"
infinity
></el-input-range>
</div>
</GLCombiForm>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment