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
9c542719
Commit
9c542719
authored
Apr 01, 2020
by
zhouzihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix-修复配置切换时出现的错误
parent
05489e0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
src/App.vue
src/App.vue
+1
-1
src/views/ConfigList.vue
src/views/ConfigList.vue
+32
-5
src/views/ProjectList.vue
src/views/ProjectList.vue
+1
-0
No files found.
src/App.vue
View file @
9c542719
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<router-view/>
<router-view/>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/ConfigList.vue
View file @
9c542719
...
@@ -56,7 +56,12 @@
...
@@ -56,7 +56,12 @@
<FormItem
label=
"配置内容"
>
<FormItem
label=
"配置内容"
>
<Input
v-if=
"showData.type==2"
v-model=
"showData.content"
type=
"textarea"
:rows=
"20"
></Input>
<Input
v-if=
"showData.type==2"
v-model=
"showData.content"
type=
"textarea"
:rows=
"20"
></Input>
</FormItem>
</FormItem>
<vue-json-editor
v-if=
"showData.type==1"
v-model=
"json"
exapndedOnStart=
"true"
@
json-change=
"onJsonChange"
></vue-json-editor>
<vue-json-editor
v-if=
"showData.type==1"
v-model=
"json"
exapndedOnStart=
"true"
@
json-change=
"onJsonChange"
></vue-json-editor>
</Form>
</Form>
</div>
</div>
<div
class=
"demo-drawer-footer"
>
<div
class=
"demo-drawer-footer"
>
...
@@ -161,12 +166,18 @@ export default {
...
@@ -161,12 +166,18 @@ export default {
p_id
:
1
,
p_id
:
1
,
envlist
:
[],
envlist
:
[],
project_name
:
""
,
project_name
:
""
,
json
:
null
,
json
:
null
};
};
},
},
methods
:
{
methods
:
{
getList
:
function
()
{
getList
:
function
()
{
// todo 添加选项
// todo 添加选项
if
(
_
.
isEmpty
(
this
.
$route
.
query
.
p_id
))
{
this
.
p_id
=
this
.
$route
.
query
.
p_id
;
}
if
(
_
.
isEmpty
(
this
.
$route
.
query
.
name
))
{
this
.
project_name
=
this
.
$route
.
query
.
name
;
}
axios
axios
.
get
(
.
get
(
config
.
serve_url
+
config
.
serve_url
+
...
@@ -198,19 +209,20 @@ export default {
...
@@ -198,19 +209,20 @@ export default {
});
});
},
},
addShow
:
function
()
{
addShow
:
function
()
{
this
.
env_name
=
(
_
.
find
(
this
.
envlist
,
{
env_id
:
this
.
env_id
})
).
name
;
this
.
env_name
=
_
.
find
(
this
.
envlist
,
{
env_id
:
this
.
env_id
}
).
name
;
this
.
isShow
=
true
;
this
.
isShow
=
true
;
// 这里正好名字可以对上
// 这里正好名字可以对上
this
.
showData
=
{
this
.
showData
=
{
p_id
:
this
.
p_id
,
p_id
:
this
.
p_id
,
env_id
:
this
.
env_id
env_id
:
this
.
env_id
};
};
this
.
json
=
null
;
},
},
show
:
function
(
index
)
{
show
:
function
(
index
)
{
this
.
env_name
=
(
_
.
find
(
this
.
envlist
,
{
env_id
:
this
.
env_id
})
).
name
;
this
.
env_name
=
_
.
find
(
this
.
envlist
,
{
env_id
:
this
.
env_id
}
).
name
;
this
.
isShow
=
true
;
this
.
isShow
=
true
;
this
.
showData
=
this
.
data1
[
index
];
this
.
showData
=
this
.
data1
[
index
];
if
(
this
.
showData
.
type
==
1
){
if
(
this
.
showData
.
type
==
1
)
{
this
.
json
=
JSON
.
parse
(
this
.
showData
.
content
);
this
.
json
=
JSON
.
parse
(
this
.
showData
.
content
);
}
}
},
},
...
@@ -235,6 +247,21 @@ export default {
...
@@ -235,6 +247,21 @@ export default {
.
catch
(
err
=>
{
.
catch
(
err
=>
{
this
.
$Message
.
error
(
err
);
this
.
$Message
.
error
(
err
);
});
});
},
init
:
function
()
{
this
.
getEnvList
();
// console.log(JSON.stringify(this.$route.query.p_id));
this
.
p_id
=
this
.
$route
.
query
.
p_id
;
this
.
project_name
=
this
.
$route
.
query
.
name
;
this
.
getList
();
}
},
watch
:
{
$route
(
to
,
from
)
{
//监听路由是否变化
if
(
to
.
query
.
p_id
!=
from
.
query
.
p_id
)
{
this
.
init
();
//重新加载数据
}
}
}
},
},
mounted
:
function
()
{
mounted
:
function
()
{
...
...
src/views/ProjectList.vue
View file @
9c542719
...
@@ -267,6 +267,7 @@ export default {
...
@@ -267,6 +267,7 @@ export default {
addShow
:
function
()
{
addShow
:
function
()
{
this
.
isShow
=
true
;
this
.
isShow
=
true
;
this
.
showData
=
{};
this
.
showData
=
{};
this
.
meta_data
=
null
;
},
},
show
:
function
(
index
)
{
show
:
function
(
index
)
{
this
.
isShow
=
true
;
this
.
isShow
=
true
;
...
...
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