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
ccb2388c
Commit
ccb2388c
authored
Sep 17, 2023
by
jack_liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e72476e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
45 deletions
+16
-45
index.vue
src/views/production/data/index.vue
+16
-45
No files found.
src/views/production/data/index.vue
View file @
ccb2388c
...
@@ -17,24 +17,16 @@
...
@@ -17,24 +17,16 @@
style=
"width: 350px"
style=
"width: 350px"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
>
>
<template
slot=
"prepend"
>
ptype
</
template
></el-input
<template
slot=
"prepend"
>
ptype
</
template
></el-input>
>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
size=
"small"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
查询
</el-button>
type=
"primary"
size=
"small"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
查询
</el-button
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
ref=
"dictTable"
:gutter=
"40"
:gutter=
"40"
v-loading=
"loading"
border
border
ref=
"dictTable"
row-key=
"index"
row-key=
"index"
:data=
"dictList"
:data=
"dictList"
@
selection-change=
"handleDictSelectionChange"
@
selection-change=
"handleDictSelectionChange"
...
@@ -80,7 +72,8 @@
...
@@ -80,7 +72,8 @@
</template>
</template>
<
script
>
<
script
>
import
{
getDictList
,
submit
,
getlist
}
from
'@/api/production/gxpn'
import
{
submit
,
getlist
}
from
'@/api/production/gxpn'
import
{
getDictData
}
from
'@/api/production/application'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
data
()
{
data
()
{
...
@@ -92,69 +85,47 @@ export default {
...
@@ -92,69 +85,47 @@ export default {
multipleSelection
:
[],
multipleSelection
:
[],
dictSelection
:
[],
dictSelection
:
[],
queryParams
:
{
queryParams
:
{
ptype
:
'
'
key
:
'GX_CODE
'
}
}
}
}
},
},
created
()
{
created
()
{
this
.
getDictList
()
this
.
listData
()
},
},
methods
:
{
methods
:
{
getDictList
()
{
listData
()
{
getDictList
({
getDictData
(
this
.
queryParams
).
then
(
res
=>
{
dictType
:
this
.
queryParams
.
ptype
console
.
log
(
res
)
}).
then
(
res
=>
{
this
.
dictList
=
res
.
data
this
.
dictList
=
res
.
data
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
//提交按钮
//
提交按钮
onSubmit
()
{
onSubmit
()
{
console
.
log
(
this
.
dictSelection
)
console
.
log
(
this
.
dictSelection
)
if
(
this
.
queryParams
.
ptype
===
''
)
{
if
(
this
.
queryParams
.
ptype
===
''
)
{
this
.
$message
.
error
(
'ptype为空,不允许提交'
)
this
.
$message
.
error
(
'ptype为空,不允许提交'
)
return
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
({
submit
({
list
:
this
.
dictSelection
,
list
:
this
.
dictSelection
,
ptype
:
this
.
queryParams
.
ptype
ptype
:
this
.
queryParams
.
ptype
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'提交成功'
)
this
.
$message
.
success
(
'提交成功'
)
/* this.$refs.dictTable.clearSelection()
this.queryParams.ptype = '' */
}
}
})
})
// })
// })
},
},
//查询
//
查询
handleQuery
()
{
handleQuery
()
{
//清空
//
清空
/* this.$refs.dictTable.clearSelection() */
this
.
$refs
.
dictTable
.
clearSelection
()
if
(
this
.
queryParams
.
ptype
==
''
)
{
if
(
this
.
queryParams
.
ptype
==
=
''
)
{
return
return
}
}
getlist
(
this
.
queryParams
).
then
(
res
=>
{
getlist
(
this
.
queryParams
).
then
(
res
=>
{
const
ptypeList
=
res
.
data
const
ptypeList
=
res
.
data
if
(
ptypeList
.
length
==
0
)
{
if
(
ptypeList
.
length
==
=
0
)
{
this
.
$refs
.
dictTable
.
clearSelection
()
this
.
$refs
.
dictTable
.
clearSelection
()
}
}
ptypeList
.
forEach
(
row
=>
{
ptypeList
.
forEach
(
row
=>
{
...
...
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