|
|
|
@ -199,7 +199,6 @@
|
|
|
|
|
>
|
|
|
|
|
<el-button slot="trigger" size="small" type="primary" :disabled="uploadDisabled">选取文件
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>-->
|
|
|
|
|
<div slot="tip" class="el-upload__tip" v-if="formData.path==''">只能上传 jasper 文件,且不超过 2
|
|
|
|
|
MB
|
|
|
|
|
</div>
|
|
|
|
@ -613,24 +612,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
submitUpload() {
|
|
|
|
|
if (this.$refs.uploadJasper.uploadFiles.length < 1 && !this.uploadDisabled) {
|
|
|
|
|
this.$message.warning(`请选择jasper文件`);
|
|
|
|
|
}
|
|
|
|
|
if (this.$refs.uploadJrxml.uploadFiles.length < 1 && !this.uploadDisabled) {
|
|
|
|
|
this.$message.warning(`请选择jasper文件`);
|
|
|
|
|
}
|
|
|
|
|
this.$refs["dataForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.submitTemplate();
|
|
|
|
|
|
|
|
|
|
// if (!this.uploadDisabled) {
|
|
|
|
|
// this.$refs.uploadJasper.submit();
|
|
|
|
|
// this.$refs.uploadJrxml.submit();
|
|
|
|
|
// } else {
|
|
|
|
|
// this.submitTemplate();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
uploadHandleExceed(files, fileList) {
|
|
|
|
|
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
|
|
|
|
|