Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d95fbd47
authored
Jan 07, 2020
by
zhangmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加版本类型选择
parent
f606dfaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
12 deletions
+51
-12
src/views/template/template-version.vue
+51
-12
No files found.
src/views/template/template-version.vue
View file @
d95fbd47
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
v-loading
.
fullscreen
.
lock=
"fullscreenLoading"
class=
"app-container"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"update()"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"update()"
>
更新版本
更新版本
</el-button>
</el-button>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"versionId"
label=
"版本ID"
width=
"280"
/>
<el-table-column
prop=
"versionId"
label=
"版本ID"
width=
"280"
/>
<el-table-column
prop=
"versionName"
label=
"版本描述"
width=
"
1
80"
/>
<el-table-column
prop=
"versionName"
label=
"版本描述"
width=
"
2
80"
/>
<el-table-column
prop=
"versionNum"
label=
"版本号"
/>
<el-table-column
prop=
"versionNum"
label=
"版本号"
/>
<el-table-column
prop=
"versionState"
label=
"版本状态"
/>
<el-table-column
label=
"版本状态"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
versionState
==
'YES'
?
'正在使用版本'
:
'旧版本'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"100"
>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"small"
type=
"warning"
@
click=
"load(scope.row.zipUrl)"
>
下载
</el-button>
<el-button
size=
"small"
type=
"warning"
@
click=
"load(scope.row.zipUrl)"
>
下载
</el-button>
...
@@ -17,11 +20,29 @@
...
@@ -17,11 +20,29 @@
</el-table>
</el-table>
<el-dialog
title=
"更新模板包"
:visible
.
sync=
"dialogFormVisible"
>
<el-dialog
title=
"更新模板包"
:visible
.
sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:model=
"temp"
label-position=
"left"
label-width=
"70px"
style=
"width: 400px; margin-left:50px;"
>
<el-form
ref=
"dataForm"
:model=
"temp"
label-position=
"left"
label-width=
"70px"
style=
"width: 400px; margin-left:50px;"
>
<el-form-item
label=
"模板描述"
prop=
"
typeMenuOrder
"
>
<el-form-item
label=
"模板描述"
prop=
"
versionName
"
>
<el-input
v-model=
"temp.
typeMenuOrder
"
/>
<el-input
v-model=
"temp.
versionName
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"版本类型"
prop=
"versionType"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"temp.versionType"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-form-item>
<el-form-item
label=
"上传模板包"
>
<el-form-item
label=
"上传模板包"
>
<el-upload
class=
"upload-demo"
drag
name=
"resource"
accept=
".zip"
:show-file-list=
"false"
:on-success=
"uploadZipSuccess"
:on-progress=
"onProgress"
:action=
"templateUploadZipUrl"
>
<el-upload
class=
"upload-demo"
drag
name=
"resource"
accept=
".zip"
:show-file-list=
"false"
:on-success=
"uploadZipSuccess"
:on-progress=
"onProgress"
:action=
"templateUploadZipUrl"
>
<i
class=
"el-icon-upload"
/>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
将文件拖到此处,或
...
@@ -61,8 +82,16 @@ export default {
...
@@ -61,8 +82,16 @@ export default {
pictureUrl
:
''
,
pictureUrl
:
''
,
zipUrl
:
''
,
zipUrl
:
''
,
versionName
:
''
,
versionName
:
''
,
versionType
:
''
versionType
:
'
BUG
'
},
},
options
:
[{
value
:
'BUG'
,
label
:
'BUG修复'
},
{
value
:
'UPDATE'
,
label
:
'版本迭代'
}],
fullscreenLoading
:
false
,
dialogStatus
:
''
,
dialogStatus
:
''
,
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
templateUploadZipUrl
:
templateUploadZipUrl
(),
templateUploadZipUrl
:
templateUploadZipUrl
(),
...
@@ -105,6 +134,15 @@ export default {
...
@@ -105,6 +134,15 @@ export default {
update
()
{
update
()
{
this
.
dialogStatus
=
'create'
this
.
dialogStatus
=
'create'
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
this
.
temp
=
{
templateId
:
this
.
$route
.
query
.
templateId
,
frameUrl
:
''
,
resourceUrl
:
''
,
pictureUrl
:
''
,
zipUrl
:
''
,
versionName
:
''
,
versionType
:
'BUG'
}
},
},
uploadZipSuccess
(
e
)
{
uploadZipSuccess
(
e
)
{
this
.
fullscreenLoading
=
false
this
.
fullscreenLoading
=
false
...
@@ -136,14 +174,15 @@ export default {
...
@@ -136,14 +174,15 @@ export default {
// }
// }
},
},
updateVersionHandle
()
{
updateVersionHandle
()
{
this
.
dialogFormVisible
=
false
updateVersion
(
this
.
temp
)
updateVersion
(
this
.
temp
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
getVersion
()
this
.
getVersion
()
})
})
/* .catch(() => {
/* .catch(() => {
console.log('cathch')
console.log('cathch')
this.listLoading = false
this.listLoading = false
})*/
})*/
}
}
}
}
}
}
...
...
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