Compare commits

...

117 Commits

Author SHA1 Message Date
dragon
d31726d6e7 更新请求接口方式 2024-07-18 16:39:18 +08:00
dragon
7bdbb9f071 修复bug暂存-周卡 2024-07-18 14:48:58 +08:00
dragon
cb54148f6e 对接完成接口-周卡 2024-07-18 14:48:58 +08:00
dragon
fcefd9e09d 暂存 2024-07-18 14:48:57 +08:00
dragon
210a6a8f71 暂存 2024-07-18 14:48:57 +08:00
dragon
7ea73622cd 完成勋章赠送 2024-07-18 14:32:57 +08:00
dragon
6e66ca4864 新增赠送VIP&新增工会信息-导出 2024-07-16 19:34:48 +08:00
khalil
12761b956c 后台-登录-恢复验证码 2024-07-15 18:49:39 +08:00
khalil
76f9bcddab 装扮商城-分页 2024-07-15 18:40:55 +08:00
khalil
3e490e2631 后台-登录-取消验证码
(cherry picked from commit ad73c6c3de1a3e6309c757f0511ce58414f01824)
2024-07-15 15:50:56 +08:00
khalil
00b2bf5917 家族-家族信息=增加会长分区信息 2024-07-12 23:43:17 +08:00
dragon
5b41dbabed 恢复工会信息代码 2024-07-12 20:50:54 +08:00
dragon
b53103c162 新增陪玩点单-游戏信息 2024-07-12 14:37:23 +08:00
khalil
4fcc220759 家族-后台-补充操作列 2024-07-12 11:11:21 +08:00
khalil
386966a84e 邀请排名-查询条件-日期格式 2024-07-12 10:47:55 +08:00
khalil
e2c6898f16 邀请排名-排序类型-默认值
(cherry picked from commit 020ac0a3adcf4e6cfba8832b5f3b60b8682ce1d5)
2024-07-11 22:34:38 +08:00
khalil
ef83e6d239 家族-后台-增加分区描述 2024-07-11 18:35:38 +08:00
khalil
942cd1e479 游戏陪玩-后台-用户陪玩-编辑回显 2024-07-11 18:33:08 +08:00
liaozetao
939940a217 新增游戏点单 2024-07-09 14:12:08 +08:00
dragon
de2c0fe8ea 移除反馈导出按钮 2024-07-08 19:01:21 +08:00
dragon
ab3b8c2871 新增反馈 2024-07-08 15:13:58 +08:00
dragon
3a39476782 删除中奖记录欧气1+1-幸运享 2024-07-08 14:15:47 +08:00
dragon
bda30dd647 进入子页面重新加载数据 2024-07-05 19:46:19 +08:00
dragon
e87f8e4c82 修复选择礼物异常问题-幸运享 2024-07-05 19:36:35 +08:00
liaozetao
34dbcc2f2b 修改福袋礼物列表接口 2024-07-05 18:25:45 +08:00
dragon
33af99f086 修复气泡不显示问题 2024-07-05 17:32:50 +08:00
dragon
4096f9be43 修改福袋接口请求 2024-07-05 17:32:46 +08:00
dragon
2210a40f67 优化代码 2024-07-05 17:32:23 +08:00
liaozetao
62155cbc96 修改获取线性福袋获取逻辑 2024-07-05 16:44:42 +08:00
dragon
7c0438b070 修复bug-幸运哼 2024-07-04 22:15:50 +08:00
dragon
40884b5b21 新增幸运福袋配置后台 2024-07-04 22:15:50 +08:00
dragon
966cc40b3c 新增工会信息查询外用 2024-07-04 22:13:36 +08:00
khalil
6075a3b7ef 后台-充值明细-分区
(cherry picked from commit ce063dc77e0f5be34a03939f9474062f448b0230)
2024-07-03 15:43:46 +08:00
liaozetao
5c54053377 新增小游戏统计导出 2024-07-03 14:22:19 +08:00
khalil
abcffa1cc3 后台-登录记录-增加ip地区 2024-07-03 11:04:34 +08:00
liaozetao
1860ce0e48 新增头饰类型上传 2024-07-03 10:59:38 +08:00
khalil
a9b5f44e88 首页-后台-最近-url 2024-06-24 20:19:52 +08:00
khalil
0645211afc 首页-后台-最近
(cherry picked from commit 8064566ab0e895e509802501dc69305a1b7b179f)
2024-06-24 20:19:44 +08:00
dragon
8b69be0d27 优化奖品设置下拉选项 2024-06-24 11:09:19 +08:00
liaozetao
24b59255c6 新增房间类型 2024-06-21 11:15:59 +08:00
dragon
79421740f9 新增工会阿拉伯公会信息-推荐人字段 2024-06-20 14:37:53 +08:00
liaozetao
6e3e4951aa 修改查询条件问题 2024-06-19 14:34:23 +08:00
liaozetao
7c06e79a8f 新增用户明细增加字段 2024-06-19 11:51:59 +08:00
liaozetao
dc041fd84f 修复保存逻辑 2024-06-17 17:18:57 +08:00
liaozetao
1eaceed61b 补充呢 2024-06-17 14:40:02 +08:00
liaozetao
017bf0c641 修复固定文案展示 2024-06-17 14:01:29 +08:00
liaozetao
8f9a22ffd1 新增铭牌固定文案多语言 2024-06-17 11:24:14 +08:00
khalil
aba3833f5b 分区充值统计-导出-增加分区id 2024-06-17 10:26:25 +08:00
liaozetao
daa04b9269 新增头条内容 2024-06-12 12:25:04 +08:00
dragon
4e9dbb6622 新增违规类型配置 2024-06-11 15:31:35 +08:00
dragon
57c96c8aaf 暂存阿拉伯公会新页面 以及新字段增加 2024-06-07 14:17:35 +08:00
dragon
28e104e649 修改游戏管理bug 2024-06-06 15:14:19 +08:00
dragon
9c996955f2 修复列表显示异常 2024-06-06 15:14:19 +08:00
dragon
8823ec2ec3 修改传参字段 2024-06-06 15:14:18 +08:00
dragon
2cc695c978 新增游戏管理后台 2024-06-06 15:14:18 +08:00
dragon
d591cfc013 游戏管理暂存 2024-06-06 15:14:17 +08:00
liaozetao
eec3bb54cb 修改字段名称 2024-06-06 14:12:15 +08:00
liaozetao
45ca219d0f 补充 2024-06-06 11:33:53 +08:00
liaozetao
d63f15638b 新增多语言管理 2024-06-06 11:28:57 +08:00
liaozetao
7b13dadd12 修改平台收入计算 2024-06-06 10:24:38 +08:00
liaozetao
6f5ad0ee6a 修改编码问题 2024-06-05 16:02:37 +08:00
liaozetao
d908b73193 修改选项长度 2024-06-05 15:55:17 +08:00
liaozetao
5ac087e5aa 修改时间格式化 2024-06-05 15:46:05 +08:00
liaozetao
1e1119eb35 补充 2024-06-05 15:39:02 +08:00
liaozetao
7c62ef6549 修改游戏数据统计 2024-06-05 15:22:52 +08:00
liaozetao
8a3806855b 修改展示字眼 2024-06-04 18:06:54 +08:00
dragon
2fce98c88e 补齐代码 2024-06-03 19:09:46 +08:00
dragon
5680f42d06 新增公会功能 2024-06-03 19:06:21 +08:00
liaozetao
5dc4eb5198 修改游戏模式 2024-05-31 17:43:05 +08:00
liaozetao
95382d1c87 buchon 2024-05-31 17:35:56 +08:00
dragon
d42e95e2b3 新增解散阿拉伯公会按钮 2024-05-29 18:46:28 +08:00
khalil
d9518f4c33 分区充值统计-拆分分区 2024-05-28 16:13:46 +08:00
khalil
6085f5fce6 分区充值统计-美元 2024-05-27 22:10:20 +08:00
khalil
eac6f613f7 分区充值统计
(cherry picked from commit 5f2cb18b6a89696b8285173ed4862629e1b0f73c)
2024-05-27 21:33:27 +08:00
dragon
80ddf7b5a5 添加映射类型 2024-05-24 17:43:25 +08:00
dragon
69ec2ebef9 修改工会时间选择器 2024-05-24 17:43:25 +08:00
dragon
3062812f1f 新增公会阿拉伯地区后台 2024-05-24 17:43:25 +08:00
liaozetao
616758549b 补充 2024-05-24 17:40:47 +08:00
liaozetao
8fdb2b6c0d 修改自定义文案逻辑 2024-05-24 17:31:43 +08:00
liaozetao
afe984fe84 修改铭牌选择问题 2024-05-23 16:41:45 +08:00
liaozetao
49dc775fff 新增LUDO游戏统计 2024-05-21 14:31:19 +08:00
liaozetao
4077895f55 修改长度 2024-05-20 16:18:08 +08:00
liaozetao
a9c7ee9a47 修改资源位多分区 2024-05-20 16:06:30 +08:00
liaozetao
e402157726 修改房间类型提示语 2024-05-17 14:24:30 +08:00
liaozetao
8e01552671 切换房间类型 2024-05-17 10:56:54 +08:00
liaozetao
c27c5490b2 去除新秀房 2024-05-17 10:31:26 +08:00
liaozetao
f4f374295d 修改时间 2024-05-16 16:09:04 +08:00
liaozetao
a514eacf81 新增时间筛选条件 2024-05-16 15:55:35 +08:00
liaozetao
4f7271a87b 修改为精确日期 2024-05-15 14:51:04 +08:00
liaozetao
f99c063b52 日期标题 2024-05-15 14:08:34 +08:00
liaozetao
d9aabae260 修复详情问题 2024-05-15 14:06:41 +08:00
liaozetao
04dcb3cfa5 补充 2024-05-15 11:36:03 +08:00
liaozetao
d461f9c298 新增百顺小游戏统计 2024-05-15 11:16:42 +08:00
liaozetao
3784b748f7 修复时间查询问题 2024-05-13 14:27:35 +08:00
liaozetao
85a6ea9106 修复查询条件问题 2024-05-09 18:10:22 +08:00
liaozetao
e4f9cfb3ec 修復時間篩選框問題 2024-05-09 15:11:09 +08:00
liaozetao
097c0b0d08 修改时间查询条件 2024-05-09 11:52:04 +08:00
liaozetao
c175d662e8 修改日期查询组建 2024-05-08 16:39:59 +08:00
liaozetao
2d28fbcb8f 修复时间问题 2024-05-08 16:31:38 +08:00
liaozetao
df9e96de9a 新增公聊大厅查询列表 2024-05-08 16:31:29 +08:00
liaozetao
fafbd3e75c 恢复代码 2024-05-07 12:03:55 +08:00
liaozetao
a86e731633 修改寻爱之旅编辑 2024-05-07 11:54:53 +08:00
liaozetao
c584f0154f 恢复代码 2024-04-30 18:01:49 +08:00
liaozetao
e694f3f9a7 补充扩展字段 2024-04-30 17:55:49 +08:00
liaozetao
4b417d446f 修复铭牌获取问题 2024-04-30 15:16:08 +08:00
liaozetao
697af0c109 修改默认值 2024-04-29 15:13:02 +08:00
liaozetao
a3d6c0c82c 修改字眼 2024-04-28 15:46:40 +08:00
liaozetao
2ac3b75d30 替换金币字眼为钻石 2024-04-28 10:26:23 +08:00
liaozetao
6819127c40 修改礼物管理默认值 2024-04-26 18:25:20 +08:00
liaozetao
5c67b35aaa 添加地区 2024-04-26 14:12:48 +08:00
liaozetao
f5753982d0 修复许愿之星地区查询 2024-04-25 15:22:17 +08:00
liaozetao
22285b39c2 修復查詢條件 2024-04-24 21:40:39 +08:00
liaozetao
da3e97026c 补充 2024-04-24 18:45:42 +08:00
liaozetao
5e4f13c8d9 修复许愿之星礼物过滤问题 2024-04-24 17:57:04 +08:00
liaozetao
8692437f87 修复寻爱之旅奖品配置问题 2024-04-24 11:51:01 +08:00
liaozetao
5efd586524 修改赠送金币字眼 2024-04-24 10:31:59 +08:00
liaozetao
747ef1c4f1 修复mp4问题 2024-04-23 16:57:37 +08:00
130 changed files with 13909 additions and 2152 deletions

28
package-lock.json generated
View File

@@ -25,6 +25,7 @@
"popper.js": "^1.16.1",
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"unplugin-element-plus": "^0.8.0",
"vue-router": "^4.0.3",
"vuex": "^4.0.0",
"xlsx": "^0.18.5"
@@ -2193,7 +2194,6 @@
"version": "5.0.5",
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.5.tgz",
"integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==",
"dev": true,
"dependencies": {
"@types/estree": "^1.0.0",
"estree-walker": "^2.0.2",
@@ -12376,7 +12376,6 @@
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-1.5.0.tgz",
"integrity": "sha512-9ZdRwbh/4gcm1JTOkp9lAkIDrtOyOxgHmY7cjuwI8L/2RTikMcVG25GsZwNAgRuap3iDw2jeq7eoqtAsz5rW3A==",
"dev": true,
"dependencies": {
"acorn": "^8.10.0",
"chokidar": "^3.5.3",
@@ -12448,6 +12447,28 @@
"node": ">=16 || 14 >=14.17"
}
},
"node_modules/unplugin-element-plus": {
"version": "0.8.0",
"resolved": "https://registry.npmmirror.com/unplugin-element-plus/-/unplugin-element-plus-0.8.0.tgz",
"integrity": "sha512-jByUGY3FG2B8RJKFryqxx4eNtSTj+Hjlo8edcOdJymewndDQjThZ1pRUQHRjQsbKhTV2jEctJV7t7RJ405UL4g==",
"dependencies": {
"@rollup/pluginutils": "^5.0.2",
"es-module-lexer": "^1.3.0",
"magic-string": "^0.30.1",
"unplugin": "^1.3.2"
},
"engines": {
"node": ">=14.19.0"
}
},
"node_modules/unplugin-element-plus/node_modules/magic-string": {
"version": "0.30.10",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.10.tgz",
"integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
}
},
"node_modules/unplugin-vue-components": {
"version": "0.25.2",
"resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.25.2.tgz",
@@ -12527,8 +12548,7 @@
"node_modules/unplugin/node_modules/webpack-virtual-modules": {
"version": "0.5.0",
"resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz",
"integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==",
"dev": true
"integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw=="
},
"node_modules/update-browserslist-db": {
"version": "1.0.13",

View File

@@ -25,6 +25,7 @@
"popper.js": "^1.16.1",
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"unplugin-element-plus": "^0.8.0",
"vue-router": "^4.0.3",
"vuex": "^4.0.0",
"xlsx": "^0.18.5"

View File

@@ -0,0 +1,34 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
// 查询用户接口
export const getByErbanNo = query => {
return request({
url: '/admin/user/getByErbanNo',
method: 'get',
params: query
});
};
// 获取VIP列表接口
export const listAll = query => {
return request({
url: '/admin/vip/listAll',
method: 'get',
params: query
});
};
// 获取列表接口
export const pageRecord = query => {
return request({
url: '/vipSend/pageRecord',
method: 'get',
params: query
});
};
// 赠送VIP接口
export const vipSendSend = query => {
return request({
url: '/vipSend/send',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request';
export const getPublicChatTopRecordPage = query => {
return request({
url: '/admin/publicChatTopRecord/page',
method: 'get',
params: query
});
};

View 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
});
};

View File

@@ -0,0 +1,20 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
// 获取游戏列表
export const mgList = query => {
return request({
url: '/admin/miniGame/statis/mgList',
method: 'get',
params: query
});
};
// 游戏编辑
export const save = query => {
return request({
url: '/admin/miniGame/save',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: query
});
};

View File

@@ -0,0 +1,29 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// ==================================每日数据====================================
// 列表
export const page = query => {
return request({
url: '/admin/gamePartner/info/page',
method: 'get',
params: query
});
};
// 编辑修改
export const save = query => {
return request({
url: '/admin/gamePartner/info/save',
method: 'post',
data: query
});
};
// 删除
export const delGame = query => {
return request({
url: '/admin/gamePartner/info/delGame',
method: 'get',
params: query
});
};

View 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;
};

58
src/api/medal/medal.js Normal file
View File

@@ -0,0 +1,58 @@
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 medalPage = query => {
return request({
url: '/admin/medal/page',
method: 'get',
params: query
});
};
// 勋章信息-新增&保存
export const medalSave = query => {
return request({
url: '/admin/medal/save',
method: 'post',
params: query
});
};
// 勋章信息-发放
export const medalSend = query => {
return request({
url: '/admin/medal/send',
method: 'post',
params: query
});
};
// 勋章记录-撤销
export const rollback = query => {
return request({
url: '/admin/medalRecord/rollback',
method: 'post',
params: query
});
};
// 勋章记录-列表
export const medalRecordPage = query => {
return request({
url: '/admin/medalRecord/page',
method: 'get',
params: query
});
};
// 勋章记录-勋章列表
export const listAll = query => {
return request({
url: '/admin/medal/listAll',
method: 'get',
params: query
});
};

View File

@@ -0,0 +1,28 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
export const miniGameForBaiShunPage = query => {
return request({
url: '/admin/miniGame/baiShun/statis/page',
method: 'get',
params: query
});
};
export const miniGameForBaiShunDetailPage = query => {
return request({
url: '/admin/miniGame/baiShun/statis/detailPage',
method: 'get',
params: query
});
};
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;
};

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request';
export const miniGameForNavPage = query => {
return request({
url: '/admin/miniGame/nav/page',
method: 'get',
params: query
});
};

View File

@@ -0,0 +1,122 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
// 邀请移除记录
export const pageOperateRecord = query => {
return request({
url: '/admin/family/manage/pageOperateRecord',
method: 'get',
params: query
});
};
// 查询公会信息
export const pageFamily = query => {
return request({
url: '/admin/family/manage/pageFamily',
method: 'get',
params: query
});
};
// 公会成员信息
export const pageFamilyMember = query => {
return request({
url: '/admin/family/manage/pageFamilyMember',
method: 'get',
params: query
});
};
// 创建公会信息
export const create = query => {
return request({
url: '/admin/family/manage/create',
method: 'post',
params: query
});
};
// 删除公会信息
export const dismiss = query => {
return request({
url: '/admin/family/manage/dismiss',
method: 'post',
params: query
});
};
// 幸运礼物详情导出
export const luckyGiftRewardRecordExport = query => {
window.location.href = `/admin/luckyGiftRewardRecord/export?${genQueryParam(query)}`;
return;
};
// 公会信息编辑接口
export const update = query => {
return request({
url: '/admin/family/manage/update',
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;
};
// 导出-公会信息
export const exportInfo = query => {
window.location.href = `/admin/family/manage/exportFamily?${genQueryParam(query)}`;
return;
};

View File

@@ -0,0 +1,17 @@
import request from "@/utils/request";
export function getI18nMessageList() {
return request({
url: '/admin/i18nMessage/list',
method: 'get'
});
}
export function saveI18nMessage(data) {
return request({
url: '/admin/i18nMessage/save',
headers:{"Content-Type": 'application/x-www-form-urlencoded'},
method: 'post',
data: data
});
}

View File

@@ -0,0 +1,135 @@
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
});
};
// 周卡TAB-列表
export const weekCardTabList = query => {
return request({
url: '/admin/weekCardTab/list',
method: 'get',
params: query
});
};
// 周卡TAB-保存
export const weekCardTabSave = query => {
return request({
url: '/admin/weekCardTab/save',
method: 'post',
params: query
});
};
// 周卡激励统计-列表
export const weekCardRecordPage = query => {
return request({
url: '/admin/weekCardRecord/page',
method: 'get',
params: query
});
};
// 周卡激励统计-详情
export const weekCardRecordGetDetailPage = query => {
return request({
url: '/admin/weekCardRecord/getDetailPage',
method: 'get',
params: query
});
};
// 周卡激励统计-导出
export const weekCardRecordExport = query => {
window.location.href = `/admin/weekCardRecord/export?${genQueryParam(query)}`;
return;
};
// 周卡激励配置-列表
export const weekCardPage = query => {
return request({
url: '/admin/weekCard/page',
method: 'get',
params: query
});
};
// 周卡激励配置-上下线
export const updateEnabled = query => {
return request({
url: '/admin/weekCard/updateEnabled',
method: 'get',
params: query
});
};
// 周卡激励配置-保存
export const weekCardSave = query => {
return request({
url: '/admin/weekCard/save',
method: 'post',
params: query
});
};

View File

@@ -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>

View File

