游戏管理暂存
This commit is contained in:
286
src/views/room/GameAdmin.vue
Normal file
286
src/views/room/GameAdmin.vue
Normal file
@@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire" style="display: inline-block; margin-right: 20px">
|
||||
<span class="demonstration">地区:</span>
|
||||
<el-select v-model="inquire.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="familyName" align="center" label="游戏ID" />
|
||||
<el-table-column prop="erbanNo" align="center" label="游戏名称" />
|
||||
<el-table-column prop="nick" align="center" label="所属地区" />
|
||||
<el-table-column prop="goldIncome" align="center" label="是否展示" />
|
||||
<el-table-column
|
||||
prop="diamondRemain"
|
||||
align="center"
|
||||
label="展示房间类型"
|
||||
/>
|
||||
<el-table-column prop="micRemainTime" align="center" label="是否限制" />
|
||||
<el-table-column prop="micRemainTime" align="center" label="可开启角色" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="edi(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
|
||||
<!-- 游戏ID -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>游戏ID</span
|
||||
>
|
||||
<el-input
|
||||
v-model="ediObj.gameId"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 游戏昵称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>游戏昵称</span
|
||||
>
|
||||
<el-input
|
||||
v-model="ediObj.gameNick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 所属地区 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>所属地区</span
|
||||
>
|
||||
<el-checkbox-group v-model="ediObj.checkList">
|
||||
<el-checkbox label="华语区"></el-checkbox>
|
||||
<el-checkbox label="英语区"></el-checkbox>
|
||||
<el-checkbox label="阿拉伯语区"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<!-- 是否展示 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>是否展示</span
|
||||
>
|
||||
<el-select v-model="ediObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in ediObj.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 是否限制 -->
|
||||
<div v-show="ediObj.value" style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>是否限制</span
|
||||
>
|
||||
<el-select v-model="ediObj.value2" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in ediObj.options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 可开启角色 -->
|
||||
<div v-show="ediObj.value2" style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>可开启角色</span
|
||||
>
|
||||
<el-checkbox-group v-model="ediObj.checkList2">
|
||||
<el-checkbox label="房主"></el-checkbox>
|
||||
<el-checkbox label="管理员"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="editDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="editDialogClick()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// import {} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GameAdmin",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
value: "",
|
||||
time: "",
|
||||
},
|
||||
// 选择器
|
||||
options: [
|
||||
{
|
||||
value: "1",
|
||||
label: "华语区",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "英语区",
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "阿拉伯语区",
|
||||
},
|
||||
],
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 控制编辑弹窗
|
||||
editDialog: true,
|
||||
ediObj: {
|
||||
gameId: "",
|
||||
gameNick: "",
|
||||
checkList: [],
|
||||
value: false,
|
||||
options: [
|
||||
{
|
||||
value: true,
|
||||
label: "是",
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "否",
|
||||
},
|
||||
],
|
||||
value2: false,
|
||||
options2: [
|
||||
{
|
||||
value: true,
|
||||
label: "是",
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "否",
|
||||
},
|
||||
],
|
||||
checkList2: [],
|
||||
},
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (time && time.length > 0) {
|
||||
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
console.log(this.inquire);
|
||||
this.loading = false;
|
||||
},
|
||||
// 确认编辑按钮
|
||||
editDialogClick() {
|
||||
console.log(this.ediObj);
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input {
|
||||
width: 180px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.dialogTableVisibleBut {
|
||||
display: block;
|
||||
margin: 30px 0 0 830px;
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user