|
|
@@ -31,7 +31,7 @@
|
|
31
|
31
|
</el-row>
|
|
32
|
32
|
<el-row>
|
|
33
|
33
|
<el-form-item :span="24" label="案件压缩包上传:" prop="upload">
|
|
34
|
|
- <el-upload class="upload-demo" ref="uploadZipBatch" :limit="1" accept=".zip" :headers="upload.headers"
|
|
|
34
|
+ <el-upload class="upload-demo" ref="uploadZipBatch" :limit="1" accept=".zip" :headers="upload.headers" :on-error="onError"
|
|
35
|
35
|
:action="upload.url" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress"
|
|
36
|
36
|
:on-success="handleFileSuccess" :auto-upload="false" :data="paramsData" drag>
|
|
37
|
37
|
<i class="el-icon-upload"></i>
|
|
|
@@ -50,7 +50,7 @@
|
|
50
|
50
|
</el-row>
|
|
51
|
51
|
</el-form>
|
|
52
|
52
|
<div slot="footer" class="dialog-footer">
|
|
53
|
|
- <el-button type="primary" @click="submitForm" class="endbutton"><span>确 定</span></el-button>
|
|
|
53
|
+ <el-button type="primary" @click="submitForm" class="endbutton" :loading="loadingSubmit"><span>确 定</span></el-button>
|
|
54
|
54
|
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
|
|
55
|
55
|
</div>
|
|
56
|
56
|
</el-dialog>
|
|
|
@@ -70,6 +70,7 @@ export default {
|
|
70
|
70
|
form: {},
|
|
71
|
71
|
fileList: [],
|
|
72
|
72
|
templateList: [],
|
|
|
73
|
+ loadingSubmit:false,
|
|
73
|
74
|
rules: {
|
|
74
|
75
|
// upload: [
|
|
75
|
76
|
// { required: true, message: "案件压缩包不能为空", trigger: "blur" },
|
|
|
@@ -111,10 +112,14 @@ export default {
|
|
111
|
112
|
},
|
|
112
|
113
|
methods: {
|
|
113
|
114
|
submitForm() {
|
|
|
115
|
+
|
|
114
|
116
|
this.paramsData.templateId = this.form.templateId;
|
|
115
|
117
|
this.$refs["form"].validate((valid) => {
|
|
|
118
|
+ this.loadingSubmit = true
|
|
116
|
119
|
if (valid) {
|
|
|
120
|
+
|
|
117
|
121
|
this.$refs.uploadZipBatch.submit();
|
|
|
122
|
+
|
|
118
|
123
|
}
|
|
119
|
124
|
})
|
|
120
|
125
|
},
|
|
|
@@ -159,6 +164,7 @@ export default {
|
|
159
|
164
|
this.upload.isUploading = false;
|
|
160
|
165
|
this.$refs.uploadZipBatch.clearFiles();
|
|
161
|
166
|
if (response.code == 200) {
|
|
|
167
|
+ this.loadingSubmit = false
|
|
162
|
168
|
this.$alert(
|
|
163
|
169
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
164
|
170
|
response.msg +
|
|
|
@@ -166,7 +172,9 @@ export default {
|
|
166
|
172
|
"导入结果",
|
|
167
|
173
|
{ dangerouslyUseHTMLString: true }
|
|
168
|
174
|
)
|
|
|
175
|
+ this.$emit("getcaseApply", this.queryParams);
|
|
169
|
176
|
} else {
|
|
|
177
|
+ this.loadingSubmit = false
|
|
170
|
178
|
this.$alert(
|
|
171
|
179
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
172
|
180
|
"导入压缩失败" +
|
|
|
@@ -176,8 +184,11 @@ export default {
|
|
176
|
184
|
)
|
|
177
|
185
|
}
|
|
178
|
186
|
|
|
179
|
|
- this.getcaseApply(this.queryParams);
|
|
|
187
|
+
|
|
180
|
188
|
},
|
|
|
189
|
+ onError(){
|
|
|
190
|
+ this.loadingSubmit = false
|
|
|
191
|
+ }
|
|
181
|
192
|
},
|
|
182
|
193
|
};
|
|
183
|
194
|
</script>
|