|
@@ -16,6 +16,7 @@ import SearchForm from './components/SearchForm.vue'
|
|
|
import type { TAgent } from '@/types/role'
|
|
import type { TAgent } from '@/types/role'
|
|
|
import { anycallPage, updateTopFlag, type TRole } from '@/api/modules/anycallService'
|
|
import { anycallPage, updateTopFlag, type TRole } from '@/api/modules/anycallService'
|
|
|
import { formatDateGeneral } from '@/utils'
|
|
import { formatDateGeneral } from '@/utils'
|
|
|
|
|
+import { toast } from 'vue-sonner'
|
|
|
|
|
|
|
|
const tableRef = ref()
|
|
const tableRef = ref()
|
|
|
|
|
|
|
@@ -32,7 +33,31 @@ const editCallingsFormVisible = ref(false)
|
|
|
|
|
|
|
|
const importedResultDialogVisible = ref(false)
|
|
const importedResultDialogVisible = ref(false)
|
|
|
const importedFile = ref<UploadFile | null>(null)
|
|
const importedFile = ref<UploadFile | null>(null)
|
|
|
-const importedResult = ref('')
|
|
|
|
|
|
|
+const importedResult = ref<{name: string, msg: string}[]>([
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+ // {name: 'test1.csv', msg: '成功'},
|
|
|
|
|
+])
|
|
|
// 搜索参数
|
|
// 搜索参数
|
|
|
const searchParams = ref({
|
|
const searchParams = ref({
|
|
|
// name: '',
|
|
// name: '',
|
|
@@ -94,9 +119,13 @@ const handleRecommend = async (id: string, topFlag: boolean) => {
|
|
|
function handleUploadSuccess(res:any, file: any) {
|
|
function handleUploadSuccess(res:any, file: any) {
|
|
|
console.log(res, file)
|
|
console.log(res, file)
|
|
|
if(res.code === 0){
|
|
if(res.code === 0){
|
|
|
- importedResult.value = res.data
|
|
|
|
|
|
|
+ importedResult.value = res.data as {name: string, msg: string}[]
|
|
|
importedResultDialogVisible.value = true
|
|
importedResultDialogVisible.value = true
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
|
|
+ toast.error('Error', {
|
|
|
|
|
+ description: res.msg || '导入失败',
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -146,7 +175,7 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<div class="absolute-container">
|
|
<div class="absolute-container">
|
|
|
- <div class="p-4 pb-0 bg-white">
|
|
|
|
|
|
|
+ <div class="p-4 pb-0 bg-white dark-bg-black/50">
|
|
|
<SearchForm v-model="searchParams" :loading="loading" @search="handleSearch" @reset="handleReset" />
|
|
<SearchForm v-model="searchParams" :loading="loading" @search="handleSearch" @reset="handleReset" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -239,9 +268,11 @@ onMounted(async () => {
|
|
|
<ElDialog title="导入结果" v-model="importedResultDialogVisible" align-center
|
|
<ElDialog title="导入结果" v-model="importedResultDialogVisible" align-center
|
|
|
width="800" :z-index="2000" :close-on-click-modal="false">
|
|
width="800" :z-index="2000" :close-on-click-modal="false">
|
|
|
<div class="max-h-200 overflow-y-auto leading-6">
|
|
<div class="max-h-200 overflow-y-auto leading-6">
|
|
|
- {{ importedResult }}
|
|
|
|
|
|
|
+ <el-table :data="importedResult" stripe style="width: 100%;" height="450">
|
|
|
|
|
+ <el-table-column prop="name" label="name" width="180" />
|
|
|
|
|
+ <el-table-column prop="msg" label="message" min-width="180" />
|
|
|
|
|
+ </el-table>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
</ElDialog>
|
|
</ElDialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|