Compare commits

...

99 Commits

Author SHA1 Message Date
dragon
6067064351 修复全平台消耗详情弹窗异常问题 2025-02-11 14:48:02 +08:00
dragon
51912a1e24 完成每日金币统计 2025-02-10 15:16:45 +08:00
dragon
e10f249e4e 每日金币暂存 2025-02-08 14:54:06 +08:00
dragon
99d2c67087 修复赠送按钮失效问题 2025-02-08 14:53:14 +08:00
dragon
e31f755216 完成周奖励后台 2025-02-07 18:19:12 +08:00
dragon
a73f806d92 周奖励后台暂存 2025-02-07 18:19:12 +08:00
khalil
fa1138dc03 ip限制-增加原因 2025-02-06 16:40:48 +08:00
dragon
6191f1a3f5 新增分区 2025-02-06 15:53:35 +08:00
dragon
50919fd508 修改雷蛇充值字段 2025-01-22 15:48:47 +08:00
dragon
8dc17b87ad 新增雷蛇充值 2025-01-13 15:27:54 +08:00
dragon
d420979350 修复开屏设置层级问题 2025-01-08 11:24:17 +08:00
dragon
63c7f5ed80 消息管理-读取分区 2025-01-08 11:05:14 +08:00
dragon
eba1d654d3 同步代码 2025-01-08 11:04:02 +08:00
dragon
09dc6f3645 新增开屏设置编辑连接 2025-01-08 10:47:20 +08:00
dragon
5338943b9b 新增跳转位置类型-开屏设置 2025-01-08 10:47:19 +08:00
dragon
1b47d48d0a 新增信誉值 2025-01-07 18:15:21 +08:00
dragon
3659f582d5 修复页面异常缩短问题 2025-01-06 17:13:38 +08:00
dragon
ed17e47390 修改用户查询接口接口 2025-01-06 15:45:25 +08:00
dragon
84e86deb73 修改传参可是 2025-01-03 13:44:00 +08:00
dragon
0751f06ec4 修复时间异常问题 2025-01-03 11:56:29 +08:00
dragon
4bc596e3d8 公会金币流水-修改时间展示 2025-01-03 10:43:04 +08:00
khalil
1683225a72 代充设置-查询-分区 2024-12-27 17:23:00 +08:00
dragon
c904646f4a 新增首页tab置顶判断 2024-12-27 14:13:01 +08:00
dragon
98d5f20be7 修复编辑回显异常问题 2024-12-26 19:02:28 +08:00
dragon
924971a290 新增必填项 2024-12-26 19:02:26 +08:00
dragon
f5b721a6f8 完成首页Ttab管理 2024-12-26 19:02:24 +08:00
dragon
47c819433b 新增公会信息&公会申请客服专用信息 2024-12-26 18:08:17 +08:00
khalil
3e9a2bfb60 装扮商城-气泡-去掉图片限制 2024-12-20 19:35:19 +08:00
dragon
ce2a63c864 修复主播薪资操作分页异常问题 2024-12-19 16:31:55 +08:00
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
77 changed files with 13960 additions and 5304 deletions

View File

@@ -34,3 +34,11 @@ export default {
computed: {}, computed: {},
}; };
</script> </script>
<style>
.modal-open{
overflow-y: scroll;
}
body{
padding-right:0 !important;
}
</style>

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,13 @@
import request from '@/utils/request';
import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer';
// ==================================每日数据====================================
// 列表
export const diamondStatList = query => {
return request({
url: '/admin/diamondStat/list',
method: 'get',
params: query
});
};

View File

