Commit e3d26b2c by liupeng

修改了上传文件

parent 10ab3777
......@@ -273,7 +273,7 @@ export default {
created() {},
methods: {
add() {
console.log(123);
this.$router.push('addRwbd')
},
signFor(data) {
let params = new FormData();
......@@ -300,6 +300,7 @@ export default {
},
submitFeedback() {
let params = new FormData();
console.log(this.feedbackInfo.files);
params.append('bdrwbh', this.feedbackInfo.bdrwbh);
params.append('fkjgJyqk', this.feedbackInfo.fkjgJyqk);
params.append('files', this.feedbackInfo.files);
......@@ -309,7 +310,6 @@ export default {
confirmButtonText: "确定",
type: "success",
callback: () => {
loading.close();
},
});
} else {
......@@ -320,6 +320,30 @@ export default {
//upload组件相关方法
handleChange(file, fileList) {
console.log(file, fileList);
this.feedbackInfo.files = fileList
// var self = this;
// let isLt1M = "";
// isLt1M = file.raw.size / 1024 / 1024 < 101;
// if (self.fileLists[item.id].length == 0) {
// self.$set(self.fileLists, item.id, []);
// }
// if (isLt1M) {
// this.fileLists[item.id].push(file);
// this.$refs.formLabelAlign.clearValidate();
// } else {
// this.$confirm("上传文件不能超过100M", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// }).then(() => {
// fileList.forEach((item, index) => {
// if (file.raw.uid == item.uid) {
// debugger;
// fileList.splice(index, 1);
// }
// });
// });
// }
},
handleExceed(file, fileList) {
this.$confirm("上传文件不能超过100M", "提示", {
......
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