feat(游戏列表-->房间): "游戏源"新增"YOMI"项

This commit is contained in:
hzj 2026-01-22 19:47:25 +08:00
parent 17392fab0a
commit 975b37791d

View File

@ -1,6 +1,5 @@
<template> <template>
<div class="app-container-room"> <div class="app-container-room">
<div class="filter-container"> <div class="filter-container">
<el-select <el-select
v-model="listQuery.sysOrigin" v-model="listQuery.sysOrigin"
@ -15,7 +14,9 @@
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
<span style="float: left;"> <sys-origin-icon :icon="item.value" :desc="item.value" /></span> <span style="float: left;">
<sys-origin-icon :icon="item.value" :desc="item.value"
/></span>
<span style="float: left;margin-left:10px">{{ item.label }}</span> <span style="float: left;margin-left:10px">{{ item.label }}</span>
</el-option> </el-option>
</el-select> </el-select>
@ -26,7 +27,12 @@
class="filter-item" class="filter-item"
@change="handleSearch" @change="handleSearch"
> >
<el-option v-for="item in gameOrigins" :key="item.value" :label="item.name" :value="item.value" /> <el-option
v-for="item in gameOrigins"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
<el-select <el-select
v-model="listQuery.showcase" v-model="listQuery.showcase"
@ -65,7 +71,10 @@
> >
<el-table-column label="系统" align="center"> <el-table-column label="系统" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<sys-origin-icon :icon="scope.row.sysOrigin" :desc="scope.row.sysOrigin" /> <sys-origin-icon
:icon="scope.row.sysOrigin"
:desc="scope.row.sysOrigin"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="封面" align="center" width="60"> <el-table-column label="封面" align="center" width="60">
@ -84,21 +93,32 @@
<el-table-column label="客户端" align="center"> <el-table-column label="客户端" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in clientOrigins" :key="index"> <span v-for="(item, index) in clientOrigins" :key="index">
<el-tag v-if="item.value == scope.row.clientOrigin">{{ item.name }}</el-tag> <el-tag v-if="item.value == scope.row.clientOrigin">{{
item.name
}}</el-tag>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否全屏" align="center"> <el-table-column label="是否全屏" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success">{{ scope.row.fullScreen ? '是' : '否' }}</el-tag> <el-tag type="success">{{
scope.row.fullScreen ? "是" : "否"
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sort" label="排序" align="center" /> <el-table-column prop="sort" label="排序" align="center" />
<el-table-column fixed="right" label="操作" align="center" width="200"> <el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.selfGameCode == 'GAME_FRUIT'" type="text" @click.native="dataSetting(scope.row)">数据配置</el-button> <el-button
v-if="scope.row.selfGameCode == 'GAME_FRUIT'"
type="text"
@click.native="dataSetting(scope.row)"
>数据配置</el-button
>
<el-button type="text" @click.native="handleUpdate()">修改</el-button> <el-button type="text" @click.native="handleUpdate()">修改</el-button>
<el-button type="text" @click.native="handlDel(scope.row)">删除</el-button> <el-button type="text" @click.native="handlDel(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -130,124 +150,126 @@
</template> </template>
<script> <script>
import { pageGameConfig, deleteGameConfig } from '@/api/sys' import { pageGameConfig, deleteGameConfig } from "@/api/sys";
import fruitEdit from '@/views/sys/game-config/fruit/edit.vue' import fruitEdit from "@/views/sys/game-config/fruit/edit.vue";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import { sysOriginPlatforms } from '@/constant/origin' import { sysOriginPlatforms } from "@/constant/origin";
import FormEdit from './form-edit.vue' import FormEdit from "./form-edit.vue";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
export default { export default {
components: { Pagination, FormEdit, fruitEdit }, components: { Pagination, FormEdit, fruitEdit },
data() { data() {
return { return {
gameOrigins: [ gameOrigins: [
{ value: 'THIRD_PARTY', name: '第三方游戏' }, { value: "THIRD_PARTY", name: "第三方游戏" },
{ value: 'APP', name: '原生游戏' }, { value: "APP", name: "原生游戏" },
{ value: 'H5', name: 'H5游戏' }, { value: "H5", name: "H5游戏" },
{ value: 'BAISHUN', name: 'Baishun' }, { value: "BAISHUN", name: "Baishun" },
{ value: 'LINGXIAN', name: 'LingXian' }, { value: "LINGXIAN", name: "LingXian" },
{ value: 'HOTGAME', name: 'HOTGAME' } { value: "HOTGAME", name: "HOTGAME" },
{ value: "YOMI", name: "YOMI" }
], ],
clientOrigins: [ clientOrigins: [
{ value: 'ANDROID', name: '安卓' }, { value: "ANDROID", name: "安卓" },
{ value: 'IOS', name: '苹果' }, { value: "IOS", name: "苹果" },
{ value: 'COMMON', name: '通用' } { value: "COMMON", name: "通用" }
], ],
thatRow: {}, thatRow: {},
configDataShow: false, configDataShow: false,
sysOriginPlatforms, sysOriginPlatforms,
list: [], list: [],
total: 0, total: 0,
code: '', code: "",
sysOrigin: '', sysOrigin: "",
listQuery: { listQuery: {
cursor: 1, cursor: 1,
limit: 20, limit: 20,
showcase: true, showcase: true,
sysOrigin: 'YOLO', sysOrigin: "YOLO",
gameOrigin: 'H5' gameOrigin: "H5"
}, },
formEditVisible: false, formEditVisible: false,
textOptTitle: '', textOptTitle: "",
listLoading: true listLoading: true
} };
}, },
computed: { computed: {
...mapGetters(['permissionsSysOriginPlatforms']) ...mapGetters(["permissionsSysOriginPlatforms"])
}, },
created() { created() {
const that = this const that = this;
const querySystem = this.permissionsSysOriginPlatforms[0] const querySystem = this.permissionsSysOriginPlatforms[0];
if (!querySystem) { if (!querySystem) {
return return;
} }
that.listQuery.sysOrigin = querySystem.value that.listQuery.sysOrigin = querySystem.value;
that.renderData(true) that.renderData(true);
}, },
methods: { methods: {
renderData(isClean) { renderData(isClean) {
const that = this const that = this;
if (isClean === true) { if (isClean === true) {
this.listQuery.cursor = 1 this.listQuery.cursor = 1;
this.listQuery.list = [] this.listQuery.list = [];
} }
that.listLoading = true that.listLoading = true;
pageGameConfig(that.listQuery).then(res => { pageGameConfig(that.listQuery).then(res => {
const { body } = res const { body } = res;
that.total = body.total || 0 that.total = body.total || 0;
that.list = body.records that.list = body.records;
that.listLoading = false that.listLoading = false;
}) });
}, },
handleSearch() { handleSearch() {
this.renderData(true) this.renderData(true);
}, },
renderDataSuccess() { renderDataSuccess() {
this.$opsMessage.success() this.$opsMessage.success();
this.renderData() this.renderData();
}, },
queryUserDetails(row) { queryUserDetails(row) {
this.userDeatilsDrawer = true this.userDeatilsDrawer = true;
this.thatSelectedUserId = row.id this.thatSelectedUserId = row.id;
}, },
// //
handlDel(row) { handlDel(row) {
const that = this const that = this;
that.$confirm('确认删除吗?', '提示', { that
type: 'warning' .$confirm("确认删除吗?", "提示", {
}).then(() => { type: "warning"
that.listLoading = true
deleteGameConfig(row.id, row.sysOrigin).then((res) => {
that.listLoading = false
that.$opsMessage.success()
that.renderData()
}) })
}).catch(() => { .then(() => {
that.listLoading = true;
}) deleteGameConfig(row.id, row.sysOrigin).then(res => {
that.listLoading = false;
that.$opsMessage.success();
that.renderData();
});
})
.catch(() => {});
}, },
handleCreate() { handleCreate() {
this.thatRow = null this.thatRow = null;
this.formEditVisible = true this.formEditVisible = true;
}, },
handleUpdate() { handleUpdate() {
this.formEditVisible = true this.formEditVisible = true;
}, },
dataSetting(row) { dataSetting(row) {
this.configDataShow = true this.configDataShow = true;
this.sysOrigin = row.sysOrigin this.sysOrigin = row.sysOrigin;
this.code = row.name this.code = row.name;
}, },
handleMouseEnter(row) { handleMouseEnter(row) {
this.thatRow = row this.thatRow = row;
}, },
formEditSuccess() { formEditSuccess() {
this.formEditVisible = false this.formEditVisible = false;
this.renderData() this.renderData();
} }
} }
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.popover-content { .popover-content {