导出删除数据

This commit is contained in:
2025-08-08 14:38:06 +08:00
parent 9af9f1f166
commit fd9cf29780
8 changed files with 288 additions and 45 deletions

View File

@@ -43,13 +43,20 @@
<el-input v-model="queryParams.fllowernumMax" :placeholder="$t('employee.max')" clearable
@keyup.enter="handleQuery" class="!w-115px" />
</el-form-item>
<el-form-item :label="$t('employee.hostsCountry')" prop="country">
<el-select v-model="queryParams.country" :placeholder="$t('employee.placeHostsCountry')" clearable
class="!w-240px">
<el-form-item :label="t('newHosts.hostsCountry')" prop="region">
<el-select v-model="queryParams.region" :placeholder="t('newHosts.placeHostsCountry')" clearable
class="!w-240px" @change="changeCountry(queryParams.region)">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.COUNTRY_GROUP)" :key="dict.value"
:label="$t(dict.label)" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="t('newHosts.hostsCountryinfo')" prop="country">
<el-select v-model="queryParams.country" :placeholder="t('newHosts.placeHostsCountry')" clearable
class="!w-240px">
<el-option v-for="dict in countryinfoList" :key="dict.id" :label="dict.countryName"
:value="dict.countryName" />
</el-select>
</el-form-item>
<el-form-item :label="$t('employee.hostsKind')" prop="hostsKind">
<el-input v-model="queryParams.hostsKind" :placeholder="$t('employee.placeHostsKind')" clearable
@keyup.enter="handleQuery" class="!w-240px" />
@@ -154,7 +161,7 @@
</el-table>
<!-- 移动端使用卡片列表 -->
<div v-else v-infinite-scroll="loadList">
<div v-else>
<div v-for="(item, index) in list" :key="index" class="mobile-card">
<div class="card-row" style="color:green;">
<b>{{ $t('employee.hostsId') }}</b><span @click="openHtml(item, item.hostsId)"
@@ -182,6 +189,9 @@
</div>
</div>
</div>
<MobilePagination v-if="isMobile" :page="queryParams.pageNo" :limit="queryParams.pageSize" :total="total"
@update:page="val => queryParams.pageNo = val" @load="loadList" @loadPre="loadpreviousList" />
<!-- PC 显示分页移动端隐藏 -->
<Pagination v-if="!isMobile" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@@ -214,8 +224,9 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { EmployeeHostsApi, EmployeeHostsVO } from '@/api/server/employeehosts'
import EmployeeHostsForm from './EmployeeHostsForm.vue'
import { getAllocation, getSimpleUserList } from '@/api/system/user'
import { getAllocation, getSimpleUserList, getCountry } from '@/api/system/user'
import { useCache } from '@/hooks/web/useCache'
import MobilePagination from '@/components/MobilePagination.vue'
const { wsCache } = useCache()
@@ -230,7 +241,7 @@ const list = ref<EmployeeHostsVO[]>([]) // 列表的数据
const total = ref(0) // 列表的总页数
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
pageSize: 20,
hostsId: undefined,
hostsLevel: undefined,
onlineFansMin: undefined,
@@ -244,6 +255,7 @@ const queryParams = reactive({
invitationType: undefined,
yesterdayCoins: undefined,
country: undefined,
region: undefined,
hostsKind: undefined,
isAssigned: undefined,
createTime: [],
@@ -262,6 +274,8 @@ let allocationUserList = ref([
]) //选中的分配用户
let selectHostList = ref([]) //选中的主播列表
let allocationUser = ref() //选中的分配用户
let countryinfoList = ref([])
/** 查询列表pc直接赋值 */
const getList = async () => {
loading.value = true
@@ -380,7 +394,14 @@ function openHtml(item, id) {
const loadList = () => {
if (queryParams.pageNo < Math.ceil(total.value / queryParams.pageSize)) {
queryParams.pageNo++
getListPhone()
getList()
}
}
const loadpreviousList = () => {
if (queryParams.pageNo > 1) {
queryParams.pageNo--
getList()
}
}
function formSuccess(data, index) {
@@ -480,7 +501,13 @@ onMounted(() => {
})
function changeCountry(region) {
console.log(region)
getCountry(region).then((res) => {
countryinfoList.value = res
})
}
// /** 初始化 **/
// onMounted(() => {
// getList()