|
@@ -4,9 +4,9 @@
|
|
|
<el-button type="primary" size="small" :loading="btnLoading" @click="submitForm">提 交</el-button>
|
|
|
<el-button size="small" @click="init">重 置</el-button>
|
|
|
</div>
|
|
|
- <div class="form_center">
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px">
|
|
|
- <el-form-item label="版本名称:" prop="versionName">
|
|
|
+ <div class="form_center" >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" :class="model == 'detail'?'pointer_events_none':''">
|
|
|
+ <el-form-item label="版本名称:" prop="versionName" >
|
|
|
<el-input v-model="form.versionName" placeholder="请输入版本名称" maxlength="20" />
|
|
|
</el-form-item>
|
|
|
|
|
@@ -24,10 +24,16 @@
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="上传文件:" class="margin-bottom_0">
|
|
|
- <myUpload :file-list="(form.systemFile && form.systemFile.guid)?[form.systemFile]:[]" @on-change="onchangeFile" @on-remove="onRemove" :multiple="false" :limit="1"
|
|
|
+ <el-form-item label="上传文件:" class="margin-bottom_0" >
|
|
|
+ <myUpload v-if="model != 'detail'" :file-list="(form.systemFile && form.systemFile.guid)?[form.systemFile]:[]" @on-change="onchangeFile" @on-remove="onRemove" :multiple="false" :limit="1"
|
|
|
style="height: 185px;" :autoUpload="true">
|
|
|
</myUpload>
|
|
|
+ <div v-else-if="form.systemFile && form.systemFile.guid" style="display:flex;align-items:center;justify-content:space-between;">
|
|
|
+ <div>
|
|
|
+ {{form.systemFile.originalName }}
|
|
|
+ </div>
|
|
|
+ <el-button size="small" type="text" icon="el-icon-download" @click="downLoad(form)" style="font-size:16px;pointer-events:all !important;">下载</el-button>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
@@ -76,6 +82,7 @@
|
|
|
import funTable from '../functionTable.vue';
|
|
|
import functionData from '../mixins/functionData';
|
|
|
import commonData from '../mixins/commonData';
|
|
|
+import { downLoad2 } from '@/utils';
|
|
|
const currentForm = {
|
|
|
id:null,
|
|
|
versionName:null,
|
|
@@ -137,6 +144,14 @@ export default {
|
|
|
this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
+ //下载
|
|
|
+ downLoad(row){
|
|
|
+ if(!row.systemFile || !row.systemFile.guid){
|
|
|
+ this.$message.warning('该版本没有文件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ downLoad2(row.systemFile.guid,row.systemFile.originalName)
|
|
|
+ },
|
|
|
//初始化当前页面
|
|
|
async init(){
|
|
|
if(this.model == 'add'){
|