Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-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
QA
qa-platform-ui
Commits
4992a762
Commit
4992a762
authored
Mar 02, 2022
by
王晓铜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改服务配置线上域名转化为小写以及修改保存时调新增接口
parent
84222383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
13 deletions
+45
-13
ProConfig.vue
src/views/docker/ProConfig.vue
+45
-13
No files found.
src/views/docker/ProConfig.vue
View file @
4992a762
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
<el-option
v-for=
"item in deployOptions"
:key=
"item.key"
:label=
"item.label"
:value=
"item.key"
/>
<el-option
v-for=
"item in deployOptions"
:key=
"item.key"
:label=
"item.label"
:value=
"item.key"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!-- temp.hostName -->
<el-form-item
v-if=
"temp.deployToDocker == 1"
label=
"线上域名"
prop=
"hostName"
style=
"width: 100%;"
>
<el-form-item
v-if=
"temp.deployToDocker == 1"
label=
"线上域名"
prop=
"hostName"
style=
"width: 100%;"
>
<el-input
v-model=
"temp.hostName"
/>
<el-input
v-model=
"temp.hostName"
/>
</el-form-item>
</el-form-item>
...
@@ -221,7 +221,8 @@
...
@@ -221,7 +221,8 @@
import
{
import
{
getDockerProjectList
,
getDockerProjectList
,
getDockerProjectType
,
getDockerProjectType
,
addDockerProject
addDockerProject
,
updateDockerProject
}
from
'
@/api/k8s
'
}
from
'
@/api/k8s
'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -245,7 +246,9 @@ export default {
...
@@ -245,7 +246,9 @@ export default {
{
label
:
'
服务名升序
'
,
key
:
'
+project_name
'
},
{
label
:
'
服务名升序
'
,
key
:
'
+project_name
'
},
{
label
:
'
服务名降序
'
,
key
:
'
-project_name
'
}
{
label
:
'
服务名降序
'
,
key
:
'
-project_name
'
}
],
],
temp
:
{},
temp
:
{
hostName
:
''
},
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
dialogDeleteVisible
:
false
,
dialogDeleteVisible
:
false
,
dialogStatus
:
''
,
dialogStatus
:
''
,
...
@@ -262,9 +265,22 @@ export default {
...
@@ -262,9 +265,22 @@ export default {
hostName
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}],
hostName
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}],
owner
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}],
owner
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}],
configPath
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}]
configPath
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}]
}
},
inputVal
:
''
}
}
},
},
// computed: {
// // 将线上域名字段大写转化成小写
// shortCodelowerCase: {
// get() {
// return this.inputVal
// },
// set(val) {
// this.inputVal = val.toLowerCase()
// this.temp.hostName = this.inputVal
// }
// }
// },
created
()
{
created
()
{
this
.
getType
()
this
.
getType
()
this
.
getProjectList
()
this
.
getProjectList
()
...
@@ -296,6 +312,7 @@ export default {
...
@@ -296,6 +312,7 @@ export default {
// 打开新建项目对话框
// 打开新建项目对话框
handleCreate
()
{
handleCreate
()
{
this
.
dialogName
=
'
新建项目
'
this
.
dialogName
=
'
新建项目
'
this
.
inputVal
=
''
this
.
temp
=
{
this
.
temp
=
{
cpuRequest
:
200
,
cpuRequest
:
200
,
cpuLimit
:
1000
,
cpuLimit
:
1000
,
...
@@ -321,17 +338,32 @@ export default {
...
@@ -321,17 +338,32 @@ export default {
var
projectName
=
this
.
temp
.
gitPath
.
split
(
'
/
'
)[
1
].
split
(
'
.
'
)[
0
]
var
projectName
=
this
.
temp
.
gitPath
.
split
(
'
/
'
)[
1
].
split
(
'
.
'
)[
0
]
this
.
temp
.
projectName
=
projectName
this
.
temp
.
projectName
=
projectName
this
.
temp
.
sonar
=
0
this
.
temp
.
sonar
=
0
this
.
temp
.
hostName
=
this
.
temp
.
hostName
.
toLowerCase
()
this
.
$refs
[
'
dataForm
'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'
dataForm
'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
addDockerProject
(
this
.
temp
).
then
((
resp
)
=>
{
if
(
this
.
temp
.
id
)
{
if
(
resp
.
data
.
data
===
true
)
{
// 编辑接口
this
.
dialogFormVisible
=
false
updateDockerProject
(
this
.
temp
).
then
((
resp
)
=>
{
this
.
getProjectList
()
if
(
resp
.
data
.
data
===
true
)
{
return
this
.
$message
.
success
(
'
创建成功!
'
)
this
.
dialogFormVisible
=
false
}
else
{
this
.
getProjectList
()
return
this
.
$message
.
error
(
'
创建失败!
'
)
return
this
.
$message
.
success
(
'
修改成功!
'
)
}
}
else
{
})
return
this
.
$message
.
error
(
'
修改失败!
'
)
}
})
}
else
{
// 新增接口
addDockerProject
(
this
.
temp
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
dialogFormVisible
=
false
this
.
getProjectList
()
return
this
.
$message
.
success
(
'
创建成功!
'
)
}
else
{
return
this
.
$message
.
error
(
'
创建失败!
'
)
}
})
}
}
}
})
})
},
},
...
...
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