|
@@ -52,7 +52,7 @@
|
|
|
</template>
|
|
|
<script setup lang="tsx" name="importFile">
|
|
|
import { onMounted, ref } from 'vue';
|
|
|
-import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
+import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
|
|
|
import { fileImport, fileTemplateDownload, fileTemplateType } from '@/api/public/file';
|
|
|
const importTypeList = ref<any[]>([]);
|
|
|
const btnLoading = ref<boolean>(false);
|
|
@@ -101,7 +101,12 @@ const httpRequest = async (file: any) => {
|
|
|
try {
|
|
|
const { result } = await fileImport(fd);
|
|
|
loading.value = false;
|
|
|
- ElMessage.success('导入完成');
|
|
|
+ ElNotification({
|
|
|
+ title: '导入完成',
|
|
|
+ message: `导入条数:${result.count}条,添加成功:${result.addCount}条,修改成功:${result.modifyCount}条,导入失败:${result.errorCount}条`,
|
|
|
+ type: 'success',
|
|
|
+ duration: 1000 * 10,
|
|
|
+ });
|
|
|
resultObj.value = result;
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
@@ -120,6 +125,6 @@ onMounted(() => {
|
|
|
margin-top: 20px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- flex-wrap: wrap;
|
|
|
+ flex-wrap: wrap;
|
|
|
}
|
|
|
</style>
|