|
|
|
@ -2,37 +2,52 @@
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
|
|
|
|
<template #left>
|
|
|
|
|
<el-form-item :label="t('平台类型')" prop="platformShowCode">
|
|
|
|
|
<CustomSelect v-if="showLoding2" v-model="queryParams.platformShowCode" :options="sys_job_status" placeholder="请选择平台类型" style="width: 200px" />
|
|
|
|
|
<el-form-item :label="t('游戏平台')" prop="platformCode">
|
|
|
|
|
<CustomSelect v-if="showLoding2" v-model="queryParams.platformCode" :options="sys_job_status" placeholder="请选择游戏平台" style="width: 200px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
<template #right>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="Plus" @click="handleAdd" v-hasPermi="['super:platform:add']">{{ t('新增平台') }}</el-button>
|
|
|
|
|
<el-button type="primary" icon="Plus" @click="handleAdd" v-hasPermi="['super:platform:add']">{{ t('新增游戏') }}</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- v-hasPermi="['super:platform:add']" -->
|
|
|
|
|
</template>
|
|
|
|
|
</table-search-card>
|
|
|
|
|
<el-table v-loading="loading" :span-method="objectSpanMethod" class="c-table-main" :data="agentList" border>
|
|
|
|
|
<el-table-column :label="t('平台编码')" align="center" prop="platformShowCode" />
|
|
|
|
|
<el-table-column :label="t('厂商名称')" align="center" prop="platformManufacturerName" />
|
|
|
|
|
<el-table-column :label="t('接口点位')" align="center" prop="platformManufacturerName" >
|
|
|
|
|
<template #default="{row}">
|
|
|
|
|
<el-button link type="primary" @click="handleView(row)" v-hasPermi="['super:platform:detail']">{{ t('查看详情') }}</el-button>
|
|
|
|
|
<el-table v-loading="loading" class="c-table-main" :data="agentList" border>
|
|
|
|
|
<el-table-column :label="t('游戏ID')" align="center" prop="gameId" />
|
|
|
|
|
<el-table-column :label="t('游戏编码')" align="center" prop="gameCode" />
|
|
|
|
|
<el-table-column :label="t('游戏名称')" align="center" prop="gameName" />
|
|
|
|
|
<el-table-column :label="t('禁用币种')" align="center" prop="platformManufacturerName" >
|
|
|
|
|
<template #default="{ row: outerRow }">
|
|
|
|
|
<el-popover :width="320" style="height: 200px;" trigger="hover">
|
|
|
|
|
<div style="height: 200px;overflow: auto;">
|
|
|
|
|
<el-table :data="outerRow.gameCurrencies" row-key="id" border>
|
|
|
|
|
<el-table-column prop="gameId" label="游戏ID" />
|
|
|
|
|
<el-table-column prop="gameId" label="游戏名称">
|
|
|
|
|
<template #default>
|
|
|
|
|
{{ outerRow.gameName }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="currencyCode" label="币种" />
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
<template #reference>
|
|
|
|
|
<el-button link type="primary">{{ t('查看') }}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column :label="t('状态')" align="center" prop="stopStatus" >
|
|
|
|
|
<template #default="{row}">
|
|
|
|
|
<base-switch v-model="row.stopStatus" v-hasPermi="['super:platform:switch']" :active-value="false" :inactive-value="true"
|
|
|
|
|
<base-switch v-model="row.stopStatus" v-hasPermi="['super:platform:switch']" :active-value="true" :inactive-value="false"
|
|
|
|
|
:before-change="() => beforeSwitchChange(row, 'stopStatus')" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column :label="t('操作')" align="center" width="200" class-name="small-padding fixed-width">
|
|
|
|
|
<template #default="{row}">
|
|
|
|
|
<el-button link type="primary" @click="handleRevise(row)" v-hasPermi="['super:platform:currency:update']">{{ t('修改费率') }}</el-button>
|
|
|
|
|
<el-button link type="primary" @click="handleInterface(row)" v-hasPermi="['super:platform:detail']">{{ t('接口信息') }}</el-button>
|
|
|
|
|
<el-button link type="primary" @click="handleOpenRevise(row)" v-hasPermi="['super:platform:update']">{{ t('修改平台') }}</el-button>
|
|
|
|
|
|
|
|
|
|
<!-- <el-button link type="primary" @click="handleRevise(row)" v-hasPermi="['super:platform:currency:update']">{{ t('修改费率') }}</el-button> -->
|
|
|
|
|
<!-- <el-button link type="primary" @click="handleInterface(row)" v-hasPermi="['super:platform:detail']">{{ t('接口信息') }}</el-button> -->
|
|
|
|
|
<el-button link type="primary" @click="handleOpenRevise(row)" v-hasPermi="['super:game:update']">{{ t('修改游戏') }}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -118,80 +133,59 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 修改平台 -->
|
|
|
|
|
<el-dialog :title="rowOpenRevise.id == '' ? t('新增平台') : t('修改平台')" align-center v-model="openRevise" width="1300px" append-to-body>
|
|
|
|
|
<el-form ref="openReviseRef" :model="rowOpenRevise" :rules="ruleForm" label-width="120px">
|
|
|
|
|
<el-descriptions border :column="2" class="c-descriptions" >
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('平台代码')">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="platformCode">
|
|
|
|
|
<el-input v-model="rowOpenRevise.platformCode" style="width: 400px;" :placeholder="t('请输入平台代码')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('平台展示代码')">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="platformShowCode">
|
|
|
|
|
<el-input v-model="rowOpenRevise.platformShowCode" style="width: 400px;" :placeholder="t('请输入平台展示代码')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('平台名称')">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="platformName">
|
|
|
|
|
<el-input v-model="rowOpenRevise.platformName" style="width: 400px;" :placeholder="t('请输入平台名称')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('拉取模式')">
|
|
|
|
|
<el-radio-group v-model="rowOpenRevise.type">
|
|
|
|
|
<el-radio-button :value="1">{{ t('普通') }}</el-radio-button>
|
|
|
|
|
|
|
|
|
|
<el-radio-button :value="0" >{{ t('多币种') }}</el-radio-button>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('平台信息')">
|
|
|
|
|
<div style="width: 100%;display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="platformInfo">
|
|
|
|
|
<el-input type="textarea" rows="4" v-model="rowOpenRevise.platformInfo" style="width: 400px;" :placeholder="t('请输入平台信息')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('地址信息')">
|
|
|
|
|
<div style="width: 100%;display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="urlInfo">
|
|
|
|
|
<el-input type="textarea" rows="4" v-model="rowOpenRevise.urlInfo" style="width: 400px;" :placeholder="t('请输入语言信息')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('语言信息')">
|
|
|
|
|
<div style="width: 100%;display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="langInfo">
|
|
|
|
|
<el-input type="textarea" rows="4" v-model="rowOpenRevise.langInfo" style="width: 400px;" :placeholder="t('请输入语言信息')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('币种信息')">
|
|
|
|
|
<div style="width: 100%;display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="currencyInfo">
|
|
|
|
|
<el-input type="textarea" rows="4" v-model="rowOpenRevise.currencyInfo" style="width: 400px;" :placeholder="t('请输入币种信息')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- {{ rowOpenRevise.currencyInfo }} -->
|
|
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('扩展信息')">
|
|
|
|
|
<div style="width: 100%;display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="extInfo">
|
|
|
|
|
<el-input type="textarea" rows="4" v-model="rowOpenRevise.extInfo" style="width: 400px;" :placeholder="t('请输入币种信息')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- {{ rowOpenRevise.currencyInfo }} -->
|
|
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-width="150" label-align="right" :label="t('密钥信息')">
|
|
|
|
|
<div style="width: 100%;display: flex;flex-wrap: wrap;">
|
|
|
|
|
<el-form-item label-width="0" style="width: 100%;" prop="keyInfo">
|
|
|
|
|
<el-input type="textarea" rows="8" v-model="rowOpenRevise.keyInfo" style="width: 100%;" :placeholder="t('请输入密钥信息')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<!-- 修改游戏/新增游戏 -->
|
|
|
|
|
<el-dialog v-if="openRevise" :title="rowOpenRevise.id == '' ? t('新增游戏') : t('修改游戏')" align-center v-model="openRevise" width="800px" append-to-body>
|
|
|
|
|
<el-scrollbar max-height="600px">
|
|
|
|
|
<el-form ref="openReviseRef" :model="rowOpenRevise" :rules="ruleForm" label-width="160px">
|
|
|
|
|
<el-form-item :label="t('游戏平台')" prop="platformCode">
|
|
|
|
|
<CustomSelect v-model="rowOpenRevise.platformCode" :options="sys_job_status" placeholder="请选择游戏平台" style="width: 400px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('游戏名称')" style="width: 100%;" prop="gameName">
|
|
|
|
|
<el-input v-model="rowOpenRevise.gameName" style="width: 400px;" :placeholder="t('请输入游戏名称')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('游戏编码')" style="width: 100%;" prop="gameCode">
|
|
|
|
|
<el-input v-model="rowOpenRevise.gameCode" style="width: 400px;" :placeholder="t('请输入游戏编码')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('游戏ID')" style="width: 100%;" prop="gameId">
|
|
|
|
|
<el-input v-model="rowOpenRevise.gameId" style="width: 400px;" :placeholder="t('请输入游戏ID')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('第三方来源分类')" style="width: 100%;" prop="gameSourceType">
|
|
|
|
|
<el-input v-model="rowOpenRevise.gameSourceType" style="width: 400px;" :placeholder="t('请输入第三方来源分类')"> </el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('平台类型')" prop="platformType">
|
|
|
|
|
<CustomSelect v-model="rowOpenRevise.platformType" :options="platformTypeOptions" placeholder="请选择平台类型" style="width: 400px" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('支持的终端类型')" style="width: 100%;" prop="ingress">
|
|
|
|
|
<el-radio-group v-model="rowOpenRevise.ingress">
|
|
|
|
|
<el-radio :value="1">{{ t('电脑网页') }}</el-radio>
|
|
|
|
|
<el-radio :value="2">{{ t('手机网页') }}</el-radio>
|
|
|
|
|
<el-radio :value="3">{{ t('电脑/手机网页') }}</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('是否支持试玩')" style="width: 100%;" prop="demoStatus">
|
|
|
|
|
<el-switch v-model="rowOpenRevise.demoStatus" :active-value="true" :inactive-value="false" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('是否支持免费游戏')" style="width: 100%;" prop="freespin">
|
|
|
|
|
<el-switch v-model="rowOpenRevise.freespin" :active-value="true" :inactive-value="false" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<div style="height: 20px;"></div>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="margin-bottom: 10px;text-align: right;" v-if="rowOpenRevise.id != ''">
|
|
|
|
|
<CustomSelect v-model="currencyCodes" :options="currencyCodesOptions" placeholder="请选择币种" style="width: 200px;margin-right: 10px;" />
|
|
|
|
|
<el-button type="primary" @click="addCurrency">{{ t('新增') }}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table v-if="rowOpenRevise.id != ''" :data="rowOpenRevise.gameCurrencies" row-key="id" border>
|
|
|
|
|
<el-table-column prop="gameId" label="游戏ID" />
|
|
|
|
|
<el-table-column prop="currencyCode" label="币种" />
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="maxAmount" label="操作" width="120">
|
|
|
|
|
<template #default="{row}">
|
|
|
|
|
<el-button link type="primary" @click="handleDelete(row)">{{ t('删除') }}</el-button>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitInterface" :loading="loadingButton" v-hasPermi="['super:platform:update']">{{ t('确 定') }}</el-button>
|
|
|
|
@ -206,37 +200,9 @@
|
|
|
|
|
<div style="width: 100%;text-align: center;">{{ titlePlatForm }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
<el-scrollbar max-height="600px">
|
|
|
|
|
<div class="label-scoreRatio" v-if="titlePlatForm == '修改'">
|
|
|
|
|
<!-- <span>{{ t('平台比例') }}</span> -->
|
|
|
|
|
<div style="margin-right: 320px;">
|
|
|
|
|
<el-button style="width: 80px;" type="danger" @click="queryCode('del')" :disabled="tenantSystemPlatformDTOSRow.length == 0">-0.5</el-button>
|
|
|
|
|
<el-button style="width: 80px;" type="primary" @click="queryCode('add')" :disabled="tenantSystemPlatformDTOSRow.length == 0">+0.5</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="tenantSystemPlatformDTOSRow" row-key="id" border>
|
|
|
|
|
<el-table-column prop="platformCode" label="平台编码" />
|
|
|
|
|
<el-table :data="gameCurrencies" row-key="id" border>
|
|
|
|
|
<el-table-column prop="gameId" label="游戏ID" />
|
|
|
|
|
<el-table-column prop="currencyCode" label="币种" />
|
|
|
|
|
<el-table-column prop="openStatus" label="开启状态" >
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span>{{ scope.row.openStatus ? '关闭' : '开启' }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="cost" label="原始费率" >
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<div v-if="titlePlatForm == '修改'" style="display: flex;align-items: center;">
|
|
|
|
|
<el-input v-model="scope.row.cost" style="width: 240px" type="number" >
|
|
|
|
|
<template #append>%</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<span v-else>{{ scope.row.cost }}%</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="maxAmount" label="带入金额" >
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<div v-if="titlePlatForm == '修改'" style="display:flex;align-items: center;"><NumberInput v-model="scope.row.minAmount"></NumberInput> ~ <NumberInput v-model="scope.row.maxAmount"></NumberInput></div>
|
|
|
|
|
<span v-else>{{ scope.row.minAmount }}~{{ scope.row.maxAmount }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
<template #footer>
|
|
|
|
@ -251,8 +217,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="Agent">
|
|
|
|
|
import { superPlatformList, createPlatformUpdate,createPlatformAdd,superGameList,createGameuUpdate,getSuperPlatformInf,createPlatformSwitch,getPlatformShowSelect,updatePlatformCurrency } from "@/api/super/platform.js";
|
|
|
|
|
import { superCommonPlatformTypeSelect } from "@/api/super/tenant";
|
|
|
|
|
import { superPlatformList, createPlatformUpdate,createPlatformAdd,superGameList,createGameuUpdate,createGameuUpdateStatus,createGameuAdd,getSuperPlatformInf,createPlatformSwitch,getPlatformShowSelect,updatePlatformCurrency } from "@/api/super/platform.js";
|
|
|
|
|
// import { superGameList} from "@/api/super/gameManagement.js";
|
|
|
|
|
import Crontab from '@/components/Crontab'
|
|
|
|
|
import { getLocalStorage } from '@/utils/auth'
|
|
|
|
|
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
|
|
|
@ -260,10 +226,16 @@
|
|
|
|
|
import CustomSelect from '@/components/CustomSelect'
|
|
|
|
|
import BaseSwitch from '@/components/BaseSwitch'
|
|
|
|
|
import { id } from "element-plus/es/locales.mjs";
|
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
import { nextTick, ref } from "vue";
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const { ff_tenant_type, ff_tenant_status } = proxy.useDict("ff_tenant_type", "ff_tenant_status");
|
|
|
|
|
let resData = getLocalStorage('currencySelect');
|
|
|
|
|
const currencyCodesOptions = ref([]);
|
|
|
|
|
currencyCodesOptions.value = resData.map(item => {
|
|
|
|
|
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
|
|
|
|
})
|
|
|
|
|
const currencyCodes = ref('VND');
|
|
|
|
|
const loadingButton = ref(false);
|
|
|
|
|
const agentList = ref([]);
|
|
|
|
|
const open = ref(false);
|
|
|
|
@ -285,14 +257,55 @@ import { ref } from "vue";
|
|
|
|
|
|
|
|
|
|
const rulesInterface = reactive({
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const platformTypeOptions = [
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('电子'),
|
|
|
|
|
value: 1
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('棋牌'),
|
|
|
|
|
value: 2
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('游戏大厅'),
|
|
|
|
|
value: 3
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('捕鱼'),
|
|
|
|
|
value: 4
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('真人视讯'),
|
|
|
|
|
value: 6
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('平台彩票'),
|
|
|
|
|
value: 7
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('体育'),
|
|
|
|
|
value: 8
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('斗鸡'),
|
|
|
|
|
value: 11
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('电竞'),
|
|
|
|
|
value: 12
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: proxy.t('游戏彩票'),
|
|
|
|
|
value: 13
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const data = reactive({
|
|
|
|
|
form: {},
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
tenantKey: "",
|
|
|
|
|
platformShowCode: "",
|
|
|
|
|
platformCode: "",
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
account: [{ required: true, message: proxy.t('商户账号不能为空'), trigger: "blur" }],
|
|
|
|
@ -302,145 +315,13 @@ import { ref } from "vue";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const ruleForm = reactive({
|
|
|
|
|
platformCode: [
|
|
|
|
|
{ required: true, message: proxy.t('平台编码不能为空'), trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
platformShowCode:[
|
|
|
|
|
{ required: true, message: proxy.t('平台展示代码不能为空'), trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
platformName: [
|
|
|
|
|
{ required: true, message: proxy.t('平台名称不能为空'), trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
platformInfo: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value) {
|
|
|
|
|
return callback(new Error('请输入平台信息'))
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const parsed = JSON.parse(value)
|
|
|
|
|
// 检查是否是对象或数组
|
|
|
|
|
if (typeof parsed === 'object' && parsed !== null) {
|
|
|
|
|
callback() // 合法
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
urlInfo: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value) {
|
|
|
|
|
return callback(new Error('请输入地址信息'))
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const parsed = JSON.parse(value)
|
|
|
|
|
// 检查是否是对象或数组
|
|
|
|
|
if (typeof parsed === 'object' && parsed !== null) {
|
|
|
|
|
callback() // 合法
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
langInfo: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value) {
|
|
|
|
|
return callback(new Error('请输入语言信息'))
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const parsed = JSON.parse(value)
|
|
|
|
|
// 检查是否是对象或数组
|
|
|
|
|
if (typeof parsed === 'object' && parsed !== null) {
|
|
|
|
|
callback() // 合法
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
currencyInfo: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value) {
|
|
|
|
|
return callback(new Error('请输入币种信息'))
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const parsed = JSON.parse(value)
|
|
|
|
|
// 检查是否是对象或数组
|
|
|
|
|
if (typeof parsed === 'object' && parsed !== null) {
|
|
|
|
|
callback() // 合法
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
extInfo: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value) {
|
|
|
|
|
return callback(new Error('请输入展示信息'))
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const parsed = JSON.parse(value)
|
|
|
|
|
// 检查是否是对象或数组
|
|
|
|
|
if (typeof parsed === 'object' && parsed !== null) {
|
|
|
|
|
callback() // 合法
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
keyInfo: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value) {
|
|
|
|
|
return callback(new Error('请输入密钥信息'))
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const parsed = JSON.parse(value)
|
|
|
|
|
// 检查是否是对象或数组
|
|
|
|
|
if (typeof parsed === 'object' && parsed !== null) {
|
|
|
|
|
callback() // 合法
|
|
|
|
|
} else {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
callback(new Error('请输入合法的 JSON(对象或数组)'))
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
platformCode: [{ required: true, message: proxy.t('游戏平台不能为空'), trigger: "change" }],
|
|
|
|
|
gameId: [{ required: true, message: proxy.t('游戏不能为空'), trigger: "change" }],
|
|
|
|
|
gameName: [{ required: true, message: proxy.t('游戏名称不能为空'), trigger: "change" }],
|
|
|
|
|
gameCode: [{ required: true, message: proxy.t('游戏编码不能为空'), trigger: "change" }],
|
|
|
|
|
gameSourceType: [{ required: true, message: proxy.t('游戏来源不能为空'), trigger: "change" }],
|
|
|
|
|
platformType: [{ required: true, message: proxy.t('游戏平台不能为空'), trigger: "change" }],
|
|
|
|
|
ingress: [{ required: true, message: proxy.t('支持的终端类型不能为空'), trigger: "change" }],
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
@ -448,67 +329,13 @@ import { ref } from "vue";
|
|
|
|
|
/** 查询列表 */
|
|
|
|
|
function getList() {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
superPlatformList(queryParams.value).then(response => {
|
|
|
|
|
superGameList(queryParams.value).then(response => {
|
|
|
|
|
const _data = response.rows;
|
|
|
|
|
// 合并主数据和子数据
|
|
|
|
|
const mergedData = _data.flatMap(mainData => {
|
|
|
|
|
return mainData.superPlatformManufacturers.map(child => ({
|
|
|
|
|
platformShowCode:mainData.platformShowCode, //
|
|
|
|
|
id: child.id, //
|
|
|
|
|
platformManufacturerName:child.platformManufacturerName, //
|
|
|
|
|
platformShowCode:child.platformShowCode, //
|
|
|
|
|
stopStatus:child.stopStatus,
|
|
|
|
|
tenantSystemPlatformDTOS:child.tenantSystemPlatformDTOS,
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
agentList.value = mergedData;
|
|
|
|
|
agentList.value = _data;
|
|
|
|
|
total.value = response.total;
|
|
|
|
|
loading.value = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 表格合并
|
|
|
|
|
const objectSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
|
|
if (columnIndex === 0) {
|
|
|
|
|
// 处理第一列
|
|
|
|
|
if (rowIndex === 0) {
|
|
|
|
|
// 第一行,初始化 rowspan 为 1,并开始计算
|
|
|
|
|
let rowspan = 1;
|
|
|
|
|
// 遍历后续行,计算 rowspan
|
|
|
|
|
for (let i = rowIndex + 1; i < agentList.value.length; i++) {
|
|
|
|
|
if (agentList.value[i].platformShowCode === row.platformShowCode) {
|
|
|
|
|
rowspan++;
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 返回合并信息
|
|
|
|
|
return { rowspan, colspan: 1 };
|
|
|
|
|
} else {
|
|
|
|
|
// 非第一行
|
|
|
|
|
let rowspan = 0; // 初始化为 0
|
|
|
|
|
// classId 是否相同
|
|
|
|
|
if (rowIndex > 0 && agentList.value[rowIndex - 1].platformShowCode === row.platformShowCode) {
|
|
|
|
|
// 如果相同,则当前行不需要渲染该单元格,rowspan 为 0
|
|
|
|
|
rowspan = 0;
|
|
|
|
|
} else {
|
|
|
|
|
// 需要合并的行数
|
|
|
|
|
rowspan = 1;
|
|
|
|
|
for (let i = rowIndex + 1; i < agentList.value.length; i++) {
|
|
|
|
|
if (agentList.value[i].platformShowCode === row.platformShowCode) {
|
|
|
|
|
rowspan++;
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 返回合并信息,colspan 总是 1
|
|
|
|
|
return { rowspan, colspan: 1 };
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 处理非第一列,不合并,直接返回
|
|
|
|
|
return { rowspan: 1, colspan: 1 };
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const sys_job_status = ref([]);
|
|
|
|
|
const showLoding2 = ref(true);
|
|
|
|
|
const getsuperCommonPlatformTypeSelect = async () => {
|
|
|
|
@ -544,6 +371,37 @@ const togglePassword = (row) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除
|
|
|
|
|
const handleDelete = (row) => {
|
|
|
|
|
const index = rowOpenRevise.gameCurrencies.findIndex(item => item.id === row.id)
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
rowOpenRevise.gameCurrencies.splice(index, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//添加
|
|
|
|
|
const addCurrency = () => {
|
|
|
|
|
// 判断当前 gameId
|
|
|
|
|
const gameId = rowOpenRevise.gameId
|
|
|
|
|
|
|
|
|
|
// 构造一条新记录
|
|
|
|
|
const newItem = {
|
|
|
|
|
gameId,
|
|
|
|
|
currencyCode: currencyCodes.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 先检查是否已存在相同 gameId + currencyCode,避免重复
|
|
|
|
|
const exists = rowOpenRevise.gameCurrencies.some(
|
|
|
|
|
item => item.gameId == gameId && item.currencyCode == currencyCodes.value
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (!exists) {
|
|
|
|
|
rowOpenRevise.gameCurrencies.push(newItem)
|
|
|
|
|
} else {
|
|
|
|
|
proxy.$modal.msgSuccess(proxy.t('已存在相同的币种记录'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 列表开关事件
|
|
|
|
|
const beforeSwitchChange = async (row, undateKeys) => {
|
|
|
|
|
const _status = row[undateKeys] == false ? true : false;
|
|
|
|
@ -553,7 +411,7 @@ const beforeSwitchChange = async (row, undateKeys) => {
|
|
|
|
|
}
|
|
|
|
|
_data[undateKeys] = _status
|
|
|
|
|
try {
|
|
|
|
|
await createPlatformSwitch(_data).then(() => {
|
|
|
|
|
await createGameuUpdateStatus(_data).then(() => {
|
|
|
|
|
proxy.$modal.msgSuccess(_status ? proxy.t('关闭成功') : proxy.t('开启成功'))
|
|
|
|
|
getList()
|
|
|
|
|
})
|
|
|
|
@ -629,24 +487,15 @@ const switchBeforeChange = () => {
|
|
|
|
|
const openRevise = ref(false);
|
|
|
|
|
const rowOpenRevise = reactive({});
|
|
|
|
|
const handleOpenRevise = (row) => {
|
|
|
|
|
getSuperPlatformInf(row.id).then(response => {
|
|
|
|
|
Object.assign(rowOpenRevise, response.data);
|
|
|
|
|
rowOpenRevise.platformInfo = JSON.stringify(rowOpenRevise.platformInfo);
|
|
|
|
|
rowOpenRevise.keyInfo = JSON.stringify(rowOpenRevise.keyInfo);
|
|
|
|
|
rowOpenRevise.langInfo = JSON.stringify(rowOpenRevise.langInfo);
|
|
|
|
|
rowOpenRevise.currencyInfo = JSON.stringify(rowOpenRevise.currencyInfo);
|
|
|
|
|
rowOpenRevise.extInfo = JSON.stringify(rowOpenRevise.extInfo);
|
|
|
|
|
rowOpenRevise.urlInfo = JSON.stringify(rowOpenRevise.urlInfo);
|
|
|
|
|
oldForm.value = JSON.stringify(rowOpenRevise);
|
|
|
|
|
openRevise.value = true;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
Object.assign(rowOpenRevise, row);
|
|
|
|
|
openRevise.value = true;
|
|
|
|
|
}
|
|
|
|
|
const gameCurrencies = ref([]);
|
|
|
|
|
|
|
|
|
|
/** 详细信息 */
|
|
|
|
|
function handleView(row) {
|
|
|
|
|
titlePlatForm.value = proxy.t('详情');
|
|
|
|
|
tenantSystemPlatformDTOSRow.value = row.tenantSystemPlatformDTOS;
|
|
|
|
|
gameCurrencies.value = row.gameCurrencies;
|
|
|
|
|
openView.value = true;
|
|
|
|
|
}
|
|
|
|
|
const gameList = ref([]),platformCode = ref(''),currencyCode = ref(''),gameName = ref('');
|
|
|
|
@ -668,18 +517,16 @@ const switchBeforeChange = () => {
|
|
|
|
|
currencyCode.value = row.currencyCode;
|
|
|
|
|
gameLists();
|
|
|
|
|
}
|
|
|
|
|
const switchChange = (row) => {
|
|
|
|
|
let obj = {
|
|
|
|
|
gameId:row.gameId,
|
|
|
|
|
stopStatus:row.stopStatus==true?false:true,
|
|
|
|
|
currencyCode:row.currencyCode,
|
|
|
|
|
}
|
|
|
|
|
createGameuUpdate(obj).then(response => {
|
|
|
|
|
console.log(response, "游戏列表");
|
|
|
|
|
openView.value = true;
|
|
|
|
|
gameLists();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// const switchChange = (row) => {
|
|
|
|
|
// let obj = {
|
|
|
|
|
// id:row.id,
|
|
|
|
|
// stopStatus:row.stopStatus==true?false:true,
|
|
|
|
|
// }
|
|
|
|
|
// createGameuUpdateStatus(obj).then(response => {
|
|
|
|
|
// openView.value = true;
|
|
|
|
|
// handleQuery();
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
/** 获取平台利润 */
|
|
|
|
|
function getSelectPlatform() {
|
|
|
|
|
// selectPlatform().then(response => {
|
|
|
|
@ -690,9 +537,15 @@ const switchBeforeChange = () => {
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
function handleAdd() {
|
|
|
|
|
rowOpenRevise.id = '';
|
|
|
|
|
rowOpenRevise.type = 1;
|
|
|
|
|
openRevise.value = true;
|
|
|
|
|
openRevise.value = false;
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
openRevise.value = true;
|
|
|
|
|
Object.keys(rowOpenRevise).forEach(key => {
|
|
|
|
|
delete rowOpenRevise[key]
|
|
|
|
|
})
|
|
|
|
|
rowOpenRevise.id = '';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function queryCode(type) {
|
|
|
|
@ -734,20 +587,19 @@ const switchBeforeChange = () => {
|
|
|
|
|
|
|
|
|
|
loadingButton.value = true;
|
|
|
|
|
if (JSON.stringify(rowOpenRevise) != oldForm.value) {
|
|
|
|
|
let obj = {
|
|
|
|
|
id:rowOpenRevise.id,
|
|
|
|
|
platformCode:rowOpenRevise.platformCode,
|
|
|
|
|
platformShowCode:rowOpenRevise.platformShowCode,
|
|
|
|
|
platformName:rowOpenRevise.platformName,
|
|
|
|
|
type: rowOpenRevise.type,
|
|
|
|
|
platformInfo: JSON.parse(rowOpenRevise.platformInfo),
|
|
|
|
|
keyInfo: JSON.parse(rowOpenRevise.keyInfo),
|
|
|
|
|
currencyInfo:JSON.parse(rowOpenRevise.currencyInfo),
|
|
|
|
|
langInfo:JSON.parse(rowOpenRevise.langInfo),
|
|
|
|
|
extInfo:JSON.parse(rowOpenRevise.extInfo)
|
|
|
|
|
}
|
|
|
|
|
if (rowOpenRevise.id == ''){
|
|
|
|
|
createPlatformAdd(obj).then(response => {
|
|
|
|
|
let obj = {
|
|
|
|
|
platformCode:rowOpenRevise.platformCode,
|
|
|
|
|
gameName:rowOpenRevise.gameName,
|
|
|
|
|
gameCode:rowOpenRevise.gameCode,
|
|
|
|
|
gameId:rowOpenRevise.gameId,
|
|
|
|
|
gameSourceType:rowOpenRevise.gameSourceType,
|
|
|
|
|
platformType:rowOpenRevise.platformType,
|
|
|
|
|
ingress:rowOpenRevise.ingress,
|
|
|
|
|
demoStatus:rowOpenRevise.demoStatus,
|
|
|
|
|
freespin:rowOpenRevise.freespin,
|
|
|
|
|
}
|
|
|
|
|
createGameuAdd(obj).then(response => {
|
|
|
|
|
loadingButton.value = false;
|
|
|
|
|
proxy.$modal.msgSuccess(proxy.t('新增成功'));
|
|
|
|
|
openRevise.value = false;
|
|
|
|
@ -756,7 +608,20 @@ const switchBeforeChange = () => {
|
|
|
|
|
loadingButton.value = false;
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
createPlatformUpdate(obj).then(response => {
|
|
|
|
|
let obj = {
|
|
|
|
|
id:rowOpenRevise.id,
|
|
|
|
|
platformCode:rowOpenRevise.platformCode,
|
|
|
|
|
gameName:rowOpenRevise.gameName,
|
|
|
|
|
gameCode:rowOpenRevise.gameCode,
|
|
|
|
|
gameId:rowOpenRevise.gameId,
|
|
|
|
|
gameSourceType:rowOpenRevise.gameSourceType,
|
|
|
|
|
platformType:rowOpenRevise.platformType,
|
|
|
|
|
ingress:rowOpenRevise.ingress,
|
|
|
|
|
demoStatus:rowOpenRevise.demoStatus,
|
|
|
|
|
freespin:rowOpenRevise.freespin,
|
|
|
|
|
gameCurrencies:rowOpenRevise.gameCurrencies
|
|
|
|
|
}
|
|
|
|
|
createGameuUpdate(obj).then(response => {
|
|
|
|
|
loadingButton.value = false;
|
|
|
|
|
proxy.$modal.msgSuccess(proxy.t('更新成功'));
|
|
|
|
|
openRevise.value = false;
|
|
|
|
|