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
41ff6cfc
Commit
41ff6cfc
authored
Apr 03, 2020
by
zhouzihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev-添加部署在测试环境的新特性
parent
0a9e1b3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletion
+43
-1
src/views/ProjectList.vue
src/views/ProjectList.vue
+43
-1
No files found.
src/views/ProjectList.vue
View file @
41ff6cfc
...
@@ -90,6 +90,21 @@
...
@@ -90,6 +90,21 @@
>
{{
item
.
name
}}
</Option>
>
{{
item
.
name
}}
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
<!-- TODO 这里默认情况false -->
<FormItem
label=
"是否部署"
>
<Tooltip
content=
"新特性不稳定,请不要在线网环境使用"
>
<i-switch
v-model=
"buildData.is_deploy"
></i-switch>
</Tooltip>
</FormItem>
<FormItem
v-if=
"buildData.is_deploy"
>
<CheckboxGroup
v-model=
"buildData.deploy_list"
>
<!--
<Checkbox
label=
"香蕉"
></Checkbox>
<Checkbox
label=
"香蕉2"
></Checkbox>
-->
<div
class=
"cardBody"
v-for=
"(item,index) in module_list"
:key=
"index"
>
<Checkbox
:label=
"item"
></Checkbox>
</div>
</CheckboxGroup>
</FormItem>
</Form>
</Form>
</div>
</div>
<div
class=
"demo-drawer-footer"
>
<div
class=
"demo-drawer-footer"
>
...
@@ -229,7 +244,9 @@ export default {
...
@@ -229,7 +244,9 @@ export default {
buildData
:
{},
buildData
:
{},
envlist
:
[],
envlist
:
[],
spinShow
:
false
,
spinShow
:
false
,
meta_data
:
null
meta_data
:
null
,
switch1
:
false
,
module_list
:
[]
};
};
},
},
methods
:
{
methods
:
{
...
@@ -313,8 +330,30 @@ export default {
...
@@ -313,8 +330,30 @@ export default {
this
.
buildData
[
"
p_id
"
]
=
this
.
data1
[
index
].
p_id
;
this
.
buildData
[
"
p_id
"
]
=
this
.
data1
[
index
].
p_id
;
this
.
buildData
[
"
branch
"
]
=
"
master
"
;
this
.
buildData
[
"
branch
"
]
=
"
master
"
;
console
.
log
(
this
.
buildData
);
console
.
log
(
this
.
buildData
);
// todo 源数据转list
console
.
log
(
this
.
data1
[
index
].
meta_data
);
this
.
module_list
=
this
.
metaToList
(
this
.
data1
[
index
].
meta_data
);
this
.
showBuild
=
true
;
this
.
showBuild
=
true
;
},
},
metaToList
:
function
(
meta_data
)
{
// 先判断是不是 string 还是object
let
json
=
meta_data
;
// 循环处理json
if
(
_
.
isString
(
meta_data
))
{
json
=
JSON
.
parse
(
meta_data
);
}
let
res_data
=
[];
let
data_list
=
_
.
get
(
json
,
"
module_list
"
,[
"
NaN
"
]);
for
(
let
v
of
data_list
)
{
if
(
_
.
isString
(
v
))
{
res_data
.
push
(
v
);
}
else
{
res_data
.
push
(
v
.
name
);
}
}
console
.
log
(
res_data
);
return
res_data
;
},
onJsonChange
:
function
(
value
)
{
onJsonChange
:
function
(
value
)
{
this
.
showData
.
meta_data
=
JSON
.
stringify
(
value
);
this
.
showData
.
meta_data
=
JSON
.
stringify
(
value
);
console
.
log
(
value
);
console
.
log
(
value
);
...
@@ -339,6 +378,9 @@ export default {
...
@@ -339,6 +378,9 @@ export default {
// this.showBuild = false;
// this.showBuild = false;
this
.
$Message
.
error
(
err
+
"
构建失败请联系管理员处理
"
);
this
.
$Message
.
error
(
err
+
"
构建失败请联系管理员处理
"
);
});
});
},
change
:
function
(
status
)
{
this
.
buildData
[
'
is_deploy
'
]
=
status
;
}
}
},
},
mounted
:
function
()
{
mounted
:
function
()
{
...
...
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