Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_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
胡宝山
template_vue
Commits
b84a9f1d
Commit
b84a9f1d
authored
Sep 16, 2023
by
jack_liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
74b1892b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
27 deletions
+41
-27
index.vue
src/views/production/data/index.vue
+41
-27
No files found.
src/views/production/data/index.vue
View file @
b84a9f1d
...
...
@@ -71,11 +71,7 @@
<el-row
style=
"padding-left: 8.6%; padding-top: 1%"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"flex-basis: 50%"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
提交
</el-button
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
提交
</el-button>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -84,7 +80,7 @@
</template>
<
script
>
import
{
getDictList
,
submit
}
from
'@/api/production/gxpn'
import
{
getDictList
,
submit
,
getlist
}
from
'@/api/production/gxpn'
export
default
{
name
:
'Role'
,
data
()
{
...
...
@@ -97,7 +93,7 @@ export default {
dictSelection
:
[],
queryParams
:
{
ptype
:
''
}
,
}
}
},
created
()
{
...
...
@@ -114,22 +110,40 @@ export default {
},
//提交按钮
onSubmit
()
{
console
.
log
(
this
.
dictSelection
)
if
(
this
.
queryParams
.
ptype
===
''
){
this
.
$message
.
error
(
'ptype为空,不允许提交'
)
return
;
}
console
.
log
(
this
.
dictSelection
)
submit
(
this
.
dictSelection
).
then
(
res
=>
{
if
(
this
.
queryParams
.
ptype
===
''
)
{
this
.
$message
.
error
(
'ptype为空,不允许提交'
)
return
}
if
(
this
.
dictSelection
.
length
===
0
)
{
return
}
getlist
(
this
.
queryParams
).
then
(
res
=>
{
const
ptypeList
=
res
.
data
if
(
ptypeList
.
length
==
0
)
{
this
.
$refs
.
dictTable
.
clearSelection
()
}
ptypeList
.
forEach
(
row
=>
{
this
.
dictList
.
forEach
(
item
=>
{
if
(
row
.
pgx
===
item
.
dictValue
)
{
this
.
$refs
.
dictTable
.
toggleRowSelection
(
item
,
true
)
}
})
})
this
.
$nextTick
(()
=>
{
submit
({
list
:
this
.
dictSelection
,
ptype
:
this
.
queryParams
.
ptype
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'提交成功'
)
this
.
$refs
.
dictTable
.
clearSelection
()
this
.
queryParams
.
ptype
=
''
/*
this.$refs.dictTable.clearSelection()
this.queryParams.ptype = ''
*/
}
})
})
})
},
//查询
handleQuery
()
{
...
...
@@ -138,14 +152,15 @@ export default {
if
(
this
.
queryParams
.
ptype
==
''
)
{
return
}
getDictList
({
dictLabel
:
this
.
queryParams
.
ptype
}).
then
(
res
=>
{
const
dictList
=
res
.
data
this
.
dictList
.
forEach
(
row
=>
{
dictList
.
forEach
(
item
=>
{
if
(
row
.
businessId
===
item
.
businessId
)
{
this
.
$refs
.
dictTable
.
toggleRowSelection
(
row
,
true
)
getlist
(
this
.
queryParams
).
then
(
res
=>
{
const
ptypeList
=
res
.
data
if
(
ptypeList
.
length
==
0
)
{
this
.
$refs
.
dictTable
.
clearSelection
()
}
ptypeList
.
forEach
(
row
=>
{
this
.
dictList
.
forEach
(
item
=>
{
if
(
row
.
pgx
===
item
.
dictValue
)
{
this
.
$refs
.
dictTable
.
toggleRowSelection
(
item
,
true
)
}
})
})
...
...
@@ -183,5 +198,4 @@ export default {
height
:
12em
;
width
:
4px
;
}
</
style
>
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