|
|
@@ -137,14 +137,19 @@
|
|
|
正常</a-tag>
|
|
|
|
|
|
</template>
|
|
|
+ <template #is_banned="{ record }">
|
|
|
+ <a-tag v-if="record.is_banned" size="small" bordered color="red">
|
|
|
+ 封号
|
|
|
+ </a-tag>
|
|
|
+ </template>
|
|
|
<template #status="{ record }">
|
|
|
- <a-tag v-if="record.status" bordered color="green" @click="changeStatus(record.id, false)">
|
|
|
+ <a-tag v-if="record.status" bordered color="green" @click="changeStatus(record, false)">
|
|
|
<template #icon>
|
|
|
<icon-check />
|
|
|
</template>
|
|
|
在线
|
|
|
</a-tag>
|
|
|
- <a-tag v-else bordered color="" @click="changeStatus(record.id, true)">
|
|
|
+ <a-tag v-else bordered color="" @click="changeStatus(record, true)">
|
|
|
<template #icon>
|
|
|
<icon-stop />
|
|
|
</template>
|
|
|
@@ -310,7 +315,7 @@ const size = ref<SizeProps>('mini');
|
|
|
|
|
|
const basePagination: Pagination = {
|
|
|
current: 1,
|
|
|
- pageSize: 50,
|
|
|
+ pageSize: 500,
|
|
|
};
|
|
|
const pagination = reactive({
|
|
|
...basePagination,
|
|
|
@@ -347,6 +352,11 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
slotName: 'name',
|
|
|
width: 200,
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '',
|
|
|
+ slotName: 'is_banned',
|
|
|
+ width: 40,
|
|
|
+ },
|
|
|
{
|
|
|
title: '工作时间',
|
|
|
dataIndex: 'time_range',
|
|
|
@@ -433,7 +443,7 @@ const statusOptions = computed<SelectOptionData[]>(() => [
|
|
|
const fetchData = async (
|
|
|
params: TkPoolParams = {
|
|
|
current: 1,
|
|
|
- pageSize: 50,
|
|
|
+ pageSize: 500,
|
|
|
sort: 'status',
|
|
|
order: 'descending',
|
|
|
getTotal: true,
|
|
|
@@ -463,13 +473,21 @@ const billView = async (data: TkPoolRecord) => {
|
|
|
router.push({ name: 'taobao_bill_dailys', query: { name: data.company } });
|
|
|
};
|
|
|
|
|
|
-const changeStatus = async (id: number, val: any) => {
|
|
|
+const changeStatus = async (data: TkPoolRecord, val: any) => {
|
|
|
+
|
|
|
+ if (data.is_banned && val) {
|
|
|
+ Message.error('被封账号,不能上线!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const args = {
|
|
|
- id,
|
|
|
+ id: data.id,
|
|
|
name: 'status',
|
|
|
val
|
|
|
} as TkUpdateAccountModel;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
setLoading(true);
|
|
|
|
|
|
try {
|