Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
Lic
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
Lic
Commits
392e301d
提交
392e301d
authored
4月 17, 2023
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改镜像名为下拉框
上级
da3e686a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
33 行增加
和
12 行删除
+33
-12
mirrorForm.vue
src/views/business/components/mirrorForm.vue
+30
-10
licInformation.vue
src/views/business/licInformation.vue
+3
-2
没有找到文件。
src/views/business/components/mirrorForm.vue
浏览文件 @
392e301d
<
template
>
<
template
>
<el-dialog
v-model=
"props.mirrorDialog"
:title=
"title"
width=
"30%"
:before-close=
"handleClose"
>
<el-dialog
v-model=
"props.mirrorDialog"
:title=
"title"
width=
"30%"
:before-close=
"handleClose"
>
<template
#
title
>
<div
style=
"display: flex; justify-content: flex-start; align-items: center;"
>
<div>
{{
title
}}
</div>
<el-alert
style=
"width: 50%; margin-left: 40px;"
title=
"选择镜像名后才能选择版本号"
type=
"warning"
:closable=
"false"
/>
</div>
</
template
>
<el-form
ref=
"formRef"
:model=
"formData"
label-width=
"100px"
:rules=
"rules"
>
<el-form
ref=
"formRef"
:model=
"formData"
label-width=
"100px"
:rules=
"rules"
>
<el-form-item
prop=
"name"
label=
"镜像名"
>
<el-form-item
prop=
"name"
label=
"镜像名"
>
<el-input
v-model=
"formData.name"
placeholder=
"请输入镜像名"
@
blur=
"handleBlur"
/>
<el-select
v-model=
"formData.name"
placeholder=
"请选择镜像名"
@
change=
"handleServiceChange"
>
<el-option
v-for=
"item in serviceList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.name"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"contextPath"
label=
"服务路径"
>
<el-form-item
prop=
"contextPath"
label=
"服务路径"
>
<el-input
v-model=
"formData.contextPath"
placeholder=
"请输入服务路径"
/>
<el-input
v-model=
"formData.contextPath"
placeholder=
"请输入服务路径"
/>
...
@@ -43,6 +53,7 @@ const formData = ref({
...
@@ -43,6 +53,7 @@ const formData = ref({
})
})
const
versionList
=
ref
([])
as
any
const
versionList
=
ref
([])
as
any
const
serviceList
=
ref
([])
as
any
const
formRef
=
ref
()
const
formRef
=
ref
()
const
title
=
ref
(
'新增服务镜像'
)
const
title
=
ref
(
'新增服务镜像'
)
...
@@ -52,15 +63,15 @@ const rules = ref({
...
@@ -52,15 +63,15 @@ const rules = ref({
// contextPath: [{ required: true, message: '请输入服务路径', trigger: 'blur' }],
// contextPath: [{ required: true, message: '请输入服务路径', trigger: 'blur' }],
})
})
const
handle
Blur
=
async
()
=>
{
const
handle
ServiceChange
=
async
()
=>
{
if
(
formData
.
value
.
name
)
{
if
(
formData
.
value
.
name
)
{
const
res
:
any
=
await
getImageService
({
name
:
formData
.
value
.
name
})
let
imageId
;
if
(
res
.
code
===
200
&&
res
.
data
.
records
.
length
!==
0
)
{
serviceList
.
value
.
map
((
item
:
any
)
=>
{
const
imageId
=
res
.
data
.
records
[
0
].
id
if
(
item
.
name
==
formData
.
value
.
name
)
const
ver
:
any
=
await
getImageVersion
({
imageId
})
imageId
=
item
.
id
console
.
log
(
ver
);
})
if
(
ver
.
code
===
200
)
versionList
.
value
=
ver
.
data
const
res
:
any
=
await
getImageVersion
({
imageId
})
}
if
(
res
.
code
===
200
)
versionList
.
value
=
res
.
data
}
}
}
}
...
@@ -72,6 +83,13 @@ const handleChange = (e: any) => {
...
@@ -72,6 +83,13 @@ const handleChange = (e: any) => {
})
})
}
}
const
initService
=
async
()
=>
{
const
res
:
any
=
await
getImageService
({
pageSize
:
100
})
if
(
res
.
code
===
200
)
{
serviceList
.
value
=
res
.
data
.
records
}
}
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
formData
.
value
=
{
formData
.
value
=
{
...
@@ -95,7 +113,9 @@ const onConfirm = () => {
...
@@ -95,7 +113,9 @@ const onConfirm = () => {
defineExpose
({
defineExpose
({
formData
,
formData
,
title
title
,
initService
,
handleClose
})
})
</
script
>
</
script
>
...
...
src/views/business/licInformation.vue
浏览文件 @
392e301d
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<!-- 添加对话框 -->
<!-- 添加对话框 -->
<el-dialog
v-model=
"licInfoForm.dialogVisible"
:title=
"licInfoForm.title"
width=
"30%"
:before-close=
"handleClose"
>
<el-dialog
v-model=
"licInfoForm.dialogVisible"
:title=
"licInfoForm.title"
width=
"30%"
:before-close=
"handleClose"
>
<el-form
ref=
"licInfoRef"
:model=
"licInfoForm.formLicInfo"
:rules=
"licInfoForm.rules"
label-width=
"1
3
0px"
<el-form
ref=
"licInfoRef"
:model=
"licInfoForm.formLicInfo"
:rules=
"licInfoForm.rules"
label-width=
"1
5
0px"
status-icon
>
status-icon
>
<el-form-item
label=
"Lic名称"
prop=
"lqLicName"
>
<el-form-item
label=
"Lic名称"
prop=
"lqLicName"
>
<el-input
v-model=
"licInfoForm.formLicInfo.lqLicName"
placeholder=
"请输入Lic名称"
></el-input>
<el-input
v-model=
"licInfoForm.formLicInfo.lqLicName"
placeholder=
"请输入Lic名称"
></el-input>
...
@@ -210,6 +210,7 @@ const onConfirm = () => {
...
@@ -210,6 +210,7 @@ const onConfirm = () => {
const
addMirror
=
(
row
:
any
)
=>
{
const
addMirror
=
(
row
:
any
)
=>
{
mirrorDialog
.
value
=
true
mirrorDialog
.
value
=
true
mirrorFormRef
.
value
.
title
=
'新增镜像'
mirrorFormRef
.
value
.
title
=
'新增镜像'
mirrorFormRef
.
value
.
initService
()
mirrorRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
mirrorRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
}
}
...
@@ -219,7 +220,7 @@ const getMirrorData = async (data: any) => {
...
@@ -219,7 +220,7 @@ const getMirrorData = async (data: any) => {
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
ElMessage
.
success
(
'添加成功'
)
ElMessage
.
success
(
'添加成功'
)
initLicInfo
(
searchValue
.
value
,
licInfoTable
.
pageNo
,
licInfoTable
.
pageSize
)
initLicInfo
(
searchValue
.
value
,
licInfoTable
.
pageNo
,
licInfoTable
.
pageSize
)
mirror
Dialog
.
value
=
false
mirror
FormRef
.
value
.
handleClose
()
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论