手持版本管理

yangwl
zhaoxiaolin 1 year ago
parent e369da6d03
commit de268fca27

@ -55,12 +55,12 @@ export default {
// (MB)
fileSize: {
type: Number,
default: 5,
default: 50,
},
// , ['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "docx", "xlsx","ppt", "txt", "pdf",'png', 'jpg', 'jpeg'],
default: () => ["doc", "xls", "docx", "xlsx","ppt", "txt", "pdf",'png', 'jpg', 'jpeg','apk'],
},
//
isShowTip: {

@ -101,11 +101,11 @@
<script>
import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial } from "@/api/quality/material";
import Userbind from "./UserBind.vue";
//import Userbind from "./UserBind.vue";
export default {
name: "Material",
components: {Userbind},
//components: {Userbind},
data() {
return {
//

@ -110,10 +110,9 @@
<el-form-item label="文件名称" prop="fileName">
<el-input v-model="form.fileName" placeholder="请输入文件名称" />
</el-form-item>
<!--
<el-form-item label="文件地址" prop="fileAddress">
<el-input v-model="form.fileAddress" placeholder="请输入文件地址" />
</el-form-item>-->
<el-form-item label="文件地址" prop="fileList">
<FileUpload v-model="form.fileList"/>
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
@ -165,9 +164,11 @@ export default {
attr2: null,
attr3: null,
attr4: null,
fileList:''
},
//
form: {},
fileList:[],
//
rules: {
fileName: [
@ -244,12 +245,30 @@ export default {
const id = row.id || this.ids
getFile(id).then(response => {
this.form = response.data;
/**
if(response.data.files != null){
var newFiles = [];
response.data.files.forEach(item =>{
var newfile = {};
newfile.name = item.fileName;
newfile.url = item.fileAddress;
newFiles.push(newfile);
})
this.form.fileList = newFiles;
}
**/
this.open = true;
this.title = "修改手持apk版本控制";
});
},
/** 提交按钮 */
submitForm() {
if(Array.isArray(this.form.fileList)){
this.form.fileList = this.listToString(this.form.fileList);
}
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {

Loading…
Cancel
Save