手持版本管理

yangwl
zhaoxiaolin 1 year ago
parent e369da6d03
commit de268fca27

@ -55,12 +55,12 @@ export default {
// (MB) // (MB)
fileSize: { fileSize: {
type: Number, type: Number,
default: 5, default: 50,
}, },
// , ['png', 'jpg', 'jpeg'] // , ['png', 'jpg', 'jpeg']
fileType: { fileType: {
type: Array, 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: { isShowTip: {

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

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

Loading…
Cancel
Save