Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
ab092009
Commit
ab092009
authored
Jun 03, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用构建接口调试
parent
d90cb6d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
431 additions
and
287 deletions
+431
-287
src/assets/css/index.css
src/assets/css/index.css
+6
-0
src/components/apass-table.vue
src/components/apass-table.vue
+1
-1
src/components/cropper.vue
src/components/cropper.vue
+19
-17
src/pages/service_shop/sjfwDetail.vue
src/pages/service_shop/sjfwDetail.vue
+11
-19
src/pages/workbench/app_build.vue
src/pages/workbench/app_build.vue
+394
-250
No files found.
src/assets/css/index.css
View file @
ab092009
...
@@ -499,6 +499,7 @@ width: 620px!important;
...
@@ -499,6 +499,7 @@ width: 620px!important;
/* 应用超市详情页公共样式 */
/* 应用超市详情页公共样式 */
.sevice_detail
{
.sevice_detail
{
max-width
:
1200px
;
max-width
:
1200px
;
padding-top
:
1px
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
...
@@ -535,6 +536,11 @@ width: 620px!important;
...
@@ -535,6 +536,11 @@ width: 620px!important;
background-color
:
#e1e4fb
;
background-color
:
#e1e4fb
;
border-color
:
#e1e4fb
;
border-color
:
#e1e4fb
;
}
}
.apass_button
.el-button.is-disabled
,
.apass_button
.el-button.is-disabled
:focus
,
.apass_button
.el-button.is-disabled
:hover
{
cursor
:
not-allowed
;
}
.apass_table
.el-table
th
>
.cell
{
.apass_table
.el-table
th
>
.cell
{
color
:
#1a2236
;
color
:
#1a2236
;
}
}
...
...
src/components/apass-table.vue
View file @
ab092009
<
template
>
<
template
>
<div
class=
"apass_table"
>
<div
class=
"apass_table"
>
<el-table
:data=
"data"
>
<el-table
:data=
"data"
>
<el-table-column
:width=
"
paddingLeft - 10
"
></el-table-column>
<el-table-column
:width=
"
Math.max(paddingLeft - 10, 0)
"
></el-table-column>
<el-table-column
<el-table-column
v-for=
"(item, index) in header"
v-for=
"(item, index) in header"
:label=
"item.label"
:label=
"item.label"
...
...
src/components/cropper.vue
View file @
ab092009
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
id=
"uploads"
id=
"uploads"
class=
"up_input"
class=
"up_input"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"uploadImg($event,1)"
@
change=
"uploadImg($event,
1)"
/>
/>
</div>
</div>
<!-- 弹出层-裁剪 -->
<!-- 弹出层-裁剪 -->
...
@@ -41,8 +41,12 @@
...
@@ -41,8 +41,12 @@
</div>
</div>
</div>
</div>
<el-row
class=
"footerBtn"
align=
"center"
>
<el-row
class=
"footerBtn"
align=
"center"
>
<el-button
type=
"primary"
size=
"small"
round
@
click=
"cut('blob')"
>
确认
</el-button>
<el-button
type=
"primary"
size=
"small"
round
@
click=
"cut('blob')"
<el-button
type=
"primary"
size=
"small"
round
@
click=
"handleClose"
>
取消
</el-button>
>
确认
</el-button
>
<el-button
type=
"primary"
size=
"small"
round
@
click=
"handleClose"
>
取消
</el-button
>
</el-row>
</el-row>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -53,7 +57,7 @@
...
@@ -53,7 +57,7 @@
import
{
VueCropper
}
from
"
vue-cropper
"
;
import
{
VueCropper
}
from
"
vue-cropper
"
;
export
default
{
export
default
{
components
:
{
components
:
{
VueCropper
VueCropper
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -64,7 +68,7 @@ export default {
...
@@ -64,7 +68,7 @@ export default {
canMoveBox
:
true
,
//截图框不能拖动
canMoveBox
:
true
,
//截图框不能拖动
autoCropWidth
:
200
,
//截图框宽度
autoCropWidth
:
200
,
//截图框宽度
autoCropHeight
:
200
,
//截图框高度
autoCropHeight
:
200
,
//截图框高度
centerBox
:
false
//截图框被限制在图片里面
centerBox
:
false
,
//截图框被限制在图片里面
},
},
previews
:
{},
//实时预览图数据
previews
:
{},
//实时预览图数据
attach
:
{
attach
:
{
...
@@ -72,10 +76,10 @@ export default {
...
@@ -72,10 +76,10 @@ export default {
userId
:
""
,
userId
:
""
,
customaryUrl
:
""
,
//原图片路径
customaryUrl
:
""
,
//原图片路径
laterUrl
:
""
,
//裁剪后图片路径
laterUrl
:
""
,
//裁剪后图片路径
attachType
:
"
photo
"
//附件类型
attachType
:
"
photo
"
,
//附件类型
},
},
fileName
:
""
,
//本机文件地址
fileName
:
""
,
//本机文件地址
uploadImgRelaPath
:
""
//上传后图片地址
uploadImgRelaPath
:
""
,
//上传后图片地址
};
};
},
},
methods
:
{
methods
:
{
...
@@ -90,7 +94,7 @@ export default {
...
@@ -90,7 +94,7 @@ export default {
//加载图片信息
//加载图片信息
find
()
{
find
()
{
this
.
userId
=
sessionStorage
.
getItem
(
"
userId
"
);
this
.
userId
=
sessionStorage
.
getItem
(
"
userId
"
);
this
.
$http
.
post
(
"
ssapi
"
,
this
.
attach
).
then
(
res
=>
{
this
.
$http
.
post
(
"
ssapi
"
,
this
.
attach
).
then
(
(
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
});
});
},
},
...
@@ -105,7 +109,7 @@ export default {
...
@@ -105,7 +109,7 @@ export default {
//fileReader 接口,用于异步读取文件数据
//fileReader 接口,用于异步读取文件数据
var
reader
=
new
FileReader
();
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
//重要 以dataURL形式读取文件
reader
.
readAsDataURL
(
file
);
//重要 以dataURL形式读取文件
reader
.
onload
=
e
=>
{
reader
.
onload
=
(
e
)
=>
{
// data = window.URL.createObjectURL(new Blob([e.target.result])) 转化为blob格式
// data = window.URL.createObjectURL(new Blob([e.target.result])) 转化为blob格式
let
data
=
e
.
target
.
result
;
let
data
=
e
.
target
.
result
;
...
@@ -120,25 +124,23 @@ export default {
...
@@ -120,25 +124,23 @@ export default {
//确认截图,上传
//确认截图,上传
cut
(
type
)
{
cut
(
type
)
{
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
this
.
$refs
.
cropper
.
getCropBlob
(
res
=>
{
this
.
$refs
.
cropper
.
getCropBlob
(
(
res
)
=>
{
//res是裁剪后图片的bolb对象
//res是裁剪后图片的bolb对象
formData
.
append
(
"
file
"
,
res
,
this
.
userId
);
formData
.
append
(
"
file
"
,
res
,
this
.
userId
);
formData
.
append
(
"
directory
"
,
"
image
"
);
formData
.
append
(
"
directory
"
,
"
image
"
);
let
url
=
"
/awecloud/static/image/upload
"
;
let
url
=
"
/awecloud/static/image/upload
"
;
this
.
$http
this
.
$http
.
post
(
url
,
formData
,
{
.
post
(
url
,
formData
,
{
contentType
:
false
,
headers
:
{
"
Content-Type
"
:
"
multipart/form-data
"
},
processData
:
false
,
headers
:
{
"
Content-Type
"
:
"
multipart/form-data
"
}
})
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
// 上传图片后服务器返回访问路径
// 上传图片后服务器返回访问路径
this
.
$emit
(
"
getNewUrl
"
,
res
.
data
.
data
);
this
.
$emit
(
"
getNewUrl
"
,
res
.
data
.
data
);
this
.
handleClose
();
this
.
handleClose
();
});
});
});
});
}
}
,
}
}
,
};
};
</
script
>
</
script
>
...
@@ -191,4 +193,4 @@ export default {
...
@@ -191,4 +193,4 @@ export default {
.cropper_dia
.el-dialog
{
.cropper_dia
.el-dialog
{
width
:
860px
;
width
:
860px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/service_shop/sjfwDetail.vue
View file @
ab092009
...
@@ -42,27 +42,19 @@ export default {
...
@@ -42,27 +42,19 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
getDataFromApi
(
_url
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$http
.
get
(
_url
)
.
then
((
response
)
=>
{
resolve
(
response
.
body
);
})
.
catch
(
function
(
error
)
{
reject
(
error
);
});
});
},
init
()
{
init
()
{
this
.
getDataFromApi
(
`/static/serviceBaseInfo.json`
).
then
(
this
.
$http
({
sjfw
})
=>
{
.
get
(
"
/apaas/serviceapp/v3/servicemarket/detail
"
,
{
this
.
baseInfo
=
sjfw
;
params
:
{
},
serviceId
:
666
,
(
error
)
=>
{
},
})
.
then
((
response
)
=>
{
console
.
log
(
response
.
data
);
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
}
});
);
},
},
},
},
mounted
()
{
mounted
()
{
...
...
src/pages/workbench/app_build.vue
View file @
ab092009
...
@@ -12,52 +12,74 @@
...
@@ -12,52 +12,74 @@
:step=
"0"
:step=
"0"
:active-icon=
"require('@/assets/imgs/progress_ic_jingxiang.png')"
:active-icon=
"require('@/assets/imgs/progress_ic_jingxiang.png')"
>
>
<el-form
class=
"step_form"
label-position=
"top"
:model=
"mirrorInfo"
>
<el-form
<el-form-item
label=
"镜像名称:"
>
ref=
"step1_form"
class=
"step_form"
label-position=
"top"
:model=
"image_info"
:rules=
"image_rules"
>
<el-form-item
label=
"镜像名称:"
prop=
"image_name"
>
<el-input
<el-input
v-model=
"
mirrorInfo.
name"
v-model=
"
image_info.image_
name"
placeholder=
"请输入镜像名称"
placeholder=
"请输入镜像名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"版本
数:
"
>
<el-form-item
label=
"版本
号:"
prop=
"tag
"
>
<el-input
<el-input
v-model=
"
mirrorInfo.version
"
v-model=
"
image_info.tag
"
placeholder=
"请输入版本
数
"
placeholder=
"请输入版本
号
"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"上传镜像包:"
>
<el-form-item
label=
"上传镜像包:"
prop=
"file"
>
<upload-file
<el-upload
:multiple=
"false"
ref=
"step1_upload"
:max=
"1"
:auto-upload=
"false"
type=
"default"
:data=
"
{
:readOnly=
"false"
image_name: image_info.image_name,
:list=
"mirrorList"
tag: image_info.tag,
@
getNewList=
"getNewList"
}"
:drag=
"true"
:limit="1"
></upload-file>
:on-change="imageUploadChange"
<p
class=
"mirror_info"
>
:on-success="imageUploadSuccess"
<img
:src=
"require('@/assets/imgs/ic_newdata.png')"
/>
action="/apaas/hubApi/image/upload"
<span>
镜像文件001.rar
</span>
name="file"
</p>
drag
<div
class=
"mirror_ation"
>
>
<el-button
type=
"primary"
@
click=
"sunmitMirror"
>
<i
class=
"el-icon-upload"
></i>
确认
<div
class=
"el-upload__text"
>
</el-button>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
</div>
</el-upload>
</el-form-item>
</el-form-item>
<div
class=
"apass_button upload_action"
>
<el-button
type=
"primary"
@
click=
"submitImage('step1_form')"
:loading=
"step1UplaodLoading"
>
确认
</el-button>
</div>
<div
class=
"form_line"
></div>
<div
class=
"form_line"
></div>
<el-form-item
label=
"上传镜像列表:"
>
<el-form-item
label=
"上传镜像列表:"
>
<ces-table
<div
class=
"image_list_container"
v-infinite-scroll=
"loadImageList"
>
class=
"mirror_list"
<apass-table
emptyText=
"暂无数据"
:header=
"image_headers"
:border=
"false"
:data=
"image_datas"
:headers=
"mirror_headers"
:padding-left=
"60"
:datas=
"mirror_datas"
></apass-table>
:isIndex=
"false"
<p
style=
"text-align: center"
v-if=
"image_loading"
>
加载中...
</p>
></ces-table>
<p
style=
"text-align: center"
v-if=
"image_noMore && image_datas.length > 0"
>
没有更多了
</p>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"step_action"
>
<div
class=
"
apass_button
step_action"
>
<el-button
type=
"primary"
@
click=
"nextStep"
>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
下一步
</el-button>
</el-button>
...
@@ -68,8 +90,14 @@
...
@@ -68,8 +90,14 @@
:step=
"1"
:step=
"1"
:active-icon=
"require('@/assets/imgs/progress_ic_bushudata.png')"
:active-icon=
"require('@/assets/imgs/progress_ic_bushudata.png')"
>
>
<el-form
class=
"step_form"
label-position=
"top"
>
<el-form
<el-form-item
label=
"上传镜像包:"
>
ref=
"step2_form"
class=
"step_form"
label-position=
"top"
:model=
"deploy_info"
:rules=
"deploy_rules"
>
<el-form-item
label=
"上传部署文件:"
prop=
"file"
>
<div
class=
"description_info"
>
<div
class=
"description_info"
>
<i
class=
"el-icon-warning-outline"
></i>
<i
class=
"el-icon-warning-outline"
></i>
<p>
<p>
...
@@ -79,26 +107,29 @@
...
@@ -79,26 +107,29 @@
3.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。
3.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。
</p>
</p>
</div>
</div>
<upload-file
<el-upload
:multiple=
"false"
ref=
"step2_upload"
:max=
"1"
:auto-upload=
"false"
type=
"default"
:limit=
"1"
:readOnly=
"false"
:data=
"app_info"
:list=
"mirrorList"
action=
"/apaas/hubApi/market/app"
@
getNewList=
"getNewList"
:on-change=
"deployUploadChange"
:drag=
"true"
:on-success=
"deployUploadSuccess"
></upload-file>
name=
"file"
<p
class=
"mirror_info"
>
drag
<img
:src=
"require('@/assets/imgs/ic_newdata.png')"
/>
>
<span>
镜像文件001.rar
</span>
<i
class=
"el-icon-upload"
></i>
</p>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
</el-upload>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"step_action"
style=
"margin-top: 120px;"
>
<div
class=
"
apass_button
step_action"
style=
"margin-top: 120px;"
>
<el-button
type=
"primary"
plain
@
click=
"preStep"
>
<el-button
type=
"primary"
plain
@
click=
"preStep"
>
上一步
上一步
</el-button>
</el-button>
<el-button
type=
"primary"
@
click=
"
nextStep
"
>
<el-button
type=
"primary"
@
click=
"
goToStep2('step2_form')
"
>
下一步
下一步
</el-button>
</el-button>
</div>
</div>
...
@@ -108,92 +139,107 @@
...
@@ -108,92 +139,107 @@
:step=
"2"
:step=
"2"
:active-icon=
"require('@/assets/imgs/progress_ic_xinxitx.png')"
:active-icon=
"require('@/assets/imgs/progress_ic_xinxitx.png')"
>
>
<el-form
class=
"step_form"
label-position=
"top"
:model=
"appInfo"
>
<el-form
<el-form-item
label=
"应用名称称:"
>
ref=
"step3_form"
class=
"step_form"
label-position=
"top"
:model=
"app_info"
:rules=
"app_rules"
>
<el-form-item
label=
"应用名称:"
prop=
"name"
>
<el-input
<el-input
v-model=
"app
I
nfo.name"
v-model=
"app
_i
nfo.name"
placeholder=
"请输入应用名称
称
"
placeholder=
"请输入应用名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"应用版本:"
>
<el-form-item
label=
"应用版本:"
prop=
"version"
>
<el-input
<el-input
v-model=
"app
I
nfo.version"
v-model=
"app
_i
nfo.version"
placeholder=
"请输入应用版本,例:1.0.0"
placeholder=
"请输入应用版本,例:1.0.0"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"业务领域:"
>
<el-form-item
label=
"业务领域:"
prop=
"ywly"
>
<el-select
v-model=
"app
Info.area
"
placeholder=
"请选择业务领域"
>
<el-select
v-model=
"app
_info.ywly
"
placeholder=
"请选择业务领域"
>
<el-option
<el-option
v-for=
"item in
area
s"
v-for=
"item in
ywly
s"
:key=
"item.value"
:key=
"item.value"
:label=
"item.
label
"
:label=
"item.
name
"
:value=
"item.
value
"
:value=
"item.
id
"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"应用类型:"
>
<el-form-item
label=
"应用类型:"
prop=
"type"
>
<el-select
v-model=
"app
I
nfo.type"
placeholder=
"请选择应用类型"
>
<el-select
v-model=
"app
_i
nfo.type"
placeholder=
"请选择应用类型"
>
<el-option
<el-option
v-for=
"item in types"
v-for=
"item in types"
:key=
"item.value"
:key=
"item.value"
:label=
"item.
label
"
:label=
"item.
name
"
:value=
"item.
value
"
:value=
"item.
id
"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"上传镜像包:"
>
<el-form-item
label=
"应用封面:"
prop=
"logo"
>
<upload-file
<el-upload
:multiple=
"false"
class=
"avatar-uploader"
:max=
"1"
action=
"/apaas/static/image/upload"
type=
"picture"
:data=
"
{ directory: 'hub' }"
:readOnly=
"false"
:show-file-list="false"
:list=
"cover"
:on-success="handleLogoSuccess"
@
getNewList=
"getcoverList"
:before-upload="beforeLogoUpload"
></upload-file>
</el-form-item>
<el-form-item
label=
"所属组织:"
>
<el-select
v-model=
"appInfo.organization"
placeholder=
"请选择所属组织"
>
>
<img
v-if=
"app_info.logo"
class=
"avatar"
:src=
"app_info.logo"
/>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
<el-form-item
label=
"所属组织:"
prop=
"org"
>
<el-select
v-model=
"app_info.org"
placeholder=
"请选择所属组织"
>
<el-option
<el-option
v-for=
"item in org
anization
s"
v-for=
"item in orgs"
:key=
"item.value"
:key=
"item.value"
:label=
"item.
label
"
:label=
"item.
name
"
:value=
"item.
value
"
:value=
"item.
id
"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"应用简介:"
>
<el-form-item
label=
"应用简介:"
prop=
"yyjj"
>
<el-input
<el-input
v-model=
"app
Info.app_description
"
v-model=
"app
_info.yyjj
"
type=
"text
area
"
type=
"text
ywly
"
placeholder=
"请输入应用简介"
placeholder=
"请输入应用简介"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"功能简介:"
>
<el-form-item
label=
"功能简介:"
prop=
"gnjj"
>
<el-input
<el-input
v-model=
"app
Info.function_description
"
v-model=
"app
_info.gnjj
"
type=
"text
area
"
type=
"text
ywly
"
placeholder=
"请输入功能简介"
placeholder=
"请输入功能简介"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"应用场景示例:"
>
<el-form-item
label=
"应用场景示例:"
prop=
"cjsl"
>
<el-input
<el-input
v-model=
"app
Info.example
"
v-model=
"app
_info.cjsl
"
type=
"text
area
"
type=
"text
ywly
"
placeholder=
"请输入应用场景示例"
placeholder=
"请输入应用场景示例"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"step_action"
>
<div
class=
"apass_button step_action"
>
<el-button
type=
"primary"
plain
@
click=
"preStep"
>
<el-button
type=
"primary"
plain
:loading=
"submitLoading"
@
click=
"preStep"
>
上一步
上一步
</el-button>
</el-button>
<el-button
type=
"primary"
@
click=
"sunbmitAction"
>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"sunbmitAction('step3_form')"
>
提交
提交
</el-button>
</el-button>
</div>
</div>
...
@@ -205,148 +251,246 @@
...
@@ -205,148 +251,246 @@
<
script
>
<
script
>
import
appBuildSteps
from
"
@/components/app-build-steps/app-build-steps
"
;
import
appBuildSteps
from
"
@/components/app-build-steps/app-build-steps
"
;
import
appBuildStep
from
"
@/components/app-build-steps/app-build-step
"
;
import
appBuildStep
from
"
@/components/app-build-steps/app-build-step
"
;
import
uploadFile
from
"
@/components/upload_file
"
;
import
apassTable
from
"
@/components/apass-table
"
;
import
cesTable
from
"
@/components/table-um
"
;
export
default
{
export
default
{
components
:
{
components
:
{
appBuildSteps
,
appBuildSteps
,
appBuildStep
,
appBuildStep
,
uploadFile
,
apassTable
,
cesTable
,
},
},
data
:
()
=>
({
data
:
()
=>
({
step
:
0
,
step
:
0
,
mirrorList
:
[],
image_info
:
{
mirrorInfo
:
{
image_name
:
""
,
name
:
""
,
tag
:
""
,
version
:
""
,
file
:
""
,
image
:
""
,
},
},
mirror_headers
:
[
image_rules
:
{
{
label
:
""
,
prop
:
""
,
type
:
""
,
align
:
""
,
width
:
50
},
image_name
:
[
{
label
:
"
镜像名称
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
left
"
},
{
required
:
true
,
message
:
"
请输入镜像名称
"
,
trigger
:
"
blur
"
},
{
label
:
"
版本数
"
,
prop
:
"
version
"
,
type
:
""
,
align
:
"
center
"
},
],
{
tag
:
[{
required
:
true
,
message
:
"
请输入版本号
"
,
trigger
:
"
blur
"
}],
label
:
"
操作
"
,
file
:
[{
required
:
true
,
message
:
"
请选择镜像文件
"
,
trigger
:
"
change
"
}],
type
:
"
Button
"
,
align
:
"
center
"
,
btnList
:
[
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
],
mirror_datas
:
[
{
name
:
"
cemplat-api
"
,
version
:
"
1.0.0
"
,
},
{
name
:
"
cemplat-api
"
,
version
:
"
1.0.1
"
,
},
{
name
:
"
cemplat-api
"
,
version
:
"
1.0.2
"
,
},
{
name
:
"
cemplat-api
"
,
version
:
"
1.0.3
"
,
},
{
name
:
"
cemplat-api
"
,
version
:
"
1.0.4
"
,
},
],
appInfo
:
{
name
:
""
,
version
:
""
,
area
:
""
,
type
:
""
,
cover
:
""
,
organization
:
""
,
app_description
:
""
,
function_description
:
""
,
example
:
""
,
},
},
areas
:
[
step1UplaodLoading
:
false
,
{
image_headers
:
[],
name
:
"
应急领域
"
,
image_datas
:
[],
value
:
0
,
image_total
:
0
,
},
image_loading
:
false
,
{
image_noMore
:
false
,
name
:
"
公安领域
"
,
image_page
:
0
,
value
:
1
,
deploy_info
:
{
},
file
:
""
,
{
name
:
"
全领域
"
,
value
:
2
,
},
{
name
:
"
交通领域
"
,
value
:
3
,
},
],
types
:
[
{
name
:
"
基础工具
"
,
value
:
0
,
},
{
name
:
"
通用应用
"
,
value
:
1
,
},
{
name
:
"
业务应用
"
,
value
:
2
,
},
],
organizations
:
[
{
name
:
"
比格大数据
"
,
value
:
0
,
},
{
name
:
"
贵州公安厅
"
,
value
:
1
,
},
{
name
:
"
贵州交通厅
"
,
value
:
2
,
},
{
name
:
"
贵州迪爱思交通厅
"
,
value
:
3
,
},
],
cover
:
[],
}),
methods
:
{
getNewList
(
values
)
{
console
.
log
(
values
);
},
},
sunmitMirror
()
{
deploy_rules
:
{
console
.
log
(
this
.
mirrorInfo
.
image
);
file
:
[{
required
:
true
,
message
:
"
请选择部署文件
"
,
trigger
:
"
change
"
}],
},
},
deleteItem
(
item
)
{
app_info
:
{
console
.
log
(
item
);
name
:
""
,
// 应用名称
version
:
""
,
// 应用版本
ywly
:
""
,
// 业务领域id
type
:
""
,
// 应用类型id
logo
:
""
,
// 封面图片链接
org
:
""
,
// 所属组织机构id
yyjj
:
""
,
// 应用简介
gnjj
:
""
,
// 功能简介
cjsl
:
""
,
// 应用场景示例
},
},
getcoverList
(
values
)
{
app_rules
:
{
console
.
log
(
values
);
name
:
[{
required
:
true
,
message
:
"
请输入应用名称
"
,
trigger
:
"
blur
"
}],
version
:
[{
required
:
true
,
message
:
"
请输入应用版本
"
,
trigger
:
"
blur
"
}],
ywly
:
[{
required
:
true
,
message
:
"
请选择业务领域
"
,
trigger
:
"
change
"
}],
type
:
[{
required
:
true
,
message
:
"
请选择应用类型
"
,
trigger
:
"
change
"
}],
logo
:
[{
required
:
true
,
message
:
"
请上传应用封面
"
,
trigger
:
"
change
"
}],
org
:
[
{
required
:
true
,
message
:
"
请选择所属组织机构
"
,
trigger
:
"
change
"
},
],
yyjj
:
[{
required
:
true
,
message
:
"
请选择应用简介
"
,
trigger
:
"
change
"
}],
gnjj
:
[{
required
:
true
,
message
:
"
请选择功能简介
"
,
trigger
:
"
change
"
}],
cjsl
:
[
{
required
:
true
,
message
:
"
请选择应用场景示例
"
,
trigger
:
"
change
"
},
],
},
},
ywlys
:
[],
types
:
[],
orgs
:
[],
submitLoading
:
false
,
}),
methods
:
{
preStep
()
{
preStep
()
{
this
.
step
--
;
this
.
step
--
;
},
},
nextStep
()
{
nextStep
()
{
this
.
step
++
;
this
.
step
++
;
},
},
sunbmitAction
()
{
initImageList
()
{
console
.
log
(
"
submit action
"
);
this
.
$http
.
get
(
"
/apaas/hubApi/image/imageUpList
"
,
{
params
:
{
page
:
this
.
image_page
,
size
:
5
,
},
})
.
then
((
response
)
=>
{
this
.
image_total
=
response
.
data
.
total
;
this
.
image_datas
.
push
(...
response
.
data
.
data
);
this
.
image_loading
=
false
;
this
.
image_noMore
=
false
;
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
},
loadImageList
()
{
if
(
this
.
image_datas
.
length
<
this
.
image_total
)
{
this
.
image_loading
=
true
;
this
.
image_page
++
;
this
.
initImageList
();
}
else
{
this
.
image_noMore
=
true
;
}
},
imageUploadChange
(
file
)
{
this
.
image_info
.
file
=
file
;
/* this.$refs["step1_form"].validate((valid) => {
if (valid) {
//
} else {
return false;
}
}); */
},
imageUploadSuccess
(
response
)
{
console
.
log
(
"
新增成功
"
,
response
);
this
.
$refs
.
step1_upload
.
clearFiles
();
this
.
image_info
.
image_name
=
""
;
this
.
image_info
.
tag
=
""
;
this
.
image_info
.
file
=
""
;
this
.
step1UplaodLoading
=
false
;
this
.
image_datas
=
[];
this
.
image_page
=
1
;
this
.
initImageList
();
},
submitImage
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
step1UplaodLoading
=
true
;
this
.
$refs
.
step1_upload
.
submit
();
}
else
{
return
false
;
}
});
},
deleteItem
(
item
)
{
this
.
$http
.
delete
(
`/apaas/hubApi/image/del/
${
item
.
name
}
`
)
.
then
((
response
)
=>
{
// console.log("已删除" + item.name);
this
.
initImageList
();
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
},
deployUploadChange
(
file
)
{
this
.
deploy_info
.
file
=
file
;
},
goToStep2
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
nextStep
();
}
else
{
return
false
;
}
});
},
handleLogoSuccess
(
response
)
{
this
.
app_info
.
logo
=
response
.
data
;
},
beforeLogoUpload
(
file
)
{
/* const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
}
return isJPG && isLt2M; */
},
getYwlys
()
{
this
.
$http
.
get
(
"
/apaas/hubApi/market/appTypes
"
)
.
then
((
response
)
=>
{
this
.
ywlys
=
response
.
data
.
data
;
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
},
getTypes
()
{
this
.
$http
.
get
(
"
/apaas/hubApi/market/departments
"
)
.
then
((
response
)
=>
{
this
.
types
=
response
.
data
.
data
;
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
},
getOrgs
()
{
this
.
$http
.
get
(
"
/apaas/hubApi/market/departments
"
)
.
then
((
response
)
=>
{
this
.
orgs
=
response
.
data
.
data
;
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
},
sunbmitAction
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
"
submit action
"
);
this
.
submitLoading
=
true
;
this
.
$refs
.
step2_upload
.
submit
();
}
else
{
return
false
;
}
});
},
deployUploadSuccess
(
response
)
{
console
.
log
(
"
提交成功
"
,
response
);
this
.
submitLoading
=
false
;
this
.
$router
.
push
(
"
/yygl/2/0
"
);
},
},
},
},
mounted
()
{
this
.
image_headers
=
[
{
label
:
"
镜像名称
"
,
prop
:
"
name
"
,
align
:
"
left
"
},
{
label
:
"
版本号
"
,
prop
:
"
tag
"
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
buttons
"
,
align
:
"
center
"
,
actionList
:
[
{
label
:
"
删除
"
,
callback
:
this
.
deleteItem
,
},
],
},
];
this
.
image_datas
=
[];
this
.
image_page
=
1
;
this
.
initImageList
();
this
.
getYwlys
();
this
.
getTypes
();
this
.
getOrgs
();
},
};
};
</
script
>
</
script
>
...
@@ -354,20 +498,6 @@ export default {
...
@@ -354,20 +498,6 @@ export default {
.app_build-container
{
.app_build-container
{
margin
:
-157px
40px
20px
;
margin
:
-157px
40px
20px
;
}
}
.app_build-container
.el-button
{
min-width
:
124px
;
height
:
44px
;
}
.app_build-container
.el-button--primary
{
color
:
#fff
;
background-color
:
#0f2683
;
border-color
:
#0f2683
;
}
.app_build-container
.el-button--primary.is-plain
{
color
:
#0f2683
;
background-color
:
#e1e4fb
;
border-color
:
#e1e4fb
;
}
.app_build-container
>
.app_build_steps
{
.app_build-container
>
.app_build_steps
{
border-radius
:
12px
;
border-radius
:
12px
;
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -380,21 +510,8 @@ export default {
...
@@ -380,21 +510,8 @@ export default {
.step_action
.el-button
:not
(
:last-child
)
{
.step_action
.el-button
:not
(
:last-child
)
{
margin-right
:
30px
;
margin-right
:
30px
;
}
}
.mirror_info
{
.upload_action
{
display
:
flex
;
margin
:
20px
0
25px
;
justify-content
:
flex-start
;
align-items
:
center
;
font-size
:
12px
;
line-height
:
20px
;
color
:
#8890a7
;
margin-left
:
15px
;
}
.mirror_info
>
img
{
margin-right
:
10px
;
width
:
12px
;
}
.mirror_ation
{
margin-top
:
45px
;
}
}
.form_line
{
.form_line
{
border
:
1px
solid
#f4f7fc
;
border
:
1px
solid
#f4f7fc
;
...
@@ -418,9 +535,36 @@ export default {
...
@@ -418,9 +535,36 @@ export default {
font-size
:
14px
;
font-size
:
14px
;
margin-right
:
10px
;
margin-right
:
10px
;
}
}
.image_list_container
{
height
:
284px
;
overflow-y
:
auto
;
}
</
style
>
</
style
>
<
style
>
<
style
>
.app_build-container
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.app_build-container
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.app_build-container
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
.app_build-container
.avatar
{
width
:
178px
;
height
:
178px
;
display
:
block
;
}
.app_build-container
.apass_breadcrumb
{
.app_build-container
.apass_breadcrumb
{
padding
:
0
20px
;
padding
:
0
20px
;
}
}
...
@@ -450,21 +594,21 @@ export default {
...
@@ -450,21 +594,21 @@ export default {
line-height
:
25px
;
line-height
:
25px
;
color
:
#58617a
;
color
:
#58617a
;
}
}
.
mirror
_list
.el-table
th
>
.cell
{
.
image
_list
.el-table
th
>
.cell
{
color
:
#1a2236
;
color
:
#1a2236
;
}
}
.
mirror
_list
.el-table
td
,
.
image
_list
.el-table
td
,
.
mirror
_list
.el-table
th
.is-leaf
{
.
image
_list
.el-table
th
.is-leaf
{
border
:
none
!important
;
border
:
none
!important
;
line-height
:
23px
;
line-height
:
23px
;
}
}
.
mirror
_list
.el-table
::before
{
.
image
_list
.el-table
::before
{
display
:
none
;
display
:
none
;
}
}
.
mirror
_list
.el-table
{
.
image
_list
.el-table
{
width
:
100%
;
width
:
100%
;
}
}
.
mirror
_list
.el-table__row
:nth-child
(
odd
)
td
{
.
image
_list
.el-table__row
:nth-child
(
odd
)
td
{
background-color
:
#f8f9fd
;
background-color
:
#f8f9fd
;
}
}
</
style
>
</
style
>
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