Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
deploy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhouzihao
deploy-ui
Commits
e29e12b7
Commit
e29e12b7
authored
Mar 26, 2020
by
zhouzihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix-项目页面没有正常显示项目类型
parent
6eaf574d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
src/views/ProjectList.vue
src/views/ProjectList.vue
+30
-3
No files found.
src/views/ProjectList.vue
View file @
e29e12b7
...
...
@@ -50,7 +50,13 @@
<Input
v-model=
"showData.description"
></Input>
</FormItem>
<FormItem
label=
"项目类型"
>
<Input
v-model=
"showData.type"
></Input>
<Select
v-model=
"showData.type"
style=
"width:200px"
>
<Option
v-for=
"item in typeList"
:value=
"item.type_id"
:key=
"item.type_id"
>
{{
item
.
name
}}
</Option>
</Select>
</FormItem>
<FormItem
label=
"项目版本"
>
<Input
v-model=
"showData.version"
></Input>
...
...
@@ -71,6 +77,7 @@
import
MasterPage
from
"
@/components/Master
"
;
import
axios
from
"
axios
"
;
import
config
from
"
@/config/configs
"
;
import
_
from
"
lodash
"
;
export
default
{
components
:
{
...
...
@@ -108,7 +115,10 @@ export default {
{
title
:
"
项目类型
"
,
key
:
"
type
"
,
width
:
100
width
:
100
,
render
:
(
h
,
params
)
=>
{
return
h
(
"
span
"
,
{},
this
.
getType
(
params
.
row
.
type
));
}
},
{
title
:
"
项目数据
"
,
...
...
@@ -179,7 +189,8 @@ export default {
total
:
0
,
isShow
:
false
,
isAdd
:
false
,
showData
:
{}
showData
:
{},
typeList
:
[]
};
},
methods
:
{
...
...
@@ -232,10 +243,26 @@ export default {
pageChange
:
function
(
i
)
{
this
.
page
=
i
;
this
.
getList
();
},
getTypeList
:
function
()
{
axios
.
get
(
config
.
serve_url
+
"
/meta/names/
"
)
.
then
(
rs
=>
{
if
(
rs
.
status
==
200
)
{
this
.
typeList
=
rs
.
data
;
}
})
.
catch
(
err
=>
{
console
.
log
(
JSON
.
stringify
(
err
));
});
},
getType
(
type_id
)
{
return
_
.
find
(
this
.
typeList
,
{
type_id
:
type_id
}).
name
;
}
},
mounted
:
function
()
{
this
.
getList
();
this
.
getTypeList
();
}
};
</
script
>
\ No newline at end of file
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