Commit 4e267028 authored by wanglianghe's avatar wanglianghe

超时时间设置

parent 8caf4567
...@@ -21,6 +21,7 @@ export function uploadFile(data) { ...@@ -21,6 +21,7 @@ export function uploadFile(data) {
return request({ return request({
url: '/infra/file/upload', url: '/infra/file/upload',
method: 'post', method: 'post',
timeout: 60000,
data: data data: data
}) })
} }
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</el-form-item> </el-form-item>
<el-form-item v-if="linkType==2"> <el-form-item v-if="linkType==2">
<el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload"> <el-upload action="#" :http-request="requestUpload" :show-file-list="true" :before-upload="beforeUpload">
<el-button size="small">{{ $t('上传') }}<i class="el-icon-upload el-icon--right"></i> <el-button size="small">{{ $t('上传') }}<i class="el-icon-upload el-icon--right"></i>
</el-button> </el-button>
</el-upload> </el-upload>
...@@ -223,6 +223,7 @@ export default { ...@@ -223,6 +223,7 @@ export default {
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.linkType = 1;
this.form = { this.form = {
id: undefined, id: undefined,
appUrl: undefined, appUrl: undefined,
...@@ -230,7 +231,6 @@ export default { ...@@ -230,7 +231,6 @@ export default {
appVersion: undefined, appVersion: undefined,
versionCode: undefined, versionCode: undefined,
forceUpdate: undefined, forceUpdate: undefined,
linkType:1,
desp: undefined, desp: undefined,
}; };
this.resetForm("form"); this.resetForm("form");
...@@ -251,6 +251,7 @@ export default { ...@@ -251,6 +251,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
// console.log(this.form);
this.title = "添加app版本管理"; this.title = "添加app版本管理";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
...@@ -259,7 +260,7 @@ export default { ...@@ -259,7 +260,7 @@ export default {
const id = row.id; const id = row.id;
getVersion(id).then(response => { getVersion(id).then(response => {
this.form = response.data; this.form = response.data;
this.form.linkType = 1; this.linkType = 1;
this.open = true; this.open = true;
this.title = "修改app版本管理"; this.title = "修改app版本管理";
}); });
...@@ -308,8 +309,9 @@ export default { ...@@ -308,8 +309,9 @@ export default {
// } else { // } else {
//上传 //上传
let formData = new FormData(); let formData = new FormData();
// console.log(file);
formData.append("file", file); formData.append("file", file);
formData.append("path", this.uuid()); formData.append("path", this.uuid() + "/" + file.name);
uploadFile(formData).then(response => { uploadFile(formData).then(response => {
this.$set(this.form, 'appUrl', response.data); this.$set(this.form, 'appUrl', response.data);
// this.form.img = response.data; // this.form.img = response.data;
......
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 to comment