Compare commits

...

200 Commits

Author SHA1 Message Date
dragon
0e5857873c 修改页数 2024-12-16 18:05:34 +08:00
dragon
26d422ecda 新增永辉账单查询变动前后 2024-12-16 16:35:05 +08:00
dragon
ccf95bb81a 完成充值操作记录和充值代理导出 2024-12-12 18:02:32 +08:00
dragon
dd1fdb23c2 金币钻石暂存 2024-12-12 18:02:31 +08:00
dragon
84a26ed699 新增编辑奖励 2024-12-12 15:28:24 +08:00
dragon
f1f558e2b1 修改弹窗没有回显奖励图片问题 2024-12-12 13:53:06 +08:00
dragon
1b74d19c98 新增奖励图片Boom 2024-12-12 11:47:12 +08:00
dragon
aab2ff2794 优化boom 2024-12-12 11:47:10 +08:00
dragon
d750ae68d2 ‘完成boom后台’ 2024-12-12 11:47:08 +08:00
dragon
44ea9d3dcf boom暂存 2024-12-12 11:47:06 +08:00
dragon
2394d2ef60 boom暂存 2024-12-12 11:47:05 +08:00
dragon
91e295e3b7 个人幸运礼物数据分区改为读接口 2024-12-12 11:45:59 +08:00
khalil
47a67f4718 用户信息查询-保存-错误提醒 2024-12-11 15:12:22 +08:00
dragon
8c06877c67 新增操作人 2024-12-10 17:10:46 +08:00
dragon
be82b67bab 图片显示新公会申请 2024-12-10 15:22:22 +08:00
dragon
da9368018a 新增新公会申请 2024-12-09 14:05:05 +08:00
khalil
c39b992e31 送礼明细-后台-增加房间 2024-12-06 14:27:31 +08:00
khalil
1aa6a67531 充值h5-后台-支持同地区下不同货币收款 2024-12-05 15:20:40 +08:00
khalil
a2fa4a8fbd ss公会-后台-奖励发放-默认分区阿拉伯 2024-12-03 18:59:55 +08:00
dragon
4ab5768849 修复装扮商城状态不生效问题 2024-12-03 18:19:34 +08:00
dragon
fa2d3975d2 修改文案 2024-12-03 18:09:16 +08:00
dragon
0fdcf097c8 新增id 2024-12-03 16:00:26 +08:00
dragon
3d18a53f34 礼物管理土耳其编辑 2024-12-03 10:29:57 +08:00
dragon
627de18eaf 修改标题 2024-12-03 10:29:56 +08:00
dragon
8868f4204c 修改图片上传异常问题 2024-12-03 10:29:55 +08:00
dragon
38bffe26dc 修复资料卡编辑异常问题 2024-12-03 10:29:54 +08:00
dragon
8a548f9a69 重新定义全局报错异常 2024-12-03 10:29:53 +08:00
dragon
28b21d5c85 新增全局错误监听 2024-12-03 10:29:52 +08:00
dragon
dcdf89aa48 优化加载页面 2024-12-03 10:29:51 +08:00
dragon
b9dcae392a 隐藏清除svga容器 2024-12-03 10:29:50 +08:00
dragon
ae4b9d0493 个人主页资源管理用vue3写法 2024-12-03 10:29:49 +08:00
dragon
8789fdfc29 移除mp4测试是否有异常 2024-12-03 10:29:48 +08:00
dragon
0700880ade 测试不展示svga是否异常 2024-12-03 10:29:47 +08:00
dragon
7c042161bd 删除表头动效字段 2024-12-03 10:29:46 +08:00
dragon
431749ef28 测试svga是否还有异常 2024-12-03 10:29:45 +08:00
dragon
7bb0faad23 隐藏表格svga 2024-12-03 10:29:44 +08:00
dragon
59a2461f73 新增装扮商城支持mp4限制第二banner不能输入空格 2024-12-03 10:29:43 +08:00
dragon
223311f321 新增个人赠送记录撤回功能 2024-12-03 10:29:42 +08:00
dragon
02474473bf 完成装扮商城版本需求 2024-12-03 10:29:40 +08:00
dragon
559fea9300 版本功能 2024-12-03 10:29:39 +08:00
dragon
ed618598c2 版本暂存 2024-12-03 10:29:38 +08:00
dragon
7610a2768f 新增礼物管理全服通知-赛头像 2024-12-03 10:29:37 +08:00
khalil
eb7e9387c6 主播薪资-后台-分页 2024-12-02 21:56:50 +08:00
dragon
212498b6be 关闭初始化充值明细 2024-11-29 14:03:30 +08:00
dragon
369bf84a1f 修改退款货币排序 2024-11-29 11:47:50 +08:00
dragon
a79445b9e5 修改退款金额字段 2024-11-29 10:54:27 +08:00
dragon
fda1a6aacb 新增退款明细后台错误提示 2024-11-28 17:57:37 +08:00
dragon
e58363371c 修改渲染总额顺序 2024-11-28 15:31:30 +08:00
dragon
943518ce24 修改国家接口 2024-11-27 15:07:07 +08:00
dragon
df0093c4f8 修复充值明细异常问题 2024-11-27 14:51:02 +08:00
dragon
19d8ac3753 充值明细和转赠新增送统计字段 2024-11-27 14:51:01 +08:00
dragon
9486359ddf 新增用户退款查询 2024-11-27 14:50:59 +08:00
khalil
ef7c060545 送礼记录-后台-查询-修改结构 2024-11-26 14:37:58 +08:00
dragon
350c1b0e07 修复分区异常问题 2024-11-25 18:57:46 +08:00
dragon
f9a1f6a89c 完成幸运礼物优化 2024-11-20 15:59:20 +08:00
dragon
c7597a1b14 幸运礼物暂存 2024-11-20 15:59:19 +08:00
dragon
9b7d0132ef 幸运礼物暂存 2024-11-20 15:59:18 +08:00
khalil
0dcf3594bd 幸运24-记录-分区-增加土耳其区 2024-11-20 15:59:13 +08:00
khalil
e50a89fb0a 幸运24-记录-分区-增加土耳其区 2024-11-20 15:51:19 +08:00
khalil
49bd77ae3f 幸运24-分区-增加土耳其区 2024-11-20 11:58:17 +08:00
dragon
d9a6c2881b 修复财务管理-转赠统计时间筛选异常问题 2024-11-19 15:23:14 +08:00
dragon
46af95e834 公会信息异常问题 2024-11-15 18:53:59 +08:00
dragon
07543cca7d 修复页面异常问题 2024-11-15 18:36:50 +08:00
dragon
a75058d202 修复公会信息异常问题 2024-11-15 15:40:50 +08:00
dragon
9129e29bf3 新增公会默认选择地区 2024-11-15 11:55:56 +08:00
dragon
37df3b5db1 补齐新增土耳座驾资源管理 2024-11-14 15:54:12 +08:00
dragon
6e841bc675 完成土耳其化 2024-11-14 15:40:14 +08:00
dragon
286969cdd1 分区暂存 2024-11-14 15:40:12 +08:00
dragon
d3b48eea86 新增土耳其相关 2024-11-14 15:40:11 +08:00
dragon
9e6495d807 修复第二banner新增弹窗异常问题 2024-11-12 15:31:09 +08:00
dragon
836fb732c8 优化图片显示 2024-11-12 10:31:17 +08:00
dragon
9a151fbe05 新增第二banner无跳转接触必填限制 2024-11-12 10:31:16 +08:00
dragon
07e9a1e8b2 工会信息新增公会头像 2024-11-12 10:31:16 +08:00
dragon
d3c14383f8 新增无跳转类型-banner 2024-11-12 10:31:15 +08:00
dragon
5bba43c189 移除svga图片 2024-11-12 10:31:14 +08:00
dragon
74939056ce deBug未知报错 2024-11-12 10:31:13 +08:00
dragon
004bf0e03a 优化房间背景svga代码先后流程 2024-11-12 10:31:13 +08:00
dragon
b467577792 完成第二banner 2024-11-12 10:31:12 +08:00
dragon
99a1c89643 修复appui配置异常问题 2024-11-12 10:31:11 +08:00
dragon
b043d8c06e 修复报错问题 2024-11-12 10:31:10 +08:00
dragon
fb007e763c 完成房间背景和首页ui配置 2024-11-12 10:31:10 +08:00
khalil
2fddf66a5d 房间流水-后台-listByPage改list 2024-11-11 22:05:20 +08:00
khalil
75bcd232a4 banner-后台-跳转类型 2024-11-04 18:58:16 +08:00
dragon
ae0a3507a6 钻石流水显示时分秒+转赠类型新增web-api金币 2024-10-30 17:46:48 +08:00
khalil
31d6efd60e 头像-房间-上传 2024-10-28 14:20:59 +08:00
khalil
70993f1b4d 头像-房间-列表增加审核状态 2024-10-25 17:04:58 +08:00
khalil
e4fb991a98 寻爱-后台-奖品取消分区 2024-10-25 17:04:53 +08:00
khalil
b84438c19d 寻爱-后台-分区 2024-10-25 17:04:41 +08:00
dragon
ed9178a1d0 修复详情数据异常问题 2024-10-24 17:51:34 +08:00
dragon
78b3a70d5f 修复数据异常问题 2024-10-24 17:12:01 +08:00
dragon
baad132403 完成小游戏后台 2024-10-23 11:29:00 +08:00
dragon
c865eae77b 修复时间戳默认转换值 2024-10-18 17:00:48 +08:00
dragon
5d296f8086 新增充值搜索和修改usd 2024-10-18 15:23:37 +08:00
dragon
3f905c2b1e 修复查看详情状态异常问题 2024-10-17 18:01:13 +08:00
dragon
7add80a5ae 完善接口联调 2024-10-17 17:11:20 +08:00
dragon
0d6019e9f1 取消座驾动画限制 2024-10-15 18:21:26 +08:00
dragon
11ceac5d4f 修复字段 2024-10-12 23:55:07 +08:00
dragon
289aa70af3 修改介绍文案 2024-10-12 18:58:28 +08:00
dragon
c8b283b0d8 修改文案 2024-10-12 18:05:09 +08:00
dragon
9bec1ba472 新增幸运礼物-个人数据汇总-赠送倍数奖励按钮 2024-10-12 18:02:57 +08:00
khalil
2c64fc1443 靓号-后台-查询-分区 2024-10-12 14:57:48 +08:00
khalil
097dea0693 靓号-后台-上传 2024-10-11 17:59:57 +08:00
khalil
6abde0b9ec 靓号-后台-修改 2024-10-10 19:55:40 +08:00
dragon
c99ee00ca8 修复钻石流水分页问题 2024-09-30 10:31:17 +08:00
dragon
c3f70e3c9b 移除自动加载钻石流水数据 2024-09-29 17:52:15 +08:00
dragon
1e4002a4fa 修复时间选择器bug 2024-09-29 17:38:23 +08:00
dragon
090447e1ce 优化时间选择器 2024-09-29 16:11:25 +08:00
dragon
c847b94994 暂存官方提心&完成钻石流水统计 2024-09-29 13:51:11 +08:00
dragon
f91dc1cf62 公会暂存 2024-09-26 11:34:46 +08:00
dragon
4d5fb57ddf 新增定制礼物 2024-09-25 20:10:30 +08:00
khalil
b174c9818e 充值统计-增加startPay 2024-09-23 22:14:19 +08:00
dragon
c6f979c094 新增赠送成功toast 2024-09-20 14:18:20 +08:00
dragon
475ee45a44 新增对比值M 2024-09-20 11:43:40 +08:00
dragon
c4209d6c24 新增基础配置 2024-09-19 19:12:43 +08:00
dragon
e77165a1d7 优化超级幸运礼物下拉框 2024-09-18 11:06:59 +08:00
dragon
8a2c1381e9 修改标题 2024-09-14 23:46:27 +08:00
dragon
e062c2afa3 修复基础设置异常 2024-09-14 23:29:38 +08:00
dragon
591495edcc 新增幸运礼物和cp 2024-09-14 22:45:54 +08:00
dragon
25e828f7e4 修复显示异常 2024-09-14 22:36:00 +08:00
dragon
1ab319d372 修复总览没数据问题 2024-09-14 22:07:01 +08:00
dragon
9b6ee433d7 修复样式异常 2024-09-14 20:12:04 +08:00
dragon
9c4aa4efb9 完善幸运礼物 2024-09-14 19:03:04 +08:00
dragon
f228aad967 幸运礼物24暂存 2024-09-14 16:10:09 +08:00
khalil
e47b57f760 登录-取消验证码 2024-09-11 22:31:08 +08:00
dragon
4e3bbd9209 修复分页异常问题 2024-09-10 15:03:55 +08:00
dragon
9f9e7ca81c 完善靓号后台以及新增vip赠送天数 2024-09-10 14:41:28 +08:00
dragon
493ad80d1c 修复报错异常 2024-09-09 10:44:30 +08:00
khalil
a71144b735 公会-公会-增加操作人
(cherry picked from commit 8aeb9caa0dcc5bf2fd250af28c2f025bf210e344)
2024-09-06 20:39:47 +08:00
khalil
ebf22c8012 公会-成员-增加操作人 2024-09-06 20:09:09 +08:00
dragon
69dc2de281 新增ss工会后台,靓号暂存 2024-09-06 16:23:25 +08:00
khalil
520e4e4c58 公会-展示公会id
(cherry picked from commit 81f7ccc80fe709fa7d7c3c55510145e3e0eaa53a)
2024-09-05 20:00:49 +08:00
khalil
faa779555c 后台-官方赠送金币-校验
(cherry picked from commit af8bc4185ec3d6279d6f5f2096fa3dd2e0174b59)
2024-09-05 18:10:20 +08:00
khalil
a62f2a5eca 后台-官方赠送金币-调整金币与美元比例 2024-09-04 22:30:54 +08:00
dragon
65cf443cb4 活动奖品配置新增类型 2024-09-03 17:24:41 +08:00
dragon
9f2b89d0be 处理时间格式 2024-08-30 18:50:20 +08:00
dragon
b362a25028 修改传参格式 2024-08-30 18:24:03 +08:00
dragon
3c909bdb97 新增添加失败toast 2024-08-30 15:10:21 +08:00
dragon
d79917ecca 判空处理 2024-08-27 13:59:41 +08:00
dragon
b5de5e5125 修复bug 2024-08-26 18:59:38 +08:00
dragon
8cf9dfa2bc 新增新公会 2024-08-26 15:01:17 +08:00
dragon
fa41f55a23 完善工会信息 2024-08-06 16:39:48 +08:00
dragon
c6487e78bb 新增礼物管理礼物类型 2024-08-06 11:26:57 +08:00
khalil
de76dc8f56 用户钻石清除-批量传参 2024-08-05 20:44:23 +08:00
dragon
1e67efafe7 新增礼物面板管理 2024-08-05 15:29:14 +08:00
dragon
f31dcae058 礼物面板管理暂存 2024-08-02 11:00:41 +08:00
dragon
aa74f2ed36 新增代理工资 2024-08-01 19:02:35 +08:00
dragon
e4cbd9cc35 新增会长id以及导出-家族 2024-08-01 17:42:58 +08:00
dragon
775b8abc93 修复bug-公会 2024-07-31 10:23:34 +08:00
dragon
e1fb48d900 完善工会信息 2024-07-31 10:23:33 +08:00
khalil
93aded746e 充值h5-优化编辑
(cherry picked from commit 9a45da5db2ef34daba843c8e07670a238be237f1)
2024-07-25 21:58:17 +08:00
khalil
af1d94c1f2 游戏陪玩用户-保存-兼容游戏未配置 2024-07-19 12:14:51 +08:00
khalil
89c27b28e7 游戏陪玩用户-编辑-兼容游戏未配置 2024-07-19 11:56:57 +08:00
dragon
f34a7b9430 删除v-if判断条件 2024-07-18 16:56:11 +08:00
dragon
fbd4fdcbd1 勋章请求排序 2024-07-18 16:43:13 +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
138 changed files with 37863 additions and 10650 deletions

View File

@@ -17,5 +17,6 @@ module.exports = {
'no-unused-vars': 'off',
'no-useless-escape': 'off',
'no-control-regex': 'off',
'no-extra-semi': 'off',
}
}

138
package-lock.json generated
View File

@@ -14,6 +14,7 @@
"bootstrap": "^3.3.5",
"core-js": "^3.8.3",
"element-plus": "^2.3.14",
"file-saver": "^2.0.5",
"font-awesome": "^4.6.3",
"ionicons": "^2.0.1",
"jquery": "^2.2.0",
@@ -21,10 +22,14 @@
"knockout": "^3.5.1",
"less": "^4.2.0",
"less-loader": "^11.1.3",
"moment-timezone": "^0.5.45",
"node-sass": "^9.0.0",
"popper.js": "^1.16.1",
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"svgaplayerweb": "^2.3.2",
"unplugin-element-plus": "^0.8.0",
"vue-clipboard2": "^0.3.3",
"vue-router": "^4.0.3",
"vuex": "^4.0.0",
"xlsx": "^0.18.5"
@@ -39,6 +44,7 @@
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"script-loader": "^0.7.2",
"unplugin-auto-import": "^0.16.7",
"unplugin-vue-components": "^0.25.2",
"vue": "^3.2.13",
@@ -2193,7 +2199,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",
@@ -4435,9 +4440,23 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001546",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001546.tgz",
"integrity": "sha512-zvtSJwuQFpewSyRrI3AsftF6rM0X80mZkChIt1spBGEvRglCrjTniXvinc8JKRoqTwXAgvqTImaN9igfSMtUBw=="
"version": "1.0.30001651",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz",
"integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
},
"node_modules/case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",
@@ -4652,6 +4671,16 @@
"node": ">=6"
}
},
"node_modules/clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/clipboardy": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/clipboardy/-/clipboardy-2.3.0.tgz",
@@ -5547,6 +5576,11 @@
"node": ">=0.4.0"
}
},
"node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
@@ -6685,6 +6719,11 @@
"node": "^10.12.0 || >=12.0.0"
}
},
"node_modules/file-saver": {
"version": "2.0.5",
"resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
@@ -7082,6 +7121,14 @@
"node": "*"
}
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"dependencies": {
"delegate": "^3.1.2"
}
},
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz",
@@ -8929,6 +8976,25 @@
"integrity": "sha512-23g5BFj4zdQL/b6tor7Ji+QY4pEfNH784BMslY9Qb0UnJWRAt+lQGLYmRaM0KDBwIG23ffEBELhZDP2rhi9f/Q==",
"dev": true
},
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"engines": {
"node": "*"
}
},
"node_modules/moment-timezone": {
"version": "0.5.45",
"resolved": "https://registry.npmmirror.com/moment-timezone/-/moment-timezone-0.5.45.tgz",
"integrity": "sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==",
"dependencies": {
"moment": "^2.29.4"
},
"engines": {
"node": "*"
}
},
"node_modules/mrmime": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-1.0.1.tgz",
@@ -10790,6 +10856,12 @@
"node": ">= 0.8"
}
},
"node_modules/raw-loader": {
"version": "0.5.1",
"resolved": "https://registry.npmmirror.com/raw-loader/-/raw-loader-0.5.1.tgz",
"integrity": "sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q==",
"dev": true
},
"node_modules/read-pkg": {
"version": "5.2.0",
"resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz",
@@ -11238,6 +11310,15 @@
"node": ">= 8.9.0"
}
},
"node_modules/script-loader": {
"version": "0.7.2",
"resolved": "https://registry.npmmirror.com/script-loader/-/script-loader-0.7.2.tgz",
"integrity": "sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA==",
"dev": true,
"dependencies": {
"raw-loader": "~0.5.1"
}
},
"node_modules/scss-tokenizer": {
"version": "0.4.3",
"resolved": "https://registry.npmmirror.com/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz",
@@ -11261,6 +11342,11 @@
"integrity": "sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==",
"dev": true
},
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"node_modules/select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/select-hose/-/select-hose-2.0.0.tgz",
@@ -11905,6 +11991,11 @@
"integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==",
"dev": true
},
"node_modules/svgaplayerweb": {
"version": "2.3.2",
"resolved": "https://registry.npmmirror.com/svgaplayerweb/-/svgaplayerweb-2.3.2.tgz",
"integrity": "sha512-QuTvNIgy3W6Mi4h74SczEHUtAwb8m3ax7Ai7xRLUuN6hjJh49RGtWOWq1IuF2I7ECcl0HAYn8FcTn99UDz9UiQ=="
},
"node_modules/svgo": {
"version": "2.8.0",
"resolved": "https://registry.npmmirror.com/svgo/-/svgo-2.8.0.tgz",
@@ -12142,6 +12233,11 @@
"integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
"dev": true
},
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"node_modules/to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -12376,7 +12472,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 +12543,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 +12644,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",
@@ -12618,6 +12734,14 @@
"@vue/shared": "3.2.13"
}
},
"node_modules/vue-clipboard2": {
"version": "0.3.3",
"resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
"dependencies": {
"clipboard": "^2.0.0"
}
},
"node_modules/vue-eslint-parser": {
"version": "8.3.0",
"resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",

View File

@@ -14,6 +14,7 @@
"bootstrap": "^3.3.5",
"core-js": "^3.8.3",
"element-plus": "^2.3.14",
"file-saver": "^2.0.5",
"font-awesome": "^4.6.3",
"ionicons": "^2.0.1",
"jquery": "^2.2.0",
@@ -21,10 +22,14 @@
"knockout": "^3.5.1",
"less": "^4.2.0",
"less-loader": "^11.1.3",
"moment-timezone": "^0.5.45",
"node-sass": "^9.0.0",
"popper.js": "^1.16.1",
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"svgaplayerweb": "^2.3.2",
"unplugin-element-plus": "^0.8.0",
"vue-clipboard2": "^0.3.3",
"vue-router": "^4.0.3",
"vuex": "^4.0.0",
"xlsx": "^0.18.5"
@@ -39,6 +44,7 @@
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"script-loader": "^0.7.2",
"unplugin-auto-import": "^0.16.7",
"unplugin-vue-components": "^0.25.2",
"vue": "^3.2.13",

View File

@@ -0,0 +1,19 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
// 列表
export const list = query => {
return request({
url: '/giftPanelTab/list',
method: 'get',
params: query
});
};
// 保存
export const update = query => {
return request({
url: '/giftPanelTab/update',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,42 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 周期选项下拉框
export const cycleDateList = query => {
return request({
url: '/admin/ssGuild/cycleDateList',
method: 'get',
params: query
});
};
// SS公会列表
export const list = query => {
return request({
url: '/admin/ssGuild/list',
method: 'get',
params: query
});
};
// 发送金币&批量发送
export const sendGold = query => {
return request({
url: '/admin/ssGuild/sendGold',
method: 'post',
params: query
});
};
// 导出
// export const ssGuildExport = query => {
// return request({
// url: `/admin/ssGuild/export`,
// method: 'post',
// params: query,
// responseType: 'blob'
// });
// };
// 导出-公会信息
export const ssGuildExport = query => {
window.location.href = `/admin/ssGuild/export?${genQueryParam(query)}`;
return;
};

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

166
src/api/boom/boom.js Normal file
View File

@@ -0,0 +1,166 @@
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 pageOperateRecord = query => {
return request({
url: '/admin/guild/manage/pageOperateRecord',
method: 'get',
params: query
});
};
// 查询公会信息
export const pageFamily = query => {
return request({
url: '/admin/guild/manage/pageGuild',
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/guild/manage/create',
method: 'post',
params: query
});
};
// 删除公会信息
export const dismiss = query => {
return request({
url: '/admin/guild/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/guild/manage/update',
method: 'post',
params: query
});
};
// 导出-公会信息
export const exportInfo = query => {
window.location.href = `/admin/guild/manage/exportGuild?${genQueryParam(query)}`;
return;
};
// 成员信息-弹窗详情
export const manageListFamilyMember = query => {
return request({
url: '/admin/guild/manage/listGuildMember',
method: 'get',
params: query
});
};
// 成员信息-新增成员
export const addMember = query => {
return request({
url: '/admin/guild/manage/addMember',
method: 'post',
params: query
});
};
// 成员信息-设置管理员
export const setManager = query => {
return request({
url: '/admin/guild/manage/setManager',
method: 'post',
params: query
});
};
// 成员信息-删除管理员
export const removeMember = query => {
return request({
url: '/admin/guild/manage/removeMember',
method: 'post',
params: query
});
};
// ========================================================Boom活动等级配置================================================
// Boom活动等级配置-列表
export const levelList = query => {
return request({
url: '/room/boom/level/list',
method: 'get',
params: query
});
};
// Boom活动等级配置-弹窗列表详情
export const awardList = query => {
return request({
url: '/room/boom/level/award/list',
method: 'get',
params: query
});
};
// Boom活动等级配置-弹窗列表删除详情
export const awardDel = query => {
return request({
url: '/room/boom/level/award/del',
method: 'get',
params: query
});
};
// Boom活动等级配置-编辑
export const levelUpdate = query => {
return request({
url: '/room/boom/level/update',
method: 'put',
data: query
});
};
// Boom活动等级配置-弹窗编辑
export const awardUpdate = query => {
return request({
url: '/room/boom/level/award/update',
method: 'put',
data: query
});
};
// ========================================================Boom数据后台================================================
// Boom活动等级配置-数据后台列表
export const recordList = query => {
return request({
url: '/room/boom/award/record/list',
method: 'get',
params: query
});
};
// Boom活动等级配置-数据后台明细列表
export const detailList = query => {
return request({
url: '/room/boom/award/record/detail/list',
method: 'get',
params: query
});
};
// 导出-Boom活动等级配置
export const recordExport = query => {
window.location.href = `/room/boom/award/record/export?${genQueryParam(query)}`;
return;
};

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,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,38 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 获取游戏列表
export const sysConfKey = query => {
return request({
url: '/admin/sysConf/key',
method: 'get',
params: query
});
};
// 获取列表
export const statisPage = query => {
return request({
url: '/admin/miniGame/leadercc/statis/page',
method: 'get',
params: query
});
};
// 获取详情列表
export const detailPage = query => {
return request({
url: '/admin/miniGame/leadercc/statis/detailPage',
method: 'get',
params: query
});
};
// 导出
export const exportForMiniGame = query => {
window.location.href = `/admin/miniGame/leadercc/statis/exportForMiniGame?${genQueryParam(query)}`;
return;
};
// 导出弹窗
export const statisExport = query => {
window.location.href = `/admin/miniGame/leadercc/statis/export?${genQueryParam(query)}`;
return;
};

View File

@@ -0,0 +1,79 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 奖池拉框
export const listType = query => {
return request({
url: '/admin/lucky24/pool/listType',
method: 'get',
params: query
});
};
// 池子列表
export const list = query => {
return request({
url: '/admin/lucky24/pool/list',
method: 'get',
params: query
});
};
// 基础配置
export const getConfig = query => {
return request({
url: '/admin/lucky24/config/getConfig',
method: 'get',
params: query
});
};
// 基础配置-修改
export const updateSet = query => {
return request({
headers: { "Content-Type": 'application/json;charset=UTF-8' },
url: '/admin/lucky24/config/update',
method: 'post',
data: query
});
};
// 个人数据
export const personal = query => {
return request({
url: '/admin/lucky24/record/personal',
method: 'get',
params: query
});
};
// 汇总
export const platform = query => {
return request({
url: '/admin/lucky24/record/platform',
method: 'get',
params: query
});
};
// 保存池子
export const save = query => {
return request({
headers: { "Content-Type": 'application/json;charset=UTF-8' },
url: '/admin/lucky24/pool/save',
method: 'post',
data: query
});
};
// 赠送用户
export const updateUserMulti = query => {
return request({
url: '/admin/lucky24/config/updateUserMulti',
method: 'post',
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

@@ -21,3 +21,8 @@ export const miniGameForBaiShunExport = query => {
window.location.href = `/admin/miniGame/baiShun/statis/export?${genQueryParam(query)}`;
return;
};
export const miniGameForBaiShunExportAll = query => {
window.location.href = `/admin/miniGame/baiShun/statis/exportForMiniGame?${genQueryParam(query)}`;
return;
};

View File

@@ -1,6 +1,15 @@
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 pageOperateRecord = query => {
return request({
@@ -54,3 +63,219 @@ export const update = query => {
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 savePayAccount = query => {
return request({
url: '/admin/family/manage/savePayAccount',
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;
};
// 工资梯度-列表
export const manageList = query => {
return request({
url: '/admin/family/manage/list',
method: 'get',
params: query
});
};
// 工资梯度-新增
export const manageAdd = query => {
return request({
url: '/admin/family/manage/add',
method: 'post',
params: query
});
};
// 工资梯度-删除
export const manageDelete = query => {
return request({
url: '/admin/family/manage/delete',
method: 'post',
params: query
});
};
// 工会统计-列表
export const statPageFamily = query => {
return request({
url: '/admin/family/wage/stat/pageFamily',
method: 'get',
params: query
});
};
// 工会统计-单个工会详情
export const listFamilyMember = query => {
return request({
url: '/admin/family/wage/stat/listFamilyMember',
method: 'get',
params: query
});
};
// 工会统计-单个工会导出
export const statExportFamilyMember = query => {
window.location.href = `/admin/family/wage/stat/exportFamilyMember?${genQueryParam(query)}`;
return;
};
// 工会统计-每日工会详情
export const listFamilyMemberDaily = query => {
return request({
url: '/admin/family/wage/stat/listFamilyMemberDaily',
method: 'get',
params: query
});
};
// 工会统计-单每日会导出
export const exportFamilyMemberDaily = query => {
window.location.href = `/admin/family/wage/stat/exportFamilyMemberDaily?${genQueryParam(query)}`;
return;
};
// 工会统计-导出公会工资统计
export const statExportFamily = query => {
window.location.href = `/admin/family/wage/stat/exportFamily?${genQueryParam(query)}`;
return;
};
// 工会统计-导出家族流水
export const incomeExportFamilys = query => {
window.location.href = `/admin/family/income/exportFamily?${genQueryParam(query)}`;
return;
};
// 金币流水-列表
export const incomePageFamily = query => {
return request({
url: '/admin/family/income/pageFamily',
method: 'get',
params: query
});
};
// 金币流水-详情
export const incomeListFamilyMember = query => {
return request({
url: '/admin/family/income/listFamilyMember',
method: 'get',
params: query
});
};
// 金币流水-导出成员流水信息
export const incomeExportFamily = query => {
window.location.href = `/admin/family/income/exportFamilyMember?${genQueryParam(query)}`;
return;
};
// 成员信息-弹窗详情
export const manageListFamilyMember = query => {
return request({
url: '/admin/family/manage/listFamilyMember',
method: 'get',
params: query
});
};
// 成员信息-新增成员
export const addMember = query => {
return request({
url: '/admin/family/manage/addMember',
method: 'post',
params: query
});
};
// 成员信息-设置管理员
export const setManager = query => {
return request({
url: '/admin/family/manage/setManager',
method: 'post',
params: query
});
};
// 成员信息-删除管理员
export const removeMember = query => {
return request({
url: '/admin/family/manage/removeMember',
method: 'post',
params: query
});
};
// -审核列表
export const guildApplyList = query => {
return request({
url: '/admin/guildApply/list',
method: 'get',
params: query
});
};
// -审核操作
export const guildApplyAudit = query => {
return request({
url: '/admin/guildApply/audit',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,103 @@
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 pageOperateRecord = query => {
return request({
url: '/admin/guild/manage/pageOperateRecord',
method: 'get',
params: query
});
};
// 查询公会信息
export const pageFamily = query => {
return request({
url: '/admin/guild/manage/pageGuild',
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/guild/manage/create',
method: 'post',
params: query
});
};
// 删除公会信息
export const dismiss = query => {
return request({
url: '/admin/guild/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/guild/manage/update',
method: 'post',
params: query
});
};
// 导出-公会信息
export const exportInfo = query => {
window.location.href = `/admin/guild/manage/exportGuild?${genQueryParam(query)}`;
return;
};
// 成员信息-弹窗详情
export const manageListFamilyMember = query => {
return request({
url: '/admin/guild/manage/listGuildMember',
method: 'get',
params: query
});
};
// 成员信息-新增成员
export const addMember = query => {
return request({
url: '/admin/guild/manage/addMember',
method: 'post',
params: query
});
};
// 成员信息-设置管理员
export const setManager = query => {
return request({
url: '/admin/guild/manage/setManager',
method: 'post',
params: query
});
};
// 成员信息-删除管理员
export const removeMember = query => {
return request({
url: '/admin/guild/manage/removeMember',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,52 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 地区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 个人主页资源管理列表
export const pesonalBackgroundListByPage = query => {
return request({
url: '/admin/pesonalBackground/listByPage',
method: 'get',
params: query
});
};
// 个人主页资源管理赠送
export const pesonalBackgroundListSend = query => {
return request({
url: '/admin/pesonalBackground/send',
method: 'get',
params: query
});
};
// 个人主页资源管理保存
export const pesonalBackgroundSaveOrUpdate = query => {
return request({
url: '/admin/pesonalBackground/saveOrUpdate',
method: 'post',
params: query
});
};
// 个人主页记录管理&个人赠送记录
export const pesonalBackgroundListRecordByPage = query => {
return request({
url: '/admin/pesonalBackground/listRecordByPage',
method: 'get',
params: query
});
};
// 个人赠送记录撤回
export const pesonalBackgroundListRecordRecoveryPersonalBackground = query => {
return request({
url: '/admin/pesonalBackground/recoveryPersonalBackground',
method: 'get',
params: query
});
};

48
src/api/refund/refund.js Normal file
View File

@@ -0,0 +1,48 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// 活动配置 相关接口(一级菜单:活动配置)
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 国家
export const regionInfoList = query => {
return request({
url: '/admin/regionInfo/list',
method: 'get',
params: query
});
};
// 列表
export const refundList = query => {
return request({
url: '/admin/chargeRecord/refundList',
method: 'get',
params: query
});
};
// 导出
export const refundExport = query => {
window.location.href = `/admin/chargeRecord/refundExport?${genQueryParam(query)}`;
return;
};
// ======================================金币钻石操作记录==================================
// 列表
export const goldcoinRecordAll = query => {
return request({
url: '/admin/goldcoin/recordAll',
method: 'get',
params: query
});
};
// 导出
export const recordAllExport = query => {
window.location.href = `/admin/goldcoin/recordAllExport?${genQueryParam(query)}`;
return;
};

View File

@@ -0,0 +1,191 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// 活动配置 相关接口(一级菜单:活动配置)
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 充值代理列表导出
export const chargeAgentExport = query => {
window.location.href = `/anchorSalaryBill/chargeAgent/export?${genQueryParam(query)}`;
return;
};
// 获取 周期列表
export const getDateCycleList = query => {
return request({
url: '/anchorSalaryBill/dateCycle/list',
method: 'get',
params: query
});
};
// 获取 公会钻石薪资流水统计 列表
export const getAgencyDiamondFlow = query => {
return request({
url: '/agency/diamond/flow/list',
method: 'get',
params: query
});
};
// 公会钻石薪资流水统计 导出
// export const agencyDiamondFlowExport = query => {
// return request({
// url: `/agency/diamond/flow/export`,
// method: 'post',
// params: query,
// responseType: 'blob'
// });
// };
export const agencyDiamondFlowExport = query => {
window.location.href = `/agency/diamond/flow/export?${genQueryParam(query)}`;
return;
};
// 主播薪资操作(不用分区)
export const getAnchorSalaryBill = query => {
return request({
url: '/anchorSalaryBill/anchorSummary/list',
method: 'get',
params: query
});
};
// salaryType 1钻石兑换薪资明细 2 薪资转赠充值代理 明细 3薪资转增公会长明细 4官方提现 6 薪资兑换金币明细
export const anchorSalaryBillDetail = query => {
return request({
url: '/anchorSalaryBill/detail/list',
method: 'get',
params: query
});
};
// 充值代理转增薪资
export const chargeAgentList = query => {
return request({
url: '/anchorSalaryBill/chargeAgent/list',
method: 'get',
params: query
});
};
// 充值代理转增薪资 总值
export const chargeAgentSum = query => {
return request({
url: '/anchorSalaryBill/chargeAgent/sum',
method: 'get',
params: query
});
};
// 官方提现记录 列表
export const agencyWithdrawList = query => {
return request({
url: '/agencyWithdrawExamine/list',
method: 'get',
params: query
});
};
// 官方提现记录 导出
export const agencyWithdrawExamineExport = query => {
return request({
url: `/agencyWithdrawExamine/export`,
method: 'post',
params: query,
responseType: 'blob'
});
};
// 官方提现记录 结算
// export const agencyWithdrawSet = query => {
// return request({
// url: '/agencyWithdrawExamine/settle',
// method: 'post',
// params: query
// });
// };
export const agencyWithdrawSet = query => {
return request({
url: '/agencyWithdrawExamine/batchSettle',
method: 'post',
params: query
});
};
// 官方提现记录 批量结算
export const agencyWithdrawBatchSet = query => {
return request({
url: '/agencyWithdrawExamine/batchSettle',
method: 'post',
params: query
});
};
// 官方提现记录 批量驳回
export const batchReject = query => {
return request({
url: '/agencyWithdrawExamine/batchReject',
method: 'post',
params: query
});
};
// 公会开业数据统计
export const agencyOpenList = query => {
return request({
url: '/agency/open/list',
method: 'get',
params: query
});
};
// 公会开业数据 详情
export const agencyOpenDetail = query => {
return request({
url: '/agency/open/detail/list',
method: 'get',
params: query
});
};
// 公会优秀主播数据统计
export const excellentAnchorList = query => {
return request({
url: '/agency/open/excellentAnchor/list',
method: 'get',
params: query
});
};
// 公会优秀主播数据统计
export const excellentAnchorDetail = query => {
return request({
url: '/agency/open/excellentAnchor/detail/list',
method: 'get',
params: query
});
};
// 官方提现-国家
export const adminCountry = query => {
return request({
url: '/admin/country/list',
method: 'get',
params: query
});
};
// =====================================钻石充值流水=======================================
// 查询
export const diamondStatistics = query => {
return request({
url: '/admin/guild/diamondStatistics',
method: 'get',
params: query
});
};
// 导出
export const diamondStatisticsExport = query => {
window.location.href = `/admin/guild/diamondStatistics/export?${genQueryParam(query)}`;
return;
};

View File

@@ -0,0 +1,43 @@
import request from '@/utils/request';
import qs from 'qs';
// 靓号申请管理 列表
export const getPrettyNumberExamineList = query => {
return request({
url: '/admin/prettyNumber/examine/list',
method: 'get',
params: query
});
};
// 靓号申请管理 通过
export const prettyNumberExaminePass = query => {
return request({
url: '/admin/prettyNumber/examine/pass',
method: 'post',
params: query
});
};
// 靓号申请管理 删除
export const prettyNumberExamineDelete = query => {
return request({
url: '/admin/prettyNumber/examine/delete',
method: 'get',
params: query
});
};
// 靓号申请管理 拒绝
export const prettyNumberExamineReject = query => {
return request({
url: '/admin/prettyNumber/examine/reject',
method: 'post',
params: query
});
};
// 靓号导入
export const erbanUpload = query => {
return request({
url: '/admin/prettyNumber/upload',
method: 'post',
headers: { 'Content-Type': 'multipart/form-data' },
data: query
});
};

View File

@@ -0,0 +1,104 @@
import request from '@/utils/request';
import qs from 'qs';
// 用户财产 相关接口(一级菜单:用户财产管理)
// 获取 金币转赠历史列表
export const getGoldCoinTransferList = query => {
return request({
url: '/gold/give/history',
method: 'get',
params: query
});
};
// 获取 金币转赠历史 金币汇总
export const getGoldCoinSumGold = query => {
return request({
url: '/gold/give/history/sumGold',
method: 'get',
params: query
});
};
// 用户资产排行 列表
export const getUserAssetsList = query => {
return request({
url: '/userAssets/list',
method: 'get',
params: query
});
};
// 用户资产排行 导出
export const userAssetsExport = query => {
return request({
url: '/userAssets/export',
method: 'get',
params: query,
responseType: 'blob'
});
};
// 金币钻石操作记录 列表
export const officalGoldSearch = query => {
return request({
url: '/offical/gold/search',
method: 'get',
params: query
});
};
// 金币钻石操作记录 导出
export const officalGoldExport = query => {
return request({
url: '/offical/gold/export',
method: 'get',
params: query,
responseType: 'blob'
});
};
// 操作货币增加/减少 列表
export const officalGoldGive= query => {
return request({
url: '/offical/gold/give',
method: 'post',
params: query
// data: qs.stringify(query)
});
};
// 操作货币增加/减少 查看用户
export const getofficalGoldUserInfo = query => {
return request({
url: '/offical/gold/userInfo',
method: 'get',
params: query
});
};
// 冻结用户资产管理 列表
export const getFrozenRecordList = query => {
return request({
url: '/frozenRecord/list',
method: 'get',
params: query
});
};
// 冻结用户资产管理 冻结
export const userRecordFrozen= query => {
return request({
url: '/frozenRecord/frozen',
method: 'post',
params: query
});
};
// 冻结用户资产管理 解冻
export const frozenRecordFree= query => {
return request({
url: '/frozenRecord/free',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,87 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 地区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// ==============================================首页ui配置==============================================
// 配置
export const appUiSetting = query => {
return request({
url: '/appUiSetting',
method: 'get',
params: query
});
};
// 保存
export const appUiSettingSave = query => {
return request({
url: '/appUiSetting/save',
method: 'post',
data: query
});
};
// ==============================================自定义背景==============================================
// 列表
export const page = query => {
return request({
url: '/admin/roomBackground/page',
method: 'get',
params: query
});
};
// 新增
export const roomBackgroundAdd = query => {
return request({
url: '/admin/roomBackground/add',
method: 'post',
params: query
});
};
// 编辑
export const roomBackgroundUpdate = query => {
return request({
url: '/admin/roomBackground/update',
method: 'post',
params: query
});
};
// ==============================================自定义背景==============================================
// 列表
export const customPage = query => {
return request({
url: '/admin/roomBackground/custom/page',
method: 'get',
params: query
});
};
// 通过
export const customPass = query => {
return request({
url: '/admin/roomBackground/custom/pass',
method: 'post',
params: query
});
};
// 拒绝
export const customReject = query => {
return request({
url: '/admin/roomBackground/custom/reject',
method: 'post',
params: query
});
};
// 删除
export const customDel = query => {
return request({
url: '/admin/roomBackground/custom/del',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,98 @@
<template>
<div class="pagination">
<el-pagination
background
:layout="paginationLayout"
:current-page="pageParams.pageNo"
:page-size="pageParams.pageSize"
:page-sizes="pageSizes"
:total="pageTotal"
:pager-count="pagerCount"
@size-change="handleSizeChange"
@current-change="handlePageChange"
></el-pagination>
</div>
</template>
<script>
export default {
props: {
pageParams: {
type: Object,
default: () => {}
},
pageSizes: {
type: Array,
default: function () {
return [5, 10, 20, 30, 40, 50, 100];
}
},
// pagerCount: {
// type: Number,
// default: 5
// },
pageTotal: {
type: Number,
default: 0
},
ifShowTotal: {
type: Boolean,
default: true
},
ifShowSizes: {
type: Boolean,
default: true
},
ifShowPrev: {
type: Boolean,
default: true
},
ifShowPager: {
type: Boolean,
default: true
},
ifShowNext: {
type: Boolean,
default: true
},
ifShowJumper: {
type: Boolean,
default: false
}
},
data() {
return {
pagerCount: 5
};
},
methods: {
handleSizeChange(val) {
this.$emit('handleSizeChange', val);
},
handlePageChange(val) {
this.$emit('handlePageChange', val);
},
handleResize() {
if (window.innerWidth > 768) {
this.pagerCount = 5;
} else {
this.pagerCount = 2;
}
}
},
mounted() {
this.handleResize(); // 初始化宽度
},
computed: {
paginationLayout() {
const layoutStr = ['total', 'sizes', 'prev', 'pager', 'next', 'jumper'];
const { ifShowTotal, ifShowSizes, ifShowPrev, ifShowPager, ifShowNext, ifShowJumper } = this;
let layoutWantedToBeShowed = [];
[ifShowTotal, ifShowSizes, ifShowPrev, ifShowPager, ifShowNext, ifShowJumper].forEach((item, index) => {
if (item) layoutWantedToBeShowed.push(index);
});
return layoutWantedToBeShowed.map((item) => layoutStr[item]).join(',');
}
}
};
</script>

View File

@@ -1,12 +1,15 @@
<template>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar" style="height: 100%; overflow: hidden; overflow: scroll;">
<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">
<img :src="avatar" class="img-circle" :alt="username" />
</div>
<div class="pull-left info">
<p>{{ username }}</p>
@@ -17,9 +20,20 @@
<!-- 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">
<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">
<button
name="search"
id="search-btn"
class="btn btn-flat"
@click="search"
>
<i class="fa fa-search"></i>
</button>
</span>
@@ -30,7 +44,12 @@
<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">
<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>
@@ -39,10 +58,19 @@
</span>
</a>
<ul class="treeview-menu" :id="['menu' + parent.id]">
<li v-for="(child, childIndex) in getChilds(parent.id)" :key="child" :data-index="childIndex">
<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>
:class="[
child.icon && child.icon != ''
? child.icon
: 'fa fa-circle-o text-yellow',
]"
></i>
<span>{{ child.name }}</span>
</a>
</li>
@@ -54,16 +82,26 @@
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" style="height: 100%;">
<div class="content-wrapper" style="height: 100%">
<!-- Content Header (Page header) -->
<section class="content-header"
:style="[childMenu.name && childMenu.name != '' ? 'display:block;' : 'display:none;']">
<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>
<a href="#"
><i class="fa fa-dashboard"></i> {{ childMenu.parentName }}</a
>
</li>
<li class="active">{{ childMenu.name }}</li>
</ol>
</section>
@@ -76,7 +114,13 @@
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<div class="modal fade" id="tipModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<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">
@@ -86,8 +130,14 @@
</div>
</div>
</div>
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"
data-backdrop="static">
<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">
@@ -97,18 +147,32 @@
</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
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',
name: "MaintainerView",
data() {
return {
componentName: "",
@@ -120,7 +184,7 @@ export default {
name: "",
parentName: "",
description: "",
}
},
};
},
created() {
@@ -130,48 +194,60 @@ export default {
},
methods: {
getMenu() {
this.parentMenus = getStore({ name: 'parent_menus' });
this.childMenus = getStore({ name: 'child_menus' });
store.dispatch('getMenu').then(res => {
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);
return this.childMenus.filter((v) => v.parentid == parentId);
},
getChildLength(parentId) {
return this.childMenus.filter(v => v.parentid == parentId).length;
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);
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);
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);
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);
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 => {
parentMenus.forEach((v) => {
parentIds.push(v.id);
});
}
this.parentMenus = store.getters.parentMenus.filter(v1 => parentIds.filter(v2 => v1.id == v2).length > 0);
}
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

@@ -49,11 +49,28 @@ import '@/assets/plugins/bootstrap-treeview/js/bootstrap-treeview.min.js'
// @ts-ignore
import components from '@/utils/components.js'
import Vue from 'vue';
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
import '@/css/public.css'
import VueClipboard from 'vue-clipboard2'
// import 'vue-clipboard2/dist/vue-clipboard.min.css'
import { copy } from './utils/copy.js';
const app = createApp(App)
app.config.globalProperties.$copy = function (text) {
copy(text, this);
};
// 全局错误处理
window.onerror = function (message, source, lineno, colno, error) {
console.log(error)
// 判断是否是 'insertBefore' 错误
if (error instanceof TypeError && message.includes('insertBefore')) {
console.error('捕获到 TypeError 错误:', error);
window.location.reload();
// 你可以在这里处理错误,比如记录日志或执行其他操作
return true; // 阻止浏览器默认的错误处理
}
return false; // 默认处理其他类型的错误
};
app.config.warnHandler = () => null;
app.use(store).use(router).use(components).mount('#app')
app.use(store).use(router).use(components).use(VueClipboard).mount('#app')

81
src/mixin/mixRegion.js Normal file
View File

@@ -0,0 +1,81 @@
// 公共混入 用户区服处理
/**
* 注意: 使用混入,在选择区服切换的时候会添加搜索的区服,
* 所以页面data如果没有searchForm: { region: null }, 需要加上,否则查询searchForm为空
*/
export default {
data() {
return {
userRegion: JSON.parse(localStorage.getItem('user_region')),
regionEnum: [
{ value: 1, name: 'A区' },
{ value: 2, name: 'B区' },
{ value: 3, name: 'C区' },
{ value: 4, name: 'D区' },
{ value: 5, name: 'E区' },
{ value: 6, name: 'F区' }
],
userAreaRegion: [], //拥有权限的区域列表
region: null, //展示的区域
}
},
created() {
this.handleUserRegion()
},
methods: {
handleUserRegion() {
if (this.userRegion.length == 0) {
this.$message.error({
message: '请先联系管理员设置你的区服权限!',
duration: 5000
});
return
}
this.userAreaRegion = this.regionEnum.filter(item => this.userRegion.includes(item.value));
this.region = this.userAreaRegion[0].value;
this.searchForm.region = this.region;
console.log('当前查看区服:', this.region);
},
handSearchRegion() {
if (this.$refs['searchForm']) { // 检查 this.$refs['searchForm'] 是否存在
this.$refs['searchForm'].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
} else {
this.pageParams.pageNo = 1;
this.getData();
}
},
},
computed: {
regionType() {
const { regionEnum } = this;
return function (value) {
for (let item of regionEnum) {
if (item.value === value) {
return item.name;
}
}
return '';
};
}
},
watch: {
region: {
handler(newVal, oldVal) {
this.searchForm.region = newVal;
// 防止初始化重复调用查询表单接口
if (oldVal != null) {
this.handSearchRegion()
}
},
// immediate: true, //立即监听
},
}
}

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', ''));

11
src/utils/copy.js Normal file
View File

@@ -0,0 +1,11 @@
// copy.js
export function copy(text, vueInstance) {
vueInstance.$copyText(text)
.then(() => {
vueInstance.$message.success('已复制');
})
.catch(() => {
vueInstance.$message.warning('复制失败');
});
}

684
src/utils/excel/Blob.js Normal file
View File

@@ -0,0 +1,684 @@
// /* Blob.js
// * A Blob, File, FileReader & URL implementation.
// * 2019-04-19
// *
// * By Eli Grey, http://eligrey.com
// * By Jimmy Wärting, https://github.com/jimmywarting
// * License: MIT
// * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
// */
// ; (function () {
// var global = typeof window === 'object'
// ? window : typeof self === 'object'
// ? self : this
// var BlobBuilder = global.BlobBuilder
// || global.WebKitBlobBuilder
// || global.MSBlobBuilder
// || global.MozBlobBuilder
// global.URL = global.URL || global.webkitURL || function (href, a) {
// a = document.createElement('a')
// a.href = href
// return a
// }
// var origBlob = global.Blob
// var createObjectURL = URL.createObjectURL
// var revokeObjectURL = URL.revokeObjectURL
// var strTag = global.Symbol && global.Symbol.toStringTag
// var blobSupported = false
// var blobSupportsArrayBufferView = false
// var arrayBufferSupported = !!global.ArrayBuffer
// var blobBuilderSupported = BlobBuilder
// && BlobBuilder.prototype.append
// && BlobBuilder.prototype.getBlob
// try {
// // Check if Blob constructor is supported
// blobSupported = new Blob(['ä']).size === 2
// // Check if Blob constructor supports ArrayBufferViews
// // Fails in Safari 6, so we need to map to ArrayBuffers there.
// blobSupportsArrayBufferView = new Blob([new Uint8Array([1, 2])]).size === 2
// } catch (e) { }
// /**
// * Helper function that maps ArrayBufferViews to ArrayBuffers
// * Used by BlobBuilder constructor and old browsers that didn't
// * support it in the Blob constructor.
// */
// function mapArrayBufferViews(ary) {
// return ary.map(function (chunk) {
// if (chunk.buffer instanceof ArrayBuffer) {
// var buf = chunk.buffer
// // if this is a subarray, make a copy so we only
// // include the subarray region from the underlying buffer
// if (chunk.byteLength !== buf.byteLength) {
// var copy = new Uint8Array(chunk.byteLength)
// copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength))
// buf = copy.buffer
// }
// return buf
// }
// return chunk
// })
// }
// function BlobBuilderConstructor(ary, options) {
// options = options || {}
// var bb = new BlobBuilder()
// mapArrayBufferViews(ary).forEach(function (part) {
// bb.append(part)
// })
// return options.type ? bb.getBlob(options.type) : bb.getBlob()
// }
// function BlobConstructor(ary, options) {
// return new origBlob(mapArrayBufferViews(ary), options || {})
// }
// if (global.Blob) {
// BlobBuilderConstructor.prototype = Blob.prototype
// BlobConstructor.prototype = Blob.prototype
// }
// /********************************************************/
// /* String Encoder fallback */
// /********************************************************/
// function stringEncode(string) {
// var pos = 0
// var len = string.length
// var Arr = global.Uint8Array || Array // Use byte array when possible
// var at = 0 // output position
// var tlen = Math.max(32, len + (len >> 1) + 7) // 1.5x size
// var target = new Arr((tlen >> 3) << 3) // ... but at 8 byte offset
// while (pos < len) {
// var value = string.charCodeAt(pos++)
// if (value >= 0xd800 && value <= 0xdbff) {
// // high surrogate
// if (pos < len) {
// var extra = string.charCodeAt(pos)
// if ((extra & 0xfc00) === 0xdc00) {
// ++pos
// value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000
// }
// }
// if (value >= 0xd800 && value <= 0xdbff) {
// continue // drop lone surrogate
// }
// }
// // expand the buffer if we couldn't write 4 bytes
// if (at + 4 > target.length) {
// tlen += 8 // minimum extra
// tlen *= (1.0 + (pos / string.length) * 2) // take 2x the remaining
// tlen = (tlen >> 3) << 3 // 8 byte offset
// var update = new Uint8Array(tlen)
// update.set(target)
// target = update
// }
// if ((value & 0xffffff80) === 0) { // 1-byte
// target[at++] = value // ASCII
// continue
// } else if ((value & 0xfffff800) === 0) { // 2-byte
// target[at++] = ((value >> 6) & 0x1f) | 0xc0
// } else if ((value & 0xffff0000) === 0) { // 3-byte
// target[at++] = ((value >> 12) & 0x0f) | 0xe0
// target[at++] = ((value >> 6) & 0x3f) | 0x80
// } else if ((value & 0xffe00000) === 0) { // 4-byte
// target[at++] = ((value >> 18) & 0x07) | 0xf0
// target[at++] = ((value >> 12) & 0x3f) | 0x80
// target[at++] = ((value >> 6) & 0x3f) | 0x80
// } else {
// // FIXME: do we care
// continue
// }
// target[at++] = (value & 0x3f) | 0x80
// }
// return target.slice(0, at)
// }
// /********************************************************/
// /* String Decoder fallback */
// /********************************************************/
// function stringDecode(buf) {
// var end = buf.length
// var res = []
// var i = 0
// while (i < end) {
// var firstByte = buf[i]
// var codePoint = null
// var bytesPerSequence = (firstByte > 0xEF) ? 4
// : (firstByte > 0xDF) ? 3
// : (firstByte > 0xBF) ? 2
// : 1
// if (i + bytesPerSequence <= end) {
// var secondByte, thirdByte, fourthByte, tempCodePoint
// switch (bytesPerSequence) {
// case 1:
// if (firstByte < 0x80) {
// codePoint = firstByte
// }
// break
// case 2:
// secondByte = buf[i + 1]
// if ((secondByte & 0xC0) === 0x80) {
// tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
// if (tempCodePoint > 0x7F) {
// codePoint = tempCodePoint
// }
// }
// break
// case 3:
// secondByte = buf[i + 1]
// thirdByte = buf[i + 2]
// if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
// tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
// if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
// codePoint = tempCodePoint
// }
// }
// break
// case 4:
// secondByte = buf[i + 1]
// thirdByte = buf[i + 2]
// fourthByte = buf[i + 3]
// if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
// tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
// if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
// codePoint = tempCodePoint
// }
// }
// }
// }
// if (codePoint === null) {
// // we did not generate a valid codePoint so insert a
// // replacement char (U+FFFD) and advance only 1 byte
// codePoint = 0xFFFD
// bytesPerSequence = 1
// } else if (codePoint > 0xFFFF) {
// // encode to utf16 (surrogate pair dance)
// codePoint -= 0x10000
// res.push(codePoint >>> 10 & 0x3FF | 0xD800)
// codePoint = 0xDC00 | codePoint & 0x3FF
// }
// res.push(codePoint)
// i += bytesPerSequence
// }
// var len = res.length
// var str = ''
// var i = 0
// while (i < len) {
// str += String.fromCharCode.apply(String, res.slice(i, i += 0x1000))
// }
// return str
// }
// // string -> buffer
// var textEncode = typeof TextEncoder === 'function'
// ? TextEncoder.prototype.encode.bind(new TextEncoder())
// : stringEncode
// // buffer -> string
// var textDecode = typeof TextDecoder === 'function'
// ? TextDecoder.prototype.decode.bind(new TextDecoder())
// : stringDecode
// function FakeBlobBuilder() {
// function isDataView(obj) {
// return obj && DataView.prototype.isPrototypeOf(obj)
// }
// function bufferClone(buf) {
// var view = new Array(buf.byteLength)
// var array = new Uint8Array(buf)
// var i = view.length
// while (i--) {
// view[i] = array[i]
// }
// return view
// }
// function array2base64(input) {
// var byteToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
// var output = []
// for (var i = 0; i < input.length; i += 3) {
// var byte1 = input[i]
// var haveByte2 = i + 1 < input.length
// var byte2 = haveByte2 ? input[i + 1] : 0
// var haveByte3 = i + 2 < input.length
// var byte3 = haveByte3 ? input[i + 2] : 0
// var outByte1 = byte1 >> 2
// var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4)
// var outByte3 = ((byte2 & 0x0F) << 2) | (byte3 >> 6)
// var outByte4 = byte3 & 0x3F
// if (!haveByte3) {
// outByte4 = 64
// if (!haveByte2) {
// outByte3 = 64
// }
// }
// output.push(
// byteToCharMap[outByte1], byteToCharMap[outByte2],
// byteToCharMap[outByte3], byteToCharMap[outByte4]
// )
// }
// return output.join('')
// }
// var create = Object.create || function (a) {
// function c() { }
// c.prototype = a
// return new c()
// }
// if (arrayBufferSupported) {
// var viewClasses = [
// '[object Int8Array]',
// '[object Uint8Array]',
// '[object Uint8ClampedArray]',
// '[object Int16Array]',
// '[object Uint16Array]',
// '[object Int32Array]',
// '[object Uint32Array]',
// '[object Float32Array]',
// '[object Float64Array]'
// ]
// var isArrayBufferView = ArrayBuffer.isView || function (obj) {
// return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
// }
// }
// function concatTypedarrays(chunks) {
// var size = 0
// var i = chunks.length
// while (i--) { size += chunks[i].length }
// var b = new Uint8Array(size)
// var offset = 0
// for (i = 0, l = chunks.length; i < l; i++) {
// var chunk = chunks[i]
// b.set(chunk, offset)
// offset += chunk.byteLength || chunk.length
// }
// return b
// }
// /********************************************************/
// /* Blob constructor */
// /********************************************************/
// function Blob(chunks, opts) {
// chunks = chunks || []
// opts = opts == null ? {} : opts
// for (var i = 0, len = chunks.length; i < len; i++) {
// var chunk = chunks[i]
// if (chunk instanceof Blob) {
// chunks[i] = chunk._buffer
// } else if (typeof chunk === 'string') {
// chunks[i] = textEncode(chunk)
// } else if (arrayBufferSupported && (ArrayBuffer.prototype.isPrototypeOf(chunk) || isArrayBufferView(chunk))) {
// chunks[i] = bufferClone(chunk)
// } else if (arrayBufferSupported && isDataView(chunk)) {
// chunks[i] = bufferClone(chunk.buffer)
// } else {
// chunks[i] = textEncode(String(chunk))
// }
// }
// this._buffer = global.Uint8Array
// ? concatTypedarrays(chunks)
// : [].concat.apply([], chunks)
// this.size = this._buffer.length
// this.type = opts.type || ''
// if (/[^\u0020-\u007E]/.test(this.type)) {
// this.type = ''
// } else {
// this.type = this.type.toLowerCase()
// }
// }
// Blob.prototype.arrayBuffer = function () {
// return Promise.resolve(this._buffer)
// }
// Blob.prototype.text = function () {
// return Promise.resolve(textDecode(this._buffer))
// }
// Blob.prototype.slice = function (start, end, type) {
// var slice = this._buffer.slice(start || 0, end || this._buffer.length)
// return new Blob([slice], { type: type })
// }
// Blob.prototype.toString = function () {
// return '[object Blob]'
// }
// /********************************************************/
// /* File constructor */
// /********************************************************/
// function File(chunks, name, opts) {
// opts = opts || {}
// var a = Blob.call(this, chunks, opts) || this
// a.name = name.replace(/\//g, ':')
// a.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date()
// a.lastModified = +a.lastModifiedDate
// return a
// }
// File.prototype = create(Blob.prototype)
// File.prototype.constructor = File
// if (Object.setPrototypeOf) {
// Object.setPrototypeOf(File, Blob)
// } else {
// try { File.__proto__ = Blob } catch (e) { }
// }
// File.prototype.toString = function () {
// return '[object File]'
// }
// /********************************************************/
// /* FileReader constructor */
// /********************************************************/
// function FileReader() {
// if (!(this instanceof FileReader)) {
// throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.")
// }
// var delegate = document.createDocumentFragment()
// this.addEventListener = delegate.addEventListener
// this.dispatchEvent = function (evt) {
// var local = this['on' + evt.type]
// if (typeof local === 'function') local(evt)
// delegate.dispatchEvent(evt)
// }
// this.removeEventListener = delegate.removeEventListener
// }
// function _read(fr, blob, kind) {
// if (!(blob instanceof Blob)) {
// throw new TypeError("Failed to execute '" + kind + "' on 'FileReader': parameter 1 is not of type 'Blob'.")
// }
// fr.result = ''
// setTimeout(function () {
// this.readyState = FileReader.LOADING
// fr.dispatchEvent(new Event('load'))
// fr.dispatchEvent(new Event('loadend'))
// })
// }
// FileReader.EMPTY = 0
// FileReader.LOADING = 1
// FileReader.DONE = 2
// FileReader.prototype.error = null
// FileReader.prototype.onabort = null
// FileReader.prototype.onerror = null
// FileReader.prototype.onload = null
// FileReader.prototype.onloadend = null
// FileReader.prototype.onloadstart = null
// FileReader.prototype.onprogress = null
// FileReader.prototype.readAsDataURL = function (blob) {
// _read(this, blob, 'readAsDataURL')
// this.result = 'data:' + blob.type + ';base64,' + array2base64(blob._buffer)
// }
// FileReader.prototype.readAsText = function (blob) {
// _read(this, blob, 'readAsText')
// this.result = textDecode(blob._buffer)
// }
// FileReader.prototype.readAsArrayBuffer = function (blob) {
// _read(this, blob, 'readAsText')
// // return ArrayBuffer when possible
// this.result = (blob._buffer.buffer || blob._buffer).slice()
// }
// FileReader.prototype.abort = function () { }
// /********************************************************/
// /* URL */
// /********************************************************/
// URL.createObjectURL = function (blob) {
// return blob instanceof Blob
// ? 'data:' + blob.type + ';base64,' + array2base64(blob._buffer)
// : createObjectURL.call(URL, blob)
// }
// URL.revokeObjectURL = function (url) {
// revokeObjectURL && revokeObjectURL.call(URL, url)
// }
// /********************************************************/
// /* XHR */
// /********************************************************/
// var _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
// if (_send) {
// XMLHttpRequest.prototype.send = function (data) {
// if (data instanceof Blob) {
// this.setRequestHeader('Content-Type', data.type)
// _send.call(this, textDecode(data._buffer))
// } else {
// _send.call(this, data)
// }
// }
// }
// global.FileReader = FileReader
// global.File = File
// global.Blob = Blob
// }
// function fixFileAndXHR() {
// var isIE = !!global.ActiveXObject || (
// '-ms-scroll-limit' in document.documentElement.style &&
// '-ms-ime-align' in document.documentElement.style
// )
// // Monkey patched
// // IE don't set Content-Type header on XHR whose body is a typed Blob
// // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6047383
// var _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
// if (isIE && _send) {
// XMLHttpRequest.prototype.send = function (data) {
// if (data instanceof Blob) {
// this.setRequestHeader('Content-Type', data.type)
// _send.call(this, data)
// } else {
// _send.call(this, data)
// }
// }
// }
// try {
// new File([], '')
// } catch (e) {
// try {
// var klass = new Function('class File extends Blob {' +
// 'constructor(chunks, name, opts) {' +
// 'opts = opts || {};' +
// 'super(chunks, opts || {});' +
// 'this.name = name.replace(/\//g, ":");' +
// 'this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date();' +
// 'this.lastModified = +this.lastModifiedDate;' +
// '}};' +
// 'return new File([], ""), File'
// )()
// global.File = klass
// } catch (e) {
// var klass = function (b, d, c) {
// var blob = new Blob(b, c)
// var t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date()
// blob.name = d.replace(/\//g, ':')
// blob.lastModifiedDate = t
// blob.lastModified = +t
// blob.toString = function () {
// return '[object File]'
// }
// if (strTag) {
// blob[strTag] = 'File'
// }
// return blob
// }
// global.File = klass
// }
// }
// }
// if (blobSupported) {
// fixFileAndXHR()
// global.Blob = blobSupportsArrayBufferView ? global.Blob : BlobConstructor
// } else if (blobBuilderSupported) {
// fixFileAndXHR()
// global.Blob = BlobBuilderConstructor
// } else {
// FakeBlobBuilder()
// }
// if (strTag) {
// File.prototype[strTag] = 'File'
// Blob.prototype[strTag] = 'Blob'
// FileReader.prototype[strTag] = 'FileReader'
// }
// var blob = global.Blob.prototype
// var stream
// function promisify(obj) {
// return new Promise(function (resolve, reject) {
// obj.onload =
// obj.onerror = function (evt) {
// obj.onload =
// obj.onerror = null
// evt.type === 'load'
// ? resolve(obj.result || obj)
// : reject(new Error('Failed to read the blob/file'))
// }
// })
// }
// try {
// new ReadableStream({ type: 'bytes' })
// stream = function stream() {
// var position = 0
// var blob = this
// return new ReadableStream({
// type: 'bytes',
// autoAllocateChunkSize: 524288,
// pull: function (controller) {
// var v = controller.byobRequest.view
// var chunk = blob.slice(position, position + v.byteLength)
// return chunk.arrayBuffer()
// .then(function (buffer) {
// var uint8array = new Uint8Array(buffer)
// var bytesRead = uint8array.byteLength
// position += bytesRead
// v.set(uint8array)
// controller.byobRequest.respond(bytesRead)
// if (position >= blob.size)
// controller.close()
// })
// }
// })
// }
// } catch (e) {
// try {
// new ReadableStream({})
// stream = function stream(blob) {
// var position = 0
// var blob = this
// return new ReadableStream({
// pull: function (controller) {
// var chunk = blob.slice(position, position + 524288)
// return chunk.arrayBuffer().then(function (buffer) {
// position += buffer.byteLength
// var uint8array = new Uint8Array(buffer)
// controller.enqueue(uint8array)
// if (position == blob.size)
// controller.close()
// })
// }
// })
// }
// } catch (e) {
// try {
// new Response('').body.getReader().read()
// stream = function stream() {
// return (new Response(this)).body
// }
// } catch (e) {
// stream = function stream() {
// throw new Error('Include https://github.com/MattiasBuelens/web-streams-polyfill')
// }
// }
// }
// }
// if (!blob.arrayBuffer) {
// blob.arrayBuffer = function arrayBuffer() {
// var fr = new FileReader()
// fr.readAsArrayBuffer(this)
// return promisify(fr)
// }
// }
// if (!blob.text) {
// blob.text = function text() {
// var fr = new FileReader()
// fr.readAsText(this)
// return promisify(fr)
// }
// }
// if (!blob.stream) {
// blob.stream = stream
// }
// })()

View File

@@ -0,0 +1,141 @@
/* eslint-disable */
require('script-loader!file-saver');
// require('script-loader!./Blob.js');
require('script-loader!xlsx/dist/xlsx.core.min');
function generateArray(table) {
var out = [];
var rows = table.querySelectorAll('tr');
var ranges = [];
for (var R = 0; R < rows.length; ++R) {
var outRow = [];
var row = rows[R];
var columns = row.querySelectorAll('td');
for (var C = 0; C < columns.length; ++C) {
var cell = columns[C];
var colspan = cell.getAttribute('colspan');
var rowspan = cell.getAttribute('rowspan');
var cellValue = cell.innerText;
if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
//Skip ranges
ranges.forEach(function (range) {
if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
}
});
//Handle Row Span
if (rowspan || colspan) {
rowspan = rowspan || 1;
colspan = colspan || 1;
ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}});
}
;
//Handle Value
outRow.push(cellValue !== "" ? cellValue : null);
//Handle Colspan
if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
}
out.push(outRow);
}
return [out, ranges];
};
function datenum(v, date1904) {
if (date1904) v += 1462;
var epoch = Date.parse(v);
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
}
function sheet_from_array_of_arrays(data, opts) {
var ws = {};
var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}};
for (var R = 0; R != data.length; ++R) {
for (var C = 0; C != data[R].length; ++C) {
if (range.s.r > R) range.s.r = R;
if (range.s.c > C) range.s.c = C;
if (range.e.r < R) range.e.r = R;
if (range.e.c < C) range.e.c = C;
var cell = {v: data[R][C]};
if (cell.v == null) continue;
var cell_ref = XLSX.utils.encode_cell({c: C, r: R});
if (typeof cell.v === 'number') cell.t = 'n';
else if (typeof cell.v === 'boolean') cell.t = 'b';
else if (cell.v instanceof Date) {
cell.t = 'n';
cell.z = XLSX.SSF._table[14];
cell.v = datenum(cell.v);
}
else cell.t = 's';
ws[cell_ref] = cell;
}
}
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
return ws;
}
function Workbook() {
if (!(this instanceof Workbook)) return new Workbook();
this.SheetNames = [];
this.Sheets = {};
}
function s2ab(s) {
var buf = new ArrayBuffer(s.length);
var view = new Uint8Array(buf);
for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
return buf;
}
export function export_table_to_excel(id) {
var theTable = document.getElementById(id);
console.log('a')
var oo = generateArray(theTable);
var ranges = oo[1];
/* original data */
var data = oo[0];
var ws_name = "SheetJS";
console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
/* add ranges to worksheet */
// ws['!cols'] = ['apple', 'banan'];
ws['!merges'] = ranges;
/* add worksheet to workbook */
wb.SheetNames.push(ws_name);
wb.Sheets[ws_name] = ws;
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx")
}
function formatJson(jsonData) {
console.log(jsonData)
}
export function export_json_to_excel(th, jsonData, defaultTitle) {
/* original data */
var data = jsonData;
data.unshift(th);
var ws_name = "SheetJS";
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
/* add worksheet to workbook */
wb.SheetNames.push(ws_name);
wb.Sheets[ws_name] = ws;
var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
var title = defaultTitle || '列表'
saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
}

11
src/utils/exportExcel.js Normal file
View File

@@ -0,0 +1,11 @@
function formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]));
}
export const exportExcel = (tHeader, filterVal, data, excelName) => {
require.ensure([], () => {
const { export_json_to_excel } = require('./excel/Export2Excel.js');
const combineData = formatJson(filterVal, data);
export_json_to_excel(tHeader, combineData, excelName);
});
}

View File

@@ -0,0 +1,20 @@
const partitionInfoMap = {
1: '英语区',
2: '阿拉伯语区',
4: '华语区',
8: '土耳其区',
}
export const partitionDesc = (val) => {
return Object.keys(partitionInfoMap).filter(k=>{
return(Number(val) & Number(k)) != 0
}).map(k=>partitionInfoMap[k]).join(",");
}
export const partitionIdArr = (val) => {
var arr =[];
Object.keys(partitionInfoMap).filter(k=>{
return(Number(val) & Number(k)) != 0
}).map(k=>arr.push(Number(k)));
return arr
}

107
src/utils/relDate.js Normal file
View File

@@ -0,0 +1,107 @@
export const formatDate = (value) => {
let timezone = 3; //目标时区时间东3区(东时区正数 西时区负数)
let offset_GMT = new Date(value).getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
let nowDate = new Date(value).getTime(); // 本地时间距 1970 年 1 月 1 日午夜GMT 时间)之间的毫秒数
let date = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
// 提取年、月、日、小时、分钟和秒
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
return `${y}-${MM}-${d} ${h}:${m}:${s}`;
}
export const formatDate2 = (value) => {
let timezone = 3; //目标时区时间东3区(东时区正数 西时区负数)
let offset_GMT = new Date(value).getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
let nowDate = new Date(value).getTime(); // 本地时间距 1970 年 1 月 1 日午夜GMT 时间)之间的毫秒数
let date = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
return `${y}/${MM}/${d} ${h}:${m}:${s}`;
}
export const formatDateYMD = (value) => {
let timezone = 3; //目标时区时间东3区(东时区正数 西时区负数)
let offset_GMT = new Date(value).getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
let nowDate = new Date(value).getTime(); // 本地时间距 1970 年 1 月 1 日午夜GMT 时间)之间的毫秒数
let date = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
return `${y}/${MM}/${d}`;
}
export const formatDateYYYYMMDD = (value) => {
let date = new Date(value);
// 将时区设置为GMT+3
let gmtOffset = 3; // GMT+3时区偏移量为3小时
let localOffset = date.getTimezoneOffset() / 60; // 获取本地时区偏移量(以小时为单位)
let targetOffset = gmtOffset - localOffset; // 计算目标时区偏移量
date.setHours(date.getHours() + targetOffset); // 根据偏移量调整小时
const y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
return `${y}-${MM}-${d}`;
}
export const formatDateYYYYMM = (value) => {
let date = new Date(value);
// 将时区设置为GMT+3
let gmtOffset = 3; // GMT+3时区偏移量为3小时
let localOffset = date.getTimezoneOffset() / 60; // 获取本地时区偏移量(以小时为单位)
let targetOffset = gmtOffset - localOffset; // 计算目标时区偏移量
date.setHours(date.getHours() + targetOffset); // 根据偏移量调整小时
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
console.log(y, MM, d, h, s);
return `${y}-${MM}`;
}

View File

@@ -5,7 +5,7 @@ import global from "@/constants/global";
const service = axios.create();
import { ElMessage } from 'element-plus'
service.interceptors.request.use(config => {
console.log('config', config);
// console.log('config', config);
return config;
}, error => {
Promise.reject(error);
@@ -13,7 +13,7 @@ service.interceptors.request.use(config => {
service.interceptors.response.use(res => {
userLogout(res.headers[global.NEED_LOGOUT.toLowerCase()]);
console.log('res.data', res);
// console.log('res.data', res);
// if (res.data.code == 200) {
// ElMessage({
// message: "成功",

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

@@ -0,0 +1,242 @@
<template>
<div class="box">
<!-- 选择分区 -->
<div class="inquire">
<div class="block">
<span class="demonstration">选择分区</span>
<el-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
@change="handleChange"
>
<el-option
v-for="item in inquire.inquireonInfos"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="seq" align="center" label="排序" />
<el-table-column prop="name" align="center" label="礼物面板类型" />
<el-table-column prop="enable" align="center" label="是否生效">
<template v-slot="scope">{{ scope.row.enable ? "是" : "否" }}</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button
@click="ediClick(scope.row)"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 编辑弹窗 -->
<el-dialog v-model="eidDialog" :title="eidDialogTitle" width="30%" center>
<!-- 礼物面板类型 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; white-space: nowrap; margin-right: 70px"
class="col-sm-2 control-label"
>礼物面板类型</span
>
<el-input
v-model="eidObj.type"
style="width: 60%"
class="input"
placeholder="请输入"
disabled
></el-input>
</div>
<!-- 面板排序 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; white-space: nowrap; margin-right: 70px"
class="col-sm-2 control-label"
>面板排序-{{ eidText }}</span
>
<el-input
v-model="eidObj.seq"
style="width: 60%"
class="input"
placeholder="请输入"
></el-input>
</div>
<!-- 是否生效 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; white-space: nowrap; margin-right: 70px"
class="col-sm-2 control-label"
>是否生效</span
>
<el-select
v-model="eidObj.value"
style="width: 60%"
placeholder="请选择"
>
<el-option
v-for="item in eidObj.option"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="eidDialog = false">取消</el-button>
<el-button type="primary" @click="eidDialogClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { list, update } from "@/api/GiftPanelManagement/GiftPanelManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GiftPanelManagement",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
partitionId: 4,
inquireonInfos: [
{ desc: "英语区", id: 1 },
{ desc: "阿拉伯区", id: 2 },
{ desc: "华语区", id: 4 },
{ desc: "土耳其区", id: 8 },
],
},
// 表格
tableData: [],
// 编辑
eidDialog: false,
eidDialogTitle: "",
eidText: "",
eidObjNew: {},
eidObj: {
type: "",
clientName: "",
seq: "",
value: "",
option: [
{
desc: "是",
id: true,
},
{
desc: "否",
id: false,
},
],
},
};
},
created() {
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
this.eidText = `华语区`;
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
list({
partitionId: this.inquire.partitionId,
}).then((res) => {
this.tableData = res.data;
this.loading = false;
});
},
ediClick(val) {
this.eidDialog = true;
this.eidObj.type = val.name;
this.eidObj.seq = val.seq;
this.eidObj.value = val.enable;
this.eidObjNew = val;
},
eidDialogClick() {
update({
enable: this.eidObj.value,
id: this.eidObjNew.id,
seq: this.eidObj.seq,
partitionId: this.inquire.partitionId,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "编辑成功",
type: "success",
});
this.eidDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
handleChange(val) {
console.log(val);
if (val == 1) {
this.eidDialogTitle = `编辑礼物面板信息-英语区`;
this.eidText = `英语区`;
} else if (val == 2) {
this.eidDialogTitle = `编辑礼物面板信息-阿拉伯区`;
this.eidText = `阿拉伯区`;
} else if (val == 4) {
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
this.eidText = `华语区`;
}else if (val == 8) {
this.eidDialogTitle = `编辑礼物面板信息-土耳其区`;
this.eidText = `土耳其区`;
}
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 70px;
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,457 @@
<template>
<div class="account-apply-manage">
<div class="container">
<div class="region-box">
<el-radio-group v-model="region">
<el-radio v-for="(item, index) in userAreaRegion"
:key="index"
:label="item.value">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<div class="handle-box">
<el-form ref="searchForm"
:model="searchForm"
label-width="90px"
:disabled="tableLoading">
<div class="search-line">
<el-form-item label="MoliStar ID"
prop="erbanNo">
<el-input v-model.trim="searchForm.erbanNo"
placeholder="Please enter"></el-input>
</el-form-item>
<el-form-item label="UID"
prop="uid">
<el-input v-model.trim="searchForm.uid"
placeholder="Please enter"></el-input>
</el-form-item>
<el-form-item label="SID"
prop="sid">
<el-input v-model.trim="searchForm.sid"
placeholder="Please enter"></el-input>
</el-form-item>
<el-form-item label="Region"
prop="partitionId">
<el-select v-model="searchForm.partitionId">
<el-option label="全部"
value=""></el-option>
<el-option v-for="item in partitionInfoList"
:key="item.id"
:label="item.desc"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label-width="40px">
<el-button type="primary"
@click="handSearch">Search</el-button>
<el-button plain
@click="resetSearchForm">Reset Search</el-button>
<el-upload class="file-uploader"
action="#"
list-type="picture-card"
:show-file-list="false"
:on-change="handleExcel"
accept=".xls, .xlsx"
:auto-upload="false">
<el-button type="primary">Import</el-button>
</el-upload>
</el-form-item>
</div>
</el-form>
<!-- <el-upload
class="file-uploader"
action="#"
list-type="picture-card"
:show-file-list="false"
:on-change="handleExcel"
accept=".xls, .xlsx"
:auto-upload="false"
>
<el-button type="primary" class="el-icon-upload">Import</el-button>
</el-upload> -->
</div>
<div class="table">
<el-table :data="tableData"
border
v-loading="tableLoading"
@header-click="headerCopy"
style="width: 100%">
<el-table-column align="center"
prop="id"
label="No.">
</el-table-column>
<el-table-column align="center"
prop="erbanNo"
label="MoliStar ID">
</el-table-column>
<el-table-column align="center"
prop="uid"
label="UID">
</el-table-column>
<el-table-column align="center"
prop="level"
label="SID Level">
</el-table-column>
<el-table-column align="center"
prop="nick"
label="Nickname">
</el-table-column>
<el-table-column align="center"
prop="partitionInfo"
label="Region">
</el-table-column>
<el-table-column align="center"
prop="createTime"
label="Apply time">
<template v-slot="scope">{{
convertTimestamp(scope.row.createTime)
}}</template>
</el-table-column>
<el-table-column align="center"
prop="prettyNo"
label="SID">
</el-table-column>
<el-table-column align="center"
prop="status"
label="State">
<template v-slot="scope">
<el-tag :type="applyStateTag(scope.row.status)">{{
applyStateText(scope.row.status)
}}</el-tag>
</template>
</el-table-column>
<el-table-column align="center"
prop="updateTime"
label="Review time">
<template v-slot="scope">{{
convertTimestamp(scope.row.updateTime)
}}</template>
</el-table-column>
<el-table-column align="center"
prop="operater"
label="Operator">
</el-table-column>
<el-table-column align="center"
label="Operate">
<template v-slot="scope">
<el-button type="text"
v-if="scope.row.status == 0"
@click="handlePass(scope.$index, scope.row)">
Pass
</el-button>
<el-button type="text"
v-if="scope.row.status == 0"
@click="handleReject(scope.$index, scope.row)">
Reject
</el-button>
<el-button type="text"
v-if="scope.row.status == 1"
class="red"
@click="handleDelete(scope.$index, scope.row)">
Delete
</el-button>
</template>
</el-table-column>
</el-table>
<table-pagination :pageParams="pageParams"
:pageTotal="pageTotal"
:ifShowSizes="true"
@handleSizeChange="handleSizeChange"
@handlePageChange="handlePageChange"></table-pagination>
</div>
</div>
</div>
</template>
<script>
import {
getPrettyNumberExamineList,
prettyNumberExaminePass,
prettyNumberExamineDelete,
prettyNumberExamineReject,
erbanUpload,
} from "@/api/relPrivilegeManage/relPrivilegeManage.js";
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
import TablePagination from "@/components/common/TablePagination";
import { formatDate } from "@/utils/relDate";
import { ElMessageBox, ElMessage } from "element-plus"; // 正确引入 ElM
// 混入
// import Mixin from '../../mixin/mixRegion.js';
export default {
name: "accountApplyManage",
// mixins: [Mixin],
components: { TablePagination },
data () {
return {
partitionInfoList: [],
tableLoading: false, // 表格是否加载中
tableData: [], // 接口返回的表格数据
// 搜索表单相关
searchForm: {
erbanNo: null,
uid: null,
sid: null,
partitionId: null,
},
pageTotal: 0, // 接口返回的表格总条数
pageParams: {
pageNo: 1,
pageSize: 10,
},
};
},
created () {
this.initPartition();
this.getData();
},
methods: {
getData () {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
getPrettyNumberExamineList(pageParams).then((res) => {
this.tableLoading = false;
if (res.code == 200) {
let data = res.data;
console.log(data);
this.tableData = data.rows;
this.pageTotal = data.total;
}
});
},
//导入表格
handleExcel (file) {
let formData = new FormData(); //声明一个FormDate对象
formData.append("file", file.raw); //把文件信息放入对象中
console.log(file.raw);
erbanUpload(formData)
.then((res) => {
if (res.code == 200) {
this.getData();
this.$message.success("Operation successful");
}
})
.catch((err) => {
// that.$message({
// type: 'error',
// message: 'Operation failed'
// });
});
},
// 通过
handlePass (index, row) {
ElMessageBox.confirm("Are you sure you want to pass?", "Prompt", {
type: "warning",
confirmButtonText: "Sure",
cancelButtonText: "Cancel",
})
.then(() => {
prettyNumberExaminePass({ id: row.id }).then((res) => {
if (res.code == 200) {
this.getData();
ElMessage({
showClose: true,
message: "Operation successful",
type: "success",
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
})
.catch(() => { });
},
// 拒绝
handleReject (index, row) {
ElMessageBox.confirm("Are you sure you want to refuse?", "Prompt", {
type: "warning",
confirmButtonText: "Sure",
cancelButtonText: "Cancel",
})
.then(() => {
prettyNumberExamineReject({ id: row.id }).then((res) => {
if (res.code == 200) {
this.getData();
ElMessage({
showClose: true,
message: "Operation successful",
type: "success",
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
})
.catch(() => { });
},
// 删除操作
handleDelete (index, row) {
// 二次确认删除
ElMessageBox.confirm("Are you sure you want to delete?", "Prompt", {
type: "warning",
confirmButtonText: "Sure",
cancelButtonText: "Cancel",
})
.then(() => {
prettyNumberExamineDelete({ id: row.id }).then((res) => {
if (res.code == 200) {
this.getData();
ElMessage({
showClose: true,
message: "Operation successful",
type: "success",
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
})
.catch(() => { });
},
// 点击搜索
handSearch () {
this.$refs["searchForm"].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
},
// 重置搜索表单
resetSearchForm () {
this.$refs["searchForm"].resetFields();
this.pageParams.pageNo = 1;
this.getData();
},
// 分页导航
handleSizeChange (val) {
this.pageParams.pageNo = val;
this.getData();
},
handlePageChange (val) {
this.pageParams.pageNo = val;
this.getData();
},
headerCopy (column, e) {
this.$copy(column.label);
},
initPartition () {
getPartitionInfoList().then(res => {
let data = res.data;
this.partitionInfoList = data;
});
},
},
computed: {
applyStateTag () {
return function (val) {
let text = "";
switch (val) {
case 0:
text = "warning";
break;
case 1:
text = "success";
break;
case 2:
text = "info";
break;
case 3:
text = "danger";
break;
}
return text;
};
},
applyStateText () {
return function (val) {
let text = "";
switch (val) {
case 0:
text = "In Review";
break;
case 1:
text = "Passed";
break;
case 2:
text = "Rejected";
break;
case 3:
text = "Deleted";
break;
}
return text;
};
},
convertTimestamp () {
return function (time) {
let date = new Date(time);
return formatDate(date);
};
},
},
};
</script>
<style lang="scss">
.red {
color: rgb(241, 19, 19);
}
// ::v-deep {
// .el-upload--picture-card {
// background-color: transparent;
// border: 0;
// border-radius: 0;
// box-sizing: border-box;
// width: 0;
// height: 45px;
// line-height: 0;
// vertical-align: top;
// }
// }
.file-uploader {
display: block;
margin-left: 51px;
input {
display: none;
}
.el-upload {
background-color: transparent;
border: 0;
border-radius: 0;
box-sizing: border-box;
width: 0;
height: 45px;
line-height: 0;
vertical-align: top;
}
span {
display: block;
}
}
</style>

View File

@@ -8,149 +8,247 @@
<section class="content">
<div id="table"></div>
<div id="toolbar">
奖品类别<select name="prizeType" id="prizeType" class="input-m">
奖品类别<select name="prizeType"
id="prizeType"
class="input-m">
<option value="0">--全部--</option>
<option value="1">钻石</option>
<option value="2">线上礼物</option>
<option value="3">座驾</option>
<option value="4">头饰</option>
<option value="6">实体奖品</option>
<!-- <option value="6">实体奖品</option>
<option value="10">锤子</option>
<option value="11">贵族爵位</option>
<option value="12">萝卜</option>
<option value="13">祝福语</option>
<option value="13">祝福语</option> -->
<option value="14">铭牌</option>
<option value="16">聊天气泡</option>
<option value="17">资料卡</option>
<option value="18">勋章</option>
<option value="19">VIP</option>
</select>
<button id="add" class="btn btn-default">
<button id="add"
class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnSearch"
class="btn btn-sm btn-primary">查询</button>
</div>
</section>
</div>
</div>
</section>
<div class="modal fade" id="activityAwardModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="activityAwardModal"
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">x</span></button>
<h4 class="modal-title" id="modalLabel">活动奖品信息</h4>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title"
id="modalLabel">活动奖品信息</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="activityAwardForm">
<div class="form-group" id="addModalLabel">
<label for="addType" class="col-sm-3 control-label">奖品类型</label>
<form class="form-horizontal"
id="activityAwardForm">
<div class="form-group"
id="addModalLabel">
<label for="addType"
class="col-sm-3 control-label">奖品类型</label>
<div class="col-sm-8" style="padding-top:7px;">
<select name="addType" id="addType" data-btn-class="btn btn-warning">
<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="2">线上礼物</option>
<option value="3">座驾</option>
<option value="4">头饰</option>
<option value="6">实体奖品</option>
<!-- <option value="6">实体奖品</option>
<option value="10">锤子</option>
<option value="11">贵族爵位</option>
<option value="12">萝卜</option>
<option value="13">祝福语</option> -->
<option value="14">铭牌</option>
<option value="16">聊天气泡</option>
<option value="17">资料卡</option>
<option value="18">勋章</option>
<option value="19">VIP</option>
</select>
</div>
</div>
<!-- 线上礼物 -->
<div class="form-group giftChoose awardList">
<label for="giftChoose" class="col-sm-3 control-label">选择礼物</label>
<label for="giftChoose"
class="col-sm-3 control-label">选择礼物</label>
<div class="col-sm-8">
<select name="giftChoose" id="giftChoose" class="combobox">
<select name="giftChoose"
id="giftChoose"
class="combobox">
</select>
</div>
</div>
<!-- 座驾 -->
<div class="form-group carChoose awardList">
<label for="carChoose" class="col-sm-3 control-label">选择座驾</label>
<label for="carChoose"
class="col-sm-3 control-label">选择座驾</label>
<div class="col-sm-8">
<select name="carChoose" id="carChoose" class="combobox">
<select name="carChoose"
id="carChoose"
class="combobox">
</select>
</div>
</div>
<!-- 头饰 -->
<div class="form-group headwearChoose awardList">
<label for="headwearChoose" class="col-sm-3 control-label">选择头饰</label>
<label for="headwearChoose"
class="col-sm-3 control-label">选择头饰</label>
<div class="col-sm-8">
<select name="headwearChoose" id="headwearChoose" class="combobox">
</select>
</div>
</div>
<!-- 贵族 -->
<div class="form-group nobleChoose awardList">
<label for="nobleChoose" class="col-sm-3 control-label">选择爵位</label>
<div class="col-sm-8">
<select name="nobleChoose" id="nobleChoose" class="combobox">
<option value="1">男爵</option>
<option value="2">子爵</option>
<option value="3">伯爵</option>
<option value="4">侯爵</option>
<option value="5">公爵</option>
<option value="6">国王</option>
<option value="7">皇帝</option>
<select name="headwearChoose"
id="headwearChoose"
class="combobox">
</select>
</div>
</div>
<!-- 头饰 -->
<div class="form-group nameplateChoose awardList">
<label for="nameplateChoose" class="col-sm-3 control-label">选择头饰</label>
<label for="nameplateChoose"
class="col-sm-3 control-label">选择铭牌</label>
<div class="col-sm-8">
<select name="nameplateChoose" id="nameplateChoose" class="combobox">
<select name="nameplateChoose"
id="nameplateChoose"
class="combobox">
</select>
</div>
</div>
<!-- 聊天气泡 -->
<div class="form-group chatBubbleChoose awardList">
<label for="chatBubbleChoose"
class="col-sm-3 control-label">选择气泡</label>
<div class="col-sm-8">
<select name="chatBubbleChoose"
id="chatBubbleChoose"
class="combobox">
</select>
</div>
</div>
<!-- 资料卡 -->
<div class="form-group infoCardChoose awardList">
<label for="infoCardChoose"
class="col-sm-3 control-label">选择资料卡</label>
<div class="col-sm-8">
<select name="infoCardChoose"
id="infoCardChoose"
class="combobox">
</select>
</div>
</div>
<!-- 勋章 -->
<div class="form-group medalChoose awardList">
<label for="medalChoose"
class="col-sm-3 control-label">选择勋章</label>
<div class="col-sm-8">
<select name="medalChoose"
id="medalChoose"
class="combobox">
</select>
</div>
</div>
<!-- 贵族 -->
<div class="form-group vipChoose awardList">
<label for="vipChoose"
class="col-sm-3 control-label">选择vip等级</label>
<div class="col-sm-8">
<select name="vipChoose"
id="vipChoose"
class="combobox">
</select>
</div>
</div>
<div class="form-group">
<label for="prizeName" class="col-sm-3 control-label">奖品名称:</label>
<label for="prizeName"
class="col-sm-3 control-label">奖品名称:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="prizeName" id="prizeName">
<input type="hidden" id="prizeId" name="id">
<input type="text"
class="form-control validate[required]"
name="prizeName"
id="prizeName">
<input type="hidden"
id="prizeId"
name="id">
</div>
</div>
<div class="form-group refValue">
<label for="refValue" class="col-sm-3 control-label">使用天数:</label>
<label for="refValue"
class="col-sm-3 control-label">使用天数:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="refValue" id="refValue">
<input type="text"
class="form-control"
name="refValue"
id="refValue">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">奖品图:</label>
<div class="col-sm-8">
<img src="" id="imgUrl" style="width:90px;height:90px;" alt="">
<input type="file" id="uploadFile" name="uploadFile"
<img src=""
id="imgUrl"
style="width:90px;height:90px;"
alt="">
<input type="file"
id="uploadFile"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success" type="button" id="uploadBtn">上传</button>
<input type="hidden" id="prizeImgUrl" name="prizeImgUrl"
<button class="btn btn-success"
type="button"
id="uploadBtn">上传</button>
<input type="hidden"
id="prizeImgUrl"
name="prizeImgUrl"
class="form-control validate[required]" />
</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>
<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>
<div id="imgMask"><img src="" alt=""></div>
<div id="imgMask"><img src=""
alt=""></div>
</template>
<script>
@@ -158,16 +256,16 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "ActivityAwardAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
var $form = $('#activityAwardForm');
var $awardList = $('.awardList');
@@ -190,33 +288,20 @@ export default {
case 4:
return '头饰';
case 5:
return '背景';
case 6:
return '实物';
case 7:
return '靓号';
case 8:
return '全麦礼物';
case 9:
return '随机靓号';
case 10:
return '锤子';
case 11:
return '贵族爵位';
case 12:
return '萝卜';
case 14:
return '铭牌';
case 16:
return '气泡';
case 17:
return '资料卡';
case 18:
return '勋章';
case 19:
return 'VIP';
}
}
},
@@ -280,7 +365,7 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
@@ -339,7 +424,7 @@ export default {
$awardList.eq(2).find('input[type="hidden"]').val(referenceId);
$('#refValue').val(data.referenceValue);
$('.refValue').show();
} else if (prizeType == 11) {
} else if (prizeType == 14) {
$awardList.eq(3).show().siblings('.awardList').hide();
$awardList.eq(3).find('select').val(data.referenceId);
$selected = $awardList.eq(3).find('select option:selected');
@@ -349,7 +434,7 @@ export default {
$awardList.eq(3).find('input[type="hidden"]').val(referenceId);
$('#refValue').val(data.referenceValue);
$('.refValue').show();
} else if (prizeType == 14) {
} else if (prizeType == 16) {
$awardList.eq(4).show().siblings('.awardList').hide();
$awardList.eq(4).find('select').val(data.referenceId);
$selected = $awardList.eq(4).find('select option:selected');
@@ -359,6 +444,36 @@ export default {
$awardList.eq(4).find('input[type="hidden"]').val(referenceId);
$('#refValue').val(data.referenceValue);
$('.refValue').show();
} else if (prizeType == 17) {
$awardList.eq(5).show().siblings('.awardList').hide();
$awardList.eq(5).find('select').val(data.referenceId);
$selected = $awardList.eq(5).find('select option:selected');
referenceId = $selected.val();
awardName = $selected.text();
$awardList.eq(5).find('input[type="text"]').val(awardName);
$awardList.eq(5).find('input[type="hidden"]').val(referenceId);
$('#refValue').val(data.referenceValue);
$('.refValue').show();
} else if (prizeType == 18) {
$awardList.eq(6).show().siblings('.awardList').hide();
$awardList.eq(6).find('select').val(data.referenceId);
$selected = $awardList.eq(6).find('select option:selected');
referenceId = $selected.val();
awardName = $selected.text();
$awardList.eq(6).find('input[type="text"]').val(awardName);
$awardList.eq(6).find('input[type="hidden"]').val(referenceId);
$('#refValue').val(data.referenceValue);
$('.refValue').show();
} else if (prizeType == 19) {
$awardList.eq(7).show().siblings('.awardList').hide();
$awardList.eq(7).find('select').val(data.referenceId);
$selected = $awardList.eq(7).find('select option:selected');
referenceId = $selected.val();
awardName = $selected.text();
$awardList.eq(7).find('input[type="text"]').val(awardName);
$awardList.eq(7).find('input[type="hidden"]').val(referenceId);
$('#refValue').val(data.referenceValue);
$('.refValue').show();
} else {
$awardList.hide();
}
@@ -390,12 +505,21 @@ export default {
} else if (val == 4) {
$awardList.eq(2).show().siblings('.awardList').hide();
$('.refValue').show();
} else if (val == 11) {
} else if (val == 14) {
$awardList.eq(3).show().siblings('.awardList').hide();
$('.refValue').show();
} else if (val == 14) {
} else if (val == 16) {
$awardList.eq(4).show().siblings('.awardList').hide();
$('.refValue').show();
} else if (val == 17) {
$awardList.eq(5).show().siblings('.awardList').hide();
$('.refValue').show();
} else if (val == 18) {
$awardList.eq(6).show().siblings('.awardList').hide();
$('.refValue').show();
} else if (val == 19) {
$awardList.eq(7).show().siblings('.awardList').hide();
$('.refValue').show();
}
})
$('#save').on('click', function () {
@@ -409,7 +533,8 @@ export default {
return;
}
var refValue = $('#refValue').val();
if (prizeType == 3 || prizeType == 4 || prizeType == 11 || prizeType == 14) {
if (prizeType == 3 || prizeType == 4 || prizeType == 11 || prizeType == 14 || prizeType == 16
|| prizeType == 17 || prizeType == 18 || prizeType == 19) {
if (!refValue) {
$("#tipMsg").text("使用天数必填");
$("#tipModal").modal('show');
@@ -491,7 +616,7 @@ export default {
$('#imgMask').hide();
});
function combineDataFromBack() {
function combineDataFromBack () {
$.get('/admin/gift/' +
'getAllGiftList?consumeType=1&consumeType=2', function (res) {
if (res.code == 200) {
@@ -540,9 +665,57 @@ export default {
}
$('#nameplateChoose').combobox();
})
$.get('/admin/infocard/total/list', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
// car.push(res.data[i]);
var str = '<option value="' + res.data[i].id + '">' + res.data[i].name + '</option>';
$('#infoCardChoose').append(str);
}
}
$('#infoCardChoose').combobox();
})
$.get('/admin/chatbubble/total/list', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
// car.push(res.data[i]);
var str = '<option value="' + res.data[i].id + '">' + res.data[i].name + '</option>';
$('#chatBubbleChoose').append(str);
}
}
$('#chatBubbleChoose').combobox();
})
$.get('/admin/medal/listAll', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
// car.push(res.data[i]);
var str = '<option value="' + res.data[i].id + '">' + res.data[i].name + '</option>';
$('#medalChoose').append(str);
}
}
$('#medalChoose').combobox();
})
$.get('/admin/vip/listAll', {}, function (res) {
if (res.code == 200) {
for (var i = 0; i < res.data.length; i++) {
// car.push(res.data[i]);
var str = '<option value="' + res.data[i].vipLevel + '">' + res.data[i].vipName + '</option>';
$('#vipChoose').append(str);
}
}
$('#vipChoose').combobox();
})
}
function getReferenceIdAndStatus(prizeType) {
function getReferenceIdAndStatus (prizeType) {
console.log(prizeType);
var referenceId = 0;
var val;
@@ -562,19 +735,31 @@ export default {
val = $form.find('input[name="headwearChoose"]').val();
referenceId = val ? val : false;
break;
case 11:
val = $form.find('#nobleChoose').val();
referenceId = val ? val : false;
break;
case 14:
val = $form.find('#nameplateChoose').val();
referenceId = val ? val : false;
break;
case 16:
val = $form.find('#chatBubbleChoose').val();
referenceId = val ? val : false;
break;
case 17:
val = $form.find('#infoCardChoose').val();
referenceId = val ? val : false;
break;
case 18:
val = $form.find('#medalChoose').val();
referenceId = val ? val : false;
break;
case 19:
val = $form.find('#vipChoose').val();
referenceId = val ? val : false;
break;
}
return referenceId;
}
function clearModal() {
function clearModal () {
$('#activityAwardForm').find('input[type=text],select,input[type=hidden],input[type=file]').each(function () {
$(this).val('');
});
@@ -584,7 +769,7 @@ export default {
// $('#addForm').find('select option').attr('selected',false);
}
function clearAwardList() {
function clearAwardList () {
$('.awardList').find('input').val('');
}
})

982
src/views/boom/levelSet.vue Normal file
View File

@@ -0,0 +1,982 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>分区</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 but" type="primary" @click="getData()"
>查询</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="levelName" align="center" label="Boom等级" />
<el-table-column prop="goldNum" align="center" label="金币任务数" />
<el-table-column prop="countDownVapUrl" align="center" label="Boom等级图">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.pic"
:zoom-rate="1.1"
:preview-src-list="[scope.row.pic]"
fit="contain"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="x" align="center" label="Boom倒计时">
<template v-slot="scope">
<video
:key="scope.row.countDownVapUrl"
width="320"
height="240"
controls="controls"
>
<source :src="scope.row.countDownVapUrl" type="video/mp4" /></video
></template>
</el-table-column>
<el-table-column prop="x" align="center" label="Boon"
><template v-slot="scope">
<video
:key="scope.row.endVapUrl"
width="320"
height="240"
controls="controls"
>
<source :src="scope.row.endVapUrl" type="video/mp4" /></video
></template>
</el-table-column>
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
eidObj.level = scope.row.level;
eidObj.goldNum = scope.row.goldNum;
eidObj.imageUrl1 = scope.row.pic;
eidObj.imageUrl2 = scope.row.countDownVapUrl;
eidObj.imageUrl3 = scope.row.endVapUrl;
id = scope.row.id;
eidDialogBox = true;
"
type="text"
size="default"
>编辑</el-button
>
<el-button
@click="
member.level = scope.row.level;
member.goldNum = scope.row.goldNum;
seeList(scope.row);
"
type="text"
size="default"
>查看明细</el-button
>
<el-button
@click="
member.level = scope.row.level;
member.goldNum = scope.row.goldNum;
id = scope.row.level;
eidList(scope.row);
"
type="text"
size="default"
>编辑明细</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 等级奖励配置查看 -->
<el-dialog v-model="memberDialog" title="等级奖励配置(查看)" center>
<div class="inquire">
<span>Boom等级{{ member.level }}</span>
</div>
<div class="inquire">
<span>金币任务数量{{ member.goldNum }}</span>
</div>
<!-- 内嵌表格 -->
<el-table
:data="member.tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="seq" align="center" label="排序" />
<el-table-column prop="x" align="center" label="奖品类型">
<template v-slot="scope">
{{
scope.row.awardType == 8
? "金币"
: scope.row.awardType == 6
? "礼物"
: scope.row.awardType == 5
? "座驾"
: scope.row.awardType == 1
? "头饰"
: scope.row.awardType == 3
? "气泡"
: scope.row.awardType == 10
? "VIP"
: scope.row.awardType == 11
? "勋章"
: "铭牌"
}}
</template>
</el-table-column>
<el-table-column prop="awardNum" align="center" label="奖品天数" />
<el-table-column prop="type" align="center" label="用户身份">
<template v-slot="scope">
{{ scope.row.type == 1 ? "固定身份" : "随机身份" }}
</template>
</el-table-column>
<el-table-column
prop="awardId"
align="center"
label="奖品ID/VIP等级1"
/>
<el-table-column prop="isShow" align="center" label="是否展示">
<template v-slot="scope">
{{ scope.row.isShow == 1 ? "" : "" }}
</template>
</el-table-column>
<el-table-column prop="awardStock" align="center" label="奖品库存" />
<el-table-column prop="awardPic" align="center" label="奖励图片">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.awardPic"
:zoom-rate="1.1"
:preview-src-list="[scope.row.awardPic]"
fit="contain"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="memberDialog = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
<!-- 等级奖励配置编辑 -->
<el-dialog v-model="eidDialog" title="等级奖励配置(编辑)" center>
<div class="inquire">
<span>Boom等级{{ member.level }}</span>
</div>
<div class="inquire">
<span>金币任务数量{{ member.goldNum }}</span>
</div>
<!-- 内嵌表格 -->
<el-table
:data="eid.tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="seq" align="center" label="排序" />
<el-table-column prop="x" align="center" label="奖品类型">
<template v-slot="scope">
{{
scope.row.awardType == 8
? "金币"
: scope.row.awardType == 6
? "礼物"
: scope.row.awardType == 5
? "座驾"
: scope.row.awardType == 1
? "头饰"
: scope.row.awardType == 3
? "气泡"
: scope.row.awardType == 10
? "VIP"
: scope.row.awardType == 11
? "勋章"
: "铭牌"
}}
</template>
</el-table-column>
<el-table-column prop="awardNum" align="center" label="奖品天数" />
<el-table-column prop="type" align="center" label="用户身份">
<template v-slot="scope">
{{ scope.row.type == 1 ? "固定身份" : "随机身份" }}
</template>
</el-table-column>
<el-table-column prop="awardId" align="center" label="奖品ID/VIP等级" />
<el-table-column prop="awardPic" align="center" label="奖励图片">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.awardPic"
:zoom-rate="1.1"
:preview-src-list="[scope.row.awardPic]"
fit="contain"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="isShow" align="center" label="是否展示">
<template v-slot="scope">
{{ scope.row.isShow == 1 ? "" : "" }}
</template>
</el-table-column>
<el-table-column prop="awardStock" align="center" label="奖品库存" />
<el-table-column prop="x" align="center" label="操作">
<template v-slot="scope">
<el-button @click="editFun(scope.row)" type="text" size="default"
>编辑</el-button
>
<el-button @click="delFun(scope.row)" type="text" size="default"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="addDialog = true">
增加一条
</el-button>
<el-button type="primary" @click="eidDialog = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
<!-- 增加一条弹窗 -->
<el-dialog
v-model="addDialog"
title="等级奖励配置(新增)"
class="addBox"
center
width="26%"
>
<div class="inquire">
<span>奖品类型</span>
<el-select filterable v-model="addObj.giftVal" placeholder="请选择">
<el-option
v-for="item in addObj.giftType"
:key="item.id"
:label="item.desc"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>用户身份</span>
<el-select filterable v-model="addObj.type" placeholder="请选择">
<el-option
v-for="item in addObj.typeArr"
:key="item.id"
:label="item.desc"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>奖品ID/VIP等级:</span>
<el-input
v-model="addObj.giftId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>奖励数量/天数</span>
<el-input
v-model="addObj.giftNum"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>库存</span>
<el-input
v-model="addObj.awardStock"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>顺序:</span>
<el-input v-model="addObj.sNo" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>是否展示</span>
<el-select filterable v-model="addObj.showVal" placeholder="请选择">
<el-option
v-for="item in addObj.show"
:key="item.id"
:label="item.desc"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>奖励图片</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess4"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img v-if="addObj.imageUrl" :src="addObj.imageUrl" class="avatar" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="addFun()"> 保存 </el-button>
<el-button type="primary" @click="addDialog = false">
取消
</el-button>
</span>
</template>
</el-dialog>
<!-- 编辑弹窗 -->
<el-dialog
v-model="editDialog"
title="等级奖励配置(编辑)"
class="addBox"
center
width="26%"
>
<div class="inquire">
<span>奖品类型</span>
<el-select filterable v-model="editObj.giftVal" placeholder="请选择">
<el-option
v-for="item in editObj.giftType"
:key="item.id"
:label="item.desc"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>用户身份</span>
<el-select filterable v-model="editObj.type" placeholder="请选择">
<el-option
v-for="item in editObj.typeArr"
:key="item.id"
:label="item.desc"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>奖品ID/VIP等级:</span>
<el-input
v-model="editObj.giftId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>奖励数量/天数</span>
<el-input
v-model="editObj.giftNum"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>库存</span>
<el-input
v-model="editObj.awardStock"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>顺序:</span>
<el-input v-model="editObj.sNo" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>是否展示</span>
<el-select filterable v-model="editObj.showVal" placeholder="请选择">
<el-option
v-for="item in editObj.show"
:key="item.id"
:label="item.desc"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>奖励图片</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess5"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img v-if="editObj.imageUrl" :src="editObj.imageUrl" class="avatar" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="editSaveFun()"> 保存 </el-button>
<el-button type="primary" @click="editDialog = false">
取消
</el-button>
</span>
</template>
</el-dialog>
<!-- 编辑弹窗 -->
<el-dialog
v-model="eidDialogBox"
title="编辑"
class="addBox"
center
width="26%"
>
<div class="inquire">
<span>BOOM等级</span>
<el-input
v-model="eidObj.level"
placeholder=""
class="input"
disabled
></el-input>
</div>
<div class="inquire">
<span>金币任务数</span>
<el-input
v-model="eidObj.goldNum"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span style="float: left">等级图</span>
<el-upload
style="float: left"
class="avatar-uploader input"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess1"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img v-if="eidObj.imageUrl1" :src="eidObj.imageUrl1" class="avatar" />
<el-icon v-else class="avatar-uploader-icon">
<Plus />
</el-icon>
</el-upload>
</div>
<div class="inquire">
<span style="float: left">倒计时</span>
<el-upload
style="float: left; width: 200px; height: 150px"
class="avatar-uploader input"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess2"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<video
v-if="eidObj.imageUrl2"
:key="eidObj.imageUrl2"
autoplay
width="320"
height="240"
controls="controls"
>
<source :src="eidObj.imageUrl2" type="video/mp4" />
</video>
</el-upload>
</div>
<div class="inquire">
<span style="float: left">Boom</span>
<el-upload
style="float: left; width: 200px; height: 150px"
class="avatar-uploader input"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess3"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<video
v-if="eidObj.imageUrl3"
:key="eidObj.imageUrl3"
autoplay
width="320"
height="240"
controls="controls"
>
<source :src="eidObj.imageUrl3" type="video/mp4" />
</video>
</el-upload>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="levelUpdateFun()"> 保存 </el-button>
<el-button type="primary" @click="eidDialogBox = false">
取消
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
levelList,
levelUpdate,
awardList,
awardUpdate,
awardDel,
} from "@/api/boom/boom";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "levelSet",
data() {
return {
id: "",
loading: false,
//查询所需条件对象
inquire: {
partitionId: 2,
options: [],
},
// 表格
tableData: [],
// 内嵌表格查看
memberDialog: false,
member: {
level: "",
goldNum: "",
tableData: [],
},
// 内嵌表格编辑
eidDialog: false,
eid: {
tableData: [],
},
// 编辑弹窗
editDialog: false,
editObj: {
imageUrl: "",
giftVal: 8,
giftType: [
{ desc: "金币", value: 8 },
{ desc: "礼物", value: 6 },
{ desc: "座驾", value: 5 },
{ desc: "头饰", value: 1 },
{ desc: "气泡", value: 3 },
{ desc: "VIP", value: 10 },
{ desc: "勋章", value: 11 },
{ desc: "铭牌", value: 2 },
],
type: "",
typeArr: [
{ desc: "固定身份", value: 1 },
{ desc: "随机身份", value: 2 },
],
giftId: "",
giftNum: "",
awardStock: "",
sNo: "",
showVal: "",
id: "",
show: [
{ desc: "是", value: 1 },
{ desc: "否", value: 0 },
],
},
// 新增弹窗
addDialog: false,
addObj: {
imageUrl: "",
giftVal: 8,
giftType: [
{ desc: "金币", value: 8 },
{ desc: "礼物", value: 6 },
{ desc: "座驾", value: 5 },
{ desc: "头饰", value: 1 },
{ desc: "气泡", value: 3 },
{ desc: "VIP", value: 10 },
{ desc: "勋章", value: 11 },
{ desc: "铭牌", value: 2 },
],
type: "",
typeArr: [
{ desc: "固定身份", value: 1 },
{ desc: "随机身份", value: 2 },
],
giftId: "",
giftNum: "",
awardStock: "",
sNo: "",
showVal: "",
show: [
{ desc: "是", value: 1 },
{ desc: "否", value: 0 },
],
},
//编辑
eidDialogBox: false,
eidObj: {
level: "",
goldNum: "",
imageUrl1: "",
imageUrl2: "",
imageUrl3: "",
},
// 分页
total: 0, //总页数
currentPage: 1, //页码
pageSize: 5, //条数
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.partitionId = res.data[0].id;
this.getData();
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
levelList({
partitionId: this.inquire.partitionId,
}).then((res) => {
if (res.code == 200) {
// this.total = res.data.total;
// this.tableData = res.data.records;
this.tableData = res.data;
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 编辑弹窗
editFun(val) {
this.editObj.giftVal = val.awardType;
this.editObj.giftNum = val.awardNum;
this.editObj.giftId = val.awardId;
this.editObj.awardStock = val.awardStock;
this.editObj.sNo = val.seq;
this.editObj.showVal = val.isShow;
this.editObj.type = val.type;
this.editObj.imageUrl = val.awardPic;
this.editObj.id = val.id;
this.editDialog = true;
},
// 确认编辑弹窗
editSaveFun() {
var level = this.id;
var obj = {
awardType: this.editObj.giftVal,
awardNum: this.editObj.giftNum,
awardId: this.editObj.giftId,
awardStock: this.editObj.awardStock,
seq: this.editObj.sNo,
isShow: this.editObj.showVal,
type: this.editObj.type,
awardPic: this.editObj.imageUrl,
id: this.editObj.id,
partitionId: this.inquire.partitionId,
level,
};
awardUpdate(obj).then((res) => {
if (res.code == 200) {
this.editDialog = false;
awardList({
level,
partitionId: this.inquire.partitionId,
}).then((res) => {
this.eid.tableData = res.data;
ElMessage({
showClose: true,
message: "成功",
type: "success",
});
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 新增
addFun() {
var level = this.id;
var obj = {
awardType: this.addObj.giftVal,
awardNum: this.addObj.giftNum,
awardId: this.addObj.giftId,
awardStock: this.addObj.awardStock,
seq: this.addObj.sNo,
isShow: this.addObj.showVal,
type: this.addObj.type,
awardPic: this.addObj.imageUrl,
partitionId: this.inquire.partitionId,
level,
};
awardUpdate(obj).then((res) => {
if (res.code == 200) {
this.addDialog = false;
awardList({
level,
partitionId: this.inquire.partitionId,
}).then((res) => {
this.eid.tableData = res.data;
ElMessage({
showClose: true,
message: "成功",
type: "success",
});
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 删除
delFun(val) {
var level = this.id;
awardDel({
id: val.id,
}).then((res) => {
if (res.code == 200) {
awardList({
level,
partitionId: this.inquire.partitionId,
}).then((res) => {
this.eid.tableData = res.data;
ElMessage({
showClose: true,
message: "成功",
type: "success",
});
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 查看明细
seeList(val) {
awardList({
level: val.level,
partitionId: this.inquire.partitionId,
}).then((res) => {
this.memberDialog = true;
this.member.tableData = res.data;
});
},
eidList(val) {
awardList({
level: val.level,
partitionId: this.inquire.partitionId,
}).then((res) => {
this.eidDialog = true;
this.eid.tableData = res.data;
});
},
// 编辑列表
levelUpdateFun() {
var obj = {
id: this.id,
level: this.eidObj.level,
goldNum: this.eidObj.goldNum,
pic: this.eidObj.imageUrl1,
countDownVapUrl: this.eidObj.imageUrl2,
endVapUrl: this.eidObj.imageUrl3,
partition: this.inquire.partitionId,
};
levelUpdate(obj).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "编辑成功!",
type: "success",
});
this.eidDialogBox = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.success,
type: "error",
});
}
});
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中,可能较慢,请等待上穿成功的提示在操作下一步~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess1(res, file) {
console.log(file);
// this.ediObj.imageUrl = URL.createObjectURL();
this.eidObj.imageUrl1 = res.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess2(res, file) {
console.log(file);
// this.ediObj.imageUrl = URL.createObjectURL();
this.eidObj.imageUrl2 = res.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess3(res, file) {
console.log(file);
// this.ediObj.imageUrl = URL.createObjectURL();
this.eidObj.imageUrl3 = res.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess4(res, file) {
console.log(file);
// this.ediObj.imageUrl = URL.createObjectURL();
this.addObj.imageUrl = res.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess5(res, file) {
console.log(file);
// this.ediObj.imageUrl = URL.createObjectURL();
this.editObj.imageUrl = res.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;
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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
.addBox {
.el-dialog__body {
.inquire {
span {
margin-right: 10px;
width: 113px;
display: inline-block;
}
.input {
width: 180px;
margin-right: 10px;
}
}
}
}
</style>

View File

@@ -0,0 +1,414 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>分区</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>
<div class="inquire">
<span>房间ID:</span>
<el-input
v-model="inquire.roomId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>BOOM等级:</span>
<el-input
v-model="inquire.boomLevel"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>触发者ID</span>
<el-input
v-model="inquire.triggererId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">开始时间</span>
<el-date-picker
v-model="inquire.time[0]"
type="datetime"
placeholder="开始时间"
>
</el-date-picker>
</div>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">结束时间</span>
<el-date-picker
v-model="inquire.time[1]"
type="datetime"
placeholder="结束时间"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button class="primary but" type="primary" @click="getData()"
>查询</el-button
>
<el-button
class="primary"
type="primary"
@click="
inquire.partitionId = inquire.options[0].id;
inquire.roomId = '';
inquire.boomLevel = '';
inquire.triggererId = '';
inquire.time = [];
getData();
"
>重置查询</el-button
>
<el-button
class="primary"
type="primary"
@click="diamondStatisticsExportFun()"
>导出</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="cycleDate" align="center" label="日期" />
<el-table-column prop="roomErbanNo" align="center" label="房间ID" />
<el-table-column prop="level" align="center" label="Boom等级" />
<el-table-column prop="erbanNo" align="center" label="触发者ID" />
<el-table-column prop="drawTime" align="center" label="触发时间" />
<el-table-column prop="num" align="center" label="参与用户数" />
<el-table-column prop="awardNum" align="center" label="发放奖励数" />
<el-table-column prop="ownerGold" align="center" label="获得金币数" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
memberVal = scope.row;
detailListFun();
"
type="text"
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-loading="loading2"
v-model="memberDialog"
title="贡献或获奖明细"
center
>
<!-- 内嵌表格 -->
<el-table
:data="member.tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="roleType" align="center" label="角色">
<template v-slot="scope">
{{
scope.row.roleType == 1
? "房主"
: scope.row.roleType == 2
? "贡献榜1"
: scope.row.roleType == 3
? "贡献榜2"
: scope.row.roleType == 4
? "贡献榜3"
: scope.row.roleType == 5
? "boom触发者"
: scope.row.roleType == 6
? "房内普通用户"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="erbanNo" align="center" label="用户ID" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="exper" align="center" label="贡献值" />
<el-table-column prop="level" align="center" label="Boom等级" />
<el-table-column prop="awardType" align="center" label="奖品类型">
<template v-slot="scope">
{{
scope.row.awardType == 8
? "金币"
: scope.row.awardType == 6
? "礼物"
: scope.row.awardType == 5
? "座驾"
: scope.row.awardType == 1
? "头饰"
: scope.row.awardType == 3
? "气泡"
: scope.row.awardType == 10
? "VIP"
: scope.row.awardType == 11
? "勋章"
: "铭牌"
}}
</template>
</el-table-column>
<el-table-column prop="awardName" align="center" label="获得奖励" />
<el-table-column prop="awardNum" align="center" label="获得奖励数" />
<el-table-column
prop="createTime"
align="center"
label="奖励发放时间"
/>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="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"
/>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="memberDialog = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
recordList,
detailList,
recordExport,
} from "@/api/boom/boom";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "recordData",
data() {
return {
loading: false,
loading2: false,
//查询所需条件对象
inquire: {
partitionId: 2,
options: [],
roomId: "",
boomLevel: "",
triggererId: "",
time: [],
},
// 表格
tableData: [],
// 内嵌表格
memberDialog: false,
memberVal: null,
member: {
tableData: [],
},
// 新增弹窗
addDialog: false,
// 分页
total: 0, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 分页
total2: 0, //总页数
currentPage2: 1, //页码
pageSize2: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.partitionId = res.data[0].id;
this.getData();
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = null;
let endTime = null;
if (time.length > 0) {
startTime = this.inquire.time[0]
? dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss")
: null;
endTime = this.inquire.time[1]
? dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss")
: null;
}
recordList({
partitionId: this.inquire.partitionId,
erbanNo: this.inquire.triggererId,
level: this.inquire.boomLevel,
roomErbanNo: this.inquire.roomId,
startTime: startTime,
endTime: endTime,
pageNo: 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",
});
}
});
},
// 详细弹窗
detailListFun() {
this.loading2 = true;
let time = this.inquire.time;
let startTime = null;
let endTime = null;
if (time.length > 0) {
startTime = this.inquire.time[0]
? dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss")
: null;
endTime = this.inquire.time[1]
? dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss")
: null;
}
detailList({
partitionId: this.inquire.partitionId,
signId: this.memberVal.signId,
level: this.memberVal.level,
startTime: startTime,
endTime: endTime,
pageNo: this.currentPage2,
pageSize: this.pageSize2,
}).then((res) => {
if (res.code == 200) {
this.total2 = res.data.total;
this.member.tableData = res.data.records;
this.memberDialog = true;
this.loading2 = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
diamondStatisticsExportFun() {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time.length > 0) {
startTime = this.inquire.time[0]
? dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss")
: "";
endTime = this.inquire.time[1]
? dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss")
: "";
}
recordExport({
partitionId: this.inquire.partitionId,
erbanNo: this.inquire.triggererId,
level: this.inquire.boomLevel,
roomErbanNo: this.inquire.roomId,
startTime: startTime,
endTime: endTime,
}).then();
},
// 分页详情导航
handleSizeChange2() {
this.detailListFun();
},
handleCurrentChange2() {
this.detailListFun();
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</style>

View File

@@ -70,6 +70,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div>
</div>
<div class="form-group">
@@ -101,6 +102,12 @@
<input type="text" class="form-control validate[required]" name="name" id="en_name">
</div>
</div>
<div class="form-group">
<label for="tr_name" class="col-sm-3 control-label">土耳其驾名称</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="tr_name">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用萝卜购买</label>
@@ -438,6 +445,7 @@ export default {
{field: 'name.zh', title: '座驾名称', align: 'center', width: '20%'},
{field: 'name.ar', title: '阿语座驾名称', align: 'center', width: '20%'},
{field: 'name.en', title: '英语座驾名称', align: 'center', width: '20%'},
{field: 'name.tr', title: '土耳其名称', align: 'center', width: '20%'},
{
field: 'partitionFlag',
title: '地区',
@@ -454,6 +462,9 @@ export default {
if ((val & 4) != 0) {
value += '华语区<br>';
}
if ((val & 8) != 0) {
value += '土耳其区<br>';
}
return value;
}
},
@@ -664,9 +675,11 @@ export default {
$('#name').val('');
$('#ar_name').val('');
$('#en_name').val('');
$('#tr_name').val('');
$("#name").attr('readonly', false);
$("#ar_name").attr('readonly', false);
$("#en_name").attr('readonly', false);
$("#tr_name").attr('readonly', false);
// $("#price").attr('readonly', false);
// $("#renewPrice").attr('readonly', false);
$("#seq").val('');
@@ -865,10 +878,12 @@ export default {
$("#name").val(jsonName.zh);
$("#ar_name").val(jsonName.ar);
$("#en_name").val(jsonName.en);
$("#tr_name").val(jsonName.tr);
} else {
$("#name").val(name);
$("#ar_name").val(name);
$("#en_name").val(name);
$("#tr_name").val(name);
}
$("#price").val(json.entity.price);
$("#renewPrice").val(json.entity.renewPrice);
@@ -997,6 +1012,11 @@ export default {
} else {
$("input:checkbox[name='partitionFlag']")[2].checked = false;
}
if ((partitionFlag & 8) != 0) {
$("input:checkbox[name='partitionFlag']")[3].checked = true;
} else {
$("input:checkbox[name='partitionFlag']")[3].checked = false;
}
// 打开编辑弹窗
$("#cardGoodsModal").modal('show');
@@ -1046,11 +1066,11 @@ export default {
$("#tipModal").modal('show');
return;
}
if (!effect) {
$("#tipMsg").text("请上传动画图片");
$("#tipModal").modal('show');
return;
}
// if (!effect) {
// $("#tipMsg").text("请上传动画图片");
// $("#tipModal").modal('show');
// return;
// }
if (!days || days <= 0) {
$("#tipMsg").text("请输入合理的购买天数");
$("#tipModal").modal('show');
@@ -1077,8 +1097,10 @@ export default {
var ar_name = $("#ar_name").val();
// 英语名称
var en_name = $("#en_name").val();
// 土耳其名称
var tr_name = $("#tr_name").val();
// 国际化字段
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
const nameValue = JSON.stringify(jsonName);
// 修改属性值
formData.name = nameValue; // 将giftName修改为"newGiftName"

View File

@@ -10,18 +10,26 @@
<div id="regionTable"></div>
<div id="toolbar">
<div class="col-sm-12">
<label for="searchType" class="col-sm-4 control-label">地区:</label>
<div class="col-sm-6">
<select name="searchType" id="searchType" data-btn-class="btn-warning" class="form-control">
<label for="searchType"
class="col-sm-2 control-label">地区:</label>
<div class="col-sm-8">
<select name="searchType"
id="searchType"
data-btn-class="btn-warning"
class="form-control">
</select>
</div>
</div>
<div class="col-sm-2">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
</div>
</div>
<div class="box-body" style="height:150%;">
</div>
</div>
<div class="box-body"
style="height:150%;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="channelTitle">渠道和档位配置</h1>
@@ -32,123 +40,208 @@
</div>
</section>
<div class="modal fade" id="regionModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="regionModal"
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 type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="regionModalLabel">地区信息编辑</h4>
<h4 class="modal-title"
id="regionModalLabel">地区信息编辑</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<input type="hidden" name="code" id="code" />
<input type="hidden" name="currency" id="currency" />
<input type="hidden" name="type" id="type" />
<input type="hidden"
name="code"
id="code" />
<input type="hidden"
name="type"
id="type" />
<div class="form-group">
<label for="name" class="col-sm-3 control-label">使用地区</label>
<label for="name"
class="col-sm-3 control-label">使用地区</label>
<div class="col-sm-9">
<input type="text" readonly class="form-control" id="name">
<input type="text"
readonly
class="form-control"
id="name">
</div>
</div>
<div class="form-group">
<label for="rate" class="col-sm-3 control-label">USD汇率</label>
<label for="currency"
class="col-sm-3 control-label">货币</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="rate">
<input type="text"
readonly
class="form-control"
id="currency">
</div>
</div>
<div class="form-group">
<label for="isRegionEnabled" class="col-sm-3 control-label">地区是否生效</label>
<label for="rate"
class="col-sm-3 control-label">兑USD汇率</label>
<div class="col-sm-9">
<select name="isRegionEnabled" id="isRegionEnabled" class="form-control validate[required]">
<option value="1" selected></option>
<option value="0"></option>
</select>
<input type="text"
class="form-control"
id="rate">
</div>
</div>
<div class="form-group">
<label for="isRegionRecommend" class="col-sm-3 control-label">代儲是否展示"推荐"</label>
<label for="isRegionEnabled"
class="col-sm-3 control-label">地区是否生效</label>
<div class="col-sm-9">
<select name="isRegionRecommend" id="isRegionRecommend"
<select name="isRegionEnabled"
id="isRegionEnabled"
class="form-control validate[required]">
<option value="1" selected></option>
<option value="1"
selected></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<label for="regionSeq" class="col-sm-3 control-label">排序</label>
<label for="isRegionRecommend"
class="col-sm-3 control-label">代儲是否展示"推荐"</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="regionSeq">
<select name="isRegionRecommend"
id="isRegionRecommend"
class="form-control validate[required]">
<option value="1"
selected></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<label for="regionSeq"
class="col-sm-3 control-label">排序</label>
<div class="col-sm-9">
<input type="text"
class="form-control"
id="regionSeq">
</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="regionSave">确认编辑</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="regionSave">确认编辑</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="channelModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="channelModal"
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 type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="channelModalLabel">充值渠道编辑</h4>
<h4 class="modal-title"
id="channelModalLabel">充值渠道编辑</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<input type="hidden" name="channelCode" id="channelCode" />
<input type="hidden" name="regionCode" id="regionCode" />
<input type="hidden" name="channelCurrency" id="channelCurrency" />
<input type="hidden" name="usdRate" id="usdRate" />
<input type="hidden" name="payChannel" id="payChannel" />
<input type="hidden" name="paymentType" id="paymentType" />
<input type="hidden" name="chargeSize" id="chargeSize" />
<input type="hidden" name="isSpecial" id="isSpecial" />
<input type="hidden" name="specialValues" id="specialValues" />
<input type="hidden"
name="channelCode"
id="channelCode" />
<input type="hidden"
name="regionCode"
id="regionCode" />
<input type="hidden"
name="channelCurrency"
id="channelCurrency" />
<input type="hidden"
name="usdRate"
id="usdRate" />
<input type="hidden"
name="payChannel"
id="payChannel" />
<input type="hidden"
name="paymentType"
id="paymentType" />
<input type="hidden"
name="chargeSize"
id="chargeSize" />
<input type="hidden"
name="isSpecial"
id="isSpecial" />
<input type="hidden"
name="specialValues"
id="specialValues" />
<div class="form-group">
<label for="regionName" class="col-sm-3 control-label">使用地区</label>
<label for="regionName"
class="col-sm-3 control-label">使用地区</label>
<div class="col-sm-9">
<input type="text" readonly class="form-control" id="regionName">
<input type="text"
readonly
class="form-control"
id="regionName">
</div>
</div>
<div class="form-group">
<label for="desc" class="col-sm-3 control-label">渠道名称</label>
<label for="desc"
class="col-sm-3 control-label">渠道名称</label>
<div class="col-sm-9">
<input type="text" readonly class="form-control" id="desc">
<input type="text"
readonly
class="form-control"
id="desc">
</div>
</div>
<div class="form-group">
<label for="isChannelEnabled" class="col-sm-3 control-label">是否展示在充值H5</label>
<label for="isChannelEnabled"
class="col-sm-3 control-label">是否展示在充值H5</label>
<div class="col-sm-9">
<select name="isChannelEnabled" id="isChannelEnabled"
<select name="isChannelEnabled"
id="isChannelEnabled"
class="form-control validate[required]">
<option value="1" selected></option>
<option value="1"
selected></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<label for="isChannelRecommend" class="col-sm-3 control-label">是否展示"推荐"</label>
<label for="isChannelRecommend"
class="col-sm-3 control-label">是否展示"推荐"</label>
<div class="col-sm-9">
<select name="isChannelRecommend" id="isChannelRecommend"
<select name="isChannelRecommend"
id="isChannelRecommend"
class="form-control validate[required]">
<option value="1" selected></option>
<option value="1"
selected></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<label for="channelSeq" class="col-sm-3 control-label">排序</label>
<label for="channelSeq"
class="col-sm-3 control-label">排序</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="channelSeq">
<input type="text"
class="form-control"
id="channelSeq">
</div>
</div>
<div class="form-group">
@@ -156,22 +249,34 @@
</div>
</form>
</div>
<button type="button" class="btn btn-primary" id="chargeProdAdd">+档位</button>
<button type="button"
class="btn btn-primary"
id="chargeProdAdd">+档位</button>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" id="channelSave">确认编辑</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="channelSave">确认编辑</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 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 class="modal-body"
id="tipMsg"></div>
</div>
</div>
</div>
@@ -182,9 +287,9 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "ChargeRegionView",
setup() {
setup () {
//计算
function calc(obj) {
function calc (obj) {
var $obj = $(obj);
var index = $obj.data('index');
var amount = $('#amount' + index).val();
@@ -214,13 +319,13 @@ export default {
calc
};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
//地区
var regionArray = chargeRegion();
@@ -228,9 +333,10 @@ export default {
$('#regionTable').bootstrapTable({
columns: [
{ field: 'name', title: '地区', align: 'center', width: '5%' },
{ field: 'currency', title: '货币', align: 'center', width: '5%'},
{
field: 'rate',
title: 'USD汇率',
title: 'USD汇率',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
@@ -288,7 +394,7 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
regionType: $('#searchType').val()
};
@@ -334,7 +440,7 @@ export default {
return '<img src="' + val + '" style="width:90px;height:90px;" alt="">'
}
},
{ field: 'regionName', title: '地区', align: 'center', width: '5%' },
{ field: 'currency', title: '货币', align: 'center', width: '5%' },
{
field: 'isEnabled',
title: '是否展示在充值H5',
@@ -401,7 +507,7 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
regionType: $('#searchType').val()
};
@@ -611,12 +717,25 @@ export default {
var isSpecial = $('#isSpecial').val();
var chargeProdArray = [];
for (let i = 0; i < chargeSize; i++) {
const isHidden = $('#chargeProd' + i).is(':hidden');
if (isHidden) {
continue;
}
var chargeProdId = $('#chargeProdId' + i).val();
var money = parseFloat($('#amount' + i).val()) * 100;
var handlingRate = $('#handlingRate' + i).val();
if (!money || !handlingRate) {
continue;
}
const arrayIndex = chargeProdArray.findIndex(prod => prod.money === money);
if (arrayIndex !== -1) {
$("#tipMsg").text("保存失败." + money + "档位重复配置");
$("#tipModal").modal('show');
return;
}
var chargeProd = {
country: regionCode,
localCurrencyCode: currency,
@@ -667,35 +786,38 @@ export default {
//删除
$('#channelModal .modal-body .form-horizontal').on('click', '.opt-del', function () {
var index = $(this).data('index');
var chargeProdId = $('#chargeProdId' + index).val();
if (chargeProdId) {
const msg = '确定要删除吗?';
if (confirm(msg)) {
$.ajax({
type: "get",
url: "/admin/charge/prod/del?chargeProdId=" + chargeProdId,
dataType: "json",
success: function (json) {
if (json.success == 'true' || json.code == 200) {
$("#tipMsg").text("删除成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#regionTable");
TableHelper.doRefresh("#channelTable");
$("#channelModal").modal('hide');
} else {
$("#tipMsg").text("删除失败." + json.message);
$("#tipModal").modal('show');
$("#channelModal").modal('hide');
}
}
});
$('#chargeProd' + index).remove();
}
}
var chargeProd = $('#chargeProd' + index);
chargeProd.hide();
return false;
// var chargeProdId = $('#chargeProdId' + index).val();
// if (chargeProdId) {
// const msg = '确定要删除吗?';
// if (confirm(msg)) {
// $.ajax({
// type: "get",
// url: "/admin/charge/prod/del?chargeProdId=" + chargeProdId,
// dataType: "json",
// success: function (json) {
// if (json.success == 'true' || json.code == 200) {
// $("#tipMsg").text("删除成功");
// $("#tipModal").modal('show');
// TableHelper.doRefresh("#regionTable");
// TableHelper.doRefresh("#channelTable");
// $("#channelModal").modal('hide');
// } else {
// $("#tipMsg").text("删除失败." + json.message);
// $("#tipModal").modal('show');
// $("#channelModal").modal('hide');
// }
// }
// });
// $('#chargeProd' + index).remove();
// }
// }
});
//地区
function chargeRegion() {
function chargeRegion () {
var array;
$.ajax({
type: "get",
@@ -711,7 +833,7 @@ export default {
var $select = $('#searchType');
for (let i = 0; i < array.length; i++) {
var $option = $('<option value="' + array[i].type + '" />');
$option.html(array[i].name);
$option.html(array[i].desc + '(' + array[i].name + ')');
if (i == 0) {
$option.attr('selected', true);
}
@@ -728,7 +850,7 @@ export default {
});
}
},
unmounted() {
unmounted () {
$('#regionTable').bootstrapTable('destroy');
$('#channelTable').bootstrapTable('destroy');
}

View File

@@ -56,6 +56,7 @@ export default {
{ field: 'partitionDesc', title: '所属地区', align: 'center', width: '15%' },
{ field: 'payMoneyNum', title: '付费金额(金币)', align: 'center', width: '15%' },
{ field: 'createTime', title: '付费日期', align: 'center', width: '15%' },
{ field: 'content', title: '头条内容', align: 'center', width: '15%' },
],
};
},

View File

@@ -63,6 +63,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div>
</div>
<div class="form-group">
@@ -93,6 +94,13 @@
<input type="text" class="form-control validate[required]" name="name" id="en_modal_name" placeholder="请输入气泡名称">
</div>
</div>
<div class="form-group">
<label for="tr_modal_name" class="col-sm-4 control-label">土耳其装扮名称:</label>
<div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="name" id="tr_modal_name" placeholder="请输入气泡名称">
</div>
</div>
<form class="form-horizontal" id="addForm1">
<div class="form-group">
<label class="col-sm-4 control-label">安卓图片:</label>
<div class="col-sm-6">
@@ -104,7 +112,9 @@
<input type="hidden" id="androidUrl" name="androidUrl" class="form-control" />
</div>
</div>
<div class="form-group">
</form>
<form class="form-horizontal" id="addForm2">
<div class="form-group" >
<label class="col-sm-4 control-label">IOS图片:</label>
<div class="col-sm-6">
<img src="" id="addIosIconPicUrl" style="height:44px;" alt="">
@@ -115,6 +125,7 @@
<input type="hidden" id="iosUrl" name="iosUrl" class="form-control" />
</div>
</div>
</form>
<div class="form-group">
<label for="status" class="col-sm-4 control-label">装扮状态:</label>
<div class="col-sm-6">
@@ -216,12 +227,16 @@ export default {
if ((val & 4) != 0) {
value += '华语区<br>';
}
if ((val & 8) != 0) {
value += '土耳其区<br>';
}
return value;
}
},
{field: 'name.zh', title: '装扮名称', align: 'middle', width: '5%'},
{field: 'name.ar', title: '阿语装扮名称', align: 'middle', width: '5%'},
{field: 'name.en', title: '英语装扮名称', align: 'middle', width: '5%'},
{field: 'name.tr', title: '土耳其扮名称', align: 'middle', width: '5%'},
{
field: 'iosUrl',
title: '装扮图片',
@@ -374,12 +389,16 @@ export default {
$("#ar_modal_name").val(row.name.ar);
// 英语名称
$("#en_modal_name").val(row.name.en);
// 土耳其名称
$("#tr_modal_name").val(row.name.tr);
} else {
$("#modal_name").val(name);
// 阿语名称
$("#ar_modal_name").val(name);
// 英语名称
$("#en_modal_name").val(name);
// 土耳其名称
$("#tr_modal_name").val(name);
}
$('#addAndroidIconPicUrl').attr("src", row.androidUrl);
$("#addForm #androidUrl").val(row.androidUrl);
@@ -407,28 +426,39 @@ export default {
});
$("[name='uploadBtn']").on('click', function () {
let id = $(this).attr('id');
let b = id.split("_");
let imageId = b[0];
let inputId = b[1];
console.log(imageId)
console.log(inputId)
$("#addAndroidIconPicUrl_androidUrl").on('click', function () {
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (json) {
if (json.path) {
$("#" + inputId).val(json.path);
$("#" + imageId).attr("src", json.path);
$("#addAndroidIconPicUrl").val(json.path);
$("#addAndroidIconPicUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
}
};
$("#addForm").ajaxSubmit(options);
$("#addForm1").ajaxSubmit(options);
});
$("#addIosIconPicUrl_iosUrl").on('click', function () {
var options = {
type: 'post',
url: '/admin/upload/img',
dataType: 'json',
success: function (json) {
if (json.path) {
$("#addIosIconPicUrl").val(json.path);
$("#addIosIconPicUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
}
};
$("#addForm2").ajaxSubmit(options);
});
@@ -454,8 +484,10 @@ export default {
var ar_name = $("#ar_modal_name").val();
// 英语名称
var en_name = $("#en_modal_name").val();
// 土耳其名称
var tr_name = $("#tr_modal_name").val();
// 国际化字段
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
const nameValue = JSON.stringify(jsonName);
// 修改属性值
formData.name = nameValue; // 将giftName修改为"newGiftName"
@@ -467,6 +499,8 @@ export default {
partitionFlag |= partitionFlagArray[i].value;
}
formData.partitionFlag = partitionFlag;
formData.androidUrl = $('#addAndroidIconPicUrl').attr('src');
formData.iosUrl = $('#addIosIconPicUrl').attr('src');
// 将修改后的对象转换回序列化字符串
let newSerializeStr = $.param(formData);
//做下数据校验
@@ -528,6 +562,7 @@ export default {
$('#modal_name').val('');
$('#ar_modal_name').val('');
$('#en_modal_name').val('');
$('#tr_modal_name').val('');
$('input[name="partitionFlag"]').each(function() {
$(this).checked = false;
});

View File

@@ -7,28 +7,63 @@
<h1 id="itemTitle"></h1>
</section>
<div id="toolbar">
<el-form-item label="装扮类型" prop="dateCycle">
<el-select placeholder="请选择" v-model="dressTypeVal">
<el-option
v-for="(item, i) in dressTypeArr"
:key="i"
:label="item.desc"
:value="item.val"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="获得方式" prop="dateCycle">
<el-select placeholder="请选择" v-model="obtainWayVal">
<el-option
v-for="(item, i) in obtainWayArr"
:key="i"
:label="item.desc"
:value="item.val"
></el-option>
</el-select>
</el-form-item>
<div class="col-sm-12">
<button id="btnAdd" class="btn btn-default">
<button
id="btnAdd"
class="btn btn-default"
style="margin-right: 20px"
>
<i class="glyphicon glyphicon-plus"></i>增加
</button>
<button @click="initData" id="getData" class="btn btn-default">
查询
</button>
</div>
</div>
</div>
<!-- .content -->
<div id="table"></div>
</div>
</section>
<div class="modal fade" id="roomTagModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<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
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>
@@ -36,7 +71,9 @@
<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>
<label for="dressType" class="col-sm-3 control-label"
>装扮类型:</label
>
<div class="col-sm-9">
<select name="dressType" id="dressType">
<option value="">-- 请选择 --</option>
@@ -45,39 +82,82 @@
<option value="2">铭牌</option>
<option value="3">资料卡</option>
<option value="4">聊天气泡</option>
<option value="5">个人装扮</option>
</select>
</div>
</div>
<div class="form-group">
<label for="obtainWay" class="col-sm-3 control-label"
>获得方式:</label
>
<div class="col-sm-9">
<select name="obtainWay" id="obtainWay">
<option value="">-- 请选择 --</option>
<option value="1">普通</option>
<option value="2">活动</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>
<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">
<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>
<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="数字小的排前面,必填">
<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>
<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="请输入价格">
<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>
<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="请输入天数">
<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>
<label for="dressLimitStatus" class="col-sm-3 control-label"
>装扮限时状态:</label
>
<div class="col-sm-9">
<select name="dressType" id="dressLimitStatus">
<option value="0"></option>
@@ -85,26 +165,63 @@
</select>
</div>
</div>
<div class="form-group">
<label for="vipLimit" class="col-sm-3 control-label"
>贵族限定:</label
>
<div class="col-sm-9">
<select name="dressType" id="vipLimit">
<option value="0">无限制</option>
<option value="1">VIP1</option>
<option value="2">VIP2</option>
<option value="3">VIP3</option>
<option value="4">VIP4</option>
<option value="5">VIP5</option>
<option value="6">VIP6</option>
<option value="7">VIP7</option>
<option value="8">VIP8</option>
<option value="9">VIP9</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-default" data-dismiss="modal">
关闭
</button>
<button type="button" class="btn btn-primary" id="add">确定</button>
</div>
</div>
</div>
</div>
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { serverError } from '@/utils/maintainer';
import TableHelper from "@/utils/bootstrap-table-helper";
import { serverError } from "@/utils/maintainer";
export default {
name: "DressShopAdminView",
setup() {
return {};
data() {
return {
dressTypeVal: "",
dressTypeArr: [
{ desc: "全部", val: "" },
{ desc: "头饰", val: "0" },
{ desc: "座驾", val: "1" },
{ desc: "铭牌", val: "2" },
{ desc: "资料卡", val: "3" },
{ desc: "聊天气泡", val: "4" },
{ desc: "个人装扮", val: "5" },
],
obtainWayVal: "",
obtainWayArr: [
{ desc: "全部", val: "" },
{ desc: "普通", val: "1" },
{ desc: "活动", val: "2" },
],
};
},
created() {
this.$nextTick(function () {
@@ -113,80 +230,209 @@ export default {
},
methods: {
initData() {
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
var dressTypeVal = this.dressTypeVal;
var obtainWayVal = this.obtainWayVal;
$("#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: "id",
title: "ID",
align: "center",
valign: "middle",
width: "10%",
},
{
field: 'dressType',
title: '装扮类型',
align: 'center',
width: '5%',
valign: 'middle',
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 (val == '0') {
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 if (val == "1") {
return "座驾";
} else if (val == "2") {
return "铭牌";
} else if (val == "3") {
return "资料卡";
} else if (val == "4") {
return "聊天气泡";
} else if (val == "5") {
return "个人装扮";
} else {
return '-';
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',
field: "obtainWay",
title: "获得方式",
align: "center",
width: "5%",
valign: "middle",
formatter: function (val, row, index) {
if (val == '0') {
if (val == "1") {
return "普通";
} else if (val == "2") {
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 '无效';
return "无效";
}
}
},
},
{
field: 'id',
title: '操作',
align: 'center',
width: '10%',
field: "vipLimit",
title: "贵族限定",
align: "center",
width: "5%",
valign: "middle",
formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' +
if (val == "1") {
return "VIP1";
}
if (val == "2") {
return "VIP2";
}
if (val == "3") {
return "VIP3";
}
if (val == "4") {
return "VIP4";
}
if (val == "5") {
return "VIP5";
}
if (val == "6") {
return "VIP6";
}
if (val == "7") {
return "VIP7";
}
if (val == "8") {
return "VIP8";
}
if (val == "9") {
return "VIP9";
} 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>';
}
}
'&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,
@@ -194,31 +440,36 @@ export default {
showRefresh: false,
pageSize: 50,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
pageList: [20, 50, 100],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams(params) {
//设置查询参数
var param = {
pageNum: params.pageNumber,
pageSize: params.pageSize
pageSize: params.pageSize,
dressType: dressTypeVal,
obtainWay: obtainWayVal,
};
return param;
},
ajax: function (request) { //使用ajax请求
ajax: function (request) {
//使用ajax请求
$.ajax({
type: "GET",
url: '/admin/dress/shop/list',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
url: "/admin/dress/shop/list",
contentType: "application/json;charset=utf-8",
dataType: "json",
data: request.data,
success: function (res) {
apiResult(res);
console.log(res)
console.log(res);
request.success({
"rows": res.data.rows.map(i=>{
total: res.data.total,
rows: res.data.rows.map((i) => {
let value = i.name;
if (value.startsWith('{') && value.endsWith('}')) {
if (value.startsWith("{") && value.endsWith("}")) {
i.name = JSON.parse(i.name);
} else {
i.name = {
@@ -229,46 +480,47 @@ export default {
}
return i;
}),
"total": res.total
});
},
error: function (req) {
serverError(req);
}
})
},
toolbar: '#toolbar',
onLoadSuccess: function () { //加载成功时执行
});
},
toolbar: "#toolbar",
onLoadSuccess: function () {
//加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
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');
$("#roomTagModal").modal("show");
});
$("#add").click(function () {
var id = $("#id").val();
var dressType = $('#dressType').val();
var dressType = $("#dressType").val();
var obtainWay = $("#obtainWay").val();
var dressId = $("#dressId").val();
var dressSeq = $('#dressSeq').val();
var dressPrice = $('#dressPrice').val();
var dressDay = $('#dressDay').val();
var dressLimitStatus = $('#dressLimitStatus').val();
var dressSeq = $("#dressSeq").val();
var dressPrice = $("#dressPrice").val();
var dressDay = $("#dressDay").val();
var dressLimitStatus = $("#dressLimitStatus").val();
var vipLimit = $("#vipLimit").val();
if ($("#addForm").validationEngine('validate')) {
if ($("#addForm").validationEngine("validate")) {
$.ajax({
type: "post",
url: "/admin/dress/shop/saveOrUpdate",
@@ -276,31 +528,32 @@ export default {
id: id,
dressId: dressId,
dressType: dressType,
obtainWay: obtainWay,
dressSeq: dressSeq,
dressPrice: dressPrice,
dressDay: dressDay,
dressLimitStatus: dressLimitStatus,
vipLimit: vipLimit,
},
dataType: "json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
$("#roomTagModal").modal('hide');
$("#roomTagModal").modal("hide");
} else {
$("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show');
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
$("#roomTagModal").modal('hide');
}
$("#roomTagModal").modal("hide");
}
},
});
}
});
$("#table").on("click", '.opt-edit', function () {
$("#table").on("click", ".opt-edit", function () {
var id = $(this).attr("data-id");
clearModal();
@@ -313,116 +566,113 @@ export default {
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);
$("#dressId").val(json.dressId);
$("#dressType").val(json.dressType);
$("#obtainWay").val(json.obtainWay);
$("#dressSeq").val(json.dressSeq);
$("#dressPrice").val(json.dressPrice);
$("#dressDay").val(json.dressDay);
$("#dressLimitStatus").val(json.dressLimitStatus);
$("#vipLimit").val(json.vipLimit);
// 打开编辑弹窗
$("#roomTagModal").modal('show');
$("#roomTagModal").modal("show");
$("#modalLabel").text("编辑");
} else {
$("#tipMsg").text("获取信息出错");
$("#tipModal").modal('show');
}
$("#tipModal").modal("show");
}
},
});
});
$("#table").on("click", '.opt-remove', function () {
$("#table").on("click", ".opt-remove", function () {
var id = $(this).attr("data-id");
if (confirm("你确认删除该记录吗? \r\n 删除后再也不能找回,请谨慎操作!")) {
if (
confirm("你确认删除该记录吗? \r\n 删除后再也不能找回,请谨慎操作!")
) {
const requestParam = {
id: id
}
id: id,
};
$.ajax({
type: "get",
url: "/admin/dress/shop/delById",
data: requestParam,
dataType: "json",
contentType: 'application/json',
contentType: "application/json",
success: function (json) {
if (json.code == 200) {
$("#tipMsg").text("修改成功");
$("#tipModal").modal('show');
$("#tipModal").modal("show");
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("修改失败." + json.message);
$("#tipModal").modal('show');
}
$("#tipModal").modal("show");
}
},
});
}
});
function apiResult(json) {
if (json.code == 200 && json.message == 'success') {
if (json.code == 200 && json.message == "success") {
return true;
}
$("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal('show');
$("#tipModal").modal("show");
return false;
}
$('#iconBtn').on('click', function () {
if ($('#iconFile').val() == '') {
$('#tipMsg').text('上传图片为空');
$('#tipModal').modal('show');
$("#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会自动判断。
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就是服务器返回的数据。
success: function (json) {
//提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$('#iconUrl').val(json.path);
$('#iconImgUrl').attr("src", json.path);
$("#iconUrl").val(json.path);
$("#iconImgUrl").attr("src", json.path);
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
$("#tipModal").modal("show");
}
},
error: function (data, status, e) { //提交失败自动执行的处理函数。
error: function (data, status, e) {
//提交失败自动执行的处理函数。
console.error(e);
}
},
});
});
})
function clearModal() {
$('#iconImgUrl').attr('src', '');
$("#iconImgUrl").attr("src", "");
$('#addForm').find('input[type=text],input[type=hidden],input[type=file]').each(function () {
$(this).val('');
})
$('#type').val(1);
$("#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

@@ -108,7 +108,7 @@
</select>
<div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri"
id="skipUrlContent">
id="skipUrlContent" oninput="this.value = this.value.replace(/[\u4e00-\u9fa5]/g, '')">
</div>
</div>
<div class="form-group">
@@ -269,7 +269,7 @@
</select>
<div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri"
id="addSkipUrlContent">
id="addSkipUrlContent" oninput="this.value = this.value.replace(/[\u4e00-\u9fa5]/g, '')">
</div>
</div>
<div class="form-group">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -83,7 +83,7 @@
</select>
<div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri"
id="skipUrlContent">
id="skipUrlContent" oninput="this.value = this.value.replace(/[\u4e00-\u9fa5]/g, '')">
</div>
</div>
<div class="form-group">
@@ -238,7 +238,7 @@
</select>
<div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri"
id="addSkipUrlContent">
id="addSkipUrlContent" oninput="this.value = this.value.replace(/[\u4e00-\u9fa5]/g, '')">
</div>
</div>
<div class="form-group">

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="scale-down"
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="scale-down"
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="scale-down"
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 ? 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 ? '' : 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

@@ -0,0 +1,376 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>游戏</span>
<el-select v-model="inquire.gameArrVal" placeholder="请选择">
<el-option
v-for="item in inquire.gamesArr"
:key="item.gameId"
:label="item.gameName"
:value="item.gameId"
>
</el-option>
</el-select>
</div>
<!-- 时间选择器 -->
<div class="inquire">
<span class="demonstration">日期</span>
<el-date-picker
v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
<!-- 查询按钮 -->
<el-button
class="primary"
type="primary"
@click="
tableData = [];
currentPage = 1;
isFinished = false;
getData();
"
>查询</el-button
>
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
>导出</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
ref="multipleTable"
@selection-change="handleSelectionChange"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="dateTime" align="center" label="日期" />
<el-table-column prop="userCount" align="center" label="人数" />
<el-table-column prop="consumeNum" align="center" label="货币消耗" />
<el-table-column prop="settleNum" align="center" label="结算总量" />
<el-table-column prop="platformNum" align="center" label="平台收入" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
class="primary"
type="primary"
@click="
detailPageFunArr = scope.row;
tableDataDetails = [];
currentPage2 = 1;
isFinished2 = false;
detailPageFun();
"
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="[1, 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 v-if="!isFinished" class="pagination">
<el-button
class="pagination_in"
@click="loadMore"
type="primary"
:loading="isLoading"
>加载更多</el-button
>
</div>
<div v-else class="pagination">
<span class="pagination_in">没有更多数据了</span>
</div>
</div>
<!-- 内嵌单个工会详情 -->
<el-dialog :title="detailsTitle" v-model="detailsDialog">
<el-table
v-loading="loading2"
:data="tableDataDetails"
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="consumeNum" align="center" label="货币消耗" />
<el-table-column prop="settleNum" align="center" label="结算总量" />
<el-table-column prop="platformNum" 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="total2"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
/> -->
<!-- 加载更多按钮 -->
<div v-if="!isFinished2" class="pagination">
<el-button
class="pagination_in"
@click="loadMore2"
type="primary"
:loading="isLoading2"
>加载更多</el-button
>
</div>
<div v-else class="pagination">
<span class="pagination_in">没有更多数据了</span>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="detailsDialog = false">关闭</el-button>
<el-button type="primary" @click="confirmExport2Excel2()"
>导出</el-button
>
</div></template
>
</el-dialog>
</template>
<script>
import {
statisPage,
sysConfKey,
detailPage,
exportForMiniGame,
statisExport,
} from "@/api/lingSmallGames/lingSmallGames";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage, ElTable } from "element-plus";
import { ref } from "vue";
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
export default {
name: "lingSmallGames",
data() {
return {
loading: false,
loading2: false,
//查询所需条件对象
inquire: {
time: "",
gameArrVal: "",
gamesArr: [],
},
// 表格
tableData: [],
// 分页
total: 0, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
isLoading: false, // 加载状态
isFinished: false, // 是否加载完成
// 弹窗
detailsDialog: false,
detailsTitle: "",
tableDataDetails: [],
dateTimePub: null,
detailPageFunArr: {},
// 分页
total2: 0, //总页数
currentPage2: 1, //页码
pageSize2: 10, //条数
isLoading2: false, // 加载状态
isFinished2: false, // 是否加载完成
};
},
created() {
sysConfKey({ configId: "leadercc_game" }).then((res) => {
this.inquire.gamesArr = JSON.parse(res.data.configValue);
this.getData();
});
},
methods: {
// 查询接口
getData() {
this.isLoading = true;
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");
}
statisPage({
gameId: this.inquire.gameArrVal,
startTime: startTime,
endTime: endTime,
pageNum: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
// 判断返回的记录是否为空数组
const records = res.data.records;
if (records.length > 0) {
// 如果有数据,追加到表格数据中
this.tableData = [...this.tableData, ...records];
this.currentPage++; // 更新当前页码
} else {
// 如果数据长度为 0停止加载
this.isFinished = true;
}
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
this.isLoading = false;
});
},
// 加载下一页数据
loadMore() {
if (!this.isFinished) {
this.currentPage = this.currentPage++;
this.getData(this.currentPage);
}
},
// 加载下一页数据
loadMore2() {
if (!this.isFinished2) {
this.currentPage2 = this.currentPage2++;
this.detailPageFun(this.currentPage2);
}
},
// 导出
confirmExport2Excel() {
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");
}
exportForMiniGame({
gameId: this.inquire.gameArrVal,
startTime: startTime,
endTime: endTime,
}).then();
},
// 导出弹窗
confirmExport2Excel2() {
statisExport({
dateTime: this.dateTimePub,
gameId: this.inquire.gameArrVal,
}).then();
},
// 详情接口
detailPageFun() {
this.isLoading2 = true;
this.detailsDialog = true;
this.loading2 = true;
this.detailsTitle = this.dateTimePub = this.detailPageFunArr.dateTime;
detailPage({
gameId: this.detailPageFunArr.gameId,
dateTime: this.detailPageFunArr.dateTime,
pageNum: this.currentPage2,
pageSize: this.pageSize2,
}).then((res) => {
if (res.code == 200) {
// 判断返回的记录是否为空数组
const records2 = res.data.records;
if (records2.length > 0) {
// 如果有数据,追加到表格数据中
this.tableDataDetails = [...this.tableDataDetails, ...records2];
this.currentPage2++; // 更新当前页码
} else {
// 如果数据长度为 0停止加载
this.isFinished2 = true;
}
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading2 = false;
this.isLoading2 = false;
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
handleSizeChange2() {
this.detailPageFun();
},
handleCurrentChange2() {
this.detailPageFun();
},
},
};
</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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
.pagination {
margin: 10px auto 10px;
position: relative;
left: 50%;
transform: translateX(-50%);
}
.pagination_in {
text-align: center;
}
</style>

View File

@@ -0,0 +1,413 @@
<template>
<div class="list-gold-coin-transfer">
<div class="container">
<div class="handle-box">
<el-form
ref="searchForm"
:model="searchForm"
:rules="searchRule"
label-width="120px"
:disabled="tableLoading"
>
<div class="search-line">
<el-form-item label="转赠用户平台号" prop="sendUserPlatformNo">
<el-input
v-model.number="searchForm.sendUserPlatformNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="接收用户平台号" prop="receiveUserPlatformNo">
<el-input
v-model.number="searchForm.receiveUserPlatformNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="创建时间" class="large">
<el-form-item prop="startTime">
<el-date-picker
type="datetime"
placeholder="选择开始时间"
v-model="searchForm.startTime"
value-format="yyyy/MM/dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-col :span="2" align="center">-</el-col>
<el-form-item prop="endTime">
<el-date-picker
type="datetime"
placeholder="选择结束时间"
v-model="searchForm.endTime"
value-format="yyyy/MM/dd HH:mm:ss"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button>
<el-button plain @click="resetSearchForm">重置搜索</el-button>
<el-button
type="primary"
class="mr10"
@click="exportVisible = true"
>导出</el-button
>
</el-form-item>
</div>
</el-form>
<p style="color: #00d1b2">当前汇总值{{ totalCoins }}</p>
</div>
<el-table
:data="tableData"
border
class="table"
ref="multipleTable"
header-cell-class-name="table-header"
@header-click="headerCopy"
v-loading="tableLoading"
>
<el-table-column
prop="id"
width="90"
label="ID"
align="center"
fixed="left"
></el-table-column>
<el-table-column
prop="fromUserNick"
label="转赠用户昵称"
align="center"
></el-table-column>
<el-table-column
prop="fromUserPlatformNo"
width="120"
label="转赠用户平台号"
align="center"
></el-table-column>
<el-table-column
prop="toUserNick"
label="接收用户昵称"
align="center"
></el-table-column>
<el-table-column
prop="toUserPlatformNo"
width="120"
label="接收用户平台号"
align="center"
></el-table-column>
<el-table-column
prop="abbr"
label="接收用户国家"
align="center"
></el-table-column>
<el-table-column
prop="goldNum"
width="110"
label="金币数量"
align="center"
></el-table-column>
<el-table-column width="160" label="创建时间" align="center">
<template v-slot="scope">{{
convertTimestamp(scope.row.createTime)
}}</template>
</el-table-column>
<el-table-column width="160" label="更新时间" align="center">
<template v-slot="scope">{{
convertTimestamp(scope.row.updateTime)
}}</template>
</el-table-column>
</el-table>
<table-pagination
:pageParams="pageParams"
:pageTotal="pageTotal"
@handleSizeChange="handleSizeChange"
@handlePageChange="handlePageChange"
></table-pagination>
</div>
<!-- 确认导出弹出框 -->
<el-dialog
v-model="exportVisible"
width="30%"
:before-close="handlDialogClose"
>
<!-- 使用 v-slot 指令提供 'title' 插槽的内容 -->
<template v-slot:title>
<div style="display: flex; align-items: center">提示</div>
</template>
<!-- 默认插槽的内容 -->
<div style="font-size: 16px">确定以当前筛选条件导出Excel吗</div>
<!-- 使用 v-slot 指令提供 'footer' 插槽的内容 -->
<template v-slot:footer>
<span class="dialog-footer">
<el-button @click="exportVisible = false" :disabled="dialogDisabled"
> </el-button
>
<el-button
type="primary"
@click="confirmExport2Excel"
:loading="btnLoading"
:disabled="dialogDisabled"
> </el-button
>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
getGoldCoinTransferList,
getGoldCoinSumGold,
} from "@/api/relUserBelongings/relUserBelongings.js";
import { formatDate } from "@/utils/relDate.js";
import { exportExcel } from "@/utils/exportExcel.js";
import TablePagination from "@/components/common/TablePagination.vue";
export default {
name: "GoldCoinGiftingHistory",
components: { TablePagination },
data() {
return {
clickedLineId: null, // 记录被点击的某行数据的id
clickedLineText: "GIFT_IN_ROOM", // 记录红包类型
tableData: [], // 接口返回的表格数据
pageTotal: 0, // 接口返回的表格总条数
pageParams: {
pageNo: 1,
pageSize: 10,
},
exportVisible: false,
tableLoading: false, // 表格是否加载中
// 搜索表单相关
searchForm: {
sendUserPlatformNo: null, // 接收者平台号
receiveUserPlatformNo: null, // 发送者平台号
startTime: null,
endTime: null,
},
searchRule: {
startTime: [
{
validator: (rule, value, callback) => {
this.$refs["searchForm"].validateField("endTime");
callback();
},
trigger: "change",
},
],
endTime: [
{
validator: (rule, value, callback) => {
const { startTime } = this.searchForm;
if (startTime !== null && startTime !== "" && value) {
if (value <= startTime) {
callback(new Error("须晚于开始时间"));
} else {
callback();
}
} else {
callback();
}
},
trigger: "change",
},
],
},
dialogDisabled: false, // 是否禁用弹出框(dialog)表单元素
btnLoading: false, // 弹出框(dialog)的确认按钮
totalCoins: null, //当前金币汇总值
};
},
created() {
// this.getData();
},
methods: {
getData() {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
getGoldCoinSumGold(pageParams).then((res) => {
if (res.data.success === true) {
let data = res.data.data;
this.totalCoins = data;
}
});
getGoldCoinTransferList(pageParams).then((res) => {
this.tableLoading = false;
if (res.data.success === true) {
let data = res.data.data;
this.tableData = data.list;
this.pageTotal = data.total;
}
});
},
// 点击搜索
handSearch() {
this.$refs["searchForm"].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
},
// 重置搜索表单
resetSearchForm() {
this.$refs["searchForm"].resetFields();
this.pageParams.pageNo = 1;
this.getData();
},
// 弹窗关闭前控制
handlDialogClose(done) {
const { dialogDisabled } = this;
if (dialogDisabled) return;
done();
},
// 重置表单状态
resetDialog() {
this.btnLoading = false;
this.dialogDisabled = false;
},
// 分页导航
handleSizeChange(val) {
this.$set(this.pageParams, "pageSize", val);
this.getData();
},
handlePageChange(val) {
this.$set(this.pageParams, "pageNo", val);
this.getData();
},
headerCopy(column, e) {
this.$copy(column.label);
},
// 确认导出
confirmExport2Excel() {
this.btnLoading = true;
this.dialogDisabled = true;
let { searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(searchForm, { pageSize: 10000, pageNo: 1 });
getGoldCoinTransferList(searchForm).then((res) => {
this.resetDialog();
if (res.data.success === true) {
this.exportVisible = false;
const list = res.data.data.list;
list.forEach((item) => {
item.createTime = formatDate(item.createTime);
item.updateTime = formatDate(item.updateTime);
});
const tHeader = [
"ID",
"转赠用户昵称",
"转赠用户平台号",
"接收用户昵称",
"接收用户平台号",
"接收用户国家",
"金币数量",
"创建时间",
"更新时间",
];
const filterVal = [
"id",
"fromUserNick",
"fromUserPlatformNo",
"toUserNick",
"toUserPlatformNo",
"abbr",
"goldNum",
"createTime",
"updateTime",
];
const exportName = `金币转赠历史${formatDate(new Date())}`;
exportExcel(tHeader, filterVal, list, exportName);
}
});
},
},
computed: {
convertTimestamp() {
return function (time) {
let date = new Date(time);
return formatDate(date);
};
},
},
};
</script>
<style lang="scss" scoped>
.handle-box {
overflow: hidden;
.search-line {
display: flex;
flex-wrap: wrap;
.el-form-item {
width: 320px;
.el-input,
.el-select {
width: 200px;
}
.el-form-item--small {
margin-bottom: 0;
}
.el-form-item {
float: left;
}
&.large {
width: 580px;
.el-form-item {
width: 200px;
}
}
&.small {
.el-form-item {
width: 90px;
.el-input {
width: 100%;
}
}
}
}
}
}
.table {
width: 100%;
font-size: 14px;
}
.table-td-thumb {
display: block;
margin: auto;
width: 40px;
height: 40px;
}
</style>

View File

@@ -0,0 +1,337 @@
<template>
<div class="agency-diamond-flow">
<div class="container">
<div class="region-box">
<el-radio-group v-model="region">
<el-radio
v-for="(item, index) in userAreaRegion"
:key="index"
:label="item.value"
>{{ item.name }}</el-radio
>
</el-radio-group>
</div>
<div class="handle-box">
<el-form
ref="searchForm"
:model="searchForm"
:rules="searchRule"
label-width="90px"
:disabled="tableLoading"
>
<div class="search-line">
<el-form-item label="分区" prop="partitionId">
<el-select v-model="searchForm.partitionId" placeholder="请选择">
<el-option
v-for="item in partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="公会ID" prop="agencyId">
<el-input
v-model.trim="searchForm.agencyId"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="公会长ID" prop="agencyOwnerId">
<el-input
v-model.trim="searchForm.agencyOwnerId"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="周期" prop="dateCycle">
<el-select placeholder="请选择" v-model="searchForm.dateCycle">
<el-option
v-for="(item, i) in dateCycleList"
:key="i"
:label="item.startDateStr + '~' + item.endDateStr"
:value="item.dateCycle"
></el-option>
</el-select>
</el-form-item>
<el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button>
<el-button plain @click="resetSearchForm">重置搜索</el-button>
</el-form-item>
</div>
</el-form>
<el-button type="primary" class="exportBtn" @click="confirmExport2Excel"
>导出</el-button
>
</div>
<div class="table">
<el-table
:data="tableData"
border
v-loading="tableLoading"
@header-click="headerCopy"
style="width: 100%"
>
<!-- <el-table-column align="center" prop="region" label="区服">
<template v-slot="scope">
{{ regionType(scope.row.region) }}
</template>
</el-table-column> -->
<el-table-column align="center" prop="partitionDesc" label="分区"> </el-table-column>
<el-table-column align="center" prop="agencyId" label="公会ID">
</el-table-column>
<el-table-column align="center" prop="agencyName" label="公会名称">
</el-table-column>
<el-table-column
align="center"
prop="hallMemberCount"
label="主播人数"
>
</el-table-column>
<!-- <el-table-column align="center" prop="agencyAbbr" label="公会国家"> </el-table-column> -->
<el-table-column align="center" prop="agencyErbanNo" label="公会长ID">
</el-table-column>
<el-table-column align="center" prop="energyValue" label="总钻石流水">
<template v-slot="scope">
{{
scope.row.energyValue
? scope.row.energyValue.toLocaleString()
: "null"
}}
</template>
</el-table-column>
<el-table-column
align="center"
prop="salaryRate"
label="公会长薪资比例"
>
<template v-slot="scope">
{{ scope.row.salaryRate ? scope.row.salaryRate + "%" : "0%" }}
</template>
</el-table-column>
<el-table-column align="center" prop="hallSalary" label="公会长薪资">
</el-table-column>
</el-table>
</div>
<table-pagination
:pageParams="pageParams"
:pageTotal="pageTotal"
:page-sizes="[10, 20, 100, 200]"
@handleSizeChange="handleSizeChange"
@handlePageChange="handlePageChange"
></table-pagination>
</div>
</div>
</template>
<script lang=js>
import { getDateCycleList, getAgencyDiamondFlow, agencyDiamondFlowExport,listPartitionInfo } from '@/api/relAgency/relAgency.js';
import TablePagination from '@/components/common/TablePagination';
import { formatDate, formatDateYMD } from '@/utils/relDate';
// @ts-ignore
import { ElMessage } from "element-plus";
import { ref } from 'vue'; // 引入 ref
import { ElMessageBox } from 'element-plus'; // 正确引入 ElM
// 混入
// import Mixin from '../../mixin/mixRegion.js';
export default {
name: "agencyDiamondFlow",
// mixins: [Mixin],
components: { TablePagination },
data() {
return {
partitionArr: [],
dateCycleList: [],
btnLoading: false, // 导出弹出框(dialog)的确认按钮
tableLoading: false, // 表格是否加载中
tableData: [], // 接口返回的表格数据
pageTotal: 0, // 接口返回的表格总条数
pageParams: {
pageNo: 1,
pageSize: 20
},
// 搜索表单相关
searchForm: {
agencyOwnerId: null,
agencyId: null,
dateCycle: null,
region: null,
partitionId: "",
},
searchRule: {
startTime: [
{
validator: (rule, value, callback) => {
this.$refs['searchForm'].validateField('endTime');
callback();
},
trigger: 'change'
}
],
endTime: [
{
validator: (rule, value, callback) => {
const { startTime } = this.searchForm;
if (startTime !== null && startTime !== '' && value) {
if (value <= startTime) {
callback(new Error('须晚于开始时间'));
} else {
callback();
}
} else {
callback();
}
},
trigger: 'change'
}
]
}
};
},
created() {
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId=this.partitionArr[0].id;
});
this.getDateCycleList();
},
methods: {
getDateCycleList() {
getDateCycleList({ month: 3 }).then((res) => {
this.dateCycleList = res.data || [];
});
},
getData() {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (!searchForm[item] || (searchForm[item] !== undefined && searchForm[item] === '')) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
getAgencyDiamondFlow(pageParams).then((res) => {
this.tableLoading = false;
if (res.code == 200) {
let data = res.data;
this.tableData = data.records;
this.pageTotal = data.total;
}else{
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 点击搜索
handSearch() {
this.$refs['searchForm'].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
},
// 重置搜索表单
resetSearchForm() {
this.$refs['searchForm'].resetFields();
this.pageParams.pageNo = 1;
this.getData();
},
// 确认导出
confirmExport2Excel() {
ElMessageBox.confirm('确定以当前筛选条件导出Excel吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.btnLoading = true;
let { searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
Object.keys(searchForm).forEach((item) => {
if (!searchForm[item] || (searchForm[item] !== undefined && searchForm[item] === '')) {
delete searchForm[item];
}
});
Object.assign(searchForm, { pageSize: 10000, pageNo: 1 });
agencyDiamondFlowExport(searchForm)
.then((res) => {
if (res) {
this.exportVisible = false;
this.btnLoading = false;
let time = formatDate(new Date());
let alink = document.createElement('a');
alink.download = `公会钻石薪资流水统计${time}.xls`;
alink.style.display = 'none';
const blob = new Blob([res.data]);
alink.href = URL.createObjectURL(blob);
document.body.appendChild(alink);
alink.click();
URL.revokeObjectURL(alink.href);
}
})
.catch((err) => {
console.error(err); // 打印错误信息
ElMessage({
showClose: true,
message:"导出失败",
type: "error",
});
});
})
.catch(() => {
});
},
// 分页导航
handleSizeChange(val) {
console.log(val);
this.pageParams.pageSize = val;
this.getData();
},
handlePageChange(val) {
this.pageParams.pageNo = val;
this.getData();
},
headerCopy(column, e) {
this.$copy(column.label);
}
},
computed: {
convertTimestamp1() {
return function (time) {
let date = new Date(time);
return formatDateYMD(date);
};
},
convertTimestamp() {
return function (time) {
let date = new Date(time);
return formatDate(date);
};
}
}
};
</script>
<style scope>
.exportBtn {
margin-bottom: 20px;
}
.container {
width: 100%;
}
.search-line {
width: 38%;
}
</style>

View File

@@ -0,0 +1,340 @@
<template>
<div class="agent-send-salary">
<div class="container">
<div class="handle-box">
<el-form
ref="searchForm"
:model="searchForm"
:rules="searchRule"
label-width="90px"
:disabled="tableLoading"
>
<div class="search-line">
<el-form-item label="分区" prop="partitionId">
<el-select v-model="searchForm.partitionId" placeholder="请选择">
<el-option
v-for="item in partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="充值代理ID" prop="chargeAgentErbanNo">
<el-input
v-model.trim="searchForm.chargeAgentErbanNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="主播ID" prop="erbanNo">
<el-input
v-model.trim="searchForm.erbanNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="时间" class="large">
<el-form-item prop="startTime">
<el-date-picker
type="datetime"
placeholder="选择开始时间"
v-model="searchForm.startTime"
></el-date-picker>
</el-form-item>
<el-col :span="2" align="center">-</el-col>
<el-form-item prop="endTime">
<el-date-picker
type="datetime"
placeholder="选择结束时间"
v-model="searchForm.endTime"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button>
<el-button plain @click="resetSearchForm">重置搜索</el-button>
<el-button type="primary" @click="chargeAgentExportFun"
>导出</el-button
>
</el-form-item>
</div>
</el-form>
<el-button type="text" class="total"
>转增薪资总额:{{ total ? total.toLocaleString() : "0" }}</el-button
>
</div>
<div class="table">
<el-table
:data="tableData"
border
v-loading="tableLoading"
@header-click="headerCopy"
style="width: 100%"
>
<el-table-column align="center" prop="partitionDesc" label="分区">
</el-table-column>
<el-table-column
align="center"
prop="receiveErbano"
label="充值代理ID"
>
</el-table-column>
<el-table-column
align="center"
prop="receiveNick"
label="充值代理昵称"
>
</el-table-column>
<!-- <el-table-column
align="center"
prop="receiveAbbr"
label="充值代理国家"
>
</el-table-column> -->
<el-table-column align="center" prop="erbano" label="主播ID">
</el-table-column>
<el-table-column align="center" prop="nick" label="主播昵称">
</el-table-column>
<!-- <el-table-column align="center" prop="abbr" label="主播国家">
</el-table-column> -->
<el-table-column align="center" prop="tradeUsb" label="转增薪资">
</el-table-column>
<el-table-column align="center" prop="gold" label="对应金币数">
</el-table-column>
<el-table-column
align="center"
prop="createTime"
label="创建时间"
width="160"
>
<template v-slot="scope">
{{ convertTimestamp(scope.row.createTime) }}
</template>
</el-table-column>
</el-table>
</div>
<table-pagination
:pageParams="pageParams"
:pageTotal="pageTotal"
:page-sizes="[10, 20, 100, 200]"
@handleSizeChange="handleSizeChange"
@handlePageChange="handlePageChange"
></table-pagination>
</div>
</div>
</template>
<script>
import {
chargeAgentList,
chargeAgentSum,
listPartitionInfo,
chargeAgentExport,
} from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate";
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import { ref } from "vue";
export default {
name: "agentSendSalary",
components: { TablePagination },
data() {
return {
total: 0,
btnLoading: false, // 导出弹出框(dialog)的确认按钮
tableLoading: false, // 表格是否加载中
tableData: [], // 接口返回的表格数据
pageTotal: 0, // 接口返回的表格总条数
pageParams: {
pageNo: 1,
pageSize: 20,
},
// 搜索表单相关
searchForm: {
erbanNo: null,
chargeAgentErbanNo: null,
startTime: null,
endTime: null,
partitionId: "",
},
partitionArr: [],
searchRule: {
startTime: [
{
validator: (rule, value, callback) => {
this.$refs["searchForm"].validateField("endTime");
callback();
},
trigger: "change",
},
],
endTime: [
{
validator: (rule, value, callback) => {
const { startTime } = this.searchForm;
if (startTime !== null && startTime !== "" && value) {
if (value <= startTime) {
callback(new Error("须晚于开始时间"));
} else {
callback();
}
} else {
callback();
}
},
trigger: "change",
},
],
},
};
},
created() {
// this.getData();
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId = this.partitionArr[0].id;
});
},
methods: {
getData() {
this.tableLoading = true;
let { pageParams, searchForm } = this;
console.log(searchForm);
searchForm.startTime = searchForm.startTime
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
: null;
searchForm.endTime = searchForm.endTime
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
: null;
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
console.log(pageParams);
chargeAgentList(pageParams).then((res) => {
this.tableLoading = false;
if (res.code == 200) {
let data = res.data;
this.tableData = data.records;
this.pageTotal = data.total;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
chargeAgentSum(pageParams).then((res) => {
if (res.code == 200) {
this.total = res.data;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 导出
chargeAgentExportFun() {
let { pageParams, searchForm } = this;
console.log(searchForm);
searchForm.startTime = searchForm.startTime
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
: null;
searchForm.endTime = searchForm.endTime
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
: null;
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
console.log(pageParams);
chargeAgentExport(pageParams).then((res) => {});
},
// 点击搜索
handSearch() {
this.$refs["searchForm"].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
},
// 重置搜索表单
resetSearchForm() {
this.$refs["searchForm"].resetFields();
this.pageParams.pageNo = 1;
this.getData();
},
// 分页导航
handleSizeChange(val) {
// this.$set(this.pageParams, 'pageSize', val);
this.pageParams.pageSize = val;
this.getData();
},
handlePageChange(val) {
// this.$set(this.pageParams, 'pageNo', val);
this.pageParams.pageNo = val;
this.getData();
},
headerCopy(column, e) {
this.$copy(column.label);
},
},
computed: {
convertTimestamp1() {
return function (time) {
let date = new Date(time);
return formatDateYMD(date);
};
},
convertTimestamp() {
return function (time) {
let date = new Date(time);
return formatDate(date);
};
},
},
};
</script>
<style scope>
.exportBtn {
margin-bottom: 20px;
}
.total {
font-size: 18px;
}
.container {
width: 100%;
}
.search-line {
width: 38%;
}
</style>

View File

@@ -0,0 +1,591 @@
<template>
<div class="anchor-salary-operate">
<div class="container">
<div class="handle-box">
<el-form
ref="searchForm"
:model="searchForm"
:rules="searchRule"
label-width="90px"
:disabled="tableLoading"
>
<div class="search-line">
<el-form-item label="分区" prop="partitionId">
<el-select v-model="searchForm.partitionId" placeholder="请选择">
<el-option
v-for="item in partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="主播ID" prop="erbanNo">
<el-input
v-model.trim="searchForm.erbanNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="公会ID" prop="agencyId">
<el-input
v-model.trim="searchForm.agencyId"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="公会长ID" prop="agencyOwnerId">
<el-input
v-model.trim="searchForm.agencyOwnerId"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="周期" prop="dateCycle">
<el-select placeholder="请选择" v-model="searchForm.dateCycle">
<el-option
v-for="(item, i) in dateCycleList"
:key="i"
:label="item.startDateStr + '~' + item.endDateStr"
:value="item.dateCycle"
></el-option>
</el-select>
</el-form-item>
<el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button>
<el-button plain @click="resetSearchForm">重置搜索</el-button>
</el-form-item>
</div>
</el-form>
</div>
<div class="table">
<el-table
:data="tableData"
border
v-loading="tableLoading"
@header-click="headerCopy"
style="width: 100%"
>
<!-- <el-table-column align="center" prop="dateCycle" label="周期" width="105">
<template v-slot="scope">
{{ dateCycleType(scope.row.dateCycle) }}
</template>
</el-table-column> -->
<el-table-column align="center" prop="partitionDesc" label="分区" />
<el-table-column align="center" prop="erbano" label="主播ID">
</el-table-column>
<el-table-column align="center" prop="nick" label="主播昵称">
</el-table-column>
<el-table-column align="center" prop="agencyId" label="公会ID">
</el-table-column>
<el-table-column
align="center"
prop="agencyOwnerErbanNo"
label="公会长ID"
>
</el-table-column>
<el-table-column align="center" prop="diamondFlow" label="钻石流水">
<template v-slot="scope">
{{
scope.row.diamondFlow
? scope.row.diamondFlow.toLocaleString()
: "0"
}}
</template>
</el-table-column>
<el-table-column
align="center"
prop="diamondToUsb"
label="钻石兑换薪资"
>
<template v-slot="scope">
<el-button type="text" @click="handleOpen(1, scope.row)">
{{ scope.row.diamondToUsb + "us" }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" prop="usbToGold" label="薪资兑换金币">
<template v-slot="scope">
<el-button type="text" @click="handleOpen(2, scope.row)">
{{ scope.row.usbToGold + "us" }}
</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
prop="usbToAgent"
label="薪资转增代理"
>
<template v-slot="scope">
<el-button type="text" @click="handleOpen(3, scope.row)">
{{ scope.row.usbToAgent + "us" }}
</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
prop="usbToOwner"
label="薪资转增公会长"
>
<template v-slot="scope">
<el-button type="text" @click="handleOpen(4, scope.row)">
{{ scope.row.usbToOwner + "us" }}
</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
prop="officialWithdram"
label="官方提现"
>
<template v-slot="scope">
<el-button type="text" @click="handleOpen(5, scope.row)">
{{ scope.row.officialWithdram + "us" }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" prop="usb" label="剩余薪资">
</el-table-column>
<el-table-column align="center" prop="diamond" label="钻石余额(当前)">
<template v-slot="scope">
{{
scope.row.diamond ? scope.row.diamond.toLocaleString() : "null"
}}
</template>
</el-table-column>
</el-table>
</div>
<table-pagination
:pageParams="pageParams"
:pageTotal="pageTotal"
:page-sizes="[10, 20, 100, 200]"
@handleSizeChange="handleSizeChange"
@handlePageChange="handlePageChange"
></table-pagination>
</div>
<!-- 弹出框 -->
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="60%">
<el-table
:data="dialogData"
border
class="received-table"
v-loading="dialogLoading"
>
<el-table-column prop="createTime" label="日期" align="center">
<template v-slot="scope">{{
convertTimestamp(scope.row.createTime)
}}</template>
</el-table-column>
<el-table-column
prop="nick"
label="主播昵称"
align="center"
></el-table-column>
<el-table-column
prop="erbano"
label="主播ID"
align="center"
></el-table-column>
<!-- 薪资兑换金币6 -->
<el-table-column
v-if="dialogType == 6"
prop="gold"
label="兑换金币数量"
align="center"
>
<template v-slot="scope">
{{ scope.row.gold ? scope.row.gold.toLocaleString() : "0" }}
</template>
</el-table-column>
<!-- 钻石兑换薪资1 -->
<el-table-column
v-if="dialogType == 1"
prop="exDiamond"
label="兑换钻石数量"
align="center"
>
<template v-slot="scope">
{{
scope.row.exDiamond ? scope.row.exDiamond.toLocaleString() : "0"
}}
</template>
</el-table-column>
<el-table-column
v-if="dialogType == 1 || dialogType == 6"
prop="tradeUsb"
label="兑换薪资数"
align="center"
>
<template v-slot="scope">
{{ scope.row.tradeUsb + "us" }}
</template>
</el-table-column>
<el-table-column
v-if="dialogType == 1"
prop="afterDiamond"
label="钻石余额"
align="center"
>
<template v-slot="scope">
{{
scope.row.afterDiamond
? scope.row.afterDiamond.toLocaleString()
: "0"
}}
</template>
</el-table-column>
<!-- 薪资转增代理2 -->
<el-table-column
v-if="dialogType == 2"
prop="receiveErbano"
label="充值代理ID"
align="center"
></el-table-column>
<el-table-column
v-if="dialogType == 2"
prop="receiveNick"
label="充值代理名称"
align="center"
></el-table-column>
<el-table-column
v-if="dialogType == 2"
prop="beforeUsb"
label="当前薪资"
align="center"
>
<template v-slot="scope">
{{ scope.row.beforeUsb + "us" }}
</template>
</el-table-column>
<el-table-column
v-if="dialogType == 2"
prop="tradeUsb"
label="转增代理"
align="center"
>
<template v-slot="scope">
{{ scope.row.tradeUsb + "us" }}
</template>
</el-table-column>
<!-- 薪资转增公会长3 -->
<el-table-column
v-if="dialogType == 3 || dialogType == 4"
prop="receiveNick"
label="公会长昵称"
align="center"
></el-table-column>
<el-table-column
v-if="dialogType == 3 || dialogType == 4"
prop="receiveErbano"
label="公会长ID"
align="center"
></el-table-column>
<el-table-column
v-if="dialogType == 3"
prop="tradeUsb"
label="转增公会长"
align="center"
>
<template v-slot="scope">
{{ scope.row.tradeUsb + "us" }}
</template>
</el-table-column>
<!-- 官方提现4 -->
<el-table-column
v-if="dialogType == 4"
prop="tradeUsb"
label="官方提现"
align="center"
>
<template v-slot="scope">
{{ scope.row.tradeUsb + "us" }}
</template>
</el-table-column>
<el-table-column align="center" prop="afterUsb" label="剩余薪资">
<template v-slot="scope">
{{ scope.row.afterUsb + "us" }}
</template>
</el-table-column>
</el-table>
<table-pagination
:pageParams="pageParams1"
:pageTotal="pageTotal1"
:page-sizes="[5, 10, 20]"
@handleSizeChange="handleSizeChange1"
@handlePageChange="handlePageChange1"
></table-pagination>
</el-dialog>
</div>
</template>
<script>
import {
getDateCycleList,
getAnchorSalaryBill,
anchorSalaryBillDetail,
listPartitionInfo,
} from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "anchorSalaryOperate",
components: { TablePagination },
data() {
return {
dateCycleList: [],
btnLoading: false, // 导出弹出框(dialog)的确认按钮
tableLoading: false, // 表格是否加载中
tableData: [], // 接口返回的表格数据
pageTotal: 0, // 接口返回的表格总条数
pageParams: {
pageNo: 1,
pageSize: 20,
},
// 搜索表单相关
searchForm: {
agencyOwnerId: null,
agencyId: null,
dateCycle: null,
erbanNo: null,
partitionId: null,
},
partitionArr: [],
searchRule: {
startTime: [
{
validator: (rule, value, callback) => {
this.$refs["searchForm"].validateField("endTime");
callback();
},
trigger: "change",
},
],
endTime: [
{
validator: (rule, value, callback) => {
const { startTime } = this.searchForm;
if (startTime !== null && startTime !== "" && value) {
if (value <= startTime) {
callback(new Error("须晚于开始时间"));
} else {
callback();
}
} else {
callback();
}
},
trigger: "change",
},
],
},
dialogData: [], //弹窗表格数据
dialogVisible: false,
dialogLoading: false,
pageTotal1: 0, // 接口返回的表格总条数
pageParams1: {
pageNo: 1,
pageSize: 10,
},
dialogParams: {},
dialogTitle: "钻石兑换薪资",
dialogType: 1,
};
},
created() {
this.getDateCycleList();
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId = this.partitionArr[0].id;
});
},
methods: {
getDateCycleList() {
getDateCycleList({ month: 3 }).then((res) => {
this.dateCycleList = res.data || [];
});
},
getData() {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
getAnchorSalaryBill(pageParams).then((res) => {
this.tableLoading = false;
if (res.code == 200) {
let data = res.data;
this.tableData = data.records;
this.pageTotal = data.total;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 弹窗
handleOpen(index, row) {
switch (index) {
case 1:
this.dialogTitle = "钻石兑换薪资";
this.dialogType = 1;
break;
case 3:
this.dialogTitle = "薪资转增代理";
this.dialogType = 2;
break;
case 4:
this.dialogTitle = "薪资转增公会长";
this.dialogType = 3;
break;
case 5:
this.dialogTitle = "官方提现";
this.dialogType = 4;
break;
case 2:
this.dialogTitle = "薪资兑换金币";
this.dialogType = 6;
break;
default:
break;
}
this.dialogParams = {
salaryType: index,
dateCycle: this.searchForm.dateCycle,
uid: row.uid,
hallId: row.hallId,
};
this.pageParams1 = {
pageNo: 1,
pageSize: 10,
};
console.log(this.dialogParams);
this.getDetail();
},
getDetail() {
let { pageParams1, dialogParams } = this;
pageParams1 = JSON.parse(JSON.stringify(pageParams1));
dialogParams = JSON.parse(JSON.stringify(dialogParams));
Object.keys(dialogParams).forEach((item) => {
if (
!dialogParams[item] ||
(dialogParams[item] !== undefined && dialogParams[item] === "")
) {
delete dialogParams[item];
}
});
Object.assign(pageParams1, dialogParams);
this.dialogVisible = true;
this.dialogLoading = true;
anchorSalaryBillDetail(pageParams1).then((res) => {
if (res.success === true) {
let data = res.data;
this.dialogData = data.records;
this.pageTotal1 = data.total;
}
this.dialogLoading = false;
});
},
// 点击搜索
handSearch() {
this.$refs["searchForm"].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
},
// 重置搜索表单
resetSearchForm() {
this.$refs["searchForm"].resetFields();
this.pageParams.pageNo = 1;
this.tableData = [];
this.getData();
},
// 分页导航
handleSizeChange(val) {
this.pageParams.pageSize = val;
this.getData();
},
handlePageChange(val) {
this.pageParams.pageNo = val;
this.getData();
},
// 弹窗分页导航
handleSizeChange1(val) {
this.$set(this.pageParams1, "pageSize", val);
this.getDetail();
},
handlePageChange1(val) {
this.$set(this.pageParams1, "pageNo", val);
this.getDetail();
},
headerCopy(column, e) {
this.$copy(column.label);
},
},
computed: {
convertTimestamp1() {
return function (time) {
let date = new Date(time);
return formatDateYMD(date);
};
},
convertTimestamp() {
return function (time) {
let date = new Date(time);
return formatDate(date);
};
},
dateCycleType() {
const { dateCycleList } = this;
return function (value) {
for (let item of dateCycleList) {
if (item.dateCycle === value) {
return (
this.convertTimestamp1(item.startDate) +
"~" +
this.convertTimestamp1(item.endDate)
);
}
}
return "";
};
},
},
};
</script>
<style scope>
.el-button--text {
font-size: 16px;
text-decoration: underline;
}
.container {
width: 100%;
}
.search-line {
width: 38%;
}
</style>

View File

@@ -0,0 +1,263 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<div class="block">
<span class="demonstration">分区</span>
<el-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<div class="inquire">
<span>公会ID</span>
<el-input
v-model="inquire.guildId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>公会长ID</span>
<el-input
v-model="inquire.guildBoosId"
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> -->
<div class="inquire">
<div class="block">
<span class="demonstration">开始时间</span>
<el-date-picker
v-model="inquire.time[0]"
type="date"
placeholder="开始时间"
format="YYYY-MM-DD 00:00:00"
>
</el-date-picker>
</div>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">结束时间</span>
<el-date-picker
v-model="inquire.time[1]"
type="date"
placeholder="结束时间"
format="YYYY-MM-DD 23:59:59"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button class="primary but" type="primary" @click="getData()"
>查询</el-button
>
<el-button
class="primary"
type="primary"
@click="
inquire.guildId = '';
inquire.guildBoosId = '';
inquire.time = [];
getData();
"
>重置查询</el-button
>
<el-button
class="primary"
type="primary"
@click="diamondStatisticsExportFun()"
>导出</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column type="index" width="100" align="center" label="序号" />
<el-table-column prop="partitionDesc" align="center" label="分区" />
<el-table-column prop="guildId" align="center" label="公会ID" />
<el-table-column prop="guildName" align="center" label="公会昵称" />
<el-table-column prop="ownerErbanNo" align="center" label="公会长ID" />
<el-table-column prop="memberNum" align="center" label="主播人数" />
<el-table-column prop="diamondNum" align="center" label="钻石流水" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import {
diamondStatistics,
diamondStatisticsExport,
listPartitionInfo,
} from "@/api/relAgency/relAgency";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "diamondFlow",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
guildId: "",
guildBoosId: "",
time: [],
partitionId: "",
partitionArr: [],
},
// 表格
tableData: [],
// 新增弹窗
addDialog: false,
// 分页
total: 0, //总页数
currentPage: 1, //页码
pageSize: 5, //条数
};
},
created() {
// this.getData();
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = null;
let endTime = null;
if (time.length > 0) {
startTime = this.inquire.time[0]
? dateFormat(this.inquire.time[0], "yyyy-MM-dd")
: null;
endTime = this.inquire.time[1]
? dateFormat(this.inquire.time[1], "yyyy-MM-dd")
: null;
}
diamondStatistics({
guildId: this.inquire.guildId,
ownerErbanNo: this.inquire.guildBoosId,
partitionId: this.inquire.partitionId,
startTime: startTime,
endTime: endTime,
pageNo: 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",
});
}
});
},
// 导出
diamondStatisticsExportFun() {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd");
}
diamondStatisticsExport({
guildId: this.inquire.guildId,
ownerErbanNo: this.inquire.guildBoosId,
startTime: startTime,
endTime: endTime,
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</style>

View File

@@ -0,0 +1,950 @@
<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-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</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="id" align="center" label="公会ID" />
<!-- <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.avatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.avatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<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="scale-down"
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">
<el-button
@click="memberDialogFun(scope.row)"
type="text"
size="default"
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</el-button
>
</template>
</el-table-column>
<el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column
prop="guildContact"
align="center"
label="公会联系方式"
/>
<el-table-column align="center" prop="idCard" label="公会长身份证件">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.idCard"
:zoom-rate="1.1"
:preview-src-list="[scope.row.idCard]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.inviteCheck"
:zoom-rate="1.1"
:preview-src-list="[scope.row.inviteCheck]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="收款账户" width="300">
<template v-slot="scope">
<el-button
@click="payAccountDialogFun(scope.row)"
type="text"
size="medium "
>
payoneer:{{
scope.row.payAccount.payoneer
? scope.row.payAccount.payoneer
: "未添加"
}} </el-button
><br />
<el-button
@click="payAccountDialogFun(scope.row)"
type="text"
size="medium "
>
USDT-ERC20:{{
scope.row.payAccount.usdt ? scope.row.payAccount.usdt : "未添加"
}} </el-button
><br />
<el-button
@click="payAccountDialogFun(scope.row)"
type="text"
size="medium "
>
PayPal:{{
scope.row.payAccount.payPal
? scope.row.payAccount.payPal
: "未添加"
}} </el-button
><br />
</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.id"
style="width: 75%"
class="input"
disabled
></el-input>
</div>
<!-- 会长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"
></el-input>
</div>
<!-- 公会头像 -->
<div class="selectBox selectBoxImg">
<span class="left" style="margin-right: 20px">公会头像</span>
<!-- action="/admin/tencent/cos/upload/file" -->
<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="ediObj.imageUrl2" :src="ediObj.imageUrl2" 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>
<!-- 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="ediObj.imageUrl1" :src="ediObj.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">
<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>
<!-- 编辑收款账户弹窗 -->
<el-dialog
v-model="payAccountDialog"
:title="payAccountTitle"
width="28%"
center
>
<!-- Payoneer -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>Payoneer</span
>
<el-input
v-model="payAccount.payoneer"
style="width: 75%"
class="input"
></el-input>
</div>
<!-- USDT-ERC20 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>USDT-ERC20</span
>
<el-input
v-model="payAccount.usdt"
style="width: 75%"
class="input"
></el-input>
</div>
<!-- PayPal -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>PayPal</span
>
<el-input
v-model="payAccount.payPal"
style="width: 75%"
class="input"
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="payAccountDialog = false">取消</el-button>
<el-button type="primary" @click="payAccountClick()">
保存
</el-button>
</span>
</template>
</el-dialog>
<!-- 编辑成员弹窗 -->
<el-dialog v-model="memberDialog" :title="memberTitle" width="36%" center>
<!-- 新增用户 -->
<div class="inquire">
<span>平台ID</span>
<el-input
v-model="member.userID"
placeholder="请输入新增平台id"
class="input"
></el-input>
<el-button type="primary" @click="addMemberFun()"> 新增 </el-button>
</div>
<!-- 内嵌表格 -->
<el-table
v-loading="loading"
:data="member.tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column align="center" label="用户平台ID">
<template v-slot="scope">
{{ scope.row.erbanNo
}}{{
scope.row.roleType == 1
? "(会长)"
: scope.row.roleType == 2
? "(管理员)"
: ""
}}
{{ scope.row.enable == false ? "(已离开)" : "" }}
</template>
</el-table-column>
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="createTime" align="center" label="加入时间" />
<el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="setMemberFun(scope.row)"
:class="scope.row.roleType == 2 ? 'danger' : 'primary'"
:type="scope.row.roleType == 2 ? 'danger' : 'primary'"
size="default"
:disabled="scope.row.roleType == 1 ? true : false"
>{{
scope.row.roleType == 1
? "会长"
: scope.row.roleType == 2
? "取消管理员"
: "设为管理员"
}}</el-button
>
<el-button
@click="
memberRemoveObj = scope.row;
memberRemoveDialog = true;
"
class="danger"
type="danger"
size="default"
:disabled="scope.row.roleType == 1 ? true : false"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="memberDialog = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
<!-- 二次确认删除弹窗 -->
<el-dialog v-model="memberRemoveDialog" title="提示" width="30%" center>
<span> 确定要删除该成员吗?</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="memberRemoveDialog = false">取消</el-button>
<el-button type="primary" @click="delmemberRemoveClick()">
确认
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
pageFamily,
exportInfo,
create,
update,
dismiss,
savePayAccount,
manageListFamilyMember,
addMember,
setManager,
removeMember,
listPartitionInfo,
} from "@/api/noblemanNew/noblemanNew";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GuildInfoNew",
data() {
return {
loading: false,
delDialog: false,
delDialogData: null,
//查询所需条件对象
inquire: {
userId: "",
referrer: "",
time: "",
partitionId: "",
partitionArr: [],
},
//新增所需对象
resource: {
id: "",
nick: "",
referrer: "",
},
// 表格
tableData: [],
// 新增弹窗
addDialog: false,
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 编辑弹窗
editDialog: false,
ediObj: {
leaderId: "",
leaderNick: "",
guildNick: "",
guildNumber: "",
id: "",
imageUrl1: "",
imageUrl2: "",
},
// 收款账户弹窗
payAccountDialog: false,
payAccountTitle: "(会长昵称【ID:0】)的收款账户",
payAccountNew: {},
payAccount: {
payoneer: "",
usdt: "",
payPal: "",
},
// 新增成员弹窗
memberDialog: false,
memberTitle: "【公会名称】成员信息",
memberNew: {},
member: {
userID: "",
tableData: [],
},
// 删除成员弹窗
memberRemoveDialog: false,
memberRemoveObj: {},
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
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,
partitionId: this.inquire.partitionId,
// 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;
});
},
// 打开成员信息弹窗
memberDialogFun(val) {
var than = this;
than.memberTitle = `${val.name}】成员信息`;
than.memberNew = val;
manageListFamilyMember({
guildId: val.id,
}).then((res) => {
this.member.tableData = res.data;
than.memberDialog = true;
});
},
// 二次确认删除成员
delmemberRemoveClick() {
removeMember({
guildMemberId: this.memberRemoveObj.guildMemberId,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "删除成功",
type: "success",
});
manageListFamilyMember({
guildId: this.memberNew.id,
}).then((res) => {
this.member.tableData = res.data;
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.memberRemoveDialog = false;
});
},
// 设置管理员
setMemberFun(val) {
setManager({
guildMemberId: val.guildMemberId,
status: val.roleType == 3 ? true : val.roleType == 2 ? false : null,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "设置成功!",
type: "success",
});
this.member.userID = "";
manageListFamilyMember({
guildId: this.memberNew.id,
}).then((res) => {
this.member.tableData = res.data;
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 新增成员
addMemberFun() {
addMember({
erbanNo: this.member.userID,
guildId: this.memberNew.id,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "保存成功!",
type: "success",
});
this.member.userID = "";
manageListFamilyMember({
guildId: this.memberNew.id,
}).then((res) => {
this.member.tableData = res.data;
});
} else {
ElMessage({
showClose: true,
message: "保存失败!",
type: "error",
});
}
});
},
// 打开收款账户弹窗
payAccountDialogFun(val) {
this.payAccountTitle = `(${val.ownerNick}【ID:${val.ownerErbanNo}】)的收款账户`;
this.payAccount.payoneer = val.payAccount.payoneer;
this.payAccount.usdt = val.payAccount.usdt;
this.payAccount.payPal = val.payAccount.payPal;
this.payAccountDialog = true;
this.payAccountNew = val;
},
// 保存收款账户
payAccountClick() {
savePayAccount({
id: this.payAccountNew.payAccount.familyId,
payPal: this.payAccount.payPal,
payoneer: this.payAccount.payoneer,
usdt: this.payAccount.usdt,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "保存成功!",
type: "success",
});
this.payAccountDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: "保存失败!",
type: "error",
});
}
});
},
// 导出
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) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "添加成功",
type: "success",
});
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 编辑按钮
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.ediObj.imageUrl1 = obj.backgroundUrl;
this.ediObj.imageUrl2 = obj.avatar;
this.editDialog = true;
},
// 二次确认弹窗
editDialogClick() {
console.log(this.ediObj);
update({
id: this.ediObj.id,
memberNumLimit: this.ediObj.guildNumber,
backgroundUrl: this.ediObj.imageUrl1,
avatar: this.ediObj.imageUrl2,
name: this.ediObj.guildNick,
}).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 guildId = this.delDialogData.id;
dismiss({ guildId }).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;
});
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess(res, file) {
console.log(file);
this.ediObj.imageUrl1 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess2(res, file) {
console.log(file);
this.ediObj.imageUrl2 = 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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</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/noblemanNew/noblemanNew";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GuildMoveNew",
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,640 @@
<template>
<div class="official-withdraw-record">
<div class="container">
<div class="region-box">
<el-radio-group v-model="region">
<el-radio
v-for="(item, index) in userAreaRegion"
:key="index"
:label="item.value"
>{{ item.name }}</el-radio
>
</el-radio-group>
</div>
<div class="handle-box">
<el-form
ref="searchForm"
:model="searchForm"
:rules="searchRule"
label-width="90px"
:disabled="tableLoading"
>
<div class="search-line">
<el-form-item label="分区" prop="partitionId">
<el-select v-model="searchForm.partitionId" placeholder="请选择">
<el-option
v-for="item in partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="MoliStar ID" prop="agencyOwnerErbanNo">
<el-input
v-model.trim="searchForm.agencyOwnerErbanNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="提现状态" prop="status">
<el-select v-model="searchForm.status">
<el-option label="审核中" value="0"></el-option>
<el-option label="审核通过" value="1"></el-option>
<el-option label="未通过" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现账户" prop="accountType">
<el-select v-model="searchForm.accountType">
<el-option label="Vodafone" value="VODAFONE"></el-option>
<el-option label="Payonner" value="PAYONNER"></el-option>
<el-option label="USD" value="USDT"></el-option>
<el-option label="Bank" value="BANK"></el-option>
<el-option label="Other" value="OTHER"></el-option>
</el-select>
</el-form-item>
<el-form-item label="国家" prop="country">
<el-select v-model="searchForm.country">
<el-option
v-for="(item, index) in adminCountryArr"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间" class="large">
<el-form-item prop="startTime">
<el-date-picker
type="datetime"
placeholder="选择开始时间"
v-model="searchForm.startTime"
></el-date-picker>
</el-form-item>
<el-col :span="2" align="center">-</el-col>
<el-form-item prop="endTime">
<el-date-picker
type="datetime"
placeholder="选择结束时间"
v-model="searchForm.endTime"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button>
<el-button type="primary" plain @click="resetSearchForm"
>重置搜索</el-button
>
<el-button
type="primary"
class="exportBtn"
@click="confirmExport2Excel"
>导出</el-button
>
<el-button @click="handleChangeAll()" type="info" plain
>批量发放</el-button
>
<el-button
@click="
centerDialogVisible = true;
centerDialogVisibleType = 1;
"
type="info"
plain
>批量驳回</el-button
>
</el-form-item>
</div>
</el-form>
</div>
<!-- 表格 -->
<div class="table">
<el-table
:data="tableData"
border
v-loading="tableLoading"
@header-click="headerCopy"
@selection-change="handleSelectionChange"
style="width: 100%; overflow-x: auto"
>
<el-table-column type="selection"> </el-table-column>
<el-table-column align="center" prop="erbanNo" label="MoliStar ID" />
<el-table-column align="center" prop="partitionDesc" label="分区" />
<el-table-column align="center" prop="nick" label="昵称" />
<el-table-column align="center" prop="accountCountry" label="国家" />
<el-table-column
align="center"
prop="blocked"
label="用户当前账户状态"
>
<template v-slot="scope">
{{ scope.row.blocked ? "封禁" : "正常" }}
</template>
</el-table-column>
<el-table-column align="center" prop="status" label="申请状态">
<template v-slot="scope">
{{
scope.row.status == 0
? "审核中"
: scope.row.status == 1
? "通过"
: "未通过"
}}
</template>
</el-table-column>
<el-table-column align="center" prop="createTime" label="申请时间" />
<el-table-column
align="center"
prop="accountType"
label="提现类型 "
/>
<el-table-column
align="center"
prop="guildUsdNum"
label="提现薪资US"
/>
<el-table-column align="center" prop="currency" label="发放币种" />
<el-table-column align="center" prop="currencyNum" label="发放金额" />
<el-table-column align="center" prop="withdrawRate" label="手续费" />
<el-table-column align="center" prop="withdrawNum" label="核销薪资" />
<el-table-column align="center" prop="remark" label="驳回理由">
<template v-slot="scope">
{{ scope.row.remark ? scope.row.remark : "/" }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="hallSalary"
label="操作"
width="150"
>
<template v-slot="scope">
<div v-if="scope.row.status == 0">
<el-button
@click="handleChange(scope.row)"
type="text"
size="mini"
>
发放
</el-button>
<el-button
@click="
centerDialogVisible = true;
centerDialogVisibleType = 2;
centerDialogVisibleID = scope.row.id;
"
type="text"
size="mini"
>
驳回
</el-button>
</div>
<div>
<el-button
@click="accountInfosFun(scope.row)"
type="text"
size="mini"
>
查看详情
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<table-pagination
:pageParams="pageParams"
:pageTotal="pageTotal"
:page-sizes="[10, 20, 100, 200]"
@handleSizeChange="handleSizeChange"
@handlePageChange="handlePageChange"
></table-pagination>
<!-- 驳回弹窗 -->
<el-dialog v-model="centerDialogVisible" title="提示" width="30%" center>
<span> 请选择驳回理由:</span>
<div class="boxs">
<el-radio class="radios" v-model="radio" label="用户消息提供不足"
>用户消息提供不足</el-radio
>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="centerDialogVisible = false">取消</el-button>
<el-button type="primary" @click="dialogClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 提现详情弹窗 -->
<el-dialog v-model="centerDialogVisible2" title="提现详情">
<div class="boxs2">
<div>申请提现时间{{ accountDetails.createTime }}</div>
<div>申请ID{{ accountDetails.erbanNo }}</div>
<div>country{{ accountDetails.country }}</div>
<div>payeeAccount{{ accountDetails.bank_account }}</div>
<div>Bank Name{{ accountDetails.bank_name }}</div>
<div>SWIFT Code{{ accountDetails.swift_code }}</div>
<div>payeeName:{{ accountDetails.full_name }}</div>
<div>address{{ accountDetails.address }}</div>
<div>提现薪资US{{ accountDetails.guildUsdNum }}</div>
<div>
发放金额{{ accountDetails.currency }}
{{ accountDetails.currencyNum }}
</div>
<div>提现手续费{{ accountDetails.withdrawRate }}</div>
<div>核销薪资{{ accountDetails.withdrawNum }}</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="centerDialogVisible2 = false">确认</el-button>
</span>
</template>
</el-dialog>
</div>
</div>
</template>
<script>
import {
agencyWithdrawList,
agencyWithdrawExamineExport,
agencyWithdrawSet,
agencyWithdrawBatchSet,
batchReject,
adminCountry,
listPartitionInfo,
} from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate";
import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
import { ElMessageBox } from "element-plus"; // 正确引入 ElM
// 混入
// import Mixin from '../../mixin/mixRegion.js';
export default {
name: "officialWithdrawRecord",
// mixins: [Mixin],
components: { TablePagination },
data() {
return {
dateCycleList: [],
btnLoading: false, // 导出弹出框(dialog)的确认按钮
tableLoading: false, // 表格是否加载中
tableData: [], // 接口 返回的表格数据
pageTotal: 0, // 接口返回的表格总条数
pageParams: {
pageNo: 1,
pageSize: 20,
},
centerDialogVisible: false, //驳回弹窗
centerDialogVisibleType: null, //驳回弹窗
centerDialogVisibleID: null, //驳回弹窗
centerDialogVisible2: false, //操作弹窗
radio: "用户消息提供不足", //驳回原因
// 搜索表单相关
searchForm: {
agencyOwnerErbanNo: null,
status: null,
startTime: null,
endTime: null,
adminCountry: null,
country: null,
partitionId: null,
},
partitionArr: [],
adminCountryArr: [],
searchRule: {
startTime: [
{
validator: (rule, value, callback) => {
this.$refs["searchForm"].validateField("endTime");
callback();
},
trigger: "change",
},
],
endTime: [
{
validator: (rule, value, callback) => {
const { startTime } = this.searchForm;
if (startTime !== null && startTime !== "" && value) {
if (value <= startTime) {
callback(new Error("须晚于开始时间"));
} else {
callback();
}
} else {
callback();
}
},
trigger: "change",
},
],
},
idStr: [], //批量删除ID
// 查看薪资弹窗数据存储
accountDetails: {
createTime: null,
erbanNo: null,
country: null,
bank_account: null,
bank_name: null,
swift_code: null,
full_name: null,
address: null,
guildUsdNum: null,
currency: null,
currencyNum: null,
withdrawRate: null,
withdrawNum: null,
},
};
},
created() {
adminCountry().then((res) => {
this.adminCountryArr = res.data;
});
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId = this.partitionArr[0].id;
this.getData();
});
},
methods: {
getData() {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm.startTime = searchForm.startTime
? dateFormat(searchForm.startTime, "yyyy-MM-dd hh:mm:ss")
: "";
searchForm.endTime = searchForm.endTime
? dateFormat(searchForm.endTime, "yyyy-MM-dd hh:mm:ss")
: "";
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(pageParams, searchForm);
console.log(pageParams);
console.log(searchForm);
agencyWithdrawList(pageParams).then((res) => {
this.tableLoading = false;
if (res.code == 200) {
let data = res.data;
this.tableData = data.records;
this.pageTotal = data.total;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
handleSelectionChange(rows) {
this.idStr = null;
this.idStr = rows.map((obj) => obj.id).join(",");
},
handleChangeAll() {
ElMessageBox.confirm("确定要结算吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
agencyWithdrawBatchSet({ ids: this.idStr }).then((res) => {
if (res.success === true) {
ElMessage({
type: "success",
message: "操作成功!",
});
this.getData();
this.idStr = null;
}
});
})
.catch(() => {
ElMessage({
type: "warning ",
message: "已取消",
});
});
},
// 查看详情处理函数
accountInfosFun(res) {
var obj = JSON.parse(res.accountInfos);
console.log(obj);
this.accountDetails.createTime = res.createTime ? res.createTime : "-";
this.accountDetails.erbanNo = res.erbanNo ? res.erbanNo : "-";
this.accountDetails.country = obj.country ? obj.country : "-";
this.accountDetails.bank_account = obj.bank_account
? obj.bank_account
: "-";
this.accountDetails.bank_name = obj.bank_name ? obj.bank_name : "-";
this.accountDetails.swift_code = obj.swift_code ? obj.swift_code : "-";
this.accountDetails.full_name = obj.full_name ? obj.full_name : "-";
this.accountDetails.address = obj.address ? obj.address : "-";
this.accountDetails.guildUsdNum = res.guildUsdNum ? res.guildUsdNum : "-";
this.accountDetails.currency = res.currency ? res.currency : "-";
this.accountDetails.currencyNum = res.currencyNum ? res.currencyNum : "-";
this.accountDetails.withdrawRate = res.withdrawRate
? res.withdrawRate
: "-";
this.accountDetails.withdrawNum = res.withdrawNum ? res.withdrawNum : "-";
this.centerDialogVisible2 = true;
},
// 批量驳回
dialogClick() {
batchReject({
ids:
this.centerDialogVisibleType == 1
? this.idStr
: this.centerDialogVisibleID,
remark: this.radio,
})
.then((res) => {
if (res.code == 200) {
ElMessage({
type: "success",
message: "操作成功!",
});
this.getData();
this.centerDialogVisible = false;
this.idStr = null;
} else {
ElMessage({
type: "error",
message: res.message,
});
}
})
.catch(() => {
ElMessage({
type: "warning ",
message: "已取消",
});
});
},
handleChange(row) {
ElMessageBox.confirm("确定要结算吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
agencyWithdrawSet({ ids: row.id }).then((res) => {
if (res.success === true) {
ElMessage({
type: "success",
message: "操作成功!",
});
this.getData();
this.idStr = null;
}
});
})
.catch(() => {
ElMessage({
type: "warning ",
message: "已取消",
});
});
},
// 点击搜索
handSearch() {
this.$refs["searchForm"].validate((valid) => {
if (valid) {
this.pageParams.pageNo = 1;
this.getData();
}
});
},
// 重置搜索表单
resetSearchForm() {
this.$refs["searchForm"].resetFields();
this.pageParams.pageNo = 1;
this.getData();
},
// 确认导出
confirmExport2Excel() {
ElMessageBox.confirm("确定以当前筛选条件导出Excel吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.btnLoading = true;
let { searchForm } = this;
searchForm = JSON.parse(JSON.stringify(searchForm));
Object.keys(searchForm).forEach((item) => {
if (
!searchForm[item] ||
(searchForm[item] !== undefined && searchForm[item] === "")
) {
delete searchForm[item];
}
});
Object.assign(searchForm, { pageSize: 10000, pageNo: 1 });
agencyWithdrawExamineExport(searchForm)
.then((res) => {
if (res) {
this.exportVisible = false;
this.btnLoading = false;
let time = formatDate(new Date());
let alink = document.createElement("a");
alink.download = `官方提现记录${time}.xls`;
alink.style.display = "none";
const blob = new Blob([res.data]);
alink.href = URL.createObjectURL(blob);
document.body.appendChild(alink);
alink.click();
URL.revokeObjectURL(alink.href);
}
})
.catch((err) => {
console.error(err); // 打印错误信息
ElMessage.error("导出失败");
});
})
.catch(() => {
ElMessage({
type: "info",
message: "取消",
});
});
},
// 分页导航
handleSizeChange(val) {
this.pageParams.pageSize = val;
this.getData();
},
handlePageChange(val) {
this.pageParams.pageSize = val;
this.getData();
},
headerCopy(column, e) {
this.$copy(column.label);
},
},
computed: {
convertTimestamp1() {
return function (time) {
let date = new Date(time);
return formatDateYMD(date);
};
},
convertTimestamp() {
return function (time) {
let date = new Date(time);
return formatDate(date);
};
},
},
};
</script>
<style scope>
.exportBtn {
margin-bottom: 0;
}
.text {
margin-left: 20px;
}
.container {
width: 100%;
}
.search-line {
width: 38%;
}
.boxs {
margin-top: 10px;
width: 100%;
word-wrap: break-word; /* 允许在单词内换行 */
overflow-wrap: break-word; /* 同上,现代浏览器推荐使用 */
white-space: normal; /* 允许换行 */
}
.radios {
display: block !important;
width: 100% !important;
word-wrap: break-word !important; /* 允许在单词内换行 */
overflow-wrap: break-word !important; /* 同上,现代浏览器推荐使用 */
white-space: normal !important; /* 允许换行 */
height: auto !important;
}
.boxs2 div {
margin-bottom: 10px;
font-size: 16px;
}
</style>

View File

@@ -73,6 +73,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div>
</div>
<div class="form-group">
@@ -93,6 +94,12 @@
<input type="text" class="form-control" name="headwearName" id="headwearEnName">
</div>
</div>
<div class="form-group">
<label for="headwearTrName" class="col-sm-3 control-label">土耳其头饰名称:</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="headwearName" id="headwearTrName">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">使用萝卜购买</label>
<div class="col-sm-9">
@@ -227,6 +234,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">
@@ -375,6 +392,7 @@ export default {
{field: 'name.zh', title: '头饰名称', align: 'center', width: '5%'},
{field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%'},
{field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%'},
{field: 'name.tr', title: '土耳其头饰名称', align: 'center', width: '5%'},
{
field: 'partitionFlag',
title: '地区',
@@ -391,6 +409,9 @@ export default {
if ((val & 4) != 0) {
value += '华语区<br>';
}
if ((val & 8) != 0) {
value += '土耳其<br>';
}
return value;
}
},
@@ -633,6 +654,7 @@ export default {
$("#headwearName").val("");
$("#headwearArName").val("");
$("#headwearEnName").val("");
$("#headwearTrName").val("");
$("#price").val("");
$("#renewPrice").val("");
$("#originalPrice").val("");
@@ -669,6 +691,7 @@ export default {
$('input[name="partitionFlag"]').each(function() {
$(this).checked = false;
});
$('#type').val(0);
$("#headwearModal").modal('show');
});
@@ -677,8 +700,9 @@ export default {
var headwearName = $("#headwearName").val();
var headwearArName = $("#headwearArName").val();
var headwearEnName = $("#headwearEnName").val();
var headwearTrName = $("#headwearTrName").val();
// 国际化字段
var jsonName = {"zh":headwearName,"ar":headwearArName,"en":headwearEnName}
var jsonName = {"zh":headwearName,"ar":headwearArName,"en":headwearEnName,"tr":headwearTrName}
const nameValue = JSON.stringify(jsonName);
var price = $("#price").val();
var renewPrice = $("#renewPrice").val();
@@ -703,6 +727,7 @@ export default {
var radishOriginalPrice = $("#radishOriginalPrice").val();
var radishPrice = $("#radishPrice").val();
var radishRenewPrice = $("#radishRenewPrice").val();
var type = $('#type').val();
//分区
const partitionFlagArray = $("input:checkbox[name='partitionFlag']:checked").serializeArray();
@@ -771,6 +796,7 @@ export default {
radishPrice: radishPrice,
radishRenewPrice: radishRenewPrice,
partitionFlag: partitionFlag,
type: type,
},
dataType: "json",
success: function (json) {
@@ -812,10 +838,12 @@ export default {
$("#headwearName").val(jsonName.zh);
$("#headwearArName").val(jsonName.ar);
$("#headwearEnName").val(jsonName.en);
$("#headwearTrName").val(jsonName.tr);
} else {
$("#headwearName").val(name);
$("#headwearArName").val(name);
$("#headwearEnName").val(name);
$("#headwearTrName").val(name);
}
$("#price").val(json.price);
@@ -830,6 +858,7 @@ export default {
$("#radishRenewPrice").val(json.radishRenewPrice);
$("#radishOriginalPrice").val(json.radishOriginalPrice);
$('#type').val(json.type);
$("#enable").checked = json.enable;
if (json.goldSale == true) {

File diff suppressed because it is too large Load Diff

View File

@@ -1,93 +1,93 @@
<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"
<el-date-picker v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-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"
<el-select v-model="inquire.value"
placeholder="请选择">
<el-option v-for="item in inquire.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
: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"
<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"
style="width: 100%; margin-top: 25px">
<el-table-column prop="erBanNo"
align="center"
label="直接邀请人总充值"
/>
<el-table-column
prop="indirectChargeAmount"
label="用户id" />
<el-table-column prop="nick"
align="center"
label="间接邀请人总充值"
/>
<el-table-column
prop="activityRegisterProfit"
label="用户昵称" />
<el-table-column prop="inviteCode"
align="center"
label="活动内注册收益"
/>
<el-table-column
prop="activityReturnProfit"
label="邀请码" />
<el-table-column prop="directNum"
align="center"
label="活动内返点收益"
/>
<el-table-column align="center" label="操作" width="300">
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)"
<el-button @click="details(scope.row)"
class="primary"
type="primary"
size="default"
>查看详情</el-button
>
<el-button
@click="set(scope.row)"
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
>
size="default">{{ scope.row.isBlack == 0 ? "设为活动黑名单" : "取消活动黑名单" }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
<el-pagination style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
@@ -95,67 +95,76 @@
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
@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"
<el-input style="display: inline-block; width: 200px"
v-model="detailsUserId"
placeholder=""
class="input"
></el-input>
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"
<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="是否补填">
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"
<el-table-column prop="inviteCharge30Amount"
align="center"
label="邀请30天内充值"
/>
<el-table-column prop="inviteChargeAmount" align="center" label="累计充值" />
<el-table-column
prop="inviteGiveAmount"
label="邀请30天内充值" />
<el-table-column prop="inviteChargeAmount"
align="center"
label="累计接收代充转增"
/>
label="累计充值" />
<el-table-column prop="inviteGiveAmount"
align="center"
label="累计接收代充转增" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
<el-pagination style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage2"
v-model:page-size="pageSize2"
@@ -163,12 +172,12 @@
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
/>
@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

@@ -1,38 +1,61 @@
<template>
<div class="page-container">
<div class="main_box" :style="[smsSwitch ? 'height: 350px' : '']">
<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>
<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" />
<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">
<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">
<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"
<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>
<button type="button"
id="validateSend"
class="btn btn-primary btn-lg">发送验证码</button>
</div>
</div>
<div class="form-group" style="margin-bottom: 0px;">
<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>
<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">
<input type="reset"
value="重&nbsp;&nbsp;置"
class="btn btn-default btn-lg">
</div>
</form>
</div>
@@ -47,24 +70,24 @@ import store from '@/store';
var sendFlag = true;
export default {
name: "LoginView",
data() {
data () {
return {
smsSwitch: true,
smsSwitch: false,
};
},
setup() {
setup () {
return {
};
},
created() {
created () {
this.smsSwitch = true;
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
var $ul = $('<ul id="bubble-wrapper"/>');
for (var i = 0; i < 10; i++) {
@@ -174,7 +197,7 @@ export default {
},
};
function sendSmsSuccess() {
function sendSmsSuccess () {
if (sendFlag) {
sendFlag = false;
var time = 181;
@@ -191,7 +214,7 @@ function sendSmsSuccess() {
}
//获取cookie的信息
function getCookie(name) {
function getCookie (name) {
var reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
var arr = document.cookie.match(reg);
if (arr) {
@@ -203,11 +226,12 @@ function getCookie(name) {
</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 {

View File

@@ -0,0 +1,232 @@
<template>
<div class="box">
<div class="condition">
<!-- 分区 -->
<div class="inquire">
<span>奖池</span>
<el-select
v-model="inquire.value"
placeholder="请选择"
@change="handleChange"
>
<el-option
v-for="item in inquire.options"
:key="item.type"
:label="item.name"
:value="item.type"
>
</el-option>
</el-select>
</div>
</div>
<!-- 总分组 -->
<div class="allArr">
目前数组 <span>{{ allArr.length }} </span> :
<span class="span" v-for="(item, index) in allArr" :key="index">
{{ item.expect }},
</span>
</div>
<!-- 数组设置 -->
<div class="arrSet">数组设置</div>
<!-- 数组内容 -->
<div class="boxs">
<div class="arrContent" v-for="(item, index) in arr" :key="index">
<div class="arrBox">
<div class="left">
<div class="left_in1">
期望: <b class="b1">{{ item.expect }}</b> ,
</div>
<div class="left_in2">
得到率: <b class="b2">{{ (item.winRate * 100).toFixed(2) }}%</b> ,
</div>
</div>
<div class="right" v-for="(arrInItem, i) in item.itemList" :key="i">
<span>{{ arrInItem.multi }}</span>
<el-input
@input="handleInput(index, i, $event)"
v-model="arrInItem.num"
placeholder=""
class="input"
/>
</div>
</div>
</div>
</div>
<!-- 按钮 -->
<div class="but">
<el-button class="primary" type="primary" @click="saveFun()"
>保存
</el-button>
</div>
</div>
</template>
<script>
import { listType, list, save } from "@/api/luckGift/luckGift";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import moment from "moment-timezone";
export default {
name: "luckGiftArrange",
data() {
return {
//查询所需条件对象
inquire: {
value: "",
options: [],
},
allArr: [], //总数组
arr: [], //处理下面总数组
};
},
created() {
listType().then((res) => {
this.inquire.options = res.data;
this.inquire.value = res.data[0].type;
this.getData();
});
},
methods: {
// 查询接口
getData() {
list({ type: this.inquire.value }).then((res) => {
this.allArr = res.data;
this.arr = res.data;
});
},
handleInput(index, i, val) {
// 期望值 expectedvalue = 倍数 * 5 * num / 2500
// 中奖率 winRate =不为θ的倍数的num / 500
this.arr[index].expect = this.calculationFun(index, i, val).expect;
this.arr[index].winRate = this.calculationFun(index, i, val).winRate;
},
// 计算函数
calculationFun(index, i, val) {
var expectNum = 0;
var winRate = 0;
this.arr[index].itemList.forEach((res) => {
expectNum += res.multi * res.num;
winRate += Number(res.num);
});
console.log(winRate);
return {
expect: (expectNum / 500).toFixed(2),
winRate: (winRate / 500).toFixed(4),
};
},
// 保存
saveFun() {
//
save(
JSON.stringify({ poolList: this.arr, type: this.inquire.value })
).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "保存成功",
type: "success",
});
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 监听类型
handleChange(value) {
this.inquire.value = value;
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
font-size: 18px;
.condition {
margin-bottom: 20px;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
}
.but {
margin-bottom: 20px;
}
.allArr {
margin: 20px 0 10px 0;
span {
color: red;
}
.span {
margin: 0 10px;
}
}
.arrSet {
margin-bottom: 0px;
}
.boxs {
display: flex;
// justify-content: space-between;
flex-wrap: wrap;
.arrContent {
// margin-bottom: 20px;
width: 190px;
height: 395px;
line-height: 30px;
margin-bottom: 20px;
.arrBox {
.left {
// float: left;
div {
min-width: 100px;
display: block;
// margin-bottom: -25px;
.b1 {
color: red;
}
.b2 {
color: blue;
}
}
.left_in2 {
margin-bottom: 10px
}
}
.right {
float: left;
margin-bottom: 15px;
span {
display: inline-block;
width: 45px;
}
.input {
display: inline-block;
width: 100px;
margin-right: 10px;
font-size: 16px;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,268 @@
<template>
<div class="box">
<!-- ID -->
<div class="condition">
<!-- 分区 -->
<div class="inquire">
<span>分区</span>
<el-select
v-model="inquire.value"
placeholder="请选择"
@change="handleChange"
>
<el-option
v-for="item in inquire.options"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>MoliStar ID</span>
<el-input v-model="inquire.userId" placeholder="" class="input">
</el-input>
</div>
<!-- 送出时间 -->
<div class="inquire">
<span>送出时间</span>
<el-date-picker v-model="inquire.time" type="date" placeholder="请选择">
</el-date-picker>
</div>
</div>
<el-button type="text">总进入{{ totalInput }}</el-button>
<el-button type="text">总退出{{ totalOutput }}</el-button>
<el-button type="text"
>总比例{{ totalProductionRatio }}</el-button
>
<!-- 按钮 -->
<div class="but">
<el-button class="primary" type="primary" @click="getData()"
>查询
</el-button>
<el-button
@click="
inquire.userId = '';
inquire.time = '';
"
>重置筛选
</el-button>
<el-button
class="primary"
type="primary"
style="margin-left=20px;"
:disabled="butClick"
@click="
editDialog = true;
type = 12;
editDialogTitle = '赠送1000倍奖励';
value = inquire.x;
"
>
赠送</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="uid" align="center" label="uid" />
<el-table-column prop="erbanNo" align="center" label="平台id" />
<el-table-column prop="totalInput" align="center" label="进入" />
<el-table-column prop="totalOutput" align="center" label="退出" />
<el-table-column prop="production" align="center" label="剩余" />
<el-table-column
prop="productionRatio"
align="center"
label="退出/进入"
/>
<el-table-column prop="avgInput" align="center" label="每次进入" />
<el-table-column prop="num" align="center" label="总次数" />
<el-table-column prop="winNum" align="center" label="得到次数" />
<el-table-column prop="winRate" align="center" label="得到率" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" :title="editDialogTitle" 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"
>{{ editDialogTitle }}</span
>
<el-input
v-model="value"
style="width: 75%"
class="input"
placeholder="请输入用户ID"
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button
@click="
editDialog = false;
butClick = false;
"
>取消</el-button
>
<el-button
type="primary"
:disabled="butClick"
@click="editDialogClick()"
>
保存
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { personal, updateUserMulti,listPartitionInfo } from "@/api/luckGift/luckGift";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import moment from "moment-timezone";
export default {
name: "luckGiftData",
data() {
return {
loading: false,
totalInput: 0,
totalOutput: 0,
totalProductionRatio: 0,
//查询所需条件对象
inquire: {
userId: "",
time: "",
value: "",
options: [],
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
editDialog: false,
editDialogTitle: "",
value: "",
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.value = this.inquire.options[0].id;
});
// this.getData();
},
methods: {
// 查询接口
getData() {
console.log(dateFormat(this.inquire.time, "yyyy-MM-dd"));
if (!this.inquire.time && this.inquire.userId == '') {
ElMessage({
showClose: true,
message: "时间和ID至少填一项",
type: "error",
});
return;
}
this.loading = true;
personal({
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
date: this.inquire.time
? dateFormat(this.inquire.time, "yyyy-MM-dd")
: null,
partitionId: this.inquire.value,
}).then((res) => {
this.total = res.data.dataPage.total;
this.tableData = res.data.dataPage.rows;
this.totalInput = res.data.totalInput;
this.totalOutput = res.data.totalOutput;
this.totalProductionRatio = res.data.totalProductionRatio;
this.loading = false;
});
},
// 确认保存
editDialogClick() {
this.butClick = true;
updateUserMulti({ erbanNo: this.value }).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "赠送成功",
type: "success",
});
setTimeout(() => {
this.butClick = false;
}, 3000);
this.editDialog = false;
this.getData();
} else {
this.butClick = false;
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;
.condition {
margin-bottom: 20px;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
}
.but {
margin-bottom: 20px;
}
}
</style>

View File

@@ -0,0 +1,138 @@
<template>
<div class="box">
<div class="condition">
<!-- 分区 -->
<div class="inquire">
<span>分区</span>
<el-select v-model="inquire.value" placeholder="请选择">
<el-option
v-for="item in inquire.options"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<!-- 时间 -->
<!-- <div class="inquire">
<span>时间</span>
<el-date-picker v-model="inquire.time" type="date" placeholder="请选择">
</el-date-picker>
</div> -->
</div>
<!-- 按钮 -->
<div class="but">
<el-button class="primary" type="primary" @click="getData()"
>查询
</el-button>
</div>
<el-button type="text">数组出金币总额{{ totalInput }}</el-button>
<el-button type="text">数组出返币总额{{ totalOutput }}</el-button>
<el-button type="text">投产比{{ totalProductionRatio }}</el-button>
<!-- 表格 -->
<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="totalInput" align="center" label="进入" />
<el-table-column prop="totalOutput" align="center" label="退出" />
<el-table-column
prop="productionRatio"
align="center"
label="退出/进入比例"
/>
<el-table-column prop="num" align="center" label="参与次数" />
<el-table-column prop="count" align="center" label="参与人数" />
<el-table-column prop="winCount" align="center" label="得到人数" />
<el-table-column prop="winNum" align="center" label="得到次数" />
<el-table-column prop="winRate" align="center" label="得到率" />
</el-table>
</div>
</template>
<script>
import { platform,listPartitionInfo } from "@/api/luckGift/luckGift";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import moment from "moment-timezone";
export default {
name: "luckGiftDataAll",
data() {
return {
loading: false,
totalInput: "0",
totalOutput: "0",
totalProductionRatio: "0",
//查询所需条件对象
inquire: {
value: "",
options: [],
time: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.value = this.inquire.options[0].id;
});
// this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
platform({
partitionId: this.inquire.value,
}).then((res) => {
this.totalInput = res.data.totalInput;
this.totalOutput = res.data.totalOutput;
this.totalProductionRatio = res.data.totalProductionRatio;
this.tableData = res.data.dataList;
this.loading = false;
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.condition {
margin-bottom: 20px;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
}
.but {
margin-bottom: 20px;
}
}
</style>

View File

@@ -0,0 +1,504 @@
<template>
<div class="box">
<div class="condition">
<!-- 分区 -->
<div class="inquire">
<span>分区</span>
<el-select
v-model="inquire.value"
placeholder="请选择"
@change="handleChange"
>
<el-option
v-for="item in inquire.options"
:key="item.type"
:label="item.name"
:value="item.type"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>对比值N</span>
<!-- @input="handleInput" -->
<el-input
v-model="inquire.comparisonValue"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 1;
editDialogTitle = '对比值N';
value = inquire.comparisonValue;
"
>
编辑</el-button
>
</div>
<div class="inquire">
<span>对比值M</span>
<el-input
v-model="inquire.supplement.supplementRatio"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 5;
editDialogTitle = '对比值M';
value = inquire.supplement.supplementRatio;
"
>
编辑</el-button
>
</div>
<div class="inquire">
<span>金币对比值A</span>
<!-- @input="handleInput" -->
<el-input
v-model="inquire.supplement.conditionInput"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 6;
editDialogTitle = '金币对比值A';
value = inquire.supplement.conditionInput;
"
>
编辑</el-button
>
</div>
<div class="inquire">
<span>奖励金币倍数</span>
<!-- @input="handleInput" -->
<el-input
v-model="inquire.supplement.supplementMulti"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 7;
editDialogTitle = '奖励金币倍数';
value = inquire.supplement.supplementMulti;
"
>
编辑</el-button
>
</div>
<div class="inquire">
<span>幸运24金币库存</span>
<el-input
v-model="inquire.goldInventory"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 2;
editDialogTitle = '幸运24金币库存';
value = inquire.goldInventory;
"
>编辑</el-button
>
</div>
<!-- <div class="inquire">
<span>幸运礼物ID</span>
<el-input
v-model="inquire.x"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 8;
editDialogTitle = '幸运礼物ID';
value = inquire.x;
"
>
编辑</el-button
>
</div> -->
<div class="inquire">
<span>平台抽成</span>
<el-input
v-model="inquire.platformCommission"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 3;
editDialogTitle = '平台抽成';
value = inquire.platformCommission;
"
>编辑</el-button
>
</div>
<div class="inquire">
<span>用户收益比例</span>
<el-input
v-model="inquire.userRevenueRatio"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 4;
editDialogTitle = '用户收益比例';
value = inquire.userRevenueRatio;
"
>编辑</el-button
>
</div>
<div class="inquire">
<span>通知制定金额</span>
<!-- @input="handleInput" -->
<el-input
v-model="inquire.warnMulti"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 9;
editDialogTitle = '通知制定金额';
value = inquire.warnMulti;
"
>
编辑</el-button
>
</div>
<!-- <div class="inquire">
<span>库存告急通知</span>
<el-input
v-model="inquire.x"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 10;
editDialogTitle = '库存告急通知';
value = inquire.x;
"
>
编辑</el-button
>
</div> -->
<div class="inquire">
<span>用户上线列表</span>
<!-- @input="handleInput" -->
<el-input
v-model="inquire.followErbanNoList"
placeholder=""
class="input"
disabled
></el-input>
<el-button
class="primary"
type="primary"
@click="
editDialog = true;
butClick = false;
type = 11;
editDialogTitle = '用户上线列表';
value = inquire.followErbanNoList;
"
>
编辑</el-button
>
</div>
<div class="inquire">
<span>赠送1000倍奖励</span>
<el-button
class="primary"
type="primary"
:disabled="butClick"
@click="
editDialog = true;
type = 12;
editDialogTitle = '赠送1000倍奖励';
value = inquire.x;
"
>
赠送</el-button
>
</div>
</div>
<!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" :title="editDialogTitle" 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"
>{{ editDialogTitle }}</span
>
<el-input
v-model="value"
style="width: 75%"
class="input"
placeholder="请输入"
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button
@click="
editDialog = false;
butClick = false;
"
>取消</el-button
>
<el-button
type="primary"
:disabled="butClick"
@click="editDialogClick()"
>
保存
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { getConfig, updateSet, updateUserMulti } from "@/api/luckGift/luckGift";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import moment from "moment-timezone";
export default {
name: "luckGiftSet",
data() {
return {
loading: false,
butClick: false,
butClickTime: null,
//查询所需条件对象
inquire: {
value: 2,
options: [
{
name: "阿拉伯区",
type: 2,
},
{
name: "英语区",
type: 1,
},
{
name: "华语区",
type: 4,
},
{
name: "土耳其区",
type: 8,
},
],
comparisonValue: "",
goldInventory: "",
giftId: "",
platformCommission: "",
userRevenueRatio: "",
supplement: {
conditionInput: "",
conditionNum: "",
supplementMulti: "",
supplementNum: "",
supplementRatio: "",
},
warnMulti: "",
followErbanNoList: "",
},
editDialog: false,
editDialogTitle: "",
value: "",
type: null,
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
getConfig({ partitionId: this.inquire.value }).then((res) => {
this.inquire.comparisonValue = res.data.productionRatio;
this.inquire.goldInventory = res.data.stock;
this.inquire.platformCommission = res.data.platformRatio;
this.inquire.userRevenueRatio = res.data.receiverRatio;
this.inquire.supplement = res.data.supplement;
this.inquire.warnMulti = res.data.warnMulti;
this.inquire.followErbanNoList = res.data.followErbanNoList.join();
});
},
// 确认保存
editDialogClick() {
var obj = {};
obj.partitionId = this.inquire.value;
if (this.type == 12) {
this.butClick = true;
updateUserMulti({ erbanNo: this.value }).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message:'赠送成功',
type: "success",
});
setTimeout(() => {
this.butClick = false;
}, 3000);
this.editDialog = false;
this.getData();
} else {
this.butClick = false;
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
} else {
if (this.type == 1) {
obj.productionRatio = this.value;
} else if (this.type == 2) {
obj.stock = this.value;
} else if (this.type == 3) {
obj.platformRatio = this.value;
} else if (this.type == 4) {
obj.receiverRatio = this.value;
}else if (this.type == 5) {
obj.supplement = this.inquire.supplement;
obj.supplement.supplementRatio = this.value;
} else if (this.type == 6) {
obj.supplement = this.inquire.supplement;
obj.supplement.conditionInput = this.value;
} else if (this.type == 7) {
obj.supplement = this.inquire.supplement;
obj.supplement.supplementMulti = this.value;
} else if (this.type == 9) {
obj.warnMulti = this.value;
} else if (this.type == 11) {
obj.followErbanNoList = this.value.split(",");
}
updateSet(obj).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "保存成功",
type: "success",
});
this.editDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
}
},
// 监听类型
handleChange(value) {
this.inquire.value = value;
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.condition {
margin-bottom: 20px;
.inquire {
margin-right: 20px;
margin-bottom: 20px;
span {
display: inline-block;
width: 110px;
margin-right: 10px;
// text-align: right;
}
.input {
width: 180px;
margin-right: 10px;
}
}
}
.but {
margin-bottom: 20px;
}
}
</style>

View File

@@ -306,7 +306,8 @@ export default {
this.inquire.value1 = e;
luckyGiftRangeConfigList({ giftId: this.inquire.value1 }).then((res) => {
this.inquire.giftsNum = res.data;
// this.inquire.value2 = res.data[0].id;
// this.inquire.value2 = "";
this.inquire.value2 = res.data[0].id;
// this.loading = true;
// luckyGiftRewardList({
// giftId: e,

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="scale-down"
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="scale-down"
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="scale-down"
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

@@ -0,0 +1,661 @@
<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 prop="name" align="center" label="勋章名称-土耳其区">
<template v-slot="scope">{{ JSON.parse(scope.row.name).tr }}</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="scale-down"
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-input
v-model="controlsObj.nickTr"
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 :src="controlsObj.imageUrl1" class="avatar" />
</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: "",
nickTr: "",
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.nickTr = "";
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.nickTr = JSON.parse(val.name).tr;
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,
tr: this.controlsObj.nickTr,
});
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,
tr: this.controlsObj.nickTr,
});
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 == 15) {
val = [1, 2, 4, 8];
}
if (num == 0 || num == 15) {
val = [1, 2, 4, 8];
} else if (num == 1) {
val = [1];
} else if (num == 3) {
val = [1, 2];
} else if (num == 7) {
val = [1, 2, 4];
} else if (num == 2) {
val = [2];
} else if (num == 6) {
val = [2, 4];
} else if (num == 14) {
val = [2, 4, 8];
} else if (num == 4) {
val = [4];
} else if (num == 12) {
val = [4, 8];
} else if (num == 8) {
val = [8];
}
} else {
if (num == 0 || num == 15) {
val = "英语区、阿语区、华语区、土耳其区";
} else if (num == 1) {
val = "英语区";
} else if (num == 3) {
val = "英语区、阿语区";
} else if (num == 7) {
val = "英语区、阿语区、华语区";
} else if (num == 2) {
val = "阿语区";
} else if (num == 6) {
val = "阿语区、华语区";
} else if (num == 14) {
val = "阿语区、华语区、土耳其区";
} else if (num == 4) {
val = "华语区";
} else if (num == 12) {
val = "华语区、土耳其区";
} else if (num == 8) {
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="scale-down"
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

@@ -28,6 +28,9 @@
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExportAll" class="btn btn-sm btn-primary">
导出
</button>
</div>
</div>
</section><!-- .content -->
@@ -60,7 +63,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import { miniGameForBaiShunPage, miniGameForBaiShunDetailPage, miniGameForBaiShunExport } from '@/api/miniGame/miniGameForBaiShun';
import { miniGameForBaiShunPage, miniGameForBaiShunDetailPage, miniGameForBaiShunExport, miniGameForBaiShunExportAll } from '@/api/miniGame/miniGameForBaiShun';
import { getConfigValueByKey } from '@/api/system/sysconf';
import { buildSelectOption } from '@/utils/system-helper';
@@ -146,6 +149,9 @@ export default {
$('#btnExport').click(function () {
$this.export();
});
$('#btnExportAll').click(function () {
$this.exportForAll();
});
});
},
initTable() {
@@ -249,6 +255,13 @@ export default {
}
});
},
exportForAll() {
miniGameForBaiShunExportAll({
gameId: $('#gameId').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
});
},
},
}
</script>

View File

@@ -74,6 +74,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div>
</div>
<div class="form-group">
@@ -103,6 +104,12 @@
<input type="text" class="form-control validate[required]" name="name1" id="en_name1" placeholder="请输入,5个字符内">
</div>
</div>
<div class="form-group">
<label for="tr_name1" class="col-sm-4 control-label">土耳其铭牌名称:</label>
<div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="name1" id="tr_name1" placeholder="请输入,5个字符内">
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">用户自定义文案:</label>
<div class="col-sm-6">
@@ -110,11 +117,30 @@
<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 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="fixedWord" id="fixedWord"
placeholder="请输入,5个字符内">
<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 class="form-group">
<label for="trFixedWord" class="col-sm-4 control-label">土耳其固定文案:</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="trFixedWord" id="trFixedWord">
</div>
</div>
</div>
<div class="form-group">
@@ -234,6 +260,7 @@ export default {
{field: 'name.zh', title: '铭牌名称', align: 'middle', width: '5%'},
{field: 'name.ar', title: '阿语铭牌名称', align: 'middle', width: '5%'},
{field: 'name.en', title: '英语铭牌名称', align: 'middle', width: '5%'},
{field: 'name.tr', title: '土耳其名称', align: 'middle', width: '5%'},
{
field: 'partitionFlag',
title: '地区',
@@ -250,6 +277,9 @@ export default {
if ((val & 4) != 0) {
value += '华语区<br>';
}
if ((val & 8) != 0) {
value += '土耳其区<br>';
}
return value;
}
},
@@ -269,7 +299,7 @@ export default {
},
{ field: 'isCustomWordStr', title: '是否自定义文案', align: 'middle', width: '5%' },
{
field: 'fixedWord',
field: 'fixedWord.zh',
title: '固定文案',
align: 'middle',
width: '5%',
@@ -281,6 +311,45 @@ 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: 'fixedWord.tr',
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,14 +420,24 @@ 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;
@@ -399,30 +478,44 @@ 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);
$("#ar_name1").val(jsonName.ar);
$("#en_name1").val(jsonName.en);
$("#tr_name1").val(jsonName.tr);
} else {
$("#name1").val(name);
$("#ar_name1").val(name);
$("#en_name1").val(name);
$("#tr_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);
$('#trFixedWord').val(jsonValue.tr);
} else {
$('#zhFixedWord').val(fixedWord);
$('#arFixedWord').val(fixedWord);
$('#enFixedWord').val(fixedWord);
$('#trFixedWord').val(fixedWord);
}
$('#nameplateType1').attr("disabled", "true");
if (!json.isCustomWord) {
$('input[name="isCustomWord"]').get(0).checked = true;
$('#fixedWord-div').addClass("hidden");
$('#zhFixedWord').val('');
$('#arFixedWord').val('');
$('#enFixedWord').val('');
$('#trFixedWord').val('');
} else {
$('input[name="isCustomWord"]').get(1).checked = true;
$('#fixedWord-div').removeClass("hidden");
$('#fixedWord').val('');
}
//$('input[name="isCustomWord"]').val(json.isCustomWord);
$("#fixedWord").val(json.fixedWord);
$("#days").val(json.days);
$("#status1").val(json.status);
$("#type1").val(json.type);
@@ -492,13 +585,22 @@ 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();
var trFixedWord = $('#trFixedWord').val();
let fixedWordValue = '';
if (!(zhFixedWord == '' && arFixedWord == '' && enFixedWord == '' && trFixedWord=="")) {
let jsonFixedWord = {'zh': zhFixedWord, 'ar': arFixedWord, 'en': enFixedWord,'tr':trFixedWord};
fixedWordValue = JSON.stringify(jsonFixedWord);
}
var isCustomWord = $('input[name="isCustomWord"]:checked').val();
var name = $('#name1').val();
var ar_name = $('#ar_name1').val();
var en_name = $('#en_name1').val();
var tr_name = $('#tr_name1').val();
var jsonName = {"zh":name,"ar":ar_name,"en":en_name}
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,"tr":tr_name}
const nameValue = JSON.stringify(jsonName);
var nameplateType = $('#nameplateType1').val();
var id = $('#id').val();
@@ -561,7 +663,7 @@ export default {
nameplateType: nameplateType,
name: nameValue,
isCustomWord: isCustomWord,
fixedWord: fixedWord,
fixedWord: fixedWordValue,
days: days,
status: status,
type: type,
@@ -703,13 +805,17 @@ function cleanNamePlateModal() {
$('#status1').val('');
$('#type1').val('');
$('#days').val('');
$('#fixedWord').val('');
$('#zhFixedWord').val('');
$('#arFixedWord').val('');
$('#enFixedWord').val('');
$('#trFixedWord').val('');
$('input[name="isCustomWord"]').each(function () {
$(this).removeAttr("checked");
});
$('#name1').val('');
$('#ar_name1').val('');
$('#en_name1').val('');
$('#tr_name1').val('');
$('#nameplateType1').val('');
$('#name1').removeAttr("readonly");
$('#nameplateType1').removeAttr("disabled");

View File

@@ -0,0 +1,325 @@
<template>
<div class="box">
<!-- 时间选择器 -->
<div class="inquire">
<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>
</div>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">会长分区</span>
<el-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.inquireonInfos"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 公会ID -->
<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>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="deriveFun()"
>导出</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
<el-table-column prop="name" align="center" label="公会名称" />
<el-table-column
prop="ownerPartitionName"
align="center"
label="会长分区"
/>
<el-table-column prop="memberNum" align="center" label="成员数" />
<el-table-column
prop="goldIncome"
align="center"
label="月金币收入(流水)"
/>
<el-table-column
prop="hasGoldIncomeMemberNum"
align="center"
label="有流水成员数"
/>
<el-table-column prop="sendGiftUserNum" align="center" label="送礼人数" />
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button @click="ediClick(scope.row)" type="text" size="default"
>查看详情</el-button
>
<el-button @click="deriveFun2(scope.row)" type="text" size="default"
>导出</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 内嵌单个工会详情 -->
<el-dialog :title="detailsTitle" v-model="detailsDialog">
<el-table
v-loading="loading"
:data="tableDataDetails"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="erbanNo" align="center" label="用户平台ID"
><template v-slot="scope">
{{
scope.row.enable ? scope.row.erbanNo : scope.row.erbanNo + "离开"
}}
</template>
</el-table-column>
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="micRemainTime" align="center" label="直播时长" />
<el-table-column
prop="goldIncome"
align="center"
label="金币收入(流水)"
/>
<el-table-column
prop="sendGiftUserNum"
align="center"
label="送礼人数"
/>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button @click="detailsDialog = false">关闭</el-button>
<el-button type="primary" @click="incomeExportFamilyFun()"
>导出</el-button
>
</div></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 {
incomePageFamily,
incomeListFamilyMember,
incomeExportFamily,
incomeExportFamilys,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GoldWater",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
time: this.calculateLastSevenDays(),
id: "",
nick: "",
partitionId: 2,
inquireonInfos: [
{ desc: "英语区", id: 1 },
{ desc: "阿拉伯区", id: 2 },
{ desc: "华语区", id: 4 },
],
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 内嵌单个公会详情
detailsDialog: false,
detailsTitle: "",
tableDataDetails: [],
familyIdEx: "",
};
},
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");
}
incomePageFamily({
erbanNo: this.inquire.id,
familyName: this.inquire.nick,
partitionId: this.inquire.partitionId,
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;
});
},
// 导出总外列表
deriveFun(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");
}
incomeExportFamilys({
startDate: startTime,
endDate: endTime,
erbanNo: this.inquire.id,
familyName: this.inquire.nick,
partitionId: this.inquire.partitionId,
}).then((res) => {});
},
// 导出列表最外层
deriveFun2(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");
}
incomeExportFamily({
familyId: val.id,
startDate: startTime,
endDate: endTime,
}).then((res) => {});
this.detailsDialog = false;
},
// 默认七天
calculateLastSevenDays() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
return [start, end];
},
// 查看详情按钮
ediClick(val) {
this.detailsTitle = `公会昵称:【${val.name}】 时间:【${val.createTime}】—金币收入明细`;
let time = this.inquire.time;
let startDate = "";
let endDate = "";
if (time && time.length > 0) {
startDate = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endDate = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
this.familyIdEx = val.id;
incomeListFamilyMember({
endDate,
startDate,
familyId: val.id,
}).then((res) => {
this.tableDataDetails = res.data;
this.detailsDialog = true;
});
},
// 导出按钮
incomeExportFamilyFun() {
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");
}
incomeExportFamily({
familyId: this.familyIdEx,
startDate: startTime,
endDate: endTime,
}).then((res) => {});
this.detailsDialog = 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

@@ -9,8 +9,16 @@
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
@@ -22,7 +30,7 @@
>
</el-date-picker>
</div>
</div>
</div> -->
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
@@ -30,6 +38,9 @@
<el-button class="primary" type="primary" @click="addDialog = true"
>添加</el-button
>
<el-button class="primary" type="primary" @click="exportInfoFun()"
>导出</el-button
>
<!-- 表格 -->
<el-table
@@ -38,9 +49,28 @@
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.avatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.avatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column align="center" prop="giftInfo" label="公会背景图">
<template v-slot="scope">
<el-image
@@ -48,21 +78,94 @@
:src="scope.row.backgroundUrl"
:zoom-rate="1.1"
:preview-src-list="[scope.row.backgroundUrl]"
fit="cover"
fit="scale-down"
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 prop="goldIncome" align="center" label="金币总收入" />
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" />
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
<el-table-column align="center" label="成员数量/上限">
<template v-slot="scope">
<el-button
@click="memberDialogFun(scope.row)"
type="text"
size="default"
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</el-button
>
</template>
</el-table-column>
<el-table-column align="center" label="收款账户" width="300">
<template v-slot="scope">
<el-button
@click="payAccountDialogFun(scope.row)"
type="text"
size="medium "
>
payoneer:{{
scope.row.payAccount.payoneer
? scope.row.payAccount.payoneer
: "未添加"
}} </el-button
><br />
<el-button
@click="payAccountDialogFun(scope.row)"
type="text"
size="medium "
>
USDT-ERC20:{{
scope.row.payAccount.usdt ? scope.row.payAccount.usdt : "未添加"
}} </el-button
><br />
<el-button
@click="payAccountDialogFun(scope.row)"
type="text"
size="medium "
>
PayPal:{{
scope.row.payAccount.payPal
? scope.row.payAccount.payPal
: "未添加"
}} </el-button
><br />
</template>
</el-table-column>
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
<el-table-column
prop="memberNumLimit"
prop="guildContact"
align="center"
label="成员数量上限"
label="公会联系方式"
/>
<el-table-column align="center" prop="idCard" label="公会长身份证件">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.idCard"
:zoom-rate="1.1"
:preview-src-list="[scope.row.idCard]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.inviteCheck"
:zoom-rate="1.1"
:preview-src-list="[scope.row.inviteCheck]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@@ -101,6 +204,18 @@
class="input"
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
class="col-sm-2 control-label"
>推荐人</span
>
<el-input
v-model="resource.referrer"
style="width: 75%"
class="input"
></el-input>
</div>
<!-- <div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
@@ -173,9 +288,40 @@
v-model="ediObj.guildNick"
style="width: 75%"
class="input"
disabled
></el-input>
</div>
<!-- 公会头像 -->
<div class="selectBox selectBoxImg">
<span class="left" style="margin-right: 20px">公会头像</span>
<!-- action="/admin/tencent/cos/upload/file" -->
<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="ediObj.imageUrl2" :src="ediObj.imageUrl2" 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>
<!-- 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="ediObj.imageUrl1" :src="ediObj.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">
<span
@@ -208,10 +354,160 @@
</span>
</template>
</el-dialog>
<!-- 编辑收款账户弹窗 -->
<el-dialog
v-model="payAccountDialog"
:title="payAccountTitle"
width="28%"
center
>
<!-- Payoneer -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>Payoneer</span
>
<el-input
v-model="payAccount.payoneer"
style="width: 75%"
class="input"
></el-input>
</div>
<!-- USDT-ERC20 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>USDT-ERC20</span
>
<el-input
v-model="payAccount.usdt"
style="width: 75%"
class="input"
></el-input>
</div>
<!-- PayPal -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>PayPal</span
>
<el-input
v-model="payAccount.payPal"
style="width: 75%"
class="input"
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="payAccountDialog = false">取消</el-button>
<el-button type="primary" @click="payAccountClick()">
保存
</el-button>
</span>
</template>
</el-dialog>
<!-- 编辑成员弹窗 -->
<el-dialog v-model="memberDialog" :title="memberTitle" width="36%" center>
<!-- 新增用户 -->
<div class="inquire">
<span>平台ID</span>
<el-input
v-model="member.userID"
placeholder="请输入新增平台id"
class="input"
></el-input>
<el-button type="primary" @click="addMemberFun()"> 新增 </el-button>
</div>
<!-- 内嵌表格 -->
<el-table
v-loading="loading"
:data="member.tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column align="center" label="用户平台ID">
<template v-slot="scope">
{{ scope.row.erbanNo
}}{{
scope.row.roleType == 1
? "(会长)"
: scope.row.roleType == 2
? "(管理员)"
: ""
}}
{{ scope.row.enable == false ? "(已离开)" : "" }}
</template>
</el-table-column>
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="createTime" align="center" label="加入时间" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="setMemberFun(scope.row)"
:class="scope.row.roleType == 2 ? 'danger' : 'primary'"
:type="scope.row.roleType == 2 ? 'danger' : 'primary'"
size="default"
:disabled="scope.row.roleType == 1 ? true : false"
>{{
scope.row.roleType == 1
? "会长"
: scope.row.roleType == 2
? "取消管理员"
: "设为管理员"
}}</el-button
>
<el-button
@click="
memberRemoveObj = scope.row;
memberRemoveDialog = true;
"
class="danger"
type="danger"
size="default"
:disabled="scope.row.roleType == 1 ? true : false"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="memberDialog = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
<!-- 二次确认删除弹窗 -->
<el-dialog v-model="memberRemoveDialog" title="提示" width="30%" center>
<span> 确定要删除该成员吗?</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="memberRemoveDialog = false">取消</el-button>
<el-button type="primary" @click="delmemberRemoveClick()">
确认
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { pageFamily, create, update, dismiss } from "@/api/nobleman/nobleman";
import {
pageFamily,
exportInfo,
create,
update,
dismiss,
savePayAccount,
manageListFamilyMember,
addMember,
setManager,
removeMember,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
@@ -226,12 +522,14 @@ export default {
//查询所需条件对象
inquire: {
userId: "",
referrer: "",
time: "",
},
//新增所需对象
resource: {
id: "",
nick: "",
referrer: "",
},
// 表格
tableData: [],
@@ -249,7 +547,29 @@ export default {
guildNick: "",
guildNumber: "",
id: "",
imageUrl1: "",
imageUrl2: "",
},
// 收款账户弹窗
payAccountDialog: false,
payAccountTitle: "(会长昵称【ID:0】)的收款账户",
payAccountNew: {},
payAccount: {
payoneer: "",
usdt: "",
payPal: "",
},
// 新增成员弹窗
memberDialog: false,
memberTitle: "【公会名称】成员信息",
memberNew: {},
member: {
userID: "",
tableData: [],
},
// 删除成员弹窗
memberRemoveDialog: false,
memberRemoveObj: {},
};
},
created() {
@@ -268,9 +588,10 @@ export default {
}
pageFamily({
erbanNo: this.inquire.userId,
referrer: this.inquire.referrer,
familyName: this.inquire.nick,
startDate: startTime,
endDate: endTime,
// startDate: startTime,
// endDate: endTime,
pageNum: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
@@ -279,11 +600,155 @@ export default {
this.loading = false;
});
},
// 打开成员信息弹窗
memberDialogFun(val) {
var than = this;
than.memberTitle = `${val.name}】成员信息`;
than.memberNew = val;
manageListFamilyMember({
familyId: val.id,
}).then((res) => {
this.member.tableData = res.data;
than.memberDialog = true;
});
},
// 二次确认删除成员
delmemberRemoveClick() {
removeMember({
familyMemberId: this.memberRemoveObj.familyMemberId,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "删除成功",
type: "success",
});
manageListFamilyMember({
familyId: this.memberNew.id,
}).then((res) => {
this.member.tableData = res.data;
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.memberRemoveDialog = false;
});
},
// 设置管理员
setMemberFun(val) {
setManager({
familyMemberId: val.familyMemberId,
status: val.roleType == 3 ? true : val.roleType == 2 ? false : null,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "设置成功!",
type: "success",
});
this.member.userID = "";
manageListFamilyMember({
familyId: this.memberNew.id,
}).then((res) => {
this.member.tableData = res.data;
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 新增成员
addMemberFun() {
addMember({
erbanNo: this.member.userID,
familyId: this.memberNew.id,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "保存成功!",
type: "success",
});
this.member.userID = "";
manageListFamilyMember({
familyId: this.memberNew.id,
}).then((res) => {
this.member.tableData = res.data;
});
} else {
ElMessage({
showClose: true,
message: "保存失败!",
type: "error",
});
}
});
},
// 打开收款账户弹窗
payAccountDialogFun(val) {
this.payAccountTitle = `(${val.ownerNick}【ID:${val.ownerErbanNo}】)的收款账户`;
this.payAccount.payoneer = val.payAccount.payoneer;
this.payAccount.usdt = val.payAccount.usdt;
this.payAccount.payPal = val.payAccount.payPal;
this.payAccountDialog = true;
this.payAccountNew = val;
},
// 保存收款账户
payAccountClick() {
savePayAccount({
id: this.payAccountNew.payAccount.familyId,
payPal: this.payAccount.payPal,
payoneer: this.payAccount.payoneer,
usdt: this.payAccount.usdt,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "保存成功!",
type: "success",
});
this.payAccountDialog = false;
this.getData();
} else {
ElMessage({
showClose: true,
message: "保存失败!",
type: "error",
});
}
});
},
// 导出
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();
});
@@ -296,6 +761,8 @@ export default {
this.ediObj.guildNick = obj.name;
this.ediObj.guildNumber = obj.memberNumLimit;
this.ediObj.id = obj.id;
this.ediObj.imageUrl1 = obj.backgroundUrl;
this.ediObj.imageUrl2 = obj.avatar;
this.editDialog = true;
},
// 二次确认弹窗
@@ -304,6 +771,9 @@ export default {
update({
id: this.ediObj.id,
memberNumLimit: this.ediObj.guildNumber,
backgroundUrl: this.ediObj.imageUrl1,
avatar: this.ediObj.imageUrl2,
name: this.ediObj.guildNick,
}).then((res) => {
if (res.code == 200) {
ElMessage({
@@ -346,6 +816,40 @@ export default {
this.delDialog = false;
});
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess2(res, file) {
console.log(file);
// this.ediObj.imageUrl1 = URL.createObjectURL();
this.ediObj.imageUrl2 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess(res, file) {
console.log(file);
// this.ediObj.imageUrl1 = URL.createObjectURL();
this.ediObj.imageUrl1 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
// 分页导航
handleSizeChange() {
this.getData();
@@ -379,4 +883,13 @@ export default {
margin: 15px 0 5px 0px;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</style>

View File

@@ -0,0 +1,397 @@
<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.avatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.avatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<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="scale-down"
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

@@ -3,63 +3,180 @@
<!-- 查询 -->
<div class="inquire">
<span>ID</span>
<el-input
v-model="inquire.userId"
<el-input v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
class="input"></el-input>
</div>
<!-- 工会昵称 -->
<div class="inquire">
<span>工会名称</span>
<el-input v-model="inquire.nick" placeholder="" class="input"></el-input>
<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"
<el-date-picker v-model="inquire.time"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-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="getData()">查询</el-button>
<!-- 导出按钮 -->
<el-button class="primary"
type="primary"
@click="exportFamilyMemberFun()">导出</el-button>
<!-- 表格 -->
<el-table
v-loading="loading"
<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="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"
style="width: 100%; margin-top: 25px">
<el-table-column prop="familyName"
align="center"
label="送礼用户数"
/>
<el-table-column align="center" label="成员状态">
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"
<el-pagination style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
@@ -67,19 +184,24 @@
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
@current-change="handleCurrentChange" />
</div>
</template>
<script>
import { pageFamilyMember } from "@/api/nobleman/nobleman";
import {
pageFamilyMember,
listFun,
addRecord,
listRecord,
exportFamilyMember,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "GuildMemberInfo",
data() {
data () {
return {
loading: false,
//查询所需条件对象
@@ -92,6 +214,10 @@ export default {
resource: {
id: "",
nick: "",
time: "",
nowValue: "",
options: [],
familyMemberId: null,
},
// 表格
tableData: [],
@@ -103,12 +229,15 @@ export default {
pageSize: 10, //条数
};
},
created() {
created () {
this.getData();
listFun().then((res) => {
this.violationObj.options = res.data;
});
},
methods: {
// 查询接口
getData() {
getData () {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
@@ -132,11 +261,97 @@ export default {
this.loading = false;
});
},
// 导出
exportFamilyMemberFun () {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
exportFamilyMember({
erbanNo: this.inquire.userId,
familyName: this.inquire.nick,
startDate: startTime,
endDate: endTime,
pageNum: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
});
},
// 违规警告
warnClick (val) {
console.log(val.row);
var obj = val.row;
this.violationObj.id = val.row.erbanNo;
this.violationObj.nick = val.row.nick;
this.violationObj.familyMemberId = val.row.familyMemberId;
this.violationDialog = true;
},
add (val) {
var num = this.violationObj.options.map((item, i) => {
return this.violationObj.nowValue == item.id ? i : null;
});
let time = dateFormat(this.violationObj.time, "yyyy-MM-dd hh:mm:ss");
addRecord({
familyMemberId: this.violationObj.familyMemberId,
violationId: this.violationObj.nowValue,
date: time,
content: this.violationObj.options[num].content,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message,
type: "success",
});
this.getData();
this.violationDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
listRecordFun (val) {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
listRecord({
familyMemberId: val.familyMemberId,
startTime: startTime,
endTime: endTime,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message,
type: "success",
});
this.dialogTableVisible = true;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 分页导航
handleSizeChange() {
handleSizeChange () {
this.getData();
},
handleCurrentChange() {
handleCurrentChange () {
this.getData();
},
},

View File

@@ -0,0 +1,398 @@
<template>
<div class="box">
<!-- 时间选择器 -->
<div class="inquire">
<div class="block">
<span class="demonstration">日期</span>
<el-config-provider :locale="zhCn">
<el-date-picker v-model="inquire.time"
type="month"
placeholder="选择月">
</el-date-picker></el-config-provider>
</div>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">会长分区</span>
<el-select v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择">
<el-option v-for="item in inquire.inquireonInfos"
:key="item.id"
:label="item.desc"
:value="item.id"></el-option>
</el-select>
</div>
</div>
<!-- 公会 -->
<div class="inquire">
<span>会长ID</span>
<el-input v-model="inquire.nick"
placeholder=""
class="input"></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary"
type="primary"
@click="getData()">查询</el-button>
<!-- 导出 -->
<el-button class="primary"
type="primary"
@click="deriveFun()">导出</el-button>
<!-- 表格 -->
<el-table v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px">
<el-table-column prop="ownerErbanNo"
align="center"
label="会长ID" />
<el-table-column prop="name"
align="center"
label="公会名称" />
<el-table-column prop="ownerPartitionName"
align="center"
label="会长分区" />
<el-table-column prop="enable"
align="center"
label="是否有效状态">
<template v-slot="scope">{{ scope.row.enable? '': '' }}</template>
</el-table-column>
<el-table-column prop="memberNum"
align="center"
label="成员数" />
<el-table-column prop="goldIncome"
align="center"
label="月金币收入(流水)" />
<el-table-column prop="goldWage"
align="center"
label="金币工资" />
<el-table-column prop="agentWage"
align="center"
label="代理工资" />
<el-table-column prop="diamondRemain"
align="center"
label="当前钻石余额">
<template v-slot="scope">{{ scope.row.diamondRemain }}</template>
</el-table-column>
<el-table-column align="center"
label="操作"
width="260">
<template v-slot="scope">
<el-button @click="ediClick(scope.row)"
class="primary"
type="primary"
size="default">查看详情</el-button>
<el-button @click="deriveFun2(scope.row)"
class="primary"
type="primary"
size="default">导出</el-button>
</template>
</el-table-column>
</el-table>
<!-- 内嵌单个工会详情 -->
<el-dialog :title="detailsTitle"
v-model="detailsDialog">
<el-table v-loading="loading"
:data="tableDataDetails"
border
style="width: 100%; margin-top: 25px">
<el-table-column prop="erbanNo"
align="center"
label="用户平台ID">
<template v-slot="scope">
{{
scope.row.erbanNo == scope.row.familyOwnerErbanNo
? scope.row.erbanNo + "(会长)"
: scope.row.enable
? scope.row.erbanNo
: scope.row.erbanNo + "离开"
}}
</template>
</el-table-column>
<el-table-column prop="nick"
align="center"
label="用户昵称" />
<el-table-column prop="micRemainTime"
align="center"
label="本月直播时长" />
<el-table-column prop="micVaildDays"
align="center"
label="本月有效天数" />
<el-table-column prop="goldIncome"
align="center"
label="月金币收入(流水)" />
<el-table-column prop="goldWage"
align="center"
label="金币工资" />
<el-table-column prop="agentWage"
align="center"
label="代理工资" />
<el-table-column prop="diamondRemain"
align="center"
label="当前钻石余额" />
<el-table-column align="center"
label="操作">
<template v-slot="scope">
<el-button @click="detailsClick(scope.row)"
class="primary"
type="primary"
size="default">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button @click="detailsDialog = false">关闭</el-button>
<el-button type="primary"
@click="detailsClickOut()">导出</el-button>
</div>
</template>
</el-dialog>
<!-- 内嵌单个成员明细 -->
<el-dialog :title="detailsTitle2"
v-model="detailsDialog2">
<el-table v-loading="loading"
:data="tableDataDetails2"
border
style="width: 100%; margin-top: 25px">
<el-table-column prop="date"
align="center"
label="日期" />
<el-table-column prop="micRemainTime"
align="center"
label="直播时长" />
<el-table-column prop="micVaild"
align="center"
label="是否有效天">
<template v-slot="scope">
{{ scope.row.micVaild ? "" : "" }}
</template>
</el-table-column>
<el-table-column prop="goldIncome"
align="center"
label="当日金币收入" />
<el-table-column prop="savedGoldIncome"
align="center"
label="月累计金币收入" />
<el-table-column prop="saveedGoldWage"
align="center"
label="月金币工资" />
<el-table-column prop="diamondRemain"
align="center"
label="当日钻石余额" />
<!-- <el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button
@click="detailsClick2(scope)"
class="primary"
type="text"
size="default"
:disabled="!scope.row.enable"
>查看详情</el-button
>
</template>
</el-table-column> -->
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button @click="detailsDialog2 = false">关闭</el-button>
<el-button type="primary"
@click="detailsClickOut2()">导出</el-button>
</div>
</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 zhCn from "element-plus/dist/locale/zh-cn.mjs";
import {
statPageFamily,
listFamilyMember,
statExportFamilyMember,
listFamilyMemberDaily,
exportFamilyMemberDaily,
statExportFamily,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "WagesCount",
data () {
return {
zhCn,
loading: false,
//查询所需条件对象
inquire: {
time: "",
nick: "",
partitionId: 2,
inquireonInfos: [
{ desc: "英语区", id: 1 },
{ desc: "阿拉伯区", id: 2 },
{ desc: "华语区", id: 4 },
],
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 内嵌单个公会详情
detailsDialog: false,
detailsTitle: "工会昵称 时间段 结算明细",
tableDataDetails: [],
detailsClickOutObj: {},
// 内嵌单个公会详情2
detailsDialog2: false,
detailsTitle2: "工会昵称 用户昵称ID0 时间段 结算明细",
tableDataDetails2: [],
detailsClickOutObj2: {},
};
},
created () {
// this.getData();
},
methods: {
// 查询接口
getData () {
// this.loading = true;
let time = this.inquire.time;
if (time) {
time = dateFormat(this.inquire.time, "yyyy-MM");
}
statPageFamily({
erbanNo: this.inquire.nick,
partitionId: this.inquire.partitionId,
month: time,
pageNum: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
this.total = res.data.total;
this.tableData = res.data.rows;
this.loading = false;
});
},
// 导出总外列表
deriveFun (val) {
let time = this.inquire.time;
if (time) {
time = dateFormat(this.inquire.time, "yyyy-MM");
}
statExportFamily({
erbanNo: this.inquire.nick,
month: time,
partitionId: this.inquire.partitionId,
}).then((res) => { });
},
// 导出列表最外层
deriveFun2 (val) {
statExportFamilyMember({
familyId: val.id,
month: dateFormat(this.inquire.time, "yyyy-MM"),
});
this.detailsDialog = false;
},
// 1层查看详情按钮
ediClick (val) {
console.log(val);
var than = this;
this.detailsClickOutObj = val;
than.detailsTitle = `[${val.name}] [${dateFormat(
than.inquire.time,
"yyyy-MM"
)}]结算明细`;
listFamilyMember({
familyId: val.id,
month: dateFormat(than.inquire.time, "yyyy-MM"),
}).then((res) => {
this.tableDataDetails = res.data;
this.detailsDialog = true;
});
},
// 导出最外层数据按钮
detailsClickOut () {
statExportFamilyMember({
familyId: this.detailsClickOutObj.id,
month: dateFormat(this.inquire.time, "yyyy-MM"),
});
this.detailsDialog = false;
},
// 嵌套详情按钮
detailsClick (val) {
var than = this;
this.detailsClickOutObj2 = val;
than.detailsTitle2 = `公会名称:${val.familyName} 成员名称:${val.nick
}ID${val.erbanNo} ${dateFormat(
than.inquire.time,
"yyyy-MM"
)} 结算明细`;
listFamilyMemberDaily({
familyId: val.familyId,
month: dateFormat(than.inquire.time, "yyyy-MM"),
uid: val.uid,
}).then((res) => {
than.tableDataDetails2 = res.data;
than.detailsDialog2 = true;
});
},
// 导出每日成员数据
detailsClickOut2 () {
exportFamilyMemberDaily({
familyId: this.detailsClickOutObj2.id,
month: dateFormat(this.inquire.time, "yyyy-MM"),
uid: this.detailsClickOutObj2.uid,
});
this.detailsDialog2 = 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,188 @@
<template>
<div class="box">
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="addDialog = true"
>新增</el-button
>
<el-tabs v-model="roleType" @click="handleClick" style="margin-top: 20px">
<el-tab-pane label="金币工资" name="3"></el-tab-pane>
<el-tab-pane label="代理工资" name="1"></el-tab-pane>
</el-tabs>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column
prop="level"
align="center"
label="金币目标(金币流水)"
/>
<el-table-column prop="wage" align="center" label="金币工资USD" />
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button
@click="delClick(scope.row)"
class="danger"
type="danger"
size="default"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 新增弹窗 -->
<el-dialog title="新增档位" v-model="addDialog" width="35%">
<div class="inquire">
<span>金币目标金币流水</span>
<el-input v-model="add.gold" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>金币工资USD</span>
<el-input v-model="add.usdt" placeholder="" class="input"></el-input>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="addDialog = false">取消</el-button>
<el-button type="primary" @click="addShour()">保存</el-button>
</div></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="dle()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { manageList, manageAdd, manageDelete } from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "WaterSettlement",
data() {
return {
loading: false,
// 切换
roleType: "3",
// 表格
tableData: [],
arr1: [],
arr2: [],
// 新增弹窗
addDialog: false,
add: {
gold: "",
usdt: "",
},
delDialog: false,
delObj: {},
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
manageList({
roleType: this.roleType,
}).then((res) => {
this.tableData = res.data;
this.loading = false;
});
},
handleClick(tab, event) {
this.getData();
},
// 确认新增按钮
addShour() {
manageAdd({
roleType: this.roleType,
level: this.add.gold,
wage: this.add.usdt,
}).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "新增成功",
type: "success",
});
this.getData();
this.addDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 删除
delClick(val) {
this.delObj = val;
this.delDialog = true;
},
// 确认删除
dle() {
manageDelete({ id: this.delObj.id }).then((res) => {
if (res.code == 200) {
ElMessage({
showClose: true,
message: "删除成功",
type: "success",
});
this.getData();
this.delDialog = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
width: 60%;
display: flex;
justify-content: space-between;
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,367 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>分区</span>
<el-select v-model="inquire.partitionId" placeholder="请选择">
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>平台ID</span>
<el-input
v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
</div>
<div class="inquire">
<span>状态</span>
<el-select v-model="inquire.status" placeholder="请选择">
<el-option
v-for="item in inquire.statusArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</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="id" align="center" label="序号" />
<el-table-column prop="guildId" align="center" label="公会ID" />
<el-table-column prop="erbanNo" align="center" label="公会长ID" />
<el-table-column prop="nick" 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.avatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.avatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="guildName" 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.guildAvatar"
:zoom-rate="1.1"
:preview-src-list="[scope.row.guildAvatar]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column
prop="guildContact"
align="center"
label="公会联系方式"
/>
<el-table-column align="center" prop="idCard" label="公会长身份证件">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.idCard"
:zoom-rate="1.1"
:preview-src-list="[scope.row.idCard]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="inviteErbanNo" align="center" label="邀请人ID" />
<el-table-column prop="inviteCheck" align="center" label="邀请人证明">
<template v-slot="scope">
<el-image
style="width: 100px; height: 100px"
:src="scope.row.inviteCheck"
:zoom-rate="1.1"
:preview-src-list="[scope.row.inviteCheck]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="applyTime" align="center" label="申请时间" />
<el-table-column prop="auditStatus" align="center" label="状态">
<template v-slot="scope">
{{
scope.row.auditStatus == 0
? "未审核"
: scope.row.auditStatus == 1
? "已通过"
: "拒绝"
}}
</template>
</el-table-column>
<el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column align="center" label="操作">
<template v-slot="scope">
<el-button
v-show="scope.row.auditStatus == 0"
@click="agree(scope.row.id)"
type="text"
size="default"
>同意</el-button
>
<el-button
v-show="scope.row.auditStatus == 0"
@click="refuse(scope.row.id)"
type="text"
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="delClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
guildApplyList,
guildApplyAudit,
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "newGuildApplication",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
partitionId: "",
partitionArr: [],
userId: "",
status: -1,
statusArr: [
{ desc: "未审核", id: 0 },
{ desc: "全部", id: -1 },
{ desc: "通过", id: 1 },
{ desc: "已拒绝", id: 2 },
],
time: "",
},
// 表格
tableData: [],
// 新增弹窗
addDialog: false,
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
console.log(res.data);
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
},
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");
}
guildApplyList({
partitionId: this.inquire.partitionId,
erbanNo: this.inquire.userId,
auditStatus: this.inquire.status,
startDate: startTime,
endDate: endTime,
pageNo: 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",
});
}
});
},
agree(id) {
guildApplyAudit({
auditStatus: 1,
id,
}).then((res) => {
if (res.code == 200) {
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
refuse(id) {
guildApplyAudit({
auditStatus: 2,
id,
}).then((res) => {
if (res.code == 200) {
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess2(res, file) {
this.ediObj.imageUrl2 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
handleAvatarSuccess(res, file) {
this.ediObj.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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
.selectBoxImg {
height: 150px;
}
</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

@@ -8,20 +8,32 @@
<section class="content">
<div id="table"></div>
<div id="toolbar">
<label for="prettyNo" class="control-label">靓号:</label>
<input type="text" name="goodNum" id="prettyNo">
<label for="erbanNo" class="control-label">平台号:</label>
<input type="text" name="erbanNo" id="erbanNo">
<label for="prettyNo"
class="control-label">靓号:</label>
<input type="text"
name="goodNum"
id="prettyNo">
<label for="erbanNo"
class="control-label">平台号:</label>
<input type="text"
name="erbanNo"
id="erbanNo">
<label for="status" class="control-label">状态:</label>
<select name="status" id="status" class="input-m">
<label for="status"
class="control-label">状态:</label>
<select name="status"
id="status"
class="input-m">
<option value="">全部</option>
<option value="0">未使用</option>
<option value="1">使用中</option>
<option value="2">已占用</option>
</select>
<label for="status" class="control-label">来源:</label>
<select name="origin" id="origin" class="input-m">
<label for="status"
class="control-label">来源:</label>
<select name="origin"
id="origin"
class="input-m">
<option value="">全部</option>
<option value="1">活动</option>
<option value="2">贵族</option>
@@ -29,8 +41,10 @@
<option value="4">摇一摇抽奖所获</option>
</select>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="add" class="btn btn-default">
<button id="btnSearch"
class="btn btn-sm btn-primary">查询</button>
<button id="add"
class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>新建靓号
</button>
</div>
@@ -40,32 +54,51 @@
</section>
<!--增加对话框-->
<div class="modal fade" id="addPrettyNoModel" tabindex="-1" role="dialog" aria-labelledby="modalLabel2">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="addPrettyNoModel"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel2">
<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">x</span></button>
<h4 class="modal-title" id="addModalLabel">新增靓号</h4>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title"
id="addModalLabel">新增靓号</h4>
</div>
<div class="modal-body">
<form id="addPrettyNoForm" class="form-horizontal">
<form id="addPrettyNoForm"
class="form-horizontal">
<div class="form-group">
<label for="addPrettyNo" class="col-sm-3 control-label">请输入靓号</label>
<label for="addPrettyNo"
class="col-sm-3 control-label">请输入靓号</label>
<!-- 默认靓号使用状态为0未使用 -->
<input type="hidden" name="status" value="0">
<input type="hidden"
name="status"
value="0">
<!-- 默认上架 -->
<input type="hidden" name="isValid" value="1">
<input type="hidden"
name="isValid"
value="1">
<div class="col-sm-3">
<input type="text" class="form-control validate[required]" name="prettyNo"
<input type="text"
class="form-control validate[required]"
name="prettyNo"
id="addPrettyNo" />
</div>
</div>
<div class="form-group">
<label for="addSource" class="col-sm-3 control-label">选择使用来源</label>
<label for="addSource"
class="col-sm-3 control-label">选择使用来源</label>
<div class="col-sm-8">
<select name="useSource" id="addSource" class="col-sm-3">
<select name="useSource"
id="addSource"
class="col-sm-3">
<option value="1">活动</option>
<option value="2">贵族</option>
<option value="3">运营需要赠送</option>
@@ -74,68 +107,102 @@
</div>
</div>
<div class="form-group">
<label for="addRemark" class="col-sm-3 control-label">备注:</label>
<label for="addRemark"
class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="prettyDesc" id="addRemark">
<input type="text"
class="form-control"
name="prettyDesc"
id="addRemark">
</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="addSave">新建</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="addSave">新建</button>
</div>
</div>
</div>
</div>
<!--使用对话框-->
<div class="modal fade" id="usePrettyNoModel" tabindex="-1" role="dialog" aria-labelledby="modalLabel2">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="usePrettyNoModel"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel2">
<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">x</span></button>
<h4 class="modal-title" id="useModalLabel">使用靓号</h4>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title"
id="useModalLabel">使用靓号</h4>
</div>
<div class="modal-body">
<form id="usePrettyNoForm" class="form-horizontal">
<form id="usePrettyNoForm"
class="form-horizontal">
<div class="form-group">
<input type="hidden" name="prettyId" id="prettyId" />
<label for="usePrettyNo" class="col-sm-3 control-label">靓号</label>
<label for="usePrettyNo"
class="col-sm-3 control-label">靓号</label>
<div class="col-sm-3">
<input type="text" class="form-control validate[required]" disabled="disabled"
name="usePrettyNo" id="usePrettyNo">
<input type="text"
class="form-control validate[required]"
disabled="disabled"
name="usePrettyNo"
id="usePrettyNo">
</div>
</div>
<div class="form-group">
<label for="userMsNo" class="col-sm-3 control-label">使用人平台号:</label>
<label for="userMsNo"
class="col-sm-3 control-label">使用人平台号:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="userMsNo" id="userMsNo" />
<input type="text"
class="form-control validate[required]"
name="userMsNo"
id="userMsNo" />
</div>
</div>
<div class="form-group">
<label for="startUseDate" class="col-sm-3 control-label">开始日期</label>
<label for="startUseDate"
class="col-sm-3 control-label">开始日期</label>
<div class="col-sm-4">
<input id="startUseDate" type="text" name="startUseDate"
<input id="startUseDate"
type="text"
name="startUseDate"
class="form-control validate[required]" />
</div>
</div>
<div class="form-group">
<label for="endUseDate" class="col-sm-3 control-label">结束日期</label>
<label for="endUseDate"
class="col-sm-3 control-label">结束日期</label>
<div class="col-sm-4">
<input id="endUseDate" type="text" name="endUseDate"
<input id="endUseDate"
type="text"
name="endUseDate"
class="form-control validate[required]" />
</div>
</div>
<div class="form-group">
<label for="useSource" class="col-sm-3 control-label">靓号使用来源</label>
<label for="useSource"
class="col-sm-3 control-label">靓号使用来源</label>
<div class="col-sm-8">
<select name="useSource" id="useSource" class="col-sm-3" disabled>
<select name="useSource"
id="useSource"
class="col-sm-3"
disabled>
<option value="1">活动</option>
<option value="2">贵族</option>
<option value="3">运营需要赠送</option>
@@ -144,103 +211,144 @@
</div>
</div>
<div class="form-group">
<label for="remark" class="col-sm-3 control-label">备注:</label>
<label for="remark"
class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="remark" id="remark">
<input type="text"
class="form-control"
name="remark"
id="remark">
</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="useSave">确认使用</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="useSave">确认使用</button>
</div>
</div>
</div>
</div>
<!--删除-->
<div class="modal fade" id="delModel">
<div class="modal fade"
id="delModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body">
<p>您确认要删除吗</p>
</div>
<div class="modal-footer">
<input type="hidden" id="url" />
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" id="doDelete">确认</button>
<input type="hidden"
id="url" />
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="doDelete">确认</button>
</div>
</div>
</div>
</div>
<!--解绑-->
<div class="modal fade" id="unbindModel">
<div class="modal fade"
id="unbindModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body">
<p>确认解绑
解绑后使用人会恢复原ID</p>
<div><label for="del-remark">解绑叙述</label><input type="text" id="del-remark" placeholder="选填" /></div>
<div><label for="del-remark">解绑叙述</label><input type="text"
id="del-remark"
placeholder="选填" /></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="del-sure">确认</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="del-sure">确认</button>
</div>
</div>
</div>
</div>
<!--解绑-->
<div class="modal fade" id="unbindForAllModel">
<div class="modal fade"
id="unbindForAllModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body">
<p>确认全面解绑
解绑后使用人会恢复原ID</p>
<div><label for="del-remark-all">解绑叙述</label><input type="text" id="del-remark-all" placeholder="选填" />
<div><label for="del-remark-all">解绑叙述</label><input type="text"
id="del-remark-all"
placeholder="选填" />
</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="del-sure-all">确认</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="del-sure-all">确认</button>
</div>
</div>
</div>
</div>
<!--占用-->
<div class="modal fade" id="occupyModel">
<div class="modal fade"
id="occupyModel">
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body">
<div><label for="occupy-msNo">平台号</label><input type="text" id="occupy-msNo" /></div>
<div><label for="occupy-msNo">平台号</label><input type="text"
id="occupy-msNo" /></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="occupy-sure">确认</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-primary"
id="occupy-sure">确认</button>
</div>
</div>
</div>
@@ -252,21 +360,20 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrettyNoAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'id', title: 'ID', align: 'center', valign: 'middle', width: '5%' },
{ field: 'prettyNo', title: '靓号', align: 'center', valign: 'middle', width: '10%' },
{
field: 'status',
@@ -367,12 +474,11 @@ export default {
width: '20%',
valign: 'middle',
formatter: function (val, row, index) {
var key = row.id;
var key = row.prettyNo;
var returnS = "";
if (row.isValid) {
if (row.status == 1) {
returnS = "<button class='btn btn-sm btn-danger opt-unbind' data-id=" + key + " >解绑</button>" +
"<button class='btn btn-sm btn-danger opt-unbind-all' data-id=" + key + " >全面解绑</button>";
returnS = "<button class='btn btn-sm btn-danger opt-unbind' data-id=" + key + " >解绑</button>";
} else if (row.status == 2) {
returnS = "<button class='btn btn-sm btn-success opt-cancel-occupy' data-id=" + key + ">解除占用</button>";
} else if (row.status == 0) {
@@ -392,7 +498,7 @@ export default {
pageList: [10, 20, 30, 50],
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageSize: params.pageSize,
pageNum: params.pageNumber,
@@ -403,9 +509,9 @@ export default {
};
return param;
},
uniqueId: 'id',
uniqueId: 'prettyNo',
toolbar: '#toolbar',
url: '/admin/pretty/list',
url: '/admin/prettyNumber/list',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
@@ -424,7 +530,7 @@ export default {
if ($('#addPrettyNoForm').validationEngine('validate')) {
$.ajax({
type: "post",
url: "/admin/pretty/save",
url: "/admin/prettyNumber/save",
data: $('#addPrettyNoForm').serialize(),
dataType: 'json',
success: function (data) {
@@ -453,11 +559,11 @@ export default {
$('#usePrettyNoForm')[0].reset();
var key = parseInt($(this).data('id'));
var data = $('#table').bootstrapTable('getRowByUniqueId', key);
console.info(data)
$('#usePrettyNo').val(data.prettyNo);
$('#useSource').val(data.useSource);
$('#remark').val(data.prettyDesc);
$("#userMsNo").val(data.userErbanNo)
$("#prettyId").val(key);
console.log(key, typeof key);
$("#usePrettyNoModel").modal('show');
})
@@ -468,9 +574,9 @@ export default {
if ($('#usePrettyNoForm').validationEngine('validate')) {
$.ajax({
type: 'post',
url: '/admin/pretty/bind',
url: '/admin/prettyNumber/bind',
data: {
prettyId: $('#prettyId').val(),
prettyNo: $('#usePrettyNo').val(),
erbanNo: $('#userMsNo').val(),
desc: $('#remark').val(),
startTime: $('#startUseDate').val() + ' 00:00:00',
@@ -497,9 +603,9 @@ export default {
$("#del-sure").click(function () {
$.ajax({
type: 'post',
url: '/admin/pretty/unBind',
url: '/admin/prettyNumber/unBind',
data: {
prettyId: $(this).data('id'),
prettyNo: $(this).data('id'),
desc: $('#del-remark').val()
},
dataType: 'json',
@@ -520,9 +626,9 @@ export default {
$("#del-sure-all").click(function () {
$.ajax({
type: 'post',
url: '/admin/pretty/unBindForAll',
url: '/admin/prettyNumber/unBindForAll',
data: {
prettyId: $(this).data('id'),
prettyNo: $(this).data('id'),
desc: $('#del-remark-all').val()
},
dataType: 'json',
@@ -543,9 +649,9 @@ export default {
$("#occupy-sure").click(function () {
$.ajax({
type: 'post',
url: '/admin/pretty/occupy',
url: '/admin/prettyNumber/occupy',
data: {
prettyId: $(this).data('id'),
prettyNo: $(this).data('id'),
erbanNo: $("#occupy-msNo").val()
},
dataType: 'json',
@@ -580,9 +686,9 @@ export default {
var key = parseInt($(this).data('id'));
$.ajax({
type: 'post',
url: '/admin/pretty/cancelOccupy',
url: '/admin/prettyNumber/cancelOccupy',
data: {
prettyId: key
prettyNo: key
},
dataType: 'json',
success: function (data) {
@@ -673,4 +779,5 @@ select {
.record .title {
font-size: 16px;
}</style>
}
</style>

View File

@@ -8,17 +8,26 @@
<div class="content">
<div id="table"></div>
<div id="toolbar">
<label for="prettyNo" class="control-label">目标平台号</label>
<input type="text" name="goodNum" id="targetPrettyNo">
<label for="prettyNo" class="control-label">原平台号</label>
<input type="text" id="currentPrettyNo">
<label for="operator" class="control-label">操作类型:</label>
<select name="status" id="operator" class="input-m">
<label for="prettyNo"
class="control-label">目标平台号</label>
<input type="text"
name="goodNum"
id="targetPrettyNo">
<label for="prettyNo"
class="control-label">原平台号</label>
<input type="text"
id="currentPrettyNo">
<label for="operator"
class="control-label">操作类型:</label>
<select name="status"
id="operator"
class="input-m">
<option value="">全部</option>
<option value="1">绑定</option>
<option value="2">解绑</option>
</select>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnSearch"
class="btn btn-sm btn-primary">查询</button>
</div>
</div>
</div>
@@ -31,21 +40,20 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrettyNoRecordAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'id', title: 'ID', align: 'center', valign: 'middle', width: '5%' },
{ field: 'currentErbanNo', title: '原平台号', align: 'center', valign: 'middle', width: '10%' },
{
field: 'operator',
@@ -123,7 +131,7 @@ export default {
pageList: [10, 20, 30, 50],
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
@@ -135,7 +143,7 @@ export default {
},
uniqueId: 'id',
toolbar: '#toolbar',
url: '/admin/pretty/record/getList',
url: '/admin/prettyNumber/record/getList',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},

View File

@@ -0,0 +1,166 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>平台ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</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="backgroundId" align="center" label="个人主页id" />
<el-table-column
prop="backgroundName"
align="center"
label="个人主页名称"
/>
<el-table-column prop="uid" align="center" label="用户uID" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="days" align="center" label="赠送天数" />
<el-table-column prop="remake" align="center" label="备注" />
<el-table-column prop="createTime" align="center" label="操作时间" />
<el-table-column prop="optUser" align="center" label="操作人" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
v-if="scope.row.status=1"
@click="personalBackground(scope.row)"
class="primary"
type="primary"
size="default"
>撤回</el-button
>
<div v-else>已撤回</div>
</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 {
pesonalBackgroundListRecordByPage,
pesonalBackgroundListRecordRecoveryPersonalBackground,
} from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageRecordManagementSend",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
pesonalBackgroundListRecordByPage({
erbanNo: this.inquire.id,
page: this.currentPage,
comeFrom: 2,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.rows;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
personalBackground(val) {
pesonalBackgroundListRecordRecoveryPersonalBackground({
recordId: val.recordId,
}).then((res) => {
if (res.code == 200) {
this.getData();
} 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;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>平台ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</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="backgroundId" align="center" label="个人主页id" />
<el-table-column prop="backgroundName" align="center" label="个人主页名称" />
<el-table-column prop="uid" align="center" label="用户uID" />
<el-table-column prop="nick" align="center" label="用户昵称" />
<el-table-column prop="status" align="center" label="个人主页状态" />
<el-table-column prop="createTime" align="center" label="购买天数" />
<el-table-column prop="days" align="center" label="有效时间" />
<el-table-column prop="expireTime" align="center" label="过期时间" />
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import { pesonalBackgroundListRecordByPage } from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageRecordManagement",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
pesonalBackgroundListRecordByPage({
erbanNo: this.inquire.id,
page: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
if (res.code == 200) {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.rows;
} 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;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,802 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>地区</span>
<el-select v-model="inquire.partitionId" placeholder="请选择">
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>名称</span>
<el-input v-model="inquire.name" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>状态</span>
<el-select v-model="inquire.status" placeholder="请选择">
<el-option
v-for="item in inquire.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 新增按钮 -->
<el-button
class="primary"
type="primary"
@click="
operationValue.partitionVal = [];
operationValue.nameZh = '';
operationValue.nameEn = '';
operationValue.nameAr = '';
operationValue.nameTr = '';
operationValue.price = '';
operationValue.day = '';
operationValue.imageUrl = '';
operationValue.status = '';
operationType = 1;
filePreview: null; // 文件预览 URL
isImage = false;
isVideo = false;
isSVGA = false;
operationDialogTitle = '新增';
operationDialog = true;
"
>新增</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">
{{ partitionDesc(scope.row.partitionFlag) }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="中文名称">
<template v-slot="scope">
{{ jsonFun(scope.row.name).zh }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="阿语名称">
<template v-slot="scope">
{{ jsonFun(scope.row.name).ar }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="英语名称"
><template v-slot="scope">
{{ jsonFun(scope.row.name).en }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="土耳其名称"
><template v-slot="scope">
{{ jsonFun(scope.row.name).tr }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="图片">
<template v-slot="scope">
<el-image
:src="scope.row.pic"
:zoom-rate="1.1"
:preview-src-list="[scope.row.pic]"
fit="contain"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="" align="center" label="装扮动效图片类型">
<template v-slot="scope">
{{
scope.row.effectType == 0
? ""
: scope.row.effectType == 1
? "MP4"
: "SVGA"
}}
</template>
</el-table-column>
<el-table-column
prop=""
width="300"
max-height="100"
align="center"
label="装扮动效图片"
>
<template v-slot="scope">
<div v-if="scope.row.effectType == 0"></div>
<!-- 视频预览 -->
<video
v-if="scope.row.effectType == 1"
:src="scope.row.effect"
controls
style="width: 300px; max-height: 300px; display: block"
></video>
<!-- SVGA 预览 -->
<div
v-if="scope.row.effectType == 2"
:id="`svga-player${scope.row.id}`"
style="width: 300px; max-height: 300px; display: block"
>
{{
scope.row.effect && scope.row.id
? initSVGAList(scope.row.effect, scope.row.id)
: ""
}}
<!-- <img style="width: 100px; height: 100px; display: block" src="/Uploads/article/original_img/1487053722.jpg" alt="">
<el-image src=""></el-image> -->
</div>
</template>
</el-table-column>
<el-table-column prop="" align="center" label="状态">
<template v-slot="scope">
{{ scope.row.status == 1 ? "有效" : "无效" }}
</template>
</el-table-column>
<el-table-column prop="" align="center" label="贵族限定">
<template v-slot="scope">
{{ scope.row.type == 1 ? "普通" : "贵族" }}
</template>
</el-table-column>
<el-table-column prop="updateTime" align="center" label="操作时间" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
operationValue.partitionVal = partitionIdArr(
scope.row.partitionFlag
);
operationValue.nameZh = jsonFun(scope.row.name).zh;
operationValue.nameEn = jsonFun(scope.row.name).en;
operationValue.nameAr = jsonFun(scope.row.name).ar;
operationValue.nameTr = jsonFun(scope.row.name).tr;
operationValue.imageUrl = scope.row.pic;
operationValue.status = scope.row.status;
operationType = 2;
operationValueId = scope.row.id;
operationDialogTitle = '编辑';
filePreview: scope.row.effect; // 文件预览 URL
scope.row.effectType == 1
? (isVideo = true)
: scope.row.effectType == 2
? (isSVGA = true)
: (isImage = true);
operationValue.effectType = scope.row.effectType;
initSVGA(scope.row.effect);
operationDialog = true;
"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
<el-button
@click="
sendDialog = true;
sendObj.erbanNos = send.days = send.remark = null;
sendObj.personalBackgroundId = scope.row.id;
"
class="primary"
type="primary"
size="default"
>赠送</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 新增&编辑弹窗 -->
<el-dialog
v-model="operationDialog"
:title="operationDialogTitle"
width="28%"
center
>
<!-- <div class="operation">
<span style="margin-right: 20px">地区</span>
<el-select v-model="operationValue.partitionId" placeholder="请选择">
<el-option
v-for="item in operationValue.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div> -->
<div class="operation">
<span style="margin-right: 20px">地区</span>
<el-checkbox-group
v-model="operationValue.partitionVal"
v-for="(val, i) in inquire.partitionArr"
:key="i"
>
<el-checkbox style="margin-right: 10px" :label="val.id">{{
val.desc
}}</el-checkbox>
</el-checkbox-group>
</div>
<div class="operation">
<span style="margin-right: 20px">华语名称</span>
<el-input
v-model="operationValue.nameZh"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">英语名称</span>
<el-input
v-model="operationValue.nameEn"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">阿拉伯名称</span>
<el-input
v-model="operationValue.nameAr"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">土耳其名称</span>
<el-input
v-model="operationValue.nameTr"
style="width: 200px"
class="input"
></el-input>
</div>
<!-- <div class="operation">
<span style="margin-right: 20px">价格</span>
<el-input
v-model="operationValue.price"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">有效天数</span>
<el-input
v-model="operationValue.day"
style="width: 200px"
class="input"
></el-input>
</div> -->
<div class="operation">
<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="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="operationValue.imageUrl"
:src="operationValue.imageUrl"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<div class="operation">
<span style="margin-right: 20px">装扮动效图片类型</span>
<el-select v-model="operationValue.effectType" placeholder="请选择">
<el-option
v-for="item in operationValue.effectTypeArr"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="operation">
<span class="left" style="margin-right: 20px">装扮动效图片</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
accept="image/*,.mp4,.svga"
:show-file-list="false"
:on-success="handleAvatarSuccess1"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<!-- 文件预览 -->
<div style="margin-top: 20px">
<!-- 图片预览 -->
<img
v-if="isImage"
:src="filePreview"
alt="Uploaded Image"
style="max-width: 300px"
/>
<!-- 视频预览 -->
<video
v-else-if="isVideo"
:src="filePreview"
controls
style="max-width: 300px"
></video>
<!-- SVGA 预览 -->
<div
v-else-if="isSVGA"
:id="`svga-player`"
style="width: 200px; height: 200px"
></div>
</div>
</el-upload>
</div>
<div class="operation">
<span style="margin-right: 20px">状态</span>
<el-select v-model="operationValue.status" placeholder="请选择">
<el-option
v-for="item in operationValue.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button
@click="
operationDialog = false;
isImage = false;
isVideo = false;
isSVGA = false;
"
>取消</el-button
>
<el-button
type="primary"
@click="operation(type == 1 ? null : operationValueId)"
>
确认
</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="sendDialog" title="赠送" width="28%" center>
<div class="operation">
<span style="margin-right: 20px">用户平台ID</span>
<el-input
v-model="sendObj.erbanNos"
style="width: 200px"
class="input"
placeholder="多个请用英文“,”隔开"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">天数</span>
<el-input
v-model="sendObj.days"
style="width: 200px"
class="input"
placeholder=""
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">备注</span>
<el-input
v-model="sendObj.remark"
style="width: 200px"
class="input"
placeholder=""
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="sendDialog = false">取消</el-button>
<el-button type="primary" @click="send()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {
listPartitionInfo,
pesonalBackgroundListByPage,
pesonalBackgroundSaveOrUpdate,
pesonalBackgroundListSend,
} from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
import { partitionDesc, partitionIdArr } from "@/utils/partitionDesc.js";
import { ref, reactive, onMounted, onUnmounted, nextTick } from "vue";
// @ts-ignore
import { ElMessage } from "element-plus";
import SVGA from "svgaplayerweb";
export default {
name: "personalHomepageResourceManagement",
setup() {
// 响应式数据
const file = ref(null);
const filePreview = ref(null);
const isImage = ref(false);
const isVideo = ref(false);
const isSVGA = ref(false);
const loading = ref(false);
const inquire = reactive({
partitionId: "",
partitionArr: [],
name: "",
status: "",
options: [
{ label: "有效", value: 1 },
{ label: "无效", value: 2 },
{ label: "全部", value: 3 },
],
});
const operationDialog = ref(false);
const operationType = ref(null);
const operationDialogTitle = ref("新增%编辑");
const operationValueId = ref(null);
const operationValue = reactive({
partitionVal: [],
nameZh: "",
nameEn: "",
nameAr: "",
nameTr: "",
price: "",
day: "",
imageUrl: "",
status: "",
options: [
{ label: "有效", value: 1 },
{ label: "无效", value: 2 },
],
effectType: "",
effectTypeArr: [
{ label: "无", value: 0 },
{ label: "MP4", value: 1 },
{ label: "SVGA", value: 2 },
],
});
const sendDialog = ref(false);
const sendObj = reactive({
erbanNos: null,
days: null,
personalBackgroundId: null,
remark: null,
});
const tableData = ref([]);
const total = ref(0); // 总页数
const currentPage = ref(1); // 页码
const pageSize = ref(10); // 条数
// 生命周期钩子
onMounted(() => {
console.log("组件已挂载");
listPartitionInfo().then((res) => {
inquire.partitionArr = operationValue.partitionArr = res.data;
inquire.partitionId = inquire.partitionArr[0].id;
getData();
});
});
onUnmounted(() => {
console.log("组件已卸载");
});
// 查询接口
const getData = () => {
loading.value = true;
pesonalBackgroundListByPage({
partitionId: inquire.partitionId,
name: inquire.name,
status: inquire.status,
page: currentPage.value,
pageSize: pageSize.value,
}).then((res) => {
if (res.code == 200) {
loading.value = false;
total.value = res.data.total;
tableData.value = res.data.list;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
};
const operation = (id) => {
const obj = {
partitionFlag: operationValue.partitionVal.reduce(
(accumulator, currentValue) => accumulator + currentValue,
0
),
name: JSON.stringify({
ar: operationValue.nameAr,
zh: operationValue.nameZh,
en: operationValue.nameEn,
tr: operationValue.nameTr,
}),
pic: operationValue.imageUrl,
effectType: operationValue.effectType,
effect: filePreview.value,
status: operationValue.status,
type: 1, // 资料卡类型 1普通 2贵族
id,
};
console.log(obj);
pesonalBackgroundSaveOrUpdate(obj).then((res) => {
if (res.code == 200) {
operationDialog.value = false;
getData();
isImage.value = false;
isVideo.value = false;
isSVGA.value = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
};
const send = () => {
pesonalBackgroundListSend(sendObj).then((res) => {
if (res.code == 200) {
sendDialog.value = false;
ElMessage({
showClose: true,
message: "赠送成功",
type: "success",
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
};
const beforeAvatarUpload = () => {
ElMessage({
showClose: true,
message: "上传中可能较慢,请等待上传成功后在进行下一步~",
type: "warning",
});
};
const handleAvatarError = () => {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
};
const handleAvatarSuccess = (res, file) => {
console.log(file);
operationValue.imageUrl = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
};
const handleAvatarSuccess1 = (res, files) => {
console.log(files.raw);
const selectedFile = files.raw;
if (!selectedFile) return;
// 清除旧的预览数据
// resetFile();
const fileType = selectedFile.type;
const fileName = selectedFile.name;
// 创建预览 URL
filePreview.value = res.data;
file.value = selectedFile;
// 根据文件类型判断
if (fileType.startsWith("image/")) {
isImage.value = true;
} else if (fileType === "video/mp4") {
isVideo.value = true;
} else if (fileName.endsWith(".svga")) {
isSVGA.value = true;
initSVGA(res.data);
}
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
};
// const resetFile = () => {
// nextTick(() => {
// file.value = null;
// filePreview.value = null;
// isImage.value = false;
// isVideo.value = false;
// isSVGA.value = false;
// // 清除 SVGA 容器内容
// const svgaPlayer = document.getElementById("svga-player");
// if (svgaPlayer) {
// svgaPlayer.innerHTML = "";
// }
// });
// };
const initSVGA = (url) => {
nextTick(() => {
setTimeout(function () {
const container = document.getElementById("svga-player");
if (container) {
const player = new SVGA.Player(container);
const parser = new SVGA.Parser();
parser.load(
url,
(videoItem) => {
player.setVideoItem(videoItem);
player.startAnimation();
},
(error) => {
console.log("SVGA失败", error);
}
);
}
}, 10);
});
};
const initializedIds = new Set();
const initSVGAList = (url, id) => {
if (initializedIds.has(id)) return; // 避免重复初始化
console.log('SVGASVGASVGASVGASVGASVGA',url,id);
nextTick(() => {
const container = document.getElementById("svga-player" + id);
if (!container) {
console.error(`SVGA container for ID ${id} not found`);
return;
}
try {
const player = new SVGA.Player(container);
const parser = new SVGA.Parser();
parser.load(url, (videoItem) => {
player.setVideoItem(videoItem);
player.startAnimation();
});
initializedIds.add(id); // 标记已初始化
} catch (error) {
console.error("SVGA initialization failed:", error);
}
});
};
const jsonFun = (val) => JSON.parse(val);
// 分页导航
const handleSizeChange = () => {
getData();
};
const handleCurrentChange = () => {
getData();
};
return {
partitionDesc,
partitionIdArr,
file,
filePreview,
isImage,
isVideo,
isSVGA,
loading,
inquire,
operationDialog,
operationType,
operationDialogTitle,
operationValueId,
operationValue,
sendDialog,
sendObj,
tableData,
total,
currentPage,
pageSize,
getData,
operation,
send,
beforeAvatarUpload,
handleAvatarError,
handleAvatarSuccess,
handleAvatarSuccess1,
// resetFile,
initSVGA,
initSVGAList,
jsonFun,
handleSizeChange,
handleCurrentChange,
};
},
};
</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;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
.avatar {
width: 100%;
}
</style>

View File

@@ -10,15 +10,20 @@
<section class="content">
<div id="table"></div>
<div id="toolbar">
<form action="" id="searchForm" method="POST">
<select name="search-type" id="search-type">
<option value="0">请选择</option>
<form action=""
id="searchForm"
method="POST">
<select name="search-type"
id="search-type">
<option value="1">幸运许愿池偏差类型</option>
<option value="4">梦幻许愿池池偏差类型</option>
</select>
<select id="partitionId"></select>
</form>
<button class="btn btn-primary" id="searchBtn">搜索</button>
<button id="add" class="btn btn-default">
<button class="btn btn-primary"
id="searchBtn">搜索</button>
<button id="add"
class="btn btn-default">
<i class="glyphicon glyphicon-plus"></i>新增
</button>
</div>
@@ -26,21 +31,35 @@
</div>
</div>
</section>
<div class="modal fade" id="deviateRangeModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="deviateRangeModal"
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>
<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="deviateRangeForm">
<input id="deviateRangeId" type="hidden" name="id" />
<form class="form-horizontal"
id="deviateRangeForm">
<input id="deviateRangeId"
type="hidden"
name="id" />
<div class="form-group">
<label class="col-sm-3 control-label">下限</label>
<div class="col-sm-8">
<input type="number" id="deviateLowerLimit" name="lowerLimit" class=" validate[required]"
<input type="number"
id="deviateLowerLimit"
name="lowerLimit"
class=" validate[required]"
placeholder="单行输入">
</div>
</div>
@@ -48,33 +67,58 @@
<div class="form-group">
<label class="col-sm-3 control-label">上限</label>
<div class="col-sm-8">
<input type="number" id="deviateUpperLimit" name="upperLimit" class=" validate[required]"
<input type="number"
id="deviateUpperLimit"
name="upperLimit"
class=" validate[required]"
placeholder="单行输入">
</div>
</div>
<div class="form-group type">
<label for="type" class="col-sm-3 control-label">选择类型</label>
<label for="type"
class="col-sm-3 control-label">选择类型</label>
<div class="col-sm-8">
<select name="type" id="type" data-btn-class="btn btn-warning">
<select name="type"
id="type"
data-btn-class="btn btn-warning">
<option value="1">幸运许愿池偏差类型</option>
<option value="4">梦幻许愿池池偏差类型</option>
</select>
</div>
</div>
<div class="form-group deviatePartitionId">
<label for="type"
class="col-sm-3 control-label">选择分区</label>
<div class="col-sm-8">
<select name="partitionId"
id="deviatePartitionId"
data-btn-class="btn btn-warning">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建者</label>
<div class="col-sm-8">
<input type="text" id="creator" name="creator" class="validate[required]" placeholder="必填项">
<input type="text"
id="creator"
name="creator"
class="validate[required]"
placeholder="必填项">
</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>
<button type="button"
class="btn btn-default"
data-dismiss="modal">关闭</button>
<button type="button"
class="btn btn-primary"
id="save">保存</button>
</div>
</div>
</div>
@@ -87,16 +131,44 @@ import ComboboxHelper from '@/assets/plugins/bootstrap-combobox/js/bootstrap-com
export default {
name: "DeviateRangeManageAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$.ajax({
type: 'get',
url: '/partition/listPartitionInfo',
dataType: 'json',
success: function (json) {
if (json.code == 200) {
var deviatePartitionId = $("#deviatePartitionId");
deviatePartitionId.empty();
var partitionId = $("#partitionId");
partitionId.empty();
// 遍历数据并添加 option
$.each(json.data, function (index, item) {
// 创建新的 option 元素
var option = $('<option></option>')
.attr('value', item.id) // 设置 value 属性
.text(item.desc); // 设置文本内容
// 追加到 select 元素
partitionId.append(option.clone());
deviatePartitionId.append(option.clone());
});
}
}
});
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
@@ -123,11 +195,12 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageNumber: params.pageNumber,
pageSize: params.pageSize,
type: parseInt($("#search-type").val())
type: parseInt($("#search-type").val()),
partitionId: parseInt($("#partitionId").val())
};
return param;
},
@@ -189,6 +262,7 @@ export default {
$("#deviateRangeId").val(data.id);
$("#deviateLowerLimit").val(data.lowerLimit);
$("#deviateUpperLimit").val(data.upperLimit);
$("#deviatePartitionId").val(data.partitionId);
$("#creator").val(data.creator);
ComboboxHelper.setDef("#type", data.type);
// 打开编辑弹窗

View File

@@ -9,23 +9,49 @@
<section class="content">
<div id="table"></div>
<div id="toolbar">
<form action="" id="searchForm" method="POST">
<form action=""
id="searchForm"
method="POST">
奖品名称<input type="text" name="prizeName" id="prizeName" class="input-sm" placeholder="奖品名称">
奖品名称<input type="text"
name="prizeName"
id="prizeName"
class="input-sm"
placeholder="奖品名称">
奖品分类<input type="text" name="prizeType" id="prizeType" class="input-sm" placeholder="奖品分类">
奖品分类<input type="text"
name="prizeType"
id="prizeType"
class="input-sm"
placeholder="奖品分类">
平台价值区间<input type="text" name="priceStart" id="priceStart" class="input-sm" placeholder="最小值">
--&nbsp;<input type="text" name="priceEnd" id="priceEnd" class="input-sm" placeholder="最大值">
<br />
实际价值区间<input type="text" name="actualStart" id="actualStart" class="input-sm"
平台价值区间<input type="text"
name="priceStart"
id="priceStart"
class="input-sm"
placeholder="最小值">
--&nbsp;<input type="text" name="actualEnd" id="actualEnd" class="input-sm" placeholder="最大值">
--&nbsp;<input type="text"
name="priceEnd"
id="priceEnd"
class="input-sm"
placeholder="最大值">
实际价值区间<input type="text"
name="actualStart"
id="actualStart"
class="input-sm"
placeholder="最小值">
--&nbsp;<input type="text"
name="actualEnd"
id="actualEnd"
class="input-sm"
placeholder="最大值">
</form>
<button class="btn btn-primary" id="searchBtn">搜索</button>
<button class="btn btn-primary" id="add">
<button class="btn btn-primary"
id="searchBtn">搜索</button>
<button class="btn btn-primary"
id="add">
<i class="glyphicon glyphicon-plus"></i>增加
</button>
</div>
@@ -35,24 +61,39 @@
</section>
<!-- 弹窗 -->
<div class="modal fade" id="awardModal" rabindex='-1' role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal fade"
id="awardModal"
rabindex='-1'
role="dialog"
aria-labelledby="modalLabel">
<div class="modal-dialog"
role="document">
<div class="modal-content">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<button class="close"
type="button"
data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">x</span>
</button>
<div class="modal-title" id="editModalLabel">奖品设置</div>
<div class="modal-title"
id="editModalLabel">奖品设置</div>
</div>
<div class="modal-body">
<div class="" id="addModalLabel">
<label for="" class="col-sm-3 control-label" style="margin-left: 30px;">奖品类型</label>
<div class=""
id="addModalLabel">
<label for=""
class="col-sm-3 control-label"
style="margin-left: 30px;">奖品类型</label>
<div class="col-sm-8" style="margin-left: -20px;">
<select name="addType" id="addType" data-btn-class="btn btn-warning"
<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="onlineGift">线上礼物</option>
@@ -63,15 +104,20 @@
</select>
</div>
</div>
<form action="" id="addForm" class="form-horizontal">
<form action=""
id="addForm"
class="form-horizontal">
<!-- 选择礼物 -->
<div class="form-group awardChoose">
<label for="awardChoose" class="col-sm-3 control-label">选择礼物</label>
<label for="awardChoose"
class="col-sm-3 control-label">选择礼物</label>
<div class="col-sm-8">
<select name="awardChoose" id="awardChoose" onchange="updateAward(this)">
<div class="col-sm-4">
<select name="awardChoose"
id="awardChoose"
onchange="updateAward(this)">
<!-- <option value="0">选取礼物</option> -->
</select>
</div>
@@ -80,10 +126,13 @@
<!-- 选择装扮类型 -->
<div class="form-group dressType">
<label for="dressType" class="col-sm-3 control-label">选择装扮类型</label>
<label for="dressType"
class="col-sm-3 control-label">选择装扮类型</label>
<div class="col-sm-8">
<select name="dressType" id="dressType" data-btn-class="btn btn-warning">
<select name="dressType"
id="dressType"
data-btn-class="btn btn-warning">
<option value="4">头饰</option>
<option value="3">座驾</option>
<!--<option value="5">背景</option>-->
@@ -94,30 +143,39 @@
<!-- 选择具体装扮 -->
<div class="form-group realDressType headwearGift">
<label for="realDressType" class="col-sm-3 control-label">选择具体装扮</label>
<label for="realDressType"
class="col-sm-3 control-label">选择具体装扮</label>
<div class="col-sm-8">
<select name="realDressType" id="realDressType" class=" headwearContent">
<select name="realDressType"
id="realDressType"
class=" headwearContent">
</select>
</div>
</div>
<div class="form-group realDressType carGift">
<label for="realDressType" class="col-sm-3 control-label">选择具体装扮</label>
<label for="realDressType"
class="col-sm-3 control-label">选择具体装扮</label>
<div class="col-sm-8">
<select name="realDressType" id="realDressType" class=" carContent">
<select name="realDressType"
id="realDressType"
class=" carContent">
</select>
</div>
</div>
<div class="form-group realDressType backgroundGift">
<label for="realDressType" class="col-sm-3 control-label">选择具体装扮</label>
<label for="realDressType"
class="col-sm-3 control-label">选择具体装扮</label>
<div class="col-sm-8">
<select name="realDressType" id="realDressType" class=" backgroundContent">
<select name="realDressType"
id="realDressType"
class=" backgroundContent">
</select>
</div>
</div>
@@ -125,9 +183,14 @@
<!-- 奖品名称 -->
<div class="form-group giftName">
<label for="giftName" class="col-sm-3 control-label">奖品名称</label>
<label for="giftName"
class="col-sm-3 control-label">奖品名称</label>
<input type="text" class="validate[required]" name="giftName" id="giftName" placeholder="单行输入">
<input type="text"
class="validate[required]"
name="giftName"
id="giftName"
placeholder="单行输入">
</div>
<!-- 奖品图片 -->
@@ -136,11 +199,20 @@
<label class="col-sm-3 control-label">奖品图片</label>
<div class="col-sm-8">
<img src="" alt="" id="imgUrl" style="width: 50px; height: 50px;">
<input type="file" id="uploadFile" name="uploadFile"
<img src=""
alt=""
id="imgUrl"
style="width: 50px; height: 50px;">
<input type="file"
id="uploadFile"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success" type="button" id="uploadBtn">上传</button>
<input type="hidden" id="alertWinPic" name="alertWinPic"
<button class="btn btn-success"
type="button"
id="uploadBtn">上传</button>
<input type="hidden"
id="alertWinPic"
name="alertWinPic"
class="form-control validate[required]">
</div>
</div>
@@ -152,46 +224,67 @@
<div class="col-sm-8">
<label for="">
<input type="radio" name="setDay">
<input type="text" class="input-sm" placeholder="0" style='width: 80px;'>&nbsp;
<input type="radio"
name="setDay">
<input type="text"
class="input-sm"
placeholder="0"
style='width: 80px;'>&nbsp;
</label>
<label for="">
<input type="radio" name="setDay">
<input type="text" class="input-sm" placeholder="0" style="width:80px;">&nbsp;
<input type="radio"
name="setDay">
<input type="text"
class="input-sm"
placeholder="0"
style="width:80px;">&nbsp;
</label>
<label for="">
<input type="radio" name="setDay">&nbsp;永久
<input type="radio"
name="setDay">&nbsp;永久
</label>
</div>
</div>
<!-- 平台价值 -->
<div class="form-group platformPrice">
<label for="platformPrice" class="col-sm-3 control-label">平台价值</label>
<label for="platformPrice"
class="col-sm-3 control-label">平台价值</label>
<div class="col-sm-3">
<input type="text" id="platformPrice" name="platformPrice"
class="form-control validate[required]" placeholder="">
<input type="text"
id="platformPrice"
name="platformPrice"
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>
<!-- 实际价值 -->
<div class="form-group realPrice">
<label for="realPrice" class="col-sm-3 control-label">实际价值</label>
<label for="realPrice"
class="col-sm-3 control-label">实际价值</label>
<div class="col-sm-3">
<input type="text" id="realPrice" name="realPrice" class="form-control validate[required]">
<input type="text"
id="realPrice"
name="realPrice"
class="form-control validate[required]">
</div>
</div>
<!-- 礼物等级 -->
<div class="form-group awardLevel">
<label for="awardLevel" class="col-sm-3 control-label">礼物等级</label>
<label for="awardLevel"
class="col-sm-3 control-label">礼物等级</label>
<div class="col-sm-8">
<select name="awardLevel" id="awardLevel">
<select name="awardLevel"
id="awardLevel">
<option value="1">一级</option>
<option value="2">二级</option>
<option value="3">三级</option>
@@ -203,10 +296,14 @@
<!-- 创建者 -->
<div class="form-group creator">
<label for="creator" class="col-sm-3 control-label">创建者</label>
<label for="creator"
class="col-sm-3 control-label">创建者</label>
<div class="col-sm-8">
<input type="text" id="creator" name="creator" class="form-control validate[required]"
<input type="text"
id="creator"
name="creator"
class="form-control validate[required]"
placeholder="请输入你的名字(必填)">
</div>
</div>
@@ -215,9 +312,14 @@
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button"
class="btn btn-default"
data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" data-primary="addSave" id="save">保存</button>
<button type="button"
class="btn btn-primary"
data-primary="addSave"
id="save">保存</button>
</div>
</div>
</div>
@@ -229,9 +331,9 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrizeAdminView",
setup() {
setup () {
// select框监听事件
function updateAward(obj) {
function updateAward (obj) {
console.log('------------------ change')
// 赋值
let referenceId = parseInt($('#awardChoose').siblings('.combobox-container').find('input:hidden').val())
@@ -242,12 +344,11 @@ export default {
updateAward
};
},
created() {
created () {
this.initData();
},
methods: {
initData() {
initData () {
this.$nextTick(function () {
// 定义线上礼物数据、装扮类型、具体装扮数据数组盒用于ajax请求获取到的数据存储
var onlineGift = [], dress = [], car = [], background = [];
@@ -430,7 +531,7 @@ export default {
pageList: [10, 20, 30, 50],
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
queryParams: function queryParams (params) {
var giftKey = {
'钻石': 1,
'在线礼物': 2,
@@ -449,7 +550,8 @@ export default {
minPlatformValue: $('#priceStart').val(),
maxPlatformValue: $('#priceEnd').val(),
minActualValue: $('#actualStart').val(),
maxActualValue: $('#actualEnd').val()
maxActualValue: $('#actualEnd').val(),
partitionId: $('#partitionId').val(),
};
return param;
},
@@ -464,7 +566,7 @@ export default {
}
});
function clearModal() {
function clearModal () {
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
$(this).val('');
});
@@ -619,8 +721,6 @@ export default {
$('.realPrice').find('#realPrice').val(data.actualValue);
console.log(data.prizeLevel);
$('.awardLevel').find('select').val(data.prizeLevel);
$('#imgUrl').attr('src', data.prizeImgUrl);
@@ -631,6 +731,7 @@ export default {
$('#addForm').data('wpType', data.prizeType);
$('#addForm').data('referenceID', data.referenceId);
$('#awardPartitionId').val(data.partitionId);
});
// 添加事件
@@ -869,6 +970,7 @@ export default {
$('#tipMsg').text('等级选择栏不能为空')
$('#tipModal').modal('show');
}
param.partitionId = $('#awardPartitionId').val();
$.ajax({
type: 'post',
@@ -882,7 +984,8 @@ export default {
prizeLevel: param.prizeLevel,
creator: param.creator,
platFormValue: param.platformValue,
actualValue: param.actualValue
actualValue: param.actualValue,
partitionId: param.partitionId,
},
dataType: 'json',
success: function (res) {
@@ -903,7 +1006,11 @@ export default {
});
}
},
data () {
return {
partitionInfo: [],
}
}
};
</script>

View File

@@ -8,33 +8,63 @@
<section class="content">
<div id="toolbar">
<form action="" id="searchForm" method="POST">
<form action=""
id="searchForm"
method="POST">
<div class="col-sm-12">
<label for="partitionId"
class="qry_col control-label">分区</label>
<div class="col-sm-2">
<select id="partitionId"
class="input-sm"></select>
</div>
<div class="col-sm-4">
<label for="timeBegin" class="qry_col control-label">日期</label>
<input type="text" name="timeBegin" id="timeBegin" class="input-sm" placeholder="起始时间">
- <input type="text" name="timeEnd" id="timeEnd" class="input-sm" placeholder="结束时间">
<label for="timeBegin"
class="qry_col control-label">日期</label>
<input type="text"
name="timeBegin"
id="timeBegin"
class="input-sm"
placeholder="起始时间">
- <input type="text"
name="timeEnd"
id="timeEnd"
class="input-sm"
placeholder="结束时间">
</div>
<label for="erbanNo" class="qry_col control-label">平台号</label>
<label for="erbanNo"
class="qry_col control-label">平台号</label>
<div class="col-sm-2">
<input type="text" name="erbanNo" id="erbanNo" class="input-sm" placeholder="">
<input type="text"
name="erbanNo"
id="erbanNo"
class="input-sm"
placeholder="">
</div>
</div>
<div class="col-sm-12">
<label for="boxType" class="qry_col control-label">许愿池类型:</label>
<label for="boxType"
class="qry_col control-label">许愿池类型:</label>
<div class="col-sm-2">
<select name="boxType" id="boxType" class="col-sm-2 form-control"
<select name="boxType"
id="boxType"
class="col-sm-2 form-control"
data-btn-class="btn-warning">
<option value="" selected="selected">全部</option>
<option value=""
selected="selected">全部</option>
<option value="1">幸运许愿池</option>
<option value="2">梦幻许愿池</option>
</select>
</div>
<label for="poolType" class="qry_col control-label">奖池类型:</label>
<label for="poolType"
class="qry_col control-label">奖池类型:</label>
<div class="col-sm-2">
<select name="poolType" id="poolType" class="col-sm-2 form-control"
<select name="poolType"
id="poolType"
class="col-sm-2 form-control"
data-btn-class="btn-warning">
<option value="" selected="selected">全部</option>
<option value=""
selected="selected">全部</option>
<option value="1">幸运新人奖池</option>
<option value="2">幸运普通奖池</option>
<option value="3">幸运白名单奖池</option>
@@ -46,17 +76,22 @@
<option value="11">梦幻白名单奖池</option>
</select>
</div>
<label for="dataType" class="qry_col control-label">数据类型:</label>
<label for="dataType"
class="qry_col control-label">数据类型:</label>
<div class="col-sm-2">
<select name="dataType" id="dataType" class="col-sm-2 form-control"
<select name="dataType"
id="dataType"
class="col-sm-2 form-control"
data-btn-class="btn-warning">
<option value="1" selected="selected">普通用户数据</option>
<option value="1"
selected="selected">普通用户数据</option>
<option value="2">被排除用户的数据</option>
</select>
</div>
</div>
</form>
<button class="btn btn-primary" id="searchBtn">筛选</button>
<button class="btn btn-primary"
id="searchBtn">筛选</button>
<div class="tips">因数据量庞大默认不会显示每天的结果默认只展示平台总收益情况请先选择时间范围再搜索</div>
<div class="dataCount">
<p>
@@ -90,7 +125,6 @@
</div>
</div>
<div id="table"></div>
</section>
</div>
@@ -102,17 +136,48 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrizeDataAdminNewView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
$.ajax({
type: 'get',
url: '/partition/listPartitionInfo',
dataType: 'json',
success: function (json) {
if (json.code == 200) {
//var deviatePartitionId = $("#deviatePartitionId");
//deviatePartitionId.empty();
var partitionId = $("#partitionId");
partitionId.empty();
var defaultOption = $('<option></option>').attr('value', '').text("全部");
partitionId.append(defaultOption);
// 遍历数据并添加 option
$.each(json.data, function (index, item) {
// 创建新的 option 元素
var option = $('<option></option>')
.attr('value', item.id) // 设置 value 属性
.text(item.desc); // 设置文本内容
// 追加到 select 元素
partitionId.append(option.clone());
//deviatePartitionId.append(option.clone());
});
}
}
});
var picker1 = $('#timeBegin').datetimepicker({
format: 'yyyy-mm-dd',
todayBtn: true,
@@ -182,7 +247,8 @@ export default {
endDate: $timeEnd,
boxType: $('#boxType').val(),
poolType: $('#poolType').val(),
dataType: $('#dataType').val()
dataType: $('#dataType').val(),
partitionId: $("#partitionId").val(),
}, function (res) {
console.log(res);
@@ -240,7 +306,7 @@ export default {
};
main.init();
function tableRefresh() {
function tableRefresh () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
@@ -274,7 +340,7 @@ export default {
pageList: [10, 20, 30, 50],
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
queryParams: function queryParams (params) {
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
@@ -284,6 +350,7 @@ export default {
poolType: $('#poolType').val(),
erbanNo: $('#erbanNo').val(),
dataType: $('#dataType').val(),
partitionId: $('#partitionId').val(),
};
return param;
},
@@ -315,7 +382,7 @@ export default {
margin-top: 10px;
}
.dataCount>p {
.dataCount > p {
padding: 5px;
border-radius: 5px;
background: #ccc;
@@ -329,4 +396,5 @@ export default {
.qry_col {
float: left;
}</style>
}
</style>

View File

@@ -12,9 +12,14 @@
<div id="toolbar">
<div class="col-sm-12">
<form action="" id="searchForm" method="POST">
转盘分类<select name="jackpotType" id="jackpotType" data-btn-class="btn btn-warning">
<form action=""
id="searchForm"
method="POST">
分区<select id="partitionId"
class="input-sm"></select>
转盘分类<select name="jackpotType"
class="input-sm"
id="jackpotType">
<option value="1">幸运新人奖池</option>
<option value="2">幸运普通奖池</option>
<option value="3">幸运白名单奖池</option>
@@ -29,17 +34,23 @@
</select>
<label class="deviateRange">
偏差范围
<select name="deviateRange" id="deviateRange" data-btn-class="btn btn-warning">
<select name="deviateRange"
id="deviateRange"
data-btn-class="btn btn-warning">
</select>
</label>
<label class="diamondDeviateRange">
偏差范围
<select name="diamondDeviateRange" id="diamondDeviateRange" data-btn-class="btn btn-warning">
<select name="diamondDeviateRange"
id="diamondDeviateRange"
data-btn-class="btn btn-warning">
</select>
</label>
</form>
<button class="btn btn-primary" id="searchBtn">搜索</button>
<button class="btn btn-primary" id="add">添加奖品</button>
<button class="btn btn-primary"
id="searchBtn">搜索</button>
<button class="btn btn-primary"
id="add">添加奖品</button>
</div>
<div class="col-sm-12 jackpot">
@@ -51,10 +62,14 @@
</p>
<p class="col-sm-12">
<span class="col-sm-3" id="jackpotName"></span>
<span class="col-sm-3" id="jackpotNum"></span>
<span class="col-sm-3" id="prizeNum"></span>
<span class="col-sm-3" id="expectNum"></span>
<span class="col-sm-3"
id="jackpotName"></span>
<span class="col-sm-3"
id="jackpotNum"></span>
<span class="col-sm-3"
id="prizeNum"></span>
<span class="col-sm-3"
id="expectNum"></span>
</p>
</div>
@@ -65,31 +80,47 @@
</section>
<!-- 添加弹窗 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal fade"
id="addModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<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">
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">x</span>
</button>
<h4 class="modal-title" id="addModalLabel">添加奖品</h4>
<h4 class="modal-title"
id="addModalLabel">添加奖品</h4>
</div>
<div class="modal-body">
<form action="" class="form-horizontal" id="addForm">
<form action=""
class="form-horizontal"
id="addForm">
<!-- 选择奖品 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">选择奖品</label>
<label for=""
class="col-sm-3 control-label">选择奖品</label>
<div class="col-sm-8">
<select name="awardType" id="awardType" data-btn-class="btn btn-warning">
<select name="awardType"
id="awardType"
data-btn-class="btn btn-warning">
<!-- <option value=""></option> -->
</select>
<select name="awardChoose" id="awardChoose" data-btn-class="btn btn-warning">
<select name="awardChoose"
id="awardChoose"
data-btn-class="btn btn-warning">
<!-- <option value=""></option> -->
</select>
</div>
@@ -97,19 +128,29 @@
<!-- 奖品个数 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">奖品个数</label>
<label for=""
class="col-sm-3 control-label">奖品个数</label>
<div class="col-sm-8">
<input type="text" id="jackpotNumber" name="jackpotNumber" class=" validate[required]" placeholder="单行输入">
<input type="text"
id="jackpotNumber"
name="jackpotNumber"
class=" validate[required]"
placeholder="单行输入">
</div>
</div>
<!-- 中奖率 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">实际中奖率</label>
<label for=""
class="col-sm-3 control-label">实际中奖率</label>
<div class="col-sm-8">
<input type="text" id="winningRate" name="winningRate" class=" validate[required]" placeholder="单行输入">%
<input type="text"
id="winningRate"
name="winningRate"
class=" validate[required]"
placeholder="单行输入">%
<br />
<div class="tips">
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100当前概率不得超过100
@@ -119,10 +160,15 @@
<!-- 展示中奖率 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">展示中奖率</label>
<label for=""
class="col-sm-3 control-label">展示中奖率</label>
<div class="col-sm-8">
<input type="text" id="showRate" name="showRate" class=" validate[required]" placeholder="单行输入">%
<input type="text"
id="showRate"
name="showRate"
class=" validate[required]"
placeholder="单行输入">%
<br />
<div class="tips">
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100当前概率不得超过100
@@ -131,21 +177,41 @@
</div>
<div class="form-group">
<label for="" class="col-sm-3 control-label">是否默认奖品</label>
<label for=""
class="col-sm-3 control-label">是否默认奖品</label>
<div class="col-sm-8">
<select name="itemType" id="itemType" data-btn-class="btn btn-warning">
<select name="itemType"
id="itemType"
data-btn-class="btn btn-warning">
<option value="1"> 默认奖品 </option>
<option value="2"> 普通奖品 </option>
</select>
</div>
</div>
<!-- 创建者 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">创建者</label>
<!-- 分区 -->
<div class="form-group awardPartitionId">
<label for="awardPartitionId"
class="col-sm-3 control-label">分区</label>
<div class="col-sm-8">
<input type="text" id="creator" name="creator" class="validate[required]" placeholder="必填项">
<select name="awardPartitionId"
id="awardPartitionId">
</select>
</div>
</div>
<!-- 创建者 -->
<div class="form-group">
<label for=""
class="col-sm-3 control-label">创建者</label>
<div class="col-sm-8">
<input type="text"
id="creator"
name="creator"
class="validate[required]"
placeholder="必填项">
</div>
</div>
@@ -153,8 +219,12 @@
</div>
<div class="modal-footer">
<button class="btn btn-default" type="button" id="addReset">重置</button>
<button class="btn btn-primary" type="button" id="addSave">保存</button>
<button class="btn btn-default"
type="button"
id="addReset">重置</button>
<button class="btn btn-primary"
type="button"
id="addSave">保存</button>
</div>
</div>
</div>
@@ -162,35 +232,56 @@
</div>
<!-- 编辑弹窗 -->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<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">
<button type="button"
class="close"
data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">x</span>
</button>
<h4 class="modal-title" id="editModalLabel">编辑奖品</h4>
<h4 class="modal-title"
id="editModalLabel">编辑奖品</h4>
</div>
<div class="modal-body">
<form action="" class="form-horizontal" id="editForm">
<input type="hidden" id="editId">
<form action=""
class="form-horizontal"
id="editForm">
<input type="hidden"
id="editId">
<!-- 奖品个数 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">奖品个数</label>
<label for=""
class="col-sm-3 control-label">奖品个数</label>
<div class="col-sm-8">
<input type="text" id="jackpotNumber2" name="jackpotNumber2" class=" validate[required]"
<input type="text"
id="jackpotNumber2"
name="jackpotNumber2"
class=" validate[required]"
placeholder="单行输入">
</div>
</div>
<!-- 中奖率 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">实际中奖率</label>
<label for=""
class="col-sm-3 control-label">实际中奖率</label>
<div class="col-sm-8">
<input type="text" id="winningRate2" name="winningRate2" class=" validate[required]" placeholder="单行输入">%
<input type="text"
id="winningRate2"
name="winningRate2"
class=" validate[required]"
placeholder="单行输入">%
<br />
<div class="tips">
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100当前概率不得超过100
@@ -200,10 +291,15 @@
<!-- 展示给用户看的中奖率 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">展示中奖率</label>
<label for=""
class="col-sm-3 control-label">展示中奖率</label>
<div class="col-sm-8">
<input type="text" id="showRate2" name="showRate2" class=" validate[required]" placeholder="单行输入">%
<input type="text"
id="showRate2"
name="showRate2"
class=" validate[required]"
placeholder="单行输入">%
<br />
<div class="tips">
<i class="glyphicon glyphicon-info-sign"></i>中奖率综合为100当前概率不得超过100
@@ -211,29 +307,52 @@
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-3 control-label">是否默认奖品</label>
<label for=""
class="col-sm-3 control-label">是否默认奖品</label>
<div class="col-sm-8">
<select name="itemType" id="itemType2" data-btn-class="btn btn-warning">
<select name="itemType"
id="itemType2"
data-btn-class="btn btn-warning">
<option value="1"> 默认奖品 </option>
<option value="2"> 普通奖品 </option>
</select>
</div>
</div>
<!-- 创建者 -->
<div class="form-group">
<label for="" class="col-sm-3 control-label">创建者</label>
<!-- 分区 -->
<div class="form-group awardPartitionId">
<label for="awardPartitionId2"
class="col-sm-3 control-label">分区</label>
<div class="col-sm-8">
<input type="text" id="creator2" name="creator2" class="validate[required]">
<select name="awardPartitionId2"
id="awardPartitionId2">
</select>
</div>
</div>
<!-- 创建者 -->
<div class="form-group">
<label for=""
class="col-sm-3 control-label">创建者</label>
<div class="col-sm-8">
<input type="text"
id="creator2"
name="creator2"
class="validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-default" type="button" id="editReset">重置</button>
<button class="btn btn-primary" type="button" id="editSave">保存</button>
<button class="btn btn-default"
type="button"
id="editReset">重置</button>
<button class="btn btn-primary"
type="button"
id="editSave">保存</button>
</div>
</div>
</div>
@@ -243,6 +362,7 @@
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
var partitionInfo = {}
var idObj = {};
var typeObj = {};
var pId = '', saveId = '';
@@ -251,32 +371,85 @@ var ACCURACY = 1000; // 小数点精度
var RATIO_PART = 100000; // 概率换算单位
export default {
name: "PrizeManageAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.initData();
},
mounted() {
mounted () {
},
methods: {
initData() {
initData () {
this.$nextTick(function () {
var main = {
init: function () {
this.initPartitionIdSelect();
$('.deviateRange').hide();
$('.chargeDeviateRange').hide();
$('.diamondDeviateRange').hide();
this.eventRegister();
this.getDataFormBack();
this.initDeviateRangeSelect();
this.initDiamondDeviateRangeSelect();
//$('#selectReplacePrize').hide();
//this.initReplacePrizeSelect();
},
initPartitionIdSelect: function () {
$.ajax({
type: 'get',
url: '/partition/listPartitionInfo',
dataType: 'json',
success: function (json) {
if (json.code == 200) {
var awardPartitionId = $("#awardPartitionId");
awardPartitionId.empty();
var awardPartitionId2 = $("#awardPartitionId2");
awardPartitionId2.empty();
var partitionId = $("#partitionId");
partitionId.empty();
var defaultOption = $('<option></option>').attr('value', '').text("全部");
partitionId.append(defaultOption);
// 遍历数据并添加 option
$.each(json.data, function (index, item) {
// 创建新的 option 元素
var option = $('<option></option>')
.attr('value', item.id) // 设置 value 属性
.text(item.desc); // 设置文本内容
// 追加到 select 元素
partitionId.append(option.clone());
awardPartitionId.append(option.clone());
awardPartitionId2.append(option.clone());
});
partitionInfo = json.data.reduce((acc, item) => {
acc[item.id] = item.desc;
return acc;
}, {});
}
}
});
$('#partitionId').change(function () {
const partitionId = $(this).val();
main.initDeviateRangeSelect(partitionId);
main.initDiamondDeviateRangeSelect(partitionId);
});
},
eventRegister: function () {
},
@@ -306,36 +479,38 @@ export default {
});
},
initDeviateRangeSelect: function () {
let options = $('#deviateRange').children();
if (options.length <= 0) {
initDeviateRangeSelect: function (partitionId) {
$('#deviateRange').empty();
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
if (res.total > 0) {
var rows = res.rows;
for (var i = 0; i < rows.length; i++) {
var deviateRange = rows[i];
var str = '<option value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
if (undefined != partitionId && '' != partitionId && deviateRange.partitionId == partitionId) {
var str = '<option partitionId = ' + deviateRange.partitionId + ' value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
$('#deviateRange').append(str);
}
}
});
}
});
},
initDiamondDeviateRangeSelect: function () {
let options = $('#diamondDeviateRange').children();
if (options.length <= 0) {
initDiamondDeviateRangeSelect: function (partitionId) {
$('#diamondDeviateRange').empty();
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
if (res.total > 0) {
var rows = res.rows;
for (var i = 0; i < rows.length; i++) {
var deviateRange = rows[i];
var str = '<option value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
if (undefined != partitionId && '' != partitionId && deviateRange.partitionId == partitionId) {
var str = '<option partitionId = ' + deviateRange.partitionId + ' value=' + deviateRange.id + '>' + deviateRange.lowerLimit + '~' + deviateRange.upperLimit + '</option>';
$('#diamondDeviateRange').append(str);
}
}
});
}
});
},
initReplacePrizeSelect: function () {
@@ -358,7 +533,7 @@ export default {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'id', title: '奖品编号', align: 'center', valign: 'middle', width: '10%' },
{ field: 'id', title: '奖品编号', align: 'center', valign: 'middle', width: '3%' },
{
field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
var key = row.prizeId;
@@ -448,6 +623,11 @@ export default {
}
},
{ field: 'usePrizeNum', title: '被抽中数量', align: 'center', valign: 'middle', width: '10%' },
{
field: 'partitionId', title: '分区', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
return partitionInfo[val] || val;
}
},
{
field: '', title: '操作', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
var key = row.id;
@@ -463,13 +643,14 @@ export default {
pageList: [10, 20, 30, 50],
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
queryParams: function queryParams (params) {
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
poolType: parseInt($('#jackpotType').val()),
deviateRangeId: getDeviateRangeId()
deviateRangeId: getDeviateRangeId(),
partitionId: $('#partitionId').val(),
};
return param;
@@ -479,7 +660,6 @@ export default {
url: '/admin/prizePoolItem/list',
onLoadSuccess: function (res) {
console.log('load success');
console.log(res.rows);
var arr = [];
var Num = 0;
var expectNum = 0;
@@ -587,7 +767,6 @@ export default {
$('#addModal').find('#awardType').on('change', function () {
$('#awardChoose').find('option').remove();
var key = $(this).val();
console.log(key);
// var str = '<option></option>';
// $('#awardChoose').append(str);
var str;
@@ -605,12 +784,12 @@ export default {
var id = $(this).data('id');
var data = $('#table').bootstrapTable('getRowByUniqueId', id);
console.log(data);
$('#editModal').find('#jackpotNumber2').val(data.prizeNum);
$('#editModal').find('#winningRate2').val(data.occupationRatio / ACCURACY);
$('#editModal').find('#showRate2').val(data.showRatio / ACCURACY);
$('#editModal').find('#creator2').val(data.creator);
$('#editModal').find('#itemType2').val(data.itemType);
$('#editModal').find('#awardPartitionId2').val(data.partitionId);
pId = data.prizeId;
saveId = id;
});
@@ -660,7 +839,8 @@ export default {
occupationRatio: $('#winningRate').val() * ACCURACY,
showRatio: $('#showRate').val() * ACCURACY,
creator: $('#creator').val(),
itemType: $('#itemType').val()
itemType: $('#itemType').val(),
partitionId: $('#awardPartitionId').val(),
}, function (res) {
if (res.code == 200) {
$('#addModal').modal('hide');
@@ -715,7 +895,8 @@ export default {
occupationRatio: $('#winningRate2').val() * ACCURACY,
showRatio: $('#showRate2').val() * ACCURACY,
creator: $('#creator2').val(),
itemType: $('#itemType2').val()
itemType: $('#itemType2').val(),
partitionId: $('#awardPartitionId2').val(),
}, function (res) {
if (res.code == 200) {
// console.log(res);
@@ -774,7 +955,7 @@ export default {
};
function clearModal() {
function clearModal () {
$('#addForm').find('input[type=text],select,input[type=hidden]').each(function () {
$(this).val('');
});
@@ -783,7 +964,7 @@ function clearModal() {
});
}
function getDeviateRangeId() {
function getDeviateRangeId () {
if ($('#deviateRange').val()) {
var jackpotType = $('#jackpotType').val();
if (jackpotType == '4') {
@@ -814,7 +995,7 @@ function getDeviateRangeId() {
align-items: center;
}
#toolbar>div:first-child {
#toolbar > div:first-child {
margin-right: 10px;
}
</style>

View File

@@ -10,23 +10,40 @@
<div id="toolbar">
<div class="col-sm-12">
<div class="pull-left">
<form action="/admin/box/record/export" id="searchForm" method="POST">
平台号<input type="text" id="msNo" name="msNo" class="input-sm" placeholder="请输入平台号">
<form action="/admin/box/record/export"
id="searchForm"
method="POST">
平台号<input type="text"
id="msNo"
name="msNo"
class="input-sm"
placeholder="请输入平台号">
奖品名称<input type="text" id="prizeName" name="prizeName" class="input-sm"
奖品名称<input type="text"
id="prizeName"
name="prizeName"
class="input-sm"
placeholder="请输入奖品名称">
日期<input type="text" name="startDate" id="timeBegin" class="input-sm datetime"
日期<input type="text"
name="startDate"
id="timeBegin"
class="input-sm datetime"
placeholder="起始时间">
- <input type="text" name="endDate" id="timeEnd" class="input-sm datetime"
- <input type="text"
name="endDate"
id="timeEnd"
class="input-sm datetime"
placeholder="结束时间">
</form>
</div>
<div class="pull-right">
&nbsp;&nbsp;&nbsp;&nbsp;<button id="searchBtn" class="btn btn-primary">筛选</button>
<button id="exportBtn" class="btn btn-primary">导出</button>
&nbsp;&nbsp;&nbsp;&nbsp;<button id="searchBtn"
class="btn btn-primary">筛选</button>
<button id="exportBtn"
class="btn btn-primary">导出</button>
</div>
</div>
@@ -41,16 +58,16 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrizeRecordAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
$('.datetime').datetimepicker({
@@ -81,6 +98,7 @@ export default {
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
{ field: 'nick', title: '用户昵称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
{ field: 'prizeName', title: '奖品名称', align: 'center', valign: 'middle', width: '10%' },
{
field: 'createTime', title: '抽奖时间', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
@@ -142,7 +160,7 @@ export default {
pageList: [10, 20, 30, 50],
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
queryParams: function queryParams (params) {
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,

View File

@@ -9,30 +9,47 @@
<div id="table"></div>
<div id="toolbar">
<label class="source">
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
<input type="text" id="endTime" name="endTime" class="input-sm">
选择时间: <input type="text"
name="startTime"
id="startTime"
class="input-sm">
<input type="text"
id="endTime"
name="endTime"
class="input-sm">
</label>
<label class="source">
宝箱类型: <select name="boxType" id="boxType" class="input-sm">
宝箱类型: <select name="boxType"
id="boxType"
class="input-sm">
<option value="0">全部</option>
<option value="1">幸运许愿池</option>
<option value="2">梦幻许愿池</option>
</select>
</label>
<label class="source">
查询凭据<select name="source" id="source" class="input-sm">
查询凭据<select name="source"
id="source"
class="input-sm">
<option value="1">平台号</option>
<option value="2">偏差范围</option>
</select>
</label>
<label class="msNo">
平台号<input type="text" placeholder="请输入草莓号" id="msNo" class="input-sm">
平台号<input type="text"
placeholder="请输入草莓号"
id="msNo"
class="input-sm">
</label>
<label class="deviation">
偏差值 <input type="text" id="minDis" class="input-m"> - <input type="text" id="maxDis"
偏差值 <input type="text"
id="minDis"
class="input-m"> - <input type="text"
id="maxDis"
class="input-m">
</label>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnSearch"
class="btn btn-sm btn-primary">查询</button>
</div>
</section>
</div>
@@ -45,27 +62,28 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrizeStatisAdminNewView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
//searchHistory();
var whiteList = {};
requestWhiteList(searchHistory());
function searchHistory() {
function searchHistory () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
@@ -162,7 +180,7 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
@@ -236,7 +254,7 @@ export default {
requestWhiteList(searchHistory());
});
function editWhiteList(uid, availableNum, boxType) {
function editWhiteList (uid, availableNum, boxType) {
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
if (res.code == 200) {
if (availableNum > 0) {
@@ -256,7 +274,7 @@ export default {
})
}
function requestWhiteList(callback) {
function requestWhiteList (callback) {
$.ajax({
url: '/admin/prizeWhiteUser/list',
success: function (res) {
@@ -293,4 +311,5 @@ export default {
#toolbar label {
margin-right: 6px;
}</style>
}
</style>

View File

@@ -9,30 +9,47 @@
<div id="table"></div>
<div id="toolbar">
<label class="source">
选择时间: <input type="text" name="startTime" id="startTime" class="input-sm">
<input type="text" id="endTime" name="endTime" class="input-sm">
选择时间: <input type="text"
name="startTime"
id="startTime"
class="input-sm">
<input type="text"
id="endTime"
name="endTime"
class="input-sm">
</label>
<label class="source">
宝箱类型: <select name="boxType" id="boxType" class="input-sm">
宝箱类型: <select name="boxType"
id="boxType"
class="input-sm">
<option value="0">全部</option>
<option value="1">幸运许愿池</option>
<option value="2">梦幻许愿池</option>
</select>
</label>
<label class="source">
查询凭据<select name="source" id="source" class="input-sm">
查询凭据<select name="source"
id="source"
class="input-sm">
<option value="1">平台号</option>
<option value="2">偏差范围</option>
</select>
</label>
<label class="msNo">
平台号<input type="text" placeholder="请输入草莓号" id="msNo" class="input-sm">
平台号<input type="text"
placeholder="请输入草莓号"
id="msNo"
class="input-sm">
</label>
<label class="deviation">
偏差值 <input type="text" id="minDis" class="input-m"> - <input type="text" id="maxDis"
偏差值 <input type="text"
id="minDis"
class="input-m"> - <input type="text"
id="maxDis"
class="input-m">
</label>
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnSearch"
class="btn btn-sm btn-primary">查询</button>
</div>
</section>
</div>
@@ -45,27 +62,28 @@ import TableHelper from '@/utils/bootstrap-table-helper';
export default {
name: "PrizeStatisAdminView",
setup() {
setup () {
return {};
},
created() {
created () {
this.$nextTick(function () {
this.initData();
});
},
methods: {
initData() {
initData () {
$(function () {
//searchHistory();
var whiteList = {};
requestWhiteList(searchHistory());
function searchHistory() {
function searchHistory () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'uid', title: 'uid', align: 'center', valign: 'middle', width: '10%' },
{ field: 'erbanNo', title: '平台号', align: 'center', valign: 'middle', width: '10%' },
{ field: 'nick', title: '昵称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'partition', title: '分区', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPurchaseMoney', title: '历史抽奖充值总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalDrawMoney', title: '历史抽奖总额', align: 'center', valign: 'middle', width: '10%' },
{ field: 'totalPlatformValue', title: '历史获奖平台价值', align: 'center', valign: 'middle', width: '10%' },
@@ -162,7 +180,7 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams (params) { //设置查询参数
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
@@ -236,7 +254,7 @@ export default {
requestWhiteList(searchHistory());
});
function editWhiteList(uid, availableNum, boxType) {
function editWhiteList (uid, availableNum, boxType) {
$.post("/admin/prizeWhiteUser/save", { uid: uid, availableNum: availableNum, boxType: boxType }, function (res) {
if (res.code == 200) {
if (availableNum > 0) {
@@ -256,7 +274,7 @@ export default {
})
}
function requestWhiteList(callback) {
function requestWhiteList (callback) {
$.ajax({
url: '/admin/prizeWhiteUser/list',
success: function (res) {
@@ -293,4 +311,5 @@ export default {
#toolbar label {
margin-right: 6px;
}</style>
}
</style>

View File

@@ -9,31 +9,92 @@
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form id="searchForm" action="/admin/recharge/user/give/export" method="get" target="_blank">
<form
id="searchForm"
action="/admin/recharge/user/give/export"
method="get"
target="_blank"
>
<div class="col-sm-12">
<label for="fromErBanNo" class="col-sm-2 control-label">转出人id:</label>
<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">
<input
type="text"
class="form-control"
name="fromErBanNo"
id="fromErBanNo"
/>
</div>
<label for="toErBanNo" class="col-sm-2 control-label">收入人id:</label>
<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">
<input
type="text"
class="form-control"
name="toErBanNo"
id="toErBanNo"
/>
</div>
<label for="toRegion" class="col-sm-2 control-label">收入人地区:</label>
<label for="toRegion" class="col-sm-2 control-label"
>收入人地区:</label
>
<div class="col-sm-2">
<select name="toRegion" id="toRegion" data-btn-class="btn-warning" class="form-control">
<select
name="toRegion"
id="toRegion"
data-btn-class="btn-warning"
class="form-control"
>
<option value="" selected="selected">全部</option>
</select>
</div>
</div>
<div class="col-sm-12">
<label for="startTime" class="col-sm-2 control-label">时间:</label>
<div class="col-sm-3"><input type="text" class="form-control" name="startTime" id="startTime">
<label for="startTime" class="col-sm-2 control-label"
>时间:</label
>
<div class="col-sm-3">
<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-3"><input type="text" class="form-control" name="endTime" id="endTime"></div>
<div class="col-sm-3">
<input
type="text"
class="form-control"
name="endTime"
id="endTime"
/>
</div>
</div>
</form>
<div id="mapObjHtml">
<span
style="
margin-right: 10px;
display: inline-block;
font-size: 18px;
color: #2049a9;
"
>金币转赠明细: <b class="b1"></b
></span>
<span
style="
margin-right: 10px;
display: inline-block;
font-size: 18px;
color: #2049a9;
"
>转赠非充值代理用户总数: <b class="b2"></b
></span>
</div>
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
@@ -47,7 +108,7 @@
</template>
<script>
import TableHelper from '@/utils/bootstrap-table-helper';
import TableHelper from "@/utils/bootstrap-table-helper";
export default {
name: "RechargeDiamondGiveDetailView",
@@ -63,38 +124,83 @@ export default {
initData() {
$(function () {
userRegion();
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
$("#table").bootstrapTable("destroy");
$("#table").bootstrapTable({
columns: [
{ field: 'createTime', title: '时间', align: 'center', width: '5%' },
{ field: 'fromErBanNo', title: '转出人peko id', align: 'center', width: '5%' },
{ field: 'fromNick', title: '转出人昵称', align: 'center', width: '5%' },
{ field: 'fromClanName', title: '转出人所在公会', align: 'center', width: '5%' },
{
field: 'fromRegion',
title: '转出人所属代充地区',
align: 'center',
width: '5%',
field: "createTime",
title: "时间",
align: "center",
width: "5%",
},
{
field: "fromErBanNo",
title: "转出人peko id",
align: "center",
width: "5%",
},
{
field: "fromNick",
title: "转出人昵称",
align: "center",
width: "5%",
},
{
field: "fromClanName",
title: "转出人所在公会",
align: "center",
width: "5%",
},
{
field: "fromRegion",
title: "转出人所属代充地区",
align: "center",
width: "5%",
formatter: function (val, row, index) {
var value = '';
var value = "";
if (val) {
var array = val.split(',');
var array = val.split(",");
for (let i = 0, len = array.length; i < len; i++) {
var region = array[i];
value += region;
if (i != len - 1) {
value += '<br/>';
value += "<br/>";
}
}
}
return value;
}
},
{ field: 'toErBanNo', title: '收入人peko id', align: 'center', width: '5%' },
{ field: 'toNick', title: '收入人昵称', align: 'center', width: '5%' },
{ field: 'toRegion', title: '收入人地区', align: 'center', width: '5%' },
{ field: 'inviteCode', title: '收入人填写的邀请码', align: 'center', width: '5%' },
{ field: 'diamondNum', title: '转赠数额', align: 'center', width: '5%' },
},
{
field: "toErBanNo",
title: "收入人peko id",
align: "center",
width: "5%",
},
{
field: "toNick",
title: "收入人昵称",
align: "center",
width: "5%",
},
{
field: "toRegion",
title: "收入人地区",
align: "center",
width: "5%",
},
{
field: "inviteCode",
title: "收入人填写的邀请码",
align: "center",
width: "5%",
},
{
field: "diamondNum",
title: "转赠数额",
align: "center",
width: "5%",
},
],
cache: false,
striped: true,
@@ -107,55 +213,60 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
queryParams: function queryParams(params) {
//设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
fromErBanNo: $('#fromErBanNo').val(),
toErBanNo: $('#toErBanNo').val(),
toRegion: $('#toRegion').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val(),
fromErBanNo: $("#fromErBanNo").val(),
toErBanNo: $("#toErBanNo").val(),
toRegion: $("#toRegion").val(),
startTime: $("#startTime").val(),
endTime: $("#endTime").val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/recharge/user/give/dayDetailPage',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
toolbar: "#toolbar",
url: "/admin/recharge/user/give/dayDetailPage",
onLoadSuccess: function (res) {
//加载成功时执行
console.log();
$("#mapObjHtml .b1").text(res.totalMap.totalDiamondNum);
$("#mapObjHtml .b2").text(res.totalMap.totalDiamondNum4Normal);
},
onLoadError: function () { //加载失败时执行
onLoadError: function () {
//加载失败时执行
console.log("load fail");
}
},
});
var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
format: "yyyy-mm-dd hh:ii:00",
todayBtn: true,
autoclose: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
format: "yyyy-mm-dd hh:ii:00",
todayBtn: true,
autoclose: true
autoclose: true,
});
picker1.on('changeDate', function () {
var date = $('#startTime').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
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);
picker2.on("changeDate", function () {
var date = $("#endTime").datetimepicker("getDate");
picker1.datetimepicker("setEndDate", date);
});
//导出功能
$("#btnExport").on('click', function () {
$("#btnExport").on("click", function () {
$("#searchForm").submit();
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
$("#btnSearch").on("click", function () {
TableHelper.doRefresh("#table");
});
//用户地区
@@ -167,12 +278,12 @@ export default {
dataType: "json",
async: false,
success: function (json) {
if (json.success == 'true' || json.code == 200) {
if (json.success == "true" || json.code == 200) {
array = json.data;
}
}
},
});
var $select = $('#toRegion');
var $select = $("#toRegion");
for (let i = 0; i < array.length; i++) {
var value = array[i];
var $option = $('<option value="' + value + '" />');
@@ -181,9 +292,8 @@ export default {
}
}
});
}
},
},
};
</script>

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