@@ -51,6 +51,7 @@ export default {
},
getViewComponent(context, path) {
let component = path;
console.log(component)
if (path && path.endsWith('.html')) {
const pathArray = path.split('/');
const routeName = toCamelCase(pathArray[pathArray.length - 1].replace('.html', ''));

View File

@@ -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];

View File

@@ -10,7 +10,7 @@
<div id="toolbar">
奖品类别<select name="prizeType" id="prizeType" class="input-m">
<option value="0">--全部--</option>
<option value="1">金币</option>
<option value="1">钻石</option>
<option value="2">线上礼物</option>
<option value="3">座驾</option>
<option value="4">头饰</option>
@@ -45,7 +45,7 @@
<div class="col-sm-8" style="padding-top:7px;">
<select name="addType" id="addType" data-btn-class="btn btn-warning">
<option value="1">金币</option>
<option value="1">钻石</option>
<option value="2">线上礼物</option>
<option value="3">座驾</option>
<option value="4">头饰</option>
@@ -179,7 +179,7 @@ export default {
field: 'prizeType', title: '奖品类别', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
switch (val) {
case 1:
return '金币';
return '钻石';
case 2:
return '在线礼物';
@@ -529,7 +529,7 @@ export default {
$('#carChoose').combobox();
})
$.get('/admin/nameplate//total/list', {}, function (res) {
$.get('/admin/nameplate/total/list', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
// car.push(res.data[i]);

View File

@@ -655,7 +655,7 @@ export default {
field: 'type', title: '奖品类型', align: 'center', width: '5%', valign: 'middle', formatter: function (val, row, index) {
switch (val) {
case 1:
return '金币';
return '钻石';
case 2:
return '在线礼物';

View File

@@ -14,7 +14,7 @@
<i class="glyphicon glyphicon-search"></i>查询
</button>
<div class="col-sm-12">
当前库存 <span name="stock" id="stock" />钻石
当前库存 <span name="stock" id="stock" />金币
<button id="editStock" class="btn btn-default">编辑库存</button>
</div>
</div>
@@ -58,7 +58,7 @@
<h4 class="modal-title" id="editStockModalTitle">编辑库存</h4>
</div>
<div class="modal-body">
设置库存为 <input type="text" name="editedStock" id="editedStock" class="input-sm"> 钻石
设置库存为 <input type="text" name="editedStock" id="editedStock" class="input-sm"> 金币
</div>
<div class="modal-footer">
<h4 id="editStockModalFooter"></h4>

View File

@@ -41,8 +41,8 @@
<div class="col-sm-9">
<span>
<font color="#dd4b39">1.上传文件仅支持.xlsx格式的文件<br>
2.文件内容第一行为标题(:平台号,金币,钻石)<br>
3.第一列为用户平台号,第二列为用户要添加的金币数量,第三列为用户要添加的钻石数量
2.文件内容第一行为标题(:平台号,钻石,金币)<br>
3.第一列为用户平台号,第二列为用户要添加的钻石数量,第三列为用户要添加的金币数量
</font>
</span>
</div>

View File

@@ -65,8 +65,8 @@
<div class="col-sm-9">
<span>
<font color="#dd4b39">1.上传文件仅支持.xlsx格式的文件<br>
2.文件内容第一行为标题(:平台号,金币,钻石)<br>
3.第一列为用户平台号,第二列为用户要添加的金币数量,第三列为用户要添加的钻石数量
2.文件内容第一行为标题(:平台号,钻石,金币)<br>
3.第一列为用户平台号,第二列为用户要添加的钻石数量,第三列为用户要添加的金币数量
</font>
</span>
</div>
@@ -107,8 +107,8 @@ export default {
// {field: 'temp', title: 'id', align: 'center', checkbox: true, width: '5%'},
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'goldNum', title: '金币数量', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '钻石数量', align: 'center', width: '5%' },
{ field: 'goldNum', title: '钻石数量', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '金币数量', align: 'center', width: '5%' },
{
field: 'createTime',
title: '创建时间',

View File

@@ -14,7 +14,7 @@
<i class="glyphicon glyphicon-search"></i>查询
</button>
<div class="col-sm-12">
当前库存 <span name="stock" id="stock" />金币
当前库存 <span name="stock" id="stock" />钻石
<button id="editStock" class="btn btn-default">编辑库存</button>
</div>
</div>
@@ -58,7 +58,7 @@
<h4 class="modal-title" id="editStockModalTitle">编辑库存</h4>
</div>
<div class="modal-body">
设置库存为 <input type="text" name="editedStock" id="editedStock" class="input-sm"> 金币
设置库存为 <input type="text" name="editedStock" id="editedStock" class="input-sm"> 钻石
</div>
<div class="modal-footer">
<h4 id="editStockModalFooter"></h4>

View File

@@ -136,7 +136,7 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用金币购买</label>
<label class="col-sm-3 control-label">使用钻石购买</label>
<div class="col-sm-9">
<label class="radio-inline"><input type="radio" name="goldSale" value="0"></label>
<label class="radio-inline"><input type="radio" name="goldSale" value="1" checked></label>
@@ -147,7 +147,7 @@
<div class="col-sm-6">
<input type="text" class="form-control" name="price" id="price">
</div>
<span class="col-sm-3">金币</span>
<span class="col-sm-3">钻石</span>
</div>
<div class="form-group">
@@ -155,7 +155,7 @@
<div class="col-sm-6">
<input type="text" class="form-control" name="renewPrice" id="renewPrice">
</div>
<span class="col-sm-3">金币</span>
<span class="col-sm-3">钻石</span>
</div>
<div class="form-group">
<label for="originalPrice" class="col-sm-3 control-label">原价:</label>
@@ -163,7 +163,7 @@
<input type="number" class="form-control" placeholder="没有填0" value="0" name="originalPrice"
id="originalPrice">
</div>
<span class="col-sm-3">金币</span>
<span class="col-sm-3">钻石</span>
</div>
<div class="form-group">
@@ -469,7 +469,7 @@ export default {
},
{
field: 'goldSale',
title: '金币购买',
title: '钻石购买',
align: 'center',
width: '3%',
formatter: function (val, row, index) {
@@ -497,9 +497,9 @@ export default {
}
}
},
{ field: 'originalPrice', title: '原价(金币', align: 'center', width: '5%' },
{ field: 'price', title: '购买价格(金币', align: 'center', width: '5%' },
{ field: 'renewPrice', title: '续费价格(金币', align: 'center', width: '5%' },
{ field: 'originalPrice', title: '原价(钻石', align: 'center', width: '5%' },
{ field: 'price', title: '购买价格(钻石', align: 'center', width: '5%' },
{ field: 'renewPrice', title: '续费价格(钻石', align: 'center', width: '5%' },
{ field: 'radishOriginalPrice', title: '原价(萝卜)', align: 'center', width: '5%' },
{ field: 'radishPrice', title: '购买价格(萝卜)', align: 'center', width: '5%' },
{ field: 'radishRenewPrice', title: '续费价格(萝卜)', align: 'center', width: '5%' },
@@ -1033,7 +1033,7 @@ export default {
return;
}
if (goldSale == 1 && (!price || !renewPrice || !originalPrice)) {
$("#tipMsg").text("请填写完整金币价格");
$("#tipMsg").text("请填写完整钻石价格");
$("#tipModal").modal('show');
return;
} else if (radishSale == 1 && (!radishPrice || !radishRenewPrice || !radishOriginalPrice)) {

View File

@@ -59,7 +59,7 @@ export default {
{ field: 'createTime', title: '日期', align: 'center', width: '5%' },
{ field: 'carId', title: '座驾ID', align: 'center', width: '5%' },
{ field: 'carName', title: '座驾名称', align: 'center', width: '5%' },
{ field: 'carPrice', title: '座驾金额(金币)', align: 'center', width: '5%' },
{ field: 'carPrice', title: '座驾金额(钻石)', align: 'center', width: '5%' },
{ field: 'carRadishPrice', title: '座驾金额(萝卜)', align: 'center', width: '5%' },
{ field: 'carStatus', title: '座驾状态', align: 'center', width: '5%' },
{ field: 'receivedCarNum', title: '用户收到数量', align: 'center', width: '5%' },

View File

@@ -372,7 +372,7 @@ export default {
if (row.chargeProds) {
for (let i = 0, len = row.chargeProds.length; i < len; i++) {
var chargeProd = row.chargeProds[i];
value += currency + ':' + (chargeProd.money / 100) + '手续费 ' + chargeProd.handlingRate + '% 到账钻石:' + chargeProd.chargeGoldNum + '<br/>';
value += currency + ':' + (chargeProd.money / 100) + '手续费 ' + chargeProd.handlingRate + '% 到账金币:' + chargeProd.chargeGoldNum + '<br/>';
}
}
return value;
@@ -549,9 +549,9 @@ export default {
$select.append($option);
}
$div.append($select);
$div.append(' 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" value="' + handlingRate + '" style="width:41px;"/>% 到账钻石<span id="chargeGoldNum' + i + '">' + chargeGoldNum + '</span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
$div.append(' 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" value="' + handlingRate + '" style="width:41px;"/>% 到账金币<span id="chargeGoldNum' + i + '">' + chargeGoldNum + '</span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
} else {
$div.html(currency + ' <input type="text" data-index="' + i + '" id="amount' + i + '" oninput="calc(this)" value="' + amount + '" style="width:41px;"/> 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" value="' + handlingRate + '" style="width:41px;"/>% 到账钻石<span id="chargeGoldNum' + i + '">' + chargeGoldNum + '</span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
$div.html(currency + ' <input type="text" data-index="' + i + '" id="amount' + i + '" oninput="calc(this)" value="' + amount + '" style="width:41px;"/> 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" value="' + handlingRate + '" style="width:41px;"/>% 到账金币<span id="chargeGoldNum' + i + '">' + chargeGoldNum + '</span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
}
$formGroup.append($div);
$form.append($formGroup);
@@ -586,9 +586,9 @@ export default {
$select.append($option);
}
$div.append($select);
$div.append(' 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" style="width:41px;"/>% 到账钻石<span id="chargeGoldNum' + i + '"></span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
$div.append(' 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" style="width:41px;"/>% 到账金币<span id="chargeGoldNum' + i + '"></span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
} else {
$div.html(currency + ' <input type="text" data-index="' + i + '" id="amount' + i + '" oninput="calc(this)" style="width:41px;"/> 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" style="width:41px;"/>% 到账钻石<span id="chargeGoldNum' + i + '"></span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
$div.html(currency + ' <input type="text" data-index="' + i + '" id="amount' + i + '" oninput="calc(this)" style="width:41px;"/> 手续费 <input type="text" data-index="' + i + '" id="handlingRate' + i + '" oninput="calc(this)" style="width:41px;"/>% 到账金币<span id="chargeGoldNum' + i + '"></span> <button class="btn btn-sm btn-default opt-del" data-index="' + i + '">删除</button>');
}
$formGroup.append($div);
$form.append($formGroup);

View File

@@ -73,7 +73,7 @@
<option value="2">铭牌</option>
<option value="3">座驾</option>
<option value="4">头饰</option>
<option value="5">额外钻石</option>
<option value="5">额外金币</option>
</select>
</div>
</div>
@@ -97,7 +97,7 @@
<label for="modal_rewardNum" class="col-sm-3 control-label">奖励个数</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required,custom[integer]]" name="rewardNum"
id="modal_rewardNum" placeholder="礼物、额外钻石输入个数">
id="modal_rewardNum" placeholder="礼物、额外金币输入个数">
</div>
</div>
<div class="form-group">

View File

@@ -41,7 +41,7 @@
</div>
</div>
<div class="form-group">
<label for="amount" class="col-sm-3 control-label">金币大小:</label>
<label for="amount" class="col-sm-3 control-label">钻石大小:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="amount"
id="amount" value=10>
@@ -92,7 +92,7 @@ export default {
{
field: 'amount', title: '金额', align: 'center', width: '10%',
formatter: function (val, row, index) {
return val + "金币";
return val + "钻石";
}
},
{

View File

@@ -0,0 +1,157 @@
<template>
<section class="content">
<div class="box box-danger">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<label for="erbanNo" class="col-sm-1 control-label">ID:</label>
<div class="col-sm-2">
<input type="text" class="form-control" name="erbanNo" id="erbanNo">
</div>
<label for="startTime" class="col-sm-1 control-label">付费日期:</label>
<div class="col-sm-2">
<input type="text" name="startTime" id="timeBegin" class="input-sm form-control" placeholder="起始时间">
</div>
<label for="endTime" class="col-sm-1 control-label">-</label>
<div class="col-sm-2">
<input type="text" name="endTime" id="timeEnd" class="input-sm form-control" 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"></select>
</div>
</div>
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
</div>
</div>
</section><!-- .content -->
</div>
</div>
</section>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { getPublicChatTopRecordPage } from '@/api/chat/publicChatTopRecord';
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
import { buildSelectOption } from '@/utils/system-helper';
export default {
name: 'PublicChatTopRecordView',
data() {
return {
columns: [
{ field: 'erbanNo', title: '用户ID', align: 'center', width: '5%' },
{ field: 'nick', title: '用户昵称', align: 'center', width: '15%' },
{ 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%' },
],
};
},
created() {
this.initPartition();
this.init();
},
methods: {
init() {
this.$nextTick(function () {
let $this = this;
var picker1 = $("#timeBegin").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true,
});
var picker2 = $("#timeEnd").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#timeBegin').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#timeEnd').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
$this.initTable();
$('#btnSearch').click(function () {
$this.search();
});
});
},
initTable() {
let $this = this;
TableHelper.destroy('#table');
$('#table').bootstrapTable({
columns: $this.columns,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var param = {
erbanNo: $('#erbanNo').val(),
startTime: $('#timeBegin').val(),
endTime: $('#timeEnd').val(),
partitionId: $('#partitionId').val(),
pageNum: params.pageNumber,
pageSize: params.pageSize,
};
return param;
},
ajax: function(request) {
getPublicChatTopRecordPage(request.data).then(res => {
let data = res.data;
request.success({
'rows': data.records,
'total': data.total
});
});
},
toolbar: '#toolbar',
});
},
search() {
TableHelper.doRefresh('#table');
},
initPartition() {
getPartitionInfoList().then(res => {
let data = res.data;
buildSelectOption(
"#partitionId",
null,
[{
value: '',
text: '全部',
}].concat(data.map((v) => {
return {
value: v.id,
text: v.desc,
};
}))
);
});
},
},
}
</script>
<style scoped></style>

View File

@@ -1,100 +1,136 @@
<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">
<button id="btnAdd" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
</div>
</div>
<!-- .content -->
<div id="table"></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">
<button id="btnAdd"
class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
</div>
</section>
</div>
<div class="modal fade" id="roomTagModal" 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">&times;</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" />
<div class="form-group">
<label for="dressType" class="col-sm-3 control-label">装扮类型:</label>
<div class="col-sm-9">
<select name="dressType" id="dressType">
<option value="">-- 请选择 --</option>
<option value="0">头饰</option>
<option value="1">座驾</option>
<option value="2">铭牌</option>
<option value="3">资料卡</option>
<option value="4">聊天气泡</option>
</select>
</div>
</div>
<div class="form-group" id="txtBox">
<label for="dressId" class="col-sm-3 control-label">装扮id<font color="red">*</font></label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="dressId" id="dressId"
placeholder="请输入对应的装扮id">
</div>
</div>
<div class="form-group">
<label for="dressSeq" class="col-sm-3 control-label">展示排序<font color="red">*</font></label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="dressSeq" id="dressSeq"
placeholder="数字小的排前面,必填">
</div>
</div>
<div class="form-group">
<label for="dressPrice" class="col-sm-3 control-label">装扮价格:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="dressPrice" id="dressPrice"
placeholder="请输入价格">
</div>
</div>
<div class="form-group">
<label for="dressDay" class="col-sm-3 control-label">有效期:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="dressDay" id="dressDay"
placeholder="请输入天数">
</div>
</div>
<div class="form-group">
<label for="dressLimitStatus" class="col-sm-3 control-label">装扮限时状态:</label>
<div class="col-sm-9">
<select name="dressType" id="dressLimitStatus">
<option value="0"></option>
<option value="1"></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="add">确定</button>
</div>
<!-- .content -->
<div id="table"></div>
</div>
</div>
</div>
</section>
<div class="modal fade"
id="roomTagModal"
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">&times;</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" />
<div class="form-group">
<label for="dressType"
class="col-sm-3 control-label">装扮类型:</label>
<div class="col-sm-9">
<select name="dressType"
id="dressType">
<option value="">-- 请选择 --</option>
<option value="0">头饰</option>
<option value="1">座驾</option>
<option value="2">铭牌</option>
<option value="3">资料卡</option>
<option value="4">聊天气泡</option>
</select>
</div>
</div>
<div class="form-group"
id="txtBox">
<label for="dressId"
class="col-sm-3 control-label">装扮id<font color="red">*</font></label>
<div class="col-sm-9">
<input type="text"
class="form-control validate[required]"
name="dressId"
id="dressId"
placeholder="请输入对应的装扮id">
</div>
</div>
<div class="form-group">
<label for="dressSeq"
class="col-sm-3 control-label">展示排序<font color="red">*</font></label>
<div class="col-sm-9">
<input type="text"
class="form-control validate[required]"
name="dressSeq"
id="dressSeq"
placeholder="数字小的排前面,必填">
</div>
</div>
<div class="form-group">
<label for="dressPrice"
class="col-sm-3 control-label">装扮价格:</label>
<div class="col-sm-9">
<input type="text"
class="form-control validate[required]"
name="dressPrice"
id="dressPrice"
placeholder="请输入价格">
</div>
</div>
<div class="form-group">
<label for="dressDay"
class="col-sm-3 control-label">有效期:</label>
<div class="col-sm-9">
<input type="text"
class="form-control validate[required]"
name="dressDay"
id="dressDay"
placeholder="请输入天数">
</div>
</div>
<div class="form-group">
<label for="dressLimitStatus"
class="col-sm-3 control-label">装扮限时状态:</label>
<div class="col-sm-9">
<select name="dressType"
id="dressLimitStatus">
<option value="0"></option>
<option value="1"></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="add">确定</button>
</div>
</div>
</div>
</div>
</template>
<script>
@@ -102,326 +138,326 @@ import TableHelper from '@/utils/bootstrap-table-helper';
import { serverError } from '@/utils/maintainer';
export default {
name: "DressShopAdminView",
setup() {
return {};
},
created() {
this.$nextTick(function () {
this.initData();
name: "DressShopAdminView",
setup () {
return {};
},
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData () {
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'id', title: 'ID', align: 'center', valign: 'middle', width: '10%' },
{ field: 'dressId', title: '装扮id', align: 'center', valign: 'middle', width: '10%' },
{ field: 'name.zh', title: '装扮名称', align: 'left', valign: 'middle', width: '10%' },
{ field: 'name.ar', title: '阿语装扮名称', align: 'left', valign: 'middle', width: '10%' },
{ field: 'name.en', title: '英语装扮名称', align: 'left', valign: 'middle', width: '10%' },
{
field: 'pic', title: '装扮图片', align: 'left', valign: 'middle', width: '10%',
formatter: function (val, row, index) {
if (null != val && val != '') {
return '<img src="' + val + '" alt="" style="width: 30px; height: 30px;">';
}
return '-';
}
},
{
field: 'dressType',
title: '装扮类型',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val == '0') {
return "头饰";
} else if (val == '1') {
return '座驾';
} else if (val == '2') {
return '铭牌';
} else if (val == '3') {
return '资料卡';
} else if (val == '4') {
return '聊天气泡';
} else {
return '-';
}
}
},
{ field: 'dressSeq', title: '装扮排序', align: 'center', valign: 'middle', width: '10%' },
{ field: 'dressPrice', title: '装扮展示价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'dressDay', title: '装扮有效期(天)', align: 'center', valign: 'middle', width: '10%' },
{ field: 'buyNum', title: '购买数量', align: '购买数量 ', valign: 'middle', width: '10%' },
{ field: 'userDonateNum', title: '购买赠送用户数量', align: '购买数量', valign: 'middle', width: '10%' },
{
field: 'dressLimitStatus',
title: '装扮限时状态',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val == '0') {
return "有效";
} else {
return '无效';
}
}
},
{
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 + '>' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val + ' data-new-status=' + 2 +
'><i class="glyphicon glyphicon-remove"></i>删除</button>';
}
}
],
undefinedText: "-",
cache: false,
striped: true,
showRefresh: false,
pageSize: 50,
pagination: true,
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageNum: params.pageNumber,
pageSize: params.pageSize
};
return param;
},
ajax: function (request) { //使用ajax请求
$.ajax({
type: "GET",
url: '/admin/dress/shop/list',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
data: request.data,
success: function (res) {
apiResult(res);
console.log(res)
request.success({
total: res.data.total,
rows: res.data.rows.map(i => {
let value = i.name;
if (value.startsWith('{') && value.endsWith('}')) {
i.name = JSON.parse(i.name);
} else {
i.name = {
zh: i.name,
ar: i.name,
en: i.name,
};
}
return i;
})
});
},
error: function (req) {
serverError(req);
}
})
},
toolbar: '#toolbar',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
},
methods: {
initData() {
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'id', title: 'ID', align: 'center', valign: 'middle', width: '10%' },
{ field: 'dressId', title: '装扮id', align: 'center', valign: 'middle', width: '10%' },
{field: 'name.zh', title: '装扮名称', align: 'left', valign: 'middle', width: '10%'},
{field: 'name.ar', title: '阿语装扮名称', align: 'left', valign: 'middle', width: '10%'},
{field: 'name.en', title: '英语装扮名称', align: 'left', valign: 'middle', width: '10%'},
{
field: 'pic', title: '装扮图片', align: 'left', valign: 'middle', width: '10%',
formatter: function (val, row, index) {
if (null != val && val != '') {
return '<img src="' + val + '" alt="" style="width: 30px; height: 30px;">';
}
return '-';
}
},
{
field: 'dressType',
title: '装扮类型',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val == '0') {
return "头饰";
} else if (val == '1') {
return '座驾';
} else if (val == '2') {
return '铭牌';
} else if (val == '3') {
return '资料卡';
} else if (val == '4') {
return '聊天气泡';
} else {
return '-';
}
}
},
{ field: 'dressSeq', title: '装扮排序', align: 'center', valign: 'middle', width: '10%' },
{ field: 'dressPrice', title: '装扮展示价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'dressDay', title: '装扮有效期(天)', align: 'center', valign: 'middle', width: '10%' },
{ field: 'buyNum', title: '购买数量', align: '购买数量 ', valign: 'middle', width: '10%' },
{ field: 'userDonateNum', title: '购买赠送用户数量', align: '购买数量', valign: 'middle', width: '10%' },
{
field: 'dressLimitStatus',
title: '装扮限时状态',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val == '0') {
return "有效";
} else {
return '无效';
}
}
},
{
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 + '>' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val + ' data-new-status=' + 2 +
'><i class="glyphicon glyphicon-remove"></i>删除</button>';
}
}
],
undefinedText: "-",
cache: false,
striped: true,
showRefresh: false,
pageSize: 50,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
pageNum: params.pageNumber,
pageSize: params.pageSize
};
return param;
},
ajax: function (request) { //使用ajax请求
$.ajax({
type: "GET",
url: '/admin/dress/shop/list',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
data: request.data,
success: function (res) {
apiResult(res);
console.log(res)
request.success({
"rows": res.data.rows.map(i=>{
let value = i.name;
if (value.startsWith('{') && value.endsWith('}')) {
i.name = JSON.parse(i.name);
} else {
i.name = {
zh: i.name,
ar: i.name,
en: i.name,
};
}
return i;
}),
"total": res.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');
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
//新建标签
$("#btnAdd").click(function () {
clearModal();
$("#roomTagModal").modal('show');
});
//新建标签
$("#btnAdd").click(function () {
clearModal();
$("#roomTagModal").modal('show');
});
$("#add").click(function () {
var id = $("#id").val();
var dressType = $('#dressType').val();
var dressId = $("#dressId").val();
var dressSeq = $('#dressSeq').val();
var dressPrice = $('#dressPrice').val();
var dressDay = $('#dressDay').val();
var dressLimitStatus = $('#dressLimitStatus').val();
$("#add").click(function () {
var id = $("#id").val();
var dressType = $('#dressType').val();
var dressId = $("#dressId").val();
var dressSeq = $('#dressSeq').val();
var dressPrice = $('#dressPrice').val();
var dressDay = $('#dressDay').val();
var dressLimitStatus = $('#dressLimitStatus').val();
if ($("#addForm").validationEngine('validate')) {
$.ajax({
type: "post",
url: "/admin/dress/shop/saveOrUpdate",
data: {
id: id,
dressId: dressId,
dressType: dressType,
dressSeq: dressSeq,
dressPrice: dressPrice,
dressDay: dressDay,
dressLimitStatus: dressLimitStatus,
},
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#roomTagModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#roomTagModal").modal('hide');
}
}
});
}
});
$("#table").on("click", '.opt-edit', function () {
var id = $(this).attr("data-id");
clearModal();
$.ajax({
type: "get",
url: "/admin/dress/shop/getById",
data: { id: id },
dataType: "json",
success: function (res) {
var json = res.data;
if (json) {
$("#id").val(id);
$('#dressId').val(json.dressId);
$('#dressType').val(json.dressType);
$('#dressSeq').val(json.dressSeq);
$('#dressPrice').val(json.dressPrice);
$('#dressDay').val(json.dressDay);
$('#dressLimitStatus').val(json.dressLimitStatus);
// 打开编辑弹窗
$("#roomTagModal").modal('show');
$("#modalLabel").text("编辑");
} else {
$("#tipMsg").text("获取信息出错");
$("#tipModal").modal('show');
}
}
});
});
$("#table").on("click", '.opt-remove', function () {
var id = $(this).attr("data-id");
if (confirm("你确认删除该记录吗? \r\n 删除后再也不能找回,请谨慎操作!")) {
const requestParam = {
id: id
}
$.ajax({
type: "get",
url: "/admin/dress/shop/delById",
data: requestParam,
dataType: "json",
contentType: 'application/json',
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("修改成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("修改失败." + json.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;
if ($("#addForm").validationEngine('validate')) {
$.ajax({
type: "post",
url: "/admin/dress/shop/saveOrUpdate",
data: {
id: id,
dressId: dressId,
dressType: dressType,
dressSeq: dressSeq,
dressPrice: dressPrice,
dressDay: dressDay,
dressLimitStatus: dressLimitStatus,
},
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#roomTagModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#roomTagModal").modal('hide');
}
$('#iconBtn').on('click', function () {
if ($('#iconFile').val() == '') {
$('#tipMsg').text('上传图片为空');
$('#tipModal').modal('show');
return;
}
$.ajaxFileUpload({
fileElementId: 'iconFile', //需要上传的文件域的ID即<input type="file">的ID。
url: '/admin/upload/img', //后台方法的路径
type: 'post', //当要提交自定义参数时这个参数要设置成post
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) { //提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$('#iconUrl').val(json.path);
$('#iconImgUrl').attr("src", json.path);
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
},
error: function (data, status, e) { //提交失败自动执行的处理函数。
console.error(e);
}
});
})
function clearModal() {
$('#iconImgUrl').attr('src', '');
$('#addForm').find('input[type=text],input[type=hidden],input[type=file]').each(function () {
$(this).val('');
})
$('#type').val(1);
}
$("#type").change(function () {
var optVal = $(this).val();
});
}
});
}
});
$("#table").on("click", '.opt-edit', function () {
var id = $(this).attr("data-id");
clearModal();
$.ajax({
type: "get",
url: "/admin/dress/shop/getById",
data: { id: id },
dataType: "json",
success: function (res) {
var json = res.data;
if (json) {
$("#id").val(id);
$('#dressId').val(json.dressId);
$('#dressType').val(json.dressType);
$('#dressSeq').val(json.dressSeq);
$('#dressPrice').val(json.dressPrice);
$('#dressDay').val(json.dressDay);
$('#dressLimitStatus').val(json.dressLimitStatus);
// 打开编辑弹窗
$("#roomTagModal").modal('show');
$("#modalLabel").text("编辑");
} else {
$("#tipMsg").text("获取信息出错");
$("#tipModal").modal('show');
}
}
});
});
$("#table").on("click", '.opt-remove', function () {
var id = $(this).attr("data-id");
if (confirm("你确认删除该记录吗? \r\n 删除后再也不能找回,请谨慎操作!")) {
const requestParam = {
id: id
}
$.ajax({
type: "get",
url: "/admin/dress/shop/delById",
data: requestParam,
dataType: "json",
contentType: 'application/json',
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("修改成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("修改失败." + json.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;
}
},
$('#iconBtn').on('click', function () {
if ($('#iconFile').val() == '') {
$('#tipMsg').text('上传图片为空');
$('#tipModal').modal('show');
return;
}
$.ajaxFileUpload({
fileElementId: 'iconFile', //需要上传的文件域的ID即<input type="file">的ID。
url: '/admin/upload/img', //后台方法的路径
type: 'post', //当要提交自定义参数时这个参数要设置成post
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) { //提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$('#iconUrl').val(json.path);
$('#iconImgUrl').attr("src", json.path);
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
},
error: function (data, status, e) { //提交失败自动执行的处理函数。
console.error(e);
}
});
})
function clearModal () {
$('#iconImgUrl').attr('src', '');
$('#addForm').find('input[type=text],input[type=hidden],input[type=file]').each(function () {
$(this).val('');
})
$('#type').val(1);
}
$("#type").change(function () {
var optVal = $(this).val();
});
});
}
},
};
</script>

View File

@@ -79,12 +79,12 @@ export default {
}
}
},
{ field: 'goldIncreaseNum', title: '金币增加', align: 'center', width: '5%' },
{ field: 'goldDecreaseNum', title: '金币减少', align: 'center', width: '5%' },
{ field: 'goldNum', title: '金币余额', align: 'center', width: '5%' },
{ field: 'diamondIncreaseNum', title: '钻石增加', align: 'center', width: '5%' },
{ field: 'diamondDecreaseNum', title: '钻石减少', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '钻石余额', align: 'center', width: '5%' },
{ field: 'goldIncreaseNum', title: '钻石增加', align: 'center', width: '5%' },
{ field: 'goldDecreaseNum', title: '钻石减少', align: 'center', width: '5%' },
{ field: 'goldNum', title: '钻石余额', align: 'center', width: '5%' },
{ field: 'diamondIncreaseNum', title: '金币增加', align: 'center', width: '5%' },
{ field: 'diamondDecreaseNum', title: '金币减少', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '金币余额', align: 'center', width: '5%' },
{ field: 'totalNum', title: '总额', align: 'center', width: '5%' },
],
cache: false,

View File

@@ -36,7 +36,7 @@
<span id="countNum"></span>
</p>
<p>
<span>用户投入钻石总数</span>
<span>用户投入金币总数</span>
<span id="userInputDiamonds"></span>
</p>
<p>
@@ -193,7 +193,7 @@ export default {
{ field: 'date', title: '日期', align: 'center', valign: 'middle', width: '20%' },
{ field: 'peopleNum', title: '抽奖人数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userInputDiamonds', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userInputDiamonds', title: '用户投入金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'giftOutputDiamonds', title: '平台产出价值数', align: 'center', valign: 'middle', width: '10%' }
],
cache: false,

View File

@@ -100,7 +100,7 @@ export default {
}
},
{ field: 'level', title: '礼物等级', align: 'center', valign: 'middle', width: '10%' },
{ field: 'diamonds', title: '钻石单价', align: 'center', valign: 'middle', width: '10%' },
{ field: 'diamonds', title: '金币单价', align: 'center', valign: 'middle', width: '10%' },
{
field: 'poolType', title: '礼物组类型', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
switch (row.poolType) {

View File

@@ -34,6 +34,16 @@
<div class="modal-body">
<form class="form-horizontal" id="addForm">
<input type="hidden" name="id" id="id" />
<div class="form-group">
<label for="partitionId" class="col-sm-3 control-label">选择地区</label>
<div class="col-sm-9">
<select name="partitionId" id="partitionId" class="col-sm-3 form-control">
<option value="1">英语区</option>
<option value="2">阿拉伯语区</option>
<option value="4">华语区</option>
</select>
</div>
</div>
<!--A策略-->
<div class="form-group">
<label for="resourceA" class="col-sm-3 control-label">A策略<font color="red">*</font></label>
@@ -169,6 +179,25 @@ export default {
$('#table').bootstrapTable({
columns: [
{ field: 'id', title: '序号', align: 'center', width: '5%' },
{
field: 'partitionId',
title: '地区',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
let value = '';
if ((val & 1) != 0) {
value += '英语区<br>';
}
if ((val & 2) != 0) {
value += '阿拉伯语区<br>';
}
if ((val & 4) != 0) {
value += '华语区<br>';
}
return value;
}
},
{
field: 'resourceA',
title: 'A',
@@ -216,10 +245,10 @@ export default {
width: '10%',
formatter: function (val, row, index) {
if (row.isDefault) return '';
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' +
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>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val +
'><i class="glyphicon glyphicon-remove"></i>删除</button>';
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id="' + val +
'" data-index="' + index + '"><i class="glyphicon glyphicon-remove"></i>删除</button>';
}
}
],
@@ -295,6 +324,7 @@ export default {
var beginTime = $("#beginTime").val();
var endTime = $("#endTime").val();
var partitionId = $('#partitionId').val();
if (iconA == null || iconA == '') {
$("#tipMsg").text("保存失败,请先上传图片!");
@@ -321,7 +351,8 @@ export default {
contentA: contentA,
contentB: contentB,
beginTime: beginTime,
endTime: endTime
endTime: endTime,
partitionId: partitionId,
},
dataType: "json",
success: function (json) {
@@ -343,13 +374,18 @@ export default {
});
$("#table").on("click", '.opt-edit', function () {
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')];
let partitionId = currentData.partitionId;
var seq = $(this).attr("data-id");
clearModal();
$.ajax({
type: "get",
url: "/admin/home/resource/getResourceByStrategySeq",
data: { seq: seq },
data: {
seq: seq,
partitionId: partitionId,
},
dataType: "json",
success: function (res) {
var json = res.data;
@@ -383,6 +419,8 @@ export default {
$('#iconUrlB').val(json.iconB);
$('#iconImgUrlB').attr('src', json.iconB);
$('#partitionId').val(json.partitionId);
// 打开编辑弹窗
$("#roomTagModal").modal('show');
$("#modalLabel").text("编辑房间标签");
@@ -395,6 +433,8 @@ export default {
});
$("#table").on("click", '.opt-remove', function () {
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')];
let partitionId = currentData.partitionId;
var seq = $(this).attr("data-id");
if (seq == 'undefined') {
$("#tipMsg").text("id参数有误");
@@ -405,7 +445,10 @@ export default {
$.ajax({
type: 'post',
url: "/admin/home/resource/deleteByStrategySeq",
data: { seq: seq },
data: {
seq: seq,
partitionId: partitionId,
},
dataType: "json",
success: function (json) {
if (json.code == 200) {

View File

@@ -358,7 +358,7 @@ export default {
{ field: 'chargeRate', title: '付费转化', align: 'center', width: '5%', },
{ field: 'chargeCount', title: '充值次数', align: 'center', width: '5%', },
{ field: 'chargeMoney', title: '充值金额(美元)', align: 'center', width: '5%', },
{ field: 'sendGiftMony', title: '送礼钻石数', align: 'center', width: '5%', },
{ field: 'sendGiftMony', title: '送礼金币数', align: 'center', width: '5%', },
{ field: 'giveCount', title: '累计收到转赠次数', align: 'center', width: '5%', },
{ field: 'giveMoney', title: '累计收到转赠金额', align: 'center', width: '5%', },
{ field: 'arpu', title: 'Arpu', align: 'center', width: '5%', },
@@ -507,7 +507,7 @@ export default {
{ field: 'tchargeRate', title: '付费转化', align: 'center', width: '5%', },
{ field: 'tchargeCount', title: '充值次数', align: 'center', width: '5%', },
{ field: 'tchargeMoney', title: '充值金额(美元)', align: 'center', width: '5%', },
{ field: 'tsendGiftMony', title: '送礼钻石数', align: 'center', width: '5%', },
{ field: 'tsendGiftMony', title: '送礼金币数', align: 'center', width: '5%', },
{ field: 'tgiveCount', title: '累计收到转赠次数', align: 'center', width: '5%', },
{ field: 'tgiveMoney', title: '累计收到转赠金额', align: 'center', width: '5%', },
{ field: 'tarpu', title: 'Arpu', align: 'center', width: '5%', },
@@ -666,7 +666,7 @@ export default {
{ field: 'chargeRate', title: '付费转化', align: 'center', width: '5%', },
{ field: 'chargeCount', title: '充值次数', align: 'center', width: '5%', },
{ field: 'chargeMoney', title: '充值金额(美元)', align: 'center', width: '5%', },
{ field: 'sendGiftMony', title: '送礼钻石数', align: 'center', width: '5%', },
{ field: 'sendGiftMony', title: '送礼金币数', align: 'center', width: '5%', },
{ field: 'arpu', title: 'Arpu', align: 'center', width: '5%', },
{
field: 'memberId',
@@ -726,9 +726,9 @@ export default {
{ field: 'signUpTime', title: '新增日期', align: 'center', width: '5%' },
{ field: 'chargeCount', title: '充值次数', align: 'center', width: '5%' },
{ field: 'chargeMoney', title: '充值金额(美元)', align: 'center', width: '5%' },
{ field: 'totalSendGiftMoney', title: '送礼钻石数', align: 'center', width: '5%' },
{ field: 'totalBackbagSendGiftMoney', title: '送礼背包钻石数', align: 'center', width: '5%' },
{ field: 'totalNoBackbagSendGiftMoney', title: '送礼非背包钻石数', align: 'center', width: '5%' },
{ field: 'totalSendGiftMoney', title: '送礼金币数', align: 'center', width: '5%' },
{ field: 'totalBackbagSendGiftMoney', title: '送礼背包金币数', align: 'center', width: '5%' },
{ field: 'totalNoBackbagSendGiftMoney', title: '送礼非背包金币数', align: 'center', width: '5%' },
],
undefinedText: 0,
cache: false,

View File

@@ -0,0 +1,475 @@
<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-input
v-model="inquire.gameName"
placeholder="请输入..."
class="input"
></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()">
查询</el-button
>
<!-- 添加 -->
<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="gameName" align="center" label="游戏名称" />
<!-- <el-table-column prop="x" align="center" label="分区" /> -->
<el-table-column align="center" prop="giftInfo" label="游戏icon">
<template v-slot="scope">
<el-image
v-if="scope.row.logo"
style="width: 100px; height: 100px"
:src="scope.row.logo"
:zoom-rate="1.1"
:preview-src-list="scope.row.logo"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
<div v-else>/</div>
</template>
</el-table-column>
<el-table-column align="center" prop="giftInfo" label="游戏背景">
<template v-slot="scope">
<el-image
v-if="scope.row.background"
style="width: 100px; height: 100px"
:src="scope.row.background"
:zoom-rate="1.1"
:preview-src-list="scope.row.background"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
<div v-else>/</div>
</template>
</el-table-column>
<el-table-column align="center" prop="giftInfo" label="下单弹窗背景">
<template v-slot="scope">
<el-image
v-if="scope.row.pic"
style="width: 100px; height: 100px"
:src="scope.row.pic"
:zoom-rate="1.1"
:preview-src-list="scope.row.pic"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
<div v-else>/</div>
</template>
</el-table-column>
<!-- <el-table-column prop="x" align="center" label="创建日期" />
<el-table-column prop="x" align="center" label="添加人" /> -->
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button
@click="eir(scope.row)"
class="primary"
type="primary"
size="default"
>编辑
</el-button>
<el-button
@click="
delObj = scope.row;
delDialog = true;
"
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="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="sureClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 添加和编辑弹窗 -->
<el-dialog
v-model="operationDialog"
:title="operationTitle"
width="30%"
center
>
<!-- 地区 -->
<!-- <div class="selectBox">
<span class="left" style="margin-right: 20px">地区</span>
<el-checkbox-group v-model="operation.checkList">
<el-checkbox label="1">英语</el-checkbox>
<el-checkbox label="2">阿语</el-checkbox>
<el-checkbox label="4">华语</el-checkbox>
</el-checkbox-group>
</div> -->
<!-- 游戏昵称 -->
<div class="selectBox">
<span class="left" style="margin-right: 20px">游戏昵称</span>
<el-input
v-model="operation.gameName"
size="default"
placeholder="请输入游戏昵称..."
class="right"
style="width: 70%"
></el-input>
</div>
<!-- 游戏icon -->
<div class="selectBox selectBoxImg">
<span class="left" style="margin-right: 20px">游戏icon</span>
<!-- action="/admin/tencent/cos/upload/file" -->
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="operation.imageUrl1"
:src="operation.imageUrl1"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<!-- 游戏背景 -->
<div class="selectBox selectBoxImg">
<span class="left" style="margin-right: 20px">游戏背景</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess2"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="operation.imageUrl2"
:src="operation.imageUrl2"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<!-- 下单弹窗icon -->
<div class="selectBox selectBoxImg">
<span class="left" style="margin-right: 20px">下单弹窗icon</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess3"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="operation.imageUrl3"
:src="operation.imageUrl3"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<!-- 操作 -->
<template #footer>
<span class="dialog-footer">
<el-button @click="operationDialog = false">取消</el-button>
<el-button type="primary" @click="operationClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import { page, save, delGame } from "@/api/gameInfo/gameInfo";
import { Plus } from "@element-plus/icons-vue";
import { uploadQiNiuFile } from "@/api/common/upload";
import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
export default {
name: "GameInfo",
components: {
Plus,
},
data() {
return {
inquire: {
time: "",
gameName: "",
},
loading: false,
// 表格数据
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 二次确认
delDialog: false,
//操作和编辑
operationDialog: false,
operationType: 1, //1添加2编辑
operationTitle: "编辑&添加",
operatioObj: {},
operation: {
gameName: "",
imageUrl1: "",
imageUrl2: "",
imageUrl3: "",
},
delObj: {},
};
},
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");
}
page({
gameName: this.inquire.gameName,
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;
});
},
add() {
this.operationDialog = true;
this.operationType = 1;
this.operationTitle = "添加";
this.operation = {
gameName: "",
imageUrl1: "",
imageUrl2: "",
imageUrl3: "",
};
},
eir(val) {
this.operatioObj = val;
this.operationDialog = true;
this.operationType = 2;
this.operationTitle = "编辑";
this.operation = {
gameName: this.operatioObj.gameName,
imageUrl1: this.operatioObj.logo,
imageUrl2: this.operatioObj.background,
imageUrl3: this.operatioObj.pic,
};
},
operationClick() {
save({
gameId: this.operationType == 1 ? null : this.operatioObj.gameId,
gameName: this.operation.gameName,
logo: this.operation.imageUrl1,
background: this.operation.imageUrl2,
pic: this.operation.imageUrl3,
}).then((res) => {
if (res.code === 200) {
this.operationDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
sureClick() {
delGame({ gameId: this.delObj.gameId }).then((res) => {
if (res.code === 200) {
this.delDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
JsonFunc(val) {
var res = JSON.parse(val);
return res;
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess(res, file) {
console.log(file);
// this.operation.imageUrl1 = URL.createObjectURL();
this.operation.imageUrl1 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess2(res, file) {
// this.operation.imageUrl2 = URL.createObjectURL(file.raw);
this.operation.imageUrl2 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess3(res, file) {
// this.operation.imageUrl3 = URL.createObjectURL(file.raw);
this.operation.imageUrl3 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
// 分页导航
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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</style>
<style scoped>
.avatar-uploader .avatar {
width: 178px;
height: 178px;
display: block;
}
</style>
<style>
.avatar-uploader .el-upload {
border: 1px dashed var(--el-border-color);
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
transition: var(--el-transition-duration-fast);
width: 150px;
height: 150px;
}
.avatar-uploader .el-upload .el-upload__input {
display: none;
}
.avatar-uploader .el-upload:hover {
border-color: var(--el-color-primary);
}
</style>

View File

@@ -0,0 +1,230 @@
<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>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form id="searchForm1" action="/admin/gamePartner/order/dayExport" method="get" target="_blank">
<div class="col-sm-12">
<label for="startTime" class="col-sm-2 control-label">日期:</label>
<div class="col-sm-4"><input type="text" class="form-control" name="startTime" id="startTime">
</div>
<label for="endTime" class="col-sm-1 control-label">-</label>
<div class="col-sm-4"><input type="text" class="form-control" name="endTime" id="endTime"></div>
</div>
</form>
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExport" class="btn btn-default">
<i class="glyphicon glyphicon-export"></i>导出
</button>
</div>
</div>
</div>
</section>
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content" style="width: 190%; left: 50%; transform: translateX(-50%);">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">订单详情</h4>
</div>
<form id="searchForm2" action="/admin/gamePartner/order/dayDetailExport" method="get" target="_blank">
<input type="hidden" name="orderDate" id="orderDate" />
<div class="modal-body">
<!-- .content -->
<div id="detailTable"></div>
</div>
</form>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" id="detailExport">导出</button>
</div>
</div>
</div>
</div>
<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>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "GamePartnerOrderDetailView",
setup() { },
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
$(function () {
$('#table').bootstrapTable('destroy');
// 清空分页组件的容器
$('.fixed-table-pagination').empty();
$('#table').bootstrapTable({
columns: [
{ field: 'orderTime', title: '日期', align: 'center', width: '5%' },
{ field: 'orderNum', title: '下单用户数', align: 'center', width: '5%' },
{ field: 'totalInning', title: '累积下单局数', align: 'center', width: '5%' },
{ field: 'orderCount', title: '累积下单次数', align: 'center', width: '5%' },
{ field: 'totalAmount', title: '累积下单金额(钻)', align: 'center', width: '5%' },
{
field: 'handle',
title: '详情',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
return '<button class="btn btn-sm btn-default opt-detail" data-index="' + index + '">详情</button>';
}
}
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/gamePartner/order/dayPage',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datepicker('getDate');
picker2.datepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datepicker('getDate');
picker1.datepicker('setEndDate', date);
});
$('#table').on('click', '.opt-detail', function () {
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')];
var orderTime = currentData.orderTime;
$('#orderDate').val(orderTime);
$("#detailModal").modal('show');
$('#detailTable').bootstrapTable('destroy');
// 清空分页组件的容器
$('.fixed-table-pagination').empty();
$('#detailTable').bootstrapTable({
columns: [
{ field: 'fromErBanNo', title: '下单用户id', align: 'center', width: '5%' },
{ field: 'fromNick', title: '下单用户昵称', align: 'center', width: '5%' },
{ field: 'toErBanNo', title: '接单用户id', align: 'center', width: '5%' },
{ field: 'toNick', title: '接单用户昵称', align: 'center', width: '5%' },
{ field: 'hallErBanNo', title: '房主id', align: 'center', width: '5%' },
{ field: 'hallRoomName', title: '房间名称', align: 'center', width: '5%' },
{ field: 'gameName', title: '下单游戏', align: 'center', width: '5%' },
{ field: 'amount', title: '下单金额(钻)', align: 'center', width: '5%' },
{ field: 'orderTime', title: '下单时间', align: 'center', width: '5%' },
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100],
search: false,
//表示服务端请求
sidePagination: "server",
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
//设置查询参数
queryParams: function queryParams(params) {
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
orderDate: orderTime
};
return param;
},
url: '/admin/gamePartner/order/dayDetailPage',
//加载成功时执行
onLoadSuccess: function () {
console.log("load success");
},
//加载失败时执行
onLoadError: function () {
console.log("load fail");
}
});
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
//导出功能
$("#btnExport").on('click', function () {
$("#searchForm1").submit();
});
//导出功能
$("#detailExport").on('click', function () {
$("#searchForm2").submit();
});
});
}
}
};
</script>
<style scoped>
.fixed-table-pagination .page-list {
display: block !important;
}
.fixed-table-pagination div.pagination,
.fixed-table-pagination .pagination-detail {
display: block !important;
margin-top: 10px;
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,175 @@
<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>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form id="searchForm" action="/admin/gamePartner/order/orderExport" method="get" target="_blank">
<div class="col-sm-12">
<label for="fromErBanNo" class="col-sm-2 control-label">下单用户id:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="fromErBanNo"
id="fromErBanNo"></div>
<label for="gameId" class="col-sm-2 control-label">下单游戏:</label>
<div class="col-sm-2">
<select name="gameId" id="gameId" data-btn-class="btn-warning" class="form-control">
<option value="" selected="selected">全部</option>
</select>
</div>
<label for="orderNo" class="col-sm-2 control-label">订单号:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="orderNo" id="orderNo"></div>
</div>
<div class="col-sm-12">
<label for="startTime" class="col-sm-2 control-label">下单时间:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="startTime" id="startTime">
</div>
<label for="endTime" class="col-sm-2 control-label">-</label>
<div class="col-sm-2"><input type="text" class="form-control" name="endTime" id="endTime"></div>
<label for="toErBanNo" class="col-sm-2 control-label">接单用户id:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="toErBanNo" id="toErBanNo">
</div>
</div>
</form>
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExport" class="btn btn-default">
<i class="glyphicon glyphicon-export"></i>导出
</button>
</div>
</div>
</div>
</section>
<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>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "GamePartnerOrderView",
setup() { },
created() {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
$(function () {
getGamePartnerInfo();
$('#table').bootstrapTable('destroy');
// 清空分页组件的容器
$('.fixed-table-pagination').empty();
$('#table').bootstrapTable({
columns: [
{ field: 'orderNo', title: '订单号', align: 'center', width: '5%' },
{ field: 'fromErBanNo', title: '下单用户id', align: 'center', width: '5%' },
{ field: 'fromNick', title: '下单用户昵称', align: 'center', width: '5%' },
{ field: 'toErBanNo', title: '接单用户id', align: 'center', width: '5%' },
{ field: 'toNick', title: '接单用户昵称', align: 'center', width: '5%' },
{ field: 'income', title: '接单用户收益(水晶)', align: 'center', width: '5%' },
{ field: 'gameName', title: '下单游戏', align: 'center', width: '5%' },
{ field: 'inning', title: '下单局数', align: 'center', width: '5%' },
{ field: 'amount', title: '下单金额', align: 'center', width: '5%' },
{ field: 'orderTime', title: '下单时间', align: 'center', width: '5%' },
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
fromErBanNo: $('#fromErBanNo').val(),
toErBanNo: $('#toErBanNo').val(),
gameId: $('#gameId').val(),
orderNo: $('#orderNo').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/gamePartner/order/orderPage',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
todayBtn: true,
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datepicker('getDate');
picker2.datepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datepicker('getDate');
picker1.datepicker('setEndDate', date);
});
//导出功能
$("#btnExport").on('click', function () {
$("#searchForm").submit();
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
//游戏
function getGamePartnerInfo() {
var array;
$.ajax({
type: "get",
url: "/admin/gamePartner/info/listAll",
dataType: "json",
async: false,
success: function (json) {
if (json.success == 'true' || json.code == 200) {
array = json.data;
}
}
});
var $select = $('#gameId');
for (let i = 0; i < array.length; i++) {
var $option = $('<option value="' + array[i].gameId + '" />');
$option.html(array[i].gameName);
$select.append($option);
}
return array;
}
});
}
}
};
</script>

View File

@@ -0,0 +1,501 @@
<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-1 control-label">用户ID:</label>
<div class="col-sm-2">
<input type="number"
class="form-control"
name="erbanNo"
id="erbanNo">
</div>
<label for="gameId"
class="col-sm-1 control-label">游戏类型:</label>
<div class="col-sm-2">
<select name="gameId"
id="gameId"
class="form-control"></select>
</div>
</div>
<div class="col-sm-12">
<label for="startTime"
class="col-sm-1 control-label">添加日期:</label>
<div class="col-sm-2">
<input type="text"
class="input-sm form-control"
name="startTime"
id="startTime">
</div>
<label for="endTime"
class="col-sm-1 control-label">:</label>
<div class="col-sm-2">
<input type="text"
class="input-sm form-control"
name="endTime"
id="endTime">
</div>
</div>
<div class="col-sm-12">
<button id="btnSearch"
class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnAdd"
class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
<button id="btnBatchInvaild"
class="btn btn-danger">
<i class="glyphicon glyphicon-remove"></i>批量失效
</button>
</div>
</div>
</div>
<!-- .content -->
<div id="table"></div>
</div>
</section>
<div class="modal fade"
id="userModal"
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">&times;</span></button>
<h4 class="modal-title"
id="modalLabel">添加陪玩</h4>
</div>
<div class="modal-body">
<form class="form-horizontal"
id="modalForm">
<input type="hidden"
name="uid"
id="uid" />
<div class="form-group">
<label for="modalErbanNo"
class="col-sm-3 control-label">用户ID:</label>
<div class="col-sm-9">
<input type="number"
class="form-control validate[required]"
name="modalErbanNo"
id="modalErbanNo"
onchange="inputErbanNo(this)">
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<input type="button"
class="form-control"
value="添加游戏"
id="modalAddBtn"
onclick="addGameInfo()" />
</div>
</div>
<div id="modalGames"></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="submit">确定</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
let modalData = {};
var gameInfoList = [];
var gameInfoMap = {};
export default {
name: "UserGamePartnerInfoAdminView",
setup () {
function selectGameId (select, index) {
const gameId = select.options[select.selectedIndex].value;
const gameInfo = gameInfoMap[gameId];
modalData.games[index] = { gameId: gameInfo.gameId, tags: Object.assign([], gameInfo.tags) }
freshUserModal()
}
function inputErbanNo (input) {
modalData.erbanNo = input.value;
}
function inputPrice (input, index) {
modalData.games[index].price = input.value;
}
function inputProficiency (input, index) {
modalData.games[index].proficiency = input.value;
}
function inputTag (input, index, tagIndex) {
modalData.games[index].tags[tagIndex].tagVal = input.value;
}
function addGameInfo () {
if (!modalData.games) {
modalData.games = [];
}
const hasAddGameId = modalData.games.map(game => game.gameId);
const gameInfo = gameInfoList.filter(gameInfo => !hasAddGameId.includes(gameInfo.gameId))[0];
modalData.games.push({ gameId: gameInfo.gameId, tags: Object.assign([], gameInfo.tags) })
freshUserModal()
}
window.selectGameId = selectGameId;
window.inputErbanNo = inputErbanNo;
window.inputPrice = inputPrice;
window.inputProficiency = inputProficiency;
window.inputTag = inputTag;
window.addGameInfo = addGameInfo;
return {
selectGameId,
inputErbanNo,
inputPrice,
inputProficiency,
inputTag,
addGameInfo,
};
},
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData () {
$(function () {
cacheGameInfo();
$('#table').bootstrapTable('destroy');
// 清空分页组件的容器
$('.fixed-table-pagination').empty();
$('#table').bootstrapTable({
columns: [
{ field: 'checkBox', title: 'id', align: 'center', checkbox: true, width: '5%' },
{ field: 'erbanNo', title: '用户ID', align: 'center', width: '5%' },
{ field: 'nick', title: '昵称', align: 'center', width: '10%' },
{ field: 'games', title: '支持游戏', align: 'center', width: '60%', formatter: gameFormatter },
{ field: 'updateTime', title: '更新时间', align: 'center', width: '10%' },
{ field: 'adminName', title: '操作人', align: 'center', width: '10%' },
{ field: 'status', title: '状态', align: 'center', width: '5%', formatter: function (val) { return val ? '有效' : '无效'; } },
{
field: 'operate',
title: '操作',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm opt-edit" data-id=' + row.uid + '>' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>&nbsp;&nbsp;' +
(row.status ?
'<button class="btn btn-sm btn-danger opt-invaild" data-id=' + row.uid +
'><i class="glyphicon glyphicon-remove"></i>失效</button>'
:
'<button class="btn btn-sm btn-success opt-vaild" data-id=' + row.uid +
'><i class="glyphicon glyphicon-save"></i>生效</button>'
)
}
}
],
uniqueId: 'uid',
undefinedText: 0,
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageNum: params.pageNumber,
pageSize: params.pageSize,
erbanNo: $('#erbanNo').val(),
gameId: $('#gameId').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
};
return param;
},
toolbar: '#toolbar',
url: '/admin/gamePartner/user/page',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
var chargeStart = $('#startTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
var chargeEnd = $('#endTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
$("#btnBatchInvaild").click(function () {
const row = $('#table').bootstrapTable('getSelections');
if (!row || row.length < 1) {
$("#tipMsg").text("未勾选任何用户");
$("#tipModal").modal('show');
return;
}
if (confirm("确认批量失效吗? ")) {
const uidStr = row.map(row => row.uid).join(",");
console.info(uidStr)
$.ajax({
type: 'post',
url: "/admin/gamePartner/user/changeStatus",
data: { uidStr: uidStr, status: 0 },
success: function (json) {
if (json.code === 200) {
$("#tipMsg").text("操作成功");
$("#tipModal").modal('show');
} else {
$("#tipMsg").text("操作失败." + json.message);
$("#tipModal").modal('show');
}
TableHelper.doRefresh("#table");
$("#userModal").modal('hide');
}
});
}
});
//新建标签
$("#btnAdd").click(function () {
openUserModal()
});
$("#submit").click(function () {
if ($("#modalForm").validationEngine('validate')) {
$.ajax({
type: "post",
url: "/admin/gamePartner/user/save",
data: JSON.stringify(modalData),
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (json) {
if (json.code === 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#userModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');
}
}
});
}
});
$("#table").on("click", '.opt-edit', function () {
const id = $(this).attr("data-id");
if (!id) {
$("#tipMsg").text("id参数有误");
$("#tipModal").modal('show');
return;
}
const row = $('#table').bootstrapTable('getRowByUniqueId', id);
openUserModal(row);
});
$("#table").on("click", '.opt-vaild', function () {
const id = $(this).attr("data-id");
if (!id) {
$("#tipMsg").text("id参数有误");
$("#tipModal").modal('show');
return;
}
if (confirm("确认该用户生效吗? ")) {
$.ajax({
type: 'post',
url: "/admin/gamePartner/user/changeStatus",
data: { uidStr: id, status: 1 },
success: function (json) {
if (json.code === 200) {
$("#tipMsg").text("操作成功");
$("#tipModal").modal('show');
} else {
$("#tipMsg").text("操作失败." + json.message);
$("#tipModal").modal('show');
}
TableHelper.doRefresh("#table");
$("#userModal").modal('hide');
}
});
}
});
$("#table").on("click", '.opt-invaild', function () {
const id = $(this).attr("data-id");
if (!id) {
$("#tipMsg").text("id参数有误");
$("#tipModal").modal('show');
return;
}
if (confirm("确认该用户失效吗? ")) {
$.ajax({
type: 'post',
url: "/admin/gamePartner/user/changeStatus",
data: { uidStr: id, status: 0 },
success: function (json) {
if (json.code === 200) {
$("#tipMsg").text("操作成功");
$("#tipModal").modal('show');
} else {
$("#tipMsg").text("操作失败." + json.message);
$("#tipModal").modal('show');
}
TableHelper.doRefresh("#table");
$("#userModal").modal('hide');
}
});
}
});
});
function openUserModal (data) {
clearUserModal();
if (data) {
setUserModal(data);
}
$("#userModal").modal('show');
}
function clearUserModal () {
modalData = {};
$("#modalErbanNo").val("");
$("#modalGames").empty();
}
function setUserModal (data) {
modalData = {
uid: data.uid, erbanNo: data.erbanNo,
games: Object.assign([], data.games.map(game => { return { gameId: game.gameId, price: game.price, proficiency: game.proficiency, tags: Object.assign([], game.tags) } }))
};
freshUserModal();
}
function cacheGameInfo () {
$.ajax({
type: 'get',
url: '/admin/gamePartner/info/listAll',
dataType: 'json',
success: function (res) {
if (res.code === 200) {
const data = res.data;
gameInfoList = data
gameInfoList.forEach(gameInfo => gameInfoMap[gameInfo.gameId] = gameInfo);
makeOption(data);
}
}
})
}
function makeOption (data) {
var str = '<option value=""></option>';
for (var i = 0; i < data.length; i++) {
str += '<option value="' + data[i].gameId + '">' + data[i].gameName + '</option>';
}
$('#gameId').html(str);
}
function gameFormatter (val) {
var str = ''
if (!val || val.size < 1) {
return str;
}
str += '<table>'
val.forEach((game, gameIndex) => {
if (gameIndex % 2 === 0) {
str += '<tr>'
}
str += '<td width="50%"><table style="border-collapse:separate; border-spacing:5px 5px;">'
str += ('<tr><td width="24%"><b>' + game.gameName + '</b></td><td width="24%">价格: ' + game.price + '</td><td width="24%">熟练度: ' + game.proficiency + '</td><td width="24%">接单次数: ' + game.finishNum + '</td></tr>');
game.tags.forEach((tag, index) => {
if (index / 3 === 0) {
str += '<tr>'
}
str += ('<td width="33%" style="word-break: break-all;word-wrap: break-word;">' + tag.tagName + ': ' + tag.tagVal + '</td>');
if ((index / 3 > 0 && index % 2 === 0) || index === (game.tags.size - 1)) {
str += '</tr>'
}
})
str += '</table></td>'
if ((gameIndex / 2 > 0 && (gameIndex + 1) % 2 === 0) || gameIndex === (val.size - 1)) {
str += '</tr>'
}
})
str += '</table>'
return str;
}
}
}
};
function freshUserModal () {
$("#modalUid").val(modalData.uid ?? "");
$("#modalErbanNo").val(modalData.erbanNo ?? "");
const hasAddGameId = modalData.games ? modalData.games.map(game => game.gameId) : [];
const canAdd = gameInfoList.filter(gameInfo => !hasAddGameId.includes(gameInfo.gameId)).length !== 0;
if (canAdd) {
$("#modalAddBtn").show();
} else {
$("#modalAddBtn").hide();
}
const gameStr = modalData.games.map((game, index) =>
'<div class="form-group">' +
'<label for="modalGameId" class="col-sm-3 control-label">游戏:</label>' +
'<div class="col-sm-9">' +
'<select name="type" name="modalGameId" class="form-control validate[required]" onchange="selectGameId(this,' + index + ')">' +
gameInfoList.map(gameInfo =>
'<option value="' + gameInfo.gameId + '" ' + (game.gameId === gameInfo.gameId ? 'selected' : '') + '>' + gameInfo.gameName + '</option>')
.join("") +
'</select>' +
'</div>' +
'</div>' +
'<div class="form-group">' +
'<label for="modalPrice" class="col-sm-3 control-label">单价:</label>' +
'<div class="col-sm-9">' +
'<input type="number" class="form-control validate[required]" name="modalPrice" onchange="inputPrice(this, ' + index + ')" value="' + (game.price ?? 0) + '">' +
'</div>' +
'</div>' +
'<div class="form-group">' +
'<label for="modalProficiency" class="col-sm-3 control-label">熟练度:</label>' +
'<div class="col-sm-9">' +
'<input type="text" class="form-control validate[required]" name="modalProficiency" onchange="inputProficiency(this, ' + index + ')" value="' + (game.proficiency ?? '') + '">' +
'</div>' +
'</div>' +
game.tags.map((tag, tagIndex) =>
'<div class="form-group">' +
'<label for="modalTag" class="col-sm-3 control-label">' + tag.tagName + ':</label>' +
'<div class="col-sm-9">' +
'<input type="text" class="form-control validate[required]" name="modalTag" onchange="inputTag(this, ' + index + ',' + tagIndex + ')" value="' + (tag.tagVal ?? '') + '">' +
'</div>' +
'</div>'
).join("")
).join("<hr>");
$("#modalGames").html(gameStr);
}
</script>

View File

@@ -128,14 +128,14 @@ export default {
{ field: 'clanElderErbanNo', title: '会长平台号', align: 'center', width: '5%' },
{ field: 'clanElderNick', title: '会长昵称', align: 'center', width: '5%' },
{ field: 'hallCount', title: '房间数', align: 'center', width: '10%' },
{ field: 'giftDiamonds', title: '公会收礼钻石数', align: 'center', width: '10%' },
{ field: 'hallDiamonds', title: '签约房钻石数', align: 'center', width: '10%' },
{ field: 'clanDiamonds', title: '非签约房钻石数', align: 'center', width: '10%' },
{ field: 'otherDiamonds', title: '其他钻石数', align: 'center', width: '10%' },
{ field: 'earnGolds', title: '公会收益金币数', align: 'center', width: '10%' },
{ field: 'receiveGolds', title: '成员收益金币数', align: 'center', width: '10%' },
{ field: 'exchangeGolds', title: '兑换金币数', align: 'center', width: '10%' },
{ field: 'remainGolds', title: '可结算金币数', align: 'center', width: '10%' },
{ field: 'giftDiamonds', title: '公会收礼金币数', align: 'center', width: '10%' },
{ field: 'hallDiamonds', title: '签约房金币数', align: 'center', width: '10%' },
{ field: 'clanDiamonds', title: '非签约房金币数', align: 'center', width: '10%' },
{ field: 'otherDiamonds', title: '其他金币数', align: 'center', width: '10%' },
{ field: 'earnGolds', title: '公会收益钻石数', align: 'center', width: '10%' },
{ field: 'receiveGolds', title: '成员收益钻石数', align: 'center', width: '10%' },
{ field: 'exchangeGolds', title: '兑换钻石数', align: 'center', width: '10%' },
{ field: 'remainGolds', title: '可结算钻石数', align: 'center', width: '10%' },
{
field: 'tmp',
title: '操作',

View File

@@ -127,7 +127,7 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用金币购买</label>
<label class="col-sm-3 control-label">使用钻石购买</label>
<div class="col-sm-9">
<label class="radio-inline"><input type="radio" name="goldSale" value="0"></label>
<label class="radio-inline"><input type="radio" name="goldSale" value="1" checked></label>
@@ -138,7 +138,7 @@
<div class="col-sm-6">
<input type="text" class="form-control" name="price" id="price">
</div>
<span class="col-sm-3">金币</span>
<span class="col-sm-3">钻石</span>
</div>
<div class="form-group">
@@ -146,7 +146,7 @@
<div class="col-sm-6">
<input type="text" class="form-control" name="renewPrice" id="renewPrice">
</div>
<span class="col-sm-3">金币</span>
<span class="col-sm-3">钻石</span>
</div>
<div class="form-group">
<label for="originalPrice" class="col-sm-3 control-label">原价:</label>
@@ -154,7 +154,7 @@
<input type="number" class="form-control" placeholder="没有填0" value="0" name="originalPrice"
id="originalPrice">
</div>
<span class="col-sm-3">金币</span>
<span class="col-sm-3">钻石</span>
</div>
<div class="form-group">
@@ -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">
@@ -396,7 +406,7 @@ export default {
},
{
field: 'goldSale',
title: '金币购买',
title: '钻石购买',
align: 'center',
width: '3%',
formatter: function (val, row, index) {
@@ -424,9 +434,9 @@ export default {
}
}
},
{ field: 'originalPrice', title: '原价(金币', align: 'center', width: '5%' },
{ field: 'price', title: '购买价格(金币', align: 'center', width: '5%' },
{ field: 'renewPrice', title: '续费价格(金币', align: 'center', width: '5%' },
{ field: 'originalPrice', title: '原价(钻石', align: 'center', width: '5%' },
{ field: 'price', title: '购买价格(钻石', align: 'center', width: '5%' },
{ field: 'renewPrice', title: '续费价格(钻石', align: 'center', width: '5%' },
{ field: 'radishOriginalPrice', title: '原价(萝卜)', align: 'center', width: '5%' },
{ field: 'radishPrice', title: '购买价格(萝卜)', align: 'center', width: '5%' },
{ field: 'radishRenewPrice', title: '续费价格(萝卜)', align: 'center', width: '5%' },
@@ -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();
@@ -717,7 +729,7 @@ export default {
return;
}
if (goldSale == 1 && (!price || !renewPrice || !originalPrice)) {
$("#tipMsg").text("请填写完整金币价格");
$("#tipMsg").text("请填写完整钻石价格");
$("#tipModal").modal('show');
return;
} else if (radishSale == 1 && (!radishPrice || !radishRenewPrice || !radishOriginalPrice)) {
@@ -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) {

View File

@@ -62,7 +62,7 @@ export default {
{ field: 'createTime', title: '日期', align: 'center', width: '5%' },
{ field: 'headwearId', title: '头饰ID', align: 'center', width: '5%' },
{ field: 'headwearName', title: '头饰名称', align: 'center', width: '5%' },
{ field: 'headwearPrice', title: '价格(金币)', align: 'center', width: '5%' },
{ field: 'headwearPrice', title: '价格(钻石)', align: 'center', width: '5%' },
{ field: 'headwearRadishPrice', title: '价格(萝卜)', align: 'center', width: '5%' },
{ field: 'headwearStatus', title: '头饰状态', align: 'center', width: '5%' },
{ field: 'receivedHeadwearNum', title: '用户收到数量', align: 'center', width: '5%' },

View File

@@ -1,174 +1,183 @@
<template>
<div class="outer">
<!-- 查询条件 -->
<div class="inquire" style="display: inline-block; margin-right: 20px">
<div class="inquire"
style="display: inline-block; margin-right: 20px">
<div class="block">
<span class="demonstration">日期</span>
<el-date-picker
v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
<el-date-picker v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</div>
<div class="inquire" style="display: inline-block; margin-right: 20px">
<div class="inquire"
style="display: inline-block; margin-right: 20px">
<span class="demonstration">排序方式</span>
<el-select v-model="inquire.value" placeholder="请选择">
<el-option
v-for="item in inquire.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
<el-select v-model="inquire.value"
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="inquire" style="margin-right: 20px">
<span class="demonstration" style="margin-top: 5px">用户ID </span>
<el-input v-model="inquire.userId" placeholder="" class="input"></el-input>
<div class="inquire"
style="margin-right: 20px">
<span class="demonstration"
style="margin-top: 5px">用户ID </span>
<el-input v-model="inquire.userId"
placeholder=""
class="input"></el-input>
</div>
<!-- 查询按钮 -->
<el-button style="" type="primary" @click="getData()">查询</el-button>
<el-button style=""
type="primary"
@click="getData()">查询</el-button>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="erBanNo" align="center" label="用户id" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="inviteCode" align="center" label="邀请码" />
<el-table-column prop="directNum" align="center" label="直接邀请人数" />
<el-table-column prop="indirectNum" align="center" label="间接邀请人数" />
<el-table-column
prop="directChargeAmount"
align="center"
label="直接邀请人总充值"
/>
<el-table-column
prop="indirectChargeAmount"
align="center"
label="间接邀请人总充值"
/>
<el-table-column
prop="activityRegisterProfit"
align="center"
label="活动内注册收益"
/>
<el-table-column
prop="activityReturnProfit"
align="center"
label="活动内返点收益"
/>
<el-table-column align="center" label="操作" width="300">
<el-table v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px">
<el-table-column prop="erBanNo"
align="center"
label="用户id" />
<el-table-column prop="nick"
align="center"
label="用户昵称" />
<el-table-column prop="inviteCode"
align="center"
label="邀请码" />
<el-table-column prop="directNum"
align="center"
label="直接邀请人数" />
<el-table-column prop="indirectNum"
align="center"
label="间接邀请人数" />
<el-table-column prop="directChargeAmount"
align="center"
label="直接邀请人总充值" />
<el-table-column prop="indirectChargeAmount"
align="center"
label="间接邀请人总充值" />
<el-table-column prop="activityRegisterProfit"
align="center"
label="活动内注册收益" />
<el-table-column prop="activityReturnProfit"
align="center"
label="活动内返点收益" />
<el-table-column align="center"
label="操作"
width="300">
<template v-slot="scope">
<el-button
@click="details(scope.row)"
class="primary"
type="primary"
size="default"
>查看详情</el-button
>
<el-button
@click="set(scope.row)"
:class="scope.row.isBlack == 0 ? 'primary' : 'info'"
:type="scope.row.isBlack == 0 ? 'primary' : 'info'"
size="default"
>{{ scope.row.isBlack == 0 ? "设为活动黑名单" : "取消活动黑名单" }}</el-button
>
<el-button @click="details(scope.row)"
class="primary"
type="primary"
size="default">查看详情</el-button>
<el-button @click="set(scope.row)"
:class="scope.row.isBlack == 0 ? 'primary' : 'info'"
:type="scope.row.isBlack == 0 ? 'primary' : 'info'"
size="default">{{ scope.row.isBlack == 0 ? "设为活动黑名单" : "取消活动黑名单" }}</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-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="detailsDialog" :title="detailsTitle" width="65%" center>
<el-dialog v-model="detailsDialog"
:title="detailsTitle"
width="65%"
center>
<!-- 条件 -->
<span>用户ID </span>
<el-input
style="display: inline-block; width: 200px"
v-model="detailsUserId"
placeholder=""
class="input"
></el-input>
<el-input style="display: inline-block; width: 200px"
v-model="detailsUserId"
placeholder=""
class="input"></el-input>
<!-- 查询按钮 -->
<el-button style="" type="primary" @click="getDataDetailsDialog()">查询</el-button>
<el-button style=""
type="primary"
@click="getDataDetailsDialog()">查询</el-button>
<!-- 内表格 -->
<el-table
v-loading="loading"
:data="tableDataIn"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="createTime" align="center" label="新增时间" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="erbanNo" align="center" label="用户ID" />
<el-table-column prop="inviteCode" align="center" label="填写邀请码" />
<el-table-column align="center" label="是否补填">
<el-table v-loading="loading"
:data="tableDataIn"
border
style="width: 100%; margin-top: 25px">
<el-table-column prop="createTime"
align="center"
label="新增时间" />
<el-table-column prop="nick"
align="center"
label="用户昵称" />
<el-table-column prop="erbanNo"
align="center"
label="用户ID" />
<el-table-column prop="inviteCode"
align="center"
label="填写邀请码" />
<el-table-column align="center"
label="是否补填">
<template v-slot="scope">
{{ scope.row.isRepair == 1 ? "" : "" }}
</template>
</el-table-column>
<el-table-column align="center" label="邀请者">
<el-table-column align="center"
label="邀请者">
<template v-slot="scope">
昵称{{ scope.row.inviteNick }} ID{{ scope.row.inviteErBanNo }}
</template>
</el-table-column>
<el-table-column align="center" label="邀请者的邀请者">
<el-table-column align="center"
label="邀请者的邀请者">
<template v-slot="scope">
昵称{{ scope.row.grandInviteNick }} ID{{ scope.row.grandInviteErBanNo }}
</template>
</el-table-column>
<el-table-column align="center" label="是否充值">
<el-table-column align="center"
label="是否充值">
<template v-slot="scope">
{{ scope.row.isCharge == 1 ? "" : "" }}
</template>
</el-table-column>
<el-table-column
prop="inviteCharge30Amount"
align="center"
label="邀请30天内充值"
/>
<el-table-column prop="inviteChargeAmount" align="center" label="累计充值" />
<el-table-column
prop="inviteGiveAmount"
align="center"
label="累计接收代充转增"
/>
<el-table-column prop="inviteCharge30Amount"
align="center"
label="邀请30天内充值" />
<el-table-column prop="inviteChargeAmount"
align="center"
label="累计充值" />
<el-table-column prop="inviteGiveAmount"
align="center"
label="累计接收代充转增" />
</el-table>
<!-- 分页 -->
<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="total"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
/>
<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="total"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2" />
<!-- 操作 -->
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="exportDate()"> 导出 </el-button>
<el-button type="primary"
@click="exportDate()"> 导出 </el-button>
<el-button @click="detailsDialog = false">关闭</el-button>
</span>
</template>
@@ -186,12 +195,12 @@ import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
export default {
name: "invitationRanking",
data() {
data () {
return {
inquire: {
time: "",
userId: "",
value: "",
value: "0",
options: [
{
value: "0",
@@ -225,24 +234,24 @@ export default {
tableDataIn: [],
};
},
created() {
created () {
this.getData();
},
methods: {
// 查询
getData() {
getData () {
this.loading = true;
let startTime = "";
let endTime = "";
let startDate = "";
let endDate = "";
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");
startDate = dateFormat(this.inquire.time[0], "yyyy-MM-dd");
endDate = dateFormat(this.inquire.time[1], "yyyy-MM-dd");
}
userInviteFissionRecordGetInviteRank({
pageNum: this.currentPage,
pageSize: this.pageSize,
startTime: startTime,
endTime: endTime,
startDate: startDate,
endDate: endDate,
erBanNo: this.inquire.userId,
rankType: this.inquire.value,
}).then((res) => {
@@ -252,7 +261,7 @@ export default {
});
},
// 查看详情
details(val) {
details (val) {
this.detailsTitle = `用户ID:${val.erBanNo}的数据`;
this.getDataDetailsDialogVal = val;
this.detailsDialog = true;
@@ -269,7 +278,7 @@ export default {
});
},
// 设置黑名单
set(val) {
set (val) {
userInviteFissionRecordSetBlack({
status: val.isBlack == 0 ? 1 : 0,
uid: val.uid,
@@ -278,7 +287,7 @@ export default {
});
},
// 详情查询
getDataDetailsDialog() {
getDataDetailsDialog () {
this.loading = true;
userInviteFissionRecordGetDailyDetailList({
// date: this.getDataDetailsDialogVal.date,
@@ -294,24 +303,24 @@ export default {
});
},
// 导出
exportDate() {
exportDate () {
userInviteFissionRecordExport({
invitedErBanNo: this.detailsUserId,
inviteErBanNo: this.getDataDetailsDialogVal.erBanNo,
}).then((res) => {});
}).then((res) => { });
},
// 分页导航
handleSizeChange() {
handleSizeChange () {
this.getData();
},
handleCurrentChange() {
handleCurrentChange () {
this.getData();
},
// 分页导航
handleSizeChange2() {
handleSizeChange2 () {
this.getDataDetailsDialog();
},
handleCurrentChange2() {
handleCurrentChange2 () {
this.getDataDetailsDialog();
},
},

View File

@@ -29,7 +29,7 @@
<span id="countNum"></span>
</p>
<p>
<span>用户投入金币总数</span>
<span>用户投入钻石总数</span>
<span id="userPay"></span>
</p>
<p>
@@ -41,11 +41,11 @@
<span id="actualNum"></span>
</p>
<p>
<span>用户获得礼物中金币</span>
<span>用户获得礼物中钻石</span>
<span id="giftNum"></span>
</p>
<p>
<span>用户获得非礼物总金币</span>
<span>用户获得非礼物总钻石</span>
<span id="notGiftNum"></span>
</p>
<p>
@@ -214,11 +214,11 @@ export default {
}
},
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
// var key = row.createTime;

View File

@@ -29,7 +29,7 @@
<span id="countNum"></span>
</p>
<p>
<span>用户投入金币总数</span>
<span>用户投入钻石总数</span>
<span id="userPay"></span>
</p>
<p>
@@ -41,11 +41,11 @@
<span id="actualNum"></span>
</p>
<p>
<span>用户获得礼物中金币</span>
<span>用户获得礼物中钻石</span>
<span id="giftNum"></span>
</p>
<p>
<span>用户获得非礼物总金币</span>
<span>用户获得非礼物总钻石</span>
<span id="notGiftNum"></span>
</p>
<p>
@@ -214,11 +214,11 @@ export default {
}
},
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
// var key = row.createTime;

View File

@@ -652,7 +652,7 @@ export default {
$prizeType = '谢谢参与';
break;
case '1':
$prizeType = '金币';
$prizeType = '钻石';
break;
case '2':
$prizeType = '礼物';

View File

@@ -1,44 +1,67 @@
<template>
<div class="page-container">
<div class="main_box" :style="[smsSwitch ? 'height: 350px' : '']">
<div class="login_box">
<div class="login_logo">
<span
style="font-size:24px;color:#222;font-weight:bold;">&nbsp;&nbsp;MOLISTAR&nbsp;&nbsp;&nbsp;&nbsp;</span>
</div>
<div class="login_form">
<form id="loginForm" method="post">
<input type="hidden" id="smsSwitch" :value="smsSwitch" />
<div class="form-group">
<label for="account" class="t">&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input id="account" name="account" type="text" class="form-control x319 in" autocomplete="off">
</div>
<div class="form-group">
<label for="password" class="t">&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input id="password" name="password" type="password" class="password form-control x319 in">
</div>
<div v-if="smsSwitch">
<div class="form-group">
<label for="validateCode" class="t">验证码</label>
<input id="validateCode" name="authCode" type="text" class="form-control x319 in"
style="width: 210px;">
<button type="button" id="validateSend" class="btn btn-primary btn-lg">发送验证码</button>
</div>
</div>
<div class="form-group" style="margin-bottom: 0px;">
<label class="t"></label>
<span class="loginTips"></span>
</div>
<div class="form-group space">
<button type="button" id="loginBtn" class="btn btn-primary btn-lg">&nbsp;&nbsp;</button>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="重&nbsp;&nbsp;置" class="btn btn-default btn-lg">
</div>
</form>
</div>
</div>
<div class="page-container">
<div class="main_box"
:style="[smsSwitch ? 'height: 350px' : '']">
<div class="login_box">
<div class="login_logo">
<span style="font-size:24px;color:#222;font-weight:bold;">&nbsp;&nbsp;MOLISTAR&nbsp;&nbsp;&nbsp;&nbsp;</span>
</div>
<div class="login_form">
<form id="loginForm"
method="post">
<input type="hidden"
id="smsSwitch"
:value="smsSwitch" />
<div class="form-group">
<label for="account"
class="t">&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input id="account"
name="account"
type="text"
class="form-control x319 in"
autocomplete="off">
</div>
<div class="form-group">
<label for="password"
class="t">&nbsp;&nbsp;&nbsp;&nbsp;</label>
<input id="password"
name="password"
type="password"
class="password form-control x319 in">
</div>
<div v-if="smsSwitch">
<div class="form-group">
<label for="validateCode"
class="t">验证码</label>
<input id="validateCode"
name="authCode"
type="text"
class="form-control x319 in"
style="width: 210px;">
<button type="button"
id="validateSend"
class="btn btn-primary btn-lg">发送验证码</button>
</div>
</div>
<div class="form-group"
style="margin-bottom: 0px;">
<label class="t"></label>
<span class="loginTips"></span>
</div>
<div class="form-group space">
<button type="button"
id="loginBtn"
class="btn btn-primary btn-lg">&nbsp;&nbsp;</button>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset"
value="重&nbsp;&nbsp;置"
class="btn btn-default btn-lg">
</div>
</form>
</div>
</div>
</div>
</div>
</template>
<script>
@@ -46,187 +69,188 @@ import store from '@/store';
var sendFlag = true;
export default {
name: "LoginView",
data() {
return {
smsSwitch: true,
};
},
setup() {
return {
name: "LoginView",
data () {
return {
smsSwitch: true,
};
},
setup () {
return {
};
},
created() {
this.smsSwitch = true;
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
$(function () {
var $ul = $('<ul id="bubble-wrapper"/>');
for (var i = 0; i < 10; i++) {
$ul.append($('<li/>'));
}
$("body").append($ul);
var rememberMe = getCookie("wolfbe.remember");
if (rememberMe == 1) {
var account = getCookie("wolfbe.account");
if (account) $("#account").val(account);
}
$("#loginBtn").click(function () {
var account = $("#account").val();
var password = $("#password").val();
if (account.trim() == '') {
$(".loginTips").html("账号不能为空!");
return;
} else if (password.trim() == '') {
$(".loginTips").html("密码不能为空!");
return;
}
password = $.md5(password);
var param = { 'account': account, 'password': password };
var smsSwitch = $('#smsSwitch').val();
console.info('smsSwitch:' + smsSwitch);
if (smsSwitch && smsSwitch == 'true') {
var authCode = $("#validateCode").val();
if (authCode.trim() == '') {
$(".loginTips").html("验证码不能为空!");
return;
}
authCode = $.md5(authCode);
param = { 'account': account, 'password': password, 'authCode': authCode };
}
$.ajax({
type: "post",
url: "/login/login",
data: param,
dataType: "json",
success: function (data) {
console.log("data is: " + data.success);
//刷新验证码
$("#validateImg").click();
if (data.success == 'true') {
console.log('login success!');
var array = new String(data.msg).split('@');
store.dispatch('getUser', array[0]).then(res => {
store.commit('updateUser', {
adminId: array[0],
username: res.username
});
window.location.href = '#/blank';
});
} else {
if (data.msg == "4003" || data.msg == "404") {
if (data.data == "0") {
data.msg = "输入超过次数限制,请联系管理员";
} else {
data.msg = "密码或验证码错误!你今天还有" + data.data + "次重试机会";
}
}
$(".loginTips").html(data.msg).css("padding", "3px 5px");
return false;
}
}
});
});
$("#loginForm :input").not("#rememberAccount").focus(function () {
$(".loginTips").html("").css("padding", "0");
}).keyup(function (e) {
var keyCode = e.which || e.keyCode;
if (keyCode == 13) {
$("#loginBtn").click();
}
});
$("#validateImg").click(function () {
$(this).attr("src", "/admin/kaptcha?t=" + new Date().getTime());
});
$("#validateSend").click(function () {
var account = $("#account").val();
if (account.trim() == '') {
$(".loginTips").html("账号不能为空!");
return;
}
if (sendFlag) {
$.ajax({
type: "post",
url: "/login/sendSmsCode",
data: { 'account': account },
dataType: "json",
success: function (data) {
if (data.code == 200) {
sendSmsSuccess();
} else {
$(".loginTips").html(data.message);
}
}
});
}
});
});
};
},
created () {
this.smsSwitch = true;
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData () {
$(function () {
var $ul = $('<ul id="bubble-wrapper"/>');
for (var i = 0; i < 10; i++) {
$ul.append($('<li/>'));
}
},
$("body").append($ul);
var rememberMe = getCookie("wolfbe.remember");
if (rememberMe == 1) {
var account = getCookie("wolfbe.account");
if (account) $("#account").val(account);
}
$("#loginBtn").click(function () {
var account = $("#account").val();
var password = $("#password").val();
if (account.trim() == '') {
$(".loginTips").html("账号不能为空!");
return;
} else if (password.trim() == '') {
$(".loginTips").html("密码不能为空!");
return;
}
password = $.md5(password);
var param = { 'account': account, 'password': password };
var smsSwitch = $('#smsSwitch').val();
console.info('smsSwitch:' + smsSwitch);
if (smsSwitch && smsSwitch == 'true') {
var authCode = $("#validateCode").val();
if (authCode.trim() == '') {
$(".loginTips").html("验证码不能为空!");
return;
}
authCode = $.md5(authCode);
param = { 'account': account, 'password': password, 'authCode': authCode };
}
$.ajax({
type: "post",
url: "/login/login",
data: param,
dataType: "json",
success: function (data) {
console.log("data is: " + data.success);
//刷新验证码
$("#validateImg").click();
if (data.success == 'true') {
console.log('login success!');
var array = new String(data.msg).split('@');
store.dispatch('getUser', array[0]).then(res => {
store.commit('updateUser', {
adminId: array[0],
username: res.username
});
window.location.href = '#/blank';
});
} else {
if (data.msg == "4003" || data.msg == "404") {
if (data.data == "0") {
data.msg = "输入超过次数限制,请联系管理员";
} else {
data.msg = "密码或验证码错误!你今天还有" + data.data + "次重试机会";
}
}
$(".loginTips").html(data.msg).css("padding", "3px 5px");
return false;
}
}
});
});
$("#loginForm :input").not("#rememberAccount").focus(function () {
$(".loginTips").html("").css("padding", "0");
}).keyup(function (e) {
var keyCode = e.which || e.keyCode;
if (keyCode == 13) {
$("#loginBtn").click();
}
});
$("#validateImg").click(function () {
$(this).attr("src", "/admin/kaptcha?t=" + new Date().getTime());
});
$("#validateSend").click(function () {
var account = $("#account").val();
if (account.trim() == '') {
$(".loginTips").html("账号不能为空!");
return;
}
if (sendFlag) {
$.ajax({
type: "post",
url: "/login/sendSmsCode",
data: { 'account': account },
dataType: "json",
success: function (data) {
if (data.code == 200) {
sendSmsSuccess();
} else {
$(".loginTips").html(data.message);
}
}
});
}
});
});
}
},
};
function sendSmsSuccess() {
if (sendFlag) {
sendFlag = false;
var time = 181;
var timer = setInterval(() => {
time--;
$("#validateSend").html(time + ' 秒');
if (time === 0) {
clearInterval(timer);
$("#validateSend").html('重新获取');
sendFlag = true;
}
}, 1000);
}
function sendSmsSuccess () {
if (sendFlag) {
sendFlag = false;
var time = 181;
var timer = setInterval(() => {
time--;
$("#validateSend").html(time + ' 秒');
if (time === 0) {
clearInterval(timer);
$("#validateSend").html('重新获取');
sendFlag = true;
}
}, 1000);
}
}
//获取cookie的信息
function getCookie(name) {
var reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
var arr = document.cookie.match(reg);
if (arr) {
return (arr[2]);
} else {
return null;
}
function getCookie (name) {
var reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
var arr = document.cookie.match(reg);
if (arr) {
return (arr[2]);
} else {
return null;
}
}
</script>
<style scoped>
@import '../../css/supersized.css';
@import '../../css/login.css';
@import "../../css/supersized.css";
@import "../../css/login.css";
* {
font-family: "Helvetica Neue", Helvetica, STheiti, 微软雅黑, 宋体, Arial, Tahoma, sans-serif, serif;
font-family: "Helvetica Neue", Helvetica, STheiti, 微软雅黑, 宋体, Arial,
Tahoma, sans-serif, serif;
}
.btn-lg {
padding: 8px 25px;
padding: 8px 25px;
}
#captcha_img {
margin-left: 5px;
margin-left: 5px;
}
.loginTips {
color: red;
font-size: 14px;
margin-left: 10px;
color: red;
font-size: 14px;
margin-left: 10px;
}
#validateSend {
width: 106px;
padding: 6px 17px;
font-size: 14px;
width: 106px;
padding: 6px 17px;
font-size: 14px;
}
</style>

View File

@@ -50,7 +50,7 @@
<el-table-column prop="rewardName" align="center" label="奖品名称" />
<el-table-column prop="rewardType" align="center" label="奖品分类">
<template v-slot="scope">
{{ scope.row.rewardType == 1 ? "钻石" : "礼物" }}
{{ scope.row.rewardType == 1 ? "金币" : "礼物" }}
</template>
</el-table-column>
<el-table-column prop="stockNum" align="center" label="库存" />
@@ -138,15 +138,15 @@
</div>
<div
v-show="dialog.value1 == 1 || dialog.value1 == '钻石' ? true : false"
v-show="dialog.value1 == 1 || dialog.value1 == '金币' ? true : false"
class="inquire"
style="display: flex; margin-bottom: 20px"
>
<span class="demonstration">奖励钻石</span>
<span class="demonstration">奖励金币</span>
<el-input
style="width: 220px; display: inline-block"
v-model="dialog.diamond"
placeholder="请输入钻石数"
placeholder="请输入金币数"
class="input"
></el-input>
</div>
@@ -242,7 +242,7 @@ export default {
gifts: [
{
value: "1",
label: "钻石",
label: "金币",
},
{
value: "2",
@@ -394,7 +394,7 @@ export default {
},
//编辑
edi(val) {
this.dialog.value1 = val.rewardType == 1 ? "钻石" : "礼物";
this.dialog.value1 = val.rewardType == 1 ? "金币" : "礼物";
this.dialog.gitChance = val.rewardRate;
this.dialog.showChance = val.showRate;
this.dialog.inventory = val.stockNum;
@@ -437,7 +437,7 @@ export default {
if (this.dialogBool) {
if (this.dialog.value1 == 1) {
obj = {
rewardType: this.dialog.value1 == "钻石" || this.dialog.value1 == 1 ? 1 : 2,
rewardType: this.dialog.value1 == "金币" || this.dialog.value1 == 1 ? 1 : 2,
rewardValue: this.dialog.diamond,
rewardRate: this.dialog.gitChance,
showRate: this.dialog.showChance,
@@ -447,7 +447,7 @@ export default {
};
} else {
obj = {
rewardType: this.dialog.value1 == "钻石" || this.dialog.value1 == 1 ? 1 : 2,
rewardType: this.dialog.value1 == "金币" || this.dialog.value1 == 1 ? 1 : 2,
rewardValue: this.dialog.gifts2[this.dialog.value2].giftId,
rewardRate: this.dialog.gitChance,
showRate: this.dialog.showChance,
@@ -462,9 +462,9 @@ export default {
this.dialog.diamond = "";
this.dialog.value2 = 0;
} else {
if (this.dialog.value1 == 1 || this.dialog.value1 == "钻石") {
if (this.dialog.value1 == 1 || this.dialog.value1 == "金币") {
obj = {
rewardType: this.dialog.value1 == "钻石" ? 1 : 2,
rewardType: this.dialog.value1 == "金币" ? 1 : 2,
rewardValue: this.dialog.diamond,
rewardRate: this.dialog.gitChance,
showRate: this.dialog.showChance,
@@ -475,7 +475,7 @@ export default {
};
} else {
obj = {
rewardType: this.dialog.value1 == "钻石" ? 1 : 2,
rewardType: this.dialog.value1 == "金币" ? 1 : 2,
rewardValue: this.dialog.gifts2[this.dialog.value2].giftId,
rewardRate: this.dialog.gitChance,
showRate: this.dialog.showChance,

File diff suppressed because it is too large Load Diff

View 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>

View 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>

View 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>

View File

@@ -49,13 +49,13 @@
<span class="num"></span>
</div>
<div class="col-sm-6">
<span>用户投入钻石总数</span>
<span>用户投入金币总数</span>
<span class="inputValue"></span>
</div>
</div>
<div class="summary col-sm-12">
<div class="col-sm-6">
<span>平台支出钻石总数</span>
<span>平台支出金币总数</span>
<span class="outputValue"></span>
</div>
<div class="col-sm-6">
@@ -107,8 +107,8 @@ export default {
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'partitionDesc', title: '地区', align: 'center', valign: 'middle' },
{ field: 'num', title: '福袋购买数量', align: 'center', width: '5%' },
{ field: 'inputValue', title: '用户投入钻石数', align: 'center', width: '5%' },
{ field: 'outputValue', title: '平台支出钻石数', align: 'center', width: '5%' },
{ field: 'inputValue', title: '用户投入金币数', align: 'center', width: '5%' },
{ field: 'outputValue', title: '平台支出金币数', align: 'center', width: '5%' },
{
field: 'ratio', title: '偏差比率', align: 'center', width: '5%',
formatter: function (val, row, index) {

View File

@@ -87,7 +87,7 @@
</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="quotaPrice" id="quotaPrice"
placeholder="报名需要支付的钻石数">
placeholder="报名需要支付的金币数">
</div>
</div>
<div class="form-group">

View File

@@ -0,0 +1,626 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>勋章ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>勋章昵称</span>
<el-input v-model="inquire.nick" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span class="demonstration">地区</span>
<el-select filterable v-model="inquire.partitionId" placeholder="请选择">
<el-option
v-for="item in inquire.options"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()">
查询
</el-button>
<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="id" align="center" label="勋章ID" />
<el-table-column prop="partitionFlag" align="center" label="地区">
<template v-slot="scope">{{
partitionFlagFun(scope.row.partitionFlag, 1)
}}</template>
</el-table-column>
<el-table-column prop="name" align="center" label="勋章名称-华语区">
<template v-slot="scope">{{ JSON.parse(scope.row.name).zh }}</template>
</el-table-column>
<el-table-column prop="name" align="center" label="勋章名称-英语区">
<template v-slot="scope">{{ JSON.parse(scope.row.name).en }}</template>
</el-table-column>
<el-table-column prop="name" align="center" label="勋章名称-阿语区">
<template v-slot="scope">{{ JSON.parse(scope.row.name).ar }}</template>
</el-table-column>
<el-table-column
align="center"
prop="picUrl"
label="勋章图片"
width="120"
>
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.picUrl"
:zoom-rate="1.1"
:preview-src-list="scope.row.picUrl"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="enable" align="center" label="状态">
<template v-slot="scope">{{
scope.row.enable ? "生效" : "不生效"
}}</template>
</el-table-column>
<el-table-column prop="createTime" align="center" label="添加时间" />
<el-table-column align="center" label="操作" width="220">
<template v-slot="scope">
<el-button
@click="eidFun(scope.row)"
class="primary"
type="primary"
size="default"
>
编辑
</el-button>
<el-button
@click="grantFun(scope.row)"
class="primary"
type="primary"
size="default"
:disabled="!scope.row.enable"
>
发放
</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
destroy-on-close
class="pub"
v-model="controlsDialog"
:title="controlsTitle"
width="32%"
center
>
<!-- 地区 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>地区</span
>
<el-select
multiple
filterable
v-model="controlsObj.value"
placeholder="请选择"
style="width: 100%"
>
<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; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>勋章名称-华语</span
>
<el-input
v-model="controlsObj.nickZh"
placeholder=""
class="input"
></el-input>
</div>
<!-- 勋章名称-英语 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>勋章名称-英语</span
>
<el-input
v-model="controlsObj.nickEn"
placeholder=""
class="input"
></el-input>
</div>
<!-- 勋章名称-阿语 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>勋章名称-阿语</span
>
<el-input
v-model="controlsObj.nickAr"
placeholder=""
class="input"
></el-input>
</div>
<!-- 勋章图片 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>勋章图片</span
>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="controlsObj.imageUrl1"
:src="controlsObj.imageUrl1"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<!-- 状态 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<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.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</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
destroy-on-close
class="pub"
v-model="grantDialog"
title="发放勋章"
width="32%"
center
>
<!-- 勋章名称 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>勋章名称</span
>
<el-input
v-model="grantObj.nick"
placeholder="默认展示的是中文勋章名称"
class="input"
disabled
></el-input>
</div>
<!-- 发放对象平台号 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>发放对象平台号</span
>
<el-input
type="textarea"
:rows="2"
v-model="grantObj.userId"
placeholder="多个平台号用英文“,”号分开分隔"
class="input"
></el-input>
</div>
<!-- 发放天数 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>发放天数</span
>
<el-input
v-model="grantObj.days"
placeholder="输入天数,不输入则视为无限制"
class="input"
></el-input>
</div>
<!-- 备注 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>备注</span
>
<el-input
v-model="grantObj.desc"
placeholder=""
class="input"
></el-input>
</div>
<!-- 弹窗按钮 -->
<template #footer>
<span class="dialog-footer">
<el-button @click="grantDialog = false">取消</el-button>
<el-button type="primary" @click="grantOut()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
medalPage,
medalSave,
medalSend,
} from "@/api/medal/medal";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "MedalInfo",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
nick: "",
partitionId: "",
},
// 表格
tableData: [],
// 分页
total: 10,
currentPage: 1,
pageSize: 10,
// 操作弹窗
controlsDialog: false,
controlsTitle: "新增&编辑",
controlsType: 1,
controlsObj: {
value: [],
options: [],
nickZh: "",
nickEn: "",
nickAr: "",
imageUrl1: "",
value2: "",
options2: [
{
desc: "生效",
id: true,
},
{
desc: "不生效",
id: false,
},
],
id: "",
},
// 发放弹窗
grantDialog: false,
grantObj: {
nick: "",
userId: "",
days: "",
desc: "",
},
grantObjNew: {},
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.options.push({
desc: "全部",
id: "",
});
listPartitionInfo().then((res) => {
this.controlsObj.options = res.data;
this.getData();
});
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
medalPage({
id: this.inquire.id,
name: this.inquire.nick,
partitionId: this.inquire.partitionId,
page: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.records;
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 添加
add() {
this.controlsTitle = "新增";
this.controlsType = 1;
this.controlsObj.value = [];
this.controlsObj.nickZh = "";
this.controlsObj.nickEn = "";
this.controlsObj.nickAr = "";
this.controlsObj.imageUrl1 = "";
this.controlsObj.value2 = "";
this.controlsDialog = true;
},
// 编辑
eidFun(val) {
this.controlsTitle = "编辑";
this.controlsType = 2;
this.controlsObj.value = this.partitionFlagFun(val.partitionFlag, 2);
this.controlsObj.nickZh = JSON.parse(val.name).zh;
this.controlsObj.nickEn = JSON.parse(val.name).en;
this.controlsObj.nickAr = JSON.parse(val.name).ar;
this.controlsObj.imageUrl1 = val.picUrl;
this.controlsObj.value2 = val.enable;
this.controlsObj.id = val.id;
this.controlsDialog = true;
},
// 确认保存按钮
controlsDialogOut() {
if (this.controlsType == 1) {
// 新增
var obj = {};
var partitionFlagVal = 0;
console.log(this.controlsObj.value);
console.log(this.controlsObj.options);
this.controlsObj.value.forEach((res, i) => {
partitionFlagVal |= this.controlsObj.options[i].id;
});
obj.partitionFlag = partitionFlagVal;
obj.name = JSON.stringify({
zh: this.controlsObj.nickZh,
en: this.controlsObj.nickEn,
ar: this.controlsObj.nickAr,
});
obj.picUrl = this.controlsObj.imageUrl1;
obj.enable = this.controlsObj.value2;
console.log(obj);
medalSave(obj).then((res) => {
if (res.code == 200) {
this.getData();
this.controlsDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
} else {
// 编辑
var obj1 = {};
var partitionFlagVal1 = 0;
this.controlsObj.value.forEach((res, i) => {
partitionFlagVal1 += res;
});
obj1.partitionFlag = partitionFlagVal1;
obj1.name = JSON.stringify({
zh: this.controlsObj.nickZh,
en: this.controlsObj.nickEn,
ar: this.controlsObj.nickAr,
});
obj1.picUrl = this.controlsObj.imageUrl1;
obj1.enable = this.controlsObj.value2;
obj1.id = this.controlsObj.id;
console.log(1111111111, this.controlsObj.value);
console.log(this.controlsObj.options);
console.log(obj1);
medalSave(obj1).then((res) => {
if (res.code == 200) {
this.getData();
this.controlsDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
}
},
//发放按钮
grantFun(val) {
this.grantObjNew = val;
this.grantObj.nick = JSON.parse(val.name).zh;
this.grantDialog = true;
},
// 确认发放
grantOut() {
medalSend({
days: this.grantObj.days,
erbanNoStr: this.grantObj.userId,
medalId: this.grantObjNew.id,
remark: this.grantObj.desc,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message || "发放成功",
type: "success",
});
this.grantDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
partitionFlagFun(num, type) {
//1 2 4
var val = 0;
if (type == 2) {
if (num == 0 || num == 7) {
val = [4, 1, 2];
} else if (num == 1) {
val = [1];
} else if (num == 3) {
val = [1, 2];
} else if (num == 2) {
val = [2];
} else if (num == 6) {
val = [2, 4];
} else if (num == 4) {
val = [4];
}
} else {
if (num == 0 || num == 7) {
val = "华语区、英语区、阿语区";
} else if (num == 1) {
val = "英语区";
} else if (num == 3) {
val = "英语区、阿语区";
} else if (num == 2) {
val = "阿语区";
} else if (num == 6) {
val = "阿语区、华语区";
} else if (num == 4) {
val = "华语区";
}
}
return val;
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess(res, file) {
console.log(file);
this.controlsObj.imageUrl1 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
// 分页导航
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>

View File

@@ -0,0 +1,363 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>勋章ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>用户平台ID</span>
<el-input
v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()">
查询
</el-button>
<el-button class="primary" type="primary" @click="grantDialog = true">
发放勋章
</el-button>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="createTime" align="center" label="发放时间" />
<el-table-column prop="source" align="center" label="发放渠道">
<template v-slot="scope">{{
scope.row.source == 1 ? "管理后台" : scope.row.source
}}</template>
</el-table-column>
<el-table-column prop="id" align="center" label="发放勋章ID" />
<el-table-column prop="medalName" align="center" label="勋章名称" />
<el-table-column align="center" prop="x" label="勋章图片" width="120">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.picUrl"
:zoom-rate="1.1"
:preview-src-list="scope.row.picUrl"
fit="cover"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="x" align="center" label="生效天数">
<template v-slot="scope">{{ scope.row.days }}</template>
</el-table-column>
<el-table-column prop="x" align="center" label="备注">
<template v-slot="scope">{{
scope.row.remark == "" ? "-" : scope.row.remark
}}</template>
</el-table-column>
<el-table-column prop="x" align="center" label="状态">
<template v-slot="scope">{{
scope.row.status == 1
? "生效中"
: scope.row.status == 0
? "已失效"
: "撤销"
}}</template>
</el-table-column>
<el-table-column prop="erbanNo" align="center" label="发放对象平台号" />
<el-table-column prop="nick" align="center" label="发放对象昵称" />
<el-table-column
prop="partitionName"
align="center"
label="发放对象分区"
/>
<el-table-column align="center" label="操作" width="220">
<template v-slot="scope">
<el-button
@click="eidFun(scope.row)"
class="primary"
type="primary"
size="default"
:disabled="scope.row.status <= 0 ? true : false"
>
撤销
</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
destroy-on-close
class="pub"
v-model="grantDialog"
title="发放勋章"
width="32%"
center
>
<!-- 勋章昵称 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>勋章昵称</span
>
<el-select filterable v-model="grantObj.value" placeholder="请选择">
<el-option
v-for="item in grantObj.options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
<!-- 发放对象平台号 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>发放对象平台号</span
>
<el-input
type="textarea"
:rows="2"
v-model="grantObj.userId"
placeholder="多个平台号用英文“,”号分开分隔"
class="input"
></el-input>
</div>
<!-- 发放天数 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>发放天数</span
>
<el-input
v-model="grantObj.days"
placeholder="输入天数,不输入则视为无限制"
class="input"
></el-input>
</div>
<!-- 备注 -->
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>备注</span
>
<el-input
v-model="grantObj.desc"
placeholder=""
class="input"
></el-input>
</div>
<!-- 弹窗按钮 -->
<template #footer>
<span class="dialog-footer">
<el-button @click="grantDialog = false">取消</el-button>
<el-button type="primary" @click="grantOut()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 二次确认弹窗 -->
<el-dialog
destroy-on-close
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 {
medalRecordPage,
listAll,
medalSend,
rollback,
} from "@/api/medal/medal";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "MedalRecord",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
userId: "",
},
// 表格
tableData: [],
// 分页
total: 10,
currentPage: 1,
pageSize: 10,
// 发放弹窗
grantDialog: false,
grantObj: {
value: "",
options: [],
userId: "",
days: "",
desc: "",
},
// 撤销
delDialog: false,
delObj: {},
};
},
created() {
listAll().then((res) => {
if (res.code == 200) {
this.grantObj.options = res.data;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
medalRecordPage({
medalId: this.inquire.id,
erbanNo: this.inquire.userId,
page: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.records;
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 确认发放
grantOut() {
medalSend({
days: this.grantObj.days,
erbanNoStr: this.grantObj.userId,
medalId: this.grantObj.value,
remark: this.grantObj.desc,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message || "发放成功",
type: "success",
});
this.grantDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 撤销按钮
eidFun(val) {
this.delObj = val;
this.delDialog = true;
},
// 确认撤销按钮
delClick() {
console.log(this.delObj);
rollback({ recordId: this.delObj.id }).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message || "撤销成功",
type: "success",
});
this.getData();
this.delDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 分页导航
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>

View File

@@ -0,0 +1,269 @@
<template>
<section class="content">
<div class="box box-danger">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<label for="gameId" class="col-sm-1 control-label">游戏:</label>
<div class="col-sm-2">
<select id="gameId" class="input-sm form-control"></select>
</div>
<label for="startTime" class="col-sm-1 control-label">日期:</label>
<div class="col-sm-2">
<input type="text" name="startTime" id="startTime" class="input-sm form-control" placeholder="开始日期">
</div>
<label for="startTime" class="col-sm-1 control-label">-</label>
<div class="col-sm-2">
<input type="text" name="endTime" id="endTime" class="input-sm form-control" placeholder="结束日期">
</div>
</div>
<div class="col-sm-12">
<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 -->
</div>
</div>
</section>
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content" style="width: 190%; left: 50%; transform: translateX(-50%);">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel"></h4>
</div>
<input type="hidden" name="dateTime" id="detailTime" />
<div class="modal-body">
<!-- .content -->
<div id="detailTable"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" id="btnExport">导出</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { miniGameForBaiShunPage, miniGameForBaiShunDetailPage, miniGameForBaiShunExport, miniGameForBaiShunExportAll } from '@/api/miniGame/miniGameForBaiShun';
import { getConfigValueByKey } from '@/api/system/sysconf';
import { buildSelectOption } from '@/utils/system-helper';
export default {
name: 'MiniGameForBaiShunView',
data() {
return {
columns: [
{ field: 'dateTime', title: '日期', align: 'center', width: '15%' },
{ field: 'userCount', title: '人数', align: 'center', width: '15%' },
{ field: 'consumeNum', title: '货币消耗', align: 'center', width: '15%' },
{ field: 'settleNum', title: '结算总量', align: 'center', width: '15%' },
{
field: 'platformNum',
title: '平台收入',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
return row.consumeNum - row.settleNum;
}
},
{
field: 'dateTime',
title: '操作',
align: 'center',
width: '15%',
valign: 'middle',
formatter: function (val, row, index) {
return '<button class="btn btn-sm btn-default opt-detail" data-index="' + index + '">详情</button>';
}
}
],
detailColumns: [
{ field: 'erbanNo', title: '用户平台ID', align: 'center', width: '15%' },
{ field: 'nick', title: '昵称', align: 'center', width: '15%' },
{ field: 'consumeNum', title: '货币消耗', align: 'center', width: '15%' },
{ field: 'settleNum', title: '结算总量', align: 'center', width: '15%' },
{
field: 'platformNum',
title: '平台收入',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
return row.consumeNum - row.settleNum;
}
},
],
};
},
created() {
this.initGame();
this.init();
},
methods: {
init() {
this.$nextTick(function () {
let $this = this;
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd 00:00:00',
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd 00:00:00',
todayBtn: true,
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
$this.initTable();
$('#table').on('click', '.opt-detail', function () {
$this.detail(this);
});
$('#btnSearch').click(function () {
$this.search();
});
$('#btnExport').click(function () {
$this.export();
});
$('#btnExportAll').click(function () {
$this.exportForAll();
});
});
},
initTable() {
let $this = this;
TableHelper.destroy('#table');
$('#table').bootstrapTable({
columns: $this.columns,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var param = {
gameId: $('#gameId').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
pageNum: params.pageNumber,
pageSize: params.pageSize,
};
return param;
},
ajax: function(request) {
miniGameForBaiShunPage(request.data).then(res => {
let data = res.data;
request.success({
'rows': data.records,
'total': data.total
});
});
},
toolbar: '#toolbar',
});
},
search() {
TableHelper.doRefresh('#table');
},
detail(obj) {
const currentData = $('#table').bootstrapTable('getData')[$(obj).data('index')];
let dateTime = currentData.dateTime;
$('#modalLabel').html('日期:' + dateTime);
$('#detailTime').val(dateTime);
TableHelper.destroy('#detailTable');
$('#detailTable').bootstrapTable({
columns: this.detailColumns,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var param = {
gameId: $('#gameId').val(),
dateTime: $('#detailTime').val(),
pageNum: params.pageNumber,
pageSize: params.pageSize,
};
return param;
},
ajax: function(request) {
miniGameForBaiShunDetailPage(request.data).then(res => {
let data = res.data;
request.success({
'rows': data.records,
'total': data.total
});
});
},
});
$("#detailModal").modal('show');
},
export() {
miniGameForBaiShunExport({
dateTime: $('#detailTime').val(),
});
},
initGame() {
getConfigValueByKey({
configId: 'BAISHUN_GAME'
}).then(res => {
if (res.data) {
let data = JSON.parse(res.data.configValue);
buildSelectOption(
"#gameId",
data[0],
data.map((v) => {
return {
value: v.gameId,
text: v.gameName,
};
})
);
}
});
},
exportForAll() {
miniGameForBaiShunExportAll({
gameId: $('#gameId').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
});
},
},
}
</script>
<style scoped></style>

View File

@@ -0,0 +1,174 @@
<template>
<section class="content">
<div class="box box-danger">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<label for="gameMode" class="col-sm-1 control-label">游戏模式:</label>
<div class="col-sm-3">
<select name="gameMode" id="gameMode" class="input-sm form-control">
<option value="" selected="selected">全部</option>
<option value="1">经典</option>
<option value="0">快速</option>
</select>
</div>
<label for="startTime" class="col-sm-1 control-label">日期:</label>
<div class="col-sm-3">
<input type="text" name="startTime" id="startTime" class="input-sm form-control" placeholder="开始日期">
</div>
<label for="startTime" class="col-sm-1 control-label">-</label>
<div class="col-sm-3">
<input type="text" name="endTime" id="endTime" class="input-sm form-control" placeholder="结束日期">
</div>
</div>
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
</div>
</div>
</section><!-- .content -->
</div>
</div>
</section>
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content" style="width: 190%; left: 50%; transform: translateX(-50%);">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel"></h4>
</div>
<input type="hidden" name="dateTime" id="detailTime" />
<div class="modal-body">
<!-- .content -->
<div id="detailTable"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" id="btnExport">导出</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { miniGameForNavPage } from '@/api/miniGame/miniGameForNav';
export default {
name: 'MiniGameForNavView',
data() {
return {
columns: [
{ field: 'mgId', title: '游戏ID', align: 'center', width: '15%' },
{ field: 'mgName', title: '游戏名称', align: 'center', width: '15%' },
{ field: 'dateTime', title: '日期', align: 'center', width: '15%' },
{
field: 'gameMode',
title: '游戏模式',
align: 'center',
width: '15%',
formatter: function (val, row, index) {
let value = '';
if (val == 1) {
value = '经典';
} else if (val == 0) {
value = '快速';
}
return value;
}
},
{ field: 'userCount', title: '游戏人数', align: 'center', width: '15%' },
{ field: 'ticket', title: '入门费', align: 'center', width: '15%' },
],
};
},
created() {
this.init();
},
methods: {
init() {
this.$nextTick(function () {
let $this = this;
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd 00:00:00',
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd 00:00:00',
todayBtn: true,
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#startTime').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
$this.initTable();
$('#table').on('click', '.opt-detail', function () {
$this.detail(this);
});
$('#btnSearch').click(function () {
$this.search();
});
});
},
initTable() {
let $this = this;
TableHelper.destroy('#table');
$('#table').bootstrapTable({
columns: $this.columns,
cache: false,
striped: true,
showRefresh: false,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
search: false,
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var param = {
gameMode: $('#gameMode').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
pageNum: params.pageNumber,
pageSize: params.pageSize,
};
return param;
},
ajax: function(request) {
miniGameForNavPage(request.data).then(res => {
let data = res.data;
request.success({
'rows': data.records,
'total': data.total
});
});
},
toolbar: '#toolbar',
});
},
search() {
TableHelper.doRefresh('#table');
},
},
}
</script>
<style scoped></style>

View File

@@ -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 == 0) {
if (!json.isCustomWord) {
$('input[name="isCustomWord"]').get(0).checked = true;
$('#fixedWord-div').removeClass("hidden");
$('#fixedWord-div').addClass("hidden");
$('#zhFixedWord').val('');
$('#arFixedWord').val('');
$('#enFixedWord').val('');
} else {
$('input[name="isCustomWord"]').get(1).checked = true;
$('#fixedWord-div').addClass("hidden");
$('#fixedWord').val('');
$('#fixedWord-div').removeClass("hidden");
}
//$('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,
@@ -586,7 +651,7 @@ export default {
});
//是否自定义文案变化
$('input[type=radio][name=isCustomWord]').change(function () {
if ($(this).val() == 0) {
if ($(this).val() == 1) {
$('#fixedWord-div').removeClass("hidden");
} else {
$('#fixedWord-div').addClass("hidden");
@@ -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>

View File

@@ -732,8 +732,12 @@ export default {
var options = [];
for (var i = 0, len = data.length; i < len; i++) {
var item = data[i];
options.push('<option value="' + item.giftId + '">' + item.giftName + '</option>')
luckyBagMap[item.giftId] = item
let giftName = item.giftName;
if (giftName && giftName.startsWith('{') && giftName.endsWith('}')) {
item.giftName = JSON.parse(giftName).zh;
}
options.push('<option value="' + item.giftId + '">' + item.giftName + '</option>');
luckyBagMap[item.giftId] = item;
}
$("#qLuckyBagId").html(options.join(' ')); //填充到select标签中
}

View File

@@ -112,7 +112,7 @@ export default {
if (giftName.startsWith('{') && giftName.endsWith('}')) {
giftName = JSON.parse(giftName).zh;
}
str += '<option value="' + res.data[i].giftId + '">' + res.data[i].giftId + '-' + giftName + '-' + res.data[i].goldPrice + '金币</option>';
str += '<option value="' + res.data[i].giftId + '">' + res.data[i].giftId + '-' + giftName + '-' + res.data[i].goldPrice + '钻石</option>';
}
$('#luckyBag').html(str);
//初始化table
@@ -195,7 +195,7 @@ export default {
selectGiftName = $("#luckyBag").find("option:selected").text();
console.info("selectGiftName: ", selectGiftName)
console.info("selectGiftId: ", selectGiftId)
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '金币</option>';
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '钻石</option>';
$('#giftId').html(str);
// 打开编辑弹窗
$('#deviateRangeId').val('');
@@ -235,7 +235,7 @@ export default {
$("#deviateLowerLimit").val(data.lowerLimit);
$("#deviateUpperLimit").val(data.upperLimit);
$("#creator").val(data.creator);
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '金币</option>';
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '钻石</option>';
$('#giftId').html(str);
// 打开编辑弹窗
$("#deviateRangeModal").modal('show');

View File

@@ -175,7 +175,7 @@ export default {
if (giftName.startsWith('{') && giftName.endsWith('}')) {
giftName = JSON.parse(giftName).zh;
}
str += '<option value="' + res.data[i].giftId + '">' + res.data[i].giftId + '-' + giftName + '-' + res.data[i].goldPrice + '金币</option>';
str += '<option value="' + res.data[i].giftId + '">' + res.data[i].giftId + '-' + giftName + '-' + res.data[i].goldPrice + '钻石</option>';
}
$('#luckyBag').html(str);
$('#luckyBagId').html(str);
@@ -311,7 +311,7 @@ export default {
selectGiftName = $("#luckyBag").find("option:selected").text();
console.info("selectGiftName: ", selectGiftName)
console.info("selectGiftId: ", selectGiftId)
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '金币</option>';
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '钻石</option>';
// $('#luckyBagId').html(str);
$('#luckyBagId').html(str);
selectRangeName = $("#deviateRange").find("option:selected").text()
@@ -335,7 +335,7 @@ export default {
selectGiftName = $("#luckyBag").find("option:selected").text();
console.info("selectGiftName: ", selectGiftName)
console.info("selectGiftId: ", selectGiftId)
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '金币</option>';
const str = '<option value="' + selectGiftId + '">' + selectGiftName + '钻石</option>';
$('#luckyBagId').html(str);
selectRangeName = $("#deviateRange").find("option:selected").text()
selectRangeId = $("#deviateRange").find("option:selected").val()

View File

@@ -92,7 +92,7 @@
<option value="2">续费</option>
<option value="3">体验</option>
</select>
<span class="tips">开通会打公帐而且会返金币</span>
<span class="tips">开通会打公帐而且会返钻石</span>
</div>
</div>
<div class="form-group toggle-group">
@@ -124,9 +124,9 @@
import TableHelper from '@/utils/bootstrap-table-helper';
var tipsArr = [
'开通会打公帐而且会返金币',
'续费会打公帐而且会返金币',
'体验不会打公帐也不会返还金币'
'开通会打公帐而且会返钻石',
'续费会打公帐而且会返钻石',
'体验不会打公帐也不会返还钻石'
];
export default {
name: "NobleAdminView",
@@ -222,7 +222,7 @@ export default {
}
},
{ field: 'nobleName', title: '贵族名称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'goldNum', title: '金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'goldNum', title: '钻石数', align: 'center', valign: 'middle', width: '10%' },
{
field: 'nobleDays', title: '贵族选择时间', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
if (val) {
@@ -234,7 +234,7 @@ export default {
field: 'payType', title: '支付类型', align: 'center', valign: 'middle', formatter: function (val, row, index) {
switch (val) {
case 1:
return '金币开通';
return '钻石开通';
case 2:
return '用户付款开通';

View File

@@ -0,0 +1,439 @@
<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-button class="primary" type="primary" @click="exportInfoFun()"
>导出</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="ownerPartitionName"
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-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="ediClick(scope)"
class="primary"
type="primary"
size="default"
:disabled="!scope.row.enable"
>编辑</el-button
>
<el-button
@click="
delDialog = true;
delDialogData = scope.row;
"
:class="scope.row.enable ? 'danger' : 'info'"
:type="scope.row.enable ? 'danger' : 'info'"
size="default"
:disabled="!scope.row.enable"
>{{ scope.row.enable ? "移除" : "已解散" }}</el-button
>
</template>
</el-table-column>
</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,
exportInfo,
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: "GuildInfo",
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;
});
},
// 导出
exportInfoFun() {
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");
}
exportInfo({
erbanNo: this.inquire.userId,
referrer: this.inquire.referrer,
familyName: this.inquire.nick,
startDate: startTime,
endDate: endTime,
}).then((res) => {});
},
// 添加
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>

View 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>

View File

@@ -0,0 +1,383 @@
<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.nick"
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="exportFamilyMemberFun()">导出</el-button>
<!-- 表格 -->
<el-table v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px">
<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="成员昵称" />
<el-table-column prop="partitionName"
align="center"
label="成员分区" />
<el-table-column prop="goldIncome"
align="center"
label="金币总收入" />
<el-table-column prop="diamondRemain"
align="center"
label="钻石总收入" />
<el-table-column prop="micRemainTime"
align="center"
label="开播时长" />
<el-table-column prop="sendGiftUserNum"
align="center"
label="送礼用户数" />
<el-table-column align="center"
label="成员状态">
<template v-slot="scope">{{
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"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</template>
<script>
import {
pageFamilyMember,
listFun,
addRecord,
listRecord,
exportFamilyMember,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GuildMemberInfo",
data () {
return {
loading: false,
//查询所需条件对象
inquire: {
userId: "",
nick: "",
time: "",
},
//新增所需对象
resource: {
id: "",
nick: "",
time: "",
nowValue: "",
options: [],
familyMemberId: null,
},
// 表格
tableData: [],
// 新增弹窗
addDialog: false,
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created () {
this.getData();
listFun().then((res) => {
this.violationObj.options = res.data;
});
},
methods: {
// 查询接口
getData () {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
console.log(this.inquire);
pageFamilyMember({
erbanNo: this.inquire.userId,
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;
});
},
// 导出
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();
},
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>

View File

@@ -0,0 +1,181 @@
<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">
<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-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<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="成员昵称" />
<el-table-column prop="targetErbanNo" align="center" label="目标成员ID" />
<el-table-column prop="targetNick" align="center" label="目标成员昵称" />
<el-table-column prop="type" align="center" label="操作类型">
<template v-slot="scope">
{{
scope.row.type == 1
? "申请加入"
: scope.row.type == 2
? "申请退出"
: scope.row.type == 3
? "邀请加入"
: scope.row.type == 4
? "设置管理员"
: scope.row.type == 5
? "移除管理员"
: "移除成员"
}}
</template>
</el-table-column>
<el-table-column prop="createTime" align="center" label="操作时间" />
<el-table-column prop="updateTime" align="center" label="最后更新时间" />
<el-table-column prop="status" align="center" label="状态">
<template v-slot="scope">
{{
scope.row.status == 1
? "未处理"
: scope.row.status == 2
? "同意"
: scope.row.status == 2
? "拒绝"
: "过期"
}}
</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"
/>
</div>
</template>
<script>
import { pageOperateRecord } from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GuildMove",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
userId: "",
nick: "",
time: "",
},
//新增所需对象
resource: {
id: "",
nick: "",
},
// 表格
tableData: [],
// 新增弹窗
addDialog: false,
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
pageOperateRecord({
erbanNo: this.inquire.userId,
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;
});
},
// 分页导航
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>

View 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>

View File

@@ -98,25 +98,6 @@ export default {
methods: {
initData() {
$(function () {
var main = {
init: function () {
this.eventRegister();
this.getDataFromBack();
},
eventRegister: function () {
// 筛选按钮点击事件
$('#searchBtn').on('click', function () {
TableHelper.doRefresh('#table');
});
},
getDataFromBack: function () {
}
};
main.init();
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
@@ -251,6 +232,11 @@ export default {
}
});
// 筛选按钮点击事件
$('#searchBtn').on('click', function () {
TableHelper.doRefresh('#table');
});
});
}
},

View File

@@ -54,7 +54,7 @@
<div class="col-sm-8" style="margin-left: -20px;">
<select name="addType" id="addType" data-btn-class="btn btn-warning"
style="border-radius: 2px; width: 100px; height: 30px;">
<option value="budGold">金币</option>
<option value="budGold">钻石</option>
<option value="onlineGift">线上礼物</option>
<option value="dress">装扮</option>
<option value="entityGift">实体奖品</option>
@@ -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>
@@ -174,7 +174,7 @@
class="form-control validate[required]" placeholder="">
</div>
<div class="col-sm-3" id="attention" style="color:lightgray;">平台价值和实际价值都指金币价值</div>
<div class="col-sm-3" id="attention" style="color:lightgray;">平台价值和实际价值都指钻石价值</div>
</div>
<!-- 实际价值 -->
@@ -280,9 +280,13 @@ export default {
$.get('/admin/headwear/total/list', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
dress.push(res.data[i]);
var str = '<option value="' + dress[i].headwearId + '">' + dress[i].name + '</option>';
let item = res.data[i];
let name = item.name;
if (name && name.startsWith('{') && name.endsWith('}')) {
item.name = JSON.parse(name).zh;
}
dress.push(item);
var str = '<option value="' + item.headwearId + '">' + item.name + '</option>';
$('.headwearContent').append(str);
}
@@ -297,7 +301,12 @@ export default {
var data = res.data;
console.log(data);
for (var key in data) {
var str = '<option value="' + data[key].giftId + '">' + data[key].giftName + '</option>';
let item = data[key];
let giftName = item.giftName;
if (giftName && giftName.startsWith('{') && giftName.endsWith('}')) {
item.giftName = JSON.parse(giftName).zh;
}
var str = '<option value="' + item.giftId + '">' + item.giftName + '</option>';
$('#awardChoose').append(str);
}
} else {
@@ -315,9 +324,14 @@ export default {
$.get('/admin/car/goods/total/list', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
car.push(res.data[i]);
let item = res.data[i];
let name = item.name;
if (name && name.startsWith('{') && name.endsWith('}')) {
item.name = JSON.parse(name).zh;
}
car.push(item);
var str = '<option value="' + car[i].id + '">' + car[i].name + '</option>';
var str = '<option value="' + item.id + '">' + item.name + '</option>';
$('.carContent').append(str);
}
}
@@ -357,7 +371,7 @@ export default {
field: 'prizeType', title: '奖品分类', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
switch (val) {
case 1:
return '<p>金币</p>';
return '<p>钻石</p>';
case 2:
@@ -418,7 +432,7 @@ export default {
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var giftKey = {
'金币': 1,
'钻石': 1,
'在线礼物': 2,
'座驾': 3,
'头饰': 4,

View File

@@ -64,7 +64,7 @@
<span id="countNum"></span>
</p>
<p>
<span>用户投入金币总数</span>
<span>用户投入钻石总数</span>
<span id="userPay"></span>
</p>
<p>
@@ -76,11 +76,11 @@
<span id="actualNum"></span>
</p>
<p>
<span>用户获得礼物中金币</span>
<span>用户获得礼物中钻石</span>
<span id="giftNum"></span>
</p>
<p>
<span>用户获得非礼物总金币</span>
<span>用户获得非礼物总钻石</span>
<span id="notGiftNum"></span>
</p>
<p>
@@ -255,11 +255,11 @@ export default {
}
},
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
// var key = row.createTime;

View File

@@ -64,7 +64,7 @@
<span id="countNum"></span>
</p>
<p>
<span>用户投入金币总数</span>
<span>用户投入钻石总数</span>
<span id="userPay"></span>
</p>
<p>
@@ -76,11 +76,11 @@
<span id="actualNum"></span>
</p>
<p>
<span>用户获得礼物中金币</span>
<span>用户获得礼物中钻石</span>
<span id="giftNum"></span>
</p>
<p>
<span>用户获得非礼物总金币</span>
<span>用户获得非礼物总钻石</span>
<span id="notGiftNum"></span>
</p>
<p>
@@ -255,11 +255,11 @@ export default {
}
},
{ field: 'countNum', title: '抽奖记录数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'userTotalPay', title: '用户投入钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPlatformValue', title: '总平台价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalActualValue', title: '总实际价值', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物金币数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalGiftActualValue', title: '用户获得礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalNotGiftActualValue', title: '用户获得非礼物钻石数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalRealGiftActualValue', title: '用户获得实物', align: 'center', valign: 'middle', width: '10%' },
// {field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
// var key = row.createTime;

View File

@@ -47,7 +47,7 @@
<span class="col-sm-3">许愿池类型</span>
<span class="col-sm-3">奖品种类数</span>
<span class="col-sm-3">奖品个数</span>
<span class="col-sm-3">总期望值(金币)</span>
<span class="col-sm-3">总期望值(钻石)</span>
</p>
<p class="col-sm-12">
@@ -381,7 +381,7 @@ export default {
return '谢谢参与';
case 1:
return '金币';
return '钻石';
case 2:
return '在线礼物';
@@ -555,7 +555,7 @@ export default {
$prizeType = '谢谢参与';
break;
case '1':
$prizeType = '金币';
$prizeType = '钻石';
break;
case '2':
$prizeType = '礼物';

View File

@@ -84,7 +84,7 @@ export default {
{ field: 'giveDate', title: '日期', align: 'center', width: '5%' },
{ field: 'rechargeNum', title: '有转赠的代充人数', align: 'center', width: '5%' },
{ field: 'giveNum', title: '接受代充转赠的人数', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '转出钻石数', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '转出金币数', align: 'center', width: '5%' },
{
field: 'handle',
title: '详情',

View File

@@ -177,7 +177,7 @@ export default {
return value;
}
},
{ field: 'outDiamondNum', title: '最近30天转出钻石', align: 'center', width: '5%' },
{ field: 'outDiamondNum', title: '最近30天转出金币', align: 'center', width: '5%' },
{
field: 'id',
title: '操作',

View File

@@ -39,7 +39,7 @@
<el-table-column align="center" prop="erbanNo" label="piko号"> </el-table-column>
<el-table-column align="center" prop="nick" label="昵称"> </el-table-column>
<el-table-column align="center" prop="hallName" label="所属公会"> </el-table-column>
<el-table-column align="center" prop="diamonds" label="当前账户钻石余额">
<el-table-column align="center" prop="diamonds" label="当前账户金币余额">
</el-table-column>
<el-table-column align="center" prop="createTime" label="权限生效时间">
</el-table-column>
@@ -222,7 +222,7 @@ export default {
{ piko号: "erbanNo" },
{ 昵称: "nick" },
{ 所属公会: "hallName" },
{ 当前钻石账户余额: "diamonds" },
{ 当前金币账户余额: "diamonds" },
{ 权限生效时间: "createTime" },
{ 操作人: "operator" },
];

View File

@@ -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>

View File

@@ -16,9 +16,9 @@
<div class="col-sm-3">
<select id="queryActivityType" name="activityType" class="form-control">
<option value="">全部</option>
<option value="12">官方赠送金币</option>
<option value="17">活动奖励金币</option>
<option value="20">公款充值金币</option>
<option value="12">官方赠送钻石</option>
<option value="17">活动奖励钻石</option>
<option value="20">公款充值钻石</option>
<option value="51">官方钻石消除</option>
</select>
</div>
@@ -52,7 +52,7 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">金币赠送类型配置</h4>
<h4 class="modal-title" id="modalLabel">钻石赠送类型配置</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="addForm">
@@ -61,9 +61,9 @@
<label for="activityType" class="col-sm-2 control-label">类型:</label>
<div class="col-sm-8 control-label">
<select name="activityType" id="activityType" class="form-control validate[required]">
<option value="12">官方赠送金币</option>
<option value="17">活动奖励金币</option>
<option value="20">公款充值金币</option>
<option value="12">官方赠送钻石</option>
<option value="17">活动奖励钻石</option>
<option value="20">公款充值钻石</option>
<option value="51">官方钻石消除</option>
</select>
</div>
@@ -126,9 +126,9 @@ export default {
{
field: 'activityType', title: '活动类型', align: 'center', valign: 'middle', width: '10%',
formatter: function (val, row, index) {
if (val == 12) { return "官方赠送金币" }
if (val == 17) { return "活动奖励金币" }
if (val == 20) { return "公款充值金币" }
if (val == 12) { return "官方赠送钻石" }
if (val == 17) { return "活动奖励钻石" }
if (val == 20) { return "公款充值钻石" }
if (val == 51) { return "官方钻石消除" }
return val;
}

View File

@@ -44,7 +44,7 @@
</div>
</div>
<div class="form-group">
<div style="color:red;">每个用户赠送次数不能大于3并且被赠送用户的金币余额不能大于250</div>
<div style="color:red;">每个用户赠送次数不能大于3并且被赠送用户的钻石余额不能大于250</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
@@ -66,14 +66,14 @@
<th style="width: 50px">头像</th>
<th style="width:200px;">平台号</th>
<th style="width:300px;">昵称</th>
<th>金币</th>
<th>钻石</th>
</tr></thead>
<tbody id="tbody">
</tbody>-->
</table>
</div>
</div>
<!--查看金币赠送记录-->
<!--查看钻石赠送记录-->
</section>
<!-- .content -->
</template>
@@ -184,7 +184,7 @@ function initUserInfoTable() {
},
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%', valign: 'middle' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%', valign: 'middle' },
{ field: 'goldNum', title: '金币', align: 'center', width: '5%', valign: 'middle' },
{ field: 'goldNum', title: '钻石', align: 'center', width: '5%', valign: 'middle' },
{ field: 'radishNum', title: '萝卜', align: 'center', width: '5%', valign: 'middle' },
],
cache: false,

View File

@@ -23,8 +23,8 @@
<select name="type" id="type" class="col-sm-2 form-control"
data-btn-class="btn-warning">
<option value="" selected="selected">全部</option>
<option value="62">官方赠送金币</option>
<option value="12">官方赠送钻石</option>
<option value="62">官方赠送钻石</option>
<option value="12">官方赠送金币</option>
<option value="6">官方赠送水晶</option>
</select>
</div>

View File

@@ -45,13 +45,13 @@
<div class="col-sm-10">
<select name="type" id="type" class="form-control" ata-btn-class="btn-warning"
onchange="selectOnchang(this)">
<option value="OFFICAL_DIAMOND">官方赠送钻石</option>
<option value="OFFICAL_DIAMOND">官方赠送金币</option>
<option value="OFFICAL_RADISH">官方赠送水晶</option>
<option value="ACTIVITY_GOLD">活动奖励钻石</option>
<option value="COMPANY_ACCOUNT_DIAMOND">公款充值钻石</option>
<option value="OFFICAL_REDUCE_DIAMONDS">官方钻石消除</option>
<option value="OFFICAL_GOLD">官方赠送金币</option>
<option value="CLEAR_USER_GOLD">用户金币清除</option>
<option value="COMPANY_ACCOUNT_DIAMOND">公款充值金币</option>
<option value="OFFICAL_REDUCE_DIAMONDS">官方金币消除</option>
<option value="OFFICAL_GOLD">官方赠送钻石</option>
<option value="CLEAR_USER_GOLD">用户钻石清除</option>
<!-- <option value="OFFICAL_RADISH">官方赠送萝卜</option>
<option value="ACTIVITY_RADISH">活动奖励萝卜</option> -->
</select>
@@ -85,14 +85,14 @@
<th style="width: 50px">头像</th>
<th style="width:200px;">耳伴号</th>
<th style="width:300px;">昵称</th>
<th>钻石</th>
<th>金币</th>
</tr></thead>
<tbody id="tbody">
</tbody>-->
</table>
</div>
</div>
<!--查看钻石赠送记录-->
<!--查看金币赠送记录-->
</section>
<!-- .content -->
</template>
@@ -212,7 +212,7 @@ export default {
return;
}
if (actualGold != parseInt(actualAmount * 1000)) {
$("#tipMsg").text("赠送钻石与充值金额兑换比例不正确!");
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
$("#tipModal").modal('show');
return;
}
@@ -302,12 +302,12 @@ export default {
var maxGold = parseInt(actualAmount * 1200);
var actualGold = parseInt(num);
if (actualGold < minGold || actualGold > maxGold) {
$("#tipMsg").text("赠送钻石与充值金额兑换比例不正确!");
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
$("#tipModal").modal('show');
return;
}
if (actualGold != parseInt(actualAmount * 1000)) {
$("#tipMsg").text("赠送钻石与充值金额兑换比例不正确!");
$("#tipMsg").text("赠送金币与充值金额兑换比例不正确!");
$("#tipModal").modal('show');
return;
}
@@ -371,9 +371,9 @@ function initUserInfoTable() {
},
{ field: 'erbanNo', title: '耳伴号', align: 'center', width: '5%', valign: 'middle' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%', valign: 'middle' },
{ field: 'goldNum', title: '金币', align: 'center', width: '5%', valign: 'middle' },
{ field: 'goldNum', title: '钻石', align: 'center', width: '5%', valign: 'middle' },
{ field: 'radishNum', title: '水晶', align: 'center', width: '5%', valign: 'middle' },
{ field: 'diamondsNum', title: '钻石', align: 'center', width: '5%', valign: 'middle' }
{ field: 'diamondsNum', title: '金币', align: 'center', width: '5%', valign: 'middle' }
],
cache: false,
striped: true,

View File

@@ -64,14 +64,14 @@
<th style="width: 50px">头像</th>
<th style="width:200px;">平台号</th>
<th style="width:300px;">昵称</th>
<th>金币</th>
<th>钻石</th>
</tr></thead>
<tbody id="tbody">
</tbody>-->
</table>
</div>
</div>
<!--查看金币赠送记录-->
<!--查看钻石赠送记录-->
</section>
<!-- .content -->
</template>

View File

@@ -125,11 +125,11 @@ export default {
return redEnvelopeStatusMap[val]
}
},
{ field: 'originalAmount', title: '钻石数量', align: 'center', width: '5%' },
{ field: 'originalAmount', title: '金币数量', align: 'center', width: '5%' },
{ field: 'commissionAmount', title: '手续费', align: 'center', width: '5%' },
{ field: 'getAmount', title: '领取钻石', align: 'center', width: '5%' },
{ field: 'getAmount', title: '领取金币', align: 'center', width: '5%' },
{ field: 'getNumDesc', title: '领取数量', align: 'center', width: '5%' },
{ field: 'backAmount', title: '退还钻石', align: 'center', width: '5%' },
{ field: 'backAmount', title: '退还金币', align: 'center', width: '5%' },
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '10%' },
{ field: 'roomErbanNo', title: '房间平台号', align: 'center', width: '5%' },
{

View File

@@ -107,7 +107,7 @@
:value="item.value"></el-option>
</el-select>
</div>
<div style="margin-bottom: 25px" v-if="resource.skipType == 1">
<div style="margin-bottom: 25px" v-if="resource.skipType == 1 || resource.skipType == 3">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">资源编码</span>
<el-input v-model="resource.code" style="width: 75%" class="input" :placeholder="请输入资源编码"></el-input>
</div>

View File

@@ -0,0 +1,453 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire" style="display: inline-block; margin-right: 20px">
<span class="demonstration">地区:</span>
<el-select v-model="inquire.partitionFlag" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.partitionFlag"
:label="item.label"
:value="item.partitionFlag"
>
</el-option>
</el-select>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="mgId" align="center" label="游戏ID" />
<el-table-column prop="name" align="center" label="游戏名称" />
<el-table-column prop="partitionFlag" align="center" label="所属地区">
<template v-slot="scope">{{
scope.row.partitionFlag == 1
? "英语区"
: scope.row.partitionFlag == 2
? "阿拉伯语区"
: scope.row.partitionFlag == 4
? "华语区"
: scope.row.partitionFlag == 3
? "英语区阿拉伯语区"
: scope.row.partitionFlag == 5
? "英语区华语区"
: scope.row.partitionFlag == 6
? "阿拉伯语区华语区"
: scope.row.partitionFlag == 7 || scope.row.partitionFlag == 0
? "英语区阿拉伯语区华语区"
: "无所属地区"
}}</template>
</el-table-column>
<el-table-column prop="isShow" align="center" label="是否展示">
<template v-slot="scope">{{
scope.row.isShow == 0 ? "" : scope.row.isShow == 1 ? "" : "/"
}}</template>
</el-table-column>
<!-- <el-table-column prop="roomFlag" align="center" label="展示房间类型">
<template v-slot="scope">{{
(scope.row.roomFlag & 1) != 0
? "游戏房"
: (scope.row.roomFlag & 2) != 0
? "牌照房"
: (scope.row.roomFlag & 4) != 0
? "普通房"
: "/"
}}</template>
</el-table-column> -->
<el-table-column prop="isAuthority" align="center" label="是否限制">
<template v-slot="scope">{{
scope.row.isAuthority == 0
? ""
: scope.row.isAuthority == 1
? ""
: "/"
}}</template>
</el-table-column>
<el-table-column prop="roleFlag" align="center" label="可开启角色">
<template v-slot="scope">{{
scope.row.roleFlag == 1
? "房主"
: scope.row.roleFlag == 2
? "管理员"
: scope.row.roleFlag == 3
? "房主管理员"
: "/"
}}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="ediClick(scope)"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
<!-- 游戏ID -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>游戏ID</span
>
<el-input
v-model="ediObj.gameId"
style="width: 75%"
class="input"
disabled
></el-input>
</div>
<!-- 游戏昵称 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>游戏昵称(中文)</span
>
<el-input
v-model="ediObj.gameNick"
style="width: 75%"
class="input"
disabled
></el-input>
</div>
<!-- 所属地区 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>所属地区</span
>
<el-checkbox-group v-model="ediObj.checkList">
<el-checkbox label="华语区"></el-checkbox>
<el-checkbox label="英语区"></el-checkbox>
<el-checkbox label="阿拉伯语区"></el-checkbox>
</el-checkbox-group>
</div>
<!-- 是否展示 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>是否展示</span
>
<el-select v-model="ediObj.value1" placeholder="请选择">
<el-option
v-for="item in ediObj.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<!-- 是否限制 -->
<div v-show="ediObj.value1" style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>是否限制</span
>
<el-select v-model="ediObj.value2" placeholder="请选择">
<el-option
v-for="item in ediObj.options2"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<!-- 可开启角色 -->
<div v-show="ediObj.value1" style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>可开启角色</span
>
<el-checkbox-group v-model="ediObj.checkList2">
<el-checkbox label="房主"></el-checkbox>
<el-checkbox label="管理员"></el-checkbox>
</el-checkbox-group>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button>
<el-button type="primary" @click="editDialogClick()">
确认
</el-button>
</span>
</template>
</el-dialog>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px; display: none"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import { mgList, save } from "@/api/gameAdmin/gameAdmin";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GameAdmin",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
partitionFlag: "",
time: "",
},
// 选择器
options: [
{
partitionFlag: 1,
label: "英语区",
},
{
partitionFlag: 2,
label: "阿拉伯语区",
},
{
partitionFlag: 4,
label: "华语区",
},
{
partitionFlag: "",
label: "全部",
},
],
// 表格
tableData: [],
// 控制编辑弹窗
editDialog: false,
editDiaData: {},
ediObj: {
gameId: "",
gameNick: "",
checkList: [],
value1: 0,
options: [
{
value: 1,
label: "是",
},
{
value: 0,
label: "否",
},
],
value2: 0,
options2: [
{
value: 1,
label: "是",
},
{
value: 0,
label: "否",
},
],
checkList2: [],
partitionFlag: null,
},
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
console.log(this.inquire);
mgList({ partitionFlag: this.inquire.partitionFlag }).then((res) => {
if (res.code == 200) {
this.tableData = res.data;
ElMessage({
showClose: true,
message: res.message,
type: "success",
});
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
this.loading = false;
}
});
},
// 编辑按钮
ediClick(scope) {
this.editDialog = true;
this.editDiaData = scope.row;
var obj = this.editDiaData;
this.ediObj.gameId = obj.mgIdStr;
this.ediObj.gameNick = JSON.parse(obj.name).zh;
this.ediObj.partitionFlag = obj.partitionFlag;
this.ediObj.checkList =
obj.partitionFlag == 1
? ["英语区"]
: obj.partitionFlag == 2
? ["阿拉伯语区"]
: obj.partitionFlag == 4
? ["华语区"]
: obj.partitionFlag == 3
? ["英语区", "阿拉伯语区"]
: obj.partitionFlag == 5
? ["英语区", "华语区"]
: obj.partitionFlag == 6
? ["阿拉伯语区", "华语区"]
: scope.row.partitionFlag == 7 ||
scope.row.partitionFlag == 0 ||
scope.row.partitionFlag == ""
? ["英语区", "阿拉伯语区", "华语区"]
: [];
this.ediObj.value1 = obj.isShow == false ? 0 : 1;
this.ediObj.value2 = obj.isAuthority;
this.ediObj.checkList2 =
obj.roleFlag == 1
? ["房主"]
: obj.roleFlag == 2
? ["管理员"]
: obj.roleFlag == 3
? ["房主", "管理员"]
: [];
console.log(obj);
},
// 确认编辑按钮
editDialogClick() {
var obj = {
mgIdStr: this.ediObj.gameId,
name: this.ediObj.gameNick,
partitionFlag: this.districtFun(1),
isShow: this.ediObj.value1,
isAuthority: this.ediObj.value2,
roleFlag: this.districtFun(2),
};
console.log(obj);
save(obj).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message,
type: "success",
});
this.editDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 计算数值
districtFun(type) {
console.log("ssss", this.ediObj);
var num = 0;
var district;
if (type == 1) {
district = {
华语区: 4,
英语区: 1,
阿拉伯语区: 2,
};
this.ediObj.checkList.forEach((res, i) => {
num += district[res];
});
} else {
district = {
房主: 1,
管理员: 2,
};
this.ediObj.checkList2.forEach((res, i) => {
num += district[res];
});
}
return num;
},
// 分页导航
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>

View File

@@ -84,15 +84,15 @@ export default {
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("赠送金币成功");
$("#tipMsg").text("赠送钻石成功");
$("#tipModal").modal('show');
} else {
$("#tipMsg").text("赠送金币出错errorCode: " + json.code);
$("#tipMsg").text("赠送钻石出错errorCode: " + json.code);
$("#tipModal").modal('show');
}
},
error: function (json) {
$("#tipMsg").text("赠送金币出错,网络出错");
$("#tipMsg").text("赠送钻石出错,网络出错");
$("#tipModal").modal('show');
}
});

View File

@@ -149,15 +149,15 @@ export default {
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("赠送金币成功");
$("#tipMsg").text("赠送钻石成功");
$("#tipModal").modal('show');
} else {
$("#tipMsg").text("赠送金币出错errorCode: " + json.code);
$("#tipMsg").text("赠送钻石出错errorCode: " + json.code);
$("#tipModal").modal('show');
}
},
error: function (json) {
$("#tipMsg").text("赠送金币出错,网络出错");
$("#tipMsg").text("赠送钻石出错,网络出错");
$("#tipModal").modal('show');
}
});

View File

@@ -28,7 +28,6 @@
<option value="0"></option>
<option value="1">牌照房</option>
<option value="2">非牌照房</option>
<option value="3">新秀房</option>
<option value="4">个播房</option>
</select>
</div>
@@ -84,7 +83,6 @@
<select id="permitType" name="permitType" class="form-control" data-btn-class="btn-warning">
<option value="1">牌照房</option>
<option value="2">普通房</option>
<option value="3">新秀房</option>
<option value="4">个播房</option>
</select>
<input type="hidden" name="uid" id="roomTypeUid" />
@@ -374,14 +372,16 @@ export default {
width: '5%',
formatter: function (val, row, index) {
switch (val) {
case 1:
return '竞拍房';
case 2:
return '轻聊房';
case 3:
return '轰趴房';
return '普通房间';
case 6:
return '个播房间';
case 7:
return '游戏房间';
case 8:
return '聚会房间';
case 9:
return '狂欢房间';
}
}
@@ -402,7 +402,7 @@ export default {
},
{
field: 'room.isPermitRoom',
title: '房间类型',
title: '牌照类型',
align: 'center',
valign: 'middle',
formatter: function (val, row, index) {
@@ -412,9 +412,6 @@ export default {
case 2:
return '非牌照房';
case 3:
return '新秀房';
case 4:
return '个播房';
@@ -603,13 +600,27 @@ export default {
$("#room-type-update").on('click', function () {
if ($('#roomPermitType').validationEngine('validate')) {
let roomUid = $('#roomTypeUid').val();
let permitType = $('#permitType').val();
let roomType = 3;
//牌照房
if (permitType == 1) {
// 普通房
} else if (permitType == 2) {
// 个播房
} else if (permitType == 4) {
roomType = 6;
}
$.ajax({
type: 'post',
url: '/admin/roomAdmin/resetRoom',
dataType: 'json',
data: {
uid: $('#roomTypeUid').val(),
permitType: $('#permitType').val(),
uid: roomUid,
roomType: roomType,
permitType: permitType,
},
success: function (res) {
if (res.code == 200) {
@@ -618,7 +629,7 @@ export default {
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("保存失败,错误码:" + res.code + ",错误信息:" + res.data);
$("#tipMsg").text("保存失败,错误码:" + res.code + ",错误信息:" + res.message);
$("#tipModal").modal('show');
}
}

View File

@@ -83,11 +83,11 @@
<span id="roomTitle"></span>
</div>
<div class="col-sm-6">
<span>收礼总钻石</span>
<span>收礼总金币</span>
<span id="totalDiamonds"></span>
</div>
<div class="col-sm-6">
<span>房间抽成钻石</span>
<span>房间抽成金币</span>
<span id="cutDiamonds"></span>
</div>
</div>
@@ -262,10 +262,10 @@ export default {
{ field: "num", title: "序号", align: "center", width: "5%" },
{ field: "erbanNo", title: "平台号", align: "center", width: "5%" },
{ field: "nick", title: "昵称", align: "center", width: "5%" },
{ field: "amount", title: "收礼总钻石", align: "center", width: "5%" },
{ field: "amount", title: "收礼总金币", align: "center", width: "5%" },
{
field: "cutDiamonds",
title: "房间抽成钻石",
title: "房间抽成金币",
align: "center",
width: "5%",
},

View File

@@ -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">&times;</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">&times;</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>

View 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">&times;</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>

View File

@@ -16,7 +16,7 @@
<button type="button" class="btn btn-primary" id="btnExport">导出</button>
</div>
<div class="col-sm-12">
当前库存 <span name="stock" id="stock" />钻石
当前库存 <span name="stock" id="stock" />金币
<button id="editStock" class="btn btn-default">编辑库存</button>
</div>
</div>
@@ -58,7 +58,7 @@
<h4 class="modal-title" id="editStockModalTitle">编辑库存</h4>
</div>
<div class="modal-body">
设置库存为 <input type="text" name="editedStock" id="editedStock" class="input-sm"> 钻石
设置库存为 <input type="text" name="editedStock" id="editedStock" class="input-sm"> 金币
</div>
<div class="modal-footer">
<h4 id="editStockModalFooter"></h4>
@@ -96,7 +96,7 @@ export default {
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'prodId', title: '档位', align: 'center', width: '5%' },
{ field: 'selectNoNum', title: '购买个数', align: 'center', width: '5%' },
{ field: 'costGoldNum', title: '花费总钻石数', align: 'center', width: '5%' },
{ field: 'costGoldNum', title: '花费总金币数', align: 'center', width: '5%' },
{ field: 'receiveGoldNum', title: '产出平台价值', align: 'center', width: '5%' },
{ field: 'createTime', title: '时间', align: 'center', width: '5%' }
],

View File

@@ -25,7 +25,7 @@
<input type="text" name="min_sign" class="form-control" id="maxShare" placeholder="请输入最大值">
</div>
<label for="erbanNo" class="col-sm-1 control-label">金币充值总额:</label>
<label for="erbanNo" class="col-sm-1 control-label">钻石充值总额:</label>
<div class="col-sm-2">
<input type="text" name="min_sign" class="form-control" id="minGold" placeholder="请输入最小值">--
<input type="text" name="min_sign" class="form-control" id="maxGold" placeholder="请输入最大值">
@@ -62,10 +62,10 @@ export default {
{ field: 'erbanNo', title: '用户ID', align: 'center', width: '5%', valign: 'middle' },
{ field: 'nick', title: '用户昵称', align: 'center', width: '15%', valign: 'middle' },
{ field: 'drawNum', title: '参与瓜分次数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'drawGoldNum', title: '瓜分金币总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'drawGoldNum', title: '瓜分钻石总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'signNum', title: '签到总天数', align: 'center', valign: 'middle', width: '10%' },
{ field: 'shareNum', title: '签到分享总次数', align: 'center', width: '5%', valign: 'middle' },
{ field: 'chargeNum', title: '金币充值总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'chargeNum', title: '钻石充值总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'whiteNum', title: '历史白名单次数', align: 'center', width: '5%', valign: 'middle' },
{
field: 'whiteStatus', title: '白名单状态', align: 'center', width: '15%', valign: 'middle',

View File

@@ -94,7 +94,7 @@
<label for="goldNum" class="col-sm-3 control-label">奖品:</label>
<div class="col-sm-8 control-label">
<input type="text" class="form-control validate[custom[integer]]"
style="float: left;width: 90%;" name="goldNum" id="goldNum" placeholder="请输入金币数量">金币
style="float: left;width: 90%;" name="goldNum" id="goldNum" placeholder="请输入钻石数量">钻石
</div>
</div>
@@ -180,7 +180,7 @@ export default {
{
field: 'goldNum', title: '奖品', align: 'center', width: '5%', valign: 'middle',
formatter: function (val, row, index) {
return val + "金币";
return val + "钻石";
}
},

View File

@@ -17,9 +17,9 @@
type="button" goldType="2" title="实际奖池默认金额">编辑</button></span>
</div>
<div class="col-sm-2 width30">
<span>展示奖池累计金币</span>
<span>展示奖池累计钻石</span>
<span><span class="dayShowGoldNum">0</span><button class="btn btn-primary editGoldNum marginLeft20"
type="button" goldType="3" title="展示奖池累计金币值">编辑</button></span>
type="button" goldType="3" title="展示奖池累计钻石值">编辑</button></span>
</div>
</div>
@@ -51,7 +51,7 @@
<span class="typeNum" whiteNum="0" ordinaryNum="0">0</span>
</div>
<div class="col-sm-2">
<span>总期望值(金币)</span>
<span>总期望值(钻石)</span>
<span class="dayDisplayGoldNum" whiteNum="0" ordinaryNum="0" ratioValue="0"
whiteRatioValue="0">0</span>
</div>
@@ -226,7 +226,7 @@ export default {
{
field: 'goldNum', title: '奖品', align: 'center', width: '5%', valign: 'middle',
formatter: function (val, row, index) {
return val + "金币";
return val + "钻石";
}
},
@@ -365,7 +365,7 @@ export default {
}
$opt.attr('value', res.data[i].id);
$opt.attr("class", res.data[i].level)
$opt.html(res.data[i].goldNum + "金币");
$opt.html(res.data[i].goldNum + "钻石");
}
if (j == 0) {
$('#goldPrize').val("");

View File

@@ -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,18 +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">
<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>查询
@@ -76,6 +113,8 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
import { buildSelectOption } from '@/utils/system-helper';
export default {
name: "UserDetailAdminView",
@@ -84,6 +123,7 @@ export default {
},
created() {
this.$nextTick(function () {
this.initPartition();
this.initData();
});
},
@@ -155,6 +195,10 @@ export default {
phone: $('#phone').val(),
startDate: $('#startDate').val(),
endDate: $('#endDate').val(),
partitionId: $('#partitionId').val(),
loginType: $('#loginType').val(),
isCharge: $('#isCharge').val(),
firstRoomErBanNo: $('#firstRoomErBanNo').val(),
};
return param;
},
@@ -169,6 +213,8 @@ export default {
},
columns: [
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle' },
{ 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%' },
{
@@ -201,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%' },
]
});
}
@@ -213,23 +263,41 @@ 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() {
getPartitionInfoList().then(res => {
let data = res.data;
buildSelectOption(
"#partitionId",
null,
[{
value: '',
text: '全部'
}].concat(data.map((v) => {
return {
value: v.id,
text: v.desc,
};
}))
);
});
},
},
};

View File

@@ -0,0 +1,176 @@
<template>
<section class="content">
<div class="box box-danger">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<section class="content">
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<button id="btnAdd" class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
</div>
</section><!-- .content -->
</div>
</div>
</section>
<div class="modal fade" id="editModal" 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">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">多语言信息</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<label for="key" class="col-sm-3 control-label">KEY:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="key" id="key"
v-model="i18nMessage.key" />
</div>
</div>
<div class="form-group">
<label for="zh" class="col-sm-3 control-label">华语:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="zh" id="zh"
v-model="i18nMessage.zh" />
</div>
</div>
<div class="form-group">
<label for="en" class="col-sm-3 control-label">英语:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="en" id="en"
v-model="i18nMessage.en" />
</div>
</div>
<div class="form-group">
<label for="ar" class="col-sm-3 control-label">阿语:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="ar" id="ar"
v-model="i18nMessage.ar" />
</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="save">保存</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { getI18nMessageList, saveI18nMessage } from '@/api/system/i18nMessage';
export default {
name: 'I18nMessageAdminView',
data() {
return {
columns: [
{ field: 'key', title: 'KEY', align: 'center', width: '15%' },
{ field: 'zh', title: '华语', align: 'center', width: '15%' },
{ field: 'en', title: '英语', align: 'center', width: '15%' },
{ field: 'ar', title: '阿语', align: 'center', width: '15%' },
{
field: 'key',
title: '操作',
align: 'center',
width: '20%',
formatter: function (val, row, index) {
return '<button class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">编辑</button>';
}
}
],
i18nMessages: [],
i18nMessage: {
key: '',
zh: '',
en: '',
ar: '',
},
};
},
created() {
this.init();
this.list();
},
methods: {
init() {
this.$nextTick(function () {
let $this = this;
$this.initTable();
$('#btnAdd').click(function () {
$this.add();
});
$('#save').click(function () {
$this.save();
});
$('#table').on('click', '.opt-edit', function () {
$this.edit(this);
});
});
},
initTable() {
let $this = this;
TableHelper.destroy('#table');
$('#table').bootstrapTable({
columns: $this.columns,
cache: false,
striped: true,
showRefresh: true,
search: true,
pageSize: 10,
pagination: true,
pageList: [1, 10, 20, 30, 50],
sidePagination: "client",
queryParamsType: "undefined",
toolbar: '#toolbar',
});
},
list() {
getI18nMessageList().then(res => {
this.i18nMessages = res.data;
TableHelper.load('#table', this.i18nMessages);
});
},
add() {
this.i18nMessage.key = '';
this.i18nMessage.zh = '';
this.i18nMessage.en = '';
this.i18nMessage.ar = '';
$('#editModal').modal('show');
},
edit(obj) {
const index = $(obj).data('index');
const record = TableHelper.getData('#table')[index];
this.i18nMessage.key = record.key;
this.i18nMessage.zh = record.zh;
this.i18nMessage.en = record.en;
this.i18nMessage.ar = record.ar;
$('#editModal').modal('show');
},
save() {
let $this = this;
saveI18nMessage($this.i18nMessage).then(res => {
$('#editModal').modal('hide');
$this.list();
});
},
},
}
</script>
<style scoped></style>

View File

@@ -92,7 +92,7 @@ export default {
{ field: 'roomErbanNo', title: '房主平台号', align: 'center', valign: 'middle', width: '10%' },
{ field: 'giftName', title: '礼物名称', align: 'center', valign: 'middle', width: '5%' },
{ field: 'giftNum', title: '礼物数量', align: 'center', valign: 'middle', width: '5%' },
{ field: 'amount', title: '钻石/水晶/金币', align: 'center', valign: 'middle', width: '5%' },
{ field: 'amount', title: '金币/水晶/钻石', align: 'center', valign: 'middle', width: '5%' },
{ field: 'country', title: '国家/地区', align: 'center', valign: 'middle', width: '5%' },
{ field: 'localCurrencyCode', title: '本地货币数', align: 'center', valign: 'middle', width: '5%' },
{ field: 'localAmount', title: '货币数', align: 'center', valign: 'middle', width: '5%' },

View File

@@ -0,0 +1,160 @@
<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-body">
<div id="toolbar">
<div class="col-sm-12">
<div class="pull-left">
<form id="searchForm"
class="col-sm-pull-12"
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"
class="form-control"
name="beginDate"
id="beginDate"
placeholder="必填"></div>
<label for="endDate"
class="col-sm-2 control-label">结束日期:</label>
<div class="col-sm-4"><input type="text"
class="form-control"
name="endDate"
id="endDate"
placeholder="必填"></div>
</div>
</form>
</div>
<div class="pull-right">
<button id="btnSearch"
class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExport"
class="btn btn-default">
<i class="glyphicon glyphicon-export"></i>导出
</button>
</div>
</div>
</div>
<!-- .content -->
<div id="table"></div>
</section>
</div>
</div>
</section>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "ChargeRecordArPartitionStatisticsView",
setup () {
return {};
},
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData () {
$(function () {
var chargeStart = $('#beginDate').datepicker({
format: 'yyyy-mm-dd',
autoclose: true
});
chargeStart.datepicker("setDate", new Date(new Date() - 7 * 24 * 60 * 60 * 1000))
var chargeEnd = $('#endDate').datepicker({
format: 'yyyy-mm-dd',
autoclose: true
});
chargeEnd.datepicker("setDate", new Date())
chargeStart.on('changeDate', function () {
var date = $('#beginDate').datepicker('getDate');
chargeEnd.datepicker('setStartDate', date);
});
chargeEnd.on('changeDate', function () {
var date = $('#endDate').datepicker('getDate');
chargeStart.datepicker('setEndDate', date);
});
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '14%' },
{ field: 'companyUsd', title: '对公打款美元', align: 'center', width: '14%' },
{ field: 'totalUsd', title: '总充值美元', align: 'center', width: '14%' },
],
cache: false,
striped: true,
showRefresh: false,
pagination: false,
search: false,
queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数
var param = {
partitionId: 2,
beginDate: $('#beginDate').val(),
endDate: $('#endDate').val()
};
return param;
},
toolbar: '#toolbar',
url: '/admin/chargeRecord/partitionDetail',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
// 导出EXCEL
$('#btnExport').on('click', function () {
if (!$('#beginDate').val() || !$('#endDate').val()) {
$("#tipMsg").text("请输入必填的信息");
$("#tipModal").modal('show');
return;
}
$("#searchForm").submit();
});
// 查询刷新
$('#btnSearch').on('click', function () {
if (!$('#beginDate').val() || !$('#endDate').val()) {
$("#tipMsg").text("请输入必填的信息");
$("#tipModal").modal('show');
return;
}
TableHelper.doRefresh('#table');
});
});
}
},
};
</script>
<style scoped></style>

View File

@@ -83,10 +83,10 @@ export default {
$('#table').bootstrapTable({
columns: [
{ field: 'country', title: '国家/地区', align: 'center', width: '25%' },
{ field: 'googleGold', title: 'google充值钻石', align: 'center', width: '25%' },
{ field: 'payermaxGold', title: 'payermax充值钻石', align: 'center', width: '25%' },
{ field: 'iosGold', title: 'ios充值钻石', align: 'center', width: '25%' },
{ field: 'totalGold', title: '总充值钻石', align: 'center', width: '25%' },
{ field: 'googleGold', title: 'google充值金币', align: 'center', width: '25%' },
{ field: 'payermaxGold', title: 'payermax充值金币', align: 'center', width: '25%' },
{ field: 'iosGold', title: 'ios充值金币', align: 'center', width: '25%' },
{ field: 'totalGold', title: '总充值金币', align: 'center', width: '25%' },
],
cache: false,
striped: true,

Some files were not shown because too many files have changed in this diff Show More