Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ab3b8c2871 | ||
![]() |
3a39476782 | ||
![]() |
bda30dd647 | ||
![]() |
e87f8e4c82 | ||
![]() |
34dbcc2f2b | ||
![]() |
33af99f086 | ||
![]() |
4096f9be43 | ||
![]() |
2210a40f67 | ||
![]() |
62155cbc96 | ||
![]() |
7c0438b070 | ||
![]() |
40884b5b21 | ||
![]() |
966cc40b3c | ||
![]() |
6075a3b7ef | ||
![]() |
5c54053377 | ||
![]() |
abcffa1cc3 | ||
![]() |
1860ce0e48 | ||
![]() |
a9b5f44e88 | ||
![]() |
0645211afc | ||
![]() |
8b69be0d27 | ||
![]() |
24b59255c6 | ||
![]() |
79421740f9 | ||
![]() |
6e3e4951aa | ||
![]() |
7c06e79a8f | ||
![]() |
dc041fd84f | ||
![]() |
1eaceed61b | ||
![]() |
017bf0c641 | ||
![]() |
8f9a22ffd1 | ||
![]() |
aba3833f5b | ||
![]() |
daa04b9269 | ||
![]() |
4e9dbb6622 | ||
![]() |
57c96c8aaf |
21
src/api/feedBack/feedBack.js
Normal file
21
src/api/feedBack/feedBack.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import request from '@/utils/request';
|
||||
import qs from 'qs';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
|
||||
// ==================================每日数据====================================
|
||||
// 反馈类型
|
||||
export const listType = query => {
|
||||
return request({
|
||||
url: '/admin/feedback/listType',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 反馈列表
|
||||
export const pageRecord = query => {
|
||||
return request({
|
||||
url: '/admin/feedback/pageRecord',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
173
src/api/luckyTycoon/luckyTycoon.js
Normal file
173
src/api/luckyTycoon/luckyTycoon.js
Normal file
@@ -0,0 +1,173 @@
|
||||
import request from '@/utils/request';
|
||||
import { genQueryParam } from '@/utils/maintainer';
|
||||
|
||||
// 地区接口
|
||||
export const listPartitionInfo = query => {
|
||||
return request({
|
||||
url: '/partition/listPartitionInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 福袋列表请求
|
||||
export const listLuckyBagLinearGift = query => {
|
||||
return request({
|
||||
url: '/admin/gift/getGiftByTypes',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 福袋礼物列表请求
|
||||
export const getPrizeGroupsInfo = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBag/getGroupInfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有礼物列表请求
|
||||
export const getAll = query => {
|
||||
return request({
|
||||
url: '/admin/gift/getAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有座驾列表请求
|
||||
export const carAll = query => {
|
||||
return request({
|
||||
url: '/admin/car/goods/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有头饰列表请求
|
||||
export const headwearAll = query => {
|
||||
return request({
|
||||
url: '/admin/headwear/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有铭牌列表请求
|
||||
export const nameplateAll = query => {
|
||||
return request({
|
||||
url: '/admin/nameplate/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有气泡列表请求
|
||||
export const chatbubbleAll = query => {
|
||||
return request({
|
||||
url: '/admin/chatbubble/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 所有资料卡列表请求
|
||||
export const infocard = query => {
|
||||
return request({
|
||||
url: '/admin/infocard/total/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 榜单统计-列表接口
|
||||
export const luckyBagWeekRankList = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagWeekRank/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 榜单统计-详情列表接口
|
||||
export const luckyBagWeekRankListRank = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagWeekRank/pageRank',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 榜单统计-总导出
|
||||
export const exportList = query => {
|
||||
window.location.href = `/admin/luckyBagWeekRank/exportList?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 榜单统计-详情导出
|
||||
export const exportRank = query => {
|
||||
window.location.href = `/admin/luckyBagWeekRank/exportRank?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 用户中奖记录-列表
|
||||
export const getRecordPage = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagFortunate/getRecordPage',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 用户中奖记录-导出
|
||||
export const exportForReward = query => {
|
||||
window.location.href = `/admin/luckyBagFortunate/exportForReward?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 欧气1+1-导出
|
||||
export const luckyBagFortunateExport = query => {
|
||||
window.location.href = `/admin/luckyBagFortunate/export?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
// 欧气1+1-列表
|
||||
export const luckyBagFortunatePage = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagFortunate/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 欧气1+1-保存
|
||||
export const luckyBagFortunateSave = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagFortunate/save',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 欧气1+1-上下线
|
||||
export const luckyBagFortunateUpdateEnabled = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagFortunate/updateEnabled',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 收藏-列表
|
||||
export const luckyBagCollectPage = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagCollect/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 收藏-上下线
|
||||
export const updateEnabled = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagCollect/updateEnabled',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 收藏-保存
|
||||
export const luckyBagCollectSave = query => {
|
||||
return request({
|
||||
url: '/admin/luckyBagCollect/save',
|
||||
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
// 收藏-导出
|
||||
export const luckyBagCollectExport = query => {
|
||||
window.location.href = `/admin/luckyBagCollect/export?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
@@ -21,3 +21,8 @@ export const miniGameForBaiShunExport = query => {
|
||||
window.location.href = `/admin/miniGame/baiShun/statis/export?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
|
||||
export const miniGameForBaiShunExportAll = query => {
|
||||
window.location.href = `/admin/miniGame/baiShun/statis/exportForMiniGame?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
@@ -53,4 +53,65 @@ export const update = query => {
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
};
|
||||
// 违规类型列表接口
|
||||
export const pageFun = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 违规类型列表接口
|
||||
export const listFun = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 违规类型添加接口
|
||||
export const addFun = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/add',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 编辑
|
||||
export const updateFun = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/update',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 删除
|
||||
export const delFun = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/del',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 添加违规记录
|
||||
export const addRecord = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/addRecord',
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 违规类查询
|
||||
export const listRecord = query => {
|
||||
return request({
|
||||
url: '/admin/familyMember/violation/listRecord',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 导出
|
||||
export const exportFamilyMember = query => {
|
||||
window.location.href = `/admin/family/manage/exportFamilyMember?${genQueryParam(query)}`;
|
||||
return;
|
||||
};
|
||||
|
@@ -1,177 +1,253 @@
|
||||
<template>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar" style="height: 100%; overflow: hidden; overflow: scroll;">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img :src="avatar" class="img-circle" :alt="username">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ username }}</p>
|
||||
<!-- Status -->
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- search form (Optional) -->
|
||||
<form method="get" class="sidebar-form" onsubmit="return false;">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search..." @input="search">
|
||||
<span class="input-group-btn">
|
||||
<button name="search" id="search-btn" class="btn btn-flat" @click="search">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
<!-- Sidebar Menu -->
|
||||
<ul class="sidebar-menu">
|
||||
<li class="header">主导航</li>
|
||||
<!-- Optionally, you can add icons to the links -->
|
||||
<li v-for="(parent, parentIndex) in parentMenus" :key="parent" :data-index="parentIndex" class="treeview">
|
||||
<a>
|
||||
<i :class="[parent.icon ? parent.icon : 'fa fa-link']"></i>
|
||||
<span>{{ parent.name }}</span>
|
||||
<span class="label pull-right bg-yellow" :id="['ic' + parent.id]">
|
||||
{{ getChildLength(parent.id) }}
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu" :id="['menu' + parent.id]">
|
||||
<li v-for="(child, childIndex) in getChilds(parent.id)" :key="child" :data-index="childIndex">
|
||||
<a :data-url="child.path" @click="handleClick(child)">
|
||||
<i
|
||||
:class="[child.icon && child.icon != '' ? child.icon : 'fa fa-circle-o text-yellow']"></i>
|
||||
<span>{{ child.name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.sidebar-menu -->
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper" style="height: 100%;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header"
|
||||
:style="[childMenu.name && childMenu.name != '' ? 'display:block;' : 'display:none;']">
|
||||
<h1>
|
||||
{{ childMenu.name }}
|
||||
<small>{{ childMenu.description }}</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#"><i class="fa fa-dashboard"></i> {{ childMenu.parentName }}</a></li>
|
||||
<li class="active">{{ childMenu.name }}</li>
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<!-- <section class="content" style="height: 100%; overflow: hidden; overflow: scroll;"> -->
|
||||
<!-- Your Page Content Here -->
|
||||
<component :is="componentName"></component>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<div class="modal fade" id="tipModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">提示信息</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="tipMsg"></div>
|
||||
</div>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside
|
||||
class="main-sidebar"
|
||||
style="height: 100%; overflow: hidden; overflow: scroll"
|
||||
>
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img :src="avatar" class="img-circle" :alt="username" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"
|
||||
data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">确认信息</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="confirmMsg"></div>
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ username }}</p>
|
||||
<!-- Status -->
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- search form (Optional) -->
|
||||
<form method="get" class="sidebar-form" onsubmit="return false;">
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
name="q"
|
||||
class="form-control"
|
||||
placeholder="Search..."
|
||||
@input="search"
|
||||
/>
|
||||
<span class="input-group-btn">
|
||||
<button
|
||||
name="search"
|
||||
id="search-btn"
|
||||
class="btn btn-flat"
|
||||
@click="search"
|
||||
>
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
<!-- Sidebar Menu -->
|
||||
<ul class="sidebar-menu">
|
||||
<li class="header">主导航</li>
|
||||
<!-- Optionally, you can add icons to the links -->
|
||||
<li
|
||||
v-for="(parent, parentIndex) in parentMenus"
|
||||
:key="parent"
|
||||
:data-index="parentIndex"
|
||||
class="treeview"
|
||||
>
|
||||
<a>
|
||||
<i :class="[parent.icon ? parent.icon : 'fa fa-link']"></i>
|
||||
<span>{{ parent.name }}</span>
|
||||
<span class="label pull-right bg-yellow" :id="['ic' + parent.id]">
|
||||
{{ getChildLength(parent.id) }}
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu" :id="['menu' + parent.id]">
|
||||
<li
|
||||
v-for="(child, childIndex) in getChilds(parent.id)"
|
||||
:key="child"
|
||||
:data-index="childIndex"
|
||||
>
|
||||
<a :data-url="child.path" @click="handleClick(child)">
|
||||
<i
|
||||
:class="[
|
||||
child.icon && child.icon != ''
|
||||
? child.icon
|
||||
: 'fa fa-circle-o text-yellow',
|
||||
]"
|
||||
></i>
|
||||
<span>{{ child.name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.sidebar-menu -->
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper" style="height: 100%">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section
|
||||
class="content-header"
|
||||
:style="[
|
||||
childMenu.name && childMenu.name != ''
|
||||
? 'display:block;'
|
||||
: 'display:none;',
|
||||
]"
|
||||
>
|
||||
<h1>
|
||||
{{ childMenu.name }}
|
||||
<small>{{ childMenu.description }}</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="#"
|
||||
><i class="fa fa-dashboard"></i> {{ childMenu.parentName }}</a
|
||||
>
|
||||
</li>
|
||||
<li class="active">{{ childMenu.name }}</li>
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<!-- <section class="content" style="height: 100%; overflow: hidden; overflow: scroll;"> -->
|
||||
<!-- Your Page Content Here -->
|
||||
<component :is="componentName"></component>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<div
|
||||
class="modal fade"
|
||||
id="tipModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">提示信息</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="tipMsg"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade loading" style="background: #00000040;" tabindex="-1" role="dialog"
|
||||
aria-labelledby="loadingModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="loadingGif" style="position: fixed; left:50%; top:50%;"><img src="https://img.zcool.cn/community/0111345d94b0b8a801211d53cbd04d.gif" style="width: 10%;"></div>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade"
|
||||
id="confirmModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel"
|
||||
data-backdrop="static"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">确认信息</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="confirmMsg"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="modal fade loading"
|
||||
style="background: #00000040"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="loadingModalLabel"
|
||||
aria-hidden="true"
|
||||
data-backdrop="static"
|
||||
data-keyboard="false"
|
||||
>
|
||||
<div class="loadingGif" style="position: fixed; left: 50%; top: 50%">
|
||||
<img
|
||||
src="https://img.zcool.cn/community/0111345d94b0b8a801211d53cbd04d.gif"
|
||||
style="width: 10%"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from '@/store';
|
||||
import { getStore } from '@/utils/store';
|
||||
import store from "@/store";
|
||||
import Vue from "vue";
|
||||
import { getStore } from "@/utils/store";
|
||||
|
||||
export default {
|
||||
name: 'MaintainerView',
|
||||
data() {
|
||||
return {
|
||||
componentName: "",
|
||||
username: "",
|
||||
avatar: "",
|
||||
parentMenus: [],
|
||||
childMenus: [],
|
||||
childMenu: {
|
||||
name: "",
|
||||
parentName: "",
|
||||
description: "",
|
||||
}
|
||||
};
|
||||
name: "MaintainerView",
|
||||
data() {
|
||||
return {
|
||||
componentName: "",
|
||||
username: "",
|
||||
avatar: "",
|
||||
parentMenus: [],
|
||||
childMenus: [],
|
||||
childMenu: {
|
||||
name: "",
|
||||
parentName: "",
|
||||
description: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getMenu();
|
||||
this.username = store.getters.username;
|
||||
this.avatar = store.getters.avatar;
|
||||
},
|
||||
methods: {
|
||||
getMenu() {
|
||||
this.parentMenus = getStore({ name: "parent_menus" });
|
||||
this.childMenus = getStore({ name: "child_menus" });
|
||||
store.dispatch("getMenu").then((res) => {
|
||||
this.parentMenus = res.parents;
|
||||
this.childMenus = res.childs;
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.getMenu();
|
||||
this.username = store.getters.username;
|
||||
this.avatar = store.getters.avatar;
|
||||
getChilds(parentId) {
|
||||
return this.childMenus.filter((v) => v.parentid == parentId);
|
||||
},
|
||||
methods: {
|
||||
getMenu() {
|
||||
this.parentMenus = getStore({ name: 'parent_menus' });
|
||||
this.childMenus = getStore({ name: 'child_menus' });
|
||||
store.dispatch('getMenu').then(res => {
|
||||
this.parentMenus = res.parents;
|
||||
this.childMenus = res.childs;
|
||||
});
|
||||
},
|
||||
getChilds(parentId) {
|
||||
return this.childMenus.filter(v => v.parentid == parentId);
|
||||
},
|
||||
getChildLength(parentId) {
|
||||
return this.childMenus.filter(v => v.parentid == parentId).length;
|
||||
},
|
||||
handleClick(menu) {
|
||||
this.childMenu.name = menu.name;
|
||||
this.childMenu.parentName = menu.parentstr;
|
||||
this.childMenu.description = menu.description;
|
||||
store.dispatch('getViewComponent', menu.path).then(componentName => {
|
||||
console.log(componentName);
|
||||
this.componentName = componentName;
|
||||
});
|
||||
},
|
||||
search() {
|
||||
let text = $("input[type='text']").val();
|
||||
this.childMenus = store.getters.childMenus.filter(v => v.name.indexOf(text) >= 0);
|
||||
if (!this.childMenus.length || this.childMenus.length == 0) {
|
||||
this.parentMenus = store.getters.parentMenus.filter(v => v.name.indexOf(text) >= 0);
|
||||
} else {
|
||||
let parentIds = this.childMenus.map(v => v.parentid);
|
||||
let parentMenus = store.getters.parentMenus.filter(v => v.name.indexOf(text) >= 0);
|
||||
if (parentMenus && parentMenus.length > 0) {
|
||||
parentMenus.forEach(v => {
|
||||
parentIds.push(v.id);
|
||||
});
|
||||
}
|
||||
this.parentMenus = store.getters.parentMenus.filter(v1 => parentIds.filter(v2 => v1.id == v2).length > 0);
|
||||
}
|
||||
getChildLength(parentId) {
|
||||
return this.childMenus.filter((v) => v.parentid == parentId).length;
|
||||
},
|
||||
handleClick(menu) {
|
||||
this.childMenu.name = menu.name;
|
||||
this.childMenu.parentName = menu.parentstr;
|
||||
this.childMenu.description = menu.description;
|
||||
store.dispatch("getViewComponent", menu.path).then((componentName) => {
|
||||
this.componentName = componentName;
|
||||
const files = require.context("@/views", true, /\.vue$/);
|
||||
let components = {};
|
||||
files.keys().forEach((key) => {
|
||||
components[key.replace(/(\.\/|\.vue)/g, "")] = files(key).default;
|
||||
});
|
||||
});
|
||||
},
|
||||
search() {
|
||||
let text = $("input[type='text']").val();
|
||||
this.childMenus = store.getters.childMenus.filter(
|
||||
(v) => v.name.indexOf(text) >= 0
|
||||
);
|
||||
if (!this.childMenus.length || this.childMenus.length == 0) {
|
||||
this.parentMenus = store.getters.parentMenus.filter(
|
||||
(v) => v.name.indexOf(text) >= 0
|
||||
);
|
||||
} else {
|
||||
let parentIds = this.childMenus.map((v) => v.parentid);
|
||||
let parentMenus = store.getters.parentMenus.filter(
|
||||
(v) => v.name.indexOf(text) >= 0
|
||||
);
|
||||
if (parentMenus && parentMenus.length > 0) {
|
||||
parentMenus.forEach((v) => {
|
||||
parentIds.push(v.id);
|
||||
});
|
||||
}
|
||||
this.parentMenus = store.getters.parentMenus.filter(
|
||||
(v1) => parentIds.filter((v2) => v1.id == v2).length > 0
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '@/css/main.css';
|
||||
@import "@/css/main.css";
|
||||
</style>
|
@@ -41,7 +41,7 @@ export function buildSelectOption(id, defVal, array) {
|
||||
let $select = $(id);
|
||||
let children = $select.children();
|
||||
if (children && children.length > 0) {
|
||||
return;
|
||||
$select.empty();
|
||||
}
|
||||
for(let i in array) {
|
||||
let obj = array[i];
|
||||
|
@@ -56,6 +56,7 @@ export default {
|
||||
{ field: 'partitionDesc', title: '所属地区', align: 'center', width: '15%' },
|
||||
{ field: 'payMoneyNum', title: '付费金额(金币)', align: 'center', width: '15%' },
|
||||
{ field: 'createTime', title: '付费日期', align: 'center', width: '15%' },
|
||||
{ field: 'content', title: '头条内容', align: 'center', width: '15%' },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
@@ -227,6 +227,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-3 control-label">动效类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="type" id="type" class="form-control">
|
||||
<option value="0">图片</option>
|
||||
<option value="1">SVGA</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="seq" class="col-sm-3 control-label">排序:</label>
|
||||
<div class="col-sm-9">
|
||||
@@ -669,6 +679,7 @@ export default {
|
||||
$('input[name="partitionFlag"]').each(function() {
|
||||
$(this).checked = false;
|
||||
});
|
||||
$('#type').val(0);
|
||||
$("#headwearModal").modal('show');
|
||||
});
|
||||
|
||||
@@ -703,6 +714,7 @@ export default {
|
||||
var radishOriginalPrice = $("#radishOriginalPrice").val();
|
||||
var radishPrice = $("#radishPrice").val();
|
||||
var radishRenewPrice = $("#radishRenewPrice").val();
|
||||
var type = $('#type').val();
|
||||
|
||||
//分区
|
||||
const partitionFlagArray = $("input:checkbox[name='partitionFlag']:checked").serializeArray();
|
||||
@@ -771,6 +783,7 @@ export default {
|
||||
radishPrice: radishPrice,
|
||||
radishRenewPrice: radishRenewPrice,
|
||||
partitionFlag: partitionFlag,
|
||||
type: type,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
@@ -830,6 +843,7 @@ export default {
|
||||
$("#radishRenewPrice").val(json.radishRenewPrice);
|
||||
$("#radishOriginalPrice").val(json.radishOriginalPrice);
|
||||
|
||||
$('#type').val(json.type);
|
||||
$("#enable").checked = json.enable;
|
||||
|
||||
if (json.goldSale == true) {
|
||||
|
1108
src/views/luckyTycoon/luckyTycoonCollectSet.vue
Normal file
1108
src/views/luckyTycoon/luckyTycoonCollectSet.vue
Normal file
File diff suppressed because it is too large
Load Diff
440
src/views/luckyTycoon/luckyTycoonListStatistics.vue
Normal file
440
src/views/luckyTycoon/luckyTycoonListStatistics.vue
Normal file
@@ -0,0 +1,440 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
<div class="block">
|
||||
<span class="demonstration">周期</span>
|
||||
<el-select
|
||||
filterable
|
||||
v-model="inquire.rankDateType"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="block">
|
||||
<span class="demonstration">地区</span>
|
||||
<el-select
|
||||
filterable
|
||||
v-model="inquire.partitionId"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.options2"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 导出按钮 -->
|
||||
<el-button class="primary" type="primary" @click="deriveDialog = true"
|
||||
>导出</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="count" align="center" label="总人数" />
|
||||
<el-table-column prop="num" align="center" label="总次数" />
|
||||
<el-table-column
|
||||
prop="totalPlatformValue"
|
||||
align="center"
|
||||
label="实力代言值"
|
||||
/>
|
||||
<el-table-column prop="totalPlatformValue" align="center" label="人气代言值" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="showDetailDialog(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<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"
|
||||
/>
|
||||
|
||||
<!-- 筛选导出弹窗 -->
|
||||
<el-dialog v-model="deriveDialog" title="导出" width="28%" center>
|
||||
<!-- 榜单数据 -->
|
||||
<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 filterable v-model="deriveObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in deriveObj.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 选择时间 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>选择时间</span
|
||||
>
|
||||
<div class="inquire">
|
||||
<el-date-picker
|
||||
v-model="deriveObj.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 60%"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="deriveDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="deriveOut()"> 确认导出 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 详情导出弹窗 -->
|
||||
<el-dialog v-model="detialDialog" title="榜单详情">
|
||||
<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
|
||||
filterable
|
||||
v-model="detialObj.value"
|
||||
placeholder="请选择"
|
||||
style="display: inline-block; margin-right: 10px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in detialObj.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
@click="detialQuery()"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
<el-table border style="width: 100%" :data="detialObj.tableData">
|
||||
<el-table-column property="seqNo" label="排名" />
|
||||
<el-table-column property="erbanNo" label="用户ID" />
|
||||
<el-table-column property="nick" label="用户昵称" />
|
||||
<el-table-column property="total" label="值" />
|
||||
</el-table>
|
||||
<el-button
|
||||
class="dialogTableVisibleBut"
|
||||
type="primary"
|
||||
@click="detialDialogClick()"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage2"
|
||||
v-model:page-size="pageSize2"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total2"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
luckyBagWeekRankList,
|
||||
listPartitionInfo,
|
||||
exportList,
|
||||
luckyBagWeekRankListRank,
|
||||
exportRank,
|
||||
} from "@/api/luckyTycoon/luckyTycoon";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "luckyTycoonListStatistics",
|
||||
data() {
|
||||
return {
|
||||
inquire: {
|
||||
giftId: "",
|
||||
userId: "",
|
||||
time: [], // 添加time属性,并初始化为空数组
|
||||
rankDateType: "",
|
||||
options: [
|
||||
{
|
||||
value: "1",
|
||||
label: "天",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "周",
|
||||
},
|
||||
],
|
||||
partitionId: "",
|
||||
options2: [],
|
||||
},
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
total2: 20, //总页数
|
||||
currentPage2: 1, //页码
|
||||
pageSize2: 20, //条数
|
||||
//导出
|
||||
deriveDialog: false,
|
||||
deriveObj: {
|
||||
value: "",
|
||||
time: "", // 添加time属性
|
||||
options: [
|
||||
{
|
||||
value: "2",
|
||||
label: "实力代言榜",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "人气代言榜",
|
||||
},
|
||||
],
|
||||
},
|
||||
//详情导出
|
||||
detialDialog: false,
|
||||
detialNewObj: {},
|
||||
detialObj: {
|
||||
tableData: [],
|
||||
value: "",
|
||||
options: [
|
||||
{
|
||||
value: "2",
|
||||
label: "实力代言榜",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "人气代言榜",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listPartitionInfo().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.inquire.options2 = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.inquire.time && this.inquire.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");
|
||||
}
|
||||
luckyBagWeekRankList({
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
rankDateType: this.inquire.rankDateType,
|
||||
partitionId: this.inquire.partitionId,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
deriveOut() {
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.deriveObj.time && this.deriveObj.time.length > 0) {
|
||||
startTime = dateFormat(this.deriveObj.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.deriveObj.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
var obj = {
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
rankDateType: this.inquire.rankDateType,
|
||||
partitionId: this.inquire.partitionId,
|
||||
};
|
||||
console.log(obj);
|
||||
exportList(obj).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.deriveDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
this.deriveDialog = false;
|
||||
},
|
||||
detialQuery() {
|
||||
luckyBagWeekRankListRank({
|
||||
date: this.detialNewObj.date,
|
||||
rankType: this.detialObj.value,
|
||||
rankDateType: this.inquire.rankDateType,
|
||||
partitionId: this.inquire.partitionId,
|
||||
pageSize: this.pageSize2,
|
||||
page: this.currentPage2,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
var arr = [];
|
||||
arr = res.data.rows;
|
||||
res.data.rows.forEach((res, i) => {
|
||||
arr[i].seqNo = i + 1;
|
||||
});
|
||||
this.detialObj.tableData = arr;
|
||||
this.total2 = res.data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
detialDialogClick() {
|
||||
var obj = {
|
||||
date: this.detialNewObj.date,
|
||||
rankType: this.detialObj.value,
|
||||
rankDateType: this.inquire.rankDateType,
|
||||
partitionId: this.inquire.partitionId,
|
||||
};
|
||||
exportRank(obj).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.detialDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleSizeChange2() {
|
||||
this.detialQuery();
|
||||
},
|
||||
handleCurrentChange2() {
|
||||
this.detialQuery();
|
||||
},
|
||||
showDetailDialog(row) {
|
||||
this.detialNewObj = row;
|
||||
this.detialObj.tableData = [];
|
||||
this.detialObj.value = '';
|
||||
this.detialDialog = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box {
|
||||
padding-top: 20px;
|
||||
background: #ecf0f5;
|
||||
.inquire {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
.block {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 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>
|
768
src/views/luckyTycoon/luckyTycoonOnePlusOne.vue
Normal file
768
src/views/luckyTycoon/luckyTycoonOnePlusOne.vue
Normal file
@@ -0,0 +1,768 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="add()">新增</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="partitionDesc" align="center" label="地区" />
|
||||
<el-table-column prop="destGiftId" align="center" label="礼物id" />
|
||||
<el-table-column prop="luckyBagName" align="center" label="福袋名称" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="giftInfo"
|
||||
label="福袋图片"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.luckyBagPic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.luckyBagPic]"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="添加时间" />
|
||||
<el-table-column prop="destGiftName" align="center" label="礼物名称" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="giftInfo"
|
||||
label="礼物图片"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.destGiftPic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.destGiftPic]"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="destGiftPrice" align="center" label="礼物价值" />
|
||||
<el-table-column
|
||||
prop="rewardGiftName"
|
||||
align="center"
|
||||
label="奖励礼物昵称"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="giftInfo"
|
||||
label="奖励礼物图片"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.rewardGiftPic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.rewardGiftPic]"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="rewardGiftPrice"
|
||||
align="center"
|
||||
label="奖励礼物价值"
|
||||
/>
|
||||
<el-table-column prop="dayLimit" align="center" label="每日库存" />
|
||||
<el-table-column prop="totalLimit" align="center" label="总库存" />
|
||||
<el-table-column
|
||||
prop="todayResideStock"
|
||||
align="center"
|
||||
label="今日剩余库存"
|
||||
/>
|
||||
<el-table-column prop="grantStock" align="center" label="已发放库存数量" />
|
||||
<el-table-column prop="seqNo" align="center" label="排序" />
|
||||
|
||||
<el-table-column align="center" label="操作" width="240px">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="eid(scope)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="
|
||||
delDialog = true;
|
||||
delDialogObj = scope.row;
|
||||
"
|
||||
:class="scope.row.isEnabled == 1 ? 'danger' : 'primary'"
|
||||
:type="scope.row.isEnabled == 1 ? 'danger' : 'primary'"
|
||||
size="default"
|
||||
>{{ scope.row.isEnabled == 1 ? "下线" : "上线" }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="
|
||||
deriveDialog = true;
|
||||
deriveObjNew = scope.row;
|
||||
"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<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"
|
||||
/>
|
||||
|
||||
<!-- 导出弹窗 -->
|
||||
<el-dialog v-model="deriveDialog" title="导出" width="28%" center>
|
||||
<!-- 榜单数据 -->
|
||||
<!-- <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="deriveObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in deriveObj.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div> -->
|
||||
<!-- 选择时间 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>选择时间</span
|
||||
>
|
||||
<div class="inquire">
|
||||
<el-date-picker
|
||||
v-model="deriveObj.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 60%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="deriveDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="deriveOut()"> 确认导出 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增&编辑弹窗 -->
|
||||
<el-dialog
|
||||
class="pub"
|
||||
v-model="controlsDialog"
|
||||
:title="controlsTitle"
|
||||
width="36%"
|
||||
center
|
||||
>
|
||||
<!-- 地区选择 -->
|
||||
<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 filterable v-model="controlsObj.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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 filterable v-model="controlsObj.value2" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options2"
|
||||
:key="item.giftId"
|
||||
:label="JsonFunc(item.giftName)"
|
||||
:value="item.giftId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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="controlsObj.cost"
|
||||
placeholder=""
|
||||
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-select filterable v-model="controlsObj.value3" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options3"
|
||||
:key="item.giftId"
|
||||
:label="item.giftName"
|
||||
:value="item.giftId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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="controlsObj.cost2"
|
||||
placeholder=""
|
||||
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-select filterable v-model="controlsObj.value4" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options4"
|
||||
:key="item.giftId"
|
||||
:label="JsonFunc(item.giftName)"
|
||||
:value="item.giftId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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="controlsObj.cost3"
|
||||
placeholder=""
|
||||
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="controlsObj.inventory"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></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="controlsObj.inventoryAll"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></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="controlsObj.sort"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></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-select filterable v-model="controlsObj.value5" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in controlsObj.options5"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 选择时间 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label"
|
||||
>选择时间</span
|
||||
>
|
||||
<div class="inquire">
|
||||
<el-date-picker
|
||||
v-model="controlsObj.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 66%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="controlsDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="controlsDialogOut()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二次确认弹窗 -->
|
||||
<el-dialog v-model="delDialog" title="提示" width="30%" center>
|
||||
<span> 确定要进行该操作吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
listPartitionInfo,
|
||||
listLuckyBagLinearGift,
|
||||
luckyBagFortunatePage,
|
||||
getPrizeGroupsInfo,
|
||||
getAll,
|
||||
luckyBagFortunateExport,
|
||||
luckyBagFortunateSave,
|
||||
luckyBagFortunateUpdateEnabled,
|
||||
} from "@/api/luckyTycoon/luckyTycoon";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "luckyTycoonOnePlusOne",
|
||||
created() {
|
||||
listPartitionInfo().then((res) => {
|
||||
this.controlsObj.options = res.data;
|
||||
});
|
||||
listLuckyBagLinearGift({
|
||||
giftTypes: "3,15",
|
||||
}).then((res) => {
|
||||
this.controlsObj.options2 = res.data;
|
||||
});
|
||||
this.getData();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
delDialog: false,
|
||||
delDialogObj: {},
|
||||
foundIndexFunVal: "",
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数//导出
|
||||
deriveDialog: false,
|
||||
deriveObjNew: {},
|
||||
deriveObj: {
|
||||
value: "",
|
||||
time: "",
|
||||
options: [
|
||||
{
|
||||
value: "1",
|
||||
label: "英语区",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "阿拉伯区",
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
label: "华语区",
|
||||
},
|
||||
],
|
||||
},
|
||||
controlsDialog: false,
|
||||
controlsDialogType: 1, //1新增 2编辑
|
||||
controlsTitle: "编辑&新增",
|
||||
controlsObj: {
|
||||
// 地区选择
|
||||
value: "",
|
||||
options: [],
|
||||
// 福袋礼物选择
|
||||
value2: "",
|
||||
options2: [],
|
||||
cost: "",
|
||||
value3: "",
|
||||
options3: [],
|
||||
cost2: "",
|
||||
value4: "",
|
||||
options4: [],
|
||||
cost3: "",
|
||||
inventory: "",
|
||||
inventoryAll: "",
|
||||
sort: "",
|
||||
value5: 1,
|
||||
options5: [
|
||||
{
|
||||
value: 1,
|
||||
label: "是",
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
],
|
||||
time: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"controlsObj.value2": function (newValue, oldValue) {
|
||||
this.controlsObj.cost = this.foundIndexFun(
|
||||
newValue,
|
||||
this.controlsObj.options2,
|
||||
1
|
||||
);
|
||||
getPrizeGroupsInfo({ luckyBagId: this.controlsObj.value2 }).then(
|
||||
(res) => {
|
||||
var newArr = [];
|
||||
res.data.highPrizeGroup.forEach((val) => {
|
||||
newArr.push(val);
|
||||
});
|
||||
res.data.normalPrizeGroup.forEach((val) => {
|
||||
newArr.push(val);
|
||||
});
|
||||
this.controlsObj.options3 = newArr;
|
||||
}
|
||||
);
|
||||
},
|
||||
"controlsObj.value3": function (newValue, oldValue) {
|
||||
if (this.watchType) {
|
||||
return;
|
||||
}
|
||||
this.controlsObj.cost2 = this.foundIndexFun(
|
||||
newValue,
|
||||
this.controlsObj.options3,
|
||||
2
|
||||
);
|
||||
},
|
||||
"controlsObj.value4": function (newValue, oldValue) {
|
||||
if (this.watchType) {
|
||||
return;
|
||||
}
|
||||
this.controlsObj.cost3 = this.foundIndexFun(
|
||||
newValue,
|
||||
this.controlsObj.options4,
|
||||
1
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.loading = true;
|
||||
luckyBagFortunatePage({
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.tableData = res.data.records;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
getAll().then((res) => {
|
||||
this.controlsObj.options4 = res.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
add() {
|
||||
this.controlsDialog = true;
|
||||
this.controlsTitle = "新增";
|
||||
this.controlsDialogType = 1;
|
||||
// this.controlsObj = {
|
||||
// // 地区选择
|
||||
// value: "",
|
||||
// options: [],
|
||||
// // 福袋礼物选择
|
||||
// value2: "",
|
||||
// options2: [],
|
||||
// cost: "",
|
||||
// value3: "",
|
||||
// options3: [],
|
||||
// cost2: "",
|
||||
// value4: "",
|
||||
// options4: [],
|
||||
// cost3: "",
|
||||
// inventory: "",
|
||||
// inventoryAll: "",
|
||||
// sort: "",
|
||||
// value5: 1,
|
||||
// options5: [
|
||||
// {
|
||||
// value: 1,
|
||||
// label: "是",
|
||||
// },
|
||||
// {
|
||||
// value: 2,
|
||||
// label: "否",
|
||||
// },
|
||||
// ],
|
||||
// time: "",
|
||||
// };
|
||||
},
|
||||
eid(scope) {
|
||||
var res = scope.row;
|
||||
this.deriveObjNew = scope.row;
|
||||
this.controlsTitle = "编辑";
|
||||
this.controlsDialogType = 2;
|
||||
this.foundIndexFunVal = res.rewardGiftId;
|
||||
this.controlsObj.value = res.partitionId;
|
||||
this.controlsObj.value2 = res.luckyBagId;
|
||||
getPrizeGroupsInfo({ luckyBagId: this.controlsObj.value2 }).then(
|
||||
(resArr) => {
|
||||
var newArr = [];
|
||||
resArr.data.highPrizeGroup.forEach((val) => {
|
||||
newArr.push(val);
|
||||
});
|
||||
resArr.data.normalPrizeGroup.forEach((val) => {
|
||||
newArr.push(val);
|
||||
});
|
||||
this.controlsObj.options3 = newArr;
|
||||
this.controlsObj.value3 = res.destGiftId;
|
||||
// this.controlsObj.cost = res.luckyBagPrice;
|
||||
// this.controlsObj.cost2 = res.destGiftId;
|
||||
this.controlsObj.value4 = res.rewardGiftId;
|
||||
// this.controlsObj.cost3 = res.rewardGiftPrice;
|
||||
this.controlsObj.inventory = res.dayLimit;
|
||||
this.controlsObj.inventoryAll = res.totalLimit;
|
||||
this.controlsObj.sort = res.seqNo;
|
||||
this.controlsObj.value5 = res.isEnabled;
|
||||
this.controlsObj.time[0] = res.startTime;
|
||||
this.controlsObj.time[1] = res.endTime;
|
||||
this.controlsDialog = true;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 保存
|
||||
controlsDialogOut() {
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.controlsObj.time && this.controlsObj.time.length > 0) {
|
||||
startTime = dateFormat(this.controlsObj.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.controlsObj.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
if (this.controlsDialogType == 1) {
|
||||
luckyBagFortunateSave({
|
||||
partitionId: this.controlsObj.value,
|
||||
luckyBagId: this.controlsObj.value2,
|
||||
destGiftId: this.controlsObj.value3,
|
||||
rewardGiftId: this.controlsObj.value4,
|
||||
dayLimit: this.controlsObj.inventory,
|
||||
totalLimit: this.controlsObj.inventoryAll,
|
||||
seqNo: this.controlsObj.sort,
|
||||
isEnabled: this.controlsObj.value5,
|
||||
startTime,
|
||||
endTime,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.controlsDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
luckyBagFortunateSave({
|
||||
partitionId: this.controlsObj.value,
|
||||
luckyBagId: this.controlsObj.value2,
|
||||
destGiftId: this.controlsObj.value3,
|
||||
rewardGiftId: this.controlsObj.value4,
|
||||
dayLimit: this.controlsObj.inventory,
|
||||
totalLimit: this.controlsObj.inventoryAll,
|
||||
seqNo: this.controlsObj.sort,
|
||||
isEnabled: this.controlsObj.value5,
|
||||
id: this.deriveObjNew.id,
|
||||
startTime,
|
||||
endTime,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.controlsDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 导出
|
||||
deriveOut() {
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.deriveObj.time && this.deriveObj.time.length > 0) {
|
||||
startTime = dateFormat(this.deriveObj.time[0], "yyyy-MM-dd hh:mm:ss");
|
||||
endTime = dateFormat(this.deriveObj.time[1], "yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
luckyBagFortunateExport({
|
||||
fortunateId: this.deriveObjNew.id,
|
||||
partitionId: this.deriveObjNew.partitionId,
|
||||
startTime,
|
||||
endTime,
|
||||
}).then((res) => {});
|
||||
},
|
||||
// 上下线
|
||||
delClick() {
|
||||
luckyBagFortunateUpdateEnabled({
|
||||
fortunateId: this.delDialogObj.id,
|
||||
isEnabled: this.delDialogObj.isEnabled == 1 ? 0 : 1,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.delDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.getData();
|
||||
},
|
||||
foundIndexFun(val, arr, type) {
|
||||
var i;
|
||||
i = arr.findIndex((item) => item.giftId === val);
|
||||
return type == 1 ? arr[i].goldPrice : arr[i].platformValue;
|
||||
},
|
||||
JsonFunc(val) {
|
||||
var res = JSON.parse(val);
|
||||
return res.zh;
|
||||
},
|
||||
},
|
||||
};
|
||||
</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;
|
||||
}
|
||||
}
|
||||
.pub {
|
||||
.input {
|
||||
width: 55%;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
220
src/views/luckyTycoon/luckyTycoonUserWinningRecord.vue
Normal file
220
src/views/luckyTycoon/luckyTycoonUserWinningRecord.vue
Normal file
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>奖励礼物id</span>
|
||||
<el-input
|
||||
v-model="inquire.giftId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>用户id</span>
|
||||
<el-input
|
||||
v-model="inquire.userId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 导出按钮 -->
|
||||
<el-button class="primary" type="primary" @click="derive()">导出</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="createTimeStr" align="center" label="时间" />
|
||||
<el-table-column prop="sendErBanNo" align="center" label="送礼人id" />
|
||||
<el-table-column prop="sendNick" align="center" label="送礼人昵称" />
|
||||
<el-table-column prop="receiveErBanNo" align="center" label="收礼人id" />
|
||||
<el-table-column prop="receiveNick" align="center" label="收礼人昵称" />
|
||||
<el-table-column prop="luckyBagId" align="center" label="福袋id" />
|
||||
<el-table-column prop="luckyBagName" align="center" label="福袋昵称" />
|
||||
<el-table-column prop="destGiftName" align="center" label="礼物名称" />
|
||||
<el-table-column prop="luckyBagPrice" align="center" label="福袋流水" />
|
||||
<el-table-column prop="rewardGiftName" align="center" label="奖励名称">
|
||||
<template #default="{ row }">
|
||||
{{ row.rewardGiftName || "/" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rewardGiftPrice" align="center" label="奖励价值">
|
||||
<template #default="{ row }">
|
||||
{{ row.rewardGiftPrice || "/" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="x" align="center" label="该用户是否中奖">
|
||||
<template #default="{ row }">
|
||||
{{ row.x ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<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"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRecordPage, exportForReward } from "@/api/luckyTycoon/luckyTycoon";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "luckyTycoonUserWinningRecord",
|
||||
data() {
|
||||
return {
|
||||
inquire: {
|
||||
giftId: "",
|
||||
userId: "",
|
||||
time: "",
|
||||
},
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.inquire.time && this.inquire.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");
|
||||
}
|
||||
getRecordPage({
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
rewardGiftId: this.inquire.giftId,
|
||||
erBanNo: this.inquire.userId,
|
||||
startTime,
|
||||
endTime,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
derive() {
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.inquire.time && this.inquire.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");
|
||||
}
|
||||
exportForReward({
|
||||
rewardGiftId: this.inquire.giftId,
|
||||
erBanNo: this.inquire.userId,
|
||||
startTime,
|
||||
endTime,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
// 可以添加导出成功的提示信息
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "导出失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("导出请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "导出请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(size) {
|
||||
this.pageSize = size;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
this.currentPage = page;
|
||||
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;
|
||||
}
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -28,6 +28,9 @@
|
||||
<button id="btnSearch" class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
<button id="btnExportAll" class="btn btn-sm btn-primary">
|
||||
导出
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section><!-- .content -->
|
||||
@@ -60,7 +63,7 @@
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
import { miniGameForBaiShunPage, miniGameForBaiShunDetailPage, miniGameForBaiShunExport } from '@/api/miniGame/miniGameForBaiShun';
|
||||
import { miniGameForBaiShunPage, miniGameForBaiShunDetailPage, miniGameForBaiShunExport, miniGameForBaiShunExportAll } from '@/api/miniGame/miniGameForBaiShun';
|
||||
import { getConfigValueByKey } from '@/api/system/sysconf';
|
||||
import { buildSelectOption } from '@/utils/system-helper';
|
||||
|
||||
@@ -146,6 +149,9 @@ export default {
|
||||
$('#btnExport').click(function () {
|
||||
$this.export();
|
||||
});
|
||||
$('#btnExportAll').click(function () {
|
||||
$this.exportForAll();
|
||||
});
|
||||
});
|
||||
},
|
||||
initTable() {
|
||||
@@ -249,6 +255,13 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
exportForAll() {
|
||||
miniGameForBaiShunExportAll({
|
||||
gameId: $('#gameId').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val(),
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@@ -110,11 +110,24 @@
|
||||
<label class="radio-inline"><input type="radio" name="isCustomWord" value="1">是</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="fixedWord-div">
|
||||
<label for="fixedWord" class="col-sm-4 control-label">固定文案:</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="fixedWord" id="fixedWord"
|
||||
placeholder="请输入,5个字符内">
|
||||
<div id="fixedWord-div">
|
||||
<div class="form-group">
|
||||
<label for="zhFixedWord" class="col-sm-4 control-label">华语固定文案:</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="zhFixedWord" id="zhFixedWord">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="arFixedWord" class="col-sm-4 control-label">阿语固定文案:</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="arFixedWord" id="arFixedWord">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="enFixedWord" class="col-sm-4 control-label">英语固定文案:</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="enFixedWord" id="enFixedWord">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -269,7 +282,7 @@ export default {
|
||||
},
|
||||
{ field: 'isCustomWordStr', title: '是否自定义文案', align: 'middle', width: '5%' },
|
||||
{
|
||||
field: 'fixedWord',
|
||||
field: 'fixedWord.zh',
|
||||
title: '固定文案',
|
||||
align: 'middle',
|
||||
width: '5%',
|
||||
@@ -281,6 +294,32 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fixedWord.ar',
|
||||
title: '阿语固定文案',
|
||||
align: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (isEmpty(val)) {
|
||||
return '/';
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fixedWord.en',
|
||||
title: '英语固定文案',
|
||||
align: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (isEmpty(val)) {
|
||||
return '/';
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'days', title: '有效期(天)', align: 'middle', width: '5%' },
|
||||
{ field: 'statusStr', title: '状态', align: 'middle', width: '5%' },
|
||||
{ field: 'typeStr', title: '铭牌款式', align: 'middle', width: '5%' },
|
||||
@@ -351,16 +390,26 @@ export default {
|
||||
console.log(res);
|
||||
request.success({
|
||||
"rows": res.rows.map(i=>{
|
||||
let value = i.name;
|
||||
if (value.startsWith('{') && value.endsWith('}')) {
|
||||
let nameValue = i.name;
|
||||
if (nameValue && nameValue.startsWith('{') && nameValue.endsWith('}')) {
|
||||
i.name = JSON.parse(i.name);
|
||||
} else {
|
||||
i.name = {
|
||||
zh: value,
|
||||
ar: value,
|
||||
en: value,
|
||||
zh: nameValue,
|
||||
ar: nameValue,
|
||||
en: nameValue,
|
||||
};
|
||||
}
|
||||
let fixedWordValue = i.fixedWord;
|
||||
if (fixedWordValue && fixedWordValue.startsWith('{') && fixedWordValue.endsWith('}')) {
|
||||
i.fixedWord = JSON.parse(i.fixedWord);
|
||||
} else {
|
||||
i.fixedWord = {
|
||||
zh: fixedWordValue,
|
||||
ar: fixedWordValue,
|
||||
en: fixedWordValue,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
}),
|
||||
"total": res.total
|
||||
@@ -399,7 +448,7 @@ export default {
|
||||
$("#id").val(json.id);
|
||||
$("#nameplateType1").val(json.nameplateType);
|
||||
let name = json.name;
|
||||
if (name.startsWith('{') && name.endsWith('}')) {
|
||||
if (name && name.startsWith('{') && name.endsWith('}')) {
|
||||
var jsonName = JSON.parse(json.name);
|
||||
console.log(jsonName)
|
||||
$("#name1").val(jsonName.zh);
|
||||
@@ -410,19 +459,28 @@ export default {
|
||||
$("#ar_name1").val(name);
|
||||
$("#en_name1").val(name);
|
||||
}
|
||||
|
||||
let fixedWord = json.fixedWord;
|
||||
if (fixedWord && fixedWord.startsWith('{') && fixedWord.endsWith('}')) {
|
||||
let jsonValue = JSON.parse(json.fixedWord);
|
||||
$('#zhFixedWord').val(jsonValue.zh);
|
||||
$('#arFixedWord').val(jsonValue.ar);
|
||||
$('#enFixedWord').val(jsonValue.en);
|
||||
} else {
|
||||
$('#zhFixedWord').val(fixedWord);
|
||||
$('#arFixedWord').val(fixedWord);
|
||||
$('#enFixedWord').val(fixedWord);
|
||||
}
|
||||
$('#nameplateType1').attr("disabled", "true");
|
||||
if (!json.isCustomWord) {
|
||||
$('input[name="isCustomWord"]').get(0).checked = true;
|
||||
$('#fixedWord-div').addClass("hidden");
|
||||
$('#zhFixedWord').val('');
|
||||
$('#arFixedWord').val('');
|
||||
$('#enFixedWord').val('');
|
||||
} else {
|
||||
$('input[name="isCustomWord"]').get(1).checked = true;
|
||||
$('#fixedWord-div').removeClass("hidden");
|
||||
$('#fixedWord').val('');
|
||||
}
|
||||
|
||||
//$('input[name="isCustomWord"]').val(json.isCustomWord);
|
||||
$("#fixedWord").val(json.fixedWord);
|
||||
$("#days").val(json.days);
|
||||
$("#status1").val(json.status);
|
||||
$("#type1").val(json.type);
|
||||
@@ -492,7 +550,14 @@ export default {
|
||||
var status = $('#status1').val();
|
||||
var type = $('#type1').val();
|
||||
var days = $('#days').val();
|
||||
var fixedWord = $('#fixedWord').val();
|
||||
var zhFixedWord = $('#zhFixedWord').val();
|
||||
var arFixedWord = $('#arFixedWord').val();
|
||||
var enFixedWord = $('#enFixedWord').val();
|
||||
let fixedWordValue = '';
|
||||
if (!(zhFixedWord == '' && arFixedWord == '' && enFixedWord == '')) {
|
||||
let jsonFixedWord = {'zh': zhFixedWord, 'ar': arFixedWord, 'en': enFixedWord};
|
||||
fixedWordValue = JSON.stringify(jsonFixedWord);
|
||||
}
|
||||
var isCustomWord = $('input[name="isCustomWord"]:checked').val();
|
||||
var name = $('#name1').val();
|
||||
var ar_name = $('#ar_name1').val();
|
||||
@@ -561,7 +626,7 @@ export default {
|
||||
nameplateType: nameplateType,
|
||||
name: nameValue,
|
||||
isCustomWord: isCustomWord,
|
||||
fixedWord: fixedWord,
|
||||
fixedWord: fixedWordValue,
|
||||
days: days,
|
||||
status: status,
|
||||
type: type,
|
||||
@@ -703,7 +768,9 @@ function cleanNamePlateModal() {
|
||||
$('#status1').val('');
|
||||
$('#type1').val('');
|
||||
$('#days').val('');
|
||||
$('#fixedWord').val('');
|
||||
$('#zhFixedWord').val('');
|
||||
$('#arFixedWord').val('');
|
||||
$('#enFixedWord').val('');
|
||||
$('input[name="isCustomWord"]').each(function () {
|
||||
$(this).removeAttr("checked");
|
||||
});
|
||||
@@ -794,4 +861,4 @@ function setTypeSelectOption() {
|
||||
|
||||
.pull-left {
|
||||
width: 100% !important;
|
||||
}</style>
|
||||
}</style>
|
||||
|
@@ -9,6 +9,14 @@
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>推荐人</span>
|
||||
<el-input
|
||||
v-model="inquire.referrer"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
@@ -38,6 +46,7 @@
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="referrer" align="center" label="推荐人" />
|
||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||
@@ -55,14 +64,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="创建日期" />
|
||||
<el-table-column prop="memberNum" align="center" label="成员数量" />
|
||||
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="成员数量/上限"
|
||||
><template v-slot="scope"
|
||||
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</template
|
||||
></el-table-column>
|
||||
<el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" />
|
||||
<el-table-column
|
||||
prop="memberNumLimit"
|
||||
align="center"
|
||||
label="成员数量上限"
|
||||
/>
|
||||
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@@ -101,6 +112,18 @@
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>推荐人</span
|
||||
>
|
||||
<el-input
|
||||
v-model="resource.referrer"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- <div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
@@ -226,12 +249,14 @@ export default {
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
userId: "",
|
||||
referrer: "",
|
||||
time: "",
|
||||
},
|
||||
//新增所需对象
|
||||
resource: {
|
||||
id: "",
|
||||
nick: "",
|
||||
referrer: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
@@ -268,6 +293,7 @@ export default {
|
||||
}
|
||||
pageFamily({
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
@@ -284,6 +310,7 @@ export default {
|
||||
this.addDialog = false;
|
||||
create({
|
||||
erbanNo: this.resource.id,
|
||||
referrer: this.resource.referrer,
|
||||
}).then((res) => {
|
||||
this.getData();
|
||||
});
|
||||
|
384
src/views/nobleman/GuildInfoSearch.vue
Normal file
384
src/views/nobleman/GuildInfoSearch.vue
Normal file
@@ -0,0 +1,384 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>ID</span>
|
||||
<el-input
|
||||
v-model="inquire.userId"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>推荐人</span>
|
||||
<el-input
|
||||
v-model="inquire.referrer"
|
||||
placeholder=""
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button class="primary" type="primary" @click="addDialog = true"
|
||||
>添加</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="referrer" align="center" label="推荐人" />
|
||||
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
|
||||
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
|
||||
<el-table-column prop="name" align="center" label="公会昵称" />
|
||||
<el-table-column align="center" prop="giftInfo" label="公会背景图">
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.backgroundUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.backgroundUrl]"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="创建日期" />
|
||||
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
|
||||
<el-table-column align="center" label="成员数量/上限"
|
||||
><template v-slot="scope"
|
||||
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</template
|
||||
></el-table-column
|
||||
>
|
||||
<el-table-column prop="goldIncome" align="center" label="金币总收入" />
|
||||
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" />
|
||||
</el-table>
|
||||
<!-- 新增弹窗 -->
|
||||
<el-dialog v-model="addDialog" title="新增" width="28%" center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>会长ID</span
|
||||
>
|
||||
<el-input
|
||||
v-model="resource.id"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>推荐人</span
|
||||
>
|
||||
<el-input
|
||||
v-model="resource.referrer"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<!-- <div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>会长昵称</span
|
||||
>
|
||||
<el-input
|
||||
v-model="resource.nick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div> -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="add()"> 确认 </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"
|
||||
/>
|
||||
<!-- 编辑弹窗 -->
|
||||
<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.leaderId"
|
||||
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.leaderNick"
|
||||
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.guildNick"
|
||||
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.guildNumber"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
></el-input>
|
||||
</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-dialog v-model="delDialog" title="提示" width="30%" center>
|
||||
<span> 确定要解散该公会吗?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { pageFamily, create, update, dismiss } from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GuildInfoSearch",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
delDialog: false,
|
||||
delDialogData: null,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
userId: "",
|
||||
referrer: "",
|
||||
time: "",
|
||||
},
|
||||
//新增所需对象
|
||||
resource: {
|
||||
id: "",
|
||||
nick: "",
|
||||
referrer: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 新增弹窗
|
||||
addDialog: false,
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 编辑弹窗
|
||||
editDialog: false,
|
||||
ediObj: {
|
||||
leaderId: "",
|
||||
leaderNick: "",
|
||||
guildNick: "",
|
||||
guildNumber: "",
|
||||
id: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
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");
|
||||
}
|
||||
pageFamily({
|
||||
erbanNo: this.inquire.userId,
|
||||
referrer: this.inquire.referrer,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
add() {
|
||||
this.addDialog = false;
|
||||
create({
|
||||
erbanNo: this.resource.id,
|
||||
referrer: this.resource.referrer,
|
||||
}).then((res) => {
|
||||
this.getData();
|
||||
});
|
||||
},
|
||||
// 编辑按钮
|
||||
ediClick(res) {
|
||||
var obj = res.row;
|
||||
this.ediObj.leaderId = obj.ownerErbanNo;
|
||||
this.ediObj.leaderNick = obj.ownerNick;
|
||||
this.ediObj.guildNick = obj.name;
|
||||
this.ediObj.guildNumber = obj.memberNumLimit;
|
||||
this.ediObj.id = obj.id;
|
||||
this.editDialog = true;
|
||||
},
|
||||
// 二次确认弹窗
|
||||
editDialogClick() {
|
||||
console.log(this.ediObj);
|
||||
update({
|
||||
id: this.ediObj.id,
|
||||
memberNumLimit: this.ediObj.guildNumber,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.editDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.delDialog = false;
|
||||
});
|
||||
},
|
||||
// 解散按钮
|
||||
delClick() {
|
||||
console.log(this.delDialogData.id);
|
||||
var familyId = this.delDialogData.id;
|
||||
dismiss({ familyId }).then((res) => {
|
||||
console.log();
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "解散成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.delDialog = false;
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
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>
|
@@ -32,6 +32,10 @@
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 导出按钮 -->
|
||||
<el-button class="primary" type="primary" @click="exportFamilyMemberFun()"
|
||||
>导出</el-button
|
||||
>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
@@ -40,6 +44,16 @@
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="familyOwnerErbanNo"
|
||||
align="center"
|
||||
label="公会长ID"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="familyOwnerNick"
|
||||
align="center"
|
||||
label="公会长昵称"
|
||||
/>
|
||||
<el-table-column prop="familyName" align="center" label="公会昵称" />
|
||||
<el-table-column prop="erbanNo" align="center" label="成员ID" />
|
||||
<el-table-column prop="nick" align="center" label="成员昵称" />
|
||||
@@ -56,7 +70,119 @@
|
||||
scope.row.enable ? "有效" : "无效"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否违规">
|
||||
<template v-slot="scope">{{ scope.row.violationNum }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="warnClick(scope)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>违规警告</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="listRecordFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
:disabled="scope.row.violationNum == 0 ? 'disabled' : ''"
|
||||
>警告详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 详情设备信息弹窗 -->
|
||||
<el-dialog v-model="dialogTableVisible" title="警告详情">
|
||||
<el-table style="width: 100%" :data="tableData2">
|
||||
<el-table-column property="x" label="成员ID" min-width="100px" />
|
||||
<el-table-column property="x" label="成员昵称" min-width="100px" />
|
||||
<el-table-column property="x" label="违规日期" min-width="100px" />
|
||||
<el-table-column property="x" label="被警告日期" min-width="100px" />
|
||||
<el-table-column property="x" label="违规类型" min-width="100px" />
|
||||
</el-table>
|
||||
<el-button
|
||||
class="dialogTableVisibleBut"
|
||||
type="primary"
|
||||
@click="dialogTableVisible = false"
|
||||
>
|
||||
关闭
|
||||
</el-button>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 违规弹窗 -->
|
||||
<el-dialog v-model="violationDialog" title="新增" width="28%" center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>成员ID</span
|
||||
>
|
||||
<el-input
|
||||
v-model="violationObj.id"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>成员昵称</span
|
||||
>
|
||||
<el-input
|
||||
v-model="violationObj.nick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>违规日期</span
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="violationObj.time"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>违规类型</span
|
||||
>
|
||||
<el-select v-model="violationObj.nowValue" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in violationObj.options"
|
||||
:key="item.id"
|
||||
:label="item.type"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="violationDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="add(violationObj)">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
@@ -72,7 +198,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { pageFamilyMember } from "@/api/nobleman/nobleman";
|
||||
import {
|
||||
pageFamilyMember,
|
||||
listFun,
|
||||
addRecord,
|
||||
listRecord,
|
||||
exportFamilyMember,
|
||||
} from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
@@ -88,15 +220,22 @@ export default {
|
||||
nick: "",
|
||||
time: "",
|
||||
},
|
||||
//新增所需对象
|
||||
resource: {
|
||||
id: "",
|
||||
nick: "",
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
// 内嵌表格
|
||||
dialogTableVisible: false,
|
||||
tableData2: [],
|
||||
// 新增弹窗
|
||||
addDialog: false,
|
||||
violationDialog: false,
|
||||
// 违规对象
|
||||
violationObj: {
|
||||
id: "",
|
||||
nick: "",
|
||||
time: "",
|
||||
nowValue: "",
|
||||
options: [],
|
||||
familyMemberId: null,
|
||||
},
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
@@ -105,6 +244,9 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
listFun().then((res) => {
|
||||
this.violationObj.options = res.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
@@ -132,6 +274,92 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 导出
|
||||
exportFamilyMemberFun() {
|
||||
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");
|
||||
}
|
||||
exportFamilyMember({
|
||||
erbanNo: this.inquire.userId,
|
||||
familyName: this.inquire.nick,
|
||||
startDate: startTime,
|
||||
endDate: endTime,
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
});
|
||||
},
|
||||
// 违规警告
|
||||
warnClick(val) {
|
||||
console.log(val.row);
|
||||
var obj = val.row;
|
||||
this.violationObj.id = val.row.erbanNo;
|
||||
this.violationObj.nick = val.row.nick;
|
||||
this.violationObj.familyMemberId = val.row.familyMemberId;
|
||||
this.violationDialog = true;
|
||||
},
|
||||
add(val) {
|
||||
var num = this.violationObj.options.map((item, i) => {
|
||||
return this.violationObj.nowValue == item.id ? i : null;
|
||||
});
|
||||
let time = dateFormat(this.violationObj.time, "yyyy-MM-dd hh:mm:ss");
|
||||
addRecord({
|
||||
familyMemberId: this.violationObj.familyMemberId,
|
||||
violationId: this.violationObj.nowValue,
|
||||
date: time,
|
||||
content: this.violationObj.options[num].content,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.violationDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
listRecordFun(val) {
|
||||
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");
|
||||
}
|
||||
listRecord({
|
||||
familyMemberId: val.familyMemberId,
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
this.dialogTableVisible = true;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
this.getData();
|
||||
|
279
src/views/nobleman/violationTypeSet.vue
Normal file
279
src/views/nobleman/violationTypeSet.vue
Normal file
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="add()">添加</el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="type" align="center" label="违规类型" />
|
||||
<el-table-column prop="content" align="center" label="警告内容" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="ediClick(scope)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="del(scope)"
|
||||
class="danger"
|
||||
type="danger"
|
||||
size="default"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<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"
|
||||
/>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="addDialog" :title="titleDialog" width="28%" center>
|
||||
<!-- 违规类型 -->
|
||||
<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="addObj.violationType"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
placeholder="请输入违规类型(仅限20字)"
|
||||
maxlength="20"
|
||||
></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="addObj.violationContent"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
placeholder="请输入警告内容(仅限200字)"
|
||||
maxlength="200"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addDialogClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 二次确认删除弹窗 -->
|
||||
<el-dialog v-model="delDialog" title="提示" width="30%" center>
|
||||
<span> 是否删除该违规类型?</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="delDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="delClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { pageFun, updateFun, delFun, addFun } from "@/api/nobleman/nobleman";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "violationTypeSet",
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [{ x: "" }],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
// 删除
|
||||
delDialog: false,
|
||||
delDate: {},
|
||||
// 新增&编辑
|
||||
addDialog: false,
|
||||
titleDialog: "新增违规类型",
|
||||
addObj: {
|
||||
violationType: "",
|
||||
violationContent: "",
|
||||
id: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
this.loading = true;
|
||||
pageFun({
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = res.data.total;
|
||||
this.tableData = res.data.rows;
|
||||
this.loading = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
add() {
|
||||
this.titleDialog = "新增违规类型";
|
||||
this.addObj.violationType = "";
|
||||
this.addObj.violationContent = "";
|
||||
this.addObj.types = 1;
|
||||
this.addDialog = true;
|
||||
},
|
||||
// 编辑
|
||||
ediClick(val) {
|
||||
this.titleDialog = "编辑违规类型";
|
||||
this.addObj.violationType = val.row.type;
|
||||
this.addObj.violationContent = val.row.content;
|
||||
this.addObj.id = val.row.id;
|
||||
this.addObj.types = 2;
|
||||
this.addDialog = true;
|
||||
},
|
||||
// 二次确认新增&编辑
|
||||
addDialogClick() {
|
||||
if (this.addObj.types == 1) {
|
||||
addFun({
|
||||
type: this.addObj.violationType,
|
||||
content: this.addObj.violationContent,
|
||||
id: this.addObj.id,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.addDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
updateFun({
|
||||
type: this.addObj.violationType,
|
||||
content: this.addObj.violationContent,
|
||||
id: this.addObj.id,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
this.addDialog = false;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 删除按钮
|
||||
del(val) {
|
||||
this.delDate = val.row;
|
||||
this.delDialog = true;
|
||||
},
|
||||
// 二次确认删除
|
||||
delClick() {
|
||||
delFun({ id: this.delDate.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "success",
|
||||
});
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
this.delDialog = false;
|
||||
},
|
||||
// 分页导航
|
||||
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>
|
@@ -70,7 +70,7 @@
|
||||
|
||||
<label for="awardChoose" class="col-sm-3 control-label">选择礼物:</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="col-sm-4">
|
||||
<select name="awardChoose" id="awardChoose" onchange="updateAward(this)">
|
||||
<!-- <option value="0">选取礼物</option> -->
|
||||
</select>
|
||||
|
@@ -1,213 +1,253 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<form id="form2" action="" method="post" target="_blank">
|
||||
<input type="hidden" name="erbanNo" id="exportErbanNo">
|
||||
<input type="hidden" name="channel" id="exportChannel">
|
||||
<input type="hidden" name="startTime" id="exportStartTime">
|
||||
<input type="hidden" name="endTime" id="exportEndTime">
|
||||
<input type="hidden" name="status" id="exportStatus">
|
||||
<input type="hidden" name="newUser" id="exportNewUser">
|
||||
<input type="hidden" name="appChannel" id="exportAppChannel">
|
||||
</form>
|
||||
<section class="content">
|
||||
<div id="toolbar">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="qErbanNo">平台号:</label>
|
||||
<input type="text" class="form-control" name="erbanNo" id="qErbanNo">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">渠道:</label>
|
||||
<input type="text" class="form-control" name="channel" id="qChannel">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">时间:</label>
|
||||
<input type="text" class="form-control datetime" name="startTime" id="qStartTime">
|
||||
<label for="qChannel">-</label>
|
||||
<input type="text" class="form-control datetime" name="endTime" id="qEndTime">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qStatus">状态:</label>
|
||||
<select class="form-control" name="status" id="qStatus">
|
||||
<option value="">全部</option>
|
||||
<option value="1">发起充值</option>
|
||||
<option value="2">充值成功</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qNewUser">新用户:</label>
|
||||
<select class="form-control" name="newUser" id="qNewUser">
|
||||
<option value="">全部</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">app渠道</label>
|
||||
<input type="text" class="form-control" name="appChannel" id="qAppChannel">
|
||||
</div>
|
||||
</form>
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||
<button id="btnExport" class="btn btn-sm btn-primary">导出</button>
|
||||
</div>
|
||||
<!-- .content -->
|
||||
<div class="content" id="table"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<form id="form2"
|
||||
action=""
|
||||
method="post"
|
||||
target="_blank">
|
||||
<input type="hidden"
|
||||
name="erbanNo"
|
||||
id="exportErbanNo">
|
||||
<input type="hidden"
|
||||
name="channel"
|
||||
id="exportChannel">
|
||||
<input type="hidden"
|
||||
name="startTime"
|
||||
id="exportStartTime">
|
||||
<input type="hidden"
|
||||
name="endTime"
|
||||
id="exportEndTime">
|
||||
<input type="hidden"
|
||||
name="status"
|
||||
id="exportStatus">
|
||||
<input type="hidden"
|
||||
name="newUser"
|
||||
id="exportNewUser">
|
||||
<input type="hidden"
|
||||
name="appChannel"
|
||||
id="exportAppChannel">
|
||||
</form>
|
||||
<section class="content">
|
||||
<div id="toolbar">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="qErbanNo">平台号:</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="erbanNo"
|
||||
id="qErbanNo">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">渠道:</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="channel"
|
||||
id="qChannel">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">时间:</label>
|
||||
<input type="text"
|
||||
class="form-control datetime"
|
||||
name="startTime"
|
||||
id="qStartTime">
|
||||
<label for="qChannel">-</label>
|
||||
<input type="text"
|
||||
class="form-control datetime"
|
||||
name="endTime"
|
||||
id="qEndTime">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qStatus">状态:</label>
|
||||
<select class="form-control"
|
||||
name="status"
|
||||
id="qStatus">
|
||||
<option value="">全部</option>
|
||||
<option value="1">发起充值</option>
|
||||
<option value="2">充值成功</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qNewUser">新用户:</label>
|
||||
<select class="form-control"
|
||||
name="newUser"
|
||||
id="qNewUser">
|
||||
<option value="">全部</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="qChannel">app渠道</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="appChannel"
|
||||
id="qAppChannel">
|
||||
</div>
|
||||
</form>
|
||||
<button id="btnSearch"
|
||||
class="btn btn-sm btn-primary">查询</button>
|
||||
<button id="btnExport"
|
||||
class="btn btn-sm btn-primary">导出</button>
|
||||
</div>
|
||||
<!-- .content -->
|
||||
<div class="content"
|
||||
id="table"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "ChargeRecordView",
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
name: "ChargeRecordView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
|
||||
{ field: 'uid', title: 'uid', align: 'center', width: '5%' },
|
||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
||||
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
|
||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
|
||||
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
|
||||
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
|
||||
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'status', title: '状态', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 2) {
|
||||
return '充值成功';
|
||||
} else {
|
||||
return '发起充值';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'newUser', title: '是否新用户', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
|
||||
],
|
||||
undefinedText: "-",
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
var param = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#qErbanNo').val(),
|
||||
channel: $('#qChannel').val(),
|
||||
startTime: $('#qStartTime').val(),
|
||||
endTime: $('#qEndTime').val(),
|
||||
status: $('#qStatus').val(),
|
||||
newUser: $('#qNewUser').val(),
|
||||
appChannel: $('#qAppChannel').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/chargeRecord/list',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
apiResult(res);
|
||||
request.success({
|
||||
rows: res.data.records,
|
||||
total: res.data.total
|
||||
});
|
||||
},
|
||||
error: function (req) {
|
||||
serverError(req);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
function serverError(req) {
|
||||
$("#tipMsg").text(req.responseJSON.message);
|
||||
$("#tipModal").modal('show');
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
|
||||
{ field: 'uid', title: 'uid', align: 'center', width: '5%' },
|
||||
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
|
||||
{ field: 'partitionName', title: '分区', align: 'center', width: '5%' },
|
||||
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
|
||||
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
|
||||
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
|
||||
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
|
||||
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
|
||||
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'status', title: '状态', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 2) {
|
||||
return '充值成功';
|
||||
} else {
|
||||
return '发起充值';
|
||||
}
|
||||
|
||||
function apiResult(json) {
|
||||
if (json.code == 200 && json.message == 'success') {
|
||||
return true;
|
||||
}
|
||||
$("#tipMsg").text("请求失败,错误信息:" + json.message);
|
||||
$("#tipModal").modal('show');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'newUser', title: '是否新用户', align: 'center', width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#btnExport').on('click', function () {
|
||||
var form = $("#form2");
|
||||
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
|
||||
$('#exportErbanNo').val($('#qErbanNo').val());
|
||||
$('#exportChannel').val($('#qChannel').val());
|
||||
$('#exportStartTime').val($('#qStartTime').val());
|
||||
$('#exportEndTime').val($('#qEndTime').val());
|
||||
$('#exportStatus').val($('#qStatus').val());
|
||||
$('#exportNewUser').val($('#qNewUser').val());
|
||||
$('#exportAppChannel').val($('#qAppChannel').val());
|
||||
}
|
||||
},
|
||||
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
|
||||
],
|
||||
undefinedText: "-",
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#qErbanNo').val(),
|
||||
channel: $('#qChannel').val(),
|
||||
startTime: $('#qStartTime').val(),
|
||||
endTime: $('#qEndTime').val(),
|
||||
status: $('#qStatus').val(),
|
||||
newUser: $('#qNewUser').val(),
|
||||
appChannel: $('#qAppChannel').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/chargeRecord/list',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
apiResult(res);
|
||||
request.success({
|
||||
rows: res.data.records,
|
||||
total: res.data.total
|
||||
});
|
||||
},
|
||||
error: function (req) {
|
||||
serverError(req);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
form.submit();
|
||||
})
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
});
|
||||
function serverError (req) {
|
||||
$("#tipMsg").text(req.responseJSON.message);
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
},
|
||||
|
||||
function apiResult (json) {
|
||||
if (json.code == 200 && json.message == 'success') {
|
||||
return true;
|
||||
}
|
||||
$("#tipMsg").text("请求失败,错误信息:" + json.message);
|
||||
$("#tipModal").modal('show');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
$('#btnExport').on('click', function () {
|
||||
var form = $("#form2");
|
||||
form.attr("action", "/admin/chargeRecord/exportChargeDetail");
|
||||
$('#exportErbanNo').val($('#qErbanNo').val());
|
||||
$('#exportChannel').val($('#qChannel').val());
|
||||
$('#exportStartTime').val($('#qStartTime').val());
|
||||
$('#exportEndTime').val($('#qEndTime').val());
|
||||
$('#exportStatus').val($('#qStatus').val());
|
||||
$('#exportNewUser').val($('#qNewUser').val());
|
||||
$('#exportAppChannel').val($('#qAppChannel').val());
|
||||
|
||||
form.submit();
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
@@ -374,12 +374,14 @@ export default {
|
||||
switch (val) {
|
||||
case 3:
|
||||
return '普通房间';
|
||||
|
||||
case 6:
|
||||
return '个播房间';
|
||||
|
||||
case 7:
|
||||
return '游戏房间';
|
||||
case 8:
|
||||
return '聚会房间';
|
||||
case 9:
|
||||
return '狂欢房间';
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,103 +1,154 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<label for="erbanNo" class="col-sm-2 control-label">房主平台号:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="erbanNo" id="erbanNo" placeholder="">
|
||||
</div>
|
||||
<label for="roomTitle" class="col-sm-2 control-label">房间标题:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="roomTitle" id="roomTitle" placeholder="">
|
||||
</div>
|
||||
<label for="roomTitle" class="col-sm-2 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="partitionId" id="partitionId" class="form-control"></select>
|
||||
</div>
|
||||
<button id="btnSearch" class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<label for="erbanNo"
|
||||
class="col-sm-2 control-label">房主平台号:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="erbanNo"
|
||||
id="erbanNo"
|
||||
placeholder="">
|
||||
</div>
|
||||
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 编辑弹框 -->
|
||||
<div class="modal fade" id="roomTabHomeModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<input type="hidden" name="id" id="id" />
|
||||
<input type="hidden" name="roomUid" id="roomUid" />
|
||||
<div class="form-group">
|
||||
<label for="modal_isTop" class="col-sm-3 control-label">是否置顶<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="isTop" id="modal_isTop" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_seq" class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="seq" id="modal_seq"
|
||||
placeholder="数字小的排前面,必填">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_topStart" class="col-sm-3 control-label">置顶开始时间<font color="red">*</font>
|
||||
:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="input-sm form-control datetime" name="topStart"
|
||||
id="modal_topStart">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_topEnd" class="col-sm-3 control-label">置顶结束时间<font color="red">*</font>
|
||||
:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="input-sm form-control datetime" name="topEnd" id="modal_topEnd">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_isShow" class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="isShow" id="modal_isShow" class="form-control validate[required]">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" id="btnConfirm">确定</button>
|
||||
</div>
|
||||
|
||||
<label for="roomTitle"
|
||||
class="col-sm-2 control-label">房间标题:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="roomTitle"
|
||||
id="roomTitle"
|
||||
placeholder="">
|
||||
</div>
|
||||
<label for="partitionId"
|
||||
class="col-sm-1 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="partitionId"
|
||||
id="partitionId"
|
||||
class="form-control">
|
||||
<option value="4"
|
||||
selected>华语区</option>
|
||||
</select>
|
||||
</div>
|
||||
<button id="btnSearch"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 编辑弹框 -->
|
||||
<div class="modal fade"
|
||||
id="roomTabHomeModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"><span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"
|
||||
id="modalLabel">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal"
|
||||
id="addForm">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
id="id" />
|
||||
<input type="hidden"
|
||||
name="roomUid"
|
||||
id="roomUid" />
|
||||
<div class="form-group">
|
||||
<label for="modal_isTop"
|
||||
class="col-sm-3 control-label">是否置顶<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="isTop"
|
||||
id="modal_isTop"
|
||||
class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_seq"
|
||||
class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="seq"
|
||||
id="modal_seq"
|
||||
placeholder="数字小的排前面,必填">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_topStart"
|
||||
class="col-sm-3 control-label">置顶开始时间<font color="red">*</font>
|
||||
:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
class="input-sm form-control datetime"
|
||||
name="topStart"
|
||||
id="modal_topStart">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_topEnd"
|
||||
class="col-sm-3 control-label">置顶结束时间<font color="red">*</font>
|
||||
:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
class="input-sm form-control datetime"
|
||||
name="topEnd"
|
||||
id="modal_topEnd">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_isShow"
|
||||
class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="isShow"
|
||||
id="modal_isShow"
|
||||
class="form-control validate[required]">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">关闭</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="btnConfirm">确定</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -112,321 +163,286 @@ import { buildSelectOption } from '@/utils/system-helper';
|
||||
TableHelper.doRefresh('#table');
|
||||
}*/
|
||||
export default {
|
||||
name: "RoomTabHomeView",
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
this.initPartition();
|
||||
this.initData();
|
||||
name: "RoomTabHomeView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
// 拉取所有tab
|
||||
//getRoomTabs();
|
||||
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
|
||||
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
|
||||
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
|
||||
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'isPermitRoom',
|
||||
title: '房间类型',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
let value = '';
|
||||
if (val == 1) {
|
||||
value = '牌照房';
|
||||
} else if (val == 4) {
|
||||
value = '个播房';
|
||||
} else {
|
||||
value = '非牌照房';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'iconContent',
|
||||
title: '图标内容',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return "<img src='" + val + "' width='40' height='40'>";
|
||||
}
|
||||
},
|
||||
{ field: 'partitionDesc', title: '地区', align: 'center', valign: 'middle' },
|
||||
{
|
||||
field: 'isTop',
|
||||
title: '是否置顶',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return '是';
|
||||
} else if (val == 0) {
|
||||
return '否';
|
||||
}
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isShow',
|
||||
title: '是否在App首页展示',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return '是';
|
||||
} else if (val == 0) {
|
||||
return '否';
|
||||
}
|
||||
return '是';
|
||||
}
|
||||
},
|
||||
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
|
||||
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
||||
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
||||
{
|
||||
field: 'id',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>';
|
||||
}
|
||||
}
|
||||
],
|
||||
undefinedText: "",
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [10, 20, 50, 100, 200, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
/*var tabId = $('#roomTab').val();
|
||||
if (tabId == null || tabId.length <= 0) {
|
||||
tabId = '1';
|
||||
}*/
|
||||
var param = {
|
||||
page: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#erbanNo').val(),
|
||||
roomTitle: $('#roomTitle').val(),
|
||||
partitionId: $('#partitionId').val(),
|
||||
};
|
||||
console.log(param);
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/roomTabHome/list',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
request.success({
|
||||
rows: res.data.roomTabHomeList,
|
||||
total: res.data.totalPage
|
||||
});
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
// 编辑或者新增
|
||||
$("#btnConfirm").click(function () {
|
||||
var id = $("#id").val();
|
||||
var roomUid = $('#roomUid').val();
|
||||
var seq = $("#modal_seq").val();
|
||||
var isTop = $("#modal_isTop").val();
|
||||
var iconContent = $("#modal_iconContent").val();
|
||||
var topStart = $("#modal_topStart").val();
|
||||
var topEnd = $("#modal_topEnd").val();
|
||||
var isShow = $('#modal_isShow').val();
|
||||
if ($("#addForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/roomTabHome/save",
|
||||
data: {
|
||||
id: id,
|
||||
roomUid: roomUid,
|
||||
seq: seq,
|
||||
isTop: isTop,
|
||||
iconContent: iconContent,
|
||||
topStart: topStart,
|
||||
topEnd: topEnd,
|
||||
isShow: isShow,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 200) {
|
||||
$("#tipMsg").text("保存成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
$("#roomTabHomeModal").modal('hide');
|
||||
} else {
|
||||
$("#tipMsg").text("保存失败." + json.msg);
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
$("#roomTabHomeModal").modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 获取信息
|
||||
$("#table").on("click", '.opt-edit', function () {
|
||||
var id = $(this).attr("data-id");
|
||||
const index = $(this).data('index');
|
||||
const record = TableHelper.getData('#table')[index];
|
||||
$("#id").val(null);
|
||||
$("#modal_iconContent").val('');
|
||||
$("#modal_seq").val(0);
|
||||
$("#modal_isTop").val(0);
|
||||
$("#modal_topStart").val('');
|
||||
$("#modal_topEnd").val('');
|
||||
$("#modal_isShow").val(0);
|
||||
$('#roomUid').val(record.roomUid);
|
||||
if (id && id != 'null') {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/admin/roomTabHome/get",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.code == 200) {
|
||||
var json = ret.data.roomTabHome;
|
||||
$("#id").val(id);
|
||||
$("#modal_iconContent").val(json.iconContent);
|
||||
$("#modal_seq").val(json.seq);
|
||||
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
||||
$("#modal_topStart").val(formatTime(json.topStart));
|
||||
$("#modal_topEnd").val(formatTime(json.topEnd));
|
||||
$("#modal_isShow").val(json.isShow ? 1 : 0);
|
||||
} else {
|
||||
$("#tipMsg").text("获取菜单信息出错");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 打开编辑弹窗
|
||||
$("#roomTabHomeModal").modal('show');
|
||||
$("#modalLabel").text("编辑");
|
||||
});
|
||||
|
||||
// 删除操作
|
||||
$("#table").on("click", '.opt-remove', function () {
|
||||
var id = $(this).attr("data-id");
|
||||
if (id == 'undefined') {
|
||||
$("#tipMsg").text("id参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
if (confirm("你确认删除吗? \r\n 删除后不会恢复,请谨慎操作!")) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: "/admin/roomTabHome/delete",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 200) {
|
||||
$("#tipMsg").text("删除成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
} else {
|
||||
$("#tipMsg").text("删除失败");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 通过接口获取所有房间tab
|
||||
function getRoomTabs() {
|
||||
$.ajax({
|
||||
url: "/admin/roomTab/excludelist?page=1&pageSize=1000", //后台controller中的请求路径
|
||||
type: 'GET',
|
||||
async: false,
|
||||
datatype: 'json',
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
var data = res.data.roomTabList;
|
||||
var tabs = [];
|
||||
for (var i = 0, len = data.length; i < len; i++) {
|
||||
var item = data[i];
|
||||
//拼接成多个<option><option/>
|
||||
tabs.push('<option value="' + item.id + '">' + item.name + '</option>')
|
||||
}
|
||||
$("#roomTab").html(tabs.join(' ')); //填充到select标签中
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('查询房间tab出错');
|
||||
}
|
||||
});
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
|
||||
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
|
||||
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
|
||||
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'isPermitRoom',
|
||||
title: '房间类型',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
let value = '';
|
||||
if (val == 1) {
|
||||
value = '牌照房';
|
||||
} else if (val == 4) {
|
||||
value = '个播房';
|
||||
} else {
|
||||
value = '非牌照房';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'avatar',
|
||||
title: '图标内容',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return "<img src='" + val + "' width='40' height='40'>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isTop',
|
||||
title: '是否置顶',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return '是';
|
||||
} else if (val == 0) {
|
||||
return '否';
|
||||
}
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isShow',
|
||||
title: '是否在App首页展示',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return '是';
|
||||
} else if (val == 0) {
|
||||
return '否';
|
||||
}
|
||||
return '是';
|
||||
}
|
||||
},
|
||||
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
|
||||
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
||||
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
||||
{
|
||||
field: 'isHourTop1', title: '小时榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||
return val ? '是' : '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isHourTop1', title: '周榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||
return val ? '是' : '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'micUserCount', title: '麦上人数', align: 'center', valign: 'middle', width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'onlineNum', title: '房间人数', align: 'center', valign: 'middle', width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>';
|
||||
}
|
||||
}
|
||||
],
|
||||
undefinedText: "",
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
page: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#erbanNo').val(),
|
||||
roomTitle: $('#roomTitle').val(),
|
||||
partitionId: $('#partitionId').val(),
|
||||
};
|
||||
console.log(param);
|
||||
return param;
|
||||
},
|
||||
url: '/admin/roomTabHome/list',
|
||||
responseHandler: function (data) {
|
||||
console.info(111, data)
|
||||
if (data.code === 200) {
|
||||
return { "rows": data.data, "total": data.data.length };
|
||||
} else {
|
||||
return { "rows": [], "total": 0 };
|
||||
}
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
// 编辑或者新增
|
||||
$("#btnConfirm").click(function () {
|
||||
var id = $("#id").val();
|
||||
var roomUid = $('#roomUid').val();
|
||||
var seq = $("#modal_seq").val();
|
||||
var isTop = $("#modal_isTop").val();
|
||||
var iconContent = $("#modal_iconContent").val();
|
||||
var topStart = $("#modal_topStart").val();
|
||||
var topEnd = $("#modal_topEnd").val();
|
||||
var isShow = $('#modal_isShow').val();
|
||||
if ($("#addForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/roomTabHome/save",
|
||||
data: {
|
||||
id: id,
|
||||
roomUid: roomUid,
|
||||
seq: seq,
|
||||
isTop: isTop,
|
||||
iconContent: iconContent,
|
||||
topStart: topStart,
|
||||
topEnd: topEnd,
|
||||
isShow: isShow,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 200) {
|
||||
$("#tipMsg").text("保存成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
$("#roomTabHomeModal").modal('hide');
|
||||
} else {
|
||||
$("#tipMsg").text("保存失败." + json.msg);
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
$("#roomTabHomeModal").modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
initPartition() {
|
||||
getPartitionInfoList().then(res => {
|
||||
let data = res.data;
|
||||
buildSelectOption(
|
||||
"#partitionId",
|
||||
null,
|
||||
[{
|
||||
value: '',
|
||||
text: '全部',
|
||||
}].concat(data.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.desc,
|
||||
};
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 获取信息
|
||||
$("#table").on("click", '.opt-edit', function () {
|
||||
var id = $(this).attr("data-id");
|
||||
const index = $(this).data('index');
|
||||
const record = TableHelper.getData('#table')[index];
|
||||
$("#id").val(null);
|
||||
$("#modal_seq").val(0);
|
||||
$("#modal_isTop").val(0);
|
||||
$("#modal_topStart").val('');
|
||||
$("#modal_topEnd").val('');
|
||||
$("#modal_isShow").val(0);
|
||||
$('#roomUid').val(record.roomUid);
|
||||
if (id && id != 'null') {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/admin/roomTabHome/get",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.code == 200) {
|
||||
var json = ret.data;
|
||||
$("#id").val(id);
|
||||
$("#modal_seq").val(json.seq);
|
||||
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
||||
$("#modal_topStart").val(formatTime(json.topStart));
|
||||
$("#modal_topEnd").val(formatTime(json.topEnd));
|
||||
$("#modal_isShow").val(json.isShow ? 1 : 0);
|
||||
} else {
|
||||
$("#tipMsg").text("获取菜单信息出错");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
// 打开编辑弹窗
|
||||
$("#roomTabHomeModal").modal('show');
|
||||
$("#modalLabel").text("编辑");
|
||||
});
|
||||
|
||||
// 删除操作
|
||||
$("#table").on("click", '.opt-remove', function () {
|
||||
var id = $(this).attr("data-id");
|
||||
if (id == 'undefined') {
|
||||
$("#tipMsg").text("id参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
if (confirm("你确认删除吗? \r\n 删除后不会恢复,请谨慎操作!")) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: "/admin/roomTabHome/delete",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 200) {
|
||||
$("#tipMsg").text("删除成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
} else {
|
||||
$("#tipMsg").text("删除失败");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
initPartition () {
|
||||
getPartitionInfoList().then(res => {
|
||||
let data = res.data;
|
||||
buildSelectOption(
|
||||
"#partitionId",
|
||||
4,
|
||||
data.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.desc,
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
449
src/views/room/RoomTabNewestView.vue
Normal file
449
src/views/room/RoomTabNewestView.vue
Normal file
@@ -0,0 +1,449 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<label for="erbanNo"
|
||||
class="col-sm-2 control-label">房主平台号:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="erbanNo"
|
||||
id="erbanNo"
|
||||
placeholder="">
|
||||
</div>
|
||||
<label for="roomTitle"
|
||||
class="col-sm-2 control-label">房间标题:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="roomTitle"
|
||||
id="roomTitle"
|
||||
placeholder="">
|
||||
</div>
|
||||
<label for="partitionId"
|
||||
class="col-sm-1 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="partitionId"
|
||||
id="partitionId"
|
||||
class="form-control">
|
||||
<option value="4"
|
||||
selected>华语区</option>
|
||||
</select>
|
||||
</div>
|
||||
<button id="btnSearch"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 编辑弹框 -->
|
||||
<div class="modal fade"
|
||||
id="roomTabNewestModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"><span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"
|
||||
id="modalLabel">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal"
|
||||
id="addForm">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
id="id" />
|
||||
<input type="hidden"
|
||||
name="roomUid"
|
||||
id="roomUid" />
|
||||
<div class="form-group">
|
||||
<label for="modal_isTop"
|
||||
class="col-sm-3 control-label">是否置顶<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="isTop"
|
||||
id="modal_isTop"
|
||||
class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_seq"
|
||||
class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="seq"
|
||||
id="modal_seq"
|
||||
placeholder="数字小的排前面,必填">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_topStart"
|
||||
class="col-sm-3 control-label">置顶开始时间<font color="red">*</font>
|
||||
:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
class="input-sm form-control datetime"
|
||||
name="topStart"
|
||||
id="modal_topStart">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_topEnd"
|
||||
class="col-sm-3 control-label">置顶结束时间<font color="red">*</font>
|
||||
:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
class="input-sm form-control datetime"
|
||||
name="topEnd"
|
||||
id="modal_topEnd">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_isShow"
|
||||
class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="isShow"
|
||||
id="modal_isShow"
|
||||
class="form-control validate[required]">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">关闭</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="btnConfirm">确定</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
import { formatTime } from '@/utils/maintainer';
|
||||
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
|
||||
import { buildSelectOption } from '@/utils/system-helper';
|
||||
|
||||
// tab类型选择变化查询
|
||||
/*function selectOnTabChange(obj){
|
||||
// console.log(obj);
|
||||
TableHelper.doRefresh('#table');
|
||||
}*/
|
||||
export default {
|
||||
name: "RoomTabNewestView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('.datetime').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii:00',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
|
||||
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
|
||||
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
|
||||
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'isPermitRoom',
|
||||
title: '房间类型',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
let value = '';
|
||||
if (val == 1) {
|
||||
value = '牌照房';
|
||||
} else if (val == 4) {
|
||||
value = '个播房';
|
||||
} else {
|
||||
value = '非牌照房';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'avatar',
|
||||
title: '图标内容',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return "<img src='" + val + "' width='40' height='40'>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isTop',
|
||||
title: '是否置顶',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return '是';
|
||||
} else if (val == 0) {
|
||||
return '否';
|
||||
}
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isShow',
|
||||
title: '是否在App首页展示',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val == 1) {
|
||||
return '是';
|
||||
} else if (val == 0) {
|
||||
return '否';
|
||||
}
|
||||
return '是';
|
||||
}
|
||||
},
|
||||
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' },
|
||||
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
||||
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
|
||||
{
|
||||
field: 'isHourTop1', title: '小时榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||
return val ? '是' : '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isHourTop1', title: '周榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
|
||||
return val ? '是' : '否';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'micUserCount', title: '麦上人数', align: 'center', valign: 'middle', width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'onlineNum', title: '房间人数', align: 'center', valign: 'middle', width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>';
|
||||
}
|
||||
}
|
||||
],
|
||||
undefinedText: "",
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
page: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
erbanNo: $('#erbanNo').val(),
|
||||
roomTitle: $('#roomTitle').val(),
|
||||
partitionId: $('#partitionId').val(),
|
||||
};
|
||||
console.log(param);
|
||||
return param;
|
||||
},
|
||||
url: '/admin/roomTabNewest/list',
|
||||
responseHandler: function (data) {
|
||||
console.info(111, data)
|
||||
if (data.code === 200) {
|
||||
return { "rows": data.data, "total": data.data.length };
|
||||
} else {
|
||||
return { "rows": [], "total": 0 };
|
||||
}
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
// 编辑或者新增
|
||||
$("#btnConfirm").click(function () {
|
||||
var id = $("#id").val();
|
||||
var roomUid = $('#roomUid').val();
|
||||
var seq = $("#modal_seq").val();
|
||||
var isTop = $("#modal_isTop").val();
|
||||
var iconContent = $("#modal_iconContent").val();
|
||||
var topStart = $("#modal_topStart").val();
|
||||
var topEnd = $("#modal_topEnd").val();
|
||||
var isShow = $('#modal_isShow').val();
|
||||
if ($("#addForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/roomTabNewest/save",
|
||||
data: {
|
||||
id: id,
|
||||
roomUid: roomUid,
|
||||
seq: seq,
|
||||
isTop: isTop,
|
||||
iconContent: iconContent,
|
||||
topStart: topStart,
|
||||
topEnd: topEnd,
|
||||
isShow: isShow,
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 200) {
|
||||
$("#tipMsg").text("保存成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
$("#roomTabNewestModal").modal('hide');
|
||||
} else {
|
||||
$("#tipMsg").text("保存失败." + json.msg);
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
$("#roomTabNewestModal").modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 获取信息
|
||||
$("#table").on("click", '.opt-edit', function () {
|
||||
var id = $(this).attr("data-id");
|
||||
const index = $(this).data('index');
|
||||
const record = TableHelper.getData('#table')[index];
|
||||
$("#id").val(null);
|
||||
$("#modal_seq").val(0);
|
||||
$("#modal_isTop").val(0);
|
||||
$("#modal_topStart").val('');
|
||||
$("#modal_topEnd").val('');
|
||||
$("#modal_isShow").val(0);
|
||||
$('#roomUid').val(record.roomUid);
|
||||
if (id && id != 'null') {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/admin/roomTabNewest/get",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.code == 200) {
|
||||
var json = ret.data;
|
||||
$("#id").val(id);
|
||||
$("#modal_seq").val(json.seq);
|
||||
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
||||
$("#modal_topStart").val(formatTime(json.topStart));
|
||||
$("#modal_topEnd").val(formatTime(json.topEnd));
|
||||
$("#modal_isShow").val(json.isShow ? 1 : 0);
|
||||
} else {
|
||||
$("#tipMsg").text("获取菜单信息出错");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 打开编辑弹窗
|
||||
$("#roomTabNewestModal").modal('show');
|
||||
$("#modalLabel").text("编辑");
|
||||
});
|
||||
|
||||
// 删除操作
|
||||
$("#table").on("click", '.opt-remove', function () {
|
||||
var id = $(this).attr("data-id");
|
||||
if (id == 'undefined') {
|
||||
$("#tipMsg").text("id参数有误");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
if (confirm("你确认删除吗? \r\n 删除后不会恢复,请谨慎操作!")) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: "/admin/roomTabNewest/delete",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 200) {
|
||||
$("#tipMsg").text("删除成功");
|
||||
$("#tipModal").modal('show');
|
||||
TableHelper.doRefresh("#table");
|
||||
} else {
|
||||
$("#tipMsg").text("删除失败");
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
initPartition () {
|
||||
getPartitionInfoList().then(res => {
|
||||
let data = res.data;
|
||||
buildSelectOption(
|
||||
"#partitionId",
|
||||
4,
|
||||
data.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.desc,
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
@@ -11,10 +11,13 @@
|
||||
<input type="hidden" name="phone" id="exportPhone">
|
||||
<input type="hidden" name="startDate" id="exportStartDate">
|
||||
<input type="hidden" name="endDate" id="exportEndDate">
|
||||
<input type="hidden" name="partitionId" id="exportPartitionId">
|
||||
<input type="hidden" name="loginType" id="exportLoginType">
|
||||
<input type="hidden" name="isCharge" id="exportIsCharge">
|
||||
<input type="hidden" name="firstRoomErBanNo" id="exportFirstRoomErBanNo">
|
||||
</form>
|
||||
<div id="toolbar">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label htmlFor="flowChannelType" class="col-sm-4 control-label">流量渠道:</label>
|
||||
<div class="col-sm-8">
|
||||
@@ -26,15 +29,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label htmlFor="erbanNo" class="col-sm-4 control-label">平台号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="input-sm form-control" name="erbanNo" id="erbanNo">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label htmlFor="phone" class="col-sm-4 control-label">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
@@ -44,26 +44,55 @@
|
||||
<div class="col-sm-3">
|
||||
<label class="col-sm-4 control-label">开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="input-sm datetime" name="startDate" id="startDate">
|
||||
<input type="text" class="input-sm datetime form-control" name="startDate" id="startDate">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label class="col-sm-4 control-label">结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="input-sm datetime" name="endDate" id="endDate">
|
||||
<input type="text" class="input-sm datetime form-control" name="endDate" id="endDate">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="partitionId" id="partitionId" class="form-control">
|
||||
</select>
|
||||
<div class="col-sm-3">
|
||||
<label for="partitionId" class="col-sm-4 control-label">地区:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="partitionId" id="partitionId" class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label for="loginType" class="col-sm-4 control-label">注册类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="loginType" id="loginType" class="form-control">
|
||||
<option value="">全部</option>
|
||||
<option value="3">手机号注册</option>
|
||||
<option value="5">APPLE注册</option>
|
||||
<option value="8">GOOGLE注册</option>
|
||||
<option value="9">LINE注册</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label for="isCharge" class="col-sm-4 control-label">是否充值:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="isCharge" id="isCharge" class="form-control">
|
||||
<option value="">全部</option>
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label for="firstRoomErBanNo" class="col-sm-4 control-label">首进房ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="input-sm form-control" name="firstRoomErBanNo" id="firstRoomErBanNo">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-12">
|
||||
<button id="btnSearch" class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
@@ -167,6 +196,9 @@ export default {
|
||||
startDate: $('#startDate').val(),
|
||||
endDate: $('#endDate').val(),
|
||||
partitionId: $('#partitionId').val(),
|
||||
loginType: $('#loginType').val(),
|
||||
isCharge: $('#isCharge').val(),
|
||||
firstRoomErBanNo: $('#firstRoomErBanNo').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
@@ -181,7 +213,8 @@ export default {
|
||||
},
|
||||
columns: [
|
||||
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle' },
|
||||
{ field: 'partitionDesc', title: '地区', align: 'center', valign: '15%' },
|
||||
{ field: 'partitionDesc', title: '分区', align: 'center', valign: '15%' },
|
||||
{ field: 'lastLoginRegion', title: '国家', align: 'center', valign: '15%' },
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: '10%' },
|
||||
{ field: 'nick', title: '昵称', align: 'center', valign: '15%' },
|
||||
{
|
||||
@@ -214,8 +247,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'registerIp', title: 'ip', align: 'center', valign: '10%' },
|
||||
{ field: 'firstChargeInfo', title: '首充情况', align: 'center', valign: '15%' }
|
||||
{ field: 'registerIp', title: 'IP', align: 'center', valign: '10%' },
|
||||
{ field: 'isChargeStr', title: '是否充值', align: 'center', valign: '10%' },
|
||||
{ field: 'chargeAmount', title: '充值金额', align: 'center', valign: '10%' },
|
||||
{ field: 'firstRoomErBanNo', title: '首进房ID', align: 'center', valign: '10%' },
|
||||
{ field: 'loginTypeStr', title: '注册类型', align: 'center', valign: '10%' },
|
||||
{ field: 'genderStr', title: '性别', align: 'center', valign: '10%' },
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -226,21 +263,21 @@ export default {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
|
||||
// 导出excel
|
||||
$('#btnExport').on('click', function () {
|
||||
var form = $("#form");
|
||||
form.attr("action", "/admin/stats/userDetail/export");
|
||||
|
||||
$('#exportFlowChannelType').val($('#flowChannelType').val());
|
||||
$('#exportErbanNo').val($('#erbanNo').val());
|
||||
$('#exportPhone').val($('#phone').val());
|
||||
$('#exportStartDate').val($('#startDate').val());
|
||||
$('#exportEndDate').val($('#endDate').val());
|
||||
$('#exportPartitionId').val($('#partitionId').val());
|
||||
$('#exportLoginType').val($('#loginType').val());
|
||||
$('#exportIsCharge').val($('#isCharge').val());
|
||||
$('#exportFirstRoomErBanNo').val($('#firstRoomErBanNo').val());
|
||||
form.submit();
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
initPartition() {
|
||||
|
@@ -11,10 +11,14 @@
|
||||
<div class="pull-left">
|
||||
<form id="searchForm"
|
||||
class="col-sm-pull-12"
|
||||
action="/admin/chargeRecord/exportPartitionDetail?partitionId=2"
|
||||
action="/admin/chargeRecord/exportPartitionDetail"
|
||||
method="get"
|
||||
target="_blank">
|
||||
<div class="col-sm-11">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="2"
|
||||
hidden />
|
||||
<label for="beginDate"
|
||||
class="col-sm-2 control-label">开始日期:</label>
|
||||
<div class="col-sm-4"><input type="text"
|
||||
|
@@ -11,10 +11,14 @@
|
||||
<div class="pull-left">
|
||||
<form id="searchForm"
|
||||
class="col-sm-pull-12"
|
||||
action="/admin/chargeRecord/exportPartitionDetail?partitionId=1"
|
||||
action="/admin/chargeRecord/exportPartitionDetail"
|
||||
method="get"
|
||||
target="_blank">
|
||||
<div class="col-sm-11">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="1"
|
||||
hidden />
|
||||
<label for="beginDate"
|
||||
class="col-sm-2 control-label">开始日期:</label>
|
||||
<div class="col-sm-4"><input type="text"
|
||||
|
@@ -11,10 +11,14 @@
|
||||
<div class="pull-left">
|
||||
<form id="searchForm"
|
||||
class="col-sm-pull-12"
|
||||
action="/admin/chargeRecord/exportPartitionDetail?partitionId=4"
|
||||
action="/admin/chargeRecord/exportPartitionDetail"
|
||||
method="get"
|
||||
target="_blank">
|
||||
<div class="col-sm-11">
|
||||
<input type="number"
|
||||
name="partitionId"
|
||||
value="4"
|
||||
hidden />
|
||||
<label for="beginDate"
|
||||
class="col-sm-2 control-label">开始日期:</label>
|
||||
<div class="col-sm-4"><input type="text"
|
||||
|
205
src/views/users/FeedBack.vue
Normal file
205
src/views/users/FeedBack.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<!-- 时间选择器 -->
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>反馈类型</span>
|
||||
<el-select filterable v-model="inquire.value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.options"
|
||||
:key="item.type"
|
||||
:label="JsonFunc(item.desc).zh"
|
||||
:value="item.type"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- 导出按钮 -->
|
||||
<el-button class="primary" type="primary" @click="derive()">导出</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="desc" align="center" label="问题描述" />
|
||||
<el-table-column prop="type" align="center" label="反馈类型">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.type == 1
|
||||
? "应用异常"
|
||||
: row.type == 2
|
||||
? "充值或收入"
|
||||
: row.type == 3
|
||||
? "账号申诉"
|
||||
: row.type == 4
|
||||
? "建议"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="giftInfo"
|
||||
label="反馈截图"
|
||||
width="120"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
v-if="scope.row.screenUrl"
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.screenUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="scope.row.screenUrl"
|
||||
fit="cover"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
<div v-else>/</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contact" align="center" label="联系方式" />
|
||||
<el-table-column prop="createTime" align="center" label="生成时间" />
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<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"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listType, pageRecord } from "@/api/feedBack/feedBack";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export default {
|
||||
name: "FeedBack",
|
||||
data() {
|
||||
return {
|
||||
inquire: {
|
||||
giftId: "",
|
||||
userId: "",
|
||||
time: "",
|
||||
value: "",
|
||||
options: [],
|
||||
},
|
||||
loading: false,
|
||||
// 表格数据
|
||||
tableData: [],
|
||||
// 分页
|
||||
total: 10, //总页数
|
||||
currentPage: 1, //页码
|
||||
pageSize: 10, //条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listType().then((res) => {
|
||||
this.inquire.options = res.data;
|
||||
});
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.loading = true;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (this.inquire.time && this.inquire.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");
|
||||
}
|
||||
pageRecord({
|
||||
startTime,
|
||||
endTime,
|
||||
type: this.inquire.value,
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
} else {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: res.message || "获取数据失败",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("请求出错:", error);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请求出错,请稍后重试",
|
||||
type: "error",
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
JsonFunc(val) {
|
||||
var res = JSON.parse(val);
|
||||
return res;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange(size) {
|
||||
this.pageSize = size;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(page) {
|
||||
this.currentPage = page;
|
||||
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;
|
||||
}
|
||||
}
|
||||
.paginationClass {
|
||||
margin: 15px 0 5px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -1,128 +0,0 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div id="table"></div>
|
||||
<div id="toolbar">
|
||||
用户uid: <input type="text" name="uid" id="uid" class="input-sm">
|
||||
选择时间: <input type="text" name="beginDate" id="beginDate" class="input-sm">
|
||||
至 <input type="endDate" id="endDate" class="input-sm">
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "FeedbackAdminView",
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'uid', title: '用户uid', align: 'center', width: '10%' },
|
||||
{
|
||||
field: 'feedbackDesc', title: '反馈信息', align: 'center', width: '20%',
|
||||
formatter: function (val, row, index) {
|
||||
return val ? val.replace('<', '《').replace('>', '》') : '';
|
||||
}
|
||||
},
|
||||
{ field: 'imgUrl', title: '反馈截图', align: 'center', width: '10%' },
|
||||
{ field: 'contact', title: '摘要', align: 'center', width: '10%' },
|
||||
{
|
||||
field: 'createTime', title: '生成时间', align: 'center',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
var date = new Date(val);
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 10,
|
||||
pagination: true,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||
//设置为limit可以获取limit, offset, search, sort, order
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
var param = {
|
||||
pageSize: params.pageSize,
|
||||
pageNum: params.pageNumber,
|
||||
uid: $('#uid').val(),
|
||||
beginDate: $('#beginDate').val(),
|
||||
endDate: $('#endDate').val()
|
||||
};
|
||||
return param;
|
||||
},
|
||||
uniqueId: 'code',
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/feedback/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
|
||||
})
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
})
|
||||
var picker1 = $("#beginDate").datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
todayBtn: true,
|
||||
autoclose: true,
|
||||
startDate: "2016-01-01"
|
||||
});
|
||||
var picker2 = $("#endDate").datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
todayBtn: true,
|
||||
autoclose: true
|
||||
});
|
||||
picker1.on('changeDate', function () {
|
||||
var date = $('#beginDate').datepicker('getDate');
|
||||
picker2.datepicker('setStartDate', date);
|
||||
});
|
||||
picker2.on('changeDate', function () {
|
||||
var date = $('#endDate').datepicker('getDate');
|
||||
picker1.datepicker('setEndDate', date);
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#btnSearch {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
#uid {
|
||||
margin-right: 4px;
|
||||
}</style>
|
@@ -1,170 +1,209 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div id="table"></div>
|
||||
<div id="toolbar">
|
||||
平台号:<input type="text" class="input-sm validate[required]" name="erbanNo" id="erbanNo">
|
||||
手机号:<input type="text" class="input-sm validate[required]" name="phone" id="phone">
|
||||
设备号:<input type="text" class="input-sm validate[required]" name="deviceId" id="deviceId">
|
||||
查询类型:<select name="loginType" id="loginType" class="input-sm">
|
||||
<option value="">---全部---</option>
|
||||
<option value="1">微信登录</option>
|
||||
<option value="2">qq登录</option>
|
||||
<option value="3">手机号登录</option>
|
||||
<option value="4">一键登录</option>
|
||||
<option value="5">苹果登录</option>
|
||||
<option value="6">ticket登录</option>
|
||||
</select>
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div id="table"></div>
|
||||
<div id="toolbar">
|
||||
平台号:<input type="text"
|
||||
class="input-sm validate[required]"
|
||||
name="erbanNo"
|
||||
id="erbanNo">
|
||||
手机号:<input type="text"
|
||||
class="input-sm validate[required]"
|
||||
name="phone"
|
||||
id="phone">
|
||||
设备号:<input type="text"
|
||||
class="input-sm validate[required]"
|
||||
name="deviceId"
|
||||
id="deviceId">
|
||||
查询类型:<select name="loginType"
|
||||
id="loginType"
|
||||
class="input-sm">
|
||||
<option value="">---全部---</option>
|
||||
<option value="1">微信登录</option>
|
||||
<option value="2">qq登录</option>
|
||||
<option value="3">手机号登录</option>
|
||||
<option value="4">一键登录</option>
|
||||
<option value="5">苹果登录</option>
|
||||
<option value="6">ticket登录</option>
|
||||
</select>
|
||||
<button id="btnSearch"
|
||||
class="btn btn-sm btn-primary">查询</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
|
||||
export default {
|
||||
name: "UserRecordAdminView",
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'recordId', title: 'recordId', align: 'center', valign: 'middle', width: '5%' },
|
||||
{ field: 'phone', title: '手机号', align: 'center', valign: 'middle', width: '5%' },
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '5%' },
|
||||
{
|
||||
field: 'loginType',
|
||||
title: '登录类型',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle',
|
||||
formatter: function (val, row, index) {
|
||||
switch (val) {
|
||||
case 1:
|
||||
return '微信登录';
|
||||
|
||||
case 2:
|
||||
return 'QQ登录';
|
||||
|
||||
case 3:
|
||||
return '手机登录或者平台号登录';
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'loginIp',
|
||||
title: '登录IP',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle'
|
||||
},
|
||||
/*{
|
||||
field: 'weixinOpenid',
|
||||
title: '微信号',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle'
|
||||
},
|
||||
{field: 'qqOpenid',
|
||||
title: 'qq号',
|
||||
align: 'center', width: '10%',
|
||||
valign: 'middle'
|
||||
},*/
|
||||
{
|
||||
field: 'os',
|
||||
title: '系统类型',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
valign: 'middle'
|
||||
},
|
||||
{ field: 'osversion', title: '系统版本', align: 'center', width: '5%', valign: 'middle' },
|
||||
{ field: 'ispType', title: '运营商类型', align: 'center', width: '5%', valign: 'middle' },
|
||||
{ field: 'deviceId', title: '设备号', align: 'center', width: '10%', valign: 'middle' },
|
||||
{ field: 'model', title: '手机型号', align: 'center', width: '10%', valign: 'middle' },
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
var date = new Date(val);
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
/*{
|
||||
field: 'tmp',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '20%',
|
||||
valign: 'middle',
|
||||
formatter: function (val, row, index) {
|
||||
var key = row.blockId;
|
||||
return "<button class='btn btn-sm btn-success opt-release' data-id=" + key + ">解封</button> "+
|
||||
"<button class='btn btn-sm btn-success opt-edit' data-id=" + key + " >编辑</button>";
|
||||
}
|
||||
}*/
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 10,
|
||||
pagination: true,
|
||||
pageList: [10, 20, 30, 50],
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
var param = {
|
||||
pageSize: params.pageSize,
|
||||
pageNum: params.pageNumber,
|
||||
phone: $('#phone').val(),
|
||||
erbanNo: $('#erbanNo').val(),
|
||||
deviceId: $('#deviceId').val(),
|
||||
loginType: $('#loginType').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
uniqueId: 'code',
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/accountLoginRecord/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
})
|
||||
name: "UserRecordAdminView",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'recordId', title: 'recordId', align: 'center', valign: 'middle', width: '5%' },
|
||||
{ field: 'phone', title: '手机号', align: 'center', valign: 'middle', width: '5%' },
|
||||
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '5%' },
|
||||
{
|
||||
field: 'loginType',
|
||||
title: '登录类型',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle',
|
||||
formatter: function (val, row, index) {
|
||||
switch (val) {
|
||||
case 1:
|
||||
return '微信登录';
|
||||
|
||||
/*查询刷新*/
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
case 2:
|
||||
return 'QQ登录';
|
||||
|
||||
case 3:
|
||||
return '手机登录或者平台号登录';
|
||||
|
||||
case 4:
|
||||
return '一键登录';
|
||||
|
||||
case 5:
|
||||
return '苹果登录';
|
||||
|
||||
case 6:
|
||||
return '冷启动';
|
||||
|
||||
case 7:
|
||||
return '账号密码登录';
|
||||
|
||||
case 8:
|
||||
return '谷歌登录';
|
||||
|
||||
case 9:
|
||||
return 'line登录';
|
||||
|
||||
case 10:
|
||||
return 'fackbook登录';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'loginIp',
|
||||
title: '登录IP',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'loginIpRegion',
|
||||
title: '登录IP地区',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle'
|
||||
},
|
||||
/*{
|
||||
field: 'weixinOpenid',
|
||||
title: '微信号',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle'
|
||||
},
|
||||
{field: 'qqOpenid',
|
||||
title: 'qq号',
|
||||
align: 'center', width: '10%',
|
||||
valign: 'middle'
|
||||
},*/
|
||||
{
|
||||
field: 'os',
|
||||
title: '系统类型',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
valign: 'middle'
|
||||
},
|
||||
{ field: 'osversion', title: '系统版本', align: 'center', width: '5%', valign: 'middle' },
|
||||
{ field: 'ispType', title: '运营商类型', align: 'center', width: '5%', valign: 'middle' },
|
||||
{ field: 'deviceId', title: '设备号', align: 'center', width: '10%', valign: 'middle' },
|
||||
{ field: 'model', title: '手机型号', align: 'center', width: '10%', valign: 'middle' },
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
valign: 'middle',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
var date = new Date(val);
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
/*{
|
||||
field: 'tmp',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '20%',
|
||||
valign: 'middle',
|
||||
formatter: function (val, row, index) {
|
||||
var key = row.blockId;
|
||||
return "<button class='btn btn-sm btn-success opt-release' data-id=" + key + ">解封</button> "+
|
||||
"<button class='btn btn-sm btn-success opt-edit' data-id=" + key + " >编辑</button>";
|
||||
}
|
||||
}*/
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 30, 50],
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageSize: params.pageSize,
|
||||
pageNum: params.pageNumber,
|
||||
phone: $('#phone').val(),
|
||||
erbanNo: $('#erbanNo').val(),
|
||||
deviceId: $('#deviceId').val(),
|
||||
loginType: $('#loginType').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
uniqueId: 'code',
|
||||
toolbar: '#toolbar',
|
||||
url: '/admin/accountLoginRecord/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
})
|
||||
|
||||
/*查询刷新*/
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
@@ -172,37 +211,38 @@ export default {
|
||||
<style scoped>
|
||||
.bar1,
|
||||
.bar2 {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
label.col-sm-1 {
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
text-align: right;
|
||||
/*padding-right: 4px;*/
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
text-align: right;
|
||||
/*padding-right: 4px;*/
|
||||
}
|
||||
|
||||
label.col-sm-1 {
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
text-align: right;
|
||||
/*padding-right: 4px;*/
|
||||
padding: 0;
|
||||
line-height: 30px;
|
||||
text-align: right;
|
||||
/*padding-right: 4px;*/
|
||||
}
|
||||
|
||||
input,
|
||||
select {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#btnSearch {
|
||||
margin-left: 36px;
|
||||
margin-left: 36px;
|
||||
}
|
||||
|
||||
.record {
|
||||
margin-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.record .title {
|
||||
font-size: 16px;
|
||||
}</style>
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user