|
|
@ -40,7 +40,6 @@ const formatTime = (val) => val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : '' |
|
|
/* |
|
|
/* |
|
|
====================数据================================= |
|
|
====================数据================================= |
|
|
*/ |
|
|
*/ |
|
|
//这是获取用户信息的接口 |
|
|
|
|
|
const adminData = ref({}) |
|
|
const adminData = ref({}) |
|
|
// 充值明细表格 |
|
|
// 充值明细表格 |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
|
@ -83,7 +82,8 @@ const getGift = async function () { |
|
|
|
|
|
|
|
|
// 频道列表 |
|
|
// 频道列表 |
|
|
const channels = ref([]) |
|
|
const channels = ref([]) |
|
|
// 获取频道列表的方法 |
|
|
|
|
|
|
|
|
const showChannelFilter = ref(false) |
|
|
|
|
|
|
|
|
const getChannel = async function () { |
|
|
const getChannel = async function () { |
|
|
try { |
|
|
try { |
|
|
const result = await request({ |
|
|
const result = await request({ |
|
|
@ -103,6 +103,26 @@ const getChannel = async function () { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const getRoleChannel = async function () { |
|
|
|
|
|
try { |
|
|
|
|
|
if (!adminData.value || !adminData.value.roleId) { |
|
|
|
|
|
showChannelFilter.value = true |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const result = await request({ |
|
|
|
|
|
url: '/beanConsume/getRoleChannel', |
|
|
|
|
|
data: { roleId: adminData.value.roleId } |
|
|
|
|
|
}) |
|
|
|
|
|
const data = result.data ?? result |
|
|
|
|
|
const channelName = typeof data === 'string' ? data : data.channelName |
|
|
|
|
|
const allLabel = t('common.all') |
|
|
|
|
|
showChannelFilter.value = channelName === allLabel || channelName === '全部' |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.log('请求角色频道失败', error) |
|
|
|
|
|
showChannelFilter.value = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 抽离类型选项到响应式数组 |
|
|
// 抽离类型选项到响应式数组 |
|
|
const consumeTypes = ref([ |
|
|
const consumeTypes = ref([ |
|
|
{label: t('consume.consumeTypes.1'), value: 1}, |
|
|
{label: t('consume.consumeTypes.1'), value: 1}, |
|
|
@ -402,10 +422,11 @@ const handleCurrentChange = function (val) { |
|
|
|
|
|
|
|
|
onMounted(async function () { |
|
|
onMounted(async function () { |
|
|
await getAdminData() |
|
|
await getAdminData() |
|
|
await selectLiveBy() |
|
|
|
|
|
|
|
|
await getRoleChannel() |
|
|
await getDept() |
|
|
await getDept() |
|
|
await getGift() |
|
|
|
|
|
|
|
|
await selectLiveBy() |
|
|
await getChannel() |
|
|
await getChannel() |
|
|
|
|
|
await getGift() |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -538,7 +559,7 @@ const getTagText = (state) => { |
|
|
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item"/> |
|
|
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item"/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="selectRow" style="width: 14vw;"> |
|
|
|
|
|
|
|
|
<div class="selectRow" style="min-width: 14vw;"> |
|
|
<el-text class="text">{{ t('common.giftName') }}:</el-text> |
|
|
<el-text class="text">{{ t('common.giftName') }}:</el-text> |
|
|
<el-select class="selectContent" v-model="beanConsumeLive.gift" :placeholder="t('common.giftNamePlaceholder')" clearable |
|
|
<el-select class="selectContent" v-model="beanConsumeLive.gift" :placeholder="t('common.giftNamePlaceholder')" clearable |
|
|
filterable |
|
|
filterable |
|
|
@ -546,7 +567,7 @@ const getTagText = (state) => { |
|
|
<el-option v-for="(item, index) in gifts" :key="index" :label="item" :value="item"/> |
|
|
<el-option v-for="(item, index) in gifts" :key="index" :label="item" :value="item"/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="selectRow" style="min-width: 12vw;"> |
|
|
|
|
|
|
|
|
<div class="selectRow" style="min-width: 12vw;" v-if="showChannelFilter"> |
|
|
<el-text class="textB" size="large">{{ t('common.channel') }}:</el-text> |
|
|
<el-text class="textB" size="large">{{ t('common.channel') }}:</el-text> |
|
|
<el-select class="selectContent" v-model="beanConsumeLive.liveChannel" :placeholder="t('common.channelPlaceholder')" clearable |
|
|
<el-select class="selectContent" v-model="beanConsumeLive.liveChannel" :placeholder="t('common.channelPlaceholder')" clearable |
|
|
filterable allow-create default-first-option> |
|
|
filterable allow-create default-first-option> |
|
|
|