Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
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
李苏
sgaqgl-vue
Commits
61e10ec1
Commit
61e10ec1
authored
Dec 09, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增条件
parent
a8cfa785
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
32 deletions
+142
-32
cycle.vue
src/views/riskPrecontrol/riskAnalysis/cycle.vue
+72
-13
cycleDetails.vue
src/views/riskPrecontrol/riskAnalysis/cycleDetails.vue
+44
-2
index.vue
src/views/riskPrecontrol/riskAnalysis/index.vue
+26
-17
No files found.
src/views/riskPrecontrol/riskAnalysis/cycle.vue
View file @
61e10ec1
<
template
>
<div
class=
"min_full"
style=
"height: calc(84vh - 75px);"
>
<Details
ref=
'cycleDetails'
:app=
'this'
v-if=
'showDialog'
></Details>
<div
class=
"search"
v-condition
>
<!--
<SearchButton
:app=
'app'
></SearchButton>
-->
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<el-radio
v-model=
"gd"
label=
"Y"
>
有工单
</el-radio>
<el-radio
v-model=
"gd"
label=
"N"
>
无工单
</el-radio>
<el-radio
v-model=
"gd"
label=
"A"
>
全部
</el-radio>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row
class=
"tool-bar"
>
...
...
@@ -44,11 +60,39 @@
val
==
'M'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'year'
&&
(
item
.
show
=
true
);
item
.
prop
==
'month'
&&
(
item
.
show
=
true
);
item
.
prop
==
'tjrq'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekBegin'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekEnd'
&&
(
item
.
show
=
false
)})
val
==
'W'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'year'
&&
(
item
.
show
=
false
);
item
.
prop
==
'month'
&&
(
item
.
show
=
false
);
item
.
prop
==
'tjrq'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekBegin'
&&
(
item
.
show
=
true
)
&&
(
item
.
width
=
300
);
item
.
prop
==
'weekEnd'
&&
(
item
.
show
=
true
)
&&
(
item
.
width
=
300
)})
val
==
'D'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'year'
&&
(
item
.
show
=
false
);
item
.
prop
==
'month'
&&
(
item
.
show
=
false
);
item
.
prop
==
'tjrq'
&&
(
item
.
show
=
true
)
&&
(
item
.
width
=
400
);
item
.
prop
==
'weekBegin'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekEnd'
&&
(
item
.
show
=
false
)})
// this.$refs['TablePager'].pageQuery({setFirstCurrent:true});
// // this.$refs['TablePager'].pageQuery({setFirstCurrent:true});
},
gd
(
val
){
let
config
=
{
'A'
:{
setFirstCurrent
:
true
},
'Y'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
!=
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}},
'N'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
==
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}}
}
this
.
$refs
[
'TablePager'
].
pageQuery
(
config
[
this
.
gd
])
}
},
data
()
{
return
{
gd
:
'Y'
,
showDialog
:
false
,
DialogTitle
:
'班组详情'
,
DialogWidth
:
'70vw'
,
...
...
@@ -122,14 +166,9 @@
},
methods
:
{
details
(){
if
(
this
.
tabData
.
length
>
0
&&
this
.
app
.
selectOne
||
this
.
app
.
clickOne
){
this
.
showDialog
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
cycleDetails
.
queryParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
this
.
$refs
.
cycleDetails
.
queryParams
.
grouptype
=
'RY'
this
.
$refs
.
cycleDetails
.
queryParams
.
bmid
=
this
.
singleItem
.
bmid
this
.
$refs
.
cycleDetails
.
$refs
[
'TablePager'
].
pageQuery
({
filter
:(
data
)
=>
{
let
config
=
{
'A'
:{
setFirstCurrent
:
true
},
'Y'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
!=
0
){
return
true
...
...
@@ -138,8 +177,28 @@
}
})
return
dataArry
}},
'N'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
==
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}}
}
if
(
this
.
tabData
.
length
>
0
&&
this
.
app
.
selectOne
||
this
.
app
.
clickOne
){
this
.
showDialog
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
cycleDetails
.
queryParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
this
.
$refs
.
cycleDetails
.
queryParams
.
grouptype
=
'RY'
this
.
$refs
.
cycleDetails
.
queryParams
.
bmid
=
this
.
singleItem
.
bmid
this
.
$refs
.
cycleDetails
.
$refs
[
'TablePager'
].
pageQuery
(
config
[
this
.
$refs
.
cycleDetails
.
gd
]
)
})
}
else
{
this
.
$warning
(
'请选择一条数据'
)
...
...
src/views/riskPrecontrol/riskAnalysis/cycleDetails.vue
View file @
61e10ec1
...
...
@@ -2,7 +2,24 @@
<DefaultDialog
:app=
'app'
>
<div
slot=
"form"
class=
"min_full"
style=
"height: 70vh;border: 0px;"
>
<!-- 表格-->
<div
class=
"tablePagers"
style=
"height: 100%;"
>
<div
class=
"search"
style=
"border: 0px;"
v-condition
>
<!--
<SearchButton
:app=
'app'
></SearchButton>
-->
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<el-radio
v-model=
"gd"
label=
"Y"
>
有工单
</el-radio>
<el-radio
v-model=
"gd"
label=
"N"
>
无工单
</el-radio>
<el-radio
v-model=
"gd"
label=
"A"
>
全部
</el-radio>
</div>
</el-col>
</el-row>
</div>
<TablePager
:showPagination=
'false'
:delButton=
'false'
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'this'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
...
...
@@ -30,7 +47,6 @@
this
.
queryParams
.
rwlx
==
'M'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'year'
&&
(
item
.
show
=
true
);
item
.
prop
==
'month'
&&
(
item
.
show
=
true
);
item
.
prop
==
'tjrq'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekBegin'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekEnd'
&&
(
item
.
show
=
false
)})
this
.
queryParams
.
rwlx
==
'W'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'year'
&&
(
item
.
show
=
false
);
item
.
prop
==
'month'
&&
(
item
.
show
=
false
);
item
.
prop
==
'tjrq'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekBegin'
&&
(
item
.
show
=
true
)
&&
(
item
.
width
=
300
);
item
.
prop
==
'weekEnd'
&&
(
item
.
show
=
true
)
&&
(
item
.
width
=
300
)})
this
.
queryParams
.
rwlx
==
'D'
&&
this
.
$refs
[
'TablePager'
][
'newGridList'
].
forEach
(
item
=>
{
item
.
prop
==
'year'
&&
(
item
.
show
=
false
);
item
.
prop
==
'month'
&&
(
item
.
show
=
false
);
item
.
prop
==
'tjrq'
&&
(
item
.
show
=
true
)
&&
(
item
.
width
=
400
);
item
.
prop
==
'weekBegin'
&&
(
item
.
show
=
false
);
item
.
prop
==
'weekEnd'
&&
(
item
.
show
=
false
)})
this
.
$refs
[
'TablePager'
].
pageQuery
({});
clearInterval
(
timer
)
}
else
{
console
.
log
(
`this.$refs['TablePager']['newGridList'].length!=0`
)
...
...
@@ -52,12 +68,38 @@
},
watch
:{
gd
(
val
){
let
config
=
{
'A'
:{
setFirstCurrent
:
true
},
'Y'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
!=
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}},
'N'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
==
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}}
}
this
.
$refs
[
'TablePager'
].
pageQuery
(
config
[
this
.
gd
])
}
},
data
()
{
return
{
/*需要的额外参数 */
gd
:
'Y'
,
baseUrl
:
'kzzx/appversion'
,
/* 查询参数*/
queryParams
:
{
...
...
src/views/riskPrecontrol/riskAnalysis/index.vue
View file @
61e10ec1
...
...
@@ -193,7 +193,30 @@
},
methods
:
{
getRow
:
function
(
e
)
{
let
config
=
{
'A'
:{
setFirstCurrent
:
true
},
'Y'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
!=
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}},
'N'
:{
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
==
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}}
}
this
.
rowItem
=
e
this
.
fshake
(()
=>
{
...
...
@@ -207,23 +230,9 @@
this
.
$refs
.
cycle
.
queryParams
.
jsrq
=
(
this
.
singleItem
.
weekEnd
>
this
.
queryParams
.
jsrq
)?(
this
.
queryParams
.
jsrq
):(
this
.
singleItem
.
weekEnd
)
}
this
.
$refs
.
cycle
.
queryParams
.
gsid
=
this
.
singleItem
.
gsid
this
.
$refs
.
cycle
.
$refs
[
'TablePager'
].
pageQuery
({
setFirstCurrent
:
true
,
filter
:(
data
)
=>
{
let
dataArry
=
data
.
filter
(
item
=>
{
if
(
item
.
allCount
!=
0
){
return
true
}
else
{
return
false
}
})
return
dataArry
}})
/* 判断前端过滤条件*/
this
.
$refs
.
cycle
.
$refs
[
'TablePager'
].
pageQuery
(
config
[
this
.
$refs
.
cycle
.
gd
])
},
500
)
},
handleClick
(
val
){
...
...
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