@@ -2,6 +2,15 @@ import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer'; import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs'; import qs from 'qs';
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 奖池拉框 // 奖池拉框
export const listType = query => { export const listType = query => {
return request({ return request({

View File

@@ -1,6 +1,15 @@
import request from '@/utils/request'; import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer'; import { genQueryParam } from '@/utils/maintainer';
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 邀请移除记录 // 邀请移除记录
export const pageOperateRecord = query => { export const pageOperateRecord = query => {
return request({ return request({
@@ -252,3 +261,21 @@ export const removeMember = query => {
params: query 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

@@ -1,6 +1,15 @@
import request from '@/utils/request'; import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer'; import { genQueryParam } from '@/utils/maintainer';
// 分区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};
// 邀请移除记录 // 邀请移除记录
export const pageOperateRecord = query => { export const pageOperateRecord = query => {
return request({ return request({

View File

@@ -7,3 +7,10 @@ export const getPartitionInfoList = query => {
params: query params: query
}); });
}; };
export const listAll = query => {
return request({
url: '/partition/listAll',
method: 'get',
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

@@ -4,6 +4,21 @@ import qs from 'qs';
import { genQueryParam } from '@/utils/maintainer'; 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 => { export const getDateCycleList = query => {
return request({ return request({
@@ -12,6 +27,28 @@ export const getDateCycleList = query => {
params: query params: query
}); });
}; };
// 获取 周奖励周期列表
export const familyMemberWeekLevelRewardListCycleDate = query => {
return request({
url: '/admin/familyMemberWeekLevelReward/listCycleDate',
method: 'get',
params: query
});
};
// 获取 周奖励查询列表
export const familyMemberWeekLevelRewardPage = query => {
return request({
url: '/admin/familyMemberWeekLevelReward/page',
method: 'get',
params: query
});
};
// 导出
export const familyMemberWeekLevelRewardExport = query => {
window.location.href = `/admin/familyMemberWeekLevelReward/export?${genQueryParam(query)}`;
return;
};
// 获取 公会钻石薪资流水统计 列表 // 获取 公会钻石薪资流水统计 列表
export const getAgencyDiamondFlow = query => { export const getAgencyDiamondFlow = query => {

View File

@@ -60,6 +60,17 @@ const app = createApp(App)
app.config.globalProperties.$copy = function (text) { app.config.globalProperties.$copy = function (text) {
copy(text, this); 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.config.warnHandler = () => null;
app.use(store).use(router).use(components).use(VueClipboard).mount('#app') app.use(store).use(router).use(components).use(VueClipboard).mount('#app')

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
}

View File

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

View File

@@ -121,6 +121,7 @@ export default {
{ desc: "英语区", id: 1 }, { desc: "英语区", id: 1 },
{ desc: "阿拉伯区", id: 2 }, { desc: "阿拉伯区", id: 2 },
{ desc: "华语区", id: 4 }, { desc: "华语区", id: 4 },
{ desc: "土耳其区", id: 8 },
], ],
}, },
// 表格 // 表格
@@ -206,6 +207,9 @@ export default {
} else if (val == 4) { } else if (val == 4) {
this.eidDialogTitle = `编辑礼物面板信息-华语区`; this.eidDialogTitle = `编辑礼物面板信息-华语区`;
this.eidText = `华语区`; this.eidText = `华语区`;
}else if (val == 8) {
this.eidDialogTitle = `编辑礼物面板信息-土耳其区`;
this.eidText = `土耳其区`;
} }
this.getData(); this.getData();
}, },

View File

@@ -51,6 +51,7 @@
{{langFormat(scope.row.lang)}} {{langFormat(scope.row.lang)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="reason" align="center" label="原因" />
<el-table-column align="center" label="操作" width="300"> <el-table-column align="center" label="操作" width="300">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button

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="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br> <input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br> <input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -101,6 +102,12 @@
<input type="text" class="form-control validate[required]" name="name" id="en_name"> <input type="text" class="form-control validate[required]" name="name" id="en_name">
</div> </div>
</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"> <div class="form-group">
<label class="col-sm-3 control-label">使用萝卜购买</label> <label class="col-sm-3 control-label">使用萝卜购买</label>
@@ -438,6 +445,7 @@ export default {
{field: 'name.zh', title: '座驾名称', align: 'center', width: '20%'}, {field: 'name.zh', title: '座驾名称', align: 'center', width: '20%'},
{field: 'name.ar', title: '阿语座驾名称', align: 'center', width: '20%'}, {field: 'name.ar', title: '阿语座驾名称', align: 'center', width: '20%'},
{field: 'name.en', title: '英语座驾名称', align: 'center', width: '20%'}, {field: 'name.en', title: '英语座驾名称', align: 'center', width: '20%'},
{field: 'name.tr', title: '土耳其名称', align: 'center', width: '20%'},
{ {
field: 'partitionFlag', field: 'partitionFlag',
title: '地区', title: '地区',
@@ -454,6 +462,9 @@ export default {
if ((val & 4) != 0) { if ((val & 4) != 0) {
value += '华语区<br>'; value += '华语区<br>';
} }
if ((val & 8) != 0) {
value += '土耳其区<br>';
}
return value; return value;
} }
}, },
@@ -664,9 +675,11 @@ export default {
$('#name').val(''); $('#name').val('');
$('#ar_name').val(''); $('#ar_name').val('');
$('#en_name').val(''); $('#en_name').val('');
$('#tr_name').val('');
$("#name").attr('readonly', false); $("#name").attr('readonly', false);
$("#ar_name").attr('readonly', false); $("#ar_name").attr('readonly', false);
$("#en_name").attr('readonly', false); $("#en_name").attr('readonly', false);
$("#tr_name").attr('readonly', false);
// $("#price").attr('readonly', false); // $("#price").attr('readonly', false);
// $("#renewPrice").attr('readonly', false); // $("#renewPrice").attr('readonly', false);
$("#seq").val(''); $("#seq").val('');
@@ -865,10 +878,12 @@ export default {
$("#name").val(jsonName.zh); $("#name").val(jsonName.zh);
$("#ar_name").val(jsonName.ar); $("#ar_name").val(jsonName.ar);
$("#en_name").val(jsonName.en); $("#en_name").val(jsonName.en);
$("#tr_name").val(jsonName.tr);
} else { } else {
$("#name").val(name); $("#name").val(name);
$("#ar_name").val(name); $("#ar_name").val(name);
$("#en_name").val(name); $("#en_name").val(name);
$("#tr_name").val(name);
} }
$("#price").val(json.entity.price); $("#price").val(json.entity.price);
$("#renewPrice").val(json.entity.renewPrice); $("#renewPrice").val(json.entity.renewPrice);
@@ -997,6 +1012,11 @@ export default {
} else { } else {
$("input:checkbox[name='partitionFlag']")[2].checked = false; $("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'); $("#cardGoodsModal").modal('show');
@@ -1077,8 +1097,10 @@ export default {
var ar_name = $("#ar_name").val(); var ar_name = $("#ar_name").val();
// 英语名称 // 英语名称
var en_name = $("#en_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); const nameValue = JSON.stringify(jsonName);
// 修改属性值 // 修改属性值
formData.name = nameValue; // 将giftName修改为"newGiftName" formData.name = nameValue; // 将giftName修改为"newGiftName"

View File

@@ -11,21 +11,23 @@
<div id="toolbar"> <div id="toolbar">
<div class="col-sm-12"> <div class="col-sm-12">
<label for="searchType" <label for="searchType"
class="col-sm-4 control-label">地区:</label> class="col-sm-2 control-label">地区:</label>
<div class="col-sm-6"> <div class="col-sm-8">
<select name="searchType" <select name="searchType"
id="searchType" id="searchType"
data-btn-class="btn-warning" data-btn-class="btn-warning"
class="form-control"> class="form-control">
</select> </select>
</div> </div>
</div> <div class="col-sm-2">
<button id="btnSearch" <button id="btnSearch" class="btn btn-default">
class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询 <i class="glyphicon glyphicon-search"></i>查询
</button> </button>
</div> </div>
</div> </div>
</div>
</div>
<div class="box-body" <div class="box-body"
style="height:150%;"> style="height:150%;">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
@@ -60,9 +62,6 @@
<input type="hidden" <input type="hidden"
name="code" name="code"
id="code" /> id="code" />
<input type="hidden"
name="currency"
id="currency" />
<input type="hidden" <input type="hidden"
name="type" name="type"
id="type" /> id="type" />
@@ -76,9 +75,19 @@
id="name"> id="name">
</div> </div>
</div> </div>
<div class="form-group">
<label for="currency"
class="col-sm-3 control-label">货币</label>
<div class="col-sm-9">
<input type="text"
readonly
class="form-control"
id="currency">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="rate" <label for="rate"
class="col-sm-3 control-label">USD汇率</label> class="col-sm-3 control-label">USD汇率</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" <input type="text"
class="form-control" class="form-control"
@@ -324,9 +333,10 @@ export default {
$('#regionTable').bootstrapTable({ $('#regionTable').bootstrapTable({
columns: [ columns: [
{ field: 'name', title: '地区', align: 'center', width: '5%' }, { field: 'name', title: '地区', align: 'center', width: '5%' },
{ field: 'currency', title: '货币', align: 'center', width: '5%'},
{ {
field: 'rate', field: 'rate',
title: 'USD汇率', title: 'USD汇率',
align: 'center', align: 'center',
width: '5%', width: '5%',
formatter: function (val, row, index) { formatter: function (val, row, index) {
@@ -430,7 +440,7 @@ export default {
return '<img src="' + val + '" style="width:90px;height:90px;" alt="">' 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', field: 'isEnabled',
title: '是否展示在充值H5', title: '是否展示在充值H5',
@@ -823,7 +833,7 @@ export default {
var $select = $('#searchType'); var $select = $('#searchType');
for (let i = 0; i < array.length; i++) { for (let i = 0; i < array.length; i++) {
var $option = $('<option value="' + array[i].type + '" />'); var $option = $('<option value="' + array[i].type + '" />');
$option.html(array[i].name); $option.html(array[i].desc + '(' + array[i].name + ')');
if (i == 0) { if (i == 0) {
$option.attr('selected', true); $option.attr('selected', true);
} }

View File

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

View File

@@ -0,0 +1,300 @@
<template>
<div class="outer">
<!-- 查询 -->
<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 style="" type="primary" @click="getData()">查询</el-button>
<!-- <el-button style="" type="primary" @click="exportDate()">导出</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 align="center" label="全平台真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '全平台金币明细';
edi(scope.row, 0);
"
type="text"
size="small"
>
{{ scope.row.totalDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="阿拉伯区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '阿拉伯区金币明细';
edi(scope.row, 2);
"
type="text"
size="small"
>
{{ scope.row.arDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="英语区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '英语区金币明细';
edi(scope.row, 1);
"
type="text"
size="small"
>
{{ scope.row.enDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="华语区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '华语区金币明细';
edi(scope.row, 4);
"
type="text"
size="small"
>
{{ scope.row.zhDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="土耳其区真实消耗" width="">
<template v-slot="scope">
<el-button
@click="
detailsTitle = '土耳其区金币明细';
edi(scope.row, 8);
"
type="text"
size="small"
>
{{ scope.row.trDiamond }}
</el-button>
</template>
</el-table-column>
<el-table-column
prop="totalRemainDiamond"
align="center"
label="全平台库存"
/>
<el-table-column
prop="arRemainDiamond"
align="center"
label="阿拉伯区库存"
/>
<el-table-column prop="enRemainDiamond" align="center" label="英语区库存" />
<el-table-column prop="zhRemainDiamond" align="center" label="华语区库存" />
<el-table-column
prop="trRemainDiamond"
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="detailsDialog" :title="detailsTitle" width="30%" center>
<!-- 内表格 -->
<el-table
v-loading="loading"
:data="tableDataIn"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="domainDesc" align="center" label="类型" />
<el-table-column prop="addDiamond" align="center" label="增加" />
<el-table-column prop="subDiamond" align="center" label="消耗" />
</el-table>
<!-- 操作 -->
<template #footer>
<span class="dialog-footer">
<el-button type="primary" class="primary" @click="detailsDialog = false"
>关闭</el-button
>
</span>
</template>
</el-dialog>
</template>
<script>
import { diamondStatList } from "@/api/dailyCoinStatistics/dailyCoinStatistics";
import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
export default {
name: "dailyCoinStatistics",
data() {
return {
loading: false,
// 查询条件
inquire: {
time: [],
},
// 表格
tableData: [{ x: "x" }],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
// 内表格
detailsDialog: false,
detailsTitle: "金币明细",
tableDataIn: [],
};
},
created() {
// 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;
}
diamondStatList({
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;
this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
// 详情
edi(res, type) {
var jsonArr =
type == 0
? res.totalDiamondDetail
: type == 1
? res.enDomainDetail
: type == 2
? res.arDomainDetail
: type == 4
? res.zhDomainDetail
: type == 8
? res.trDomainDetail
: `"[""]"`;
console.log(jsonArr);
this.tableDataIn = JSON.parse(jsonArr);
this.detailsDialog = true;
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.outer {
padding-top: 20px;
background: #ecf0f5;
border-top: 3px solid #d2d6de;
.demonstration {
margin-right: 20px;
}
.inquire {
display: flex;
justify-content: space-between;
white-space: nowrap;
float: left;
margin-right: 20px;
}
.search {
width: 100%;
height: 41px;
.searchLeft,
.searchRight {
width: 20%;
float: left;
span {
margin-right: 10px;
}
.input {
width: 75%;
}
}
}
.buttonBox {
margin-top: 10px;
}
.authorityBox {
.authoritySpan {
margin-right: 20px;
}
.authorityInpput {
width: 50%;
}
}
.dialogTableVisibleBut {
margin: -25px 0 20px 0px;
}
}
</style>

View File

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

View File

@@ -108,7 +108,7 @@
</select> </select>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri" <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> </div>
<div class="form-group"> <div class="form-group">
@@ -269,7 +269,7 @@
</select> </select>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri" <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> </div>
<div class="form-group"> <div class="form-group">

File diff suppressed because it is too large Load Diff

View File

@@ -197,6 +197,8 @@
class="form-control" class="form-control"
name="skipUri" name="skipUri"
id="skipUrlContent" id="skipUrlContent"
onkeydown="return event.key !== ' '"
oninput="this.value = this.value.replace(/\s+/g, '')"
/> />
</div> </div>
</div> </div>
@@ -457,9 +459,11 @@
<div class="col-sm-6"> <div class="col-sm-6">
<input <input
type="text" type="text"
class="form-control validate[required]" class="form-control"
name="skipUri" name="skipUri"
id="addSkipUrlContent" id="addSkipUrlContent"
onkeydown="return event.key !== ' '"
oninput="this.value = this.value.replace(/\s+/g, '')"
/> />
</div> </div>
</div> </div>
@@ -733,7 +737,6 @@ export default {
// } // }
// } // }
// } // }
function initTable() { function initTable() {
$("#table").bootstrapTable({ $("#table").bootstrapTable({
columns: [ columns: [
@@ -1520,7 +1523,7 @@ export default {
margin-right: 10px; margin-right: 10px;
margin-left: 5px; margin-left: 5px;
} }
.text{ .text {
font-size: 20px; font-size: 20px;
margin-top: 20px; margin-top: 20px;
color: rgb(173, 53, 53); color: rgb(173, 53, 53);

View File

@@ -83,7 +83,7 @@
</select> </select>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri" <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> </div>
<div class="form-group"> <div class="form-group">
@@ -238,7 +238,7 @@
</select> </select>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control validate[required]" name="skipUri" <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> </div>
<div class="form-group"> <div class="form-group">

View File

@@ -20,6 +20,17 @@
:disabled="tableLoading" :disabled="tableLoading"
> >
<div class="search-line"> <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-form-item label="公会ID" prop="agencyId">
<el-input <el-input
v-model.trim="searchForm.agencyId" v-model.trim="searchForm.agencyId"
@@ -66,6 +77,7 @@
{{ regionType(scope.row.region) }} {{ regionType(scope.row.region) }}
</template> </template>
</el-table-column> --> </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 align="center" prop="agencyId" label="公会ID">
</el-table-column> </el-table-column>
<el-table-column align="center" prop="agencyName" label="公会名称"> <el-table-column align="center" prop="agencyName" label="公会名称">
@@ -81,7 +93,11 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="energyValue" label="总钻石流水"> <el-table-column align="center" prop="energyValue" label="总钻石流水">
<template v-slot="scope"> <template v-slot="scope">
{{ scope.row.energyValue ? scope.row.energyValue.toLocaleString() : "null"}} {{
scope.row.energyValue
? scope.row.energyValue.toLocaleString()
: "null"
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -109,7 +125,7 @@
</template> </template>
<script lang=js> <script lang=js>
import { getDateCycleList, getAgencyDiamondFlow, agencyDiamondFlowExport } from '@/api/relAgency/relAgency.js'; import { getDateCycleList, getAgencyDiamondFlow, agencyDiamondFlowExport,listPartitionInfo } from '@/api/relAgency/relAgency.js';
import TablePagination from '@/components/common/TablePagination'; import TablePagination from '@/components/common/TablePagination';
import { formatDate, formatDateYMD } from '@/utils/relDate'; import { formatDate, formatDateYMD } from '@/utils/relDate';
// @ts-ignore // @ts-ignore
@@ -125,6 +141,7 @@ export default {
components: { TablePagination }, components: { TablePagination },
data() { data() {
return { return {
partitionArr: [],
dateCycleList: [], dateCycleList: [],
btnLoading: false, // 导出弹出框(dialog)的确认按钮 btnLoading: false, // 导出弹出框(dialog)的确认按钮
tableLoading: false, // 表格是否加载中 tableLoading: false, // 表格是否加载中
@@ -140,7 +157,8 @@ export default {
agencyOwnerId: null, agencyOwnerId: null,
agencyId: null, agencyId: null,
dateCycle: null, dateCycle: null,
region: null region: null,
partitionId: "",
}, },
searchRule: { searchRule: {
startTime: [ startTime: [
@@ -173,6 +191,10 @@ export default {
}; };
}, },
created() { created() {
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId=this.partitionArr[0].id;
});
this.getDateCycleList(); this.getDateCycleList();
}, },
methods: { methods: {
@@ -272,11 +294,12 @@ export default {
}, },
// 分页导航 // 分页导航
handleSizeChange(val) { handleSizeChange(val) {
console.log(val);
this.pageParams.pageSize = val; this.pageParams.pageSize = val;
this.getData(); this.getData();
}, },
handlePageChange(val) { handlePageChange(val) {
this.pageParams.pageSize = val; this.pageParams.pageNo = val;
this.getData(); this.getData();
}, },
headerCopy(column, e) { headerCopy(column, e) {

View File

@@ -10,6 +10,17 @@
:disabled="tableLoading" :disabled="tableLoading"
> >
<div class="search-line"> <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-form-item label="充值代理ID" prop="chargeAgentErbanNo">
<el-input <el-input
v-model.trim="searchForm.chargeAgentErbanNo" v-model.trim="searchForm.chargeAgentErbanNo"
@@ -43,6 +54,9 @@
<el-form-item label-width="40px"> <el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button> <el-button type="primary" @click="handSearch">搜索</el-button>
<el-button plain @click="resetSearchForm">重置搜索</el-button> <el-button plain @click="resetSearchForm">重置搜索</el-button>
<el-button type="primary" @click="chargeAgentExportFun"
>导出</el-button
>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@@ -58,6 +72,8 @@
@header-click="headerCopy" @header-click="headerCopy"
style="width: 100%" style="width: 100%"
> >
<el-table-column align="center" prop="partitionDesc" label="分区">
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="receiveErbano" prop="receiveErbano"
@@ -110,7 +126,12 @@
</template> </template>
<script> <script>
import { chargeAgentList, chargeAgentSum } from "@/api/relAgency/relAgency.js"; import {
chargeAgentList,
chargeAgentSum,
listPartitionInfo,
chargeAgentExport,
} from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination"; import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate"; import { formatDate, formatDateYMD } from "@/utils/relDate";
import { dateFormat } from "@/utils/system-helper"; import { dateFormat } from "@/utils/system-helper";
@@ -138,7 +159,9 @@ export default {
chargeAgentErbanNo: null, chargeAgentErbanNo: null,
startTime: null, startTime: null,
endTime: null, endTime: null,
partitionId: "",
}, },
partitionArr: [],
searchRule: { searchRule: {
startTime: [ startTime: [
{ {
@@ -171,6 +194,10 @@ export default {
}, },
created() { created() {
// this.getData(); // this.getData();
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId = this.partitionArr[0].id;
});
}, },
methods: { methods: {
getData() { getData() {
@@ -223,6 +250,32 @@ export default {
} }
}); });
}, },
// 导出
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() { handSearch() {
this.$refs["searchForm"].validate((valid) => { this.$refs["searchForm"].validate((valid) => {
@@ -247,7 +300,7 @@ export default {
}, },
handlePageChange(val) { handlePageChange(val) {
// this.$set(this.pageParams, 'pageNo', val); // this.$set(this.pageParams, 'pageNo', val);
this.pageParams.pageSize = val; this.pageParams.pageNo = val;
this.getData(); this.getData();
}, },
headerCopy(column, e) { headerCopy(column, e) {

View File

@@ -10,6 +10,17 @@
:disabled="tableLoading" :disabled="tableLoading"
> >
<div class="search-line"> <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-form-item label="主播ID" prop="erbanNo">
<el-input <el-input
v-model.trim="searchForm.erbanNo" v-model.trim="searchForm.erbanNo"
@@ -59,6 +70,7 @@
{{ dateCycleType(scope.row.dateCycle) }} {{ dateCycleType(scope.row.dateCycle) }}
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column align="center" prop="partitionDesc" label="分区" />
<el-table-column align="center" prop="erbano" label="主播ID"> <el-table-column align="center" prop="erbano" label="主播ID">
</el-table-column> </el-table-column>
<el-table-column align="center" prop="nick" label="主播昵称"> <el-table-column align="center" prop="nick" label="主播昵称">
@@ -313,6 +325,7 @@ import {
getDateCycleList, getDateCycleList,
getAnchorSalaryBill, getAnchorSalaryBill,
anchorSalaryBillDetail, anchorSalaryBillDetail,
listPartitionInfo,
} from "@/api/relAgency/relAgency.js"; } from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination"; import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate"; import { formatDate, formatDateYMD } from "@/utils/relDate";
@@ -340,7 +353,9 @@ export default {
agencyId: null, agencyId: null,
dateCycle: null, dateCycle: null,
erbanNo: null, erbanNo: null,
partitionId: null,
}, },
partitionArr: [],
searchRule: { searchRule: {
startTime: [ startTime: [
{ {
@@ -384,6 +399,10 @@ export default {
}, },
created() { created() {
this.getDateCycleList(); this.getDateCycleList();
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId = this.partitionArr[0].id;
});
}, },
methods: { methods: {
getDateCycleList() { getDateCycleList() {
@@ -429,19 +448,19 @@ export default {
this.dialogTitle = "钻石兑换薪资"; this.dialogTitle = "钻石兑换薪资";
this.dialogType = 1; this.dialogType = 1;
break; break;
case 2: case 3:
this.dialogTitle = "薪资转增代理"; this.dialogTitle = "薪资转增代理";
this.dialogType = 2; this.dialogType = 2;
break; break;
case 3: case 4:
this.dialogTitle = "薪资转增公会长"; this.dialogTitle = "薪资转增公会长";
this.dialogType = 3; this.dialogType = 3;
break; break;
case 4: case 5:
this.dialogTitle = "官方提现"; this.dialogTitle = "官方提现";
this.dialogType = 4; this.dialogType = 4;
break; break;
case 6: case 2:
this.dialogTitle = "薪资兑换金币"; this.dialogTitle = "薪资兑换金币";
this.dialogType = 6; this.dialogType = 6;
break; break;
@@ -508,16 +527,16 @@ export default {
this.getData(); this.getData();
}, },
handlePageChange(val) { handlePageChange(val) {
this.pageParams.pageSize = val; this.pageParams.pageNo = val;
this.getData(); this.getData();
}, },
// 弹窗分页导航 // 弹窗分页导航
handleSizeChange1(val) { handleSizeChange1(val) {
this.$set(this.pageParams1, "pageSize", val); this.pageParams1.pageSize = val;
this.getDetail(); this.getDetail();
}, },
handlePageChange1(val) { handlePageChange1(val) {
this.$set(this.pageParams1, "pageNo", val); this.pageParams1.pageNo = val;
this.getDetail(); this.getDetail();
}, },

View File

@@ -1,6 +1,23 @@
<template> <template>
<div class="box"> <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"> <div class="inquire">
<span>公会ID</span> <span>公会ID</span>
<el-input <el-input
@@ -86,6 +103,7 @@
style="width: 100%; margin-top: 25px" style="width: 100%; margin-top: 25px"
> >
<el-table-column type="index" width="100" align="center" label="序号" /> <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="guildId" align="center" label="公会ID" />
<el-table-column prop="guildName" align="center" label="公会昵称" /> <el-table-column prop="guildName" align="center" label="公会昵称" />
<el-table-column prop="ownerErbanNo" align="center" label="公会长ID" /> <el-table-column prop="ownerErbanNo" align="center" label="公会长ID" />
@@ -110,6 +128,7 @@
import { import {
diamondStatistics, diamondStatistics,
diamondStatisticsExport, diamondStatisticsExport,
listPartitionInfo,
} from "@/api/relAgency/relAgency"; } from "@/api/relAgency/relAgency";
// @ts-ignore // @ts-ignore
import { dateFormat } from "@/utils/system-helper"; import { dateFormat } from "@/utils/system-helper";
@@ -125,6 +144,8 @@ export default {
guildId: "", guildId: "",
guildBoosId: "", guildBoosId: "",
time: [], time: [],
partitionId: "",
partitionArr: [],
}, },
// 表格 // 表格
tableData: [], tableData: [],
@@ -138,6 +159,10 @@ export default {
}, },
created() { created() {
// this.getData(); // this.getData();
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
}, },
methods: { methods: {
// 查询接口 // 查询接口
@@ -157,6 +182,7 @@ export default {
diamondStatistics({ diamondStatistics({
guildId: this.inquire.guildId, guildId: this.inquire.guildId,
ownerErbanNo: this.inquire.guildBoosId, ownerErbanNo: this.inquire.guildBoosId,
partitionId: this.inquire.partitionId,
startTime: startTime, startTime: startTime,
endTime: endTime, endTime: endTime,
pageNo: this.currentPage, pageNo: this.currentPage,

View File

@@ -3,9 +3,28 @@
<!-- 查询 --> <!-- 查询 -->
<div class="inquire"> <div class="inquire">
<span>ID</span> <span>ID</span>
<el-input v-model="inquire.userId" <el-input
v-model="inquire.userId"
placeholder="" placeholder=""
class="input"></el-input> 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>
<!-- <div class="inquire"> <!-- <div class="inquire">
<span>推荐人</span> <span>推荐人</span>
@@ -30,78 +49,104 @@
</div> </div>
</div> --> </div> -->
<!-- 查询按钮 --> <!-- 查询按钮 -->
<el-button class="primary" <el-button class="primary" type="primary" @click="getData()"
type="primary" >查询</el-button
@click="getData()">查询</el-button> >
<el-button class="primary" <el-button class="primary" type="primary" @click="addDialog = true"
type="primary" >添加</el-button
@click="addDialog = true">添加</el-button> >
<el-button class="primary" <el-button class="primary" type="primary" @click="exportInfoFun()"
type="primary" >导出</el-button
@click="exportInfoFun()">导出</el-button> >
<!-- 表格 --> <!-- 表格 -->
<el-table v-loading="loading" <el-table
v-loading="loading"
:data="tableData" :data="tableData"
border border
style="width: 100%; margin-top: 25px"> style="width: 100%; margin-top: 25px"
<el-table-column prop="id" >
align="center" <el-table-column prop="id" align="center" label="公会ID" />
label="公会ID" />
<!-- <el-table-column prop="referrer" align="center" label="推荐人" /> --> <!-- <el-table-column prop="referrer" align="center" label="推荐人" /> -->
<el-table-column prop="ownerErbanNo" <el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
<el-table-column prop="ownerNick" align="center" label="会长昵称" />
<el-table-column
prop="ownerPartitionName"
align="center" align="center"
label="会长ID" /> label="会长分区"
<el-table-column prop="ownerNick" />
align="center" <el-table-column prop="name" align="center" label="公会昵称" />
label="会长昵称" /> <el-table-column align="center" prop="giftInfo" 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"> <template v-slot="scope">
<el-image style="width: 100px; height: 100px" <el-image
style="width: 100px; height: 100px"
:src="scope.row.avatar" :src="scope.row.avatar"
:zoom-rate="1.1" :zoom-rate="1.1"
:preview-src-list="[scope.row.avatar]" :preview-src-list="[scope.row.avatar]"
fit="scale-down" fit="scale-down"
preview-teleported="true" preview-teleported="true"
hide-on-click-modal="true" /> hide-on-click-modal="true"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" <el-table-column align="center" prop="giftInfo" label="公会背景图">
prop="giftInfo"
label="公会背景图">
<template v-slot="scope"> <template v-slot="scope">
<el-image style="width: 100px; height: 100px" <el-image
style="width: 100px; height: 100px"
:src="scope.row.backgroundUrl" :src="scope.row.backgroundUrl"
:zoom-rate="1.1" :zoom-rate="1.1"
:preview-src-list="[scope.row.backgroundUrl]" :preview-src-list="[scope.row.backgroundUrl]"
fit="scale-down" fit="scale-down"
preview-teleported="true" preview-teleported="true"
hide-on-click-modal="true" /> hide-on-click-modal="true"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" align="center" label="创建日期" />
align="center"
label="创建日期" />
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> --> <!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
<el-table-column align="center" <el-table-column align="center" label="成员数量/上限">
label="成员数量/上限">
<template v-slot="scope"> <template v-slot="scope">
<el-button @click="memberDialogFun(scope.row)" <el-button
@click="memberDialogFun(scope.row)"
type="text" type="text"
size="default">{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</el-button> size="default"
>{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="adminName" <el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column
prop="guildContact"
align="center" 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"> <!-- <el-table-column align="center" label="收款账户" width="300">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
@@ -140,37 +185,43 @@
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" /> <!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> --> <el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> -->
<el-table-column align="center" <el-table-column align="center" label="操作" width="300">
label="操作"
width="300">
<template v-slot="scope"> <template v-slot="scope">
<el-button @click="ediClick(scope)" <el-button
@click="ediClick(scope)"
class="primary" class="primary"
type="primary" type="primary"
size="default" size="default"
:disabled="!scope.row.enable">编辑</el-button> :disabled="!scope.row.enable"
<el-button @click=" >编辑</el-button
>
<el-button
@click="
delDialog = true; delDialog = true;
delDialogData = scope.row; delDialogData = scope.row;
" "
:class="scope.row.enable ? 'danger' : 'info'" :class="scope.row.enable ? 'danger' : 'info'"
:type="scope.row.enable ? 'danger' : 'info'" :type="scope.row.enable ? 'danger' : 'info'"
size="default" size="default"
:disabled="!scope.row.enable">{{ scope.row.enable ? "移除" : "已解散" }}</el-button> :disabled="!scope.row.enable"
>{{ scope.row.enable ? "移除" : "已解散" }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 新增弹窗 --> <!-- 新增弹窗 -->
<el-dialog v-model="addDialog" <el-dialog v-model="addDialog" title="新增" width="28%" center>
title="新增"
width="28%"
center>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px; width: 100px" <span
class="col-sm-2 control-label">会长ID</span> style="display: inline-block; margin-right: 20px; width: 100px"
<el-input v-model="resource.id" class="col-sm-2 control-label"
>会长ID</span
>
<el-input
v-model="resource.id"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<!-- <div style="margin-bottom: 25px"> <!-- <div style="margin-bottom: 25px">
<span <span
@@ -199,13 +250,13 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="addDialog = false">取消</el-button> <el-button @click="addDialog = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="add()"> 确认 </el-button>
@click="add()"> 确认 </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 分页 --> <!-- 分页 -->
<el-pagination style="margin-top: 10px" <el-pagination
style="margin-top: 10px"
class="paginationClass" class="paginationClass"
v-model:current-page="currentPage" v-model:current-page="currentPage"
v-model:page-size="pageSize" v-model:page-size="pageSize"
@@ -213,46 +264,64 @@
layout="sizes, prev, pager, next" layout="sizes, prev, pager, next"
:total="total" :total="total"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" /> @current-change="handleCurrentChange"
/>
<!-- 编辑弹窗 --> <!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" <el-dialog v-model="editDialog" title="编辑" width="28%" center>
title="编辑"
width="28%"
center>
<!-- 公会ID --> <!-- 公会ID -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">公会ID</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="ediObj.id" class="col-sm-2 control-label"
>公会ID</span
>
<el-input
v-model="ediObj.id"
style="width: 75%" style="width: 75%"
class="input" class="input"
disabled></el-input> disabled
></el-input>
</div> </div>
<!-- 会长ID --> <!-- 会长ID -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">会长ID</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="ediObj.leaderId" class="col-sm-2 control-label"
>会长ID</span
>
<el-input
v-model="ediObj.leaderId"
style="width: 75%" style="width: 75%"
class="input" class="input"
disabled></el-input> disabled
></el-input>
</div> </div>
<!-- 会长昵称 --> <!-- 会长昵称 -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">会长昵称</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="ediObj.leaderNick" class="col-sm-2 control-label"
>会长昵称</span
>
<el-input
v-model="ediObj.leaderNick"
style="width: 75%" style="width: 75%"
class="input" class="input"
disabled></el-input> disabled
></el-input>
</div> </div>
<!-- 公会昵称 --> <!-- 公会昵称 -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">公会昵称</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="ediObj.guildNick" class="col-sm-2 control-label"
>公会昵称</span
>
<el-input
v-model="ediObj.guildNick"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<!-- 公会头像 --> <!-- 公会头像 -->
<div class="selectBox selectBoxImg"> <div class="selectBox selectBoxImg">
@@ -272,116 +341,129 @@
</div> </div>
<!-- 公会背景图 --> <!-- 公会背景图 -->
<div class="selectBox selectBoxImg"> <div class="selectBox selectBoxImg">
<span class="left" <span class="left" style="margin-right: 20px">公会背景图</span>
style="margin-right: 20px">公会背景图</span>
<!-- action="/admin/tencent/cos/upload/file" --> <!-- action="/admin/tencent/cos/upload/file" -->
<el-upload class="avatar-uploader" <el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file" action="/admin/tencent/cos/upload/file"
:show-file-list="false" :show-file-list="false"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"> :on-error="handleAvatarError"
<img v-if="ediObj.imageUrl1" >
:src="ediObj.imageUrl1" <img v-if="ediObj.imageUrl1" :src="ediObj.imageUrl1" class="avatar" />
class="avatar" /> <el-icon v-else class="avatar-uploader-icon">
<el-icon v-else
class="avatar-uploader-icon">
<Plus /> <Plus />
</el-icon> </el-icon>
</el-upload> </el-upload>
</div> </div>
<!-- 成员数量上限 --> <!-- 成员数量上限 -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">成员数量上限</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="ediObj.guildNumber" class="col-sm-2 control-label"
>成员数量上限</span
>
<el-input
v-model="ediObj.guildNumber"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button> <el-button @click="editDialog = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="editDialogClick()">
@click="editDialogClick()">
确认 确认
</el-button> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 二次确认删除弹窗 --> <!-- 二次确认删除弹窗 -->
<el-dialog v-model="delDialog" <el-dialog v-model="delDialog" title="提示" width="30%" center>
title="提示"
width="30%"
center>
<span> 确定要解散该公会吗?</span> <span> 确定要解散该公会吗?</span>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="delDialog = false">取消</el-button> <el-button @click="delDialog = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="delClick()"> 确认 </el-button>
@click="delClick()"> 确认 </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 编辑收款账户弹窗 --> <!-- 编辑收款账户弹窗 -->
<el-dialog v-model="payAccountDialog" <el-dialog
v-model="payAccountDialog"
:title="payAccountTitle" :title="payAccountTitle"
width="28%" width="28%"
center> center
>
<!-- Payoneer --> <!-- Payoneer -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">Payoneer</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="payAccount.payoneer" class="col-sm-2 control-label"
>Payoneer</span
>
<el-input
v-model="payAccount.payoneer"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<!-- USDT-ERC20 --> <!-- USDT-ERC20 -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">USDT-ERC20</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="payAccount.usdt" class="col-sm-2 control-label"
>USDT-ERC20</span
>
<el-input
v-model="payAccount.usdt"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<!-- PayPal --> <!-- PayPal -->
<div style="margin-bottom: 25px; margin-top: 10px"> <div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px" <span
class="col-sm-2 control-label">PayPal</span> style="display: inline-block; margin-right: 20px"
<el-input v-model="payAccount.payPal" class="col-sm-2 control-label"
>PayPal</span
>
<el-input
v-model="payAccount.payPal"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="payAccountDialog = false">取消</el-button> <el-button @click="payAccountDialog = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="payAccountClick()">
@click="payAccountClick()">
保存 保存
</el-button> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 编辑成员弹窗 --> <!-- 编辑成员弹窗 -->
<el-dialog v-model="memberDialog" <el-dialog v-model="memberDialog" :title="memberTitle" width="36%" center>
:title="memberTitle"
width="36%"
center>
<!-- 新增用户 --> <!-- 新增用户 -->
<div class="inquire"> <div class="inquire">
<span>平台ID</span> <span>平台ID</span>
<el-input v-model="member.userID" <el-input
v-model="member.userID"
placeholder="请输入新增平台id" placeholder="请输入新增平台id"
class="input"></el-input> class="input"
<el-button type="primary" ></el-input>
@click="addMemberFun()"> 新增 </el-button> <el-button type="primary" @click="addMemberFun()"> 新增 </el-button>
</div> </div>
<!-- 内嵌表格 --> <!-- 内嵌表格 -->
<el-table v-loading="loading" <el-table
v-loading="loading"
:data="member.tableData" :data="member.tableData"
border border
style="width: 100%; margin-top: 25px"> style="width: 100%; margin-top: 25px"
<el-table-column align="center" >
label="用户平台ID"> <el-table-column align="center" label="用户平台ID">
<template v-slot="scope"> <template v-slot="scope">
{{ scope.row.erbanNo {{ scope.row.erbanNo
}}{{ }}{{
@@ -394,61 +476,54 @@
{{ scope.row.enable == false ? "(已离开)" : "" }} {{ scope.row.enable == false ? "(已离开)" : "" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="nick" <el-table-column prop="nick" align="center" label="用户昵称" />
align="center" <el-table-column prop="createTime" align="center" label="加入时间" />
label="用户昵称" /> <el-table-column prop="adminName" align="center" label="操作人" />
<el-table-column prop="createTime" <el-table-column align="center" label="操作" width="300">
align="center"
label="加入时间" />
<el-table-column prop="adminName"
align="center"
label="操作人" />
<el-table-column align="center"
label="操作"
width="300">
<template v-slot="scope"> <template v-slot="scope">
<el-button @click="setMemberFun(scope.row)" <el-button
@click="setMemberFun(scope.row)"
:class="scope.row.roleType == 2 ? 'danger' : 'primary'" :class="scope.row.roleType == 2 ? 'danger' : 'primary'"
:type="scope.row.roleType == 2 ? 'danger' : 'primary'" :type="scope.row.roleType == 2 ? 'danger' : 'primary'"
size="default" size="default"
:disabled="scope.row.roleType == 1 ? true : false">{{ :disabled="scope.row.roleType == 1 ? true : false"
>{{
scope.row.roleType == 1 scope.row.roleType == 1
? "会长" ? "会长"
: scope.row.roleType == 2 : scope.row.roleType == 2
? "取消管理员" ? "取消管理员"
: "设为管理员" : "设为管理员"
}}</el-button> }}</el-button
<el-button @click=" >
<el-button
@click="
memberRemoveObj = scope.row; memberRemoveObj = scope.row;
memberRemoveDialog = true; memberRemoveDialog = true;
" "
class="danger" class="danger"
type="danger" type="danger"
size="default" size="default"
:disabled="scope.row.roleType == 1 ? true : false">删除</el-button> :disabled="scope.row.roleType == 1 ? true : false"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" <el-button type="primary" @click="memberDialog = false">
@click="memberDialog = false">
关闭 关闭
</el-button> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 二次确认删除弹窗 --> <!-- 二次确认删除弹窗 -->
<el-dialog v-model="memberRemoveDialog" <el-dialog v-model="memberRemoveDialog" title="提示" width="30%" center>
title="提示"
width="30%"
center>
<span> 确定要删除该成员吗?</span> <span> 确定要删除该成员吗?</span>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="memberRemoveDialog = false">取消</el-button> <el-button @click="memberRemoveDialog = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="delmemberRemoveClick()">
@click="delmemberRemoveClick()">
确认 确认
</el-button> </el-button>
</span> </span>
@@ -468,6 +543,7 @@ import {
addMember, addMember,
setManager, setManager,
removeMember, removeMember,
listPartitionInfo,
} from "@/api/noblemanNew/noblemanNew"; } from "@/api/noblemanNew/noblemanNew";
// @ts-ignore // @ts-ignore
import { dateFormat } from "@/utils/system-helper"; import { dateFormat } from "@/utils/system-helper";
@@ -475,7 +551,7 @@ import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
export default { export default {
name: "GuildInfoNew", name: "GuildInfoNew",
data () { data() {
return { return {
loading: false, loading: false,
delDialog: false, delDialog: false,
@@ -485,6 +561,8 @@ export default {
userId: "", userId: "",
referrer: "", referrer: "",
time: "", time: "",
partitionId: "",
partitionArr: [],
}, },
//新增所需对象 //新增所需对象
resource: { resource: {
@@ -533,12 +611,16 @@ export default {
memberRemoveObj: {}, memberRemoveObj: {},
}; };
}, },
created () { created() {
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
this.getData(); this.getData();
});
}, },
methods: { methods: {
// 查询接口 // 查询接口
getData () { getData() {
this.loading = true; this.loading = true;
let time = this.inquire.time; let time = this.inquire.time;
let startTime = ""; let startTime = "";
@@ -551,6 +633,7 @@ export default {
erbanNo: this.inquire.userId, erbanNo: this.inquire.userId,
referrer: this.inquire.referrer, referrer: this.inquire.referrer,
familyName: this.inquire.nick, familyName: this.inquire.nick,
partitionId: this.inquire.partitionId,
// startDate: startTime, // startDate: startTime,
// endDate: endTime, // endDate: endTime,
pageNum: this.currentPage, pageNum: this.currentPage,
@@ -562,7 +645,7 @@ export default {
}); });
}, },
// 打开成员信息弹窗 // 打开成员信息弹窗
memberDialogFun (val) { memberDialogFun(val) {
var than = this; var than = this;
than.memberTitle = `${val.name}】成员信息`; than.memberTitle = `${val.name}】成员信息`;
than.memberNew = val; than.memberNew = val;
@@ -574,7 +657,7 @@ export default {
}); });
}, },
// 二次确认删除成员 // 二次确认删除成员
delmemberRemoveClick () { delmemberRemoveClick() {
removeMember({ removeMember({
guildMemberId: this.memberRemoveObj.guildMemberId, guildMemberId: this.memberRemoveObj.guildMemberId,
}).then((res) => { }).then((res) => {
@@ -600,7 +683,7 @@ export default {
}); });
}, },
// 设置管理员 // 设置管理员
setMemberFun (val) { setMemberFun(val) {
setManager({ setManager({
guildMemberId: val.guildMemberId, guildMemberId: val.guildMemberId,
status: val.roleType == 3 ? true : val.roleType == 2 ? false : null, status: val.roleType == 3 ? true : val.roleType == 2 ? false : null,
@@ -627,7 +710,7 @@ export default {
}); });
}, },
// 新增成员 // 新增成员
addMemberFun () { addMemberFun() {
addMember({ addMember({
erbanNo: this.member.userID, erbanNo: this.member.userID,
guildId: this.memberNew.id, guildId: this.memberNew.id,
@@ -654,7 +737,7 @@ export default {
}); });
}, },
// 打开收款账户弹窗 // 打开收款账户弹窗
payAccountDialogFun (val) { payAccountDialogFun(val) {
this.payAccountTitle = `(${val.ownerNick}【ID:${val.ownerErbanNo}】)的收款账户`; this.payAccountTitle = `(${val.ownerNick}【ID:${val.ownerErbanNo}】)的收款账户`;
this.payAccount.payoneer = val.payAccount.payoneer; this.payAccount.payoneer = val.payAccount.payoneer;
this.payAccount.usdt = val.payAccount.usdt; this.payAccount.usdt = val.payAccount.usdt;
@@ -663,7 +746,7 @@ export default {
this.payAccountNew = val; this.payAccountNew = val;
}, },
// 保存收款账户 // 保存收款账户
payAccountClick () { payAccountClick() {
savePayAccount({ savePayAccount({
id: this.payAccountNew.payAccount.familyId, id: this.payAccountNew.payAccount.familyId,
payPal: this.payAccount.payPal, payPal: this.payAccount.payPal,
@@ -688,7 +771,7 @@ export default {
}); });
}, },
// 导出 // 导出
exportInfoFun () { exportInfoFun() {
let time = this.inquire.time; let time = this.inquire.time;
let startTime = ""; let startTime = "";
let endTime = ""; let endTime = "";
@@ -702,10 +785,10 @@ export default {
familyName: this.inquire.nick, familyName: this.inquire.nick,
// startDate: startTime, // startDate: startTime,
// endDate: endTime, // endDate: endTime,
}).then((res) => { }); }).then((res) => {});
}, },
// 添加 // 添加
add () { add() {
this.addDialog = false; this.addDialog = false;
create({ create({
erbanNo: this.resource.id, erbanNo: this.resource.id,
@@ -728,7 +811,7 @@ export default {
}); });
}, },
// 编辑按钮 // 编辑按钮
ediClick (res) { ediClick(res) {
var obj = res.row; var obj = res.row;
this.ediObj.leaderId = obj.ownerErbanNo; this.ediObj.leaderId = obj.ownerErbanNo;
this.ediObj.leaderNick = obj.ownerNick; this.ediObj.leaderNick = obj.ownerNick;
@@ -740,7 +823,7 @@ export default {
this.editDialog = true; this.editDialog = true;
}, },
// 二次确认弹窗 // 二次确认弹窗
editDialogClick () { editDialogClick() {
console.log(this.ediObj); console.log(this.ediObj);
update({ update({
id: this.ediObj.id, id: this.ediObj.id,
@@ -768,7 +851,7 @@ export default {
}); });
}, },
// 解散按钮 // 解散按钮
delClick () { delClick() {
console.log(this.delDialogData.id); console.log(this.delDialogData.id);
var guildId = this.delDialogData.id; var guildId = this.delDialogData.id;
dismiss({ guildId }).then((res) => { dismiss({ guildId }).then((res) => {
@@ -790,21 +873,21 @@ export default {
this.delDialog = false; this.delDialog = false;
}); });
}, },
beforeAvatarUpload () { beforeAvatarUpload() {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: "上传中~", message: "上传中~",
type: "warning", type: "warning",
}); });
}, },
handleAvatarError () { handleAvatarError() {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: "上传失败!", message: "上传失败!",
type: "error", type: "error",
}); });
}, },
handleAvatarSuccess (res, file) { handleAvatarSuccess(res, file) {
console.log(file); console.log(file);
this.ediObj.imageUrl1 = file.response.data; this.ediObj.imageUrl1 = file.response.data;
ElMessage({ ElMessage({
@@ -823,10 +906,10 @@ export default {
}); });
}, },
// 分页导航 // 分页导航
handleSizeChange () { handleSizeChange() {
this.getData(); this.getData();
}, },
handleCurrentChange () { handleCurrentChange() {
this.getData(); this.getData();
}, },
}, },

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=""
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: "GuildInfoNewCustomerService",
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

@@ -20,6 +20,17 @@
:disabled="tableLoading" :disabled="tableLoading"
> >
<div class="search-line"> <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-form-item label="MoliStar ID" prop="agencyOwnerErbanNo">
<el-input <el-input
v-model.trim="searchForm.agencyOwnerErbanNo" v-model.trim="searchForm.agencyOwnerErbanNo"
@@ -72,7 +83,9 @@
<el-form-item label-width="40px"> <el-form-item label-width="40px">
<el-button type="primary" @click="handSearch">搜索</el-button> <el-button type="primary" @click="handSearch">搜索</el-button>
<el-button type="primary" plain @click="resetSearchForm">重置搜索</el-button> <el-button type="primary" plain @click="resetSearchForm"
>重置搜索</el-button
>
<el-button <el-button
type="primary" type="primary"
class="exportBtn" class="exportBtn"
@@ -103,10 +116,11 @@
v-loading="tableLoading" v-loading="tableLoading"
@header-click="headerCopy" @header-click="headerCopy"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
style="width: 100%;overflow-x: auto;" style="width: 100%; overflow-x: auto"
> >
<el-table-column type="selection"> </el-table-column> <el-table-column type="selection"> </el-table-column>
<el-table-column align="center" prop="erbanNo" label="MoliStar ID" /> <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="nick" label="昵称" />
<el-table-column align="center" prop="accountCountry" label="国家" /> <el-table-column align="center" prop="accountCountry" label="国家" />
<el-table-column <el-table-column
@@ -149,7 +163,12 @@
{{ scope.row.remark ? scope.row.remark : "/" }} {{ scope.row.remark ? scope.row.remark : "/" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="hallSalary" label="操作" width="150"> <el-table-column
align="center"
prop="hallSalary"
label="操作"
width="150"
>
<template v-slot="scope"> <template v-slot="scope">
<div v-if="scope.row.status == 0"> <div v-if="scope.row.status == 0">
<el-button <el-button
@@ -244,6 +263,7 @@ import {
agencyWithdrawBatchSet, agencyWithdrawBatchSet,
batchReject, batchReject,
adminCountry, adminCountry,
listPartitionInfo,
} from "@/api/relAgency/relAgency.js"; } from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination"; import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate"; import { formatDate, formatDateYMD } from "@/utils/relDate";
@@ -282,7 +302,9 @@ export default {
endTime: null, endTime: null,
adminCountry: null, adminCountry: null,
country: null, country: null,
partitionId: null,
}, },
partitionArr: [],
adminCountryArr: [], adminCountryArr: [],
searchRule: { searchRule: {
startTime: [ startTime: [
@@ -334,6 +356,10 @@ export default {
created() { created() {
adminCountry().then((res) => { adminCountry().then((res) => {
this.adminCountryArr = res.data; this.adminCountryArr = res.data;
});
listPartitionInfo().then((res) => {
this.partitionArr = res.data;
this.searchForm.partitionId = this.partitionArr[0].id;
this.getData(); this.getData();
}); });
}, },

View File

@@ -0,0 +1,282 @@
<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>周期</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>ID</span>
<el-input
v-model="inquire.userId"
placeholder=""
class="input"
></el-input>
</div>
<!-- 查询按钮 -->
<el-button
class="primary"
type="primary"
@click="
tableData = [];
currentPage = 1;
isFinished = false;
getData();
"
>查询</el-button
>
<el-button
class="primary"
type="primary"
@click="
this.inquire.userId = '';
this.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="cycleDate" align="center" label="周期" />
<el-table-column prop="familyId" align="center" label="公会ID" />
<el-table-column prop="familyName" align="center" label="公会昵称" />
<el-table-column prop="familyOwnerId" align="center" label="公会长ID" />
<el-table-column
prop="familyOwnerNick"
align="center"
label="公会长昵称"
/>
<el-table-column prop="erbanNo" align="center" label="主播ID" />
<el-table-column prop="nick" align="center" label="主播昵称" />
<el-table-column prop="level" align="center" label="主播等级" />
<el-table-column prop="processNum" align="center" label="钻石流水" />
<el-table-column prop="rewardNum" align="center" label="已获得金币" />
<el-table-column prop="receivedNum" 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="[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>
</template>
<script>
import {
familyMemberWeekLevelRewardPage,
familyMemberWeekLevelRewardExport,
familyMemberWeekLevelRewardListCycleDate,
} from "@/api/relAgency/relAgency";
import { listPartitionInfo } from "@/api/noblemanNew/noblemanNew";
// @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: "weeklyRewards",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
userId: "",
gamesArr: [],
gameArrVal: 1,
partitionId: 1,
partitionArr: [
{ id: 1, desc: "英语区" },
{ id: 2, desc: "阿拉伯" },
],
},
// 表格
tableData: [],
// 分页
total: 0, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
// const timestamps = this.getCurrentWeekTimestamps();
// var obj = {};
// timestamps.forEach((res, i) => {
// this.inquire.gamesArr[i] = {
// gameName: dateFormat(res, "yyyy-MM-dd"),
// gameId: dateFormat(res, "yyyy-MM-dd"),
// };
// });
// this.inquire.gameArrVal = this.inquire.gamesArr[0].gameId;
familyMemberWeekLevelRewardListCycleDate().then((res) => {
if (res.code == 200) {
res.data.forEach((res, i) => {
this.inquire.gamesArr[i] = {
gameName: `${dateFormat(res.startDate, "yyyy-MM-dd")}~${dateFormat(
res.endDate,
"yyyy-MM-dd"
)}`,
gameId: res.dateCycle,
};
});
this.inquire.gameArrVal = this.inquire.gamesArr[0].gameId;
this.getData();
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
// listPartitionInfo().then((res) => {
// this.inquire.partitionArr = res.data;
// this.inquire.partitionId = this.inquire.partitionArr[0].id;
// this.getData();
// });
},
methods: {
// 查询接口
getData() {
this.isLoading = true;
this.loading = true;
familyMemberWeekLevelRewardPage({
cycleDate: this.inquire.gameArrVal,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
partitionId: this.inquire.partitionId,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.rows;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
this.isLoading = false;
});
},
getCurrentWeekTimestamps() {
const today = new Date();
const dayOfWeek = today.getDay(); // 0周日到6周六
// 计算到周一的天数差:周日需-6天其他天减(当前星期数 - 1)
const diffToMonday = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
const monday = new Date(today);
monday.setDate(monday.getDate() + diffToMonday);
monday.setHours(0, 0, 0, 0); // 设置为周一的0点
const weekTimestamps = [];
for (let i = 0; i < 7; i++) {
const date = new Date(monday);
date.setDate(monday.getDate() + i);
weekTimestamps.push(date.getTime());
}
return weekTimestamps; // 包含周一到周日每天0点的时间戳数组
},
// 导出
confirmExport2Excel() {
familyMemberWeekLevelRewardExport({
cycleDate: this.inquire.gameArrVal,
erbanNo: this.inquire.userId,
partitionId: this.inquire.partitionId,
}).then();
},
// 分页导航
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;
}
.pagination {
margin: 10px auto 10px;
position: relative;
left: 50%;
transform: translateX(-50%);
}
.pagination_in {
text-align: center;
}
</style>

View File

@@ -73,6 +73,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br> <input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br> <input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br> <input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -93,6 +94,12 @@
<input type="text" class="form-control" name="headwearName" id="headwearEnName"> <input type="text" class="form-control" name="headwearName" id="headwearEnName">
</div> </div>
</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"> <div class="form-group">
<label class="col-sm-3 control-label">使用萝卜购买</label> <label class="col-sm-3 control-label">使用萝卜购买</label>
<div class="col-sm-9"> <div class="col-sm-9">
@@ -385,6 +392,7 @@ export default {
{field: 'name.zh', title: '头饰名称', align: 'center', width: '5%'}, {field: 'name.zh', title: '头饰名称', align: 'center', width: '5%'},
{field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%'}, {field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%'},
{field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%'}, {field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%'},
{field: 'name.tr', title: '土耳其头饰名称', align: 'center', width: '5%'},
{ {
field: 'partitionFlag', field: 'partitionFlag',
title: '地区', title: '地区',
@@ -401,6 +409,9 @@ export default {
if ((val & 4) != 0) { if ((val & 4) != 0) {
value += '华语区<br>'; value += '华语区<br>';
} }
if ((val & 8) != 0) {
value += '土耳其<br>';
}
return value; return value;
} }
}, },
@@ -643,6 +654,7 @@ export default {
$("#headwearName").val(""); $("#headwearName").val("");
$("#headwearArName").val(""); $("#headwearArName").val("");
$("#headwearEnName").val(""); $("#headwearEnName").val("");
$("#headwearTrName").val("");
$("#price").val(""); $("#price").val("");
$("#renewPrice").val(""); $("#renewPrice").val("");
$("#originalPrice").val(""); $("#originalPrice").val("");
@@ -688,8 +700,9 @@ export default {
var headwearName = $("#headwearName").val(); var headwearName = $("#headwearName").val();
var headwearArName = $("#headwearArName").val(); var headwearArName = $("#headwearArName").val();
var headwearEnName = $("#headwearEnName").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); const nameValue = JSON.stringify(jsonName);
var price = $("#price").val(); var price = $("#price").val();
var renewPrice = $("#renewPrice").val(); var renewPrice = $("#renewPrice").val();
@@ -825,10 +838,12 @@ export default {
$("#headwearName").val(jsonName.zh); $("#headwearName").val(jsonName.zh);
$("#headwearArName").val(jsonName.ar); $("#headwearArName").val(jsonName.ar);
$("#headwearEnName").val(jsonName.en); $("#headwearEnName").val(jsonName.en);
$("#headwearTrName").val(jsonName.tr);
} else { } else {
$("#headwearName").val(name); $("#headwearName").val(name);
$("#headwearArName").val(name); $("#headwearArName").val(name);
$("#headwearEnName").val(name); $("#headwearEnName").val(name);
$("#headwearTrName").val(name);
} }
$("#price").val(json.price); $("#price").val(json.price);

File diff suppressed because it is too large Load Diff

View File

@@ -12,9 +12,9 @@
> >
<el-option <el-option
v-for="item in inquire.options" v-for="item in inquire.options"
:key="item.type" :key="item.id"
:label="item.name" :label="item.desc"
:value="item.type" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
@@ -31,6 +31,11 @@
</el-date-picker> </el-date-picker>
</div> </div>
</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"> <div class="but">
<el-button class="primary" type="primary" @click="getData()" <el-button class="primary" type="primary" @click="getData()"
@@ -134,7 +139,7 @@
</div> </div>
</template> </template>
<script> <script>
import { personal, updateUserMulti } from "@/api/luckGift/luckGift"; import { personal, updateUserMulti,listPartitionInfo } from "@/api/luckGift/luckGift";
// @ts-ignore // @ts-ignore
import { dateFormat } from "@/utils/system-helper"; import { dateFormat } from "@/utils/system-helper";
// @ts-ignore // @ts-ignore
@@ -145,25 +150,15 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
totalInput: 0,
totalOutput: 0,
totalProductionRatio: 0,
//查询所需条件对象 //查询所需条件对象
inquire: { inquire: {
userId: "", userId: "",
time: "", time: "",
value: 2, value: "",
options: [ options: [],
{
name: "阿拉伯区",
type: 2,
},
{
name: "英语区",
type: 1,
},
{
name: "华语区",
type: 4,
},
],
}, },
// 表格 // 表格
tableData: [], tableData: [],
@@ -177,16 +172,21 @@ export default {
}; };
}, },
created() { created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.value = this.inquire.options[0].id;
});
// this.getData(); // this.getData();
}, },
methods: { methods: {
// 查询接口 // 查询接口
getData() { getData() {
this.butClick = false;
console.log(dateFormat(this.inquire.time, "yyyy-MM-dd")); console.log(dateFormat(this.inquire.time, "yyyy-MM-dd"));
if (!this.inquire.time) { if (!this.inquire.time && this.inquire.userId == '') {
ElMessage({ ElMessage({
showClose: true, showClose: true,
message: "请选择时间", message: "时间和ID至少填一项",
type: "error", type: "error",
}); });
return; return;
@@ -196,12 +196,16 @@ export default {
erbanNo: this.inquire.userId, erbanNo: this.inquire.userId,
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
startDate: dateFormat(this.inquire.time, "yyyy-MM-dd"), date: this.inquire.time
endDate: dateFormat(this.inquire.time, "yyyy-MM-dd"), ? dateFormat(this.inquire.time, "yyyy-MM-dd")
: null,
partitionId: this.inquire.value, partitionId: this.inquire.value,
}).then((res) => { }).then((res) => {
this.total = res.data.total; this.total = res.data.dataPage.total;
this.tableData = res.data.rows; this.tableData = res.data.dataPage.rows;
this.totalInput = res.data.totalInput;
this.totalOutput = res.data.totalOutput;
this.totalProductionRatio = res.data.totalProductionRatio;
this.loading = false; this.loading = false;
}); });
}, },

View File

@@ -7,19 +7,19 @@
<el-select v-model="inquire.value" placeholder="请选择"> <el-select v-model="inquire.value" placeholder="请选择">
<el-option <el-option
v-for="item in inquire.options" v-for="item in inquire.options"
:key="item.value" :key="item.id"
:label="item.label" :label="item.desc"
:value="item.value" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<!-- 时间 --> <!-- 时间 -->
<div class="inquire"> <!-- <div class="inquire">
<span>时间</span> <span>时间</span>
<el-date-picker v-model="inquire.time" type="date" placeholder="请选择"> <el-date-picker v-model="inquire.time" type="date" placeholder="请选择">
</el-date-picker> </el-date-picker>
</div> </div> -->
</div> </div>
<!-- 按钮 --> <!-- 按钮 -->
<div class="but"> <div class="but">
@@ -27,7 +27,9 @@
>查询 >查询
</el-button> </el-button>
</div> </div>
<el-button type="text">数组出金币总额{{ totalInput }}</el-button>
<el-button type="text">数组出返币总额{{ totalOutput }}</el-button>
<el-button type="text">投产比{{ totalProductionRatio }}</el-button>
<!-- 表格 --> <!-- 表格 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
@@ -38,26 +40,21 @@
<el-table-column prop="date" align="center" label="日期" /> <el-table-column prop="date" align="center" label="日期" />
<el-table-column prop="totalInput" align="center" label="进入" /> <el-table-column prop="totalInput" align="center" label="进入" />
<el-table-column prop="totalOutput" align="center" label="退出" /> <el-table-column prop="totalOutput" align="center" label="退出" />
<el-table-column prop="x" align="center" label="退出/进入比例" <el-table-column
><template v-slot="scope"> prop="productionRatio"
{{ (scope.row.totalOutput / scope.row.totalInput).toFixed(4) }} align="center"
</template> label="退出/进入比例"
</el-table-column> />
<el-table-column prop="num" align="center" label="参与次数" /> <el-table-column prop="num" align="center" label="参与次数" />
<el-table-column prop="count" align="center" label="参与人数" /> <el-table-column prop="count" align="center" label="参与人数" />
<el-table-column prop="winCount" align="center" label="得到人数" /> <el-table-column prop="winCount" align="center" label="得到人数" />
<el-table-column prop="winNum" align="center" label="得到次数" /> <el-table-column prop="winNum" align="center" label="得到次数" />
<el-table-column prop="winRate" align="center" label="得到率" <el-table-column prop="winRate" align="center" label="得到率" />
><template v-slot="scope">
{{ scope.row.winRate ? scope.row.winRate : "-" }}
</template>
</el-table-column>
<el-table-column prop="stock" align="center" label="数组库存" />
</el-table> </el-table>
</div> </div>
</template> </template>
<script> <script>
import { platform } from "@/api/luckGift/luckGift"; import { platform,listPartitionInfo } from "@/api/luckGift/luckGift";
// @ts-ignore // @ts-ignore
import { dateFormat } from "@/utils/system-helper"; import { dateFormat } from "@/utils/system-helper";
// @ts-ignore // @ts-ignore
@@ -68,23 +65,13 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
totalInput: "0",
totalOutput: "0",
totalProductionRatio: "0",
//查询所需条件对象 //查询所需条件对象
inquire: { inquire: {
value: 2, value: "",
options: [ options: [],
{
value: 2,
label: "阿拉伯区",
},
{
value: 1,
label: "英语区",
},
{
value: 4,
label: "华语区",
},
],
time: "", time: "",
}, },
// 表格 // 表格
@@ -96,31 +83,24 @@ export default {
}; };
}, },
created() { created() {
listPartitionInfo().then((res) => {
this.inquire.options = res.data;
this.inquire.value = this.inquire.options[0].id;
});
// this.getData(); // this.getData();
}, },
methods: { methods: {
// 查询接口 // 查询接口
getData() { getData() {
console.log(dateFormat(this.inquire.time, "yyyy-MM-dd"));
if (!this.inquire.time) {
ElMessage({
showClose: true,
message: "请选择时间",
type: "error",
});
return;
}
this.loading = true; this.loading = true;
platform({ platform({
erbanNo: this.inquire.userId,
startDate: dateFormat(this.inquire.time, "yyyy-MM-dd"),
endDate: dateFormat(this.inquire.time, "yyyy-MM-dd"),
partitionId: this.inquire.value, partitionId: this.inquire.value,
}).then((res) => { }).then((res) => {
this.total = res.data.total; this.totalInput = res.data.totalInput;
this.tableData = res.data; this.totalOutput = res.data.totalOutput;
this.totalProductionRatio = res.data.totalProductionRatio;
this.tableData = res.data.dataList;
this.loading = false; this.loading = false;
console.log(this.tableData, 123);
}); });
}, },
// 分页导航 // 分页导航

View File

@@ -357,6 +357,10 @@ export default {
name: "华语区", name: "华语区",
type: 4, type: 4,
}, },
{
name: "土耳其区",
type: 8,
},
], ],
comparisonValue: "", comparisonValue: "",
goldInventory: "", goldInventory: "",

View File

@@ -48,6 +48,9 @@
<el-table-column prop="name" align="center" label="勋章名称-阿语区"> <el-table-column prop="name" align="center" label="勋章名称-阿语区">
<template v-slot="scope">{{ JSON.parse(scope.row.name).ar }}</template> <template v-slot="scope">{{ JSON.parse(scope.row.name).ar }}</template>
</el-table-column> </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 <el-table-column
align="center" align="center"
prop="picUrl" prop="picUrl"
@@ -182,6 +185,19 @@
class="input" class="input"
></el-input> ></el-input>
</div> </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"> <div style="margin-bottom: 25px; margin-top: 10px; display: flex">
@@ -198,10 +214,7 @@
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
:on-error="handleAvatarError" :on-error="handleAvatarError"
> >
<img <img :src="controlsObj.imageUrl1" class="avatar" />
:src="controlsObj.imageUrl1"
class="avatar"
/>
</el-upload> </el-upload>
</div> </div>
@@ -349,6 +362,7 @@ export default {
nickZh: "", nickZh: "",
nickEn: "", nickEn: "",
nickAr: "", nickAr: "",
nickTr: "",
imageUrl1: "", imageUrl1: "",
value2: "", value2: "",
options2: [ options2: [
@@ -419,6 +433,7 @@ export default {
this.controlsObj.nickZh = ""; this.controlsObj.nickZh = "";
this.controlsObj.nickEn = ""; this.controlsObj.nickEn = "";
this.controlsObj.nickAr = ""; this.controlsObj.nickAr = "";
this.controlsObj.nickTr = "";
this.controlsObj.imageUrl1 = ""; this.controlsObj.imageUrl1 = "";
this.controlsObj.value2 = ""; this.controlsObj.value2 = "";
this.controlsDialog = true; this.controlsDialog = true;
@@ -431,6 +446,7 @@ export default {
this.controlsObj.nickZh = JSON.parse(val.name).zh; this.controlsObj.nickZh = JSON.parse(val.name).zh;
this.controlsObj.nickEn = JSON.parse(val.name).en; this.controlsObj.nickEn = JSON.parse(val.name).en;
this.controlsObj.nickAr = JSON.parse(val.name).ar; this.controlsObj.nickAr = JSON.parse(val.name).ar;
this.controlsObj.nickTr = JSON.parse(val.name).tr;
this.controlsObj.imageUrl1 = val.picUrl; this.controlsObj.imageUrl1 = val.picUrl;
this.controlsObj.value2 = val.enable; this.controlsObj.value2 = val.enable;
this.controlsObj.id = val.id; this.controlsObj.id = val.id;
@@ -452,6 +468,7 @@ export default {
zh: this.controlsObj.nickZh, zh: this.controlsObj.nickZh,
en: this.controlsObj.nickEn, en: this.controlsObj.nickEn,
ar: this.controlsObj.nickAr, ar: this.controlsObj.nickAr,
tr: this.controlsObj.nickTr,
}); });
obj.picUrl = this.controlsObj.imageUrl1; obj.picUrl = this.controlsObj.imageUrl1;
obj.enable = this.controlsObj.value2; obj.enable = this.controlsObj.value2;
@@ -480,6 +497,7 @@ export default {
zh: this.controlsObj.nickZh, zh: this.controlsObj.nickZh,
en: this.controlsObj.nickEn, en: this.controlsObj.nickEn,
ar: this.controlsObj.nickAr, ar: this.controlsObj.nickAr,
tr: this.controlsObj.nickTr,
}); });
obj1.picUrl = this.controlsObj.imageUrl1; obj1.picUrl = this.controlsObj.imageUrl1;
obj1.enable = this.controlsObj.value2; obj1.enable = this.controlsObj.value2;
@@ -535,32 +553,51 @@ export default {
//1 2 4 //1 2 4
var val = 0; var val = 0;
if (type == 2) { if (type == 2) {
if (num == 0 || num == 7) { if (num == 0 || num == 15) {
val = [4, 1, 2]; val = [1, 2, 4, 8];
}
if (num == 0 || num == 15) {
val = [1, 2, 4, 8];
} else if (num == 1) { } else if (num == 1) {
val = [1]; val = [1];
} else if (num == 3) { } else if (num == 3) {
val = [1, 2]; val = [1, 2];
} else if (num == 7) {
val = [1, 2, 4];
} else if (num == 2) { } else if (num == 2) {
val = [2]; val = [2];
} else if (num == 6) { } else if (num == 6) {
val = [2, 4]; val = [2, 4];
} else if (num == 14) {
val = [2, 4, 8];
} else if (num == 4) { } else if (num == 4) {
val = [4]; val = [4];
} else if (num == 12) {
val = [4, 8];
} else if (num == 8) {
val = [8];
} }
} else { } else {
if (num == 0 || num == 7) { if (num == 0 || num == 15) {
val = "华语区、英语区、阿语区"; val = "英语区、阿语区、华语区、土耳其区";
} else if (num == 1) { } else if (num == 1) {
val = "英语区"; val = "英语区";
} else if (num == 3) { } else if (num == 3) {
val = "英语区、阿语区"; val = "英语区、阿语区";
} else if (num == 7) {
val = "英语区、阿语区、华语区";
} else if (num == 2) { } else if (num == 2) {
val = "阿语区"; val = "阿语区";
} else if (num == 6) { } else if (num == 6) {
val = "阿语区、华语区"; val = "阿语区、华语区";
} else if (num == 14) {
val = "阿语区、华语区、土耳其区";
} else if (num == 4) { } else if (num == 4) {
val = "华语区"; val = "华语区";
} else if (num == 12) {
val = "华语区、土耳其区";
} else if (num == 8) {
val = "土耳其区";
} }
} }
return val; return val;

View File

@@ -74,6 +74,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br> <input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br> <input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br> <input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -103,6 +104,12 @@
<input type="text" class="form-control validate[required]" name="name1" id="en_name1" placeholder="请输入,5个字符内"> <input type="text" class="form-control validate[required]" name="name1" id="en_name1" placeholder="请输入,5个字符内">
</div> </div>
</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"> <div class="form-group">
<label class="col-sm-4 control-label">用户自定义文案:</label> <label class="col-sm-4 control-label">用户自定义文案:</label>
<div class="col-sm-6"> <div class="col-sm-6">
@@ -129,6 +136,12 @@
<input type="text" class="form-control" name="enFixedWord" id="enFixedWord"> <input type="text" class="form-control" name="enFixedWord" id="enFixedWord">
</div> </div>
</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>
<div class="form-group"> <div class="form-group">
<label for="days" class="col-sm-4 control-label">有效期:</label> <label for="days" class="col-sm-4 control-label">有效期:</label>
@@ -247,6 +260,7 @@ export default {
{field: 'name.zh', title: '铭牌名称', align: 'middle', width: '5%'}, {field: 'name.zh', title: '铭牌名称', align: 'middle', width: '5%'},
{field: 'name.ar', title: '阿语铭牌名称', align: 'middle', width: '5%'}, {field: 'name.ar', title: '阿语铭牌名称', align: 'middle', width: '5%'},
{field: 'name.en', title: '英语铭牌名称', align: 'middle', width: '5%'}, {field: 'name.en', title: '英语铭牌名称', align: 'middle', width: '5%'},
{field: 'name.tr', title: '土耳其名称', align: 'middle', width: '5%'},
{ {
field: 'partitionFlag', field: 'partitionFlag',
title: '地区', title: '地区',
@@ -263,6 +277,9 @@ export default {
if ((val & 4) != 0) { if ((val & 4) != 0) {
value += '华语区<br>'; value += '华语区<br>';
} }
if ((val & 8) != 0) {
value += '土耳其区<br>';
}
return value; return value;
} }
}, },
@@ -320,6 +337,19 @@ export default {
} }
} }
}, },
{
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: 'days', title: '有效期(天)', align: 'middle', width: '5%' },
{ field: 'statusStr', title: '状态', align: 'middle', width: '5%' }, { field: 'statusStr', title: '状态', align: 'middle', width: '5%' },
{ field: 'typeStr', title: '铭牌款式', align: 'middle', width: '5%' }, { field: 'typeStr', title: '铭牌款式', align: 'middle', width: '5%' },
@@ -454,10 +484,12 @@ export default {
$("#name1").val(jsonName.zh); $("#name1").val(jsonName.zh);
$("#ar_name1").val(jsonName.ar); $("#ar_name1").val(jsonName.ar);
$("#en_name1").val(jsonName.en); $("#en_name1").val(jsonName.en);
$("#tr_name1").val(jsonName.tr);
} else { } else {
$("#name1").val(name); $("#name1").val(name);
$("#ar_name1").val(name); $("#ar_name1").val(name);
$("#en_name1").val(name); $("#en_name1").val(name);
$("#tr_name1").val(name);
} }
let fixedWord = json.fixedWord; let fixedWord = json.fixedWord;
if (fixedWord && fixedWord.startsWith('{') && fixedWord.endsWith('}')) { if (fixedWord && fixedWord.startsWith('{') && fixedWord.endsWith('}')) {
@@ -465,10 +497,12 @@ export default {
$('#zhFixedWord').val(jsonValue.zh); $('#zhFixedWord').val(jsonValue.zh);
$('#arFixedWord').val(jsonValue.ar); $('#arFixedWord').val(jsonValue.ar);
$('#enFixedWord').val(jsonValue.en); $('#enFixedWord').val(jsonValue.en);
$('#trFixedWord').val(jsonValue.tr);
} else { } else {
$('#zhFixedWord').val(fixedWord); $('#zhFixedWord').val(fixedWord);
$('#arFixedWord').val(fixedWord); $('#arFixedWord').val(fixedWord);
$('#enFixedWord').val(fixedWord); $('#enFixedWord').val(fixedWord);
$('#trFixedWord').val(fixedWord);
} }
$('#nameplateType1').attr("disabled", "true"); $('#nameplateType1').attr("disabled", "true");
if (!json.isCustomWord) { if (!json.isCustomWord) {
@@ -477,6 +511,7 @@ export default {
$('#zhFixedWord').val(''); $('#zhFixedWord').val('');
$('#arFixedWord').val(''); $('#arFixedWord').val('');
$('#enFixedWord').val(''); $('#enFixedWord').val('');
$('#trFixedWord').val('');
} else { } else {
$('input[name="isCustomWord"]').get(1).checked = true; $('input[name="isCustomWord"]').get(1).checked = true;
$('#fixedWord-div').removeClass("hidden"); $('#fixedWord-div').removeClass("hidden");
@@ -553,17 +588,19 @@ export default {
var zhFixedWord = $('#zhFixedWord').val(); var zhFixedWord = $('#zhFixedWord').val();
var arFixedWord = $('#arFixedWord').val(); var arFixedWord = $('#arFixedWord').val();
var enFixedWord = $('#enFixedWord').val(); var enFixedWord = $('#enFixedWord').val();
var trFixedWord = $('#trFixedWord').val();
let fixedWordValue = ''; let fixedWordValue = '';
if (!(zhFixedWord == '' && arFixedWord == '' && enFixedWord == '')) { if (!(zhFixedWord == '' && arFixedWord == '' && enFixedWord == '' && trFixedWord=="")) {
let jsonFixedWord = {'zh': zhFixedWord, 'ar': arFixedWord, 'en': enFixedWord}; let jsonFixedWord = {'zh': zhFixedWord, 'ar': arFixedWord, 'en': enFixedWord,'tr':trFixedWord};
fixedWordValue = JSON.stringify(jsonFixedWord); fixedWordValue = JSON.stringify(jsonFixedWord);
} }
var isCustomWord = $('input[name="isCustomWord"]:checked').val(); var isCustomWord = $('input[name="isCustomWord"]:checked').val();
var name = $('#name1').val(); var name = $('#name1').val();
var ar_name = $('#ar_name1').val(); var ar_name = $('#ar_name1').val();
var en_name = $('#en_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); const nameValue = JSON.stringify(jsonName);
var nameplateType = $('#nameplateType1').val(); var nameplateType = $('#nameplateType1').val();
var id = $('#id').val(); var id = $('#id').val();
@@ -771,12 +808,14 @@ function cleanNamePlateModal() {
$('#zhFixedWord').val(''); $('#zhFixedWord').val('');
$('#arFixedWord').val(''); $('#arFixedWord').val('');
$('#enFixedWord').val(''); $('#enFixedWord').val('');
$('#trFixedWord').val('');
$('input[name="isCustomWord"]').each(function () { $('input[name="isCustomWord"]').each(function () {
$(this).removeAttr("checked"); $(this).removeAttr("checked");
}); });
$('#name1').val(''); $('#name1').val('');
$('#ar_name1').val(''); $('#ar_name1').val('');
$('#en_name1').val(''); $('#en_name1').val('');
$('#tr_name1').val('');
$('#nameplateType1').val(''); $('#nameplateType1').val('');
$('#name1').removeAttr("readonly"); $('#name1').removeAttr("readonly");
$('#nameplateType1').removeAttr("disabled"); $('#nameplateType1').removeAttr("disabled");

View File

@@ -3,13 +3,24 @@
<!-- 时间选择器 --> <!-- 时间选择器 -->
<div class="inquire"> <div class="inquire">
<div class="block"> <div class="block">
<span class="demonstration">日期</span> <span class="demonstration">开始时间</span>
<el-date-picker <el-date-picker
v-model="inquire.time" v-model="inquire.time[0]"
type="daterange" type="date"
range-separator="" placeholder="开始时间"
start-placeholder="开始日期" format="YYYY-MM-DD 00:00:00"
end-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="date"
placeholder="结束时间"
format="YYYY-MM-DD 23:59:59"
> >
</el-date-picker> </el-date-picker>
</div> </div>
@@ -193,11 +204,24 @@ export default {
getData() { getData() {
this.loading = true; this.loading = true;
let time = this.inquire.time; let time = this.inquire.time;
let startTime = ""; let startTime = null;
let endTime = ""; let endTime = null;
if (time && time.length > 0) { if (time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss"); startTime = this.inquire.time[0]
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss"); ? dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00")
: null;
endTime = this.inquire.time[1]
? dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59")
: null;
}
if (!startTime || !endTime) {
ElMessage({
showClose: true,
message: "请输入开始时间和结束时间",
type: "error",
});
this.loading = false;
return;
} }
incomePageFamily({ incomePageFamily({
erbanNo: this.inquire.id, erbanNo: this.inquire.id,
@@ -208,9 +232,18 @@ export default {
pageNum: this.currentPage, pageNum: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
}).then((res) => { }).then((res) => {
if (res.code == 200) {
this.total = res.data.total; this.total = res.data.total;
this.tableData = res.data.rows; this.tableData = res.data.rows;
this.loading = false; this.loading = false;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
}); });
}, },
// 导出总外列表 // 导出总外列表

View File

@@ -133,6 +133,38 @@
</el-table-column> </el-table-column>
<!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" /> <!-- <el-table-column prop="goldIncome" align="center" label="金币总收入" />
<el-table-column prop="diamondRemain" align="center" label="钻石总收入" /> --> <el-table-column prop="diamondRemain" 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"> <el-table-column align="center" label="操作" width="300">
<template v-slot="scope"> <template v-slot="scope">

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,368 @@
<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>
<!-- guildContact -->
<el-table-column
prop=""
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: "newGuildApplicationCustomerService",
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,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

@@ -9,31 +9,92 @@
<!-- .content --> <!-- .content -->
<div id="table"></div> <div id="table"></div>
<div id="toolbar"> <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"> <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"> <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> </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"> <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> </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"> <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> <option value="" selected="selected">全部</option>
</select> </select>
</div> </div>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<label for="startTime" class="col-sm-2 control-label">时间:</label> <label for="startTime" class="col-sm-2 control-label"
<div class="col-sm-3"><input type="text" class="form-control" name="startTime" id="startTime"> >时间:</label
>
<div class="col-sm-3">
<input
type="text"
class="form-control"
name="startTime"
id="startTime"
/>
</div> </div>
<label for="endTime" class="col-sm-1 control-label">-</label> <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> </div>
</form> </form>
<div id="mapObjHtml" style="display:none">
<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"> <button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询 <i class="glyphicon glyphicon-search"></i>查询
</button> </button>
@@ -47,7 +108,7 @@
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
export default { export default {
name: "RechargeDiamondGiveDetailView", name: "RechargeDiamondGiveDetailView",
@@ -63,38 +124,110 @@ export default {
initData() { initData() {
$(function () { $(function () {
userRegion(); userRegion();
$('#table').bootstrapTable('destroy'); $("#table").bootstrapTable("destroy");
$('#table').bootstrapTable({ 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").datetimepicker("getDate");
picker2.datetimepicker("setStartDate", date);
});
picker2.on("changeDate", function () {
var date = $("#endTime").datetimepicker("getDate");
picker1.datetimepicker("setEndDate", date);
});
//导出功能
$("#btnExport").on("click", function () {
$("#searchForm").submit();
});
// 查询刷新
$("#btnSearch").on("click", function () {
$("#table").bootstrapTable({
columns: [ 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', field: "createTime",
title: '转出人所属代充地区', title: "时间",
align: 'center', align: "center",
width: '5%', 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) { formatter: function (val, row, index) {
var value = ''; var value = "";
if (val) { if (val) {
var array = val.split(','); var array = val.split(",");
for (let i = 0, len = array.length; i < len; i++) { for (let i = 0, len = array.length; i < len; i++) {
var region = array[i]; var region = array[i];
value += region; value += region;
if (i != len - 1) { if (i != len - 1) {
value += '<br/>'; value += "<br/>";
} }
} }
} }
return value; 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: "toErBanNo",
{ field: 'inviteCode', title: '收入人填写的邀请码', align: 'center', width: '5%' }, title: "收入人peko id",
{ field: 'diamondNum', title: '转赠数额', align: 'center', width: '5%' }, 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, cache: false,
striped: true, striped: true,
@@ -107,55 +240,34 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder //设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order //设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined", queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数 queryParams: function queryParams(params) {
//设置查询参数
var param = { var param = {
page: params.pageNumber, page: params.pageNumber,
pageSize: params.pageSize, pageSize: params.pageSize,
fromErBanNo: $('#fromErBanNo').val(), fromErBanNo: $("#fromErBanNo").val(),
toErBanNo: $('#toErBanNo').val(), toErBanNo: $("#toErBanNo").val(),
toRegion: $('#toRegion').val(), toRegion: $("#toRegion").val(),
startTime: $('#startTime').val(), startTime: $("#startTime").val(),
endTime: $('#endTime').val(), endTime: $("#endTime").val(),
}; };
return param; return param;
}, },
toolbar: '#toolbar', toolbar: "#toolbar",
url: '/admin/recharge/user/give/dayDetailPage', url: "/admin/recharge/user/give/dayDetailPage",
onLoadSuccess: function () { //加载成功时执行 onLoadSuccess: function (res) {
console.log("load success"); //加载成功时执行
console.log();
$("#mapObjHtml .b1").text(res.totalMap.totalDiamondNum);
$("#mapObjHtml .b2").text(res.totalMap.totalDiamondNum4Normal);
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () {
//加载失败时执行
console.log("load fail"); console.log("load fail");
} },
}); });
TableHelper.doRefresh("#table");
var picker1 = $("#startTime").datetimepicker({ $('#mapObjHtml').show();
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').datetimepicker('getDate');
picker2.datetimepicker('setStartDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endTime').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
//导出功能
$("#btnExport").on('click', function () {
$("#searchForm").submit();
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
}); });
//用户地区 //用户地区
@@ -167,12 +279,12 @@ export default {
dataType: "json", dataType: "json",
async: false, async: false,
success: function (json) { success: function (json) {
if (json.success == 'true' || json.code == 200) { if (json.success == "true" || json.code == 200) {
array = json.data; array = json.data;
} }
} },
}); });
var $select = $('#toRegion'); var $select = $("#toRegion");
for (let i = 0; i < array.length; i++) { for (let i = 0; i < array.length; i++) {
var value = array[i]; var value = array[i];
var $option = $('<option value="' + value + '" />'); var $option = $('<option value="' + value + '" />');
@@ -181,9 +293,8 @@ export default {
} }
} }
}); });
}
}, },
},
}; };
</script> </script>

View File

@@ -10,12 +10,33 @@
<div id="table"></div> <div id="table"></div>
<div id="toolbar"> <div id="toolbar">
<div class="col-sm-12"> <div class="col-sm-12">
<label for="searchValue" class="col-sm-3 control-label">Peko ID:</label> <label for="searchValue" class="col-sm-1 control-label">ID:</label>
<div class="col-sm-3"><input type="text" class="form-control" name="searchValue" id="searchValue"> <div class="col-sm-2">
<input
type="text"
class="form-control"
name="searchValue"
id="searchValue"
/>
</div> </div>
<label for="searchType" class="col-sm-3 control-label">:</label> <label for="partitionId" class="col-sm-1 control-label">:</label>
<div class="col-sm-3"> <div class="col-sm-2">
<select name="searchType" id="searchType" data-btn-class="btn-warning" class="form-control"> <select
name="partitionId"
id="partitionId"
data-btn-class="btn-warning"
class="form-control"
>
</select>
</div>
<label for="searchType" class="col-sm-1 control-label">地区:</label>
<div class="col-sm-2">
<select
name="searchType"
id="searchType"
data-btn-class="btn-warning"
class="form-control"
>
<option value="0" selected="selected">全部</option> <option value="0" selected="selected">全部</option>
</select> </select>
</div> </div>
@@ -33,12 +54,23 @@
</div> </div>
</section> </section>
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"> <div
class="modal fade"
id="editModal"
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-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button
aria-hidden="true">&times;</span> type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="modalLabel">代充信息</h4> <h4 class="modal-title" id="modalLabel">代充信息</h4>
</div> </div>
@@ -46,9 +78,26 @@
<form class="form-horizontal"> <form class="form-horizontal">
<input type="hidden" name="id" id="id" /> <input type="hidden" name="id" id="id" />
<div class="form-group"> <div class="form-group">
<label for="erbanNo" class="col-sm-3 control-label">Peko ID</label> <label for="erbanNo" class="col-sm-3 control-label"
>Peko ID</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control" id="erbanNo"> <input type="text" class="form-control" id="erbanNo" />
</div>
</div>
<div class="form-group">
<label for="starLevel" class="col-sm-3 control-label"
>信誉值:</label
>
<div class="col-sm-9">
<select name="starLevel" id="starLevel">
<option value="">-- 请选择 --</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -57,14 +106,22 @@
</form> </form>
</div> </div>
<div class="modal-footer"> <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="save">确认</button> <button type="button" class="btn btn-primary" id="save">确认</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<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-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -77,8 +134,9 @@
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
var partitionArray;
var regionArray; var regionArray;
export default { export default {
name: "RechargeUserView", name: "RechargeUserView",
@@ -89,7 +147,9 @@ export default {
return; return;
} }
var $input = $(obj); var $input = $(obj);
const typeArray = $("input:checkbox[name='type']:checked").serializeArray(); const typeArray = $(
"input:checkbox[name='type']:checked"
).serializeArray();
if (!typeArray) { if (!typeArray) {
return; return;
} }
@@ -104,17 +164,17 @@ export default {
break; break;
} }
} }
var $seq = $('#seq' + type); var $seq = $("#seq" + type);
if (isCheck) { if (isCheck) {
$seq.removeAttr('readonly'); $seq.removeAttr("readonly");
} else { } else {
$seq.attr('readonly', 'true'); $seq.attr("readonly", "true");
} }
} }
} }
window.editSeqText = editSeqText; window.editSeqText = editSeqText;
return { return {
editSeqText editSeqText,
}; };
}, },
created() { created() {
@@ -125,21 +185,40 @@ export default {
methods: { methods: {
initData() { initData() {
$(function () { $(function () {
//分区
partitionArray = listPartitionInfo();
//地区 //地区
regionArray = chargeRegion(); regionArray = chargeRegion();
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({ $("#table").bootstrapTable("destroy");
$("#table").bootstrapTable({
columns: [ columns: [
{ field: 'erbanNo', title: 'Peko ID', align: 'center', width: '5%' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'createTime', title: '首次加入代充时间', align: 'center', width: '5%' },
{ {
field: 'type', field: "erbanNo",
title: '地区', title: "Peko ID",
align: 'center', align: "center",
width: '5%', width: "5%",
},
{ field: "nick", title: "昵称", align: "center", width: "5%" },
{
field: "starLevel",
title: "信誉值",
align: "center",
width: "5%",
},
{
field: "createTime",
title: "首次加入代充时间",
align: "center",
width: "5%",
},
{
field: "type",
title: "地区",
align: "center",
width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
var value = ''; var value = "";
if (regionArray) { if (regionArray) {
for (var i = 0, len = regionArray.length; i < len; i++) { for (var i = 0, len = regionArray.length; i < len; i++) {
var region = regionArray[i]; var region = regionArray[i];
@@ -148,46 +227,58 @@ export default {
if ((val & type) != 0) { if ((val & type) != 0) {
value += name; value += name;
if (i != len - 1) { if (i != len - 1) {
value += '<br>'; value += "<br>";
} }
} }
} }
} }
return value; return value;
} },
}, },
{ {
field: 'userRegions', field: "userRegions",
title: '排序', title: "排序",
align: 'center', align: "center",
width: '5%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
var value = ''; var value = "";
if (row.userRegions) { if (row.userRegions) {
for (var i = 0, len = row.userRegions.length; i < len; i++) { for (var i = 0, len = row.userRegions.length; i < len; i++) {
var userRegion = row.userRegions[i]; var userRegion = row.userRegions[i];
var name = userRegion.name; var name = userRegion.name;
var seq = userRegion.seq; var seq = userRegion.seq;
value += name + '' + seq; value += name + "" + seq;
if (i != len - 1) { if (i != len - 1) {
value += '<br>'; value += "<br>";
} }
} }
} }
return value; return value;
}
}, },
{ field: 'outDiamondNum', title: '最近30天转出金币', align: 'center', width: '5%' }, },
{ {
field: 'id', field: "outDiamondNum",
title: '操作', title: "最近30天转出金币",
align: 'center', align: "center",
width: '5%', width: "5%",
valign: 'middle', },
{
field: "id",
title: "操作",
align: "center",
width: "5%",
valign: "middle",
formatter: function (val, row, index) { formatter: function (val, row, index) {
return '<button class="btn btn-sm btn-default opt-edit" data-index="' + index + '">编辑</button>' + '<button class="btn btn-sm btn-default opt-del" data-index="' + index + '">删除</button>'; return (
} '<button class="btn btn-sm btn-default opt-edit" data-index="' +
} index +
'">编辑</button>' +
'<button class="btn btn-sm btn-default opt-del" data-index="' +
index +
'">删除</button>'
);
},
},
], ],
cache: false, cache: false,
striped: true, striped: true,
@@ -200,25 +291,53 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder //设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order //设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined", queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数 queryParams: function queryParams(params) {
//设置查询参数
var param = { var param = {
page: params.pageNumber, page: params.pageNumber,
pageSize: params.pageSize, pageSize: params.pageSize,
erbanNo: $('#searchValue').val(), erbanNo: $("#searchValue").val(),
regionType: $('#searchType').val() partitionId: $("#partitionId").val(),
regionType: $("#searchType").val(),
starLevel: $("#starLevel").val(),
}; };
return param; return param;
}, },
toolbar: '#toolbar', toolbar: "#toolbar",
url: '/admin/recharge/user/page', url: "/admin/recharge/user/page",
onLoadSuccess: function () { //加载成功时执行 onLoadSuccess: function () {
//加载成功时执行
console.log("load success"); console.log("load success");
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () {
//加载失败时执行
console.log("load fail"); console.log("load fail");
} },
}); });
//分区
function listPartitionInfo() {
var array;
$.ajax({
type: "get",
url: "/partition/listPartitionInfo",
dataType: "json",
async: false,
success: function (json) {
if (json.success == "true" || json.code == 200) {
array = json.data;
}
},
});
var $select = $("#partitionId");
for (let i = 0; i < array.length; i++) {
var $option = $('<option value="' + array[i].id + '" />');
$option.html(array[i].desc);
$select.append($option);
}
return array;
}
//地区 //地区
function chargeRegion() { function chargeRegion() {
var array; var array;
@@ -228,31 +347,32 @@ export default {
dataType: "json", dataType: "json",
async: false, async: false,
success: function (json) { success: function (json) {
if (json.success == 'true' || json.code == 200) { if (json.success == "true" || json.code == 200) {
array = json.data; array = json.data;
} }
} },
}); });
var $select = $('#searchType'); var $select = $("#searchType");
for (let i = 0; i < array.length; i++) { for (let i = 0; i < array.length; i++) {
var $option = $('<option value="' + array[i].type + '" />'); var $option = $('<option value="' + array[i].type + '" />');
$option.html(array[i].name); $option.html(array[i].desc);
$select.append($option); $select.append($option);
} }
return array; return array;
} }
//新增 //新增
$('#btnAdd').on('click', function () { $("#btnAdd").on("click", function () {
$("#id").val(''); $("#id").val("");
$("#erbanNo").val(''); $("#erbanNo").val("");
$("#starLevel").val("");
showRegion(); showRegion();
$("#editModal").modal('show'); $("#editModal").modal("show");
}); });
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $("#btnSearch").on("click", function () {
TableHelper.doRefresh('#table'); TableHelper.doRefresh("#table");
}); });
//展示地区 //展示地区
@@ -260,22 +380,31 @@ export default {
if (!regionArray) { if (!regionArray) {
return; return;
} }
var $form = $('#editModal .modal-body .form-horizontal'); var $form = $("#editModal .modal-body .form-horizontal");
for (let i = 0, len = regionArray.length; i < len; i++) { for (let i = 0, len = regionArray.length; i < len; i++) {
$('#region' + i).remove(); $("#region" + i).remove();
var region = regionArray[i]; var region = regionArray[i];
var name = region.name; var name = region.name;
var type = region.type; var type = region.type;
var $formGroup = $('<div/>'); var $formGroup = $("<div/>");
$formGroup.attr('id', 'region' + i); $formGroup.attr("id", "region" + i);
$formGroup.attr('class', 'form-group'); $formGroup.attr("class", "form-group");
var $label = $('<label/>'); var $label = $("<label/>");
$label.attr('class', 'col-sm-3 control-label'); $label.attr("class", "col-sm-3 control-label");
$label.html('<input type="checkbox" name="type" value="' + type + '" onclick=\"editSeqText(this);\"/>&nbsp;' + name); $label.html(
'<input type="checkbox" name="type" value="' +
type +
'" onclick="editSeqText(this);"/>&nbsp;' +
name
);
$formGroup.append($label); $formGroup.append($label);
var $div = $('<div/>'); var $div = $("<div/>");
$div.attr('class', 'col-sm-9'); $div.attr("class", "col-sm-9");
$div.html('<input type="text" readonly class="form-control" id="seq' + type + '" value="0"/>'); $div.html(
'<input type="text" readonly class="form-control" id="seq' +
type +
'" value="0"/>'
);
$formGroup.append($div); $formGroup.append($div);
$form.append($formGroup); $form.append($formGroup);
} }
@@ -283,13 +412,15 @@ export default {
//保存 //保存
$("#save").click(function () { $("#save").click(function () {
const msg = '确定要保存吗?'; const msg = "确定要保存吗?";
if (confirm(msg)) { if (confirm(msg)) {
var id = $('#id').val(); var id = $("#id").val();
const typeArray = $("input:checkbox[name='type']:checked").serializeArray(); const typeArray = $(
"input:checkbox[name='type']:checked"
).serializeArray();
if (!typeArray) { if (!typeArray) {
$("#tipMsg").text("代充地区不能为空"); $("#tipMsg").text("代充地区不能为空");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
var userRegionArray = []; var userRegionArray = [];
@@ -301,7 +432,7 @@ export default {
for (let j = 0; j < typeArray.length; j++) { for (let j = 0; j < typeArray.length; j++) {
console.log(typeArray[j]); console.log(typeArray[j]);
if (typeArray[j] && region.type == typeArray[j].value) { if (typeArray[j] && region.type == typeArray[j].value) {
seq = $('#seq' + region.type).val(); seq = $("#seq" + region.type).val();
isCheck = true; isCheck = true;
break; break;
} }
@@ -310,13 +441,14 @@ export default {
type: region.type, type: region.type,
name: region.name, name: region.name,
isCheck: isCheck, isCheck: isCheck,
seq: seq seq: seq,
}; };
userRegionArray.push(userRegion); userRegionArray.push(userRegion);
} }
var data = { var data = {
erbanNo: $('#erbanNo').val(), erbanNo: $("#erbanNo").val(),
userRegions: JSON.stringify(userRegionArray) starLevel: $("#starLevel").val(),
userRegions: JSON.stringify(userRegionArray),
}; };
if (id) { if (id) {
data.id = id; data.id = id;
@@ -327,29 +459,32 @@ export default {
data: data, data: data,
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
if (json.success == 'true' || json.code == 200) { if (json.success == "true" || json.code == 200) {
$("#tipMsg").text("保存成功"); $("#tipMsg").text("保存成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
$("#editModal").modal('hide'); $("#editModal").modal("hide");
} else { } else {
$("#tipMsg").text("保存失败." + json.message); $("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
$("#editModal").modal('hide'); $("#editModal").modal("hide");
}
} }
},
}); });
} }
}); });
//编辑 //编辑
$('#table').on('click', '.opt-edit', function () { $("#table").on("click", ".opt-edit", function () {
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')]; const currentData =
$("#table").bootstrapTable("getData")[$(this).data("index")];
showRegion(); showRegion();
var id = currentData.id; var id = currentData.id;
var erbanNo = currentData.erbanNo; var erbanNo = currentData.erbanNo;
var starLevel = currentData.starLevel;
var userRegions = currentData.userRegions; var userRegions = currentData.userRegions;
$("#erbanNo").val(erbanNo); $("#erbanNo").val(erbanNo);
$("#starLevel").val(starLevel);
$("#id").val(id); $("#id").val(id);
if (regionArray) { if (regionArray) {
for (let i = 0; i < regionArray.length; i++) { for (let i = 0; i < regionArray.length; i++) {
@@ -365,48 +500,54 @@ export default {
} }
} }
if (isCheck) { if (isCheck) {
$('input:checkbox[value="' + region.type + '"]').prop('checked', true); $('input:checkbox[value="' + region.type + '"]').prop(
$('#seq' + region.type).removeAttr('readonly'); "checked",
$('#seq' + region.type).val(seq); true
);
$("#seq" + region.type).removeAttr("readonly");
$("#seq" + region.type).val(seq);
} else { } else {
$("input:checkbox[value='" + region.type + "']").prop('checked', false); $("input:checkbox[value='" + region.type + "']").prop(
$('#seq' + region.type).attr('readonly', 'true'); "checked",
$('#seq' + region.type).val(0); false
);
$("#seq" + region.type).attr("readonly", "true");
$("#seq" + region.type).val(0);
} }
} }
} }
$("#editModal").modal('show'); $("#editModal").modal("show");
}); });
//删除 //删除
$('#table').on('click', '.opt-del', function () { $("#table").on("click", ".opt-del", function () {
const currentData = $('#table').bootstrapTable('getData')[$(this).data('index')]; const currentData =
$("#table").bootstrapTable("getData")[$(this).data("index")];
var id = currentData.id; var id = currentData.id;
const msg = '确定要删除吗?'; const msg = "确定要删除吗?";
if (confirm(msg)) { if (confirm(msg)) {
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/admin/recharge/user/del?id=" + id, url: "/admin/recharge/user/del?id=" + id,
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
if (json.success == 'true' || json.code == 200) { if (json.success == "true" || json.code == 200) {
$("#tipMsg").text("删除成功"); $("#tipMsg").text("删除成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
$("#editModal").modal('hide'); $("#editModal").modal("hide");
} else { } else {
$("#tipMsg").text("删除失败." + json.message); $("#tipMsg").text("删除失败." + json.message);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
$("#editModal").modal('hide'); $("#editModal").modal("hide");
}
}
});
}
});
});
} }
}, },
});
}
});
});
},
},
}; };
</script> </script>

View File

@@ -5,66 +5,55 @@
<section class="content-header"> <section class="content-header">
<h1 id="itemTitle"></h1> <h1 id="itemTitle"></h1>
</section> </section>
<form id="form2" <form id="form2" action="" method="post" target="_blank">
action="" <input type="hidden" name="erbanNo" id="exportErbanNo" />
method="post" <input type="hidden" name="channel" id="exportChannel" />
target="_blank"> <input type="hidden" name="startTime" id="exportStartTime" />
<input type="hidden" <input type="hidden" name="endTime" id="exportEndTime" />
name="erbanNo" <input type="hidden" name="status" id="exportStatus" />
id="exportErbanNo"> <input type="hidden" name="newUser" id="exportNewUser" />
<input type="hidden" <input type="hidden" name="appChannel" id="exportAppChannel" />
name="channel"
id="exportChannel">
<input type="hidden"
name="startTime"
id="exportStartTime">
<input type="hidden"
name="endTime"
id="exportEndTime">
<input type="hidden"
name="status"
id="exportStatus">
<input type="hidden"
name="newUser"
id="exportNewUser">
<input type="hidden"
name="appChannel"
id="exportAppChannel">
</form> </form>
<section class="content"> <section class="content">
<div id="toolbar"> <div id="toolbar">
<form class="form-inline"> <form class="form-inline">
<div class="form-group"> <div class="form-group">
<label for="qErbanNo">平台号</label> <label for="qErbanNo">平台号</label>
<input type="text" <input
type="text"
class="form-control" class="form-control"
name="erbanNo" name="erbanNo"
id="qErbanNo"> id="qErbanNo"
/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="qChannel">渠道:</label> <label for="qChannel">渠道:</label>
<input type="text" <input
type="text"
class="form-control" class="form-control"
name="channel" name="channel"
id="qChannel"> id="qChannel"
/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="qChannel">时间:</label> <label for="qChannel">时间:</label>
<input type="text" <input
type="text"
class="form-control datetime" class="form-control datetime"
name="startTime" name="startTime"
id="qStartTime"> id="qStartTime"
/>
<label for="qChannel">-</label> <label for="qChannel">-</label>
<input type="text" <input
type="text"
class="form-control datetime" class="form-control datetime"
name="endTime" name="endTime"
id="qEndTime"> id="qEndTime"
/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="qStatus">状态:</label> <label for="qStatus">状态:</label>
<select class="form-control" <select class="form-control" name="status" id="qStatus">
name="status"
id="qStatus">
<option value="">全部</option> <option value="">全部</option>
<option value="1">发起充值</option> <option value="1">发起充值</option>
<option value="2">充值成功</option> <option value="2">充值成功</option>
@@ -72,9 +61,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="qNewUser">新用户:</label> <label for="qNewUser">新用户:</label>
<select class="form-control" <select class="form-control" name="newUser" id="qNewUser">
name="newUser"
id="qNewUser">
<option value="">全部</option> <option value="">全部</option>
<option value="1"></option> <option value="1"></option>
<option value="0"></option> <option value="0"></option>
@@ -82,20 +69,20 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="qChannel">app渠道</label> <label for="qChannel">app渠道</label>
<input type="text" <input
type="text"
class="form-control" class="form-control"
name="appChannel" name="appChannel"
id="qAppChannel"> id="qAppChannel"
/>
</div> </div>
</form> </form>
<button id="btnSearch" <div id="mapObjHtml"></div>
class="btn btn-sm btn-primary">查询</button> <button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
<button id="btnExport" <button id="btnExport" class="btn btn-sm btn-primary">导出</button>
class="btn btn-sm btn-primary">导出</button>
</div> </div>
<!-- .content --> <!-- .content -->
<div class="content" <div class="content" id="table"></div>
id="table"></div>
</section> </section>
</div> </div>
</div> </div>
@@ -103,61 +90,89 @@
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
export default { export default {
name: "ChargeRecordView", name: "ChargeRecordView",
setup () { created() {
return {};
},
created () {
this.$nextTick(function () { this.$nextTick(function () {
this.initData(); this.initData();
}); });
}, },
methods: { methods: {
initData () { initData() {
$(function () { $(".datetime").datetimepicker({
$('.datetime').datetimepicker({ format: "yyyy-mm-dd hh:ii:00",
format: 'yyyy-mm-dd hh:ii:00', autoclose: true,
autoclose: true
}); });
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({ // 初始化表格,但不设置 `ajax` 方法,也不绑定 `url`,只提供列配置
$("#table").bootstrapTable({
columns: [ columns: [
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' }, { field: "erbanNo", title: "平台号", align: "center", width: "5%" },
{ field: 'uid', title: 'uid', align: 'center', width: '5%' }, { field: "uid", title: "uid", align: "center", width: "5%" },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' }, { field: "nick", title: "昵称", align: "center", width: "5%" },
{ field: 'partitionName', title: '分区', align: 'center', width: '5%' },
{ field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%' },
{ field: 'channel', title: '渠道', align: 'center', width: '5%' },
{ field: 'localCurrencyCode', title: '当地货币代码', align: 'center', width: '5%' },
{ field: 'localAmount', title: '当地金额', align: 'center', width: '5%' },
{ field: 'chargeRecordId', title: '商户订单号', align: 'center', width: '5%' },
{ field: 'pingxxChargeId', title: '第三方订单号', align: 'center', width: '5%' },
{ {
field: 'status', title: '状态', align: 'center', width: '5%', field: "partitionName",
formatter: function (val, row, index) { title: "分区",
if (val == 2) { align: "center",
return '充值成功'; width: "5%",
} else {
return '发起充值';
}
}
}, },
{ {
field: 'newUser', title: '是否新用户', align: 'center', width: '5%', field: "createTime",
formatter: function (val, row, index) { title: "创建时间",
if (val) { align: "center",
return '是'; valign: "middle",
} else { width: "10%",
return '否'; },
} { field: "channel", title: "渠道", align: "center", width: "5%" },
{
} field: "localCurrencyCode",
title: "当地货币代码",
align: "center",
width: "5%",
},
{
field: "localAmount",
title: "当地金额",
align: "center",
width: "5%",
},
{
field: "chargeRecordId",
title: "商户订单号",
align: "center",
width: "5%",
},
{
field: "pingxxChargeId",
title: "第三方订单号",
align: "center",
width: "5%",
},
{
field: "status",
title: "状态",
align: "center",
width: "5%",
formatter: function (val, row, index) {
return val == 2 ? "充值成功" : "发起充值";
},
},
{
field: "newUser",
title: "是否新用户",
align: "center",
width: "5%",
formatter: function (val, row, index) {
return val ? "是" : "否";
},
},
{
field: "appChannel",
title: "app渠道",
align: "center",
width: "5%",
}, },
{ field: 'appChannel', title: 'app渠道', align: 'center', width: '5%' },
], ],
undefinedText: "-", undefinedText: "-",
cache: false, cache: false,
@@ -167,88 +182,93 @@ export default {
pagination: true, pagination: true,
pageList: [20, 50, 100, 200, 300, 500], pageList: [20, 50, 100, 200, 300, 500],
search: false, search: false,
sidePagination: "server", //表示服务端请求 sidePagination: "server",
queryParamsType: "undefined", queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数 data: [], // 初始化为空数据
var param = {
pageNumber: params.pageNumber,
pageSize: params.pageSize,
erbanNo: $('#qErbanNo').val(),
channel: $('#qChannel').val(),
startTime: $('#qStartTime').val(),
endTime: $('#qEndTime').val(),
status: $('#qStatus').val(),
newUser: $('#qNewUser').val(),
appChannel: $('#qAppChannel').val(),
};
return param;
},
ajax: function (request) { //使用ajax请求
$.ajax({
type: "GET",
url: '/admin/chargeRecord/list',
contentType: 'application/json;charset=utf-8',
dataType: 'json',
data: request.data,
success: function (res) {
apiResult(res);
request.success({
rows: res.data.records,
total: res.data.total
});
},
error: function (req) {
serverError(req);
}
})
},
toolbar: '#toolbar',
onLoadSuccess: function () { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
}); });
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $("#btnSearch").on("click", function () {
TableHelper.doRefresh('#table'); const params = {
pageNumber: 1,
pageSize: 20,
erbanNo: $("#qErbanNo").val(),
channel: $("#qChannel").val(),
startTime: $("#qStartTime").val(),
endTime: $("#qEndTime").val(),
status: $("#qStatus").val(),
newUser: $("#qNewUser").val(),
appChannel: $("#qAppChannel").val(),
};
// 手动加载数据
$.ajax({
type: "GET",
url: "/admin/chargeRecord/list",
contentType: "application/json;charset=utf-8",
dataType: "json",
data: params,
success: function (res) {
if (apiResult(res)) {
$("#table").bootstrapTable("load", {
rows: res.data.rows,
total: res.data.total,
}); });
function serverError (req) { $("#mapObjHtml span").remove();
const totalMap = res.data.totalMap;
let str = "";
const sortedKeys = Object.keys(totalMap).sort((keyA, keyB) => {
return keyA === "总充值{USD}"
? -1
: keyB === "总充值{USD}"
? 1
: 0;
});
for (const key of sortedKeys) {
str += `
<span style="margin-right:10px;display: inline-block;font-size: 18px;color: #2049a9;" type="text">${key}: ${totalMap[key]}, </span>
`;
}
$("#mapObjHtml").append(str);
}
},
error: function (req) {
serverError(req);
},
});
});
function serverError(req) {
$("#tipMsg").text(req.responseJSON.message); $("#tipMsg").text(req.responseJSON.message);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
} }
function apiResult (json) { function apiResult(json) {
if (json.code == 200 && json.message == 'success') { if (json.code == 200 && json.message == "success") {
return true; return true;
} }
$("#tipMsg").text("请求失败,错误信息:" + json.message); $("#tipMsg").text("请求失败,错误信息:" + json.message);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return false; return false;
} }
// 导出excel // 导出excel
$('#btnExport').on('click', function () { $("#btnExport").on("click", function () {
var form = $("#form2"); const form = $("#form2");
form.attr("action", "/admin/chargeRecord/exportChargeDetail"); form.attr("action", "/admin/chargeRecord/exportChargeDetail");
$('#exportErbanNo').val($('#qErbanNo').val()); $("#exportErbanNo").val($("#qErbanNo").val());
$('#exportChannel').val($('#qChannel').val()); $("#exportChannel").val($("#qChannel").val());
$('#exportStartTime').val($('#qStartTime').val()); $("#exportStartTime").val($("#qStartTime").val());
$('#exportEndTime').val($('#qEndTime').val()); $("#exportEndTime").val($("#qEndTime").val());
$('#exportStatus').val($('#qStatus').val()); $("#exportStatus").val($("#qStatus").val());
$('#exportNewUser').val($('#qNewUser').val()); $("#exportNewUser").val($("#qNewUser").val());
$('#exportAppChannel').val($('#qAppChannel').val()); $("#exportAppChannel").val($("#qAppChannel").val());
form.submit(); form.submit();
})
}); });
}
}, },
},
}; };
</script> </script>

View File

@@ -0,0 +1,410 @@
<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>
<!-- 平台ID -->
<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.rechargeNumber"
placeholder=""
class="input"
></el-input>
</div>
<!-- 第三方订单号 -->
<div class="inquire">
<span>第三方订单号</span>
<el-input
v-model="inquire.partyNumber"
placeholder=""
class="input"
></el-input>
</div>
<!-- 国家 -->
<div class="inquire">
<div class="block">
<span class="demonstration">国家</span>
<el-select
v-model="inquire.country"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.countryArr"
:key="item.id"
:label="item.regionDesc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 状态 -->
<div class="inquire">
<div class="block">
<span class="demonstration">状态</span>
<el-select
v-model="inquire.status"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.statusArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 平台 -->
<div class="inquire">
<div class="block">
<span class="demonstration">平台</span>
<el-select
v-model="inquire.platform"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.platformArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 支付渠道 -->
<div class="inquire">
<div class="block">
<span class="demonstration">支付渠道</span>
<el-select
v-model="inquire.paymentChannels"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.paymentChannelsArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
<!-- 时间选择器 -->
<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>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>搜索</el-button
>
<el-button
class="primary"
type="primary"
@click="
inquire.partitionId = inquire.partitionArr[0].id;
inquire.userId = '';
inquire.rechargeNumber = '';
inquire.partyNumber = '';
inquire.country = inquire.countryArr[0].id;
inquire.status = 0;
inquire.platform = '';
inquire.paymentChannels = '';
inquire.time = '';
getData();
"
>重置搜索</el-button
>
<el-button class="primary" type="primary" @click="exportInfoFun()"
>导出</el-button
>
<div>
<el-button v-for="(value, key) in sortedMapObj" :key="key" type="text"
>{{ key }}: {{ value }},
</el-button>
</div>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="chargeStatusDesc" align="center" label="支付状态">
</el-table-column>
<el-table-column prop="chargeRecordId" align="center" label="订单ID" />
<el-table-column
prop="pingxxChargeId"
align="center"
label="第三方订单ID"
/>
<el-table-column prop="channel" align="center" label="充值渠道" />
<el-table-column prop="erbanNo" align="center" label="平台ID" />
<el-table-column prop="nick" align="center" label="昵称" />
<el-table-column prop="partitionDesc" align="center" label="地区" />
<el-table-column prop="phone" align="center" label="电话" />
<el-table-column prop="os" align="center" label="平台" />
<el-table-column prop="genderDesc" align="center" label="性别" />
<el-table-column prop="chargeIp" align="center" label="用户IP" />
<el-table-column prop="totalGold" align="center" label="金币数量" />
<el-table-column prop="amount" align="center" label="花费金额USD" />
<el-table-column
prop="localCurrencyCode"
align="center"
label="当地货币代码"
/>
<el-table-column
prop="localAmount"
align="center"
label="当地货币花费金额"
/>
<el-table-column prop="createTime" align="center" label="购买时间" />
<el-table-column prop="successTime" align="center" label="回调时间" />
<el-table-column prop="successTime" align="center" label="退款时间" />
<el-table-column prop="amount" align="center" label="退款金额" />
<el-table-column
prop="refundDesc"
align="center"
label="状态"
></el-table-column>
<el-table-column prop="regionName" 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 {
listPartitionInfo,
refundList,
regionInfoList,
refundExport,
} from "@/api/refund/refund";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "userRefundQuiry",
computed: {
sortedMapObj() {
const entries = Object.entries(this.mapObj);
// 将 "总充值{USD}" 的键排到第一位
entries.sort(([keyA], [keyB]) =>
keyA === "总充值{USD}" ? -1 : keyB === "总充值{USD}" ? 1 : 0
);
return Object.fromEntries(entries);
},
},
data() {
return {
loading: false,
delDialog: false,
delDialogData: null,
mapObj: {},
//查询所需条件对象
inquire: {
partitionId: 0,
partitionArr: [],
userId: "",
rechargeNumber: "",
partyNumber: "",
country: "",
countryArr: [],
status: "",
statusArr: [
{ desc: "全部", id: 0 },
{ desc: "退款中", id: 2 },
{ desc: "退款成功", id: 1 },
{ desc: "退款失败", id: 3 },
],
platform: "",
platformArr: [
{ desc: "全部", id: "" },
{ desc: "Android", id: "android" },
{ desc: "iOS", id: "iOS" },
],
paymentChannels: "",
paymentChannelsArr: [
{ desc: "google内购", id: "google_play_billing" },
{ desc: "payermax", id: "payermax" },
{ desc: "myCard", id: "MyCard" },
{ desc: "startPay", id: "start_pay" },
{ desc: "ios内购", id: "ios_pay" },
{ desc: "对公打款", id: "company" },
],
time: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
regionInfoList().then((res) => {
this.inquire.countryArr = res.data;
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
}
refundList({
partitionId: this.inquire.partitionId,
channel: this.inquire.paymentChannels,
chargeRecordId: this.inquire.rechargeNumber,
pingxxChargeId: this.inquire.partyNumber,
refundStatus: this.inquire.status,
regionId: this.inquire.country,
os: this.inquire.platform,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
beginDate: startTime,
endDate: endTime,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.rows;
this.mapObj = res.data.totalMap;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
});
},
jsonFun(val) {
return JSON.parse(val);
},
exportInfoFun() {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
}
refundExport({
partitionId: this.inquire.partitionId,
channel: this.inquire.paymentChannels,
chargeRecordId: this.inquire.rechargeNumber,
pingxxChargeId: this.inquire.partyNumber,
refundStatus: this.inquire.status,
regionId: this.inquire.country,
os: this.inquire.platform,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
beginDate: startTime,
endDate: endTime,
}).then();
},
// 分页导航
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: 10px;
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,292 @@
<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>
<!-- 平台ID -->
<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.platform"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.platformArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
</div>
</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="
inquire.partitionId = inquire.partitionArr[0].id;
inquire.userId = '';
inquire.platform = '';
inquire.time = '';
getData();
"
>重置搜索</el-button
>
<el-button class="primary" type="primary" @click="exportInfoFun()"
>导出</el-button
>
<div>
<el-button v-for="(value, key) in sortedMapObj" :key="key" type="text"
>{{ key }}: {{ value }},
</el-button>
</div>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="createTime" align="center" label="操作时间">
<template v-slot="scope">
{{
dateFormat(
new Date(scope.row.createTime).getTime(),
"yyyy-MM-dd hh:mm:ss"
)
}}
</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="partitionDesc" align="center" label="区域" />
<el-table-column prop="money" align="center" label="实时金币余额" />
<el-table-column prop="goldNum" align="center" label="赠送金币数量" />
<el-table-column prop="diamondNum" align="center" label="赠送钻石数量" />
<el-table-column prop="typeDesc" align="center" label="赠送类型" />
<el-table-column
prop="currencyTypeDesc"
align="center"
label="赠送分类"
/>
<el-table-column prop="actualAmount" align="center" label="打款金额" />
<el-table-column prop="remark" align="center" label="备注" />
<el-table-column prop="operatorName" 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 {
listPartitionInfo,
goldcoinRecordAll,
recordAllExport,
} from "@/api/refund/refund";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "goldDiamondOperationRecord",
data() {
return {
loading: false,
delDialog: false,
delDialogData: null,
mapObj: {},
//查询所需条件对象
inquire: {
partitionId: 0,
partitionArr: [],
userId: "",
platform: "",
platformArr: [
{ desc: "全部", id: "" },
{ desc: "官方赠送金币", id: "OFFICAL_DIAMOND" },
{ desc: "官方赠送水晶", id: "OFFICAL_RADISH" },
{ desc: "活动奖励钻石", id: "ACTIVITY_GOLD" },
{ desc: "公款充值金币", id: "COMPANY_ACCOUNT_DIAMOND" },
{ desc: "官方金币消除", id: "OFFICAL_REDUCE_DIAMONDS" },
{ desc: "官方赠送钻石", id: "OFFICAL_GOLD" },
{ desc: "用户钻石清除", id: "CLEAR_USER_GOLD" },
],
time: "",
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
computed: {
sortedMapObj() {
const entries = Object.entries(this.mapObj);
// 将 "总充值{USD}" 的键排到第一位
entries.sort(([keyA], [keyB]) =>
keyA === "总充值{USD}" ? -1 : keyB === "总充值{USD}" ? 1 : 0
);
return Object.fromEntries(entries);
},
},
created() {
listPartitionInfo().then((res) => {
this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
});
},
methods: {
dateFormat,
// 查询接口
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");
}
goldcoinRecordAll({
partitionId: this.inquire.partitionId,
type: this.inquire.platform,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
beginDate: startTime,
endDate: endTime,
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
this.tableData = res.data.rows;
this.mapObj = res.data.totalMap;
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
this.loading = false;
});
},
jsonFun(val) {
return JSON.parse(val);
},
exportInfoFun() {
let time = this.inquire.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd 00:00:00");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd 23:59:59");
}
recordAllExport({
partitionId: this.inquire.partitionId,
type: this.inquire.platform,
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
beginDate: startTime,
endDate: endTime,
}).then();
},
// 分页导航
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: 10px;
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

@@ -16,10 +16,22 @@
</div> </div>
<!-- 按钮 --> <!-- 按钮 -->
<div class="buttonBox"> <div class="buttonBox">
<el-button @click="addClick()" class="primary" type="primary" size="default" <el-button
style="margin-right: 10px">新增</el-button> @click="addClick()"
<el-button @click="getData()" class="primary" type="primary" size="default" class="primary"
style="margin-right: 10px">查询</el-button> type="primary"
size="default"
style="margin-right: 10px"
>新增</el-button
>
<el-button
@click="getData()"
class="primary"
type="primary"
size="default"
style="margin-right: 10px"
>查询</el-button
>
</div> </div>
<!-- 表格 --> <!-- 表格 -->
<el-table :data="tableData" border style="width: 100%; margin-top: 25px"> <el-table :data="tableData" border style="width: 100%; margin-top: 25px">
@@ -32,105 +44,299 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="url" label="开屏页" width="200"> <el-table-column align="center" prop="url" label="开屏页" width="200">
<template v-slot="scope"> <template v-slot="scope">
<el-image style="width: 100%; height: 100px" :src="scope.row.url" :zoom-rate="1.1" <el-image
:preview-src-list="[scope.row.url]" fit="scale-down" preview-teleported="true" style="width: 100%; height: 100px"
hide-on-click-modal="true" /> :src="scope.row.url"
:zoom-rate="1.1"
:preview-src-list="[scope.row.url]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="skipType" label="跳转"> <el-table-column align="center" prop="skipType" label="跳转">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ scope.row.skipType == 1 ? "native" : (scope.row.skipType == 2 ? "房间内" : scope.row.skipType == 3 <span>{{
? "H5" : "") }}</span> scope.row.skipType == 1
? "native"
: scope.row.skipType == 2
? "房间内"
: scope.row.skipType == 3
? "H5"
: ""
}}</span>
<br /> <br />
<span>{{ scope.row.skipContent }}</span> <span>{{ scope.row.skipContent }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="生效时间"> <el-table-column align="center" label="生效时间">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ scope.row.startTime == null && scope.row.endTime ? "不限" : (scope.row.startTime + "~" + <span>{{
(scope.row.endTime == null ? "不限" : scope.row.endTime)) }}</span> scope.row.startTime == null && scope.row.endTime
? "不限"
: scope.row.startTime +
"~" +
(scope.row.endTime == null ? "不限" : scope.row.endTime)
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="USER_LEVEL" label="可见等级" :formatter="ruleJsonFormatter" /> <el-table-column
<el-table-column align="center" prop="PLATFORM" label="生效平台" :formatter="ruleJsonFormatter" /> align="center"
<el-table-column align="center" prop="IOS" label="iOS版本号" :formatter="ruleJsonFormatter" /> prop="USER_LEVEL"
<el-table-column align="center" prop="ANDROID" label="安卓版本号" :formatter="ruleJsonFormatter" /> label="可见等级"
<el-table-column align="center" prop="NOT_CHANNELS" label="不展示渠道" :formatter="ruleJsonFormatter" /> :formatter="ruleJsonFormatter"
/>
<el-table-column
align="center"
prop="PLATFORM"
label="生效平台"
:formatter="ruleJsonFormatter"
/>
<el-table-column
align="center"
prop="IOS"
label="iOS版本号"
:formatter="ruleJsonFormatter"
/>
<el-table-column
align="center"
prop="ANDROID"
label="安卓版本号"
:formatter="ruleJsonFormatter"
/>
<el-table-column
align="center"
prop="NOT_CHANNELS"
label="不展示渠道"
:formatter="ruleJsonFormatter"
/>
<el-table-column align="center" label="操作" width="200"> <el-table-column align="center" label="操作" width="200">
<template v-slot="scope"> <template v-slot="scope">
<el-button @click="editClick(scope.row)" class="primary" type="primary" size="default">编辑</el-button> <el-button
<el-button @click="delClick(scope.row)" class="danger" type="danger" size="default">删除</el-button> @click="editClick(scope.row)"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
<el-button
@click="delClick(scope.row)"
class="danger"
type="danger"
size="default"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
<el-pagination style="margin-top: 10px" class="paginationClass" v-model:current-page="currentPage" <el-pagination
v-model:page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500]" :small="small" style="margin-top: 10px"
:disabled="disabled" :background="background" layout="sizes, prev, pager, next" :total="totals" class="paginationClass"
@size-change="handleSizeChange" @current-change="handleCurrentChange" /> v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500]"
:small="small"
:disabled="disabled"
:background="background"
layout="sizes, prev, pager, next"
:total="totals"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<!-- 编辑弹窗 --> <!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" title="开屏配置" width="50%" center> <el-dialog v-model="editDialog" title="开屏配置" width="50%" center>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">活动名称</span> <span
<el-input v-model="resource.name" style="width: 75%" class="input" placeholder="请输入活动名称"></el-input> style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>活动名称</span
>
<el-input
v-model="resource.name"
style="width: 75%"
class="input"
placeholder="请输入活动名称"
></el-input>
</div> </div>
<div style="margin-bottom: 25px;margin-top: 70px;"> <div style="margin-bottom: 25px; margin-top: 70px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">选择地区</span> <span
<el-select v-model="resource.partitionId" style="width: 75%" placeholder="请选择"> style="display: inline-block; margin-right: 20px"
<el-option v-for="item in partitionInfos" :key="item.id" :label="item.desc" class="col-sm-2 control-label"
:value="item.id"></el-option> >选择地区</span
>
<el-select
v-model="resource.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in partitionInfos"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select> </el-select>
</div> </div>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">开屏页</span> <span
<input type="hidden" class="form-control" name="avatar" v-model="resource.url" /> style="display: inline-block; margin-right: 20px"
<img :src="resource.url" style="width:120px;"/> class="col-sm-2 control-label"
<input type="file" style="width: 26%; display: inline-block;" id="urlFile" name="uploadFile"/> >开屏页</span
>
<input
type="hidden"
class="form-control"
name="avatar"
v-model="resource.url"
/>
<img :src="resource.url" style="width: 120px" />
<input
type="file"
style="width: 26%; display: inline-block"
id="urlFile"
name="uploadFile"
/>
</div> </div>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label"></span> <span
<button class="btn btn-success col-sm-4" type="button" id="urlUploadBtn" @click="uploadUrl()">上传</button> style="display: inline-block; margin-right: 20px"
<span class="btn col-sm-4" id="urlUploadInfo" style="color:red;"></span> class="col-sm-2 control-label"
></span>
<button
class="btn btn-success col-sm-4"
type="button"
id="urlUploadBtn"
@click="uploadUrl()"
>
上传
</button>
<span class="btn col-sm-4" id="urlUploadInfo" style="color: red"></span>
</div> </div>
<div style="margin-bottom: 25px;margin-top: 70px;"> <div style="margin-bottom: 25px; margin-top: 70px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">跳转位置</span> <span
<el-select v-model="resource.skipType" style="width: 75%" placeholder="请选择"> style="display: inline-block; margin-right: 20px"
<el-option v-for="item in options" :key="item.value" :label="item.label" class="col-sm-2 control-label"
:value="item.value"></el-option> >跳转位置</span
>
<el-select
v-model="resource.skipType"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</div> </div>
<div style="margin-bottom: 25px" v-if="resource.skipType == 2 || resource.skipType == 3"> <div
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">{{ resource.skipType == 3 ? "跳转链接" : style="margin-bottom: 25px"
(resource.skipType == 2 ? "跳转房间" : "") }}</span> v-if="
<el-input v-model="resource.skipContent" style="width: 75%" class="input" resource.skipType == 2 ||
:placeholder="[resource.skipType == 3 ? '请输入跳转链接' : (resource.skipType == 2 ? '请输入房间ID' : '')]"></el-input> resource.skipType == 3 ||
resource.skipType == 4 ||
resource.skipType == 5 ||
resource.skipType == 6
"
>
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>{{ resource.skipType == 3 ? "跳转链接" : "跳转房间" }}</span
>
<el-input
v-model="resource.skipContent"
style="width: 75%"
class="input"
:placeholder="[
resource.skipType == 2 ? '请输入房间ID' : '请输入跳转链接',
]"
></el-input>
</div> </div>
<div style="margin-bottom: 25px;"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">生效时间</span> <span
<el-date-picker v-model="resource.startTime" type="datetime" placeholder="选择日期时间" required> style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>生效时间</span
>
<el-date-picker
v-model="resource.startTime"
type="datetime"
placeholder="选择日期时间"
required
>
</el-date-picker> </el-date-picker>
</div> </div>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">失效时间</span> <span
<el-date-picker v-model="resource.endTime" type="datetime" placeholder="选择日期时间" required> style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>失效时间</span
>
<el-date-picker
v-model="resource.endTime"
type="datetime"
placeholder="选择日期时间"
required
>
</el-date-picker> </el-date-picker>
</div> </div>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">排序</span> <span
<el-input v-model="resource.seqNo" style="width: 75%" class="input" placeholder="请输入排序"></el-input> style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>排序</span
>
<el-input
v-model="resource.seqNo"
style="width: 75%"
class="input"
placeholder="请输入排序"
></el-input>
</div> </div>
<div style="margin-bottom: 25px" v-for="(rule, index) in rules" :key="rule" :index="index"> <div
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">{{ rule.ruleName }}</span> style="margin-bottom: 25px"
<el-input v-model="resource.ruleValue[rule.ruleCode]" style="width: 75%" class="input" :placeholder="rule.description" v-if="rule.ruleKind != 'IN'"></el-input> v-for="(rule, index) in rules"
<el-select v-model="resource.ruleValue[rule.ruleCode]" style="width: 75%" placeholder="请选择" v-if="rule.ruleKind == 'IN'"> :key="rule"
:index="index"
>
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>{{ rule.ruleName }}</span
>
<el-input
v-model="resource.ruleValue[rule.ruleCode]"
style="width: 75%"
class="input"
:placeholder="rule.description"
v-if="rule.ruleKind != 'IN'"
></el-input>
<el-select
v-model="resource.ruleValue[rule.ruleCode]"
style="width: 75%"
placeholder="请选择"
v-if="rule.ruleKind == 'IN'"
>
<el-option label="全部" :value="''"></el-option> <el-option label="全部" :value="''"></el-option>
<el-option v-for="value in rule.ruleValue.split(',')" :key="value" :label="value" :value="value"></el-option> <el-option
v-for="value in rule.ruleValue.split(',')"
:key="value"
:label="value"
:value="value"
></el-option>
</el-select> </el-select>
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button> <el-button @click="editDialog = false">取消</el-button>
<el-button type="primary" @click="editDialogClick()"> 确认 </el-button> <el-button type="primary" @click="editDialogClick()">
确认
</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@@ -148,12 +354,16 @@
</template> </template>
<script> <script>
import {
import { getResourcePage, delResource, saveResource, effective } from "@/api/resource/resource"; getResourcePage,
import { getResourceRuleList } from '@/api/resource/resourceRule'; delResource,
import { uploadFile } from '@/api/common/upload'; saveResource,
effective,
} from "@/api/resource/resource";
import { getResourceRuleList } from "@/api/resource/resourceRule";
import { uploadFile } from "@/api/common/upload";
import { hideLoading, showLoading } from "@/utils/maintainer"; import { hideLoading, showLoading } from "@/utils/maintainer";
import { getPartitionInfoList } from '@/api/partition/partitionInfo'; import { getPartitionInfoList } from "@/api/partition/partitionInfo";
export default { export default {
name: "SplashView", name: "SplashView",
@@ -168,37 +378,49 @@ export default {
options: [ options: [
{ {
value: 0, value: 0,
label: "无" label: "无",
}, },
{ {
value: 1, value: 1,
label: "APP首页" label: "APP首页",
}, },
{ {
value: 2, value: 2,
label: "房间内" label: "房间内",
}, },
{ {
value: 3, value: 3,
label: "H5" label: "H5",
} },
{
value: 4,
label: "CP活动",
},
{
value: 6,
label: "定制礼物活动",
},
{
value: 5,
label: "周星榜活动",
},
], ],
tableData: [], //表单数据存放 tableData: [], //表单数据存放
rules: [], rules: [],
resource: { resource: {
id: null, id: null,
name: '', name: "",
icon: '', icon: "",
skipType: 0, skipType: 0,
skipContent: '', skipContent: "",
url: '', url: "",
startTime: null, startTime: null,
endTime: null, endTime: null,
seqNo: 0, seqNo: 0,
ruleValue: {}, ruleValue: {},
partitionId: null, partitionId: null,
}, },
imageUrl: '', imageUrl: "",
partitionInfos: [], partitionInfos: [],
searchValues: { searchValues: {
partitionId: null, partitionId: null,
@@ -216,29 +438,31 @@ export default {
methods: { methods: {
uploadUrl() { uploadUrl() {
let $this = this; let $this = this;
let file = $('#urlFile').val(); let file = $("#urlFile").val();
console.log(file); console.log(file);
if (file && file.length > 0) { if (file && file.length > 0) {
showLoading(); showLoading();
uploadFile('urlFile').then(res => { uploadFile("urlFile")
.then((res) => {
if (res.path) { if (res.path) {
$this.resource.url = res.path; $this.resource.url = res.path;
$('#urlUploadInfo').html('上传成功'); $("#urlUploadInfo").html("上传成功");
} }
}).finally(() => { })
.finally(() => {
hideLoading(); hideLoading();
}); });
} }
}, },
getRule() { getRule() {
getResourceRuleList({ getResourceRuleList({
ruleType: 1 ruleType: 1,
}).then(res => { }).then((res) => {
this.rules = res.data; this.rules = res.data;
}); });
}, },
ruleJsonFormatter(row, col, cell, index) { ruleJsonFormatter(row, col, cell, index) {
let value = ''; let value = "";
let key = col.property; let key = col.property;
let ruleValue = row.ruleValue; let ruleValue = row.ruleValue;
if (!ruleValue) { if (!ruleValue) {
@@ -247,16 +471,19 @@ export default {
let ruleObj = JSON.parse(ruleValue); let ruleObj = JSON.parse(ruleValue);
value = ruleObj[key]; value = ruleObj[key];
if (!value) { if (!value) {
if (key == 'NOT_CHANNELS') { if (key == "NOT_CHANNELS") {
value = '-'; value = "-";
} else { } else {
value = '全部'; value = "全部";
} }
} }
if (key == 'IOS') { if (key == "IOS") {
value = ruleObj['IOS_LOW_VERSION'] + '~' + ruleObj['IOS_HIGH_VERSION']; value = ruleObj["IOS_LOW_VERSION"] + "~" + ruleObj["IOS_HIGH_VERSION"];
} else if (key == 'ANDROID') { } else if (key == "ANDROID") {
value = ruleObj['ANDROID_LOW_VERSION'] + '~' + ruleObj['ANDROID_HIGH_VERSION']; value =
ruleObj["ANDROID_LOW_VERSION"] +
"~" +
ruleObj["ANDROID_HIGH_VERSION"];
} }
return value; return value;
}, },
@@ -266,11 +493,11 @@ export default {
partitionId: this.searchValues.partitionId, partitionId: this.searchValues.partitionId,
page: this.currentPage, page: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
}).then(res => { }).then((res) => {
let data = res.data; let data = res.data;
this.totals = data.total; this.totals = data.total;
this.tableData = data.records.map(v => { this.tableData = data.records.map((v) => {
v['enabled'] = (v.isEnabled == 1); v["enabled"] = v.isEnabled == 1;
return v; return v;
}); });
console.log(this.tableData); console.log(this.tableData);
@@ -278,25 +505,25 @@ export default {
}, },
switchClick(id) { switchClick(id) {
effective({ effective({
id: id id: id,
}).then(res => { }).then((res) => {
this.getData(); this.getData();
}); });
}, },
addClick() { addClick() {
this.resource.id = null; this.resource.id = null;
this.resource.name = ''; this.resource.name = "";
this.resource.icon = ''; this.resource.icon = "";
this.resource.skipType = 0; this.resource.skipType = 0;
this.resource.skipContent = ''; this.resource.skipContent = "";
this.resource.url = ''; this.resource.url = "";
this.resource.startTime = null; this.resource.startTime = null;
this.resource.endTime = null; this.resource.endTime = null;
this.resource.seqNo = 0; this.resource.seqNo = 0;
this.resource.ruleValue = {}; this.resource.ruleValue = {};
for (let i = 0, len = this.rules.length; i < len; i++) { for (let i = 0, len = this.rules.length; i < len; i++) {
let rule = this.rules[i]; let rule = this.rules[i];
this.resource.ruleValue[rule.ruleCode] = ''; this.resource.ruleValue[rule.ruleCode] = "";
} }
this.partitionId = null; this.partitionId = null;
this.editDialog = true; this.editDialog = true;
@@ -327,18 +554,22 @@ export default {
editDialogClick() { editDialogClick() {
let startTime = this.resource.startTime; let startTime = this.resource.startTime;
if (startTime) { if (startTime) {
this.resource.startTime = new Date(startTime).format("yyyy-MM-dd hh:mm:ss"); this.resource.startTime = new Date(startTime).format(
"yyyy-MM-dd hh:mm:ss"
);
} else { } else {
$("#tipMsg").text('生效时间不能为空'); $("#tipMsg").text("生效时间不能为空");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
$("#tipModal").css("z-index",'99999999');
return; return;
} }
let endTime = this.resource.endTime; let endTime = this.resource.endTime;
if (endTime) { if (endTime) {
this.resource.endTime = new Date(endTime).format("yyyy-MM-dd hh:mm:ss"); this.resource.endTime = new Date(endTime).format("yyyy-MM-dd hh:mm:ss");
} else { } else {
$("#tipMsg").text('失效时间不能为空'); $("#tipMsg").text("失效时间不能为空");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
$("#tipModal").css("z-index",'99999999');
return; return;
} }
let isEnabled = 0; let isEnabled = 0;
@@ -360,7 +591,7 @@ export default {
isEnabled: isEnabled, isEnabled: isEnabled,
ruleValue: JSON.stringify(this.resource.ruleValue), ruleValue: JSON.stringify(this.resource.ruleValue),
partitionId: this.resource.partitionId, partitionId: this.resource.partitionId,
}).then(res => { }).then((res) => {
this.getData(); this.getData();
this.editDialog = false; this.editDialog = false;
}); });
@@ -381,14 +612,14 @@ export default {
this.getData(); this.getData();
}, },
initPartition() { initPartition() {
getPartitionInfoList().then(res => { getPartitionInfoList().then((res) => {
this.partitionInfos = res.data; this.partitionInfos = res.data;
}); });
}, },
getPartitionInfo(partitionId) { getPartitionInfo(partitionId) {
let partitions = this.partitionInfos.filter(v => v.id == partitionId); let partitions = this.partitionInfos.filter((v) => v.id == partitionId);
if (!partitions || partitions.length <= 0) { if (!partitions || partitions.length <= 0) {
return ''; return "";
} }
return partitions[0].desc; return partitions[0].desc;
}, },

View File

@@ -8,36 +8,39 @@
</section> </section>
<div id="toolbar"> <div id="toolbar">
<div class="col-sm-12"> <div class="col-sm-12">
<label for="erbanNo" <label for="erbanNo" class="col-sm-2 control-label"
class="col-sm-2 control-label">房主平台号:</label> >房主平台号:</label
>
<div class="col-sm-2"> <div class="col-sm-2">
<input type="text" <input
type="text"
class="form-control" class="form-control"
name="erbanNo" name="erbanNo"
id="erbanNo" id="erbanNo"
placeholder=""> placeholder=""
/>
</div> </div>
<label for="roomTitle" <label for="roomTitle" class="col-sm-2 control-label"
class="col-sm-2 control-label">房间标题:</label> >房间标题:</label
>
<div class="col-sm-2"> <div class="col-sm-2">
<input type="text" <input
type="text"
class="form-control" class="form-control"
name="roomTitle" name="roomTitle"
id="roomTitle" id="roomTitle"
placeholder=""> placeholder=""
/>
</div> </div>
<label for="partitionId" <label for="partitionId" class="col-sm-1 control-label"
class="col-sm-1 control-label">地区:</label> >地区:</label
>
<div class="col-sm-2"> <div class="col-sm-2">
<select name="partitionId" <select name="partitionId" id="partitionId" class="form-control">
id="partitionId" <option value="4" selected>华语区</option>
class="form-control">
<option value="4"
selected>华语区</option>
</select> </select>
</div> </div>
<button id="btnSearch" <button id="btnSearch" class="btn btn-default">
class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询 <i class="glyphicon glyphicon-search"></i>查询
</button> </button>
</div> </div>
@@ -46,90 +49,110 @@
<!-- .content --> <!-- .content -->
<div id="table"></div> <div id="table"></div>
</div> </div>
</section> </section>
<!-- 编辑弹框 --> <!-- 编辑弹框 -->
<div class="modal fade" <div
class="modal fade"
id="roomTabHomeModal" id="roomTabHomeModal"
tabindex="-1" tabindex="-1"
role="dialog" role="dialog"
aria-labelledby="modalLabel"> aria-labelledby="modalLabel"
<div class="modal-dialog" >
role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" <button
type="button"
class="close" class="close"
data-dismiss="modal" data-dismiss="modal"
aria-label="Close"><span aria-hidden="true">&times;</span> aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" <h4 class="modal-title" id="modalLabel">编辑</h4>
id="modalLabel">编辑</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal" <form class="form-horizontal" id="addForm">
id="addForm"> <input type="hidden" name="id" id="id" />
<input type="hidden" <input type="hidden" name="roomUid" id="roomUid" />
name="id"
id="id" />
<input type="hidden"
name="roomUid"
id="roomUid" />
<div class="form-group"> <div class="form-group">
<label for="modal_isTop" <label for="modal_isTop" class="col-sm-3 control-label"
class="col-sm-3 control-label">是否置顶<font color="red">*</font></label> >是否置顶<font color="red">*</font></label
>
<div class="col-sm-9"> <div class="col-sm-9">
<select name="isTop" <select name="isTop" id="modal_isTop" class="form-control">
id="modal_isTop"
class="form-control">
<option value=""></option>
<option value="1"></option> <option value="1"></option>
<option value="0"></option> <option value="0"></option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="modal_seq" <label for="homeType" class="col-sm-3 control-label"
class="col-sm-3 control-label">置顶排序<font color="red">*</font>:</label> >房间类型<font color="red">*</font></label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" <select name="type" id="homeType" class="form-control">
<option value="0">普通</option>
<option value="1">热门房间</option>
<option value="2">客服房间</option>
</select>
</div>
</div>
<div class="form-group">
<label for="modal_seq" class="col-sm-3 control-label"
>置顶排序调整为位置排序<font color="red">*</font>:</label
>
<div class="col-sm-9">
<input
type="number"
class="form-control" class="form-control"
name="seq" name="seq"
id="modal_seq" id="modal_seq"
placeholder="数字小的排前面,必填"> min="1"
max="5"
placeholder="填入的数字=在首页的第几个位置"
oninput="this.value = Math.min(Math.max(this.value, 0), 5)"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="modal_topStart" <label for="modal_topStart" class="col-sm-3 control-label"
class="col-sm-3 control-label">置顶开始时间<font color="red">*</font> >置顶开始时间<font color="red">*</font> :</label
:</label> >
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" <input
type="text"
class="input-sm form-control datetime" class="input-sm form-control datetime"
name="topStart" name="topStart"
id="modal_topStart"> id="modal_topStart"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="modal_topEnd" <label for="modal_topEnd" class="col-sm-3 control-label"
class="col-sm-3 control-label">置顶结束时间<font color="red">*</font> >置顶结束时间<font color="red">*</font> :</label
:</label> >
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" <input
type="text"
class="input-sm form-control datetime" class="input-sm form-control datetime"
name="topEnd" name="topEnd"
id="modal_topEnd"> id="modal_topEnd"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="modal_isShow" <label for="modal_isShow" class="col-sm-3 control-label"
class="col-sm-3 control-label">是否在App首页展示<font color="red">*</font></label> >是否在App首页展示<font color="red">*</font></label
>
<div class="col-sm-9"> <div class="col-sm-9">
<select name="isShow" <select
name="isShow"
id="modal_isShow" id="modal_isShow"
class="form-control validate[required]"> class="form-control validate[required]"
>
<option value="1"></option> <option value="1"></option>
<option value="0"></option> <option value="0"></option>
</select> </select>
@@ -138,24 +161,23 @@
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" <button type="button" class="btn btn-default" data-dismiss="modal">
class="btn btn-default" 关闭
data-dismiss="modal">关闭</button> </button>
<button type="button" <button type="button" class="btn btn-primary" id="btnConfirm">
class="btn btn-primary" 确定
id="btnConfirm">确定</button> </button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
import { formatTime } from '@/utils/maintainer'; import { formatTime } from "@/utils/maintainer";
import { getPartitionInfoList } from '@/api/partition/partitionInfo'; import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { buildSelectOption } from '@/utils/system-helper'; import { buildSelectOption } from "@/utils/system-helper";
// tab类型选择变化查询 // tab类型选择变化查询
/*function selectOnTabChange(obj){ /*function selectOnTabChange(obj){
@@ -164,115 +186,189 @@ import { buildSelectOption } from '@/utils/system-helper';
}*/ }*/
export default { export default {
name: "RoomTabHomeView", name: "RoomTabHomeView",
setup () { setup() {
return {}; return {};
}, },
created () { created() {
this.$nextTick(function () { this.$nextTick(function () {
this.initPartition(); this.initPartition();
this.initData(); this.initData();
}); });
}, },
methods: { methods: {
initData () { initData() {
$(function () { $(function () {
$('.datetime').datetimepicker({ $(".datetime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', format: "yyyy-mm-dd hh:ii:00",
autoclose: true autoclose: true,
}); });
$('#table').bootstrapTable('destroy'); $("#table").bootstrapTable("destroy");
$('#table').bootstrapTable({ $("#table").bootstrapTable({
columns: [ columns: [
{ field: 'erbanNo', title: '房主平台号', align: 'center', width: '5%' },
{ field: 'roomUid', title: '房主Uid', align: 'center', width: '5%' },
{ field: 'roomTitle', title: '房间标题', align: 'center', width: '8%' },
{ field: 'roomTag', title: '房间标签', align: 'center', width: '5%' },
{ {
field: 'isPermitRoom', field: "erbanNo",
title: '房间类型', title: "房主平台号",
align: 'center', align: "center",
width: '5%', width: "5%",
},
{
field: "roomUid",
title: "房主Uid",
align: "center",
width: "5%",
},
{
field: "roomTitle",
title: "房间标题",
align: "center",
width: "8%",
},
{
field: "roomTag",
title: "房间标签",
align: "center",
width: "5%",
},
{
field: "isPermitRoom",
title: "房间类型",
align: "center",
width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
let value = ''; let value = "";
if (val == 1) { if (val == 1) {
value = '牌照房'; value = "牌照房";
} else if (val == 4) { } else if (val == 4) {
value = '个播房'; value = "个播房";
} else { } else {
value = '非牌照房'; value = "非牌照房";
} }
return value; return value;
} },
}, },
{ {
field: 'avatar', field: "avatar",
title: '图标内容', title: "图标内容",
align: 'center', align: "center",
width: '5%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
return "<img src='" + val + "' width='40' height='40'>"; return "<img src='" + val + "' width='40' height='40'>";
} },
}, },
{ {
field: 'isTop', field: "isTop",
title: '是否置顶', title: "是否置顶",
align: 'center', align: "center",
valign: 'middle', valign: "middle",
width: '5%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (val == 1) { if (val == 1) {
return '是'; return "是";
} else if (val == 0) { } else if (val == 0) {
return '否'; return "否";
}
return '否';
} }
return "否";
},
}, },
{ {
field: 'isShow', field: "isShow",
title: '是否在App首页展示', title: "是否在App首页展示",
align: 'center', align: "center",
valign: 'middle', valign: "middle",
width: '5%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (val == 1) { if (val == 1) {
return '是'; return "是";
} else if (val == 0) { } else if (val == 0) {
return '否'; return "否";
}
return '是';
} }
}, },
{ field: 'seq', title: '置顶排序', align: 'center', width: '5%' }, },
{ field: 'topStart', title: '置顶开始时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime }, { field: "seq", title: "置顶排序", align: "center", width: "5%" },
{ field: 'topEnd', title: '置顶结束时间', align: 'center', valign: 'middle', width: '10%', formatter: formatTime },
{ {
field: 'isHourTop1', title: '小时榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) { field: "topStart",
return val ? '是' : '否'; title: "置顶开始时间",
} align: "center",
valign: "middle",
width: "10%",
formatter: formatTime,
}, },
{ {
field: 'isHourTop1', title: '周榜top1', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) { field: "topEnd",
return val ? '是' : '否'; title: "置顶结束时间",
} align: "center",
valign: "middle",
width: "10%",
formatter: formatTime,
}, },
{ {
field: 'micUserCount', title: '麦上人数', align: 'center', valign: 'middle', width: '10%' field: "hourTop",
title: "小时榜排名",
align: "center",
valign: "middle",
width: "10%",
}, },
{ {
field: 'onlineNum', title: '房间人数', align: 'center', valign: 'middle', width: '10%' field: "hotValue",
title: "热力值",
align: "center",
valign: "middle",
width: "10%",
}, },
{ {
field: 'id', field: "regionFlag",
title: '操作', title: "地区旗帜",
align: 'center', align: "center",
width: '10%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' + return "<img src='" + val + "' width='40' height='40'>";
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>'; },
} },
} {
field: "homeType",
title: "房间类型",
align: "center",
valign: "middle",
width: "10%",
formatter: function (val, row, index) {
return val == 1
? "热门房间"
: val == 0
? "普通房间"
: "客服房间";
},
},
{
field: "micUserCount",
title: "麦上人数",
align: "center",
valign: "middle",
width: "10%",
},
{
field: "onlineNum",
title: "房间人数",
align: "center",
valign: "middle",
width: "10%",
},
{
field: "id",
title: "操作",
align: "center",
width: "10%",
formatter: function (val, row, index) {
return (
'<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' +
val +
'" data-index="' +
index +
'">' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>'
);
},
},
], ],
undefinedText: "", undefinedText: "",
cache: false, cache: false,
@@ -281,57 +377,79 @@ export default {
search: false, search: false,
sidePagination: "server", //表示服务端请求 sidePagination: "server", //表示服务端请求
queryParamsType: "undefined", queryParamsType: "undefined",
queryParams: function queryParams (params) { //设置查询参数 queryParams: function queryParams(params) {
//设置查询参数
var param = { var param = {
page: params.pageNumber, page: params.pageNumber,
pageSize: params.pageSize, pageSize: params.pageSize,
erbanNo: $('#erbanNo').val(), erbanNo: $("#erbanNo").val(),
roomTitle: $('#roomTitle').val(), roomTitle: $("#roomTitle").val(),
partitionId: $('#partitionId').val(), partitionId: $("#partitionId").val(),
}; };
console.log(param); console.log(param);
return param; return param;
}, },
url: '/admin/roomTabHome/list', url: "/admin/roomTabHome/list",
responseHandler: function (data) { responseHandler: function (data) {
console.info(111, data) console.info(111, data);
if (data.code === 200) { if (data.code === 200) {
return { "rows": data.data, "total": data.data.length }; return { rows: data.data, total: data.data.length };
} else { } else {
return { "rows": [], "total": 0 }; return { rows: [], total: 0 };
} }
}, },
toolbar: '#toolbar', toolbar: "#toolbar",
onLoadSuccess: function () { //加载成功时执行 onLoadSuccess: function () {
//加载成功时执行
console.log("load success"); console.log("load success");
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () {
//加载失败时执行
console.log("load fail"); console.log("load fail");
} },
}); });
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $("#btnSearch").on("click", function () {
TableHelper.doRefresh('#table'); TableHelper.doRefresh("#table");
}); });
// 编辑或者新增 // 编辑或者新增
$("#btnConfirm").click(function () { $("#btnConfirm").click(function () {
var id = $("#id").val(); var id = $("#id").val();
var roomUid = $('#roomUid').val(); var roomUid = $("#roomUid").val();
var seq = $("#modal_seq").val(); var seq = $("#modal_seq").val();
var isTop = $("#modal_isTop").val(); var isTop = $("#modal_isTop").val();
var homeType = $("#homeType").val();
var iconContent = $("#modal_iconContent").val(); var iconContent = $("#modal_iconContent").val();
var topStart = $("#modal_topStart").val(); var topStart = $("#modal_topStart").val();
var topEnd = $("#modal_topEnd").val(); var topEnd = $("#modal_topEnd").val();
var isShow = $('#modal_isShow').val(); var isShow = $("#modal_isShow").val();
if ($("#addForm").validationEngine('validate')) { if (
isTop == 1 && seq <1
) {
alert("置顶为是时排序必须大于等于1");
return;
}
if (
isTop == "" ||
homeType == "" ||
seq == "" ||
topStart == "" ||
topEnd == "" ||
isShow == ""
) {
alert("请填写必填项");
return;
}
if ($("#addForm").validationEngine("validate")) {
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/admin/roomTabHome/save", url: "/admin/roomTabHome/save",
data: { data: {
id: id, id: id,
roomUid: roomUid, roomUid: roomUid,
homeType: homeType,
seq: seq, seq: seq,
isTop: isTop, isTop: isTop,
iconContent: iconContent, iconContent: iconContent,
@@ -343,34 +461,34 @@ export default {
success: function (json) { success: function (json) {
if (json.code == 200) { if (json.code == 200) {
$("#tipMsg").text("保存成功"); $("#tipMsg").text("保存成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
$("#roomTabHomeModal").modal('hide'); $("#roomTabHomeModal").modal("hide");
} else { } else {
$("#tipMsg").text("保存失败." + json.msg); $("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
$("#roomTabHomeModal").modal('hide'); $("#roomTabHomeModal").modal("hide");
}
} }
},
}); });
} }
}); });
// 获取信息 // 获取信息
$("#table").on("click", '.opt-edit', function () { $("#table").on("click", ".opt-edit", function () {
var id = $(this).attr("data-id"); var id = $(this).attr("data-id");
const index = $(this).data('index'); const index = $(this).data("index");
const record = TableHelper.getData('#table')[index]; const record = TableHelper.getData("#table")[index];
$("#id").val(null); $("#id").val(null);
$("#modal_seq").val(0); $("#modal_seq").val(0);
$("#modal_isTop").val(0); $("#modal_isTop").val(0);
$("#modal_topStart").val(''); $("#homeType").val(record.homeType + "");
$("#modal_topEnd").val(''); $("#modal_topStart").val(formatTime(record.topStart));
$("#modal_isShow").val(0); $("#modal_topEnd").val(formatTime(record.topEnd));
$('#roomUid').val(record.roomUid); $("#modal_isShow").val(1);
if (id && id != 'null') { $("#roomUid").val(record.roomUid);
if (id && id != "null") {
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/admin/roomTabHome/get", url: "/admin/roomTabHome/get",
@@ -382,53 +500,53 @@ export default {
$("#id").val(id); $("#id").val(id);
$("#modal_seq").val(json.seq); $("#modal_seq").val(json.seq);
$("#modal_isTop").val(json.isTop ? 1 : 0); $("#modal_isTop").val(json.isTop ? 1 : 0);
$("#homeType").val(json.homeType);
$("#modal_topStart").val(formatTime(json.topStart)); $("#modal_topStart").val(formatTime(json.topStart));
$("#modal_topEnd").val(formatTime(json.topEnd)); $("#modal_topEnd").val(formatTime(json.topEnd));
$("#modal_isShow").val(json.isShow ? 1 : 0); $("#modal_isShow").val(json.isShow ? 1 : 0);
} else { } else {
$("#tipMsg").text("获取菜单信息出错"); $("#tipMsg").text("获取菜单信息出错");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
}
} }
},
}); });
} }
// 打开编辑弹窗 // 打开编辑弹窗
$("#roomTabHomeModal").modal('show'); $("#roomTabHomeModal").modal("show");
$("#modalLabel").text("编辑"); $("#modalLabel").text("编辑");
}); });
// 删除操作 // 删除操作
$("#table").on("click", '.opt-remove', function () { $("#table").on("click", ".opt-remove", function () {
var id = $(this).attr("data-id"); var id = $(this).attr("data-id");
if (id == 'undefined') { if (id == "undefined") {
$("#tipMsg").text("id参数有误"); $("#tipMsg").text("id参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (confirm("你确认删除吗? \r\n 删除后不会恢复请谨慎操作")) { if (confirm("你确认删除吗? \r\n 删除后不会恢复请谨慎操作")) {
$.ajax({ $.ajax({
type: 'post', type: "post",
url: "/admin/roomTabHome/delete", url: "/admin/roomTabHome/delete",
data: { id: id }, data: { id: id },
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
if (json.code == 200) { if (json.code == 200) {
$("#tipMsg").text("删除成功"); $("#tipMsg").text("删除成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
} else { } else {
$("#tipMsg").text("删除失败"); $("#tipMsg").text("删除失败");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
}
} }
},
}); });
} }
}); });
}); });
}, },
initPartition () { initPartition() {
getPartitionInfoList().then(res => { getPartitionInfoList().then((res) => {
let data = res.data; let data = res.data;
buildSelectOption( buildSelectOption(
"#partitionId", "#partitionId",

View File

@@ -6,6 +6,14 @@
<section class="content-header"> <section class="content-header">
<h1 id="itemTitle"></h1> <h1 id="itemTitle"></h1>
</section> </section>
<div class="col-sm-12">
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
<div class="col-sm-2">
<select name="partitionId" id="partitionId" class="form-control">
<option value="4" selected>华语区</option>
</select>
</div>
</div>
<div id="toolbar"> <div id="toolbar">
<div class="col-sm-12"> <div class="col-sm-12">
<button id="btnSearch" class="btn btn-default"> <button id="btnSearch" class="btn btn-default">
@@ -16,22 +24,32 @@
</button> </button>
</div> </div>
<input type="hidden" id="currentPageNum"> <input type="hidden" id="currentPageNum" />
</div> </div>
</div> </div>
<!-- .content --> <!-- .content -->
<div id="table"></div> <div id="table"></div>
</div> </div>
</section> </section>
<div class="modal fade" id="roomTabModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"> <div
class="modal fade"
id="roomTabModal"
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-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button
aria-hidden="true">&times;</span> type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="modalLabel">编辑房间标签</h4> <h4 class="modal-title" id="modalLabel">编辑房间标签</h4>
</div> </div>
@@ -39,34 +57,81 @@
<form class="form-horizontal" id="addForm"> <form class="form-horizontal" id="addForm">
<input type="hidden" name="id" id="id" /> <input type="hidden" name="id" id="id" />
<div class="form-group"> <div class="form-group">
<label for="modal_seq" class="col-sm-3 control-label">排序<font color="red">*</font>:</label> <label for="modal_seq" class="col-sm-3 control-label"
>排序<font color="red">*</font>:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[custom[integer]]" name="seq" id="modal_seq" <input
placeholder="数字小的排前面,必填"> type="text"
class="form-control validate[custom[integer]]"
name="seq"
id="modal_seq"
placeholder="数字小的排前面,必填"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="modal_name" class="col-sm-3 control-label">名称<font color="red">*</font>:</label> <label for="modal_name" class="col-sm-3 control-label"
>名称<font color="red">*</font>:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="modal_name"> <input
type="text"
class="form-control validate[required]"
name="name"
id="modal_name"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="ar_modal_name" class="col-sm-3 control-label">阿语名称<font color="red">*</font>:</label> <label for="ar_modal_name" class="col-sm-3 control-label"
>阿语名称<font color="red">*</font>:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="ar_modal_name"> <input
type="text"
class="form-control validate[required]"
name="name"
id="ar_modal_name"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="en_modal_name" class="col-sm-3 control-label">英语名称<font color="red">*</font>:</label> <label for="en_modal_name" class="col-sm-3 control-label"
>英语名称<font color="red">*</font>:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="en_modal_name"> <input
type="text"
class="form-control validate[required]"
name="name"
id="en_modal_name"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="status" class="col-sm-3 control-label">显示状态<font color="red">*</font></label> <label for="tr_modal_name" class="col-sm-3 control-label"
>土耳其名称<font color="red">*</font>:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<select name="status" id="modal_status" class="form-control validate[required]"> <input
type="text"
class="form-control validate[required]"
name="name"
id="tr_modal_name"
/>
</div>
</div>
<div class="form-group">
<label for="status" class="col-sm-3 control-label"
>显示状态<font color="red">*</font></label
>
<div class="col-sm-9">
<select
name="status"
id="modal_status"
class="form-control validate[required]"
>
<option value=""></option> <option value=""></option>
<option value="1">显示</option> <option value="1">显示</option>
<option value="0">不显示</option> <option value="0">不显示</option>
@@ -74,32 +139,64 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="room_tab_show" class="col-sm-3 control-label">房间管理列表展示状态<font color="red">*</font> <label for="room_tab_show" class="col-sm-3 control-label"
</label> >房间管理列表展示状态<font color="red">*</font> </label
>
<div class="col-sm-9"> <div class="col-sm-9">
<select name="room_tab_show" id="modal_room_tab_show" <select
class="form-control validate[required]"> name="room_tab_show"
id="modal_room_tab_show"
class="form-control validate[required]"
>
<option value=""></option> <option value=""></option>
<option value="true">展示</option> <option value="true">展示</option>
<option value="false">不展示</option> <option value="false">不展示</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group" id="imgBox">
<label class="col-sm-3 control-label">icon</label>
<div class="col-sm-8">
<img
src=""
id="iconImgUrl"
style="width: 108px; height: 45px"
alt=""
/>
<input
type="file"
id="iconFile"
name="uploadFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
/>
<button class="btn btn-success" type="button" id="iconBtn">
上传
</button>
<input
type="hidden"
id="iconUrl"
name="alertWinPic"
class="form-control validate[required]"
/>
</div>
</div>
</form> </form>
</div> </div>
<div class="modal-footer"> <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> <button type="button" class="btn btn-primary" id="add">确定</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { buildSelectOption } from "@/utils/system-helper";
export default { export default {
name: "RoomTabView", name: "RoomTabView",
setup() { setup() {
@@ -107,53 +204,103 @@ export default {
}, },
created() { created() {
this.$nextTick(function () { this.$nextTick(function () {
this.initPartition();
this.initData(); this.initData();
}); });
}, },
methods: { methods: {
initData() { initData() {
$(function () { $(function () {
$('#table').bootstrapTable('destroy'); $("#table").bootstrapTable("destroy");
$('#table').bootstrapTable({ $("#table").bootstrapTable({
columns: [ columns: [
{ field: 'seq', title: '排序', align: 'center', width: '5%' }, { field: "seq", title: "排序", align: "center", width: "5%" },
{field: 'name.zh', title: 'Tab名称', align: 'center', width: '10%'},
{field: 'name.ar', title: '阿语Tab名称', align: 'center', width: '10%'},
{field: 'name.en', title: '英语Tab名称', align: 'center', width: '10%'},
{ {
field: 'status', title: '显示状态', align: 'center', valign: 'middle', width: '5%', field: "name.zh",
formatter: function (val, row, index) { title: "Tab名称",
if (val) { align: "center",
return '显示'; width: "10%",
} else {
return '不显示';
}
}
}, },
{ {
field: 'roomTabShow', title: '房间管理列表展示状态', align: 'center', valign: 'middle', width: '5%', field: "name.ar",
formatter: function (val, row, index) { title: "阿语Tab名称",
if (val) { align: "center",
return '展示'; width: "10%",
} else {
return '不展示';
}
}
}, },
{ {
field: 'id', field: "name.en",
title: '操作', title: "英语Tab名称",
align: 'center', align: "center",
width: '10%', width: "10%",
},
{
field: "name.tr",
title: "土耳其Tab名称",
align: "center",
width: "10%",
},
{
field: "status",
title: "显示状态",
align: "center",
valign: "middle",
width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' + if (val) {
return "显示";
} else {
return "不显示";
}
},
},
{
field: "icon",
title: "图标",
align: "center",
valign: "middle",
width: "10%",
formatter: function (val, row, index) {
if (null != val && val != "") {
return (
'<img src="' +
val +
'" alt="" style="width: 50px; height: 50px;">'
);
}
return "-";
},
},
{
field: "roomTabShow",
title: "房间管理列表展示状态",
align: "center",
valign: "middle",
width: "5%",
formatter: function (val, row, index) {
if (val) {
return "展示";
} else {
return "不展示";
}
},
},
{
field: "id",
title: "操作",
align: "center",
width: "10%",
formatter: function (val, row, index) {
return (
'<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' +
val +
">" +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' + '<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val + '&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' +
'><i class="glyphicon glyphicon-remove"></i>删除</button>'; val +
} '><i class="glyphicon glyphicon-remove"></i>删除</button>'
} );
},
},
], ],
undefinedText: 0, undefinedText: 0,
cache: false, cache: false,
@@ -165,27 +312,30 @@ export default {
search: false, search: false,
sidePagination: "server", //表示服务端请求 sidePagination: "server", //表示服务端请求
queryParamsType: "undefined", queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数 queryParams: function queryParams(params) {
//设置查询参数
$("#currentPageNum").val(params.pageNumber); $("#currentPageNum").val(params.pageNumber);
var param = { var param = {
page: params.pageNumber, page: params.pageNumber,
pageSize: params.pageSize, pageSize: params.pageSize,
partitionId: $("#partitionId").val(),
}; };
return param; return param;
}, },
ajax: function (request) { //使用ajax请求 ajax: function (request) {
//使用ajax请求
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: '/admin/roomTab/list', url: "/admin/roomTab/list",
contentType: 'application/json;charset=utf-8', contentType: "application/json;charset=utf-8",
dataType: 'json', dataType: "json",
data: request.data, data: request.data,
success: function (res) { success: function (res) {
console.log(res); console.log(res);
request.success({ request.success({
"rows": res.rows.map(i=>{ rows: res.rows.map((i) => {
let name = i.name; let name = i.name;
if (name.startsWith('{') && name.endsWith('}')) { if (name.startsWith("{") && name.endsWith("}")) {
i.name = JSON.parse(i.name); i.name = JSON.parse(i.name);
} else { } else {
i.name = { i.name = {
@@ -196,45 +346,46 @@ export default {
} }
return i; return i;
}), }),
"total": res.total total: res.total,
}); });
}, },
error: function (error) { error: function (error) {
console.log(error); console.log(error);
}
})
}, },
toolbar: '#toolbar', });
onLoadSuccess: function () { //加载成功时执行 },
toolbar: "#toolbar",
onLoadSuccess: function () {
//加载成功时执行
console.log("load success"); console.log("load success");
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () {
//加载失败时执行
console.log("load fail"); console.log("load fail");
} },
}); });
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $("#btnSearch").on("click", function () {
TableHelper.doRefresh('#table'); TableHelper.doRefresh("#table");
}); });
//新建标签 //新建标签
$("#btnAdd").click(function () { $("#btnAdd").click(function () {
$("#id").val(""); $("#id").val("");
$("#modal_name").val(""); $("#modal_name").val("");
$("#ar_modal_name").val(""); $("#ar_modal_name").val("");
$("#en_modal_name").val(""); $("#en_modal_name").val("");
$("#tr_modal_name").val("");
$("#modal_seq").val(""); $("#modal_seq").val("");
$("#modal_status").val(""); $("#modal_status").val("");
$("#modal_room_tab_show").val(""); $("#modal_room_tab_show").val("");
$("#modal_type").val(""); $("#modal_type").val("");
$("#modal_istop").val(""); $("#modal_istop").val("");
$("#modal_description").val(""); $("#modal_description").val("");
$('#addActPic').val(''); $("#addActPic").val("");
$('#addUploadFile').val(''); $("#addUploadFile").val("");
$('#addImgUrl').attr('src', ''); $("#addImgUrl").attr("src", "");
$("#roomTabModal").modal('show'); $("#roomTabModal").modal("show");
}); });
$("#add").click(function () { $("#add").click(function () {
@@ -244,14 +395,16 @@ export default {
var ar_name = $("#ar_modal_name").val(); var ar_name = $("#ar_modal_name").val();
// 英语名称 // 英语名称
var en_name = $("#en_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); const nameValue = JSON.stringify(jsonName);
var seq = $("#modal_seq").val(); var seq = $("#modal_seq").val();
var status = $("#modal_status").val(); var status = $("#modal_status").val();
var roomTabShow = $("#modal_room_tab_show").val(); var roomTabShow = $("#modal_room_tab_show").val();
var icon = $("#iconImgUrl").attr("src");
if ($("#addForm").validationEngine('validate')) { if ($("#addForm").validationEngine("validate")) {
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/admin/roomTab/save", url: "/admin/roomTab/save",
@@ -261,31 +414,31 @@ export default {
seq: seq, seq: seq,
status: status, status: status,
roomTabShow: roomTabShow, roomTabShow: roomTabShow,
icon: icon,
}, },
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
if (json.code == 200) { if (json.code == 200) {
$("#tipMsg").text("保存成功"); $("#tipMsg").text("保存成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
$("#roomTabModal").modal('hide'); $("#roomTabModal").modal("hide");
} else { } else {
$("#tipMsg").text("保存失败." + json.msg); $("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
$("#roomTabModal").modal('hide'); $("#roomTabModal").modal("hide");
}
} }
},
}); });
} }
}); });
$("#table").on("click", '.opt-edit', function () { $("#table").on("click", ".opt-edit", function () {
var id = $(this).attr("data-id"); var id = $(this).attr("data-id");
$('#addImgUrl').attr('src', ''); $("#addImgUrl").attr("src", "");
$('#addActPic').val(''); $("#addActPic").val("");
$('#addUploadFile').val(''); $("#addUploadFile").val("");
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/admin/roomTab/get", url: "/admin/roomTab/get",
@@ -297,19 +450,24 @@ export default {
var json = ret.data.roomTab; var json = ret.data.roomTab;
$("#id").val(id); $("#id").val(id);
let name = json.name; let name = json.name;
if (name.startsWith('{') && name.endsWith('}')) { $('#iconImgUrl').attr('src',json.icon);
if (name.startsWith("{") && name.endsWith("}")) {
var jsonName = JSON.parse(json.name); var jsonName = JSON.parse(json.name);
$("#modal_name").val(jsonName.zh); $("#modal_name").val(jsonName.zh);
// 阿语名称 // 阿语名称
$("#ar_modal_name").val(jsonName.ar); $("#ar_modal_name").val(jsonName.ar);
// 英语名称 // 英语名称
$("#en_modal_name").val(jsonName.en); $("#en_modal_name").val(jsonName.en);
// 土耳其名称
$("#tr_modal_name").val(jsonName.tr);
} else { } else {
$("#modal_name").val(name); $("#modal_name").val(name);
// 阿语名称 // 阿语名称
$("#ar_modal_name").val(name); $("#ar_modal_name").val(name);
// 英语名称 // 英语名称
$("#en_modal_name").val(name); $("#en_modal_name").val(name);
// 土耳其名称
$("#tr_modal_name").val(name);
} }
$("#modal_seq").val(json.seq); $("#modal_seq").val(json.seq);
if (json.status == 1) { if (json.status == 1) {
@@ -323,47 +481,104 @@ export default {
$("#modal_room_tab_show").val("false"); $("#modal_room_tab_show").val("false");
} }
// 打开编辑弹窗 // 打开编辑弹窗
$("#roomTabModal").modal('show'); $("#roomTabModal").modal("show");
$("#modalLabel").text("编辑房间Tab"); $("#modalLabel").text("编辑房间Tab");
} else { } else {
$("#tipMsg").text("获取菜单信息出错"); $("#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"); var id = $(this).attr("data-id");
if (id == 'undefined') { if (id == "undefined") {
$("#tipMsg").text("id参数有误"); $("#tipMsg").text("id参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (confirm("你确认删除吗? \r\n 删除后隐藏tab不会显示请谨慎操作")) { if (
confirm("你确认删除吗? \r\n 删除后隐藏tab不会显示请谨慎操作")
) {
$.ajax({ $.ajax({
type: 'post', type: "post",
url: "/admin/roomTab/hide", url: "/admin/roomTab/hide",
data: { id: id }, data: { id: id },
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
if (json.code == 200) { if (json.code == 200) {
$("#tipMsg").text("删除成功"); $("#tipMsg").text("删除成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
} else { } else {
$("#tipMsg").text("删除失败"); $("#tipMsg").text("删除失败");
$("#tipModal").modal('show'); $("#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会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) {
//提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$("#iconUrl").val(json.path);
$("#iconImgUrl").attr("src", json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal("show");
}
},
error: function (data, status, e) {
//提交失败自动执行的处理函数。
console.error(e);
},
});
});
function clearModal() {
$("#iconImgUrl").attr("src", "");
$("#addForm")
.find("input[type=text],input[type=hidden],input[type=file]")
.each(function () {
$(this).val("");
});
$("#type").val(1);
}
});
},
initPartition() {
getPartitionInfoList().then((res) => {
let data = res.data;
buildSelectOption(
"#partitionId",
4,
data.map((v) => {
return {
value: v.id,
text: v.desc,
};
})
);
});
},
},
}; };
</script> </script>

View File

@@ -103,6 +103,12 @@
<input type="text" class="form-control validate[required]" name="name" id="en_modal_name"> <input type="text" class="form-control validate[required]" name="name" id="en_modal_name">
</div> </div>
</div> </div>
<div class="form-group">
<label for="tr_modal_name" 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="name" id="tr_modal_name">
</div>
</div>
<!-- 上传act图片 --> <!-- 上传act图片 -->
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">图片:</label> <label class="col-sm-3 control-label">图片:</label>
@@ -214,6 +220,7 @@ export default {
{field: 'name.zh', title: '名称', align: 'center', width: '10%'}, {field: 'name.zh', title: '名称', align: 'center', width: '10%'},
{field: 'name.ar', title: '阿语名称', align: 'center', width: '10%'}, {field: 'name.ar', title: '阿语名称', align: 'center', width: '10%'},
{field: 'name.en', title: '英语名称', align: 'center', width: '10%'}, {field: 'name.en', title: '英语名称', align: 'center', width: '10%'},
{field: 'name.tr', title: '土耳其名称', align: 'center', width: '10%'},
{field: 'pict', title: '图片', align:'center', width: '10%',valign:'center', {field: 'pict', title: '图片', align:'center', width: '10%',valign:'center',
formatter: function (val,row,index) { formatter: function (val,row,index) {
if(null == val || val == '') { if(null == val || val == '') {
@@ -390,6 +397,7 @@ export default {
$("#modal_name").val(""); $("#modal_name").val("");
$("#ar_modal_name").val(""); $("#ar_modal_name").val("");
$("#en_modal_name").val(""); $("#en_modal_name").val("");
$("#tr_modal_name").val("");
$("#modal_seq").val(""); $("#modal_seq").val("");
$("#modal_status").val(""); $("#modal_status").val("");
$("#modal_type").val(""); $("#modal_type").val("");
@@ -409,8 +417,10 @@ export default {
var ar_name = $("#ar_modal_name").val(); var ar_name = $("#ar_modal_name").val();
// 英语名称 // 英语名称
var en_name = $("#en_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); const nameValue = JSON.stringify(jsonName);
var seq = $("#modal_seq").val(); var seq = $("#modal_seq").val();
var status = $("#modal_status").val(); var status = $("#modal_status").val();
@@ -483,12 +493,16 @@ export default {
$("#ar_modal_name").val(jsonName.ar); $("#ar_modal_name").val(jsonName.ar);
// 英语名称 // 英语名称
$("#en_modal_name").val(jsonName.en); $("#en_modal_name").val(jsonName.en);
// 土耳其名称
$("#tr_modal_name").val(jsonName.tr);
} else { } else {
$("#modal_name").val(name); $("#modal_name").val(name);
// 阿语名称 // 阿语名称
$("#ar_modal_name").val(name); $("#ar_modal_name").val(name);
// 英语名称 // 英语名称
$("#en_modal_name").val(name); $("#en_modal_name").val(name);
// 土耳其名称
$("#tr_modal_name").val(name);
} }
$("#modal_seq").val(json.seq); $("#modal_seq").val(json.seq);

View File

@@ -300,7 +300,6 @@
> >
<!-- 这里是原来的图片预览 --> <!-- 这里是原来的图片预览 -->
<el-image <el-image
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
:src="dialogObj.imageUrl2" :src="dialogObj.imageUrl2"
:zoom-rate="1.1" :zoom-rate="1.1"
@@ -415,6 +414,7 @@ export default {
listPartitionInfo().then((res) => { listPartitionInfo().then((res) => {
console.log(res); console.log(res);
this.inquire.partitionArr = res.data; this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
this.getData(); this.getData();
}); });
}, },

View File

@@ -224,6 +224,7 @@ export default {
listPartitionInfo().then((res) => { listPartitionInfo().then((res) => {
console.log(res); console.log(res);
this.inquire.partitionArr = res.data; this.inquire.partitionArr = res.data;
this.inquire.partitionId = this.inquire.partitionArr[0].id;
this.getData(); this.getData();
}); });
}, },

View File

@@ -178,6 +178,7 @@ export default {
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss"); endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
} }
list({ list({
partitionId: 2,
erbanNo: this.inquire.anchorId, erbanNo: this.inquire.anchorId,
guildId: this.inquire.guildId, guildId: this.inquire.guildId,
ownerErbanNo: this.inquire.guildUserId, ownerErbanNo: this.inquire.guildUserId,

View File

@@ -60,6 +60,13 @@
v-model="i18nMessage.ar" /> v-model="i18nMessage.ar" />
</div> </div>
</div> </div>
<div class="form-group">
<label for="ar" class="col-sm-3 control-label">土耳其:</label>
<div class="col-sm-8">
<input type="text" class="form-control validate[required]" name="tr" id="tr"
v-model="i18nMessage.tr" />
</div>
</div>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@@ -84,6 +91,7 @@ export default {
{ field: 'zh', title: '华语', align: 'center', width: '15%' }, { field: 'zh', title: '华语', align: 'center', width: '15%' },
{ field: 'en', title: '英语', align: 'center', width: '15%' }, { field: 'en', title: '英语', align: 'center', width: '15%' },
{ field: 'ar', title: '阿语', align: 'center', width: '15%' }, { field: 'ar', title: '阿语', align: 'center', width: '15%' },
{ field: 'tr', title: '土耳其', align: 'center', width: '15%' },
{ {
field: 'key', field: 'key',
title: '操作', title: '操作',
@@ -151,6 +159,7 @@ export default {
this.i18nMessage.zh = ''; this.i18nMessage.zh = '';
this.i18nMessage.en = ''; this.i18nMessage.en = '';
this.i18nMessage.ar = ''; this.i18nMessage.ar = '';
this.i18nMessage.tr = '';
$('#editModal').modal('show'); $('#editModal').modal('show');
}, },
edit(obj) { edit(obj) {
@@ -160,6 +169,7 @@ export default {
this.i18nMessage.zh = record.zh; this.i18nMessage.zh = record.zh;
this.i18nMessage.en = record.en; this.i18nMessage.en = record.en;
this.i18nMessage.ar = record.ar; this.i18nMessage.ar = record.ar;
this.i18nMessage.tr = record.tr;
$('#editModal').modal('show'); $('#editModal').modal('show');
}, },
save() { save() {

View File

@@ -87,17 +87,15 @@ export default {
{ field: 'nick', title: '查询用户昵称', align: 'center', valign: 'middle', width: '10%' }, { field: 'nick', title: '查询用户昵称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'erbanNo', title: '查询用户平台号', align: 'center', valign: 'middle', width: '10%' }, { field: 'erbanNo', title: '查询用户平台号', align: 'center', valign: 'middle', width: '10%' },
{ field: 'targetNick', title: '对应对象昵称', align: 'center', valign: 'middle', width: '10%' }, { field: 'targetNick', title: '对应对象昵称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'targetErbanNo', title: '对应对象平台号', align: 'center', valign: 'middle', width: '10%' }, { field: 'targetErbanNo', title: '对应对象平台号', align: 'center', valign: 'middle', width: '5%' },
{ field: 'roomNick', title: '消费地点房主昵称', align: 'center', valign: 'middle', width: '10%' }, { field: 'roomNick', title: '消费地点房主昵称', align: 'center', valign: 'middle', width: '10%' },
{ field: 'roomErbanNo', title: '房主平台号', align: 'center', valign: 'middle', width: '10%' }, { field: 'roomErbanNo', title: '房主平台号', align: 'center', valign: 'middle', width: '5%' },
{ field: 'giftName', title: '礼物名称', align: 'center', valign: 'middle', width: '5%' }, { field: 'giftName', title: '礼物名称', align: 'center', valign: 'middle', width: '5%' },
{ field: 'giftNum', title: '礼物数量', align: 'center', valign: 'middle', width: '5%' }, { field: 'giftNum', title: '礼物数量', align: 'center', valign: 'middle', width: '5%' },
{ field: 'amount', title: '金币/水晶/钻石', align: 'center', valign: 'middle', width: '5%' },
{ field: 'country', title: '国家/地区', align: 'center', valign: 'middle', width: '5%' },
{ field: 'localCurrencyCode', title: '本地货币数', align: 'center', valign: 'middle', width: '5%' },
{ field: 'localAmount', title: '货币数', align: 'center', valign: 'middle', width: '5%' },
{ field: 'currencyDesc', title: '交易币种', align: 'center', valign: 'middle', width: '5%' }, { field: 'currencyDesc', title: '交易币种', align: 'center', valign: 'middle', width: '5%' },
{ field: 'billTypeDesc', title: '账单类型', align: 'center', valign: 'middle', width: '10%' }, { field: 'beforeAmount', title: '变动前', align: 'center', valign: 'middle', width: '5%' },
{ field: 'amount', title: '金币/钻石', align: 'center', valign: 'middle', width: '5%' },
{ field: 'afterAmount', title: '变动后', align: 'center', valign: 'middle', width: '5%' },
{ field: 'objTypeDesc', title: '业务类型', align: 'center', valign: 'middle', width: '10%' }, { field: 'objTypeDesc', title: '业务类型', align: 'center', valign: 'middle', width: '10%' },
{ {
field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) { field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '10%', formatter: function (val, row, index) {
@@ -113,9 +111,9 @@ export default {
cache: false, cache: false,
striped: true, striped: true,
showRefresh: false, showRefresh: false,
pageSize: 10, pageSize: 20,
pagination: true, pagination: true,
pageList: [10, 20, 30, 50], pageList: [ 20, 30, 50],
sidePagination: "server", //表示服务端请求 sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder //设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order //设置为limit可以获取limit, offset, search, sort, order

View File

@@ -101,6 +101,7 @@ export default {
columns: [ columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' }, { field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' }, { field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' }, { field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' }, { field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' }, { field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -96,6 +96,7 @@ export default {
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'}, {field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/ {field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' }, { field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
{ field: 'razerAmount', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' }, { field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
{ field: 'myCardAmount', title: 'MyCard支付', align: 'center', width: '5%' }, { field: 'myCardAmount', title: 'MyCard支付', align: 'center', width: '5%' },
{ field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' }, { field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },
@@ -163,7 +164,7 @@ export default {
columns: [ columns: [
{ field: 'channel', title: '渠道', align: 'center', width: '5%' }, { field: 'channel', title: '渠道', align: 'center', width: '5%' },
{ field: 'amount', title: '充值金额', align: 'center', width: '5%' }, { field: 'amount', title: '充值金额', align: 'center', width: '5%' },
{ field: 'count', title: '充值笔数', align: 'center', width: '5%' } { field: 'count', title: '充值笔数', align: 'center', width: '5%' },
], ],
undefinedText: 0, undefinedText: 0,

View File

@@ -101,6 +101,7 @@ export default {
columns: [ columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' }, { field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' }, { field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' }, { field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' }, { field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' }, { field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -97,6 +97,7 @@ export default {
columns: [ columns: [
{ field: 'partitionName', title: '分区', align: 'center', width: '25%' }, { field: 'partitionName', title: '分区', align: 'center', width: '25%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '25%' }, { field: 'googleUsd', title: 'google充值美元', align: 'center', width: '25%' },
{ field: 'razerUsd', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '25%' }, { field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '25%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '25%' }, { field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '25%' },
{ field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '25%' }, { field: 'iosUsd', title: 'ios充值美元', align: 'center', width: '25%' },

View File

@@ -115,6 +115,7 @@ export default {
{field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'}, {field: 'iosPayAmount', title: 'IOS支付', align: 'center', width: '5%'},
{field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/ {field: 'wxMiniAppAmount', title: '小程序支付', align: 'center', width: '5%'},*/
{ field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' }, { field: 'googleAmount', title: 'google支付', align: 'center', width: '5%' },
{ field: 'razerAmount', title: 'razer充值', align: 'center', width: '14%' },
{ field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' }, { field: 'payermaxAmount', title: 'payermax支付', align: 'center', width: '5%' },
{ field: 'myCardAmount', title: 'myCard支付', align: 'center', width: '5%' }, { field: 'myCardAmount', title: 'myCard支付', align: 'center', width: '5%' },
{ field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' }, { field: 'startPayAmount', title: 'startPay支付', align: 'center', width: '5%' },

View File

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

View File

@@ -101,6 +101,7 @@ export default {
columns: [ columns: [
{ field: 'date', title: '日期', align: 'center', width: '14%' }, { field: 'date', title: '日期', align: 'center', width: '14%' },
{ field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' }, { field: 'googleUsd', title: 'google充值美元', align: 'center', width: '14%' },
{ field: 'razerUsd', title: 'razer充值1', align: 'center', width: '14%' },
{ field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' }, { field: 'payermaxUsd', title: 'payermax充值美元', align: 'center', width: '14%' },
{ field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' }, { field: 'myCardUsd', title: 'myCard充值美元', align: 'center', width: '14%' },
{ field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' }, { field: 'startPayUsd', title: 'startPay充值美元', align: 'center', width: '14%' },

View File

@@ -29,8 +29,8 @@
</div> </div>
<label class="col-sm-2 control-label">统计时间:</label> <label class="col-sm-2 control-label">统计时间:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="beginTime" id="beginTime"> <div class="col-sm-2"><input type="text" class="form-control" name="beginTime" id="beginTime"></div>
</div><span class="col-sm-1"></span> <span class="col-sm-1"></span>
<div class="col-sm-2"><input type="text" class="form-control" name="endTime" id="endTime"></div> <div class="col-sm-2"><input type="text" class="form-control" name="endTime" id="endTime"></div>
</div> </div>
@@ -111,24 +111,7 @@
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from '@/utils/bootstrap-table-helper';
var picker1 = $("#beginTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true,
todayBtn: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true,
todayBtn: true
});
var picker3 = $('#editEndTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
})
var picker4 = $('#editStartTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
})
/*picker1.on('changeDate', function () { /*picker1.on('changeDate', function () {
var date = $('#beginDate').datetimepicker('getDate'); var date = $('#beginDate').datetimepicker('getDate');
@@ -290,7 +273,16 @@ export default {
console.log("load fail"); console.log("load fail");
} }
}); });
var picker1 = $("#beginTime").datetimepicker({
format: 'yyyy-mm-dd hh:mm:ss',
autoclose: true,
todayBtn: true,
});
var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:mm:ss',
autoclose: true,
todayBtn: true
});
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table'); TableHelper.doRefresh('#table');

View File

@@ -15,58 +15,85 @@
<option value="4">工会账号</option> <option value="4">工会账号</option>
<option value="5">大头账号</option> <option value="5">大头账号</option>
</select> </select>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 操作时间
操作时间 <input
<input type="text" name="startTime" id="startTime" class="input-sm" placeholder="请选择开始时间"> type="text"
- <input type="text" name="endTime" id="endTime" class="input-sm" placeholder="请选择结束时间"> name="startTime"
id="startTime"
class="input-sm"
placeholder="请选择开始时间"
/>
-
<input
type="text"
name="endTime"
id="endTime"
class="input-sm"
placeholder="请选择结束时间"
/>
</form> </form>
<button id="btnSearch" class="btn btn-primary"> <button id="btnSearch" class="btn btn-primary">
<i class="glyphicon glyphicon-search"></i>查询 <i class="glyphicon glyphicon-search"></i>查询
</button> </button>
<button class="btn btn-success" id='addBtn'> <button class="btn btn-success" id="addBtn">
<i class="glyphicon glyphicon-plus"></i>生成账号 <i class="glyphicon glyphicon-plus"></i>生成账号
</button> </button>
<button id="btnExport" class="btn btn-default"> <button id="btnExport" class="btn btn-default">
<i class="glyphicon glyphicon-export"></i>导出 <i class="glyphicon glyphicon-export"></i>导出
</button> </button>
</div> </div>
</div> </div>
<!-- .content --> <!-- .content -->
<div id="table"></div> <div id="table"></div>
</div> </div>
</div> </div>
</section> </section>
<div class="modal fade" id="genAccountModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"> <div
class="modal fade"
id="genAccountModal"
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-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button
aria-hidden="true">&times;</span> type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button> </button>
<h4 class="modal-title" id="modalLabel">生成账号</h4> <h4 class="modal-title" id="modalLabel">生成账号</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form class="form-horizontal" id="addForm"> <form class="form-horizontal" id="addForm">
<div class="form-group"> <div class="form-group">
<label for="partitionId" class="col-sm-3 control-label">选择地区</label> <label for="partitionId" class="col-sm-3 control-label"
<div class="col-sm-9"> >选择地区:</label
<select name="partitionId" id="partitionId" class="form-control"> >
<option value="1">英语区</option> <div class="col-sm-7">
<option value="2">阿拉伯语区</option> <select
<option value="4">华语区</option> name="partitionId"
</select> id="partitionId"
class="form-control validate[required]"
></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="nick" class="col-sm-3 control-label">昵称:</label> <label for="nick" class="col-sm-3 control-label">昵称:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control" name="nick" id="nick" placeholder='不填写默认“Peko小新”'> <input
type="text"
class="form-control"
name="nick"
id="nick"
placeholder="不填写默认“Peko小新”"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -81,116 +108,204 @@
<div class="form-group"> <div class="form-group">
<label for="avatar" class="col-sm-3 control-label">头像:</label> <label for="avatar" class="col-sm-3 control-label">头像:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<img src="" id="picUrl" style="width:40px;height:40px;" alt=""> <img
<input type="file" id="uploadAvatarFile" name="uploadAvatarFile" src=""
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"> id="picUrl"
<button class="btn btn-success" type="button" id="uploadPicBtn">上传</button> style="width: 40px; height: 40px"
<input type="hidden" class="form-control validate[required]" name="avatar" id="avatar" alt=""
style="width:40px"><span>不上传将使用默认头像</span> />
<input
type="file"
id="uploadAvatarFile"
name="uploadAvatarFile"
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
/>
<button class="btn btn-success" type="button" id="uploadPicBtn">
上传
</button>
<input
type="hidden"
class="form-control validate[required]"
name="avatar"
id="avatar"
style="width: 40px"
/><span>不上传将使用默认头像</span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group"></div>
</div>
<div class="form-group"> <div class="form-group">
<label for="size" class="col-sm-3 control-label">数量:</label> <label for="size" class="col-sm-3 control-label">数量:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control" name="size" id="size" placeholder='一次生成最多不超过20个' <input
oninput="value=value.replace(/[^\d]/g,'')"> type="text"
class="form-control"
name="size"
id="size"
placeholder="一次生成最多不超过20个"
oninput="value=value.replace(/[^\d]/g,'')"
/>
</div> </div>
</div> </div>
<div class="form-group"> <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-9"> <div class="col-sm-9">
<input type="text" class="form-control" name="remark" id="remark" value="仅供后台记录用" <input
placeholder="请输入备注50字内"> type="text"
class="form-control"
name="remark"
id="remark"
value="仅供后台记录用"
placeholder="请输入备注50字内"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="genDefUser" class="col-sm-3 control-label">帐号类型:</label> <label for="genDefUser" class="col-sm-3 control-label"
>帐号类型:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<select name="defUser" id="genDefUser" class="form-control validate[required]"> <select
name="defUser"
id="genDefUser"
class="form-control validate[required]"
>
<option value="4">工会账号</option> <option value="4">工会账号</option>
<!-- <option value="5">大头账号</option> --> <!-- <option value="5">大头账号</option> -->
</select> </select>
</div> </div>
</div> </div>
<div id="header_block" style="display: none;"> <div id="header_block" style="display: none">
<div class="form-group"> <div class="form-group">
<label for="phone" class="col-sm-3 control-label">手机号:</label> <label for="phone" class="col-sm-3 control-label"
>手机号:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required, maxlength: 20]" name="phone" <input
id="phone" placeholder='请输入手机号,必填'> type="text"
class="form-control validate[required, maxlength: 20]"
name="phone"
id="phone"
placeholder="请输入手机号,必填"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="realName" class="col-sm-3 control-label">实际姓名:</label> <label for="realName" class="col-sm-3 control-label"
>实际姓名:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required] validate[maxlength: 20]" <input
name="realName" id="realName" placeholder='请输入身份证上的姓名,必填'> type="text"
class="form-control validate[required] validate[maxlength: 20]"
name="realName"
id="realName"
placeholder="请输入身份证上的姓名,必填"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="idCardNum" class="col-sm-3 control-label">身份证号:</label> <label for="idCardNum" class="col-sm-3 control-label"
>身份证号:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required] validate[maxlength: 30]" <input
name="idCardNum" id="idCardNum" placeholder='请输入身份证号码,必填'> type="text"
class="form-control validate[required] validate[maxlength: 30]"
name="idCardNum"
id="idCardNum"
placeholder="请输入身份证号码,必填"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="alipayAccount" class="col-sm-3 control-label">支付宝账号:</label> <label for="alipayAccount" class="col-sm-3 control-label"
>支付宝账号:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required] validate[maxlength: 60]" <input
name="alipayAccount" id="alipayAccount" placeholder='请输入支付宝帐号,必填'> type="text"
class="form-control validate[required] validate[maxlength: 60]"
name="alipayAccount"
id="alipayAccount"
placeholder="请输入支付宝帐号,必填"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="alipayAccountName" class="col-sm-3 control-label">支付宝姓名:</label> <label for="alipayAccountName" class="col-sm-3 control-label"
>支付宝姓名:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required] validate[maxlength: 60]" <input
name="alipayAccountName" id="alipayAccountName" placeholder='请输入支付宝姓名'> type="text"
class="form-control validate[required] validate[maxlength: 60]"
name="alipayAccountName"
id="alipayAccountName"
placeholder="请输入支付宝姓名"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="bankCardNum" class="col-sm-3 control-label">银行卡号:</label> <label for="bankCardNum" class="col-sm-3 control-label"
>银行卡号:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required] validate[maxlength: 30]" <input
name="bankCardNum" id="bankCardNum" placeholder='请输入银行卡号'> type="text"
class="form-control validate[required] validate[maxlength: 30]"
name="bankCardNum"
id="bankCardNum"
placeholder="请输入银行卡号"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="bankCardName" class="col-sm-3 control-label">持卡人:</label> <label for="bankCardName" class="col-sm-3 control-label"
>持卡人:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control validate[required] validate[maxlength: 20]" <input
name="bankCardName" id="bankCardName" placeholder='请输入银行卡-持卡人姓名'> type="text"
class="form-control validate[required] validate[maxlength: 20]"
name="bankCardName"
id="bankCardName"
placeholder="请输入银行卡-持卡人姓名"
/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="paymentPwd" class="col-sm-3 control-label">支付密码:</label> <label for="paymentPwd" class="col-sm-3 control-label"
>支付密码:</label
>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" <input
type="text"
class="form-control validate[required] validate[minlength: 6] validate[maxlength: 20]" class="form-control validate[required] validate[minlength: 6] validate[maxlength: 20]"
name="paymentPwd" id="paymentPwd" placeholder='请输入6位数字的支付密码必填'> name="paymentPwd"
id="paymentPwd"
placeholder="请输入6位数字的支付密码必填"
/>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> 关闭
</button>
<button type="button" class="btn btn-primary" id="add">确定</button> <button type="button" class="btn btn-primary" id="add">确定</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
import { showLoading, hideLoading } from '@/utils/maintainer'; import { showLoading, hideLoading } from "@/utils/maintainer";
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
import { buildSelectOption } from '@/utils/system-helper';
export default { export default {
name: "GenAccountView", name: "GenAccountView",
setup() { setup() {
@@ -198,74 +313,102 @@ export default {
}, },
created() { created() {
this.$nextTick(function () { this.$nextTick(function () {
this.initPartition();
this.initData(); this.initData();
}); });
}, },
methods: { methods: {
initPartition() {
getPartitionInfoList().then((res) => {
let data = res.data;
this.partitionInfos = data;
buildSelectOption(
"#partitionId",
null,
data.map((v) => {
return {
value: v.id,
text: v.desc,
};
})
);
});
},
initData() { initData() {
$(function () { $(function () {
var picker1 = $('#startTime').datetimepicker({ var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', format: "yyyy-mm-dd hh:ii:00",
autoclose: true, autoclose: true,
endDate: new Date() endDate: new Date(),
}); });
var picker2 = $('#endTime').datetimepicker({ var picker2 = $("#endTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', format: "yyyy-mm-dd hh:ii:00",
autoclose: true autoclose: true,
}); });
picker1.on('changeDate', function () { picker1.on("changeDate", function () {
var date = $('#startTime').datetimepicker('getDate'); var date = $("#startTime").datetimepicker("getDate");
picker2.datetimepicker('setStartDate', date); picker2.datetimepicker("setStartDate", date);
}); });
picker2.on('changeDate', function () { picker2.on("changeDate", function () {
var date = $('#endTime').datetimepicker('getDate'); var date = $("#endTime").datetimepicker("getDate");
picker1.datetimepicker('setEndDate', date); picker1.datetimepicker("setEndDate", date);
}); });
$('#table').bootstrapTable('destroy'); $("#table").bootstrapTable("destroy");
$('#table').bootstrapTable({ $("#table").bootstrapTable({
columns: [ columns: [
{ field: 'uid', title: 'UID', align: 'center', width: '5%' }, { field: "uid", title: "UID", align: "center", width: "5%" },
{ field: 'erbanNo', title: 'ID', align: 'center', width: '5%' }, { field: "erbanNo", title: "ID", align: "center", width: "5%" },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' }, { field: "nick", title: "昵称", align: "center", width: "5%" },
{ {
field: 'defUser', title: '账号类型', align: 'center', width: '5%', field: "defUser",
title: "账号类型",
align: "center",
width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (val == null) { if (val == null) {
return '-'; return "-";
} }
if (val == 1) { if (val == 1) {
return '普通账号'; return "普通账号";
} else if (val == 2) { } else if (val == 2) {
return '官方账号'; return "官方账号";
} else if (val == 3) { } else if (val == 3) {
return '机器账号'; return "机器账号";
} else if (val == 4) { } else if (val == 4) {
return '工会账户'; return "工会账户";
} else if (val == 5) { } else if (val == 5) {
return '大头账号'; return "大头账号";
} }
return val; return val;
}
}, },
{ field: 'remark', title: '备注', align: 'center', width: '5%' }, },
{ field: 'operator', title: '操作人', align: 'center', width: '5%' }, { field: "remark", title: "备注", align: "center", width: "5%" },
{ {
field: 'createTime', title: '操作时间', align: 'center', valign: 'middle', width: '10%', field: "operator",
title: "操作人",
align: "center",
width: "5%",
},
{
field: "createTime",
title: "操作时间",
align: "center",
valign: "middle",
width: "10%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (val) { if (val) {
var date = new Date(val); var date = new Date(val);
return date.format('yyyy-MM-dd hh:mm:ss'); return date.format("yyyy-MM-dd hh:mm:ss");
} else { } else {
return '-'; return "-";
}
}
} }
},
},
], ],
undefinedText: '-', undefinedText: "-",
cache: false, cache: false,
striped: true, striped: true,
showRefresh: false, showRefresh: false,
@@ -275,107 +418,110 @@ export default {
search: false, search: false,
sidePagination: "server", //表示服务端请求 sidePagination: "server", //表示服务端请求
queryParamsType: "undefined", queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数 queryParams: function queryParams(params) {
//设置查询参数
var param = { var param = {
pageNum: params.pageNumber, pageNum: params.pageNumber,
pageSize: params.pageSize, pageSize: params.pageSize,
defUser: $('#defUser').val(), defUser: $("#defUser").val(),
startTime: $('#startTime').val(), startTime: $("#startTime").val(),
endTime: $('#endTime').val() endTime: $("#endTime").val(),
}; };
return param; return param;
}, },
toolbar: '#toolbar', toolbar: "#toolbar",
url: '/admin/gen/account/list', url: "/admin/gen/account/list",
onLoadSuccess: function () { //加载成功时执行 onLoadSuccess: function () {
//加载成功时执行
console.log("load success"); console.log("load success");
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () {
//加载失败时执行
console.log("load fail"); console.log("load fail");
} },
}); });
$('#addBtn').on('click', function () { $("#addBtn").on("click", function () {
$("#addForm")[0].reset(); $("#addForm")[0].reset();
$('#addForm').validationEngine('hideAll'); $("#addForm").validationEngine("hideAll");
$('#picUrl').attr('src', ''); $("#picUrl").attr("src", "");
$('#genDefUser').val(4); $("#genDefUser").val(4);
$('#header_block').attr('style', 'display:none;'); $("#header_block").attr("style", "display:none;");
$('#genAccountModal').modal('show'); $("#genAccountModal").modal("show");
}); });
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $("#btnSearch").on("click", function () {
TableHelper.doRefresh('#table'); TableHelper.doRefresh("#table");
}); });
$('#uploadPicBtn').on('click', function () { $("#uploadPicBtn").on("click", function () {
var options = { var options = {
type: 'post', type: "post",
url: '/admin/gen/account/headImg', url: "/admin/gen/account/headImg",
dataType: 'json', dataType: "json",
success: function (json) { success: function (json) {
if (json.path) { if (json.path) {
$('#avatar').val(json.path); $("#avatar").val(json.path);
$('#picUrl').attr('src', json.path); $("#picUrl").attr("src", json.path);
} else { } else {
$('#tipMsg').text(json.msg); $("#tipMsg").text(json.msg);
$('#tipModal').modal('show'); $("#tipModal").modal("show");
} }
} },
} };
$('#addForm').ajaxSubmit(options); $("#addForm").ajaxSubmit(options);
}); });
$("#add").click(function () { $("#add").click(function () {
if ($('#addForm').validationEngine('validate')) { if ($("#addForm").validationEngine("validate")) {
var size = $('#size').val(); var size = $("#size").val();
if (!size) { if (!size) {
$("#tipMsg").text("请填写数量"); $("#tipMsg").text("请填写数量");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (size > 20) { if (size > 20) {
$("#tipMsg").text("一次只允许生成20个账号"); $("#tipMsg").text("一次只允许生成20个账号");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (!$('#gender').val()) { if (!$("#gender").val()) {
$("#tipMsg").text("请选择性别"); $("#tipMsg").text("请选择性别");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if ($('#remark').val().length > 50) { if ($("#remark").val().length > 50) {
$("#tipMsg").text("备注不能超过50字"); $("#tipMsg").text("备注不能超过50字");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if ($('#genDefUser').val() == 5) { if ($("#genDefUser").val() == 5) {
// 验证手机号 // 验证手机号
var phoneReg = /^1[0-9]{10}$/; var phoneReg = /^1[0-9]{10}$/;
if (!phoneReg.test($('#phone').val())) { if (!phoneReg.test($("#phone").val())) {
$("#tipMsg").text("手机号不正确"); $("#tipMsg").text("手机号不正确");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
// 验证身份证号 // 验证身份证号
var idCardNumReg = /(^\d{15}$)|(^\d{17}(\d|X|x)$)/; var idCardNumReg = /(^\d{15}$)|(^\d{17}(\d|X|x)$)/;
if (!idCardNumReg.test($('#idCardNum').val())) { if (!idCardNumReg.test($("#idCardNum").val())) {
$("#tipMsg").text("身份证号不正确"); $("#tipMsg").text("身份证号不正确");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
// 验证银行卡号 // 验证银行卡号
var bankCardNumReg = /^\d{10,30}$/; var bankCardNumReg = /^\d{10,30}$/;
if (!bankCardNumReg.test($('#bankCardNum').val())) { if (!bankCardNumReg.test($("#bankCardNum").val())) {
$("#tipMsg").text("银行卡号不正确"); $("#tipMsg").text("银行卡号不正确");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
// 验证支付密码 // 验证支付密码
var paymentPwdReg = /^\d{6}$/; var paymentPwdReg = /^\d{6}$/;
if (!paymentPwdReg.test($('#paymentPwd').val())) { if (!paymentPwdReg.test($("#paymentPwd").val())) {
$("#tipMsg").text("支付密码不正确必须为6位数字"); $("#tipMsg").text("支付密码不正确必须为6位数字");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
} }
@@ -384,52 +530,51 @@ export default {
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/admin/gen/account/add", url: "/admin/gen/account/add",
data: $('#addForm').serialize(), data: $("#addForm").serialize(),
dataType: 'json', dataType: "json",
success: function (json) { success: function (json) {
if (json.success == 'true') { if (json.success == "true") {
$("#genAccountModal").modal('hide'); $("#genAccountModal").modal("hide");
$("#tipMsg").text(json.msg); $("#tipMsg").text(json.msg);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
hideLoading(); hideLoading();
} else { } else {
$("#tipMsg").text("保存失败,错误信息:" + json.msg); $("#tipMsg").text("保存失败,错误信息:" + json.msg);
$("#tipModal").modal('show'); $("#tipModal").modal("show");
hideLoading(); hideLoading();
} }
},
});
} }
})
}
}); });
$('#genDefUser').on('change', function () { $("#genDefUser").on("change", function () {
var defUser = $('#genDefUser').val(); var defUser = $("#genDefUser").val();
if (defUser == 4) { if (defUser == 4) {
$('#header_block').attr('style', 'display:none;'); $("#header_block").attr("style", "display:none;");
} else if (defUser == 5) { } else if (defUser == 5) {
$('#header_block').removeAttr('style'); $("#header_block").removeAttr("style");
} }
}); });
//导出 //导出
$('#btnExport').on('click', function () { $("#btnExport").on("click", function () {
var startTime = $('#startTime').val(); var startTime = $("#startTime").val();
var endTime = $('#endTime').val(); var endTime = $("#endTime").val();
if (null == startTime || startTime.trim() == '') { if (null == startTime || startTime.trim() == "") {
$("#tipMsg").text("开始日期不能为空"); $("#tipMsg").text("开始日期不能为空");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (null == endTime || endTime.trim() == '') { if (null == endTime || endTime.trim() == "") {
$("#tipMsg").text("结束日期不能为空"); $("#tipMsg").text("结束日期不能为空");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (startTime > endTime) { if (startTime > endTime) {
$("#tipMsg").text("开始日期不能大于结束日期"); $("#tipMsg").text("开始日期不能大于结束日期");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
@@ -437,12 +582,9 @@ export default {
form.attr("action", "/admin/gen/account/export"); form.attr("action", "/admin/gen/account/export");
form.submit(); form.submit();
}); });
}); });
}
}, },
},
}; };
</script> </script>

View File

@@ -156,6 +156,7 @@
<input type="checkbox" name="partitionFlag" value="1"/>英语区<br> <input type="checkbox" name="partitionFlag" value="1"/>英语区<br>
<input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br> <input type="checkbox" name="partitionFlag" value="2"/>阿拉伯语区<br>
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br> <input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -188,6 +189,12 @@
<input type="text" class="form-control validate[required]" name="giftName" id="giftEnName"> <input type="text" class="form-control validate[required]" name="giftName" id="giftEnName">
</div> </div>
</div> </div>
<div class="form-group">
<label for="giftTrName" class="col-sm-2 control-label">土耳其礼物名称</label>
<div class="col-sm-10">
<input type="text" class="form-control validate[required]" name="giftName" id="giftTrName">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="goldPrice" class="col-sm-2 control-label">礼物价格</label> <label for="goldPrice" class="col-sm-2 control-label">礼物价格</label>
<div class="col-sm-10"> <div class="col-sm-10">
@@ -282,6 +289,22 @@
<label class="radio-inline"><input type="radio" name="isLatest" value="1"></label> <label class="radio-inline"><input type="radio" name="isLatest" value="1"></label>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-2 control-label">是否需要全服通知</label>
<div class="col-sm-3">
<label class="radio-inline"><input type="radio" name="notifyFull" value="0" checked></label>
<label class="radio-inline"><input type="radio" name="notifyFull" value="1"></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否需要塞头像</label>
<div class="col-sm-3">
<label class="radio-inline"><input type="radio" name="showAvatarType" value="0" checked></label>
<label class="radio-inline"><input type="radio" name="showAvatarType" value="1">送礼者</label>
<label class="radio-inline"><input type="radio" name="showAvatarType" value="2">收礼者</label>
<label class="radio-inline"><input type="radio" name="showAvatarType" value="3">左送右收</label>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">限时礼物</label> <label class="col-sm-2 control-label">限时礼物</label>
<div class="col-sm-3"> <div class="col-sm-3">
@@ -654,6 +677,7 @@ export default {
{field: 'giftName.zh', title: '礼物名称', align: 'center', width: '15%'}, {field: 'giftName.zh', title: '礼物名称', align: 'center', width: '15%'},
{field: 'giftName.ar', title: '阿语礼物名称', align: 'center', width: '10%'}, {field: 'giftName.ar', title: '阿语礼物名称', align: 'center', width: '10%'},
{field: 'giftName.en', title: '英语礼物名称', align: 'center', width: '10%'}, {field: 'giftName.en', title: '英语礼物名称', align: 'center', width: '10%'},
{field: 'giftName.tr', title: '土耳其礼物名称', align: 'center', width: '10%'},
{ {
field: 'partitionFlag', field: 'partitionFlag',
title: '地区', title: '地区',
@@ -670,6 +694,9 @@ export default {
if ((val & 4) != 0) { if ((val & 4) != 0) {
value += '华语区<br>'; value += '华语区<br>';
} }
if ((val & 8) != 0) {
value += '土耳其<br>';
}
return value; return value;
} }
}, },
@@ -769,6 +796,36 @@ export default {
} }
} }
}, },
{
field: 'notifyFull',
title: '是否需要全服通知',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
if (val == 1) {
return '是';
} else {
return '否'
}
}
},
{
field: 'showAvatarType',
title: '是否需要塞头像',
align: 'center',
width: '10%',
formatter: function (val, row, index) {
if (val == 0) {
return '否';
}else if (val == 1) {
return '送礼者';
} else if (val == 2) {
return '收礼者';
}else {
return '左送右收'
}
}
},
{ {
field: 'roomExclude', field: 'roomExclude',
title: '房间专属', title: '房间专属',
@@ -961,6 +1018,8 @@ export default {
$("input:radio[name='hasSvga']")[0].checked = true; $("input:radio[name='hasSvga']")[0].checked = true;
$("input:radio[name='isLatest']")[0].checked = true; $("input:radio[name='isLatest']")[0].checked = true;
$("input:radio[name='isTimeLimit']")[0].checked = true; $("input:radio[name='isTimeLimit']")[0].checked = true;
$("input:radio[name='notifyFull']")[0].checked = true;
$("input:radio[name='showAvatarType']")[0].checked = true;
$("input:radio[name='roomExclude']")[0].checked = true; $("input:radio[name='roomExclude']")[0].checked = true;
$("#notifyStaySecond").val(''); $("#notifyStaySecond").val('');
$("#isSkipRoom").val(''); $("#isSkipRoom").val('');
@@ -1212,6 +1271,8 @@ export default {
$("input:radio[name='hasSvga']")[0].checked = true; $("input:radio[name='hasSvga']")[0].checked = true;
$("input:radio[name='isLatest']")[1].checked = true; $("input:radio[name='isLatest']")[1].checked = true;
$("input:radio[name='isTimeLimit']")[1].checked = true; $("input:radio[name='isTimeLimit']")[1].checked = true;
$("input:radio[name='notifyFull']")[0].checked = true;
$("input:radio[name='showAvatarType']")[0].checked = true;
$("input:radio[name='roomExclude']")[0].checked = true; $("input:radio[name='roomExclude']")[0].checked = true;
$('#giftType').val(''); $('#giftType').val('');
$("#notifyStaySecond").val(''); $("#notifyStaySecond").val('');
@@ -1248,12 +1309,16 @@ export default {
$("#giftArName").val(jsonName.ar); $("#giftArName").val(jsonName.ar);
// 英语名称 // 英语名称
$("#giftEnName").val(jsonName.en); $("#giftEnName").val(jsonName.en);
// 土耳其
$("#giftTrName").val(jsonName.tr);
} else { } else {
$("#giftName").val(giftName); $("#giftName").val(giftName);
// 阿语名称 // 阿语名称
$("#giftArName").val(giftName); $("#giftArName").val(giftName);
// 英语名称 // 英语名称
$("#giftEnName").val(giftName); $("#giftEnName").val(giftName);
// 土耳其名称
$("#giftTrName").val(giftName);
} }
$("#goldPrice").val(json.entity.goldPrice); $("#goldPrice").val(json.entity.goldPrice);
@@ -1290,6 +1355,8 @@ export default {
var hasSvga = parseNum(json.entity.hasSvga); var hasSvga = parseNum(json.entity.hasSvga);
var isLatest = parseNum(json.entity.isLatest); var isLatest = parseNum(json.entity.isLatest);
var isTimeLimit = parseNum(json.entity.isTimeLimit); var isTimeLimit = parseNum(json.entity.isTimeLimit);
var notifyFull = parseNum(json.entity.notifyFull);
var showAvatarType = json.entity.showAvatarType;
var isWholeServer = parseNum(json.entity.isWholeServer); var isWholeServer = parseNum(json.entity.isWholeServer);
var roomExclude = parseNum(json.entity.roomExclude); var roomExclude = parseNum(json.entity.roomExclude);
var partitionFlag = json.entity.partitionFlag; var partitionFlag = json.entity.partitionFlag;
@@ -1307,6 +1374,8 @@ export default {
$("input:radio[name='hasSvga']")[hasSvga].checked = true; $("input:radio[name='hasSvga']")[hasSvga].checked = true;
$("input:radio[name='isLatest']")[isLatest].checked = true; $("input:radio[name='isLatest']")[isLatest].checked = true;
$("input:radio[name='isTimeLimit']")[isTimeLimit].checked = true; $("input:radio[name='isTimeLimit']")[isTimeLimit].checked = true;
$("input:radio[name='notifyFull']")[notifyFull].checked = true;
$("input:radio[name='showAvatarType']")[showAvatarType].checked = true;
$("input:radio[name='isWholeServerLabel']")[isWholeServer].checked = true; $("input:radio[name='isWholeServerLabel']")[isWholeServer].checked = true;
$("input:radio[name='roomExclude']")[roomExclude].checked = true; $("input:radio[name='roomExclude']")[roomExclude].checked = true;
@@ -1396,8 +1465,10 @@ export default {
var ar_name = $("#giftArName").val(); var ar_name = $("#giftArName").val();
// 英语名称 // 英语名称
var en_name = $("#giftEnName").val(); var en_name = $("#giftEnName").val();
// 土耳其名称
var tr_name = $("#giftTrName").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); const nameValue = JSON.stringify(jsonName);
// 修改属性值 // 修改属性值
formData.giftName = nameValue; // 将giftName修改为"newGiftName" formData.giftName = nameValue; // 将giftName修改为"newGiftName"

View File

@@ -14,15 +14,6 @@
<div id="toolbar"> <div id="toolbar">
送礼用户id<input type="text" name="senderErbanNo" id="senderErbanNo" class="input-sm" /> 送礼用户id<input type="text" name="senderErbanNo" id="senderErbanNo" class="input-sm" />
收礼用户id<input type="text" name="receiverErbanNo" id="receiverErbanNo" class="input-sm" /> 收礼用户id<input type="text" name="receiverErbanNo" id="receiverErbanNo" class="input-sm" />
礼物类型
<select name="giftType" id="giftType">
<option value="">全部</option>
<option value="0">背包礼物</option>
<option value="2">普通礼物</option>
<option value="5">福袋奖池礼物</option>
<option value="7">贵族礼物</option>
<option value="8">周星榜礼物</option>
</select>
礼物名称<input type="text" name="giftName" id="giftName" class="input-sm" /> 礼物名称<input type="text" name="giftName" id="giftName" class="input-sm" />
送礼时间<input type="text" name="startTime" id="startTime" class="input-sm"> 送礼时间<input type="text" name="startTime" id="startTime" class="input-sm">
- <input type="text" name="endTime" id="endTime" class="input-sm"> - <input type="text" name="endTime" id="endTime" class="input-sm">
@@ -50,42 +41,30 @@ export default {
}, },
methods: { methods: {
initData() { initData() {
let tableLoaded = false;
let currParams = {}; let currParams = {};
$('#table').bootstrapTable('destroy'); $('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({ $('#table').bootstrapTable({
columns: [ columns: [
{ field: 'senderErbanNo', title: '送礼用户id', align: 'center', width: '8%' }, { field: 'senderErbanNo', title: '送礼用户id', align: 'center', width: '8%' },
{ field: 'senderNick', title: '送礼用户昵称', align: 'center', width: '16%' }, { field: 'senderNick', title: '送礼用户昵称', align: 'center', width: '12%' },
{ field: 'receiverErbanNo', title: '收礼用户id', align: 'center', width: '8%' }, { field: 'receiverErbanNo', title: '收礼用户id', align: 'center', width: '8%' },
{ field: 'receiverNick', title: '收礼用户昵称', align: 'center', width: '16%' }, { field: 'receiverNick', title: '收礼用户昵称', align: 'center', width: '12%' },
{ field: 'giftType', title: '礼物类型', align: 'center', width: '16%' }, { field: 'roomErbanNo', title: "房间id", align: 'center', width: '8%' },
{ field: 'giftName', title: '礼物名称', align: 'center', width: '10%' }, { field: 'roomTitle', title: "房间", align: 'center', width: '12%' },
{ field: 'giftNum', title: '礼物数量', align: 'center', width: '6%' }, { field: 'giftType', title: '礼物类型', align: 'center', width: '8%' },
{ field: 'giftName', title: '礼物名称', align: 'center', width: '8%' },
{ field: 'giftNum', title: '礼物数量', align: 'center', width: '4%' },
{ field: 'totalGoldNum', title: '礼物总价值(钻)', align: 'center', width: '10%' }, { field: 'totalGoldNum', title: '礼物总价值(钻)', align: 'center', width: '10%' },
{ { field: 'createTime', title: '送礼时间', align: 'center', valign: 'middle', width: '16%'},
field: 'createTime',
title: '送礼时间',
align: 'center',
valign: 'middle',
width: '10%',
formatter: function (val, row, index) {
if (val) {
var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:ss");
} else {
return '-';
}
}
}
], ],
cache: false, cache: false,
striped: true, striped: true,
showRefresh: false, showRefresh: false,
pageSize: 10, pageSize: 30,
pagination: true, pagination: true,
pageList: [10, 20, 30, 50], pageList: [30, 50, 100, 200],
sidePagination: "server", //表示服务端请求 sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder //设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order //设置为limit可以获取limit, offset, search, sort, order
@@ -110,11 +89,9 @@ export default {
url: '/admin/giftSendRecord/list', url: '/admin/giftSendRecord/list',
onLoadSuccess: function () { //加载成功时执行 onLoadSuccess: function () { //加载成功时执行
console.log("load success"); console.log("load success");
tableLoaded = true;
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () { //加载失败时执行
console.log("load fail"); console.log("load fail");
tableLoaded = false;
} }
}) })
$('#btnSearch').on('click', function () { $('#btnSearch').on('click', function () {
@@ -123,7 +100,6 @@ export default {
// $("#tipModal").modal('show'); // $("#tipModal").modal('show');
// return; // return;
// } // }
console.debug('ASDFASDF')
// if ($('#startTime').val() && $('#endTime').val()) { // if ($('#startTime').val() && $('#endTime').val()) {
// var dateStart = new Date($('#startTime').val().replace(/\-/g, "/")); // var dateStart = new Date($('#startTime').val().replace(/\-/g, "/"));
// var dateEnd = new Date($('#endTime').val().replace(/\-/g, "/")); // var dateEnd = new Date($('#endTime').val().replace(/\-/g, "/"));
@@ -135,18 +111,24 @@ export default {
// return; // return;
// } // }
// } // }
if (tableLoaded || currParams.pageNumber > 1) { if (currParams.pageNumber > 1) {
TableHelper.doRefreshAndToPage1('#table'); TableHelper.doRefreshAndToPage1('#table');
} else { } else {
TableHelper.doRefresh('#table'); TableHelper.doRefresh('#table');
} }
}) })
var picker1 = $("#startTime").datetimepicker({ var picker1 = $("#startTime").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', todayHighlight: true,
todayBtn: true,
language: "zh-cn",
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true autoclose: true
}) })
var picker2 = $('#endTime').datetimepicker({ var picker2 = $('#endTime').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', todayHighlight: true,
todayBtn: true,
language: "zh-cn",
format: 'yyyy-mm-dd hh:ii:ss',
autoclose: true autoclose: true
}) })
picker1.on('changeDate', function () { picker1.on('changeDate', function () {

File diff suppressed because it is too large Load Diff

View File

@@ -436,7 +436,7 @@ export default {
$("#tipMsg").text("保存失败,错误码:" + res.code + ",该手机号已被占用"); $("#tipMsg").text("保存失败,错误码:" + res.code + ",该手机号已被占用");
$("#tipModal").modal('show'); $("#tipModal").modal('show');
} else { } else {
$("#tipMsg").text("保存失败,错误码:" + res.code); $("#tipMsg").text("保存失败," + res.message);
$("#tipModal").modal('show'); $("#tipModal").modal('show');
} }
} }

View File

@@ -271,7 +271,7 @@
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from '@/utils/bootstrap-table-helper';
import { getPartitionInfoList } from '@/api/partition/partitionInfo'; import { listAll } from '@/api/partition/partitionInfo';
import { buildSelectOption } from '@/utils/system-helper'; import { buildSelectOption } from '@/utils/system-helper';
export default { export default {
@@ -819,7 +819,7 @@ export default {
$("#tipMsg").text("保存失败,错误码:" + res.code + ",该手机号已被占用"); $("#tipMsg").text("保存失败,错误码:" + res.code + ",该手机号已被占用");
$("#tipModal").modal('show'); $("#tipModal").modal('show');
} else { } else {
$("#tipMsg").text("保存失败,错误码:" + res.code); $("#tipMsg").text("保存失败," + res.message);
$("#tipModal").modal('show'); $("#tipModal").modal('show');
} }
} }
@@ -902,7 +902,7 @@ export default {
}, },
initPartition() { initPartition() {
getPartitionInfoList().then(res => { listAll().then(res => {
let data = res.data; let data = res.data;
this.partitionInfos = data; this.partitionInfos = data;
buildSelectOption( buildSelectOption(

View File

@@ -8,32 +8,82 @@
</section> </section>
<!-- .content --> <!-- .content -->
<div id="table"></div> <div id="table"></div>
<div id="toolbar" style="height: auto;"> <div id="toolbar" style="height: auto">
<form id="searchForm" class="col-sm-pull-12" action="/admin/dynamic/verify/export" method="post" <form
target="_blank"> id="searchForm"
class="col-sm-pull-12"
action="/admin/dynamic/verify/export"
method="post"
target="_blank"
>
<div class="col-sm-12"> <div class="col-sm-12">
<label for="erbanNo" class="col-sm-1 control-label">平台号:</label> <label for="partitionId" class="col-sm-1 control-label">地区:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="erbanNo" id="erbanNo"></div> <div class="col-sm-2">
<select name="partitionId" id="partitionId" class="form-control">
<option value="4" selected>华语区</option>
</select>
</div>
</div>
<div class="col-sm-12">
<label for="erbanNo" class="col-sm-1 control-label"
>平台号:</label
>
<div class="col-sm-2">
<input
type="text"
class="form-control"
name="erbanNo"
id="erbanNo"
/>
</div>
<label for="nick" class="col-sm-1 control-label">昵称:</label> <label for="nick" class="col-sm-1 control-label">昵称:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="nick" id="nick"></div> <div class="col-sm-2">
<input type="text" class="form-control" name="nick" id="nick" />
</div>
<label for="status" class="col-sm-1 control-label">状态:</label> <label for="status" class="col-sm-1 control-label">状态:</label>
<div class="col-sm-2"> <div class="col-sm-2">
<select name="status" id="status" data-btn-class="btn-warning" class="form-control"> <select
name="status"
id="status"
data-btn-class="btn-warning"
class="form-control"
>
<option value="" selected="selected">全部</option> <option value="" selected="selected">全部</option>
</select> </select>
</div> </div>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<label class="col-sm-1 control-label">发布时间:</label> <label class="col-sm-1 control-label">发布时间:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="beginDate" id="beginDate">
</div><span class="col-sm-1"></span>
<div class="col-sm-2"><input type="text" class="form-control" name="endDate" id="endDate"></div>
<label for="wolrdId" class="col-sm-1 control-label">话题名称:</label>
<div class="col-sm-2"> <div class="col-sm-2">
<select name="wolrdId" id="wolrdId" data-btn-class="btn-warning" class="form-control"> <input
type="text"
class="form-control"
name="beginDate"
id="beginDate"
/>
</div>
<span class="col-sm-1"></span>
<div class="col-sm-2">
<input
type="text"
class="form-control"
name="endDate"
id="endDate"
/>
</div>
<label for="wolrdId" class="col-sm-1 control-label"
>话题名称:</label
>
<div class="col-sm-2">
<select
name="wolrdId"
id="wolrdId"
data-btn-class="btn-warning"
class="form-control"
>
<option value="" selected="selected">全部</option> <option value="" selected="selected">全部</option>
<option value="-1">动态广场</option> <option value="-1">动态广场</option>
</select> </select>
@@ -56,33 +106,57 @@
</div> </div>
</section> </section>
<div class="modal fade" id="showModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"> <div
class="modal fade"
id="showModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabel"
>
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content" style="width: 500px;"> <div class="modal-content" style="width: 500px">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button
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> <h4 class="modal-title" id="modalLabel">查看</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<input type="hidden" name="id" id="dynamicId" /> <input type="hidden" name="id" id="dynamicId" />
<div class="show" style="margin-left: 60px"> <div class="show" style="margin-left: 60px"></div>
</div> </div>
</div> <div id="imgMask"><img src="" alt="" /></div>
<div id="imgMask"><img src="" alt=""></div>
<div class="modal-footer"> <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>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" id="notPassModal" tabindex="-1" role="dialog" aria-labelledby="modalLabe2"> <div
class="modal fade"
id="notPassModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabe2"
>
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content" style="width: 600px;"> <div class="modal-content" style="width: 600px">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button
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="modalLabe2">请选择原因</h4> <h4 class="modal-title" id="modalLabe2">请选择原因</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@@ -91,13 +165,21 @@
<input type="hidden" name="status" id="status1" /> <input type="hidden" name="status" id="status1" />
<div class="form-group"> <div class="form-group">
<div class="col-sm-10"> <div class="col-sm-10">
<select id="quick_reason" class="form-control" data-btn-class="btn-warning" <select
onchange="setReason()"> id="quick_reason"
<option value="0">動態可能包含抽煙喝酒辱罵攻擊他人等不文明內容</option> class="form-control"
data-btn-class="btn-warning"
onchange="setReason()"
>
<option value="0">
動態可能包含抽煙喝酒辱罵攻擊他人等不文明內容
</option>
<option value="1">動態涉及色情暴力病毒等違規內容</option> <option value="1">動態涉及色情暴力病毒等違規內容</option>
<option value="2">動態包含政治敏感信息</option> <option value="2">動態包含政治敏感信息</option>
<option value="3">動態包含廣告營銷內容</option> <option value="3">動態包含廣告營銷內容</option>
<option value="4">動態可能包含個人隱私信息或涉及他人營私信息</option> <option value="4">
動態可能包含個人隱私信息或涉及他人營私信息
</option>
<option value="5">動態可能涉及線下交易</option> <option value="5">動態可能涉及線下交易</option>
<option value="6">動態內容無意義</option> <option value="6">動態內容無意義</option>
<option value="7">動態內容與世界主題無關</option> <option value="7">動態內容與世界主題無關</option>
@@ -109,32 +191,54 @@
<div class="form-group"> <div class="form-group">
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="reason" id="reason" class="form-control" rows="3"></textarea> <textarea
name="reason"
id="reason"
class="form-control"
rows="3"
></textarea>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="modal-footer"> <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 type="button" class="btn btn-primary" id="not-pass-save">保存</button> 关闭
</button>
<button type="button" class="btn btn-primary" id="not-pass-save">
保存
</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" id="showContentModal" tabindex="-1" role="dialog" aria-labelledby="modalLabe3"> <div
class="modal fade"
id="showContentModal"
tabindex="-1"
role="dialog"
aria-labelledby="modalLabe3"
>
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content" style="width: 500px;"> <div class="modal-content" style="width: 500px">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <button
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="modalLabe3">查看动态内容详情</h4> <h4 class="modal-title" id="modalLabe3">查看动态内容详情</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<span id="dynamic-content"></span> <span id="dynamic-content"></span>
</div> </div>
<div class="modal-footer"> <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>
</div> </div>
</div> </div>
</div> </div>
@@ -142,68 +246,78 @@
</template> </template>
<script> <script>
import TableHelper from '@/utils/bootstrap-table-helper'; import TableHelper from "@/utils/bootstrap-table-helper";
import { showLoading, hideLoading } from '@/utils/maintainer'; import { showLoading, hideLoading } from "@/utils/maintainer";
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { buildSelectOption } from "@/utils/system-helper";
var picker1 = $("#beginDate").datetimepicker({ var picker1 = $("#beginDate").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', format: "yyyy-mm-dd hh:ii:00",
autoclose: true, autoclose: true,
todayBtn: true todayBtn: true,
}); });
var picker2 = $("#endDate").datetimepicker({ var picker2 = $("#endDate").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00', format: "yyyy-mm-dd hh:ii:00",
autoclose: true, autoclose: true,
todayBtn: true todayBtn: true,
}); });
picker1.on('changeDate', function () { picker1.on("changeDate", function () {
var date = $('#beginDate').datetimepicker('getDate'); var date = $("#beginDate").datetimepicker("getDate");
picker2.datetimepicker('setStartDate', date); picker2.datetimepicker("setStartDate", date);
}); });
picker2.on('changeDate', function () { picker2.on("changeDate", function () {
var date = $('#endDate').datetimepicker('getDate'); var date = $("#endDate").datetimepicker("getDate");
picker1.datetimepicker('setEndDate', date); picker1.datetimepicker("setEndDate", date);
}); });
export default { export default {
name: "DynamicVerifyView", name: "DynamicVerifyView",
setup() { setup() {
function setReason() { function setReason() {
if ($("#quick_reason option:selected").val() != 9) { if ($("#quick_reason option:selected").val() != 9) {
$("#reason").val($("#quick_reason option:selected").text()); $("#reason").val($("#quick_reason option:selected").text());
} else { } else {
$("#reason").val(''); $("#reason").val("");
} }
} }
function showContent(note) { function showContent(note) {
var content = $(note).parent().find('input').val(); var content = $(note).parent().find("input").val();
$('#dynamic-content').text(content); $("#dynamic-content").text(content);
$('#showContentModal').modal('show'); $("#showContentModal").modal("show");
} }
function showPic(resUrl, id) { function showPic(resUrl, id) {
var html = '<div style="width: 320px;">'; var html = '<div style="width: 320px;">';
console.log(resUrl); console.log(resUrl);
if (resUrl != null && resUrl != '' && resUrl != undefined) { if (resUrl != null && resUrl != "" && resUrl != undefined) {
var resUrls = resUrl.split(","); var resUrls = resUrl.split(",");
for (var i = 0; i < resUrls.length; i++) { for (var i = 0; i < resUrls.length; i++) {
if (resUrls[i] != null && resUrls[i] != undefined && resUrls[i] != "") { if (
html += '<img id="imgs" src="' + resUrls[i] + '" style="width: 100px;height: 100px;">'; resUrls[i] != null &&
resUrls[i] != undefined &&
resUrls[i] != ""
) {
html +=
'<img id="imgs" src="' +
resUrls[i] +
'" style="width: 100px;height: 100px;">';
} }
} }
} }
html += '</div>'; html += "</div>";
// 打开编辑弹窗 // 打开编辑弹窗
$("#showModal").modal('show'); $("#showModal").modal("show");
$("#dynamicId").val(id); $("#dynamicId").val(id);
$(".show").html(html); $(".show").html(html);
} }
function showVideo(resUrl, id) { function showVideo(resUrl, id) {
var html = '<video width="320" height="240" controls autoplay><source src="' + resUrl + '" type="video/mp4"></video>'; var html =
'<video width="320" height="240" controls autoplay><source src="' +
resUrl +
'" type="video/mp4"></video>';
// 打开编辑弹窗 // 打开编辑弹窗
$("#showModal").modal('show'); $("#showModal").modal("show");
$("#dynamicId").val(id); $("#dynamicId").val(id);
$(".show").html(html); $(".show").html(html);
} }
@@ -215,113 +329,168 @@ export default {
setReason, setReason,
showContent, showContent,
showPic, showPic,
showVideo showVideo,
}; };
}, },
created() { created() {
this.$nextTick(function () { this.$nextTick(function () {
this.initData(); this.initData();
this.initPartition();
}); });
}, },
methods: { methods: {
initData() { initData() {
$(function () { $(function () {
$('#table').bootstrapTable('destroy'); $("#table").bootstrapTable("destroy");
setStatusSelectOption(); setStatusSelectOption();
setTypeSelectOption(); setTypeSelectOption();
$('#table').bootstrapTable({ $("#table").bootstrapTable({
columns: [ columns: [
//{field: 'id', title: 'id', align: 'center', width: '5%'}, //{field: 'id', title: 'id', align: 'center', width: '5%'},
{ field: 'tmp', title: 'id', align: 'center', checkbox: true, width: '5%' },
{ field: 'erbanNo', title: '平台号', align: 'center', width: '5%' },
{ field: 'nick', title: '昵称', align: 'center', width: '5%' },
{ field: 'gender', title: '性别', align: 'center', width: '5%' },
{ field: 'worldName', title: '话题', align: 'center', width: '5%' },
{ {
field: 'content', field: "tmp",
title: '动态内容', title: "id",
align: 'center', align: "center",
width: '5%', checkbox: true,
width: "5%",
},
{ field: "erbanNo", title: "平台号", align: "center", width: "5%" },
{ field: "nick", title: "昵称", align: "center", width: "5%" },
{ field: "gender", title: "性别", align: "center", width: "5%" },
{ field: "worldName", title: "话题", align: "center", width: "5%" },
{
field: "content",
title: "动态内容",
align: "center",
width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (isEmpty(val)) { if (isEmpty(val)) {
return "-"; return "-";
} else { } else {
if (val.length > 50) { if (val.length > 50) {
var content = "<input type='hidden' id='input-content' value='" + val + "'>"; var content =
return val.substring(0, 50) + "..." + content + "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showContent(this) style='margin-left: 10px;'>查看更多</a>"; "<input type='hidden' id='input-content' value='" +
val +
"'>";
return (
val.substring(0, 50) +
"..." +
content +
"<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showContent(this) style='margin-left: 10px;'>查看更多</a>"
);
} else { } else {
return val; return val;
} }
} }
} },
}, },
{ {
field: 'resUrl', field: "resUrl",
title: '图片/视频/语音', title: "图片/视频/语音",
align: 'center', align: "center",
width: '5%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (row.type == 1) { if (row.type == 1) {
return '<audio controls="controls"><source src="' + val + '" type="audio/mpeg"></audio>'; return (
'<audio controls="controls"><source src="' +
val +
'" type="audio/mpeg"></audio>'
);
} else if (row.type == 2) { } else if (row.type == 2) {
return "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showPic('" + row.resUrl + "'," + row.id + ")>查看图片</button>"; return (
"<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showPic('" +
row.resUrl +
"'," +
row.id +
")>查看图片</button>"
);
} else if (row.type == 3) { } else if (row.type == 3) {
return "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showVideo('" + row.resUrl + "'," + row.id + ")>查看视频</button>"; return (
} "<button href='#' class='btn btn-sm' style='color: #00acd6;background:none' onclick=showVideo('" +
row.resUrl +
"'," +
row.id +
")>查看视频</button>"
);
} }
}, },
},
{ {
field: 'createTime', field: "createTime",
title: '发布时间', title: "发布时间",
align: 'center', align: "center",
width: '5%', width: "5%",
valign: 'middle', valign: "middle",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (val) { if (val) {
var date = new Date(val); var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:00"); return date.format("yyyy-MM-dd hh:mm:00");
} else { } else {
return '-'; return "-";
}
} }
}, },
{ field: 'statusStr', title: '状态', align: 'center', width: '5%' }, },
{ field: 'updateBy', title: '操作人', align: 'center', width: '5%' }, { field: "statusStr", title: "状态", align: "center", width: "5%" },
{ {
field: 'updateTime', field: "updateBy",
title: '操作时间', title: "操作人",
align: 'center', align: "center",
width: '5%', width: "5%",
valign: 'middle', },
{
field: "updateTime",
title: "操作时间",
align: "center",
width: "5%",
valign: "middle",
formatter: function (val, row, index) { formatter: function (val, row, index) {
if (val) { if (val) {
var date = new Date(val); var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:00"); return date.format("yyyy-MM-dd hh:mm:00");
} else { } else {
return '-'; return "-";
}
} }
}, },
},
{ {
field: 'id', field: "id",
title: '操作', title: "操作",
align: 'center', align: "center",
width: '5%', width: "5%",
formatter: function (val, row, index) { formatter: function (val, row, index) {
var pass = '<button class="btn btn-sm btn-primary opt-pass" data-id=' + val + ' data-status=1>通&#12288;过</button>'; var pass =
var noPass = '<button class="btn btn-sm btn-danger opt-not-pass" data-id=' + val + ' data-status=2>不通过</button>'; '<button class="btn btn-sm btn-primary opt-pass" data-id=' +
var shelve = '<button class="btn btn-sm btn-primary opt-pass" data-id=' + val + ' data-status=4>上&#12288;架</button>'; val +
var unshelve = '<button class="btn btn-sm btn-danger opt-not-pass" data-id=' + val + ' data-status=5>下&#12288;</button>'; " data-status=1>通&#12288;</button>";
var noPass =
'<button class="btn btn-sm btn-danger opt-not-pass" data-id=' +
val +
" data-status=2>不通过</button>";
var shelve =
'<button class="btn btn-sm btn-primary opt-pass" data-id=' +
val +
" data-status=4>上&#12288;架</button>";
var unshelve =
'<button class="btn btn-sm btn-danger opt-not-pass" data-id=' +
val +
" data-status=5>下&#12288;架</button>";
if (row.status == 0) { if (row.status == 0) {
return pass + '</br>' + noPass; return pass + "</br>" + noPass;
} else if (row.status == 1 || row.status == 6 || row.status == 4) { } else if (
row.status == 1 ||
row.status == 6 ||
row.status == 4
) {
return unshelve; return unshelve;
} else if (row.status == 2 || row.status == 5 || row.status == 7) { } else if (
row.status == 2 ||
row.status == 5 ||
row.status == 7
) {
return shelve; return shelve;
} }
} },
} },
], ],
cache: false, cache: false,
striped: true, striped: true,
@@ -334,63 +503,66 @@ export default {
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder //设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order //设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "-", queryParamsType: "-",
queryParams: function queryParams(params) { //设置查询参数 queryParams: function queryParams(params) {
//设置查询参数
var param = { var param = {
pageNumber: params.pageNumber, pageNumber: params.pageNumber,
pageSize: params.pageSize, pageSize: params.pageSize,
erbanNo: $('#erbanNo').val(), erbanNo: $("#erbanNo").val(),
nick: $('#nick').val(), nick: $("#nick").val(),
status: $('#status').val(), status: $("#status").val(),
beginDate: $('#beginDate').val(), beginDate: $("#beginDate").val(),
endDate: $('#endDate').val(), endDate: $("#endDate").val(),
wolrdId: $('#wolrdId').val(), wolrdId: $("#wolrdId").val(),
partitionId: $("#partitionId").val(),
}; };
return param; return param;
}, },
toolbar: '#toolbar', toolbar: "#toolbar",
url: '/admin/dynamic/verify/list', url: "/admin/dynamic/verify/list",
onLoadSuccess: function () { //加载成功时执行 onLoadSuccess: function () {
//加载成功时执行
console.log("load success"); console.log("load success");
}, },
onLoadError: function () { //加载失败时执行 onLoadError: function () {
//加载失败时执行
console.log("load fail"); console.log("load fail");
} },
}); });
// 查询刷新 // 查询刷新
$('#btnSearch').on('click', function () { $("#btnSearch").on("click", function () {
TableHelper.doRefresh('#table'); TableHelper.doRefresh("#table");
}); });
//重置 //重置
$('#btnReset').on('click', function () { $("#btnReset").on("click", function () {
$('#erbanNo').val(""); $("#erbanNo").val("");
$('#nick').val(""); $("#nick").val("");
$('#status').val(""); $("#status").val("");
$('#beginDate').val(""); $("#beginDate").val("");
$('#endDate').val(""); $("#endDate").val("");
$('#wolrdId').val(""); $("#wolrdId").val("");
}); });
//审核不通过/下架弹框 //审核不通过/下架弹框
$("#table").on("click", '.opt-not-pass', function () { $("#table").on("click", ".opt-not-pass", function () {
var id = $(this).attr("data-id"); var id = $(this).attr("data-id");
var status = $(this).attr("data-status"); var status = $(this).attr("data-status");
if (id == 'undefined') { if (id == "undefined") {
$("#tipMsg").text("id参数有误"); $("#tipMsg").text("id参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (status == 'undefined') { if (status == "undefined") {
$("#tipMsg").text("状态参数有误"); $("#tipMsg").text("状态参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
$("#dynamicId1").val(id); $("#dynamicId1").val(id);
$("#status1").val(status); $("#status1").val(status);
// 打开编辑弹窗 // 打开编辑弹窗
$("#notPassModal").modal('show'); $("#notPassModal").modal("show");
$("#modalLabe2").text("请选择不通过的原因"); $("#modalLabe2").text("请选择不通过的原因");
status = 5; status = 5;
if (status) { if (status) {
@@ -401,15 +573,15 @@ export default {
//审核不通过/下架弹窗 //审核不通过/下架弹窗
$("#not-pass-save").click(function () { $("#not-pass-save").click(function () {
var id = $("#dynamicId1").val(); var id = $("#dynamicId1").val();
if (id == 'undefined') { if (id == "undefined") {
$("#tipMsg").text("id参数有误"); $("#tipMsg").text("id参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
var status = $("#status1").val(); var status = $("#status1").val();
if (status == 'undefined') { if (status == "undefined") {
$("#tipMsg").text("状态参数有误"); $("#tipMsg").text("状态参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
var reason = $("#reason").val(); var reason = $("#reason").val();
@@ -424,18 +596,17 @@ export default {
verify(text, id, status, reason); verify(text, id, status, reason);
}); });
$("#table").on("click", '.opt-pass', function () { $("#table").on("click", ".opt-pass", function () {
var id = $(this).attr("data-id"); var id = $(this).attr("data-id");
var status = $(this).attr("data-status"); var status = $(this).attr("data-status");
if (id == 'undefined') { if (id == "undefined") {
$("#tipMsg").text("id参数有误"); $("#tipMsg").text("id参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
if (status == 'undefined') { if (status == "undefined") {
$("#tipMsg").text("状态参数有误"); $("#tipMsg").text("状态参数有误");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
var text = "通过"; var text = "通过";
@@ -445,40 +616,60 @@ export default {
verify(text, id, status, ""); verify(text, id, status, "");
}); });
//导出 //导出
$('#btnExport').on('click', function () { $("#btnExport").on("click", function () {
var erbanNo = $('#erbanNo').val(); var erbanNo = $("#erbanNo").val();
var nick = $('#nick').val(); var nick = $("#nick").val();
var status = $('#status').val(); var status = $("#status").val();
var beginDate = $('#beginDate').val(); var beginDate = $("#beginDate").val();
var endDate = $('#endDate').val(); var endDate = $("#endDate").val();
var wolrdId = $('#wolrdId').val(); var wolrdId = $("#wolrdId").val();
if (isEmpty(erbanNo) && isEmpty(nick) && isEmpty(status) && isEmpty(beginDate) && isEmpty(endDate) && isEmpty(wolrdId)) { if (
isEmpty(erbanNo) &&
isEmpty(nick) &&
isEmpty(status) &&
isEmpty(beginDate) &&
isEmpty(endDate) &&
isEmpty(wolrdId)
) {
$("#tipMsg").text("请输入导出条件!"); $("#tipMsg").text("请输入导出条件!");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
return; return;
} }
$('#searchForm').submit(); $("#searchForm").submit();
}); });
//图片放大 //图片放大
$('#showModal').on('mouseenter', '#imgs', function (e) { $("#showModal").on("mouseenter", "#imgs", function (e) {
var src = $(this).attr('src'); var src = $(this).attr("src");
$('#imgMask img').attr('src', src); $("#imgMask img").attr("src", src);
$('#imgMask').show(); $("#imgMask").show();
$('#imgMask').css({ $("#imgMask").css({
top: e.clientY + 20, top: e.clientY + 20,
})
})
$('#showModal').on('mouseleave', '#imgs', function (e) {
console.log('移出');
$('#imgMask').hide();
})
}); });
} });
$("#showModal").on("mouseleave", "#imgs", function (e) {
console.log("移出");
$("#imgMask").hide();
});
});
},
initPartition() {
getPartitionInfoList().then((res) => {
let data = res.data;
buildSelectOption(
"#partitionId",
4,
data.map((v) => {
return {
value: v.id,
text: v.desc,
};
})
);
});
},
}, },
}; };
//判断空值 //判断空值
function isEmpty(data) { function isEmpty(data) {
if (data == null || data == undefined || data == "") { if (data == null || data == undefined || data == "") {
@@ -491,40 +682,40 @@ function verify(text, id, status, reason) {
//if (confirm("你确认【"+ text + "】该动态吗?")) { //if (confirm("你确认【"+ text + "】该动态吗?")) {
showLoading(); showLoading();
$.ajax({ $.ajax({
type: 'post', type: "post",
url: "/admin/dynamic/verify/changeStatus", url: "/admin/dynamic/verify/changeStatus",
data: { data: {
dynamicId: id, dynamicId: id,
status: status, status: status,
reason: reason reason: reason,
}, },
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
hideLoading(); hideLoading();
if (status == 2 || status == 5) { if (status == 2 || status == 5) {
$("#notPassModal").modal('hide'); $("#notPassModal").modal("hide");
} }
if (json.success == 'true') { if (json.success == "true") {
$("#tipMsg").text("操作成功"); $("#tipMsg").text("操作成功");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
} else { } else {
$("#tipMsg").text("操作失败"); $("#tipMsg").text("操作失败");
$("#tipModal").modal('show'); $("#tipModal").modal("show");
}
} }
},
}); });
//} //}
} }
function setTypeSelectOption() { function setTypeSelectOption() {
$.ajax({ $.ajax({
type: 'get', type: "get",
url: "/admin/world/list", url: "/admin/world/list",
data: { data: {
status: 1, status: 1,
pageNumber: 1, pageNumber: 1,
pageSize: 1000 pageSize: 1000,
}, },
dataType: "json", dataType: "json",
success: function (json) { success: function (json) {
@@ -533,28 +724,32 @@ function setTypeSelectOption() {
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
let item = rows[i]; let item = rows[i];
let name = item.name; let name = item.name;
if (name.startsWith('{') && name.endsWith('}')) { if (name.startsWith("{") && name.endsWith("}")) {
name = JSON.parse(name).zh; name = JSON.parse(name).zh;
} }
$('#wolrdId').append('<option value="' + rows[i].id + '">' + name + '</option>'); $("#wolrdId").append(
} '<option value="' + rows[i].id + '">' + name + "</option>"
);
} }
} }
},
}); });
} }
function setStatusSelectOption() { function setStatusSelectOption() {
$.ajax({ $.ajax({
type: 'get', type: "get",
url: "/admin/dynamic/verify/getStatus", url: "/admin/dynamic/verify/getStatus",
success: function (json) { success: function (json) {
if (json != null && json != undefined) { if (json != null && json != undefined) {
var rows = json; var rows = json;
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
$('#status').append('<option value="' + rows[i].value + '">' + rows[i].key + '</option>'); $("#status").append(
} '<option value="' + rows[i].value + '">' + rows[i].key + "</option>"
);
} }
} }
},
}); });
} }
</script> </script>