Commit d95fbd47 by zhangmeng

添加版本类型选择

parent f606dfaf
<template>
<div class="app-container">
<div v-loading.fullscreen.lock="fullscreenLoading" class="app-container">
<el-button type="primary" size="mini" @click="update()">
更新版本
</el-button>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="versionId" label="版本ID" width="280" />
<el-table-column prop="versionName" label="版本描述" width="180" />
<el-table-column prop="versionName" label="版本描述" width="280" />
<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">
<template slot-scope="scope">
<el-button size="small" type="warning" @click="load(scope.row.zipUrl)">下载</el-button>
......@@ -17,11 +20,29 @@
</el-table>
<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-item label="模板描述" prop="typeMenuOrder">
<el-input v-model="temp.typeMenuOrder" />
<el-form-item label="模板描述" prop="versionName">
<el-input v-model="temp.versionName" />
</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-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" />
<div class="el-upload__text">
将文件拖到此处,或
......@@ -61,8 +82,16 @@ export default {
pictureUrl: '',
zipUrl: '',
versionName: '',
versionType: ''
versionType: 'BUG'
},
options: [{
value: 'BUG',
label: 'BUG修复'
}, {
value: 'UPDATE',
label: '版本迭代'
}],
fullscreenLoading: false,
dialogStatus: '',
dialogFormVisible: false,
templateUploadZipUrl: templateUploadZipUrl(),
......@@ -105,6 +134,15 @@ export default {
update() {
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.temp = {
templateId: this.$route.query.templateId,
frameUrl: '',
resourceUrl: '',
pictureUrl: '',
zipUrl: '',
versionName: '',
versionType: 'BUG'
}
},
uploadZipSuccess(e) {
this.fullscreenLoading = false
......@@ -136,14 +174,15 @@ export default {
// }
},
updateVersionHandle() {
this.dialogFormVisible = false
updateVersion(this.temp)
.then(response => {
this.getVersion()
})
/* .catch(() => {
console.log('cathch')
this.listLoading = false
})*/
/* .catch(() => {
console.log('cathch')
this.listLoading = false
})*/
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment