手机+电脑批量删除
This commit is contained in:
@@ -4,9 +4,9 @@ NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
# VITE_BASE_URL='http://192.168.1.144:48080'
|
||||
VITE_BASE_URL='http://192.168.1.144:48080'
|
||||
# VITE_BASE_URL='http://47.79.98.113:48080'
|
||||
VITE_BASE_URL='https://backstageapi.yolozs.com'
|
||||
# VITE_BASE_URL='https://backstageapi.yolozs.com'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
||||
@@ -116,18 +116,21 @@
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> {{ $t('employee.reset') }}
|
||||
</el-button>
|
||||
<el-button @click="exportAi">
|
||||
<el-button v-if="!isMobile" @click="exportAi">
|
||||
<Icon icon="ep:copy-document" class="mr-5px" /> {{ $t('employee.exportAi') }}
|
||||
</el-button>
|
||||
<el-button type="success" @click="handleExport" :loading="exportLoading">
|
||||
<el-button v-if="!isMobile" type="success" @click="handleExport" :loading="exportLoading">
|
||||
<Icon icon="ep:copy-document" class="mr-5px" /> {{ t('newHosts.export') }}
|
||||
</el-button>
|
||||
<!-- <el-button type="success" plain @click="handleExport" v-hasPermi="['server:new-hosts:export']">
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('newHosts.export') }}
|
||||
</el-button> -->
|
||||
<el-button type="danger" @click="handleDeleteList">
|
||||
<el-button v-if="!isMobile" type="danger" @click="handleDeleteList">
|
||||
<Icon icon="ep:delete" class="mr-5px" /> 批量删除
|
||||
</el-button>
|
||||
<el-button v-else type="danger" @click="handleDeletePageList">
|
||||
<Icon icon="ep:delete" class="mr-5px" /> 删除本页
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
@@ -259,9 +262,9 @@
|
||||
<div class="card-row"><b>{{ $t('employee.updateTime') }}:</b>{{ formatTimestamp(item.updateTime) }}</div>
|
||||
<div class="card-row action-row">
|
||||
<el-button link type="primary" @click="openForm('update', item.id, index)">{{ $t('employee.edit')
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(item.id)">{{ $t('employee.delete')
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -342,6 +345,10 @@ let allocationUserList = ref([
|
||||
let selectHostList = ref([]) //选中的主播列表
|
||||
let allocationUser = ref() //选中的分配用户
|
||||
let countryinfoList = ref([])
|
||||
|
||||
/** 批量删除按钮操作 */
|
||||
const checkedIds = ref<number[]>([])
|
||||
const checkedPageIds = ref<number[]>([])
|
||||
/** 查询列表pc直接赋值 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -349,6 +356,8 @@ const getList = async () => {
|
||||
const data = await EmployeeHostsApi.getEmployeeHostsPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
checkedPageIds.value = data.list.map((row) => row.id)
|
||||
console.log(checkedPageIds.value)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -419,7 +428,18 @@ const handleDeleteList = async () => {
|
||||
await getList()
|
||||
} catch { }
|
||||
}
|
||||
|
||||
/** 删除本页按钮操作 */
|
||||
const handleDeletePageList = async () => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await EmployeeHostsApi.deleteEmployeeHostsList(checkedPageIds.value)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch { }
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
@@ -501,8 +521,7 @@ function formatTimestamp(milliseconds) {
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
/** 批量删除按钮操作 */
|
||||
const checkedIds = ref<number[]>([])
|
||||
|
||||
//分配按钮操作
|
||||
const handleSelectionChange = (val) => {
|
||||
selectHostList.value = val
|
||||
|
||||
Reference in New Issue
Block a user