Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
陆宇天
/
config-center-front
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 09ead38b
authored
May 26, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:过滤生产环境的选项
1 parent
6457b753
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
src/views/project/Project.vue
src/views/project/Project.vue
View file @
09ead38
...
@@ -182,8 +182,8 @@ export default defineComponent({
...
@@ -182,8 +182,8 @@ export default defineComponent({
//项目环境判断
//项目环境判断
const
editConditionFn
=
async
(
item
:
ConditionItem
)
=>
{
const
editConditionFn
=
async
(
item
:
ConditionItem
)
=>
{
console
.
log
(
"item: "
,
item
);
console
.
log
(
"item: "
,
item
);
const
res
=
await
conditionEdit
(
item
);
//
const res = await conditionEdit(item);
console
.
log
(
"res: "
,
res
);
//
console.log("res: ", res);
};
};
const
deleteConditionFn
=
(
item
:
ConditionItem
)
=>
{
const
deleteConditionFn
=
(
item
:
ConditionItem
)
=>
{
console
.
log
(
"item: "
,
item
);
console
.
log
(
"item: "
,
item
);
...
@@ -205,12 +205,17 @@ export default defineComponent({
...
@@ -205,12 +205,17 @@ export default defineComponent({
state
.
projectList
=
rows
;
state
.
projectList
=
rows
;
}
}
//设置test,develop环境选择
//设置test,develop环境选择
const
envOption
=
rows
.
map
((
item
:
ProjectItem
)
=>
{
const
envOption
=
rows
.
map
((
item
:
ProjectItem
)
=>
{
let
temp
=
{}
as
{
label
:
string
;
value
:
string
};
let
temp
=
{}
as
{
label
:
string
;
value
:
string
};
temp
.
value
=
item
.
name
;
temp
.
value
=
item
.
name
;
temp
.
label
=
item
.
name
;
temp
.
label
=
item
.
name
;
return
temp
;
return
temp
;
});
})
.
filter
(
(
item
:
{
label
:
string
;
value
:
string
})
=>
item
.
label
!==
"production"
);
sessionStorage
.
setItem
(
"envOption"
,
JSON
.
stringify
(
envOption
));
sessionStorage
.
setItem
(
"envOption"
,
JSON
.
stringify
(
envOption
));
//获取条件判断
//获取条件判断
let
res
=
await
getConditionList
();
let
res
=
await
getConditionList
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment