|
@@ -30,6 +30,13 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-dialog :visible.sync="dialog" title="错误记录">
|
|
|
|
+ <el-table border stripe :data="errorList">
|
|
|
|
+ <el-table-column label="错误记录">
|
|
|
|
+ <template v-slot="{ row }">{{ row }}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -66,6 +73,7 @@ export default {
|
|
],
|
|
],
|
|
list: [],
|
|
list: [],
|
|
total: 0,
|
|
total: 0,
|
|
|
|
+ dialog: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -111,12 +119,18 @@ export default {
|
|
// 导入
|
|
// 导入
|
|
async toImport(uri) {
|
|
async toImport(uri) {
|
|
const res = await this.import({ uri });
|
|
const res = await this.import({ uri });
|
|
- this.$checkRes(res, '正在导入,请稍后...');
|
|
|
|
|
|
+ const { data } = res;
|
|
|
|
+ if (data) {
|
|
|
|
+ this.$message.error('导入失败');
|
|
|
|
+ this.dialog = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.success('导入成功');
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 上传成功
|
|
// 上传成功
|
|
uSuccess(response, file, fileList) {
|
|
uSuccess(response, file, fileList) {
|
|
const { uri } = response;
|
|
const { uri } = response;
|
|
- this.$checkRes(response, '上传成功!');
|
|
|
|
|
|
+ this.$checkRes(response, '上传成功!正在导入,请稍后...');
|
|
this.toImport(uri);
|
|
this.toImport(uri);
|
|
},
|
|
},
|
|
// 上传失败
|
|
// 上传失败
|