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